I have this code that works with Opencart 1.5, it adds the Shipping Method to the order list, I have changed it to flag on Express Shipping, however I don't really know what I am missing to make it work for Opencart 2.0.
<modification> <id>Shipmethod</id> <version>1.0.</version> <vqmver>2.1.x</vqmver> <author></author> <file name="admin/model/sale/order.php"> <operation> <search position="replace" regex="true"><![CDATA[~SELECT o.order_id,~]]></search> <add><![CDATA[SELECT o.order_id, o.shipping_method,]]></add> </operation> </file> <file name="admin/controller/sale/order.php"> <operation> <search position="before"><![CDATA['action' => $action]]></search> <add><![CDATA['shipping_method' => $result['shipping_method'],]]></add> </operation> </file> <file name="admin/view/template/sale/order_list.tpl"> <operation> <search position="before"><![CDATA[<td class="left"><?php if ($sort == 'o.date_added') { ?>]]></search> <add><![CDATA[ <td style="width:125px">Express Shipping</td> ]]></add> </operation> <operation> <search position="before"><![CDATA[<td><input type="text" name="filter_date_added"]]></search> <add><![CDATA[<td></td>]]></add> </operation> <operation> <search position="before"><![CDATA[<td class="left"><?php echo $order['date_added']; ?></td>]]></search> <add><![CDATA[<td class="left" style="color:red;"><?php if ($order['shipping_method'] === "3. UK Express Delivery") {echo "YES";};?></td> ]]></add> </operation> </file> </modification> Any help to make it work with Opencart 2.0 would be great :)
No comments:
Post a Comment