我已经覆盖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