Skip to content

Instantly share code, notes, and snippets.

@rrrhys
Created January 31, 2016 21:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rrrhys/72f3c09659781d056ca3 to your computer and use it in GitHub Desktop.
Save rrrhys/72f3c09659781d056ca3 to your computer and use it in GitHub Desktop.
<modification>
<id>Tell Afterpay when shipped.</id>
<version>1.0.0</version>
<vqmver>2.5.1</vqmver>
<author>Rhys Williams</author>
<email>rwilliams@codeworkshop.com.au</email>
<website>www.codeworkshop.com.au</website>
<file name="catalog/model/checkout/order.php">
<operation>
<search position="before"><![CDATA[// If order status is 0 then becomes greater than 0 send main html email]]></search>
<add><![CDATA[
if($order_status_id == 3 && $order_info['order_status_id'] != 3){
// marking as shipped, was not shipped before.
if($order_info['payment_code'] == 'afterpay'){
// it was an afterpay order. curl the notifier.
$this->load->model('payment/afterpay');
$this->model_payment_afterpay->markShipped($order_info['order_id']);
}
}
]]></add>
</operation>
</file>
</modification>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment