View Single Post
  #2  
Old 04-09-2015, 06:04 AM
  xplorer's Avatar 
xplorer xplorer is offline
 

X-Cart team
  
Join Date: Jul 2004
Posts: 925
 

Default Re: ShopByBrand module change

Hello!

An easier way to replace "Brand" with "Manufacturer" might be the following one: go to the "Store setup -> Translations" section in the back-end, search for all multilingual labels having "brand" word in them, and replace the word with "manufacturer".

Don't forget to create a backup copy of the site before editing the labels (as you may want to revert the change later).

As for the custom module - I see the following possible problems:

1. Does the namespace match the directory structure? I'm asking because your namespace ends with "View", whilst the original one is "View\Location\Node". So, it may be that you put your Brand.php file inside the View/Location/Node directory, but left the namespace pointing to the View directory.

2. There is no need in updating the "PARAM_LINK" parameter (unless you change the value), because it happens when you call "parent::defineWidgetParams();"

3. The module will trigger a fatal error if you disable Shop By Brands in your store. To fix this you should tell X-Cart 5 that you alter the class only if Shop By Brands module is enabled:
Code:
... /** * Home node * * @LC_Dependencies ("QSL\ShopByBrand") */ class Brands extends \XLite\Module\QSL\ShopByBrand\View\Location\Node implements \XLite\Base\IDecorator { ...

Also, without the @LC_Dependencies tag X-Cart 5 may put your code before the code added by Shop By Brands module, so that Shop By Brands overwrites yours "Manufactures" word with its "Brands" word.

Does this help?
Reply With Quote