| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
is it possible to override a module's yaml info | ||||
|
|
Thread Tools | Search this Thread |
#11
|
|||||||||
|
|||||||||
Re: is it possible to override a module's yaml info
Hi guys,
Although you can edit the menu and change the link from "?target=brands" to something else, this won't change the URL to the page itself. What the link says is that it is a page handled by "brands" controller. Once you change the "target" value, you link to a different controller class and everything will stop working. The controller class for the page is \XLite\Module\QSL\ShopByBrand\Controller\Customer\ Brands. So, here is what you are to do in your custom module/theme: 1. Add a new controller class for the new target that you need and extend it from \XLite\Module\QSL\ShopByBrand\Controller\Customer\ Brands controller to inherit all the methods necessary for the page. 2. Decorate \XLite\Module\QSL\ShopByBrand\Controller\Customer\ Brands and make it redirect users to your new controller if the target is "brands". 3. Decorate \XLite\Module\QSL\ShopByBrand\View\BrandsPage::get AllowedTargets() and remove "brands" item from the array and add your new target as a new item. If there are other View classes tied to "brands" target, decorate them as well. This should help and will maintain the upgradability (even if something is changed in the original module classes, it will be a few minutes of work to update your classes to adapt to the changes).
__________________
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 |
|||||||||
|
|
|||
X-Cart forums © 2001-2020
|