Jump to content

Product list ordered by manufacturers in category page


Recommended Posts

Is there a way to display the products in others ways than their IDs in the category page?

 

I would like to display my products ordered by their manufacturers. (The option "Filter by category" in the back-office doesn't suit my needs)

 

thanks!

 

Link to comment
Share on other sites

You have to modify Category::getProducts. FInd the main query and instead of

 

$sql .= ' ORDER BY '.(!empty($order_by_prefix) ? $order_by_prefix.'.' : '').'`'.bqSQL($order_by).'` '.pSQL($order_way).'

 

 

Use

 

$sql .= ' ORDER BY m.manufacturer_name ASC';

Link to comment
Share on other sites

×
×
  • Create New...