| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
IsVisible and extending a class confusion | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
IsVisible and extending a class confusion
I have a widget that displays floating social media icons at the side of the screen.
I want to restrict which pages they appear on. I know how to do this in general but... The following code doesn't hide them... Code:
I'm using 'return false' to test for now. I have another module that is using the isVisible method and extending the same class so I imagine this is my problem. So how do I do this when I want two modules to have different show/hide logic? I'm confused.
__________________
Core version: 5.5.xx |
|||||||
#2
|
|||||||||
|
|||||||||
Re: IsVisible and extending a class confusion
You don't need this:
Code:
It is for modifying existing classes/widgets, not for adding new ones.
__________________
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: IsVisible and extending a class confusion
Ah ok.
I worked out why I couldn't change the visibility.. I was directly referencing the template within another template like this: <widget template="modules/MyCustomer/FloatyIcons/body.tpl" /> when I should have been referencing the widget like this... <widget class="\XLite\Module\MyCustomer\FloatyIcons\View\F loatyIcons" /> Class looks something like this Code:
For anyone else that wants to hide something on checkout. I ended up extending the \XLite\View\Content class. I'm sometimes not sure which one to extend. The Widget class was giving me problems due to other classes extending it ( but not decorating it) not sure why.
__________________
Core version: 5.5.xx |
|||||||
|
|
|||
X-Cart forums © 2001-2020
|