prestashop-1.6

Prestashop 1.6 Show manufacturer description on product page


I want to show product description on product page. Is posible to change product.tpl to show it? Is necessary to develop a module or change core clases?


Solution

  • To show the manufacturer description on product page, the best way is to create an override to ProductController like:

    class ProductController extends ProductControllerCore
    {
        public function initContent(){
    
            $manufacturer_description = "";
            if($this->product->id_manufacturer > 0)
            {
                $manufacturer = new Manufacturer($this->product->id_manufacturer, $this->context->language->id);
                $manufacturer_description = $manufacturer->description;
            }
    
            $this->context->smarty->assign('manufacturer_description', $manufacturer_description);
    
            parent::initContent();
        }
    }
    

    Then in the product.tpl of the theme place the {$manufacturer_description} where you want it to show.

    Don't forget to clear cache, and delete the file cache/class_index.php after these changes to take effect.