Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

Add epracel code fields to core shipping methods freeshipping and flatra... #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,13 @@ protected function getConsignementRecord(Mage_Sales_Model_Order $order, Dhmedia_

protected function _getChargeCode(Mage_Sales_Model_Order $order)
{

if($shippingCarrier = $order->getShippingCarrier()) {
if($shippingCarrier->getConfigData('eparcel_code')) {
return $shippingCarrier->getConfigData('eparcel_code');
}
}

list ($carrierCode, $chargeCode) = explode('_', $order->getData('shipping_method'));

if ($this->_isValidChargeCode($chargeCode)) {
Expand Down
24 changes: 24 additions & 0 deletions src/app/code/community/Fontis/Australia/etc/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,30 @@
<sections>
<carriers>
<groups>
<flatrate translate="label">
<fields>
<eparcel_code translate="label">
<label>Eparcel Code</label>
<frontend_type>text</frontend_type>
<sort_order>5000</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
</eparcel_code>
</fields>
</flatrate>
<freeshipping translate="label">
<fields>
<eparcel_code translate="label">
<label>Eparcel Code</label>
<frontend_type>text</frontend_type>
<sort_order>5000</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
</eparcel_code>
</fields>
</freeshipping>
<australiapost translate="label" module="australia">
<label>Australia Post</label>
<frontend_type>text</frontend_type>
Expand Down