In my store, one of the category has only one product. Is it possible to take the user directly to the product detail page of this one product whenever they click this category in the nav bar?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Can php detect if javascript is on or not?
- Using similar_text and strpos together
Follow the Steps:
/** * Template for Mage_Page_Block_Html */
Yes this can be done by using the URL Rewrite Management option in Magento Admin.
In Magento Admin:
Enter the values in each field:
Select Redirect Permanent (301) from the Redirect dropdown.
Now when the category is clicked on on your website it will re-direct to the product.
This can be done programmatically by adding code to the page template in your theme folder which is called for showing the categories. Check full solution here - http://www.codeboss.in/web-funda/2015/01/30/magento-auto-redirect-to-product-details-page-if-category-have-only-one-product/