2015-04-22 45 views
0

當用戶點擊添加到購物車按鈕時,如何在OpenCart的成功消息中顯示產品圖像?
catalog/controller/checkout/cart.php這個代碼改變:如何在opencart中的成功通知消息上顯示圖像?

$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')); 

,但結果卻是這樣的:

您添加的數據/演示/ hp_1.jpg到您的購物車。

+0

嘗試使用''標記。 –

+0

我應該在哪裏使用這個標籤? – DigitCart

+0

圍繞圖像的URL。 –

回答

1

只是在這裏發佈的答案,我以前評論。 在回覆中,將圖片網址放入<img>標記中。這裏的所有都是它的。