开发者

Create a direct link to a Magento product via Product ID

I would like to place a direct link to a magento product without using to pretty urls. Instead of something like this "http://store.d3scene.com/ri开发者_如何学JAVAft-60-days-pre-paid-time-card.html" I would like it to be "http://store.d3scene.com/product/list/id/187/" - or something similar.

Is that possible?


Yes it is. Keeping in mind that most Magento systems are heavily customized and this might not work for your particular installation, use URLs in the form of

http://commercebugdemo.pulsestorm.net/index.php/catalog/product/view/id/27
http://commercebugdemo.pulsestorm.net/index.php/catalog/product/view/id/[ID HERE]

If you're ever wondering about details for a stock Magento page, you can use the free Commerce Bug demo page to find your page, and the use the Controller/Request tab to inspect the path information. (Disclaimer: I own the company that sells the Commerce Bug extension)

You could also turn off URL rewrites in Magento and Magento will generate "not pretty" URLs.


You almost had it. It should be like this

http://store.d3scene.com/product/1729

and you can do categories like this

http://store.d3scene.com/category/1729

You can see some url rewrites used by magento in the following database table.

core_url_rewrite


For product 187, you can use

http://localhost/magento/catalog/product/view/id/187

As long as the visibility setting for product 187 is set to include "Catalog". It should be either "Catalog" or "Catalog,Search".

Visibility for products is set on the Admin->Products->Catalog->edit product screen.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜