Jump to content

Compare the products in manufacturer.tpl


Recommended Posts

Hi guys,

 

I'd like to add the comparison feature to the manufacturer's pages. Currently it's active only on the categories pages. I've tried by adding these lines to the manufacturer.tpl:

 

{include file="$tpl_dir./product-compare.tpl"}
   {include file="$tpl_dir./product-sort.tpl"}
   {include file="$tpl_dir./product-list.tpl" products=$products}
   {include file="$tpl_dir./product-compare.tpl"}
   {include file="$tpl_dir./pagination.tpl"}

 

The sort function works just fine, but the comparison buttons and the check box don't appear at all. Obviously something else needs to be edited, but I have no idea what. I will appreciate very much if someone helps me here.

Link to comment
Share on other sites

  • 4 months later...
  • 1 year later...
  • 9 months later...

Add these lines to file: /controllers/front/ManufacturerController.php  in function initContent():
 

if (isset($this->context->cookie->id_compare))
  $this->context->smarty->assign('compareProducts', CompareProduct::getCompareProducts((int)$this->context->cookie->id_compare));
Link to comment
Share on other sites

  • 1 year later...

 

Add these lines to file: /controllers/front/ManufacturerController.php  in function initContent():

 

if (isset($this->context->cookie->id_compare))
  $this->context->smarty->assign('compareProducts', CompareProduct::getCompareProducts((int)$this->context->cookie->id_compare));

 

this code is not good for PS 1.4 'cause you can't use $this->context

please, what's the correct method for PS 1.4? thanks

Link to comment
Share on other sites

×
×
  • Create New...