| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
quick question (changing year in the Powered By widget) | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
quick question (changing year in the Powered By widget)
hy,i use custom skin to create an custom design.
Now,if i wanna change the content of protected function getCompanyYear() from \XLite\View\PoweredBy.php all i need to do is to copy \XLite\View\PoweredBy.php to XLite\Module\XC\CustomSkin\View and fill with this ? PHP Code:
__________________
xcart 5 |
|||||||
#2
|
|||||||
|
|||||||
Re: quick question
and of course rebuild cache
__________________
xcart 5 |
|||||||
#3
|
|||||||||
|
|||||||||
Re: quick question
You are almost correct.
Your code will create new \XLite\Module\XC\CustomSkin\View\PoweredBy class that extends the default \XLite\View\PoweredBy widget, but it won't make it appear instead of the default one. So, you should make one step further. Change the class declaration as follows: PHP Code:
By using the "implements \XLite\Base\IDecorator" directive you say that you want to not just extend the base class, but also replace it with your custom one. So, technically X-Cart will think that it displays the \XLite\View\PoweredBy widget, but now it will include your custom code instead of the default one. You can read more about this directive here: http://kb.x-cart.com/display/XDD/Decorator+pattern
__________________
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 Last edited by qualiteam : 06-02-2014 at 11:29 PM. |
|||||||||
|
#4
|
|||||||
|
|||||||
Re: quick question
thanks
__________________
xcart 5 |
|||||||
|
|||
X-Cart forums © 2001-2020
|