Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Single Product in Multiple Categories
 
jtogashi
Jr. Member
 
Total Posts:  2
Joined:  2012-11-03
 

Hi Everyone,

I’m pretty new to the Magento scene and I’m sure many of you have seen this question before, but please bear with me.

My website currently has products that exist in multiple categories.  For ex:

URL 1:  http://www.website.com/catA/product1
URL 2:  http://www.website.com/catB/product1
URL 3:  http://www.website.com/catC/product1

The goal I want to achieve here is to specify a single URL as the product’s home URL.  So if I want URL3 to be the home for product1, I want to make sure that whether I’m using the search feature or browsing through categories A, B, or C, they all link to the same URL3.  I hope makes sense....

If this helps, I’ve also included the line of code I use to generate a product’s URL:
Mage::helper(’catalog/FullURL’)->getFullProductUrl($psku)
// $psku = Product SKU

Thanks in advanced for any feedback!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Anshu Mishra
Sr. Member
 
Total Posts:  101
Joined:  2012-04-23
India
 

In Admin end, go to catalog->url rewrite management
add url rewrite
Create URL Rewrite : For Product
Select the product for which you want the url rewrite
and then select the target path which should be your product home page url.

 
Magento Community Magento Community
Magento Community
Magento Community
 
jtogashi
Jr. Member
 
Total Posts:  2
Joined:  2012-11-03
 

Before I start, I want to thank you Anshu_Mishra for replying.

There is a problem with the solution you provided.  I want to be able to specify URL3 as the home URL for product1, but still leave URL1 and URL2 active, if possible. 

If creating a product rewrite were my only option, I’d still have an issue as Magento will not allow me to specify an existing Request Path to my preferred product home URL.

Hopefully my initial question was not confusing.  Thanks again!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Anshu Mishra
Sr. Member
 
Total Posts:  101
Joined:  2012-04-23
India
 

If you want url 3 as the target path then choose url 1 and url 2 as request path and url 3 as target path for both url rewrites.
request path :  target path
url1 :  url3
url2 :  url3

and if you are visiting url 3 and it is redirecting you to product’s home url then remove that record from the url rewrite management.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Amasty
Mentor
 
Avatar
Total Posts:  3988
Joined:  2009-11-10
 
jtogashi - 22 April 2013 04:26 PM

Hi Everyone,

I’m pretty new to the Magento scene and I’m sure many of you have seen this question before, but please bear with me.

My website currently has products that exist in multiple categories.  For ex:

URL 1:  http://www.website.com/catA/product1
URL 2:  http://www.website.com/catB/product1
URL 3:  http://www.website.com/catC/product1

The goal I want to achieve here is to specify a single URL as the product’s home URL.  So if I want URL3 to be the home for product1, I want to make sure that whether I’m using the search feature or browsing through categories A, B, or C, they all link to the same URL3.  I hope makes sense....

If this helps, I’ve also included the line of code I use to generate a product’s URL:
Mage::helper(’catalog/FullURL’)->getFullProductUrl($psku)
// $psku = Product SKU

Thanks in advanced for any feedback!

Hello,

please consider this extension as well: http://amasty.com/magento-unique-product-url.html. The module allows setting one unique product URL even if the item is added to multiple categories. And when you are coming to the product page from different categories or via related products block, or search results - the URL will remain unique for all cases.

Feel free to ask for more details!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top