OpenCart - 在购物车/结账页面上显示制造商

时间:2013-11-15 11:40:45

标签: php opencart

OpenCart 1.5.6&默认主题。

如何在购物车页面上为添加到购物车的每件商品(产品名称下方)显示“制造商”?

我试过了:

文件:\ catalog \ controller \ checkout \ confirm.php

添加了:

if ($this->config->get('config_manufacturer')) {
    $manufacturer = $product['manufacturer'];
} else {
    $manufacturer = false;
}

之前:

$product_data[] = array(

并补充说:

'manufacturer'    => $product['manufacturer'],

后:

'model'      => $product['model'],

文件:\ catalog \ view \ theme \ default \ template \ checkout \ confirm.tpl

加入:

<?php if ($product['manufacturer']) { ?>[<?php echo $product['manufacturer']; ?>]<?php } ?>

后:

<td class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a>

但显示错误:

Notice: Undefined index: manufacturer in /x/x/x/x/catalog/controller/checkout/confirm.php on line 254

有任何线索吗?

0 个答案:

没有答案
相关问题