I used a free module for having product images in orders for Opencart 1.5, iam trying to change some of the code to work in the Opencart 2.0.3.1, but dont work out well for me since iam not a developer.
i changed the
class="left to class="text-left
class="right to class="text-right
$totals to $total
if someone can help fix the code to work for Opencart 2
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<id>Image_in_Admin_Orders</id>
<version>1.1</version>
<vqmver>2.3.2</vqmver>
<author>@Brunte27</author>
<file name="admin/view/template/sale/order_info.tpl">
<operation error="log">
<search position="after"><![CDATA[<td class="text-left"><?php echo $column_product; ?></td>]]></search>
<add><![CDATA[<td class="text-left"><?php echo "Image"; ?></td>]]></add>
</operation>
<operation error="log">
<search position="replace"><![CDATA[<tbody>]]></search>
<add><![CDATA[]]></add>
</operation>
<operation error="log">
<search position="replace"><![CDATA[<?php foreach ($products as $product) { ?>]]></search>
<add><![CDATA[ <?php foreach ($products as $product) { ?>
<?php $productinfo = $this->db->query("SELECT * FROM " . DB_PREFIX . "product WHERE product_id = '" . ($product['product_id'] . "'"));?>
<tbody id="product-row<?php echo $product['order_product_id']; ?>">]]></add>
</operation>
<operation error="log">
<search position="replace"><![CDATA[<td colspan="4" class="text-right"><?php echo $total['title']; ?>:</td>]]></search>
<add><![CDATA[ <td colspan="5" class="text-right"><?php echo $total['title']; ?>:</td>]]></add>
</operation>
<operation error="log">
<search position="before"><![CDATA[<td class="text-left"><?php echo $product['model']; ?></td>]]></search>
<add><![CDATA[ <td>
<img src="<?php echo HTTPS_CATALOG."image/".$productinfo->row['image']; ?>" width="60" height="60" />
</td>]]></add>
</operation>
</file>
</modification>