Reputation: 1
I want to show the Product image in the Invoice for Opencart, when user purchase something the invoice is generated with the product name only, i want the invoice to have the product image alaso, can you please let me know how i can do this ? Thanks in advance.
Upvotes: 0
Views: 461
Reputation: 1
first load image this model like this
$this->load->model('tool/upload');
near line 512 before
$data['products'] = array();
foreach ($order_product_query->rows as $product) {
Just make a function in your catlog/model/checkout/order to fetch image. pass product id as parameter and return that single variable.
call that function in $data such as
'image' => $this->model_tool_image->resize($this->myfunc($product['product_id']), $thumb_width, $thumb_height),
Finally,
get your product image called in view file by image variable.
Upvotes: 0