| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Remove featured products from all pages except home page | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Remove featured products from all pages except home page
I have tried to remove the featured products section from all pages except the home page. I tried removing it from all pages as well, with no luck.
Here is what i have in my custom module Main.php: PHP Code:
Not sure where I am going wrong. Any help would be greatly appreciated. Thanks!
__________________
xCart 5.2.16 |
|||||||
#2
|
|||||||||
|
|||||||||
Re: Remove featured products from all pages except home page
You try to remove one of core templates that is used in multiple places. This is wrong.
Instead, you should create a custom module that "decorates" the getAllowedTargets() method in \XLite\Module\CDev\FeaturedProducts\View\Customer\ FeaturedProducts class as follows: PHP Code:
This will make the widget appear on pages rendered by the "main" controller only - and this controller renders only the home page.
__________________
Alex Solovev, Qualiteam --- User manual Video tutorials X-Cart FAQ You are welcome to press "Thanks" button if you find this post useful Click here to learn how to apply patches X-Cart Extensions |
|||||||||
#3
|
|||||||
|
|||||||
Re: Remove featured products from all pages except home page
thank you. That worked!
__________________
xCart 5.2.16 |
|||||||
|
|||
X-Cart forums © 2001-2020
|