I've developed a module that sends some product pages to a product customization wizard. I've used getProductUrl()
to change the links to point to the customization URL.
http://mywebsite.com/designer/?id=417&size=21
I now want to use the original URL, but serve up the content of the new URL.
http://mywebsite.com/custom-rectangle-name-tag-1-5-x-3-5
I want this only to happen for products that use my customization module. The logic for this already exists in getProductUrl()
. My question is where can I put this logic?
I've tried to send the product route to my module. I've put the route for products in my config.xml as is. This doesn't reroute it, nor would I expect it to. (extraneous information left out).
<config>
<frontend>
<routers>
<catalog>
<use>standard</use>
<args>
<module>Mage_Catalog</module>
<frontName>catalog</frontName>
</args>
</catalog>
</routers>
<default>
<router>catalog</router>
</default>
</frontend>
</config>
I've put in the controller I've wished to use, but it serves a 404.
<routers>
<catalog>
<use>standard</use>
<args>
<module>HSC_PCE</module>
<frontName>pce</frontName>
</args>
</catalog>
</routers>
I've also tried putting it inside of my namespace like so. It gives the original product page.
<routers>
<hsc_pce>
<catalog>
<use>standard</use>
<args>
<module>HSC_PCE</module>
<frontName>designer</frontName>
</args>
</catalog>
</hsc_pce>
</routers>
Even if this did work, if it wasn't a customization wizard product, how would I serve the original route?
How can I serve a different page to my customization wizard products?