我想得到产品图片的网址链接
即时编辑目录/ controller / checkout / confirm.php
$data['products'][] = array(
'cart_id' => $product['cart_id'],
'product_id' => $product['product_id'],
'name' => $product['name'],
'model' => $product['model'],
'option' => $option_data,
'recurring' => $recurring,
'quantity' => $product['quantity'],
'subtract' => $product['subtract'],
'price' => $this->currency->format($this->tax->calculate($product['price'], $product['tax_class_id'], $this->config->get('config_tax'))),
'total' => $this->currency->format($this->tax->calculate($product['price'], $product['tax_class_id'], $this->config->get('config_tax')) * $product['quantity']),
'href' => $this->url->link('product/product', 'product_id=' . $product['product_id']),
我试着添加
'thumb' => $this->model_tool_image->resize($product['image'], $this->config->get('config_image_related_width'), $this->config->get('config_image_related_height')),
在checkout / confirm.tpl中调用$ product ['thumb']之后我得到了致命错误
Fatal error: Call to a member function resize() on a non-object in /var/www/xxx.dev/public_html/catalog/controller/checkout/confirm.php on line 393
1 回答
我只是补充一下
$这 - >负载>模型( '工具/图像');
后
$这个 - >负载>模型( '工具/上传');
在confirm.php控制器上