0

I have a custom product page and have a button too on that page below the product. I added a link on the product and the link is

<a href="<?php echo $_product->getProductUrl() ?>">

so When I'm clicking on this link the page is redirecting to "product_name.html" . So my question is, where would i find this "product_name.html" or is there any way that I could add a custom page on that link and edit that page according my need?

0

You can use url rewrites: Go to Catalog>URL Rewrite Managment and add a URL Rewrite for product. It will walk you though and then in the last step you need to modify the Request Path (this will be your custom prodcut_name.html), click save and you have your custom url added to your product.

0

You can use $product->getUrlPath() instead of $product->getProductUrl().

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.