2017-01-19 4 views
0

商品ページに商品説明を表示したい。 product.tplを変更すると表示されますか?モジュールを開発したり、コアクラッシュを変更する必要がありますか?そして、あなたがしたいテーマ場所{$ manufacturer_description}のproduct.tplにPrestashop 1.6 Show製造者の説明ページで

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(); 
    } 
} 

答えて

1

製品ページ上のメーカーの説明を表示するには、最善の方法は次のようProductControllerへの上書きを作成することですそれは表示する。

キャッシュをクリアしてから、これらの変更を有効にした後でcache/class_index.phpファイルを削除してください。

関連する問題