View Single Post
  #2  
Old 11-10-2014, 03:59 AM
  xplorer's Avatar 
xplorer xplorer is offline
 

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

Default Re: ShopBy Brand - brand page layout changes

Hi Jan,

Here are the files that render the page:

1. skins/default/en/modules/QSL/ShopByBrand/brands_page/all_brands.tpl is the template that wraps the page data into HTML. It uses the BrandsPage class to get the page data and do necessary checks/logic against it.

2. XLite\Module\QSL\ShopByBrand\View\BrandsPage is the class that implement the logic to retrieve page data and do checks against it. The "getBrands()" method uses other classes to retrieve brands from the database. The "getBrandRows()" method prepare the data and split it into chunks (rows). There are other methods used by the template (check the template for their names).

From you description it looks like you are to "decorate" both the files from your module:
- you need the data displayed in a single column with every group having the "letter" title, so you should change the template file
- you need the data to be ordered by the brand name, so you should change the getBrands() method accordingly
- you need the data to be a plain list of brands, not a table with multiple columns, so you should change the getBrandRows() method as well (or create a new method and call it from your new template instead of this one)
Reply With Quote