我已經覆蓋ProductController.php如下顯示manufactere國家。在Prestashop 1.6中添加製造商城市和國家在產品清單和產品頁面
class ProductController extends ProductControllerCore
{
public function initContent()
{
$manufacturer_country = "";
if($this->product->id_manufacturer > 0)
{
$manufacturer = new Manufacturer($this->product->id_manufacturer, $this->context->language->id);
$manufacturer_country = $manufacturer->country;
}
$this->context->smarty->assign('manufacturer_country', $manufacturer_country);
parent::initContent();
}
}
在product.tpl我寫{$ manufacturer_country},但沒有打印。任何人都可以指導我如何打印product.tpl和產品list.tpl
我把以上ProductController.php在Project \ override \ controller \ front \目錄。我刪除緩存。 – MUHIUDDIN