如何在 opencart 中的成功通知消息中显示图像?
how to display image on success notification message in opencart?
当用户点击添加到购物车按钮时,如何在 OpenCart 的成功消息中显示产品图像?
我在 catalog/controller/checkout/cart.php
中更改了此代码:
$json['success'] = sprintf($this->language->get('text_success'), $this->url->link('product/product', 'product_id=' . $this->request->post['product_id']), $product_info['name'], $this->url->link('checkout/cart'));
到这个
$json['success'] = sprintf($this->language->get('text_success'), $this->url->link('product/product', 'product_id=' . $this->request->post['product_id']), $product_info['image'], $this->url->link('checkout/cart'));
但结果是这样的:
You added data/demo/hp_1.jpg to your cart.
只是为了 post 这里的答案,我之前已经评论过了。
在回复中,将图片 URL 放入 <img>
标签中。仅此而已。
当用户点击添加到购物车按钮时,如何在 OpenCart 的成功消息中显示产品图像?
我在 catalog/controller/checkout/cart.php
中更改了此代码:
$json['success'] = sprintf($this->language->get('text_success'), $this->url->link('product/product', 'product_id=' . $this->request->post['product_id']), $product_info['name'], $this->url->link('checkout/cart'));
到这个
$json['success'] = sprintf($this->language->get('text_success'), $this->url->link('product/product', 'product_id=' . $this->request->post['product_id']), $product_info['image'], $this->url->link('checkout/cart'));
但结果是这样的:
You added data/demo/hp_1.jpg to your cart.
只是为了 post 这里的答案,我之前已经评论过了。
在回复中,将图片 URL 放入 <img>
标签中。仅此而已。