douruhu4282 2016-03-17 06:06
浏览 45
已采纳

制造商名称在opencart中的产品类别

I am trying to show manufacturer name in category product. adding following code show some

error

"Undefined index: manufacturer_id in C:\wamp\www\pcc\catalog\controller\product\category.php"

$this->load->model('catalog/manufacturer');
$manufacturer = $this->model_catalog_manufacturer->getManufacturer($result['manufacturer_id']);

please give me some idea i want to show manufacturer name with each product in category page.

  • 写回答

1条回答 默认 最新

  • dongpei3245 2017-07-15 21:58
    关注

    You should modify the CORE of opencart or you should use OCMod.
    something like $this->model_catalog_manufacturer->getManufacturer($product_info['manufacturer_id']); will return the manufacturer data. then you can retrieve what you want (image, name and...).

    you can find the solution here you can find some tutorial here too, but it's about product page. for category page it's same.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?