Version Notes
Shippit Magento Integration module, using the Shippit v3 API.
Allows for retrieving shipping quotes during checkout and sending orders to Shippit.
Also adds Australian States and Territories to the available region options and Authority to Leave and Delivery Comments to the checkout process.
Download this release
Release Info
Developer | Matthew Muscat |
Extension | Shippit_Shippit |
Version | 4.5.4 |
Comparing to | |
See all releases |
Code changes from version 4.3.18 to 4.5.4
- app/code/community/Shippit/Shippit/Block/Adminhtml/Sales/Order.php +2 -2
- app/code/community/Shippit/Shippit/Block/Adminhtml/Sales/Order/Grid.php +13 -13
- app/code/community/Shippit/Shippit/Block/Adminhtml/Sales/Order/Items.php +1 -1
- app/code/community/Shippit/Shippit/Block/Adminhtml/System/Config/Form/Field/Renderer/Shipping/Methods.php +3 -3
- app/code/community/Shippit/Shippit/Block/Adminhtml/System/Config/Form/Field/Renderer/Shippit/ServiceClass.php +2 -2
- app/code/community/Shippit/Shippit/Block/Adminhtml/System/Config/Form/Field/Sync/Order/ShippingMethodMapping.php +2 -2
- app/code/community/Shippit/Shippit/Block/Adminhtml/System/Config/Form/Fieldset/Version.php +1 -1
- app/code/community/Shippit/Shippit/Block/Checkout/Cart/Shipping.php +1 -1
- app/code/community/Shippit/Shippit/Block/Checkout/Shipping/AuthorityToLeave.php +1 -1
- app/code/community/Shippit/Shippit/Block/Checkout/Shipping/DeliveryInstructions.php +2 -2
- app/code/community/Shippit/Shippit/Exception.php +1 -1
- app/code/community/Shippit/Shippit/Helper/Api.php +2 -2
- app/code/community/Shippit/Shippit/Helper/Bugsnag.php +16 -4
- app/code/community/Shippit/Shippit/Helper/Carrier.php +12 -2
- app/code/community/Shippit/Shippit/Helper/Checkout.php +1 -1
- app/code/community/Shippit/Shippit/Helper/Data.php +3 -3
- app/code/community/Shippit/Shippit/Helper/Sync/{Order/Items.php → Item.php} +144 -5
- app/code/community/Shippit/Shippit/Helper/Sync/Order.php +14 -26
- app/code/community/Shippit/Shippit/Helper/Sync/Shipping.php +1 -1
- app/code/community/Shippit/Shippit/Model/Api/Order.php +5 -11
- app/code/community/Shippit/Shippit/Model/Logger.php +4 -4
- app/code/community/Shippit/Shippit/Model/Observer/Adminhtml/Sales/Order.php +1 -1
- app/code/community/Shippit/Shippit/Model/Observer/Order/Sync.php +3 -3
- app/code/community/Shippit/Shippit/Model/Observer/Quote/AuthorityToLeave.php +1 -1
- app/code/community/Shippit/Shippit/Model/Observer/Quote/DeliveryInstructions.php +1 -1
- app/code/community/Shippit/Shippit/Model/Observer/Shipping/Tracking.php +1 -1
- app/code/community/Shippit/Shippit/Model/Observer/Shippit.php +1 -1
- app/code/community/Shippit/Shippit/Model/Observer/System/Config.php +3 -3
- app/code/community/Shippit/Shippit/Model/Request/Api/Order.php +26 -14
- app/code/community/Shippit/Shippit/Model/Request/Api/Shipment.php +10 -10
- app/code/community/Shippit/Shippit/Model/Request/Sync/Order.php +39 -13
- app/code/community/Shippit/Shippit/Model/Resource/Setup.php +1 -1
- app/code/community/Shippit/Shippit/Model/Resource/Sync/Order.php +2 -2
- app/code/community/Shippit/Shippit/Model/Resource/Sync/Order/Collection.php +21 -1
- app/code/community/Shippit/Shippit/Model/Resource/Sync/Order/Item.php +1 -1
- app/code/community/Shippit/Shippit/Model/Resource/Sync/Order/Item/Collection.php +1 -1
- app/code/community/Shippit/Shippit/Model/Shipping/Carrier/Shippit.php +31 -9
- app/code/community/Shippit/Shippit/Model/Shippit.php +2 -2
- app/code/community/Shippit/Shippit/Model/Sync/Order.php +1 -1
- app/code/community/Shippit/Shippit/Model/Sync/Order/Config.php +1 -1
- app/code/community/Shippit/Shippit/Model/Sync/Order/Item.php +1 -1
- app/code/community/Shippit/Shippit/Model/System/Config/Source/Catalog/Attributes.php +2 -2
- app/code/community/Shippit/Shippit/Model/System/Config/Source/Catalog/Attributes/Location.php +2 -2
- app/code/community/Shippit/Shippit/Model/System/Config/Source/Catalog/Products.php +13 -16
- app/code/community/Shippit/Shippit/Model/System/Config/Source/Catalog/Unit/Dimensions.php +38 -0
- app/code/community/Shippit/Shippit/Model/System/Config/Source/Catalog/Unit/Weight.php +4 -4
- app/code/community/Shippit/Shippit/Model/System/Config/Source/Order/Status/Processing.php +1 -1
- app/code/community/Shippit/Shippit/Model/System/Config/Source/Shipping/Methods.php +2 -2
- app/code/community/Shippit/Shippit/Model/System/Config/Source/Shippit/Environment.php +2 -2
- app/code/community/Shippit/Shippit/Model/System/Config/Source/Shippit/Margin.php +42 -0
- app/code/community/Shippit/Shippit/Model/System/Config/Source/Shippit/MaxTimeslots.php +2 -2
- app/code/community/Shippit/Shippit/Model/System/Config/Source/Shippit/Methods.php +3 -4
- app/code/community/Shippit/Shippit/Model/System/Config/Source/Shippit/Order/Status.php +2 -2
- app/code/community/Shippit/Shippit/Model/System/Config/Source/Shippit/Sync/Mode.php +2 -2
- app/code/community/Shippit/Shippit/Model/System/Config/Source/Shippit/Sync/SendAllOrders.php +2 -2
- app/code/community/Shippit/Shippit/controllers/Adminhtml/Shippit/Order/SyncController.php +1 -1
- app/code/community/Shippit/Shippit/controllers/Adminhtml/Shippit/OrderController.php +3 -3
- app/code/community/Shippit/Shippit/controllers/OrderController.php +8 -8
- app/code/community/Shippit/Shippit/data/shippit_setup/data-install-4.0.0.php +1 -1
- app/code/community/Shippit/Shippit/data/shippit_setup/data-upgrade-4.1.0-4.1.1.php +2 -2
- app/code/community/Shippit/Shippit/data/shippit_setup/data-upgrade-4.1.6-4.1.7.php +1 -1
- app/code/community/Shippit/Shippit/data/shippit_setup/data-upgrade-4.2.3-4.2.4.php +1 -1
- app/code/community/Shippit/Shippit/data/shippit_setup/data-upgrade-4.3.2-4.3.3.php +1 -1
- app/code/community/Shippit/Shippit/data/shippit_setup/data-upgrade-4.4.0-4.5.0.php +42 -0
- app/code/community/Shippit/Shippit/data/shippit_setup/data-upgrade-4.5.3-4.5.4.php +40 -0
- app/code/community/Shippit/Shippit/etc/adminhtml.xml +1 -1
- app/code/community/Shippit/Shippit/etc/config.xml +11 -3
- app/code/community/Shippit/Shippit/etc/system.xml +116 -19
- app/code/community/Shippit/Shippit/sql/shippit_setup/install-4.0.0.php +1 -1
- app/code/community/Shippit/Shippit/sql/shippit_setup/upgrade-4.0.9-4.1.0.php +1 -1
- app/code/community/Shippit/Shippit/sql/shippit_setup/upgrade-4.1.0-4.1.1.php +1 -1
- app/code/community/Shippit/Shippit/sql/shippit_setup/upgrade-4.2.5-4.2.6.php +1 -1
- app/code/community/Shippit/Shippit/sql/shippit_setup/upgrade-4.2.6-4.3.0.php +1 -1
- app/code/community/Shippit/Shippit/sql/shippit_setup/upgrade-4.4.0-4.5.0.php +65 -0
- app/design/adminhtml/default/default/layout/shippit.xml +17 -1
- app/design/adminhtml/default/default/template/shippit/system/config/form/field/array.phtml +1 -1
- app/design/frontend/base/default/layout/shippit.xml +1 -3
- app/design/frontend/base/default/template/shippit/checkout/onepage/shipping_method.phtml +2 -2
- app/design/frontend/base/default/template/shippit/checkout/onepage/shipping_method/authoritytoleave.phtml +1 -1
- app/design/frontend/base/default/template/shippit/checkout/onepage/shipping_method/deliveryinstructions.phtml +1 -1
- app/design/frontend/base/default/template/shippit/email/order/shipment/track.phtml +2 -2
- package.xml +4 -4
app/code/community/Shippit/Shippit/Block/Adminhtml/Sales/Order.php
CHANGED
@@ -21,8 +21,8 @@ class Shippit_Shippit_Block_Adminhtml_Sales_Order extends Mage_Adminhtml_Block_W
|
|
21 |
$this->_blockGroup = 'shippit';
|
22 |
$this->_controller = 'adminhtml_sales_order';
|
23 |
$this->_headerText = Mage::helper('shippit')->__('Shippit Orders');
|
24 |
-
|
25 |
parent::__construct();
|
26 |
$this->_removeButton('add');
|
27 |
}
|
28 |
-
}
|
21 |
$this->_blockGroup = 'shippit';
|
22 |
$this->_controller = 'adminhtml_sales_order';
|
23 |
$this->_headerText = Mage::helper('shippit')->__('Shippit Orders');
|
24 |
+
|
25 |
parent::__construct();
|
26 |
$this->_removeButton('add');
|
27 |
}
|
28 |
+
}
|
app/code/community/Shippit/Shippit/Block/Adminhtml/Sales/Order/Grid.php
CHANGED
@@ -25,7 +25,7 @@ class Shippit_Shippit_Block_Adminhtml_Sales_Order_Grid extends Mage_Adminhtml_Bl
|
|
25 |
$this->setSaveParametersInSession(true);
|
26 |
$this->setUseAjax(true);
|
27 |
}
|
28 |
-
|
29 |
protected function _prepareCollection()
|
30 |
{
|
31 |
$collection = Mage::getResourceModel('shippit/sync_order_collection')
|
@@ -67,13 +67,13 @@ class Shippit_Shippit_Block_Adminhtml_Sales_Order_Grid extends Mage_Adminhtml_Bl
|
|
67 |
'order_status',
|
68 |
'order.status'
|
69 |
);
|
70 |
-
|
71 |
$this->setCollection($collection);
|
72 |
parent::_prepareCollection();
|
73 |
|
74 |
return $this;
|
75 |
}
|
76 |
-
|
77 |
protected function _prepareColumns()
|
78 |
{
|
79 |
$helper = Mage::helper('shippit');
|
@@ -85,12 +85,12 @@ class Shippit_Shippit_Block_Adminhtml_Sales_Order_Grid extends Mage_Adminhtml_Bl
|
|
85 |
'column_css_class' => 'no-display',
|
86 |
'header_css_class' => 'no-display'
|
87 |
));
|
88 |
-
|
89 |
$this->addColumn('increment_id', array(
|
90 |
'header' => $helper->__('Order #'),
|
91 |
'index' => 'increment_id',
|
92 |
));
|
93 |
-
|
94 |
$this->addColumn('purchased_on', array(
|
95 |
'header' => $helper->__('Purchased On'),
|
96 |
'type' => 'datetime',
|
@@ -103,14 +103,14 @@ class Shippit_Shippit_Block_Adminhtml_Sales_Order_Grid extends Mage_Adminhtml_Bl
|
|
103 |
'getter' => 'getItems',
|
104 |
'renderer' => 'shippit/adminhtml_sales_order_items'
|
105 |
));
|
106 |
-
|
107 |
$this->addColumn('grand_total', array(
|
108 |
'header' => $helper->__('Grand Total'),
|
109 |
'index' => 'grand_total',
|
110 |
'type' => 'currency',
|
111 |
'currency_code' => $currency
|
112 |
));
|
113 |
-
|
114 |
$this->addColumn('service_class', array(
|
115 |
'header' => $helper->__('Service Class'),
|
116 |
'index' => 'service_class',
|
@@ -118,7 +118,7 @@ class Shippit_Shippit_Block_Adminhtml_Sales_Order_Grid extends Mage_Adminhtml_Bl
|
|
118 |
'type' => 'options',
|
119 |
'options' => Mage::getSingleton('shippit/system_config_source_shippit_methods')->getMethods(true)
|
120 |
));
|
121 |
-
|
122 |
$this->addColumn('order_state', array(
|
123 |
'header' => $helper->__('State'),
|
124 |
'index' => 'order_state',
|
@@ -176,10 +176,10 @@ class Shippit_Shippit_Block_Adminhtml_Sales_Order_Grid extends Mage_Adminhtml_Bl
|
|
176 |
'sortable' => false
|
177 |
)
|
178 |
));
|
179 |
-
|
180 |
return parent::_prepareColumns();
|
181 |
}
|
182 |
-
|
183 |
public function decorateServiceClass($value)
|
184 |
{
|
185 |
return ucfirst($value);
|
@@ -196,7 +196,7 @@ class Shippit_Shippit_Block_Adminhtml_Sales_Order_Grid extends Mage_Adminhtml_Bl
|
|
196 |
$value,
|
197 |
$value
|
198 |
);
|
199 |
-
|
200 |
return $cell;
|
201 |
}
|
202 |
|
@@ -262,9 +262,9 @@ class Shippit_Shippit_Block_Adminhtml_Sales_Order_Grid extends Mage_Adminhtml_Bl
|
|
262 |
{
|
263 |
|
264 |
}
|
265 |
-
|
266 |
public function getGridUrl()
|
267 |
{
|
268 |
return $this->getUrl('*/*/grid', array('_current'=>true));
|
269 |
}
|
270 |
-
}
|
25 |
$this->setSaveParametersInSession(true);
|
26 |
$this->setUseAjax(true);
|
27 |
}
|
28 |
+
|
29 |
protected function _prepareCollection()
|
30 |
{
|
31 |
$collection = Mage::getResourceModel('shippit/sync_order_collection')
|
67 |
'order_status',
|
68 |
'order.status'
|
69 |
);
|
70 |
+
|
71 |
$this->setCollection($collection);
|
72 |
parent::_prepareCollection();
|
73 |
|
74 |
return $this;
|
75 |
}
|
76 |
+
|
77 |
protected function _prepareColumns()
|
78 |
{
|
79 |
$helper = Mage::helper('shippit');
|
85 |
'column_css_class' => 'no-display',
|
86 |
'header_css_class' => 'no-display'
|
87 |
));
|
88 |
+
|
89 |
$this->addColumn('increment_id', array(
|
90 |
'header' => $helper->__('Order #'),
|
91 |
'index' => 'increment_id',
|
92 |
));
|
93 |
+
|
94 |
$this->addColumn('purchased_on', array(
|
95 |
'header' => $helper->__('Purchased On'),
|
96 |
'type' => 'datetime',
|
103 |
'getter' => 'getItems',
|
104 |
'renderer' => 'shippit/adminhtml_sales_order_items'
|
105 |
));
|
106 |
+
|
107 |
$this->addColumn('grand_total', array(
|
108 |
'header' => $helper->__('Grand Total'),
|
109 |
'index' => 'grand_total',
|
110 |
'type' => 'currency',
|
111 |
'currency_code' => $currency
|
112 |
));
|
113 |
+
|
114 |
$this->addColumn('service_class', array(
|
115 |
'header' => $helper->__('Service Class'),
|
116 |
'index' => 'service_class',
|
118 |
'type' => 'options',
|
119 |
'options' => Mage::getSingleton('shippit/system_config_source_shippit_methods')->getMethods(true)
|
120 |
));
|
121 |
+
|
122 |
$this->addColumn('order_state', array(
|
123 |
'header' => $helper->__('State'),
|
124 |
'index' => 'order_state',
|
176 |
'sortable' => false
|
177 |
)
|
178 |
));
|
179 |
+
|
180 |
return parent::_prepareColumns();
|
181 |
}
|
182 |
+
|
183 |
public function decorateServiceClass($value)
|
184 |
{
|
185 |
return ucfirst($value);
|
196 |
$value,
|
197 |
$value
|
198 |
);
|
199 |
+
|
200 |
return $cell;
|
201 |
}
|
202 |
|
262 |
{
|
263 |
|
264 |
}
|
265 |
+
|
266 |
public function getGridUrl()
|
267 |
{
|
268 |
return $this->getUrl('*/*/grid', array('_current'=>true));
|
269 |
}
|
270 |
+
}
|
app/code/community/Shippit/Shippit/Block/Adminhtml/Sales/Order/Items.php
CHANGED
@@ -54,4 +54,4 @@ class Shippit_Shippit_Block_Adminhtml_Sales_Order_Items extends Mage_Adminhtml_B
|
|
54 |
|
55 |
return $table;
|
56 |
}
|
57 |
-
}
|
54 |
|
55 |
return $table;
|
56 |
}
|
57 |
+
}
|
app/code/community/Shippit/Shippit/Block/Adminhtml/System/Config/Form/Field/Renderer/Shipping/Methods.php
CHANGED
@@ -19,14 +19,14 @@ class Shippit_Shippit_Block_Adminhtml_System_Config_Form_Field_Renderer_Shipping
|
|
19 |
protected function _toHtml()
|
20 |
{
|
21 |
$column = $this->getColumn();
|
22 |
-
|
23 |
// retrieve a list of shipping method, excluding shippit shipping methods
|
24 |
$options = Mage::getModel('shippit/system_config_source_shipping_methods')->toOptionArray(true);
|
25 |
|
26 |
foreach ($options as $option) {
|
27 |
$optionsHtml[] = '<option value="' . $option['value'] . '">' . $option['label'] . "</option>";
|
28 |
}
|
29 |
-
|
30 |
return '<select class="'.$column['class'].'" style="'.$column['style'].'" name="'.$this->getInputName().'">'.implode('', $optionsHtml).'</select>';
|
31 |
}
|
32 |
-
}
|
19 |
protected function _toHtml()
|
20 |
{
|
21 |
$column = $this->getColumn();
|
22 |
+
|
23 |
// retrieve a list of shipping method, excluding shippit shipping methods
|
24 |
$options = Mage::getModel('shippit/system_config_source_shipping_methods')->toOptionArray(true);
|
25 |
|
26 |
foreach ($options as $option) {
|
27 |
$optionsHtml[] = '<option value="' . $option['value'] . '">' . $option['label'] . "</option>";
|
28 |
}
|
29 |
+
|
30 |
return '<select class="'.$column['class'].'" style="'.$column['style'].'" name="'.$this->getInputName().'">'.implode('', $optionsHtml).'</select>';
|
31 |
}
|
32 |
+
}
|
app/code/community/Shippit/Shippit/Block/Adminhtml/System/Config/Form/Field/Renderer/Shippit/ServiceClass.php
CHANGED
@@ -24,7 +24,7 @@ class Shippit_Shippit_Block_Adminhtml_System_Config_Form_Field_Renderer_Shippit_
|
|
24 |
foreach ($options as $option) {
|
25 |
$optionsHtml[] = '<option value="' . $option['value'] . '">' . $option['label'] . "</option>";
|
26 |
}
|
27 |
-
|
28 |
return '<select class="'.$column['class'].'" style="'.$column['style'].'" name="'.$this->getInputName().'">'.implode('', $optionsHtml).'</select>';
|
29 |
}
|
30 |
-
}
|
24 |
foreach ($options as $option) {
|
25 |
$optionsHtml[] = '<option value="' . $option['value'] . '">' . $option['label'] . "</option>";
|
26 |
}
|
27 |
+
|
28 |
return '<select class="'.$column['class'].'" style="'.$column['style'].'" name="'.$this->getInputName().'">'.implode('', $optionsHtml).'</select>';
|
29 |
}
|
30 |
+
}
|
app/code/community/Shippit/Shippit/Block/Adminhtml/System/Config/Form/Field/Sync/Order/ShippingMethodMapping.php
CHANGED
@@ -31,10 +31,10 @@ class Shippit_Shippit_Block_Adminhtml_System_Config_Form_Field_Sync_Order_Shippi
|
|
31 |
|
32 |
$this->_addAfter = false;
|
33 |
$this->_addButtonLabel = Mage::helper('shippit')->__('Add Mapping');
|
34 |
-
|
35 |
parent::__construct();
|
36 |
|
37 |
// use the array template to auto populate the array of saved data
|
38 |
$this->setTemplate('shippit/system/config/form/field/array.phtml');
|
39 |
}
|
40 |
-
}
|
31 |
|
32 |
$this->_addAfter = false;
|
33 |
$this->_addButtonLabel = Mage::helper('shippit')->__('Add Mapping');
|
34 |
+
|
35 |
parent::__construct();
|
36 |
|
37 |
// use the array template to auto populate the array of saved data
|
38 |
$this->setTemplate('shippit/system/config/form/field/array.phtml');
|
39 |
}
|
40 |
+
}
|
app/code/community/Shippit/Shippit/Block/Adminhtml/System/Config/Form/Fieldset/Version.php
CHANGED
@@ -39,4 +39,4 @@ class Shippit_Shippit_Block_Adminhtml_System_Config_Form_Fieldset_Version extend
|
|
39 |
|
40 |
return $this->_fieldRenderer;
|
41 |
}
|
42 |
-
}
|
39 |
|
40 |
return $this->_fieldRenderer;
|
41 |
}
|
42 |
+
}
|
app/code/community/Shippit/Shippit/Block/Checkout/Cart/Shipping.php
CHANGED
@@ -37,4 +37,4 @@ class Shippit_Shippit_Block_Checkout_Cart_Shipping extends Mage_Checkout_Block_C
|
|
37 |
return (bool) Mage::helper('shippit/carrier')->isActive()
|
38 |
|| parent::getStateActive();
|
39 |
}
|
40 |
-
}
|
37 |
return (bool) Mage::helper('shippit/carrier')->isActive()
|
38 |
|| parent::getStateActive();
|
39 |
}
|
40 |
+
}
|
app/code/community/Shippit/Shippit/Block/Checkout/Shipping/AuthorityToLeave.php
CHANGED
@@ -85,4 +85,4 @@ class Shippit_Shippit_Block_Checkout_Shipping_AuthorityToLeave extends Mage_Core
|
|
85 |
|
86 |
return parent::_toHtml();
|
87 |
}
|
88 |
-
}
|
85 |
|
86 |
return parent::_toHtml();
|
87 |
}
|
88 |
+
}
|
app/code/community/Shippit/Shippit/Block/Checkout/Shipping/DeliveryInstructions.php
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
class Shippit_Shippit_Block_Checkout_Shipping_DeliveryInstructions extends Mage_Core_Block_Template
|
18 |
{
|
19 |
protected $helper;
|
20 |
-
|
21 |
public function __construct()
|
22 |
{
|
23 |
$this->helper = Mage::helper('shippit/checkout');
|
@@ -80,4 +80,4 @@ class Shippit_Shippit_Block_Checkout_Shipping_DeliveryInstructions extends Mage_
|
|
80 |
|
81 |
return parent::_toHtml();
|
82 |
}
|
83 |
-
}
|
17 |
class Shippit_Shippit_Block_Checkout_Shipping_DeliveryInstructions extends Mage_Core_Block_Template
|
18 |
{
|
19 |
protected $helper;
|
20 |
+
|
21 |
public function __construct()
|
22 |
{
|
23 |
$this->helper = Mage::helper('shippit/checkout');
|
80 |
|
81 |
return parent::_toHtml();
|
82 |
}
|
83 |
+
}
|
app/code/community/Shippit/Shippit/Exception.php
CHANGED
@@ -17,4 +17,4 @@
|
|
17 |
class Shippit_Shippit_Exception extends Mage_Core_Exception
|
18 |
{
|
19 |
|
20 |
-
}
|
17 |
class Shippit_Shippit_Exception extends Mage_Core_Exception
|
18 |
{
|
19 |
|
20 |
+
}
|
app/code/community/Shippit/Shippit/Helper/Api.php
CHANGED
@@ -95,7 +95,7 @@ class Shippit_Shippit_Helper_Api extends Mage_Core_Helper_Abstract
|
|
95 |
if ($exceptionOnResponseError && $apiResponse->isError()) {
|
96 |
$message = 'API Response Error' . "\n";
|
97 |
$message .= 'Response: ' . $apiResponse->getStatus() . ' - ' . $apiResponse->getMessage() . "\n";
|
98 |
-
|
99 |
$this->prepareMatadata($uri, $requestData, $apiResponse);
|
100 |
$this->logger->log('API Response Error', 'An API Response Error Occurred');
|
101 |
|
@@ -171,4 +171,4 @@ class Shippit_Shippit_Helper_Api extends Mage_Core_Helper_Abstract
|
|
171 |
return $this->call('merchant', $requestData, Zend_Http_Client::PUT, $exceptionOnResponseError)
|
172 |
->response;
|
173 |
}
|
174 |
-
}
|
95 |
if ($exceptionOnResponseError && $apiResponse->isError()) {
|
96 |
$message = 'API Response Error' . "\n";
|
97 |
$message .= 'Response: ' . $apiResponse->getStatus() . ' - ' . $apiResponse->getMessage() . "\n";
|
98 |
+
|
99 |
$this->prepareMatadata($uri, $requestData, $apiResponse);
|
100 |
$this->logger->log('API Response Error', 'An API Response Error Occurred');
|
101 |
|
171 |
return $this->call('merchant', $requestData, Zend_Http_Client::PUT, $exceptionOnResponseError)
|
172 |
->response;
|
173 |
}
|
174 |
+
}
|
app/code/community/Shippit/Shippit/Helper/Bugsnag.php
CHANGED
@@ -43,7 +43,7 @@ class Shippit_Shippit_Helper_Bugsnag extends Mage_Core_Helper_Abstract
|
|
43 |
}
|
44 |
else {
|
45 |
Mage::log('Shippit Bugsnag Error', 'Couldn\'t activate Bugsnag Error Monitoring due to missing Bugsnag PHP library!', null, 'shippit.log');
|
46 |
-
|
47 |
return false;
|
48 |
}
|
49 |
|
@@ -51,7 +51,7 @@ class Shippit_Shippit_Helper_Bugsnag extends Mage_Core_Helper_Abstract
|
|
51 |
$this->client->setReleaseStage($this->getReleaseStage())
|
52 |
->setErrorReportingLevel($this->getErrorReportingLevel())
|
53 |
->setMetaData($this->getMetaData());
|
54 |
-
|
55 |
$this->client->setNotifier($this->getNotiferData());
|
56 |
}
|
57 |
|
@@ -68,7 +68,7 @@ class Shippit_Shippit_Helper_Bugsnag extends Mage_Core_Helper_Abstract
|
|
68 |
$metaData = array();
|
69 |
|
70 |
$metaData['magento'] = array(
|
71 |
-
'edition' =>
|
72 |
'version' => Mage::getVersion(),
|
73 |
);
|
74 |
$metaData['module'] = $this->getModuleInfo();
|
@@ -112,4 +112,16 @@ class Shippit_Shippit_Helper_Bugsnag extends Mage_Core_Helper_Abstract
|
|
112 |
|
113 |
return $level;
|
114 |
}
|
115 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
}
|
44 |
else {
|
45 |
Mage::log('Shippit Bugsnag Error', 'Couldn\'t activate Bugsnag Error Monitoring due to missing Bugsnag PHP library!', null, 'shippit.log');
|
46 |
+
|
47 |
return false;
|
48 |
}
|
49 |
|
51 |
$this->client->setReleaseStage($this->getReleaseStage())
|
52 |
->setErrorReportingLevel($this->getErrorReportingLevel())
|
53 |
->setMetaData($this->getMetaData());
|
54 |
+
|
55 |
$this->client->setNotifier($this->getNotiferData());
|
56 |
}
|
57 |
|
68 |
$metaData = array();
|
69 |
|
70 |
$metaData['magento'] = array(
|
71 |
+
'edition' => $this->getEdition(),
|
72 |
'version' => Mage::getVersion(),
|
73 |
);
|
74 |
$metaData['module'] = $this->getModuleInfo();
|
112 |
|
113 |
return $level;
|
114 |
}
|
115 |
+
|
116 |
+
private function getEdition()
|
117 |
+
{
|
118 |
+
$mage = new Mage;
|
119 |
+
|
120 |
+
if (method_exists($mage, 'getEdition')) {
|
121 |
+
return Mage::getEdition();
|
122 |
+
}
|
123 |
+
else {
|
124 |
+
return 'Unknown';
|
125 |
+
}
|
126 |
+
}
|
127 |
+
}
|
app/code/community/Shippit/Shippit/Helper/Carrier.php
CHANGED
@@ -38,7 +38,7 @@ class Shippit_Shippit_Helper_Carrier extends Shippit_Shippit_Helper_Data
|
|
38 |
return Mage::getStoreConfig($path);
|
39 |
}
|
40 |
}
|
41 |
-
|
42 |
/**
|
43 |
* @return bool
|
44 |
*/
|
@@ -57,6 +57,16 @@ class Shippit_Shippit_Helper_Carrier extends Shippit_Shippit_Helper_Data
|
|
57 |
return explode(',', self::getStoreConfig('allowed_methods'));
|
58 |
}
|
59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
public function getMaxTimeslots()
|
61 |
{
|
62 |
return self::getStoreConfig('max_timeslots');
|
@@ -86,4 +96,4 @@ class Shippit_Shippit_Helper_Carrier extends Shippit_Shippit_Helper_Data
|
|
86 |
{
|
87 |
return self::getStoreConfig('enabled_product_attribute_value');
|
88 |
}
|
89 |
-
}
|
38 |
return Mage::getStoreConfig($path);
|
39 |
}
|
40 |
}
|
41 |
+
|
42 |
/**
|
43 |
* @return bool
|
44 |
*/
|
57 |
return explode(',', self::getStoreConfig('allowed_methods'));
|
58 |
}
|
59 |
|
60 |
+
public function getMargin()
|
61 |
+
{
|
62 |
+
return self::getStoreConfig('margin');
|
63 |
+
}
|
64 |
+
|
65 |
+
public function getMarginAmount()
|
66 |
+
{
|
67 |
+
return self::getStoreConfig('margin_amount');
|
68 |
+
}
|
69 |
+
|
70 |
public function getMaxTimeslots()
|
71 |
{
|
72 |
return self::getStoreConfig('max_timeslots');
|
96 |
{
|
97 |
return self::getStoreConfig('enabled_product_attribute_value');
|
98 |
}
|
99 |
+
}
|
app/code/community/Shippit/Shippit/Helper/Checkout.php
CHANGED
@@ -54,4 +54,4 @@ class Shippit_Shippit_Helper_Checkout extends Shippit_Shippit_Helper_Data
|
|
54 |
{
|
55 |
return parent::isActive() && self::getStoreConfig('delivery_instructions_active', true);
|
56 |
}
|
57 |
-
}
|
54 |
{
|
55 |
return parent::isActive() && self::getStoreConfig('delivery_instructions_active', true);
|
56 |
}
|
57 |
+
}
|
app/code/community/Shippit/Shippit/Helper/Data.php
CHANGED
@@ -23,13 +23,13 @@ class Shippit_Shippit_Helper_Data extends Mage_Core_Helper_Abstract
|
|
23 |
|
24 |
const AUTHORITY_TO_LEAVE_ID = 'shippit_authority_to_leave';
|
25 |
const DELIVERY_INSTRUCTIONS_ID = 'shippit_delivery_instructions';
|
26 |
-
|
27 |
const SYNC_MODE_REALTIME = 'realtime';
|
28 |
const SYNC_MODE_CRON = 'cron';
|
29 |
const SYNC_MODE_CUSTOM = 'custom';
|
30 |
|
31 |
const CARRIER_CODE = 'shippit';
|
32 |
-
|
33 |
/**
|
34 |
* Return store config value for key
|
35 |
*
|
@@ -152,4 +152,4 @@ class Shippit_Shippit_Helper_Data extends Mage_Core_Helper_Abstract
|
|
152 |
return false;
|
153 |
}
|
154 |
}
|
155 |
-
}
|
23 |
|
24 |
const AUTHORITY_TO_LEAVE_ID = 'shippit_authority_to_leave';
|
25 |
const DELIVERY_INSTRUCTIONS_ID = 'shippit_delivery_instructions';
|
26 |
+
|
27 |
const SYNC_MODE_REALTIME = 'realtime';
|
28 |
const SYNC_MODE_CRON = 'cron';
|
29 |
const SYNC_MODE_CUSTOM = 'custom';
|
30 |
|
31 |
const CARRIER_CODE = 'shippit';
|
32 |
+
|
33 |
/**
|
34 |
* Return store config value for key
|
35 |
*
|
152 |
return false;
|
153 |
}
|
154 |
}
|
155 |
+
}
|
app/code/community/Shippit/Shippit/Helper/Sync/{Order/Items.php → Item.php}
RENAMED
@@ -14,13 +14,86 @@
|
|
14 |
* @license http://www.shippit.com/terms
|
15 |
*/
|
16 |
|
17 |
-
class
|
18 |
{
|
19 |
const UNIT_WEIGHT_KILOGRAMS = 'kilograms';
|
20 |
const UNIT_WEIGHT_GRAMS = 'grams';
|
21 |
|
|
|
|
|
|
|
|
|
22 |
protected $locationAttributeCode = null;
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
public function getSkus($items)
|
25 |
{
|
26 |
$itemsSkus = array();
|
@@ -98,6 +171,70 @@ class Shippit_Shippit_Helper_Sync_Order_Items extends Shippit_Shippit_Helper_Syn
|
|
98 |
return $weight;
|
99 |
}
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
public function getLocation($item)
|
102 |
{
|
103 |
$attributeCode = $this->getLocationAttributeCode();
|
@@ -113,8 +250,8 @@ class Shippit_Shippit_Helper_Sync_Order_Items extends Shippit_Shippit_Helper_Syn
|
|
113 |
public function getLocationAttributeCode()
|
114 |
{
|
115 |
if (is_null($this->locationAttributeCode)) {
|
116 |
-
$helper = Mage::helper('shippit/
|
117 |
-
|
118 |
if (!$helper->isProductLocationActive()) {
|
119 |
$this->locationAttributeCode = false;
|
120 |
}
|
@@ -129,7 +266,7 @@ class Shippit_Shippit_Helper_Sync_Order_Items extends Shippit_Shippit_Helper_Syn
|
|
129 |
/**
|
130 |
* Get the product attribute value, ensuring we get
|
131 |
* the full text value if it's a select or multiselect attribute
|
132 |
-
*
|
133 |
* @param object $product The Product Object
|
134 |
* @param string $attributeCode The Attribute Code
|
135 |
* @return string The Product Attribute Value (full text)
|
@@ -160,4 +297,6 @@ class Shippit_Shippit_Helper_Sync_Order_Items extends Shippit_Shippit_Helper_Syn
|
|
160 |
|
161 |
return $prefix . $functionName;
|
162 |
}
|
163 |
-
|
|
|
|
14 |
* @license http://www.shippit.com/terms
|
15 |
*/
|
16 |
|
17 |
+
class Shippit_Shippit_Helper_Sync_Item extends Shippit_Shippit_Helper_Data
|
18 |
{
|
19 |
const UNIT_WEIGHT_KILOGRAMS = 'kilograms';
|
20 |
const UNIT_WEIGHT_GRAMS = 'grams';
|
21 |
|
22 |
+
const UNIT_DIMENSION_MILLIMETRES = 'millimetres';
|
23 |
+
const UNIT_DIMENSION_CENTIMETRES = 'centimetres';
|
24 |
+
const UNIT_DIMENSION_METRES = 'metres';
|
25 |
+
|
26 |
protected $locationAttributeCode = null;
|
27 |
|
28 |
+
/**
|
29 |
+
* Path to module sync order config options
|
30 |
+
*/
|
31 |
+
const XML_PATH_SETTINGS = 'shippit/sync_item/';
|
32 |
+
|
33 |
+
/**
|
34 |
+
* Return store config value for key
|
35 |
+
*
|
36 |
+
* @param string $key
|
37 |
+
* @return string
|
38 |
+
*/
|
39 |
+
public function getStoreConfig($key, $flag = false)
|
40 |
+
{
|
41 |
+
$path = self::XML_PATH_SETTINGS . $key;
|
42 |
+
|
43 |
+
if ($flag) {
|
44 |
+
return Mage::getStoreConfigFlag($path);
|
45 |
+
}
|
46 |
+
else {
|
47 |
+
return Mage::getStoreConfig($path);
|
48 |
+
}
|
49 |
+
}
|
50 |
+
|
51 |
+
// BEGIN: Configuration Helpers
|
52 |
+
|
53 |
+
public function getProductUnitWeight()
|
54 |
+
{
|
55 |
+
return self::getStoreConfig('product_unit_weight');
|
56 |
+
}
|
57 |
+
|
58 |
+
public function isProductDimensionActive()
|
59 |
+
{
|
60 |
+
return self::getStoreConfig('product_dimension_active', true);
|
61 |
+
}
|
62 |
+
|
63 |
+
public function getProductUnitDimension()
|
64 |
+
{
|
65 |
+
return self::getStoreConfig('product_unit_dimension');
|
66 |
+
}
|
67 |
+
|
68 |
+
public function getProductDimensionLengthAttributeCode()
|
69 |
+
{
|
70 |
+
return self::getStoreConfig('product_dimension_length_attribute_code');
|
71 |
+
}
|
72 |
+
|
73 |
+
public function getProductDimensionWidthAttributeCode()
|
74 |
+
{
|
75 |
+
return self::getStoreConfig('product_dimension_width_attribute_code');
|
76 |
+
}
|
77 |
+
|
78 |
+
public function getProductDimensionDepthAttributeCode()
|
79 |
+
{
|
80 |
+
return self::getStoreConfig('product_dimension_depth_attribute_code');
|
81 |
+
}
|
82 |
+
|
83 |
+
public function isProductLocationActive()
|
84 |
+
{
|
85 |
+
return self::getStoreConfig('product_location_active', true);
|
86 |
+
}
|
87 |
+
|
88 |
+
public function getProductLocationAttributeCode()
|
89 |
+
{
|
90 |
+
return self::getStoreConfig('product_location_attribute_code');
|
91 |
+
}
|
92 |
+
|
93 |
+
// END: Configuration Helpers
|
94 |
+
|
95 |
+
// BEGIN: Logic Helpers
|
96 |
+
|
97 |
public function getSkus($items)
|
98 |
{
|
99 |
$itemsSkus = array();
|
171 |
return $weight;
|
172 |
}
|
173 |
|
174 |
+
public function getDimension($dimension)
|
175 |
+
{
|
176 |
+
// ensure the dimension is present and not empty
|
177 |
+
if (empty($dimension)) {
|
178 |
+
return null;
|
179 |
+
}
|
180 |
+
|
181 |
+
switch ($this->getProductUnitDimension()) {
|
182 |
+
case self::UNIT_DIMENSION_MILLIMETRES:
|
183 |
+
$dimension = ($dimension / 1000);
|
184 |
+
break;
|
185 |
+
case self::UNIT_DIMENSION_CENTIMETRES:
|
186 |
+
$dimension = ($dimension / 100);
|
187 |
+
break;
|
188 |
+
case self::UNIT_DIMENSION_METRES:
|
189 |
+
$dimension = $dimension;
|
190 |
+
break;
|
191 |
+
}
|
192 |
+
|
193 |
+
return (float) $dimension;
|
194 |
+
}
|
195 |
+
|
196 |
+
public function getWidth($item)
|
197 |
+
{
|
198 |
+
$attributeCode = $this->getProductDimensionWidthAttributeCode();
|
199 |
+
|
200 |
+
if ($attributeCode) {
|
201 |
+
$attributeValue = $this->getAttributeValue($item->getProduct(), $attributeCode);
|
202 |
+
}
|
203 |
+
else {
|
204 |
+
$attributeValue = null;
|
205 |
+
}
|
206 |
+
|
207 |
+
return $this->getDimension($attributeValue);
|
208 |
+
}
|
209 |
+
|
210 |
+
public function getLength($item)
|
211 |
+
{
|
212 |
+
$attributeCode = $this->getProductDimensionLengthAttributeCode();
|
213 |
+
|
214 |
+
if ($attributeCode) {
|
215 |
+
$attributeValue = $this->getAttributeValue($item->getProduct(), $attributeCode);
|
216 |
+
}
|
217 |
+
else {
|
218 |
+
$attributeValue = null;
|
219 |
+
}
|
220 |
+
|
221 |
+
return $this->getDimension($attributeValue);
|
222 |
+
}
|
223 |
+
|
224 |
+
public function getDepth($item)
|
225 |
+
{
|
226 |
+
$attributeCode = $this->getProductDimensionDepthAttributeCode();
|
227 |
+
|
228 |
+
if ($attributeCode) {
|
229 |
+
$attributeValue = $this->getAttributeValue($item->getProduct(), $attributeCode);
|
230 |
+
}
|
231 |
+
else {
|
232 |
+
$attributeValue = null;
|
233 |
+
}
|
234 |
+
|
235 |
+
return $this->getDimension($attributeValue);
|
236 |
+
}
|
237 |
+
|
238 |
public function getLocation($item)
|
239 |
{
|
240 |
$attributeCode = $this->getLocationAttributeCode();
|
250 |
public function getLocationAttributeCode()
|
251 |
{
|
252 |
if (is_null($this->locationAttributeCode)) {
|
253 |
+
$helper = Mage::helper('shippit/sync_item');
|
254 |
+
|
255 |
if (!$helper->isProductLocationActive()) {
|
256 |
$this->locationAttributeCode = false;
|
257 |
}
|
266 |
/**
|
267 |
* Get the product attribute value, ensuring we get
|
268 |
* the full text value if it's a select or multiselect attribute
|
269 |
+
*
|
270 |
* @param object $product The Product Object
|
271 |
* @param string $attributeCode The Attribute Code
|
272 |
* @return string The Product Attribute Value (full text)
|
297 |
|
298 |
return $prefix . $functionName;
|
299 |
}
|
300 |
+
|
301 |
+
// END: Logic Helpers
|
302 |
+
}
|
app/code/community/Shippit/Shippit/Helper/Sync/Order.php
CHANGED
@@ -52,29 +52,24 @@ class Shippit_Shippit_Helper_Sync_Order extends Shippit_Shippit_Helper_Data
|
|
52 |
return parent::isActive() && self::getStoreConfig('manual_sync_active', true);
|
53 |
}
|
54 |
|
55 |
-
public function
|
56 |
-
{
|
57 |
-
return self::getStoreConfig('mode');
|
58 |
-
}
|
59 |
-
|
60 |
-
public function getSendAllOrders()
|
61 |
{
|
62 |
-
return self::getStoreConfig('
|
63 |
}
|
64 |
|
65 |
-
public function
|
66 |
{
|
67 |
-
return self::getStoreConfig('
|
68 |
}
|
69 |
|
70 |
-
public function
|
71 |
{
|
72 |
-
return self::getStoreConfig('
|
73 |
}
|
74 |
|
75 |
-
public function
|
76 |
{
|
77 |
-
return self::getStoreConfig('
|
78 |
}
|
79 |
|
80 |
public function getShippingMethodMapping()
|
@@ -91,7 +86,8 @@ class Shippit_Shippit_Helper_Sync_Order extends Shippit_Shippit_Helper_Data
|
|
91 |
return $mappings;
|
92 |
}
|
93 |
|
94 |
-
// Helper Methods
|
|
|
95 |
public function getShippitShippingMethod($shippingMethod)
|
96 |
{
|
97 |
// If the shipping method is a shippit method,
|
@@ -100,7 +96,7 @@ class Shippit_Shippit_Helper_Sync_Order extends Shippit_Shippit_Helper_Data
|
|
100 |
$shippingOptions = str_replace(self::CARRIER_CODE . '_', '', $shippingMethod);
|
101 |
$shippingOptions = explode('_', $shippingOptions);
|
102 |
$courierData = array();
|
103 |
-
|
104 |
if (isset($shippingOptions[0])) {
|
105 |
$method = strtolower($shippingOptions[0]);
|
106 |
|
@@ -117,7 +113,7 @@ class Shippit_Shippit_Helper_Sync_Order extends Shippit_Shippit_Helper_Data
|
|
117 |
}
|
118 |
}
|
119 |
}
|
120 |
-
|
121 |
// Use the mapping values and attempt to get a value
|
122 |
$shippingMethodMapping = $this->getShippingMethodMapping();
|
123 |
|
@@ -130,13 +126,5 @@ class Shippit_Shippit_Helper_Sync_Order extends Shippit_Shippit_Helper_Data
|
|
130 |
return false;
|
131 |
}
|
132 |
|
133 |
-
|
134 |
-
|
135 |
-
return self::getStoreConfig('filter_order_status_active');
|
136 |
-
}
|
137 |
-
|
138 |
-
public function getFilterOrderStatus()
|
139 |
-
{
|
140 |
-
return explode(',', self::getStoreConfig('filter_order_status'));
|
141 |
-
}
|
142 |
-
}
|
52 |
return parent::isActive() && self::getStoreConfig('manual_sync_active', true);
|
53 |
}
|
54 |
|
55 |
+
public function isFilterOrderStatusActive()
|
|
|
|
|
|
|
|
|
|
|
56 |
{
|
57 |
+
return self::getStoreConfig('filter_order_status_active');
|
58 |
}
|
59 |
|
60 |
+
public function getFilterOrderStatus()
|
61 |
{
|
62 |
+
return explode(',', self::getStoreConfig('filter_order_status'));
|
63 |
}
|
64 |
|
65 |
+
public function getMode()
|
66 |
{
|
67 |
+
return self::getStoreConfig('mode');
|
68 |
}
|
69 |
|
70 |
+
public function getSendAllOrders()
|
71 |
{
|
72 |
+
return self::getStoreConfig('send_all_orders');
|
73 |
}
|
74 |
|
75 |
public function getShippingMethodMapping()
|
86 |
return $mappings;
|
87 |
}
|
88 |
|
89 |
+
// BEGIN: Logic Helper Methods
|
90 |
+
|
91 |
public function getShippitShippingMethod($shippingMethod)
|
92 |
{
|
93 |
// If the shipping method is a shippit method,
|
96 |
$shippingOptions = str_replace(self::CARRIER_CODE . '_', '', $shippingMethod);
|
97 |
$shippingOptions = explode('_', $shippingOptions);
|
98 |
$courierData = array();
|
99 |
+
|
100 |
if (isset($shippingOptions[0])) {
|
101 |
$method = strtolower($shippingOptions[0]);
|
102 |
|
113 |
}
|
114 |
}
|
115 |
}
|
116 |
+
|
117 |
// Use the mapping values and attempt to get a value
|
118 |
$shippingMethodMapping = $this->getShippingMethodMapping();
|
119 |
|
126 |
return false;
|
127 |
}
|
128 |
|
129 |
+
// END: Login Helper Methods
|
130 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/community/Shippit/Shippit/Helper/Sync/Shipping.php
CHANGED
@@ -54,4 +54,4 @@ class Shippit_Shippit_Helper_Sync_Shipping extends Shippit_Shippit_Helper_Data
|
|
54 |
{
|
55 |
return self::getStoreConfig('update_template_active', true);
|
56 |
}
|
57 |
-
}
|
54 |
{
|
55 |
return self::getStoreConfig('update_template_active', true);
|
56 |
}
|
57 |
+
}
|
app/code/community/Shippit/Shippit/Model/Api/Order.php
CHANGED
@@ -23,12 +23,12 @@ class Shippit_Shippit_Model_Api_Order extends Mage_Core_Model_Abstract
|
|
23 |
{
|
24 |
protected $api;
|
25 |
protected $helper;
|
26 |
-
protected $
|
27 |
|
28 |
public function __construct()
|
29 |
{
|
30 |
$this->helper = Mage::helper('shippit/sync_order');
|
31 |
-
$this->
|
32 |
$this->api = Mage::helper('shippit/api');
|
33 |
$this->logger = Mage::getModel('shippit/logger');
|
34 |
}
|
@@ -105,25 +105,19 @@ class Shippit_Shippit_Model_Api_Order extends Mage_Core_Model_Abstract
|
|
105 |
return $store;
|
106 |
}
|
107 |
}
|
108 |
-
|
109 |
public function sync($syncOrder, $displayNotifications = false)
|
110 |
{
|
111 |
try {
|
112 |
$order = $syncOrder->getOrder();
|
113 |
|
114 |
-
// If the order is destined for international, override the shipping method as international
|
115 |
-
if ($order->getShippingAddress()->getCountry() != 'AU'
|
116 |
-
&& $syncOrder->getShippingMethod() != 'international') {
|
117 |
-
$syncOrder->setShippingMethod('international');
|
118 |
-
}
|
119 |
-
|
120 |
// Add attempt
|
121 |
$syncOrder->setAttemptCount($syncOrder->getAttemptCount() + 1);
|
122 |
|
123 |
// Build the order request
|
124 |
$orderRequest = Mage::getModel('shippit/request_api_order')
|
125 |
->processSyncOrder($syncOrder);
|
126 |
-
|
127 |
$apiResponse = $this->api->sendOrder($orderRequest, $syncOrder->getApiKey());
|
128 |
|
129 |
// Add the order tracking details to
|
@@ -170,4 +164,4 @@ class Shippit_Shippit_Model_Api_Order extends Mage_Core_Model_Abstract
|
|
170 |
|
171 |
return true;
|
172 |
}
|
173 |
-
}
|
23 |
{
|
24 |
protected $api;
|
25 |
protected $helper;
|
26 |
+
protected $itemHelper;
|
27 |
|
28 |
public function __construct()
|
29 |
{
|
30 |
$this->helper = Mage::helper('shippit/sync_order');
|
31 |
+
$this->itemHelper = Mage::helper('shippit/sync_item');
|
32 |
$this->api = Mage::helper('shippit/api');
|
33 |
$this->logger = Mage::getModel('shippit/logger');
|
34 |
}
|
105 |
return $store;
|
106 |
}
|
107 |
}
|
108 |
+
|
109 |
public function sync($syncOrder, $displayNotifications = false)
|
110 |
{
|
111 |
try {
|
112 |
$order = $syncOrder->getOrder();
|
113 |
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
// Add attempt
|
115 |
$syncOrder->setAttemptCount($syncOrder->getAttemptCount() + 1);
|
116 |
|
117 |
// Build the order request
|
118 |
$orderRequest = Mage::getModel('shippit/request_api_order')
|
119 |
->processSyncOrder($syncOrder);
|
120 |
+
|
121 |
$apiResponse = $this->api->sendOrder($orderRequest, $syncOrder->getApiKey());
|
122 |
|
123 |
// Add the order tracking details to
|
164 |
|
165 |
return true;
|
166 |
}
|
167 |
+
}
|
app/code/community/Shippit/Shippit/Model/Logger.php
CHANGED
@@ -18,7 +18,7 @@ class Shippit_Shippit_Model_Logger
|
|
18 |
{
|
19 |
protected $helper;
|
20 |
protected $debugMode;
|
21 |
-
|
22 |
public $bugsnag = false;
|
23 |
protected $metaData = array();
|
24 |
|
@@ -37,7 +37,7 @@ class Shippit_Shippit_Model_Logger
|
|
37 |
$this->bugsnagLog($errorType, $message, $level);
|
38 |
|
39 |
Mage::log($errorType . "\n" . $message, $level, 'shippit.log');
|
40 |
-
|
41 |
if (!empty($this->metaData)) {
|
42 |
Mage::log($this->metaData, $level, 'shippit.log');
|
43 |
}
|
@@ -84,7 +84,7 @@ class Shippit_Shippit_Model_Logger
|
|
84 |
$this->bugsnagException($e);
|
85 |
|
86 |
Mage::log($e->getMessage(), $level, 'shippit.log');
|
87 |
-
|
88 |
if (!empty($this->metaData)) {
|
89 |
Mage::log($this->metaData, $level, 'shippit.log');
|
90 |
}
|
@@ -98,4 +98,4 @@ class Shippit_Shippit_Model_Logger
|
|
98 |
|
99 |
return $this;
|
100 |
}
|
101 |
-
}
|
18 |
{
|
19 |
protected $helper;
|
20 |
protected $debugMode;
|
21 |
+
|
22 |
public $bugsnag = false;
|
23 |
protected $metaData = array();
|
24 |
|
37 |
$this->bugsnagLog($errorType, $message, $level);
|
38 |
|
39 |
Mage::log($errorType . "\n" . $message, $level, 'shippit.log');
|
40 |
+
|
41 |
if (!empty($this->metaData)) {
|
42 |
Mage::log($this->metaData, $level, 'shippit.log');
|
43 |
}
|
84 |
$this->bugsnagException($e);
|
85 |
|
86 |
Mage::log($e->getMessage(), $level, 'shippit.log');
|
87 |
+
|
88 |
if (!empty($this->metaData)) {
|
89 |
Mage::log($this->metaData, $level, 'shippit.log');
|
90 |
}
|
98 |
|
99 |
return $this;
|
100 |
}
|
101 |
+
}
|
app/code/community/Shippit/Shippit/Model/Observer/Adminhtml/Sales/Order.php
CHANGED
@@ -56,4 +56,4 @@ class Shippit_Shippit_Model_Observer_Adminhtml_Sales_Order
|
|
56 |
{
|
57 |
return Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/shippit_order_send');
|
58 |
}
|
59 |
-
}
|
56 |
{
|
57 |
return Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/shippit_order_send');
|
58 |
}
|
59 |
+
}
|
app/code/community/Shippit/Shippit/Model/Observer/Order/Sync.php
CHANGED
@@ -26,7 +26,7 @@ class Shippit_Shippit_Model_Observer_Order_Sync
|
|
26 |
$this->helper = Mage::helper('shippit/sync_order');
|
27 |
$this->logger = Mage::getModel('shippit/logger');
|
28 |
}
|
29 |
-
|
30 |
/**
|
31 |
* Set the order to be synced with shippit
|
32 |
* @param Varien_Event_Observer $observer [description]
|
@@ -100,7 +100,7 @@ class Shippit_Shippit_Model_Observer_Order_Sync
|
|
100 |
private function _syncOrder($syncOrder)
|
101 |
{
|
102 |
$this->_hasAttemptedSync = true;
|
103 |
-
|
104 |
// attempt the sync
|
105 |
$syncOrderResult = Mage::getModel('shippit/api_order')->sync($syncOrder);
|
106 |
|
@@ -139,4 +139,4 @@ class Shippit_Shippit_Model_Observer_Order_Sync
|
|
139 |
|
140 |
return true;
|
141 |
}
|
142 |
-
}
|
26 |
$this->helper = Mage::helper('shippit/sync_order');
|
27 |
$this->logger = Mage::getModel('shippit/logger');
|
28 |
}
|
29 |
+
|
30 |
/**
|
31 |
* Set the order to be synced with shippit
|
32 |
* @param Varien_Event_Observer $observer [description]
|
100 |
private function _syncOrder($syncOrder)
|
101 |
{
|
102 |
$this->_hasAttemptedSync = true;
|
103 |
+
|
104 |
// attempt the sync
|
105 |
$syncOrderResult = Mage::getModel('shippit/api_order')->sync($syncOrder);
|
106 |
|
139 |
|
140 |
return true;
|
141 |
}
|
142 |
+
}
|
app/code/community/Shippit/Shippit/Model/Observer/Quote/AuthorityToLeave.php
CHANGED
@@ -55,4 +55,4 @@ class Shippit_Shippit_Model_Observer_Quote_AuthorityToLeave
|
|
55 |
{
|
56 |
$quote->setShippitAuthorityToLeave($authorityToLeave);
|
57 |
}
|
58 |
-
}
|
55 |
{
|
56 |
$quote->setShippitAuthorityToLeave($authorityToLeave);
|
57 |
}
|
58 |
+
}
|
app/code/community/Shippit/Shippit/Model/Observer/Quote/DeliveryInstructions.php
CHANGED
@@ -51,4 +51,4 @@ class Shippit_Shippit_Model_Observer_Quote_DeliveryInstructions
|
|
51 |
$deliveryInstructions = strip_tags($deliveryInstructions);
|
52 |
$quote->setShippitDeliveryInstructions($deliveryInstructions);
|
53 |
}
|
54 |
-
}
|
51 |
$deliveryInstructions = strip_tags($deliveryInstructions);
|
52 |
$quote->setShippitDeliveryInstructions($deliveryInstructions);
|
53 |
}
|
54 |
+
}
|
app/code/community/Shippit/Shippit/Model/Observer/Shipping/Tracking.php
CHANGED
@@ -31,4 +31,4 @@ class Shippit_Shippit_Model_Observer_Shipping_Tracking
|
|
31 |
$block->setTemplate('shippit/email/order/shipment/track.phtml');
|
32 |
}
|
33 |
}
|
34 |
-
}
|
31 |
$block->setTemplate('shippit/email/order/shipment/track.phtml');
|
32 |
}
|
33 |
}
|
34 |
+
}
|
app/code/community/Shippit/Shippit/Model/Observer/Shippit.php
CHANGED
@@ -54,4 +54,4 @@ class Shippit_Shippit_Model_Observer_Shippit extends Mage_Core_Model_Abstract
|
|
54 |
|
55 |
return $this;
|
56 |
}
|
57 |
-
}
|
54 |
|
55 |
return $this;
|
56 |
}
|
57 |
+
}
|
app/code/community/Shippit/Shippit/Model/Observer/System/Config.php
CHANGED
@@ -56,7 +56,7 @@ class Shippit_Shippit_Model_Observer_System_Config
|
|
56 |
Mage::getSingleton('adminhtml/session')->addSuccess(
|
57 |
$this->helper->__('Shippit API Key Validated')
|
58 |
);
|
59 |
-
|
60 |
$apiKeyValid = true;
|
61 |
}
|
62 |
}
|
@@ -78,7 +78,7 @@ class Shippit_Shippit_Model_Observer_System_Config
|
|
78 |
'api_key' => $apiKey,
|
79 |
'_secure' => true,
|
80 |
));
|
81 |
-
|
82 |
$requestData = new Varien_Object;
|
83 |
$requestData->setWebhookUrl($webhookUrl);
|
84 |
$merchant = $this->api->putMerchant($requestData, true);
|
@@ -102,4 +102,4 @@ class Shippit_Shippit_Model_Observer_System_Config
|
|
102 |
|
103 |
return;
|
104 |
}
|
105 |
-
}
|
56 |
Mage::getSingleton('adminhtml/session')->addSuccess(
|
57 |
$this->helper->__('Shippit API Key Validated')
|
58 |
);
|
59 |
+
|
60 |
$apiKeyValid = true;
|
61 |
}
|
62 |
}
|
78 |
'api_key' => $apiKey,
|
79 |
'_secure' => true,
|
80 |
));
|
81 |
+
|
82 |
$requestData = new Varien_Object;
|
83 |
$requestData->setWebhookUrl($webhookUrl);
|
84 |
$merchant = $this->api->putMerchant($requestData, true);
|
102 |
|
103 |
return;
|
104 |
}
|
105 |
+
}
|
app/code/community/Shippit/Shippit/Model/Request/Api/Order.php
CHANGED
@@ -22,7 +22,7 @@ class Shippit_Shippit_Model_Request_Api_Order extends Varien_Object
|
|
22 |
protected $helper;
|
23 |
protected $api;
|
24 |
protected $carrierCode;
|
25 |
-
protected $
|
26 |
protected $order;
|
27 |
|
28 |
/**
|
@@ -49,13 +49,13 @@ class Shippit_Shippit_Model_Request_Api_Order extends Varien_Object
|
|
49 |
const SHIPPING_SERVICE_STANDARD = 'standard';
|
50 |
const SHIPPING_SERVICE_EXPRESS = 'express';
|
51 |
const SHIPPING_SERVICE_PRIORITY = 'priority';
|
52 |
-
const SHIPPING_SERVICE_INTERNATIONAL = 'international';
|
53 |
|
54 |
-
public function __construct()
|
|
|
55 |
$this->helper = Mage::helper('shippit/sync_order');
|
56 |
$this->api = Mage::helper('shippit/api');
|
57 |
$this->carrierCode = $this->helper->getCarrierCode();
|
58 |
-
$this->
|
59 |
}
|
60 |
|
61 |
public function processSyncOrder(Shippit_Shippit_Model_Sync_Order $syncOrder)
|
@@ -119,7 +119,7 @@ class Shippit_Shippit_Model_Request_Api_Order extends Varien_Object
|
|
119 |
// Attempt to retrieve from the postcode lookup for AU Addresses
|
120 |
if (empty($deliveryState) && $this->getDeliveryCountry() == 'AU') {
|
121 |
$postcodeState = $this->helper->getStateFromPostcode($this->getDeliveryPostcode());
|
122 |
-
|
123 |
if ($postcodeState) {
|
124 |
$this->setData(self::DELIVERY_STATE, $postcodeState);
|
125 |
}
|
@@ -127,7 +127,7 @@ class Shippit_Shippit_Model_Request_Api_Order extends Varien_Object
|
|
127 |
|
128 |
$deliveryState = $this->getDeliveryState();
|
129 |
$deliverySuburb = $this->getDeliverySuburb();
|
130 |
-
|
131 |
// If the delivery state is empty
|
132 |
// Copy the suburb field to the state field
|
133 |
if (empty($deliveryState) && !empty($deliverySuburb)) {
|
@@ -158,6 +158,9 @@ class Shippit_Shippit_Model_Request_Api_Order extends Varien_Object
|
|
158 |
$item->getQty(),
|
159 |
$item->getPrice(),
|
160 |
$item->getWeight(),
|
|
|
|
|
|
|
161 |
$item->getLocation()
|
162 |
);
|
163 |
}
|
@@ -369,7 +372,7 @@ class Shippit_Shippit_Model_Request_Api_Order extends Varien_Object
|
|
369 |
// get the special delivery attributes
|
370 |
$deliveryDate = $this->_getOrderDeliveryDate($this->order);
|
371 |
$deliveryWindow = $this->_getOrderDeliveryWindow($this->order);
|
372 |
-
|
373 |
if (!empty($deliveryDate) && !empty($deliveryWindow)) {
|
374 |
$this->setDeliveryDate($deliveryDate);
|
375 |
$this->setDeliveryWindow($deliveryWindow);
|
@@ -377,9 +380,6 @@ class Shippit_Shippit_Model_Request_Api_Order extends Varien_Object
|
|
377 |
|
378 |
return $this->setCourierType(self::SHIPPING_SERVICE_PRIORITY);
|
379 |
}
|
380 |
-
elseif ($shippingMethod == 'international') {
|
381 |
-
return $this->setCourierType(self::SHIPPING_SERVICE_INTERNATIONAL);
|
382 |
-
}
|
383 |
else {
|
384 |
return $this->setData(self::COURIER_TYPE, self::SHIPPING_SERVICE_STANDARD);
|
385 |
}
|
@@ -395,7 +395,7 @@ class Shippit_Shippit_Model_Request_Api_Order extends Varien_Object
|
|
395 |
$shippingOptions = str_replace($this->carrierCode . '_', '', $shippingMethod);
|
396 |
$shippingOptions = explode('_', $shippingOptions);
|
397 |
$courierData = array();
|
398 |
-
|
399 |
if (isset($shippingOptions[0])) {
|
400 |
if ($shippingOptions[0] == 'priority') {
|
401 |
return $shippingOptions[1];
|
@@ -423,7 +423,7 @@ class Shippit_Shippit_Model_Request_Api_Order extends Varien_Object
|
|
423 |
$shippingOptions = str_replace($this->carrierCode . '_', '', $shippingMethod);
|
424 |
$shippingOptions = explode('_', $shippingOptions);
|
425 |
$courierData = array();
|
426 |
-
|
427 |
if (isset($shippingOptions[0])) {
|
428 |
if ($shippingOptions[0] == 'priority') {
|
429 |
return $shippingOptions[2];
|
@@ -634,7 +634,7 @@ class Shippit_Shippit_Model_Request_Api_Order extends Varien_Object
|
|
634 |
* Add a parcel with attributes
|
635 |
*
|
636 |
*/
|
637 |
-
public function addItem($sku, $title, $qty, $price, $weight = 0, $location = null)
|
638 |
{
|
639 |
$parcelAttributes = $this->getParcelAttributes();
|
640 |
|
@@ -652,8 +652,20 @@ class Shippit_Shippit_Model_Request_Api_Order extends Varien_Object
|
|
652 |
'location' => $location
|
653 |
);
|
654 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
655 |
$parcelAttributes[] = $newParcel;
|
656 |
|
657 |
return $this->setParcelAttributes($parcelAttributes);
|
658 |
}
|
659 |
-
}
|
22 |
protected $helper;
|
23 |
protected $api;
|
24 |
protected $carrierCode;
|
25 |
+
protected $itemHelper;
|
26 |
protected $order;
|
27 |
|
28 |
/**
|
49 |
const SHIPPING_SERVICE_STANDARD = 'standard';
|
50 |
const SHIPPING_SERVICE_EXPRESS = 'express';
|
51 |
const SHIPPING_SERVICE_PRIORITY = 'priority';
|
|
|
52 |
|
53 |
+
public function __construct()
|
54 |
+
{
|
55 |
$this->helper = Mage::helper('shippit/sync_order');
|
56 |
$this->api = Mage::helper('shippit/api');
|
57 |
$this->carrierCode = $this->helper->getCarrierCode();
|
58 |
+
$this->itemHelper = Mage::helper('shippit/sync_item');
|
59 |
}
|
60 |
|
61 |
public function processSyncOrder(Shippit_Shippit_Model_Sync_Order $syncOrder)
|
119 |
// Attempt to retrieve from the postcode lookup for AU Addresses
|
120 |
if (empty($deliveryState) && $this->getDeliveryCountry() == 'AU') {
|
121 |
$postcodeState = $this->helper->getStateFromPostcode($this->getDeliveryPostcode());
|
122 |
+
|
123 |
if ($postcodeState) {
|
124 |
$this->setData(self::DELIVERY_STATE, $postcodeState);
|
125 |
}
|
127 |
|
128 |
$deliveryState = $this->getDeliveryState();
|
129 |
$deliverySuburb = $this->getDeliverySuburb();
|
130 |
+
|
131 |
// If the delivery state is empty
|
132 |
// Copy the suburb field to the state field
|
133 |
if (empty($deliveryState) && !empty($deliverySuburb)) {
|
158 |
$item->getQty(),
|
159 |
$item->getPrice(),
|
160 |
$item->getWeight(),
|
161 |
+
$item->getLength(),
|
162 |
+
$item->getWidth(),
|
163 |
+
$item->getDepth(),
|
164 |
$item->getLocation()
|
165 |
);
|
166 |
}
|
372 |
// get the special delivery attributes
|
373 |
$deliveryDate = $this->_getOrderDeliveryDate($this->order);
|
374 |
$deliveryWindow = $this->_getOrderDeliveryWindow($this->order);
|
375 |
+
|
376 |
if (!empty($deliveryDate) && !empty($deliveryWindow)) {
|
377 |
$this->setDeliveryDate($deliveryDate);
|
378 |
$this->setDeliveryWindow($deliveryWindow);
|
380 |
|
381 |
return $this->setCourierType(self::SHIPPING_SERVICE_PRIORITY);
|
382 |
}
|
|
|
|
|
|
|
383 |
else {
|
384 |
return $this->setData(self::COURIER_TYPE, self::SHIPPING_SERVICE_STANDARD);
|
385 |
}
|
395 |
$shippingOptions = str_replace($this->carrierCode . '_', '', $shippingMethod);
|
396 |
$shippingOptions = explode('_', $shippingOptions);
|
397 |
$courierData = array();
|
398 |
+
|
399 |
if (isset($shippingOptions[0])) {
|
400 |
if ($shippingOptions[0] == 'priority') {
|
401 |
return $shippingOptions[1];
|
423 |
$shippingOptions = str_replace($this->carrierCode . '_', '', $shippingMethod);
|
424 |
$shippingOptions = explode('_', $shippingOptions);
|
425 |
$courierData = array();
|
426 |
+
|
427 |
if (isset($shippingOptions[0])) {
|
428 |
if ($shippingOptions[0] == 'priority') {
|
429 |
return $shippingOptions[2];
|
634 |
* Add a parcel with attributes
|
635 |
*
|
636 |
*/
|
637 |
+
public function addItem($sku, $title, $qty, $price, $weight = 0, $length = null, $width = null, $depth = null, $location = null)
|
638 |
{
|
639 |
$parcelAttributes = $this->getParcelAttributes();
|
640 |
|
652 |
'location' => $location
|
653 |
);
|
654 |
|
655 |
+
// for dimensions, ensure the item has values for all dimensions
|
656 |
+
if (!empty((float) $length) && !empty((float) $width) && !empty((float) $depth)) {
|
657 |
+
$newParcel = array_merge(
|
658 |
+
$newParcel,
|
659 |
+
array(
|
660 |
+
'length' => (float) $length,
|
661 |
+
'width' => (float) $width,
|
662 |
+
'depth' => (float) $depth
|
663 |
+
)
|
664 |
+
);
|
665 |
+
}
|
666 |
+
|
667 |
$parcelAttributes[] = $newParcel;
|
668 |
|
669 |
return $this->setParcelAttributes($parcelAttributes);
|
670 |
}
|
671 |
+
}
|
app/code/community/Shippit/Shippit/Model/Request/Api/Shipment.php
CHANGED
@@ -19,7 +19,7 @@
|
|
19 |
|
20 |
class Shippit_Shippit_Model_Request_Api_Shipment extends Varien_Object
|
21 |
{
|
22 |
-
protected $
|
23 |
protected $items = null;
|
24 |
|
25 |
const ORDER = 'order';
|
@@ -29,7 +29,7 @@ class Shippit_Shippit_Model_Request_Api_Shipment extends Varien_Object
|
|
29 |
const ERROR_ORDER_STATUS = 'The order id requested has an status that is not available for shipping';
|
30 |
|
31 |
public function __construct() {
|
32 |
-
$this->
|
33 |
|
34 |
return $this;
|
35 |
}
|
@@ -42,7 +42,7 @@ class Shippit_Shippit_Model_Request_Api_Shipment extends Varien_Object
|
|
42 |
public function setOrderByIncrementId($orderIncrementId)
|
43 |
{
|
44 |
$order = Mage::getModel('sales/order')->load($orderIncrementId, 'increment_id');
|
45 |
-
|
46 |
return $this->setOrder($order);
|
47 |
}
|
48 |
|
@@ -77,7 +77,7 @@ class Shippit_Shippit_Model_Request_Api_Shipment extends Varien_Object
|
|
77 |
// for the specific items that have been passed, ensure they are valid
|
78 |
// items for the item
|
79 |
if (!empty($items)) {
|
80 |
-
$itemsSkus = $this->
|
81 |
|
82 |
if (!empty($itemsSkus)) {
|
83 |
$itemsCollection->addFieldToFilter('sku', array('in' => $itemsSkus));
|
@@ -86,16 +86,16 @@ class Shippit_Shippit_Model_Request_Api_Shipment extends Varien_Object
|
|
86 |
|
87 |
// For all valid items, process the quantity to be marked as shipped
|
88 |
foreach ($itemsCollection as $item) {
|
89 |
-
$requestedQty = $this->
|
90 |
|
91 |
/**
|
92 |
* Magento marks a shipment only for the parent item in the order
|
93 |
* get the parent item to determine the correct qty to ship
|
94 |
*/
|
95 |
$rootItem = $this->_getRootItem($item);
|
96 |
-
|
97 |
-
$itemQty = $this->
|
98 |
-
|
99 |
if ($itemQty > 0) {
|
100 |
$this->addItem($item->getId(), $itemQty);
|
101 |
}
|
@@ -117,7 +117,7 @@ class Shippit_Shippit_Model_Request_Api_Shipment extends Varien_Object
|
|
117 |
public function getItems()
|
118 |
{
|
119 |
$items = $this->getData(self::ITEMS);
|
120 |
-
|
121 |
// if no items have been added, assume all items are to be marked as shipped
|
122 |
if (empty($items)) {
|
123 |
return array();
|
@@ -140,4 +140,4 @@ class Shippit_Shippit_Model_Request_Api_Shipment extends Varien_Object
|
|
140 |
|
141 |
return $this->setItems($items);
|
142 |
}
|
143 |
-
}
|
19 |
|
20 |
class Shippit_Shippit_Model_Request_Api_Shipment extends Varien_Object
|
21 |
{
|
22 |
+
protected $itemHelper;
|
23 |
protected $items = null;
|
24 |
|
25 |
const ORDER = 'order';
|
29 |
const ERROR_ORDER_STATUS = 'The order id requested has an status that is not available for shipping';
|
30 |
|
31 |
public function __construct() {
|
32 |
+
$this->itemHelper = Mage::helper('shippit/sync_item');
|
33 |
|
34 |
return $this;
|
35 |
}
|
42 |
public function setOrderByIncrementId($orderIncrementId)
|
43 |
{
|
44 |
$order = Mage::getModel('sales/order')->load($orderIncrementId, 'increment_id');
|
45 |
+
|
46 |
return $this->setOrder($order);
|
47 |
}
|
48 |
|
77 |
// for the specific items that have been passed, ensure they are valid
|
78 |
// items for the item
|
79 |
if (!empty($items)) {
|
80 |
+
$itemsSkus = $this->itemHelper->getSkus($items);
|
81 |
|
82 |
if (!empty($itemsSkus)) {
|
83 |
$itemsCollection->addFieldToFilter('sku', array('in' => $itemsSkus));
|
86 |
|
87 |
// For all valid items, process the quantity to be marked as shipped
|
88 |
foreach ($itemsCollection as $item) {
|
89 |
+
$requestedQty = $this->itemHelper->getItemData($items, 'sku', $item->getSku(), 'quantity');
|
90 |
|
91 |
/**
|
92 |
* Magento marks a shipment only for the parent item in the order
|
93 |
* get the parent item to determine the correct qty to ship
|
94 |
*/
|
95 |
$rootItem = $this->_getRootItem($item);
|
96 |
+
|
97 |
+
$itemQty = $this->itemHelper->getQtyToShip($rootItem, $requestedQty);
|
98 |
+
|
99 |
if ($itemQty > 0) {
|
100 |
$this->addItem($item->getId(), $itemQty);
|
101 |
}
|
117 |
public function getItems()
|
118 |
{
|
119 |
$items = $this->getData(self::ITEMS);
|
120 |
+
|
121 |
// if no items have been added, assume all items are to be marked as shipped
|
122 |
if (empty($items)) {
|
123 |
return array();
|
140 |
|
141 |
return $this->setItems($items);
|
142 |
}
|
143 |
+
}
|
app/code/community/Shippit/Shippit/Model/Request/Sync/Order.php
CHANGED
@@ -21,7 +21,7 @@
|
|
21 |
class Shippit_Shippit_Model_Request_Sync_Order extends Varien_Object
|
22 |
{
|
23 |
protected $helper;
|
24 |
-
protected $
|
25 |
protected $items;
|
26 |
|
27 |
/**
|
@@ -36,7 +36,7 @@ class Shippit_Shippit_Model_Request_Sync_Order extends Varien_Object
|
|
36 |
|
37 |
public function __construct() {
|
38 |
$this->helper = Mage::helper('shippit/sync_order');
|
39 |
-
$this->
|
40 |
}
|
41 |
|
42 |
/**
|
@@ -67,7 +67,7 @@ class Shippit_Shippit_Model_Request_Sync_Order extends Varien_Object
|
|
67 |
// if specific items have been passed,
|
68 |
// ensure that these are the only items in the request
|
69 |
if (!empty($items)) {
|
70 |
-
$itemsSkus = $this->
|
71 |
|
72 |
if (!empty($itemsSkus)) {
|
73 |
$itemsCollection = $itemsCollection->addFieldToFilter('sku', array('in' => $itemsSkus));
|
@@ -84,14 +84,26 @@ class Shippit_Shippit_Model_Request_Sync_Order extends Varien_Object
|
|
84 |
continue;
|
85 |
}
|
86 |
|
87 |
-
$requestedQty = $this->
|
88 |
-
$itemQty = $this->
|
89 |
$itemPrice = $this->_getItemPrice($item);
|
90 |
$itemWeight = $item->getWeight();
|
91 |
|
92 |
$childItem = $this->_getChildItem($item);
|
93 |
$itemName = $childItem->getName();
|
94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
|
96 |
if ($itemQty > 0) {
|
97 |
$this->addItem(
|
@@ -100,6 +112,9 @@ class Shippit_Shippit_Model_Request_Sync_Order extends Varien_Object
|
|
100 |
$itemQty,
|
101 |
$itemPrice,
|
102 |
$itemWeight,
|
|
|
|
|
|
|
103 |
$itemLocation
|
104 |
);
|
105 |
|
@@ -181,7 +196,7 @@ class Shippit_Shippit_Model_Request_Sync_Order extends Varien_Object
|
|
181 |
}
|
182 |
else {
|
183 |
$items = $item->getChildrenItems();
|
184 |
-
|
185 |
return reset($items);
|
186 |
}
|
187 |
}
|
@@ -192,12 +207,11 @@ class Shippit_Shippit_Model_Request_Sync_Order extends Varien_Object
|
|
192 |
|
193 |
public function setShippingMethod($shippingMethod)
|
194 |
{
|
195 |
-
// Standard, express
|
196 |
$validShippingMethods = array(
|
197 |
'standard',
|
198 |
'express',
|
199 |
-
'priority'
|
200 |
-
'international'
|
201 |
);
|
202 |
|
203 |
// if the shipping method passed is not a standard shippit service class, attempt to get a service class based on the configured mapping
|
@@ -226,7 +240,7 @@ class Shippit_Shippit_Model_Request_Sync_Order extends Varien_Object
|
|
226 |
* Add a parcel with attributes
|
227 |
*
|
228 |
*/
|
229 |
-
public function addItem($sku, $title, $qty, $price, $weight = 0, $location = null)
|
230 |
{
|
231 |
$items = $this->getItems();
|
232 |
|
@@ -239,12 +253,24 @@ class Shippit_Shippit_Model_Request_Sync_Order extends Varien_Object
|
|
239 |
'title' => $title,
|
240 |
'qty' => (float) $qty,
|
241 |
'price' => (float) $price,
|
242 |
-
'weight' => (float) $this->
|
243 |
'location' => $location
|
244 |
);
|
245 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
$items[] = $newItem;
|
247 |
|
248 |
return $this->setData(self::ITEMS, $items);
|
249 |
}
|
250 |
-
}
|
21 |
class Shippit_Shippit_Model_Request_Sync_Order extends Varien_Object
|
22 |
{
|
23 |
protected $helper;
|
24 |
+
protected $itemHelper;
|
25 |
protected $items;
|
26 |
|
27 |
/**
|
36 |
|
37 |
public function __construct() {
|
38 |
$this->helper = Mage::helper('shippit/sync_order');
|
39 |
+
$this->itemHelper = Mage::helper('shippit/sync_item');
|
40 |
}
|
41 |
|
42 |
/**
|
67 |
// if specific items have been passed,
|
68 |
// ensure that these are the only items in the request
|
69 |
if (!empty($items)) {
|
70 |
+
$itemsSkus = $this->itemHelper->getSkus($items);
|
71 |
|
72 |
if (!empty($itemsSkus)) {
|
73 |
$itemsCollection = $itemsCollection->addFieldToFilter('sku', array('in' => $itemsSkus));
|
84 |
continue;
|
85 |
}
|
86 |
|
87 |
+
$requestedQty = $this->itemHelper->getItemData($items, 'sku', $item->getSku(), 'qty');
|
88 |
+
$itemQty = $this->itemHelper->getQtyToShip($item, $requestedQty);
|
89 |
$itemPrice = $this->_getItemPrice($item);
|
90 |
$itemWeight = $item->getWeight();
|
91 |
|
92 |
$childItem = $this->_getChildItem($item);
|
93 |
$itemName = $childItem->getName();
|
94 |
+
|
95 |
+
if ($this->itemHelper->isProductDimensionActive()) {
|
96 |
+
$itemLength = $this->itemHelper->getLength($childItem);
|
97 |
+
$itemWidth = $this->itemHelper->getWidth($childItem);
|
98 |
+
$itemDepth = $this->itemHelper->getDepth($childItem);
|
99 |
+
}
|
100 |
+
else {
|
101 |
+
$itemLength = null;
|
102 |
+
$itemWidth = null;
|
103 |
+
$itemDepth = null;
|
104 |
+
}
|
105 |
+
|
106 |
+
$itemLocation = $this->itemHelper->getLocation($childItem);
|
107 |
|
108 |
if ($itemQty > 0) {
|
109 |
$this->addItem(
|
112 |
$itemQty,
|
113 |
$itemPrice,
|
114 |
$itemWeight,
|
115 |
+
$itemLength,
|
116 |
+
$itemWidth,
|
117 |
+
$itemDepth,
|
118 |
$itemLocation
|
119 |
);
|
120 |
|
196 |
}
|
197 |
else {
|
198 |
$items = $item->getChildrenItems();
|
199 |
+
|
200 |
return reset($items);
|
201 |
}
|
202 |
}
|
207 |
|
208 |
public function setShippingMethod($shippingMethod)
|
209 |
{
|
210 |
+
// Standard, express and priority options are available
|
211 |
$validShippingMethods = array(
|
212 |
'standard',
|
213 |
'express',
|
214 |
+
'priority'
|
|
|
215 |
);
|
216 |
|
217 |
// if the shipping method passed is not a standard shippit service class, attempt to get a service class based on the configured mapping
|
240 |
* Add a parcel with attributes
|
241 |
*
|
242 |
*/
|
243 |
+
public function addItem($sku, $title, $qty, $price, $weight = 0, $length = null, $width = null, $depth = null, $location = null)
|
244 |
{
|
245 |
$items = $this->getItems();
|
246 |
|
253 |
'title' => $title,
|
254 |
'qty' => (float) $qty,
|
255 |
'price' => (float) $price,
|
256 |
+
'weight' => (float) $this->itemHelper->getWeight($weight),
|
257 |
'location' => $location
|
258 |
);
|
259 |
|
260 |
+
// for dimensions, ensure the item has values for all dimensions
|
261 |
+
if (!empty((float) $length) && !empty((float) $width) && !empty((float) $depth)) {
|
262 |
+
$newItem = array_merge(
|
263 |
+
$newItem,
|
264 |
+
array(
|
265 |
+
'length' => (float) $length,
|
266 |
+
'width' => (float) $width,
|
267 |
+
'depth' => (float) $depth
|
268 |
+
)
|
269 |
+
);
|
270 |
+
}
|
271 |
+
|
272 |
$items[] = $newItem;
|
273 |
|
274 |
return $this->setData(self::ITEMS, $items);
|
275 |
}
|
276 |
+
}
|
app/code/community/Shippit/Shippit/Model/Resource/Setup.php
CHANGED
@@ -17,4 +17,4 @@
|
|
17 |
class Shippit_Shippit_Model_Resource_Setup extends Mage_Eav_Model_Entity_Setup
|
18 |
{
|
19 |
// This resource model has been intentionally left blank
|
20 |
-
}
|
17 |
class Shippit_Shippit_Model_Resource_Setup extends Mage_Eav_Model_Entity_Setup
|
18 |
{
|
19 |
// This resource model has been intentionally left blank
|
20 |
+
}
|
app/code/community/Shippit/Shippit/Model/Resource/Sync/Order.php
CHANGED
@@ -32,7 +32,7 @@ class Shippit_Shippit_Model_Resource_Sync_Order extends Mage_Core_Model_Resource
|
|
32 |
if (!$object->getId()) {
|
33 |
$object->setCreatedAt(Mage::getSingleton('core/date')->gmtDate());
|
34 |
}
|
35 |
-
|
36 |
return $this;
|
37 |
}
|
38 |
|
@@ -64,4 +64,4 @@ class Shippit_Shippit_Model_Resource_Sync_Order extends Mage_Core_Model_Resource
|
|
64 |
|
65 |
return $this;
|
66 |
}
|
67 |
-
}
|
32 |
if (!$object->getId()) {
|
33 |
$object->setCreatedAt(Mage::getSingleton('core/date')->gmtDate());
|
34 |
}
|
35 |
+
|
36 |
return $this;
|
37 |
}
|
38 |
|
64 |
|
65 |
return $this;
|
66 |
}
|
67 |
+
}
|
app/code/community/Shippit/Shippit/Model/Resource/Sync/Order/Collection.php
CHANGED
@@ -20,4 +20,24 @@ class Shippit_Shippit_Model_Resource_Sync_Order_Collection extends Mage_Core_Mod
|
|
20 |
{
|
21 |
$this->_init('shippit/sync_order');
|
22 |
}
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
{
|
21 |
$this->_init('shippit/sync_order');
|
22 |
}
|
23 |
+
|
24 |
+
/**
|
25 |
+
* Mass update the current collection with data
|
26 |
+
*
|
27 |
+
* @param $data
|
28 |
+
* @return int
|
29 |
+
*/
|
30 |
+
public function massUpdate(array $data)
|
31 |
+
{
|
32 |
+
$this->getConnection()->update(
|
33 |
+
$this->getResource()->getMainTable(),
|
34 |
+
$data,
|
35 |
+
$this->getResource()->getIdFieldName()
|
36 |
+
. ' IN('
|
37 |
+
. implode(',', $this->getAllIds())
|
38 |
+
. ')'
|
39 |
+
);
|
40 |
+
|
41 |
+
return $this;
|
42 |
+
}
|
43 |
+
}
|
app/code/community/Shippit/Shippit/Model/Resource/Sync/Order/Item.php
CHANGED
@@ -20,4 +20,4 @@ class Shippit_Shippit_Model_Resource_Sync_Order_Item extends Mage_Core_Model_Res
|
|
20 |
{
|
21 |
$this->_init('shippit/sync_order_item', 'sync_item_id');
|
22 |
}
|
23 |
-
}
|
20 |
{
|
21 |
$this->_init('shippit/sync_order_item', 'sync_item_id');
|
22 |
}
|
23 |
+
}
|
app/code/community/Shippit/Shippit/Model/Resource/Sync/Order/Item/Collection.php
CHANGED
@@ -40,4 +40,4 @@ class Shippit_Shippit_Model_Resource_Sync_Order_Item_Collection extends Mage_Cor
|
|
40 |
|
41 |
return $this;
|
42 |
}
|
43 |
-
}
|
40 |
|
41 |
return $this;
|
42 |
}
|
43 |
+
}
|
app/code/community/Shippit/Shippit/Model/Shipping/Carrier/Shippit.php
CHANGED
@@ -120,13 +120,13 @@ class Shippit_Shippit_Model_Shipping_Carrier_Shippit extends Mage_Shipping_Model
|
|
120 |
if ($isPriorityAvailable) {
|
121 |
$this->_addPriorityQuote($rateResult, $shippingQuote);
|
122 |
}
|
123 |
-
|
124 |
break;
|
125 |
case 'express':
|
126 |
if ($isExpressAvailable) {
|
127 |
$this->_addExpressQuote($rateResult, $shippingQuote);
|
128 |
}
|
129 |
-
|
130 |
break;
|
131 |
case 'standard':
|
132 |
if ($isStandardAvailable) {
|
@@ -150,7 +150,7 @@ class Shippit_Shippit_Model_Shipping_Carrier_Shippit extends Mage_Shipping_Model
|
|
150 |
->setMethod('standard')
|
151 |
->setMethodTitle('Standard')
|
152 |
->setCost($shippingQuoteQuote->price)
|
153 |
-
->setPrice($shippingQuoteQuote->price);
|
154 |
|
155 |
$rateResult->append($rateResultMethod);
|
156 |
}
|
@@ -165,7 +165,7 @@ class Shippit_Shippit_Model_Shipping_Carrier_Shippit extends Mage_Shipping_Model
|
|
165 |
->setMethod('express')
|
166 |
->setMethodTitle('Express')
|
167 |
->setCost($shippingQuoteQuote->price)
|
168 |
-
->setPrice($shippingQuoteQuote->price);
|
169 |
|
170 |
$rateResult->append($rateResultMethod);
|
171 |
}
|
@@ -202,12 +202,34 @@ class Shippit_Shippit_Model_Shipping_Carrier_Shippit extends Mage_Shipping_Model
|
|
202 |
->setMethod($method)
|
203 |
->setMethodTitle($methodTitle)
|
204 |
->setCost($shippingQuoteQuote->price)
|
205 |
-
->setPrice($shippingQuoteQuote->price);
|
206 |
|
207 |
$rateResult->append($rateResultMethod);
|
208 |
}
|
209 |
}
|
210 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
public function isTrackingAvailable()
|
212 |
{
|
213 |
return true;
|
@@ -261,7 +283,7 @@ class Shippit_Shippit_Model_Shipping_Carrier_Shippit extends Mage_Shipping_Model
|
|
261 |
|
262 |
/**
|
263 |
* Checks the request and ensures all products are either enabled, or part of the attributes elidgable
|
264 |
-
*
|
265 |
* @param [type] $request The shipment request
|
266 |
* @return boolean True or false
|
267 |
*/
|
@@ -320,7 +342,7 @@ class Shippit_Shippit_Model_Shipping_Carrier_Shippit extends Mage_Shipping_Model
|
|
320 |
|
321 |
$attributeCode = $this->helper->getEnabledProductAttributeCode();
|
322 |
$attributeValue = $this->helper->getEnabledProductAttributeValue();
|
323 |
-
|
324 |
if (!empty($attributeCode) && !empty($attributeValue)) {
|
325 |
$attributeProductCount = Mage::getModel('catalog/product')
|
326 |
->getCollection()
|
@@ -358,7 +380,7 @@ class Shippit_Shippit_Model_Shipping_Carrier_Shippit extends Mage_Shipping_Model
|
|
358 |
'weight' => ($request->getPackageWeight() / $request->getPackageQty())
|
359 |
)
|
360 |
);
|
361 |
-
|
362 |
return $parcelAttributes;
|
363 |
}
|
364 |
-
}
|
120 |
if ($isPriorityAvailable) {
|
121 |
$this->_addPriorityQuote($rateResult, $shippingQuote);
|
122 |
}
|
123 |
+
|
124 |
break;
|
125 |
case 'express':
|
126 |
if ($isExpressAvailable) {
|
127 |
$this->_addExpressQuote($rateResult, $shippingQuote);
|
128 |
}
|
129 |
+
|
130 |
break;
|
131 |
case 'standard':
|
132 |
if ($isStandardAvailable) {
|
150 |
->setMethod('standard')
|
151 |
->setMethodTitle('Standard')
|
152 |
->setCost($shippingQuoteQuote->price)
|
153 |
+
->setPrice($this->_getQuotePrice($shippingQuoteQuote->price));
|
154 |
|
155 |
$rateResult->append($rateResultMethod);
|
156 |
}
|
165 |
->setMethod('express')
|
166 |
->setMethodTitle('Express')
|
167 |
->setCost($shippingQuoteQuote->price)
|
168 |
+
->setPrice($this->_getQuotePrice($shippingQuoteQuote->price));
|
169 |
|
170 |
$rateResult->append($rateResultMethod);
|
171 |
}
|
202 |
->setMethod($method)
|
203 |
->setMethodTitle($methodTitle)
|
204 |
->setCost($shippingQuoteQuote->price)
|
205 |
+
->setPrice($this->_getQuotePrice($shippingQuoteQuote->price));
|
206 |
|
207 |
$rateResult->append($rateResultMethod);
|
208 |
}
|
209 |
}
|
210 |
|
211 |
+
/**
|
212 |
+
* Get the quote price, including the margin amount if enabled
|
213 |
+
* @param float $quotePrice The quote amount
|
214 |
+
* @return float The quote amount, with margin if applicable
|
215 |
+
*/
|
216 |
+
private function _getQuotePrice($quotePrice)
|
217 |
+
{
|
218 |
+
switch ($this->helper->getMargin()) {
|
219 |
+
case 'fixed':
|
220 |
+
$quotePrice += (float) $this->helper->getMarginAmount();
|
221 |
+
break;
|
222 |
+
case 'percentage':
|
223 |
+
$quotePrice *= (1 + ( (float) $this->helper->getMarginAmount() / 100));
|
224 |
+
break;
|
225 |
+
}
|
226 |
+
|
227 |
+
// ensure we get the lowest price, but not below 0.
|
228 |
+
$quotePrice = max(0, $quotePrice);
|
229 |
+
|
230 |
+
return $quotePrice;
|
231 |
+
}
|
232 |
+
|
233 |
public function isTrackingAvailable()
|
234 |
{
|
235 |
return true;
|
283 |
|
284 |
/**
|
285 |
* Checks the request and ensures all products are either enabled, or part of the attributes elidgable
|
286 |
+
*
|
287 |
* @param [type] $request The shipment request
|
288 |
* @return boolean True or false
|
289 |
*/
|
342 |
|
343 |
$attributeCode = $this->helper->getEnabledProductAttributeCode();
|
344 |
$attributeValue = $this->helper->getEnabledProductAttributeValue();
|
345 |
+
|
346 |
if (!empty($attributeCode) && !empty($attributeValue)) {
|
347 |
$attributeProductCount = Mage::getModel('catalog/product')
|
348 |
->getCollection()
|
380 |
'weight' => ($request->getPackageWeight() / $request->getPackageQty())
|
381 |
)
|
382 |
);
|
383 |
+
|
384 |
return $parcelAttributes;
|
385 |
}
|
386 |
+
}
|
app/code/community/Shippit/Shippit/Model/Shippit.php
CHANGED
@@ -52,7 +52,7 @@ class Shippit_Shippit_Model_Shippit extends Mage_Core_Model_Abstract
|
|
52 |
// Create a new sync order record
|
53 |
$syncOrder = Mage::getModel('shippit/sync_order')->addRequest($request)
|
54 |
->save();
|
55 |
-
|
56 |
// sync immediately if sync mode is realtime,
|
57 |
if ($syncMode == Shippit_Shippit_Helper_Data::SYNC_MODE_REALTIME) {
|
58 |
// return the result of the sync
|
@@ -62,4 +62,4 @@ class Shippit_Shippit_Model_Shippit extends Mage_Core_Model_Abstract
|
|
62 |
// return the sync order object
|
63 |
return $syncOrder;
|
64 |
}
|
65 |
-
}
|
52 |
// Create a new sync order record
|
53 |
$syncOrder = Mage::getModel('shippit/sync_order')->addRequest($request)
|
54 |
->save();
|
55 |
+
|
56 |
// sync immediately if sync mode is realtime,
|
57 |
if ($syncMode == Shippit_Shippit_Helper_Data::SYNC_MODE_REALTIME) {
|
58 |
// return the result of the sync
|
62 |
// return the sync order object
|
63 |
return $syncOrder;
|
64 |
}
|
65 |
+
}
|
app/code/community/Shippit/Shippit/Model/Sync/Order.php
CHANGED
@@ -124,4 +124,4 @@ class Shippit_Shippit_Model_Sync_Order extends Mage_Core_Model_Abstract
|
|
124 |
|
125 |
return $this;
|
126 |
}
|
127 |
-
}
|
124 |
|
125 |
return $this;
|
126 |
}
|
127 |
+
}
|
app/code/community/Shippit/Shippit/Model/Sync/Order/Config.php
CHANGED
@@ -24,4 +24,4 @@ class Shippit_Shippit_Model_Sync_Order_Config extends Mage_Core_Model_Abstract
|
|
24 |
Shippit_Shippit_Model_Sync_Order::STATUS_FAILED => Shippit_Shippit_Model_Sync_Order::STATUS_FAILED_TEXT,
|
25 |
);
|
26 |
}
|
27 |
-
}
|
24 |
Shippit_Shippit_Model_Sync_Order::STATUS_FAILED => Shippit_Shippit_Model_Sync_Order::STATUS_FAILED_TEXT,
|
25 |
);
|
26 |
}
|
27 |
+
}
|
app/code/community/Shippit/Shippit/Model/Sync/Order/Item.php
CHANGED
@@ -25,4 +25,4 @@ class Shippit_Shippit_Model_Sync_Order_Item extends Mage_Core_Model_Abstract
|
|
25 |
{
|
26 |
return $this->setData($item);
|
27 |
}
|
28 |
-
}
|
25 |
{
|
26 |
return $this->setData($item);
|
27 |
}
|
28 |
+
}
|
app/code/community/Shippit/Shippit/Model/System/Config/Source/Catalog/Attributes.php
CHANGED
@@ -44,7 +44,7 @@ class Shippit_Shippit_Model_System_Config_Source_Catalog_Attributes
|
|
44 |
'value' => $attribute->getAttributeCode()
|
45 |
);
|
46 |
}
|
47 |
-
|
48 |
return $attributeArray;
|
49 |
}
|
50 |
-
}
|
44 |
'value' => $attribute->getAttributeCode()
|
45 |
);
|
46 |
}
|
47 |
+
|
48 |
return $attributeArray;
|
49 |
}
|
50 |
+
}
|
app/code/community/Shippit/Shippit/Model/System/Config/Source/Catalog/Attributes/Location.php
CHANGED
@@ -43,7 +43,7 @@ class Shippit_Shippit_Model_System_Config_Source_Catalog_Attributes_Location
|
|
43 |
'value' => $attribute->getAttributeCode()
|
44 |
);
|
45 |
}
|
46 |
-
|
47 |
return $attributeArray;
|
48 |
}
|
49 |
-
}
|
43 |
'value' => $attribute->getAttributeCode()
|
44 |
);
|
45 |
}
|
46 |
+
|
47 |
return $attributeArray;
|
48 |
}
|
49 |
+
}
|
app/code/community/Shippit/Shippit/Model/System/Config/Source/Catalog/Products.php
CHANGED
@@ -17,25 +17,22 @@
|
|
17 |
class Shippit_Shippit_Model_System_Config_Source_Catalog_Products
|
18 |
{
|
19 |
/**
|
20 |
-
* Returns
|
21 |
*
|
22 |
* @return array
|
23 |
*/
|
24 |
public function toOptionArray()
|
25 |
{
|
26 |
-
$
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
}
|
38 |
-
|
39 |
-
return $productArray;
|
40 |
}
|
41 |
-
}
|
17 |
class Shippit_Shippit_Model_System_Config_Source_Catalog_Products
|
18 |
{
|
19 |
/**
|
20 |
+
* Returns id, sku pairs of all products
|
21 |
*
|
22 |
* @return array
|
23 |
*/
|
24 |
public function toOptionArray()
|
25 |
{
|
26 |
+
$resource = Mage::getSingleton('core/resource');
|
27 |
+
$readConnection = $resource->getConnection('core_read');
|
28 |
+
$table = $resource->getTableName('catalog/product');
|
29 |
+
|
30 |
+
// We utilise a direct SQL query fetch here to avoid
|
31 |
+
// loading a model for every product returned
|
32 |
+
$products = $readConnection->fetchAll(
|
33 |
+
'SELECT `sku` AS `label`, `entity_id` AS `value` FROM ' . $table
|
34 |
+
);
|
35 |
+
|
36 |
+
return $products;
|
|
|
|
|
|
|
37 |
}
|
38 |
+
}
|
app/code/community/Shippit/Shippit/Model/System/Config/Source/Catalog/Unit/Dimensions.php
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Shippit Pty Ltd
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the terms
|
8 |
+
* that is available through the world-wide-web at this URL:
|
9 |
+
* http://www.shippit.com/terms
|
10 |
+
*
|
11 |
+
* @category Shippit
|
12 |
+
* @copyright Copyright (c) 2016 by Shippit Pty Ltd (http://www.shippit.com)
|
13 |
+
* @author Matthew Muscat <matthew@mamis.com.au>
|
14 |
+
* @license http://www.shippit.com/terms
|
15 |
+
*/
|
16 |
+
|
17 |
+
class Shippit_Shippit_Model_System_Config_Source_Catalog_Unit_Dimensions
|
18 |
+
{
|
19 |
+
public function toOptionArray()
|
20 |
+
{
|
21 |
+
$optionsArray = array(
|
22 |
+
array(
|
23 |
+
'label' => 'Millimetres (mm)',
|
24 |
+
'value' => Shippit_Shippit_Helper_Sync_Item::UNIT_DIMENSION_MILLIMETRES
|
25 |
+
),
|
26 |
+
array(
|
27 |
+
'label' => 'Centimetres (cm)',
|
28 |
+
'value' => Shippit_Shippit_Helper_Sync_Item::UNIT_DIMENSION_CENTIMETRES
|
29 |
+
),
|
30 |
+
array(
|
31 |
+
'label' => 'Metres (m)',
|
32 |
+
'value' => Shippit_Shippit_Helper_Sync_Item::UNIT_DIMENSION_METRES
|
33 |
+
)
|
34 |
+
);
|
35 |
+
|
36 |
+
return $optionsArray;
|
37 |
+
}
|
38 |
+
}
|
app/code/community/Shippit/Shippit/Model/System/Config/Source/Catalog/Unit/Weight.php
CHANGED
@@ -21,14 +21,14 @@ class Shippit_Shippit_Model_System_Config_Source_Catalog_Unit_Weight
|
|
21 |
$optionsArray = array(
|
22 |
array(
|
23 |
'label' => 'Kilograms',
|
24 |
-
'value' =>
|
25 |
),
|
26 |
array(
|
27 |
'label' => 'Grams',
|
28 |
-
'value' =>
|
29 |
)
|
30 |
);
|
31 |
-
|
32 |
return $optionsArray;
|
33 |
}
|
34 |
-
}
|
21 |
$optionsArray = array(
|
22 |
array(
|
23 |
'label' => 'Kilograms',
|
24 |
+
'value' => Shippit_Shippit_Helper_Sync_Item::UNIT_WEIGHT_KILOGRAMS
|
25 |
),
|
26 |
array(
|
27 |
'label' => 'Grams',
|
28 |
+
'value' => Shippit_Shippit_Helper_Sync_Item::UNIT_WEIGHT_GRAMS
|
29 |
)
|
30 |
);
|
31 |
+
|
32 |
return $optionsArray;
|
33 |
}
|
34 |
+
}
|
app/code/community/Shippit/Shippit/Model/System/Config/Source/Order/Status/Processing.php
CHANGED
@@ -29,7 +29,7 @@ class Shippit_Shippit_Model_System_Config_Source_Order_Status_Processing
|
|
29 |
'label' => $statusLabel
|
30 |
);
|
31 |
}
|
32 |
-
|
33 |
return $optionsArray;
|
34 |
}
|
35 |
}
|
29 |
'label' => $statusLabel
|
30 |
);
|
31 |
}
|
32 |
+
|
33 |
return $optionsArray;
|
34 |
}
|
35 |
}
|
app/code/community/Shippit/Shippit/Model/System/Config/Source/Shipping/Methods.php
CHANGED
@@ -42,7 +42,7 @@ class Shippit_Shippit_Model_System_Config_Source_Shipping_Methods
|
|
42 |
}
|
43 |
}
|
44 |
}
|
45 |
-
|
46 |
return $optionsArray;
|
47 |
}
|
48 |
-
}
|
42 |
}
|
43 |
}
|
44 |
}
|
45 |
+
|
46 |
return $optionsArray;
|
47 |
}
|
48 |
+
}
|
app/code/community/Shippit/Shippit/Model/System/Config/Source/Shippit/Environment.php
CHANGED
@@ -28,7 +28,7 @@ class Shippit_Shippit_Model_System_Config_Source_Shippit_Environment
|
|
28 |
'value' => 'staging'
|
29 |
)
|
30 |
);
|
31 |
-
|
32 |
return $optionsArray;
|
33 |
}
|
34 |
-
}
|
28 |
'value' => 'staging'
|
29 |
)
|
30 |
);
|
31 |
+
|
32 |
return $optionsArray;
|
33 |
}
|
34 |
+
}
|
app/code/community/Shippit/Shippit/Model/System/Config/Source/Shippit/Margin.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Shippit Pty Ltd
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the terms
|
8 |
+
* that is available through the world-wide-web at this URL:
|
9 |
+
* http://www.shippit.com/terms
|
10 |
+
*
|
11 |
+
* @category Shippit
|
12 |
+
* @copyright Copyright (c) 2016 by Shippit Pty Ltd (http://www.shippit.com)
|
13 |
+
* @author Matthew Muscat <matthew@mamis.com.au>
|
14 |
+
* @license http://www.shippit.com/terms
|
15 |
+
*/
|
16 |
+
|
17 |
+
class Shippit_Shippit_Model_System_Config_Source_Shippit_Margin
|
18 |
+
{
|
19 |
+
const NONE = '';
|
20 |
+
const PERCENTAGE = 'percentage';
|
21 |
+
const FIXED = 'fixed';
|
22 |
+
|
23 |
+
public function toOptionArray()
|
24 |
+
{
|
25 |
+
$optionsArray = array(
|
26 |
+
array(
|
27 |
+
'label' => 'No',
|
28 |
+
'value' => self::NONE
|
29 |
+
),
|
30 |
+
array(
|
31 |
+
'label' => 'Yes - Percentage',
|
32 |
+
'value' => self::PERCENTAGE
|
33 |
+
),
|
34 |
+
array(
|
35 |
+
'label' => 'Yes - Fixed Amount',
|
36 |
+
'value' => self::FIXED
|
37 |
+
)
|
38 |
+
);
|
39 |
+
|
40 |
+
return $optionsArray;
|
41 |
+
}
|
42 |
+
}
|
app/code/community/Shippit/Shippit/Model/System/Config/Source/Shippit/MaxTimeslots.php
CHANGED
@@ -36,7 +36,7 @@ class Shippit_Shippit_Model_System_Config_Source_Shippit_MaxTimeslots
|
|
36 |
'value' => $timeslot
|
37 |
);
|
38 |
}
|
39 |
-
|
40 |
return $optionsArray;
|
41 |
}
|
42 |
-
}
|
36 |
'value' => $timeslot
|
37 |
);
|
38 |
}
|
39 |
+
|
40 |
return $optionsArray;
|
41 |
}
|
42 |
+
}
|
app/code/community/Shippit/Shippit/Model/System/Config/Source/Shippit/Methods.php
CHANGED
@@ -32,7 +32,7 @@ class Shippit_Shippit_Model_System_Config_Source_Shippit_Methods
|
|
32 |
'value' => $methodValue
|
33 |
);
|
34 |
}
|
35 |
-
|
36 |
return $methodOptions;
|
37 |
}
|
38 |
|
@@ -41,10 +41,9 @@ class Shippit_Shippit_Model_System_Config_Source_Shippit_Methods
|
|
41 |
$methods = array(
|
42 |
'standard' => 'Standard',
|
43 |
'express' => 'Express',
|
44 |
-
'priority' => 'Priority'
|
45 |
-
'international' => 'International'
|
46 |
);
|
47 |
|
48 |
return $methods;
|
49 |
}
|
50 |
-
}
|
32 |
'value' => $methodValue
|
33 |
);
|
34 |
}
|
35 |
+
|
36 |
return $methodOptions;
|
37 |
}
|
38 |
|
41 |
$methods = array(
|
42 |
'standard' => 'Standard',
|
43 |
'express' => 'Express',
|
44 |
+
'priority' => 'Priority'
|
|
|
45 |
);
|
46 |
|
47 |
return $methods;
|
48 |
}
|
49 |
+
}
|
app/code/community/Shippit/Shippit/Model/System/Config/Source/Shippit/Order/Status.php
CHANGED
@@ -27,7 +27,7 @@ class Shippit_Shippit_Model_System_Config_Source_Shippit_Order_Status
|
|
27 |
'value' => $orderStatus['status'], 'label' => $orderStatus['label']
|
28 |
);
|
29 |
}
|
30 |
-
|
31 |
return $optionsArray;
|
32 |
}
|
33 |
-
}
|
27 |
'value' => $orderStatus['status'], 'label' => $orderStatus['label']
|
28 |
);
|
29 |
}
|
30 |
+
|
31 |
return $optionsArray;
|
32 |
}
|
33 |
+
}
|
app/code/community/Shippit/Shippit/Model/System/Config/Source/Shippit/Sync/Mode.php
CHANGED
@@ -32,7 +32,7 @@ class Shippit_Shippit_Model_System_Config_Source_Shippit_Sync_Mode
|
|
32 |
'value' => Shippit_Shippit_Helper_Data::SYNC_MODE_CUSTOM
|
33 |
)
|
34 |
);
|
35 |
-
|
36 |
return $optionsArray;
|
37 |
}
|
38 |
-
}
|
32 |
'value' => Shippit_Shippit_Helper_Data::SYNC_MODE_CUSTOM
|
33 |
)
|
34 |
);
|
35 |
+
|
36 |
return $optionsArray;
|
37 |
}
|
38 |
+
}
|
app/code/community/Shippit/Shippit/Model/System/Config/Source/Shippit/Sync/SendAllOrders.php
CHANGED
@@ -46,7 +46,7 @@ class Shippit_Shippit_Model_System_Config_Source_Shippit_Sync_SendAllOrders
|
|
46 |
'value' => self::NO
|
47 |
)
|
48 |
);
|
49 |
-
|
50 |
return $optionsArray;
|
51 |
}
|
52 |
-
}
|
46 |
'value' => self::NO
|
47 |
)
|
48 |
);
|
49 |
+
|
50 |
return $optionsArray;
|
51 |
}
|
52 |
+
}
|
app/code/community/Shippit/Shippit/controllers/Adminhtml/Shippit/Order/SyncController.php
CHANGED
@@ -117,4 +117,4 @@ class Shippit_Shippit_Adminhtml_Shippit_Order_SyncController extends Mage_Adminh
|
|
117 |
{
|
118 |
return Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/shippit_order_send');
|
119 |
}
|
120 |
-
}
|
117 |
{
|
118 |
return Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/shippit_order_send');
|
119 |
}
|
120 |
+
}
|
app/code/community/Shippit/Shippit/controllers/Adminhtml/Shippit/OrderController.php
CHANGED
@@ -26,7 +26,7 @@ class Shippit_Shippit_Adminhtml_Shippit_OrderController extends Mage_Adminhtml_C
|
|
26 |
$this->_addContent($this->getLayout()->createBlock('shippit/adminhtml_sales_order'));
|
27 |
$this->renderLayout();
|
28 |
}
|
29 |
-
|
30 |
public function gridAction()
|
31 |
{
|
32 |
$this->loadLayout(false);
|
@@ -60,7 +60,7 @@ class Shippit_Shippit_Adminhtml_Shippit_OrderController extends Mage_Adminhtml_C
|
|
60 |
$this->_getSession()->addError($this->__('You must select at least 1 order to sync'));
|
61 |
|
62 |
$this->_redirect('*/*/index');
|
63 |
-
|
64 |
return;
|
65 |
}
|
66 |
|
@@ -209,4 +209,4 @@ class Shippit_Shippit_Adminhtml_Shippit_OrderController extends Mage_Adminhtml_C
|
|
209 |
{
|
210 |
return Mage::getSingleton('admin/session')->isAllowed('sales/shippit_orders');
|
211 |
}
|
212 |
-
}
|
26 |
$this->_addContent($this->getLayout()->createBlock('shippit/adminhtml_sales_order'));
|
27 |
$this->renderLayout();
|
28 |
}
|
29 |
+
|
30 |
public function gridAction()
|
31 |
{
|
32 |
$this->loadLayout(false);
|
60 |
$this->_getSession()->addError($this->__('You must select at least 1 order to sync'));
|
61 |
|
62 |
$this->_redirect('*/*/index');
|
63 |
+
|
64 |
return;
|
65 |
}
|
66 |
|
209 |
{
|
210 |
return Mage::getSingleton('admin/session')->isAllowed('sales/shippit_orders');
|
211 |
}
|
212 |
+
}
|
app/code/community/Shippit/Shippit/controllers/OrderController.php
CHANGED
@@ -108,7 +108,7 @@ class Shippit_Shippit_OrderController extends Mage_Core_Controller_Front_Action
|
|
108 |
protected function _checkApiKey()
|
109 |
{
|
110 |
$apiKey = $this->getRequest()->getParam('api_key');
|
111 |
-
|
112 |
if (empty($apiKey)) {
|
113 |
$response = $this->_prepareResponse(
|
114 |
false,
|
@@ -122,14 +122,14 @@ class Shippit_Shippit_OrderController extends Mage_Core_Controller_Front_Action
|
|
122 |
}
|
123 |
|
124 |
$configuredApiKey = Mage::helper('shippit')->getApiKey();
|
125 |
-
|
126 |
if ($configuredApiKey != $apiKey) {
|
127 |
$response = $this->_prepareResponse(
|
128 |
false,
|
129 |
self::ERROR_API_KEY_MISMATCH,
|
130 |
Zend_Log::WARN
|
131 |
);
|
132 |
-
|
133 |
$this->getResponse()->setBody($response);
|
134 |
|
135 |
return false;
|
@@ -147,7 +147,7 @@ class Shippit_Shippit_OrderController extends Mage_Core_Controller_Front_Action
|
|
147 |
);
|
148 |
|
149 |
$this->logger->setMetaData($metaData);
|
150 |
-
$this->logger->log('Shipment Sync Request Recieved');
|
151 |
}
|
152 |
|
153 |
protected function _checkRequest($request = array())
|
@@ -169,7 +169,7 @@ class Shippit_Shippit_OrderController extends Mage_Core_Controller_Front_Action
|
|
169 |
true,
|
170 |
self::NOTICE_SHIPMENT_STATUS
|
171 |
);
|
172 |
-
|
173 |
$this->getResponse()->setBody($response);
|
174 |
|
175 |
return false;
|
@@ -180,7 +180,7 @@ class Shippit_Shippit_OrderController extends Mage_Core_Controller_Front_Action
|
|
180 |
false,
|
181 |
self::ERROR_ORDER_MISSING
|
182 |
);
|
183 |
-
|
184 |
$this->getResponse()->setBody($response);
|
185 |
|
186 |
return false;
|
@@ -196,7 +196,7 @@ class Shippit_Shippit_OrderController extends Mage_Core_Controller_Front_Action
|
|
196 |
false,
|
197 |
self::ERROR_ORDER_MISSING
|
198 |
);
|
199 |
-
|
200 |
$this->getResponse()->setBody($response);
|
201 |
|
202 |
return false;
|
@@ -221,7 +221,7 @@ class Shippit_Shippit_OrderController extends Mage_Core_Controller_Front_Action
|
|
221 |
if (!isset($request['retailer_order_number'])) {
|
222 |
return false;
|
223 |
}
|
224 |
-
|
225 |
$orderIncrementId = $request['retailer_order_number'];
|
226 |
|
227 |
return Mage::getModel('sales/order')->load($orderIncrementId, 'increment_id');
|
108 |
protected function _checkApiKey()
|
109 |
{
|
110 |
$apiKey = $this->getRequest()->getParam('api_key');
|
111 |
+
|
112 |
if (empty($apiKey)) {
|
113 |
$response = $this->_prepareResponse(
|
114 |
false,
|
122 |
}
|
123 |
|
124 |
$configuredApiKey = Mage::helper('shippit')->getApiKey();
|
125 |
+
|
126 |
if ($configuredApiKey != $apiKey) {
|
127 |
$response = $this->_prepareResponse(
|
128 |
false,
|
129 |
self::ERROR_API_KEY_MISMATCH,
|
130 |
Zend_Log::WARN
|
131 |
);
|
132 |
+
|
133 |
$this->getResponse()->setBody($response);
|
134 |
|
135 |
return false;
|
147 |
);
|
148 |
|
149 |
$this->logger->setMetaData($metaData);
|
150 |
+
$this->logger->log('Shipment Sync', 'Shipment Sync Request Recieved');
|
151 |
}
|
152 |
|
153 |
protected function _checkRequest($request = array())
|
169 |
true,
|
170 |
self::NOTICE_SHIPMENT_STATUS
|
171 |
);
|
172 |
+
|
173 |
$this->getResponse()->setBody($response);
|
174 |
|
175 |
return false;
|
180 |
false,
|
181 |
self::ERROR_ORDER_MISSING
|
182 |
);
|
183 |
+
|
184 |
$this->getResponse()->setBody($response);
|
185 |
|
186 |
return false;
|
196 |
false,
|
197 |
self::ERROR_ORDER_MISSING
|
198 |
);
|
199 |
+
|
200 |
$this->getResponse()->setBody($response);
|
201 |
|
202 |
return false;
|
221 |
if (!isset($request['retailer_order_number'])) {
|
222 |
return false;
|
223 |
}
|
224 |
+
|
225 |
$orderIncrementId = $request['retailer_order_number'];
|
226 |
|
227 |
return Mage::getModel('sales/order')->load($orderIncrementId, 'increment_id');
|
app/code/community/Shippit/Shippit/data/shippit_setup/data-install-4.0.0.php
CHANGED
@@ -154,4 +154,4 @@ foreach ($configKeys as $configKey) {
|
|
154 |
}
|
155 |
}
|
156 |
|
157 |
-
$installer->endSetup();
|
154 |
}
|
155 |
}
|
156 |
|
157 |
+
$installer->endSetup();
|
app/code/community/Shippit/Shippit/data/shippit_setup/data-upgrade-4.1.0-4.1.1.php
CHANGED
@@ -89,7 +89,7 @@ foreach ($syncOrders as $syncOrder) {
|
|
89 |
$shippingOptions = str_replace('shippit' . '_', '', $shippingMethod);
|
90 |
$shippingOptions = explode('_', $shippingOptions);
|
91 |
$courierData = array();
|
92 |
-
|
93 |
if (isset($shippingOptions[0])) {
|
94 |
if ($shippingOptions[0] == 'Bonds') {
|
95 |
$shippitShippingMethod = 'premium';
|
@@ -117,4 +117,4 @@ foreach ($syncOrders as $syncOrder) {
|
|
117 |
->save();
|
118 |
}
|
119 |
|
120 |
-
$installer->endSetup();
|
89 |
$shippingOptions = str_replace('shippit' . '_', '', $shippingMethod);
|
90 |
$shippingOptions = explode('_', $shippingOptions);
|
91 |
$courierData = array();
|
92 |
+
|
93 |
if (isset($shippingOptions[0])) {
|
94 |
if ($shippingOptions[0] == 'Bonds') {
|
95 |
$shippitShippingMethod = 'premium';
|
117 |
->save();
|
118 |
}
|
119 |
|
120 |
+
$installer->endSetup();
|
app/code/community/Shippit/Shippit/data/shippit_setup/data-upgrade-4.1.6-4.1.7.php
CHANGED
@@ -45,4 +45,4 @@ foreach ($syncOrders as $syncOrder) {
|
|
45 |
->save();
|
46 |
}
|
47 |
|
48 |
-
$installer->endSetup();
|
45 |
->save();
|
46 |
}
|
47 |
|
48 |
+
$installer->endSetup();
|
app/code/community/Shippit/Shippit/data/shippit_setup/data-upgrade-4.2.3-4.2.4.php
CHANGED
@@ -50,4 +50,4 @@ foreach ($configOptions as $configOptionOldKey => $configOptionNewKey) {
|
|
50 |
}
|
51 |
}
|
52 |
|
53 |
-
$installer->endSetup();
|
50 |
}
|
51 |
}
|
52 |
|
53 |
+
$installer->endSetup();
|
app/code/community/Shippit/Shippit/data/shippit_setup/data-upgrade-4.3.2-4.3.3.php
CHANGED
@@ -32,4 +32,4 @@ if ($sendAllOrders) {
|
|
32 |
);
|
33 |
}
|
34 |
|
35 |
-
$installer->endSetup();
|
32 |
);
|
33 |
}
|
34 |
|
35 |
+
$installer->endSetup();
|
app/code/community/Shippit/Shippit/data/shippit_setup/data-upgrade-4.4.0-4.5.0.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Shippit Pty Ltd
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the terms
|
8 |
+
* that is available through the world-wide-web at this URL:
|
9 |
+
* http://www.shippit.com/terms
|
10 |
+
*
|
11 |
+
* @category Shippit
|
12 |
+
* @copyright Copyright (c) 2016 by Shippit Pty Ltd (http://www.shippit.com)
|
13 |
+
* @author Matthew Muscat <matthew@mamis.com.au>
|
14 |
+
* @license http://www.shippit.com/terms
|
15 |
+
*/
|
16 |
+
|
17 |
+
$installer = $this;
|
18 |
+
$installer->startSetup();
|
19 |
+
|
20 |
+
/**
|
21 |
+
* Migrate settings data from v4.4.0 to v4.5.0
|
22 |
+
*/
|
23 |
+
$configOptions = array(
|
24 |
+
'shippit/sync_order/product_unit_weight' => 'shippit/sync_item/product_unit_weight',
|
25 |
+
'shippit/sync_order/product_location_active' => 'shippit/sync_item/product_location_active',
|
26 |
+
'shippit/sync_order/product_location_attribute_code' => 'shippit/sync_item/product_location_attribute_code'
|
27 |
+
);
|
28 |
+
|
29 |
+
foreach ($configOptions as $configOptionOldKey => $configOptionNewKey) {
|
30 |
+
$configOptionValue = Mage::getStoreConfig($configOptionOldKey);
|
31 |
+
|
32 |
+
if (!is_null($configOptionValue)) {
|
33 |
+
Mage::getConfig()->saveConfig(
|
34 |
+
$configOptionNewKey,
|
35 |
+
$configOptionValue,
|
36 |
+
'default',
|
37 |
+
0
|
38 |
+
);
|
39 |
+
}
|
40 |
+
}
|
41 |
+
|
42 |
+
$installer->endSetup();
|
app/code/community/Shippit/Shippit/data/shippit_setup/data-upgrade-4.5.3-4.5.4.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Shippit Pty Ltd
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the terms
|
8 |
+
* that is available through the world-wide-web at this URL:
|
9 |
+
* http://www.shippit.com/terms
|
10 |
+
*
|
11 |
+
* @category Shippit
|
12 |
+
* @copyright Copyright (c) 2016 by Shippit Pty Ltd (http://www.shippit.com)
|
13 |
+
* @author Matthew Muscat <matthew@mamis.com.au>
|
14 |
+
* @license http://www.shippit.com/terms
|
15 |
+
*/
|
16 |
+
|
17 |
+
// Update any shippit sync orders that referenced international to standard
|
18 |
+
$internationalOrders = Mage::getResourceModel('shippit/sync_order_collection')
|
19 |
+
->addFieldToFilter('shipping_method', array('eq' => 'international'));
|
20 |
+
|
21 |
+
// Ensure we have international orders
|
22 |
+
if ($internationalOrders->count() > 0) {
|
23 |
+
$internationalOrders->massUpdate(array('shipping_method' => 'standard'));
|
24 |
+
}
|
25 |
+
|
26 |
+
// Update any mapped shipping methods that reference international to standard
|
27 |
+
$mappedShippingMethods = unserialize(Mage::getStoreConfig('shippit/sync_order/shipping_method_mapping'));
|
28 |
+
|
29 |
+
foreach ($mappedShippingMethods as $mappedKey => $mappedValue) {
|
30 |
+
if ($mappedValue['shippit_service'] == 'international') {
|
31 |
+
$mappedShippingMethods[$mappedKey]['shippit_service'] = 'standard';
|
32 |
+
}
|
33 |
+
}
|
34 |
+
|
35 |
+
Mage::getConfig()->saveConfig(
|
36 |
+
'shippit/sync_order/shipping_method_mapping',
|
37 |
+
serialize($mappedShippingMethods),
|
38 |
+
'default',
|
39 |
+
0
|
40 |
+
);
|
app/code/community/Shippit/Shippit/etc/adminhtml.xml
CHANGED
@@ -69,4 +69,4 @@
|
|
69 |
</admin>
|
70 |
</resources>
|
71 |
</acl>
|
72 |
-
</config>
|
69 |
</admin>
|
70 |
</resources>
|
71 |
</acl>
|
72 |
+
</config>
|
app/code/community/Shippit/Shippit/etc/config.xml
CHANGED
@@ -18,7 +18,7 @@
|
|
18 |
<config>
|
19 |
<modules>
|
20 |
<Shippit_Shippit>
|
21 |
-
<version>4.
|
22 |
</Shippit_Shippit>
|
23 |
</modules>
|
24 |
|
@@ -42,7 +42,7 @@
|
|
42 |
|
43 |
<shippit_resource>
|
44 |
<class>Shippit_Shippit_Model_Resource</class>
|
45 |
-
|
46 |
<entities>
|
47 |
<!-- Depreciated Node as of v4.1.0 -->
|
48 |
<order_sync>
|
@@ -272,10 +272,18 @@
|
|
272 |
<filter_order_status />
|
273 |
<mode>realtime</mode>
|
274 |
<send_all_orders>no</send_all_orders>
|
|
|
|
|
|
|
275 |
<product_unit_weight>kilograms</product_unit_weight>
|
|
|
|
|
|
|
|
|
|
|
276 |
<product_location_active>0</product_location_active>
|
277 |
<product_location_attribute_code></product_location_attribute_code>
|
278 |
-
</
|
279 |
|
280 |
<sync_shipping>
|
281 |
<active>0</active>
|
18 |
<config>
|
19 |
<modules>
|
20 |
<Shippit_Shippit>
|
21 |
+
<version>4.5.4</version>
|
22 |
</Shippit_Shippit>
|
23 |
</modules>
|
24 |
|
42 |
|
43 |
<shippit_resource>
|
44 |
<class>Shippit_Shippit_Model_Resource</class>
|
45 |
+
|
46 |
<entities>
|
47 |
<!-- Depreciated Node as of v4.1.0 -->
|
48 |
<order_sync>
|
272 |
<filter_order_status />
|
273 |
<mode>realtime</mode>
|
274 |
<send_all_orders>no</send_all_orders>
|
275 |
+
</sync_order>
|
276 |
+
|
277 |
+
<sync_item>
|
278 |
<product_unit_weight>kilograms</product_unit_weight>
|
279 |
+
<product_dimension_active>0</product_dimension_active>
|
280 |
+
<product_unit_dimension>centimetres</product_unit_dimension>
|
281 |
+
<product_dimension_length_attribute_code />
|
282 |
+
<product_dimension_width_attribute_code />
|
283 |
+
<product_dimension_depth_attribute_code />
|
284 |
<product_location_active>0</product_location_active>
|
285 |
<product_location_attribute_code></product_location_attribute_code>
|
286 |
+
</sync_item>
|
287 |
|
288 |
<sync_shipping>
|
289 |
<active>0</active>
|
app/code/community/Shippit/Shippit/etc/system.xml
CHANGED
@@ -79,6 +79,7 @@
|
|
79 |
</debug_active>
|
80 |
</fields>
|
81 |
</general>
|
|
|
82 |
<checkout>
|
83 |
<label>Checkout Options</label>
|
84 |
<sort_order>20</sort_order>
|
@@ -106,9 +107,10 @@
|
|
106 |
</delivery_instructions_active>
|
107 |
</fields>
|
108 |
</checkout>
|
|
|
109 |
<sync_order translate="label" module="shippit">
|
110 |
<label>Order Sync</label>
|
111 |
-
<sort_order>
|
112 |
<show_in_default>1</show_in_default>
|
113 |
<show_in_website>1</show_in_website>
|
114 |
<show_in_store>1</show_in_store>
|
@@ -174,31 +176,116 @@
|
|
174 |
<show_in_store>0</show_in_store>
|
175 |
<comment>By Default, only orders with a Shippit Shipping method, or a Shipping Method Mapping (below) are sent to Shippit</comment>
|
176 |
</send_all_orders>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
<product_unit_weight translate="label comment">
|
178 |
<label>Product Weight Unit</label>
|
179 |
<frontend_type>select</frontend_type>
|
180 |
<source_model>shippit/system_config_source_catalog_unit_weight</source_model>
|
181 |
-
<sort_order>
|
182 |
<show_in_default>1</show_in_default>
|
183 |
<show_in_website>1</show_in_website>
|
184 |
<show_in_store>0</show_in_store>
|
185 |
<comment>The unit of measurement used for the product weight</comment>
|
186 |
</product_unit_weight>
|
187 |
-
<
|
188 |
-
<label>Send Product
|
189 |
<frontend_type>select</frontend_type>
|
190 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
<sort_order>60</sort_order>
|
192 |
<show_in_default>1</show_in_default>
|
193 |
<show_in_website>1</show_in_website>
|
194 |
<show_in_store>0</show_in_store>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
195 |
<comment>Send the product stock location to Shippit</comment>
|
196 |
</product_location_active>
|
197 |
<product_location_attribute_code translate="label comment">
|
198 |
<label>Product Location Attribute Code</label>
|
199 |
<frontend_type>select</frontend_type>
|
200 |
<source_model>shippit/system_config_source_catalog_attributes</source_model>
|
201 |
-
<sort_order>
|
202 |
<show_in_default>1</show_in_default>
|
203 |
<show_in_website>1</show_in_website>
|
204 |
<show_in_store>0</show_in_store>
|
@@ -207,21 +294,12 @@
|
|
207 |
<product_location_active>1</product_location_active>
|
208 |
</depends>
|
209 |
</product_location_attribute_code>
|
210 |
-
<shipping_method_mapping translate="label comment">
|
211 |
-
<label>Shipping Method Mapping</label>
|
212 |
-
<frontend_model>shippit/adminhtml_system_config_form_field_sync_order_shippingMethodMapping</frontend_model>
|
213 |
-
<backend_model>adminhtml/system_config_backend_serialized_array</backend_model>
|
214 |
-
<sort_order>80</sort_order>
|
215 |
-
<show_in_default>1</show_in_default>
|
216 |
-
<show_in_website>1</show_in_website>
|
217 |
-
<show_in_store>1</show_in_store>
|
218 |
-
<comment>A mapping of the Magento Shipping Methods to Shippit Services classes - please note: priority mapping will book the next available timeslot</comment>
|
219 |
-
</shipping_method_mapping>
|
220 |
</fields>
|
221 |
-
</
|
|
|
222 |
<sync_shipping>
|
223 |
<label>Shipping Sync</label>
|
224 |
-
<sort_order>
|
225 |
<show_in_default>1</show_in_default>
|
226 |
<show_in_website>1</show_in_website>
|
227 |
<show_in_store>1</show_in_store>
|
@@ -286,11 +364,30 @@
|
|
286 |
<show_in_store>0</show_in_store>
|
287 |
<can_be_empty>1</can_be_empty>
|
288 |
</allowed_methods>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
<max_timeslots translate="label">
|
290 |
<label>Maximum Timeslots</label>
|
291 |
<frontend_type>select</frontend_type>
|
292 |
<source_model>shippit/system_config_source_shippit_maxTimeslots</source_model>
|
293 |
-
<sort_order>
|
294 |
<show_in_default>1</show_in_default>
|
295 |
<show_in_website>1</show_in_website>
|
296 |
<show_in_store>0</show_in_store>
|
@@ -397,4 +494,4 @@
|
|
397 |
</groups>
|
398 |
</carriers>
|
399 |
</sections>
|
400 |
-
</config>
|
79 |
</debug_active>
|
80 |
</fields>
|
81 |
</general>
|
82 |
+
|
83 |
<checkout>
|
84 |
<label>Checkout Options</label>
|
85 |
<sort_order>20</sort_order>
|
107 |
</delivery_instructions_active>
|
108 |
</fields>
|
109 |
</checkout>
|
110 |
+
|
111 |
<sync_order translate="label" module="shippit">
|
112 |
<label>Order Sync</label>
|
113 |
+
<sort_order>40</sort_order>
|
114 |
<show_in_default>1</show_in_default>
|
115 |
<show_in_website>1</show_in_website>
|
116 |
<show_in_store>1</show_in_store>
|
176 |
<show_in_store>0</show_in_store>
|
177 |
<comment>By Default, only orders with a Shippit Shipping method, or a Shipping Method Mapping (below) are sent to Shippit</comment>
|
178 |
</send_all_orders>
|
179 |
+
<shipping_method_mapping translate="label comment">
|
180 |
+
<label>Shipping Method Mapping</label>
|
181 |
+
<frontend_model>shippit/adminhtml_system_config_form_field_sync_order_shippingMethodMapping</frontend_model>
|
182 |
+
<backend_model>adminhtml/system_config_backend_serialized_array</backend_model>
|
183 |
+
<sort_order>70</sort_order>
|
184 |
+
<show_in_default>1</show_in_default>
|
185 |
+
<show_in_website>1</show_in_website>
|
186 |
+
<show_in_store>1</show_in_store>
|
187 |
+
<comment>A mapping of the Magento Shipping Methods to Shippit Services classes - please note: priority mapping will book the next available timeslot</comment>
|
188 |
+
</shipping_method_mapping>
|
189 |
+
</fields>
|
190 |
+
</sync_order>
|
191 |
+
|
192 |
+
<sync_item translate="label" module="shippit">
|
193 |
+
<label>Items Sync</label>
|
194 |
+
<sort_order>30</sort_order>
|
195 |
+
<show_in_default>1</show_in_default>
|
196 |
+
<show_in_website>1</show_in_website>
|
197 |
+
<show_in_store>1</show_in_store>
|
198 |
+
<fields>
|
199 |
<product_unit_weight translate="label comment">
|
200 |
<label>Product Weight Unit</label>
|
201 |
<frontend_type>select</frontend_type>
|
202 |
<source_model>shippit/system_config_source_catalog_unit_weight</source_model>
|
203 |
+
<sort_order>10</sort_order>
|
204 |
<show_in_default>1</show_in_default>
|
205 |
<show_in_website>1</show_in_website>
|
206 |
<show_in_store>0</show_in_store>
|
207 |
<comment>The unit of measurement used for the product weight</comment>
|
208 |
</product_unit_weight>
|
209 |
+
<product_dimension_active translate="label comment">
|
210 |
+
<label>Send Product Dimensions</label>
|
211 |
<frontend_type>select</frontend_type>
|
212 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
213 |
+
<sort_order>20</sort_order>
|
214 |
+
<show_in_default>1</show_in_default>
|
215 |
+
<show_in_website>1</show_in_website>
|
216 |
+
<show_in_store>0</show_in_store>
|
217 |
+
<comment>Send the product package dimensions to Shippit</comment>
|
218 |
+
</product_dimension_active>
|
219 |
+
<product_unit_dimension translate="label comment">
|
220 |
+
<label>Product Dimensions Unit</label>
|
221 |
+
<frontend_type>select</frontend_type>
|
222 |
+
<source_model>shippit/system_config_source_catalog_unit_dimensions</source_model>
|
223 |
+
<sort_order>30</sort_order>
|
224 |
+
<show_in_default>1</show_in_default>
|
225 |
+
<show_in_website>1</show_in_website>
|
226 |
+
<show_in_store>0</show_in_store>
|
227 |
+
<comment>The unit of measurement used for the product dimensions</comment>
|
228 |
+
<depends>
|
229 |
+
<product_dimension_active>1</product_dimension_active>
|
230 |
+
</depends>
|
231 |
+
</product_unit_dimension>
|
232 |
+
<product_dimension_length_attribute_code translate="label comment">
|
233 |
+
<label>Product Length Attribute Code</label>
|
234 |
+
<frontend_type>select</frontend_type>
|
235 |
+
<validate>required-entry</validate>
|
236 |
+
<source_model>shippit/system_config_source_catalog_attributes</source_model>
|
237 |
+
<sort_order>40</sort_order>
|
238 |
+
<show_in_default>1</show_in_default>
|
239 |
+
<show_in_website>1</show_in_website>
|
240 |
+
<show_in_store>0</show_in_store>
|
241 |
+
<comment>The Product Attribute to be used for length data</comment>
|
242 |
+
<depends>
|
243 |
+
<product_dimension_active>1</product_dimension_active>
|
244 |
+
</depends>
|
245 |
+
</product_dimension_length_attribute_code>
|
246 |
+
<product_dimension_width_attribute_code translate="label comment">
|
247 |
+
<label>Product Width Attribute Code</label>
|
248 |
+
<frontend_type>select</frontend_type>
|
249 |
+
<validate>required-entry</validate>
|
250 |
+
<source_model>shippit/system_config_source_catalog_attributes</source_model>
|
251 |
+
<sort_order>50</sort_order>
|
252 |
+
<show_in_default>1</show_in_default>
|
253 |
+
<show_in_website>1</show_in_website>
|
254 |
+
<show_in_store>0</show_in_store>
|
255 |
+
<comment>The Product Attribute to be used for width data</comment>
|
256 |
+
<depends>
|
257 |
+
<product_dimension_active>1</product_dimension_active>
|
258 |
+
</depends>
|
259 |
+
</product_dimension_width_attribute_code>
|
260 |
+
<product_dimension_depth_attribute_code translate="label comment">
|
261 |
+
<label>Product Depth Attribute Code</label>
|
262 |
+
<frontend_type>select</frontend_type>
|
263 |
+
<validate>required-entry</validate>
|
264 |
+
<source_model>shippit/system_config_source_catalog_attributes</source_model>
|
265 |
<sort_order>60</sort_order>
|
266 |
<show_in_default>1</show_in_default>
|
267 |
<show_in_website>1</show_in_website>
|
268 |
<show_in_store>0</show_in_store>
|
269 |
+
<comment>The Product Attribute to be used for depth data</comment>
|
270 |
+
<depends>
|
271 |
+
<product_dimension_active>1</product_dimension_active>
|
272 |
+
</depends>
|
273 |
+
</product_dimension_depth_attribute_code>
|
274 |
+
<product_location_active translate="label comment">
|
275 |
+
<label>Send Product Location</label>
|
276 |
+
<frontend_type>select</frontend_type>
|
277 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
278 |
+
<sort_order>70</sort_order>
|
279 |
+
<show_in_default>1</show_in_default>
|
280 |
+
<show_in_website>1</show_in_website>
|
281 |
+
<show_in_store>0</show_in_store>
|
282 |
<comment>Send the product stock location to Shippit</comment>
|
283 |
</product_location_active>
|
284 |
<product_location_attribute_code translate="label comment">
|
285 |
<label>Product Location Attribute Code</label>
|
286 |
<frontend_type>select</frontend_type>
|
287 |
<source_model>shippit/system_config_source_catalog_attributes</source_model>
|
288 |
+
<sort_order>80</sort_order>
|
289 |
<show_in_default>1</show_in_default>
|
290 |
<show_in_website>1</show_in_website>
|
291 |
<show_in_store>0</show_in_store>
|
294 |
<product_location_active>1</product_location_active>
|
295 |
</depends>
|
296 |
</product_location_attribute_code>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
297 |
</fields>
|
298 |
+
</sync_item>
|
299 |
+
|
300 |
<sync_shipping>
|
301 |
<label>Shipping Sync</label>
|
302 |
+
<sort_order>50</sort_order>
|
303 |
<show_in_default>1</show_in_default>
|
304 |
<show_in_website>1</show_in_website>
|
305 |
<show_in_store>1</show_in_store>
|
364 |
<show_in_store>0</show_in_store>
|
365 |
<can_be_empty>1</can_be_empty>
|
366 |
</allowed_methods>
|
367 |
+
<margin translate="label">
|
368 |
+
<label>Margin Enabled</label>
|
369 |
+
<frontend_type>select</frontend_type>
|
370 |
+
<source_model>shippit/system_config_source_shippit_margin</source_model>
|
371 |
+
<sort_order>90</sort_order>
|
372 |
+
<show_in_default>1</show_in_default>
|
373 |
+
<show_in_website>1</show_in_website>
|
374 |
+
<show_in_store>0</show_in_store>
|
375 |
+
<comment>Add a margin to the quote</comment>
|
376 |
+
</margin>
|
377 |
+
<margin_amount>
|
378 |
+
<label>Margin Amount</label>
|
379 |
+
<frontend_type>text</frontend_type>
|
380 |
+
<sort_order>100</sort_order>
|
381 |
+
<show_in_default>1</show_in_default>
|
382 |
+
<show_in_website>1</show_in_website>
|
383 |
+
<show_in_store>0</show_in_store>
|
384 |
+
<comment>Enter the margin amount to be applied</comment>
|
385 |
+
</margin_amount>
|
386 |
<max_timeslots translate="label">
|
387 |
<label>Maximum Timeslots</label>
|
388 |
<frontend_type>select</frontend_type>
|
389 |
<source_model>shippit/system_config_source_shippit_maxTimeslots</source_model>
|
390 |
+
<sort_order>110</sort_order>
|
391 |
<show_in_default>1</show_in_default>
|
392 |
<show_in_website>1</show_in_website>
|
393 |
<show_in_store>0</show_in_store>
|
494 |
</groups>
|
495 |
</carriers>
|
496 |
</sections>
|
497 |
+
</config>
|
app/code/community/Shippit/Shippit/sql/shippit_setup/install-4.0.0.php
CHANGED
@@ -194,4 +194,4 @@ $table = $installer->getConnection()
|
|
194 |
|
195 |
$installer->getConnection()->createTable($table);
|
196 |
|
197 |
-
$installer->endSetup();
|
194 |
|
195 |
$installer->getConnection()->createTable($table);
|
196 |
|
197 |
+
$installer->endSetup();
|
app/code/community/Shippit/Shippit/sql/shippit_setup/upgrade-4.0.9-4.1.0.php
CHANGED
@@ -162,4 +162,4 @@ $table = $installer->getConnection()
|
|
162 |
|
163 |
$installer->getConnection()->createTable($table);
|
164 |
|
165 |
-
$installer->endSetup();
|
162 |
|
163 |
$installer->getConnection()->createTable($table);
|
164 |
|
165 |
+
$installer->endSetup();
|
app/code/community/Shippit/Shippit/sql/shippit_setup/upgrade-4.1.0-4.1.1.php
CHANGED
@@ -30,4 +30,4 @@ $installer->getConnection()
|
|
30 |
)
|
31 |
);
|
32 |
|
33 |
-
$installer->endSetup();
|
30 |
)
|
31 |
);
|
32 |
|
33 |
+
$installer->endSetup();
|
app/code/community/Shippit/Shippit/sql/shippit_setup/upgrade-4.2.5-4.2.6.php
CHANGED
@@ -43,4 +43,4 @@ $installer->getConnection()->changeColumn(
|
|
43 |
)
|
44 |
);
|
45 |
|
46 |
-
$installer->endSetup();
|
43 |
)
|
44 |
);
|
45 |
|
46 |
+
$installer->endSetup();
|
app/code/community/Shippit/Shippit/sql/shippit_setup/upgrade-4.2.6-4.3.0.php
CHANGED
@@ -32,4 +32,4 @@ $installer->getConnection()
|
|
32 |
)
|
33 |
);
|
34 |
|
35 |
-
$installer->endSetup();
|
32 |
)
|
33 |
);
|
34 |
|
35 |
+
$installer->endSetup();
|
app/code/community/Shippit/Shippit/sql/shippit_setup/upgrade-4.4.0-4.5.0.php
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Shippit Pty Ltd
|
4 |
+
*
|
5 |
+
* NOTICE OF LICENSE
|
6 |
+
*
|
7 |
+
* This source file is subject to the terms
|
8 |
+
* that is available through the world-wide-web at this URL:
|
9 |
+
* http://www.shippit.com/terms
|
10 |
+
*
|
11 |
+
* @category Shippit
|
12 |
+
* @copyright Copyright (c) 2016 by Shippit Pty Ltd (http://www.shippit.com)
|
13 |
+
* @author Matthew Muscat <matthew@mamis.com.au>
|
14 |
+
* @license http://www.shippit.com/terms
|
15 |
+
*/
|
16 |
+
|
17 |
+
$installer = $this;
|
18 |
+
$installer->startSetup();
|
19 |
+
|
20 |
+
$installer->getConnection()
|
21 |
+
->addColumn(
|
22 |
+
$installer->getTable('shippit/sync_order_item'),
|
23 |
+
'depth',
|
24 |
+
array(
|
25 |
+
'type' => Varien_Db_Ddl_Table::TYPE_DECIMAL,
|
26 |
+
'scale' => 2,
|
27 |
+
'precision' => 12,
|
28 |
+
'nullable' => true,
|
29 |
+
'default' => null,
|
30 |
+
'after' => 'weight',
|
31 |
+
'comment' => 'Item Depth'
|
32 |
+
)
|
33 |
+
);
|
34 |
+
|
35 |
+
$installer->getConnection()
|
36 |
+
->addColumn(
|
37 |
+
$installer->getTable('shippit/sync_order_item'),
|
38 |
+
'width',
|
39 |
+
array(
|
40 |
+
'type' => Varien_Db_Ddl_Table::TYPE_DECIMAL,
|
41 |
+
'scale' => 2,
|
42 |
+
'precision' => 12,
|
43 |
+
'nullable' => true,
|
44 |
+
'default' => null,
|
45 |
+
'after' => 'weight',
|
46 |
+
'comment' => 'Item Width'
|
47 |
+
)
|
48 |
+
);
|
49 |
+
|
50 |
+
$installer->getConnection()
|
51 |
+
->addColumn(
|
52 |
+
$installer->getTable('shippit/sync_order_item'),
|
53 |
+
'length',
|
54 |
+
array(
|
55 |
+
'type' => Varien_Db_Ddl_Table::TYPE_DECIMAL,
|
56 |
+
'scale' => 2,
|
57 |
+
'precision' => 12,
|
58 |
+
'nullable' => true,
|
59 |
+
'default' => null,
|
60 |
+
'after' => 'weight',
|
61 |
+
'comment' => 'Item Length'
|
62 |
+
)
|
63 |
+
);
|
64 |
+
|
65 |
+
$installer->endSetup();
|
app/design/adminhtml/default/default/layout/shippit.xml
CHANGED
@@ -1,8 +1,24 @@
|
|
1 |
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
<layout>
|
3 |
<adminhtml_shippit_order_grid>
|
4 |
<update handle="formkey"/>
|
5 |
|
6 |
<block type="shippit/adminhtml_sales_order_grid" name="shippit.sales.order.grid" output="toHtml" />
|
7 |
</adminhtml_shippit_order_grid>
|
8 |
-
</layout>
|
1 |
<?xml version="1.0"?>
|
2 |
+
<!--
|
3 |
+
/**
|
4 |
+
* Shippit Pty Ltd
|
5 |
+
*
|
6 |
+
* NOTICE OF LICENSE
|
7 |
+
*
|
8 |
+
* This source file is subject to the terms
|
9 |
+
* that is available through the world-wide-web at this URL:
|
10 |
+
* http://www.shippit.com/terms
|
11 |
+
*
|
12 |
+
* @category Shippit
|
13 |
+
* @copyright Copyright (c) 2016 by Shippit Pty Ltd (http://www.shippit.com)
|
14 |
+
* @author Matthew Muscat <matthew@mamis.com.au>
|
15 |
+
* @license http://www.shippit.com/terms
|
16 |
+
*/
|
17 |
+
-->
|
18 |
<layout>
|
19 |
<adminhtml_shippit_order_grid>
|
20 |
<update handle="formkey"/>
|
21 |
|
22 |
<block type="shippit/adminhtml_sales_order_grid" name="shippit.sales.order.grid" output="toHtml" />
|
23 |
</adminhtml_shippit_order_grid>
|
24 |
+
</layout>
|
app/design/adminhtml/default/default/template/shippit/system/config/form/field/array.phtml
CHANGED
@@ -174,4 +174,4 @@ arrayRow<?php echo $_htmlId ?>.showButtonOnly();
|
|
174 |
toggleValueElements({checked:true}, $('grid<?php echo $_htmlId ?>').parentNode);
|
175 |
<?php endif;?>
|
176 |
//]]>
|
177 |
-
</script>
|
174 |
toggleValueElements({checked:true}, $('grid<?php echo $_htmlId ?>').parentNode);
|
175 |
<?php endif;?>
|
176 |
//]]>
|
177 |
+
</script>
|
app/design/frontend/base/default/layout/shippit.xml
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
-
|
3 |
<!--
|
4 |
/**
|
5 |
* Shippit Pty Ltd
|
@@ -16,7 +15,6 @@
|
|
16 |
* @license http://www.shippit.com/terms
|
17 |
*/
|
18 |
-->
|
19 |
-
|
20 |
<layout version="0.1.0">
|
21 |
<checkout_onepage_index>
|
22 |
<reference name="checkout.onepage.shipping_method">
|
@@ -29,4 +27,4 @@
|
|
29 |
<block type="shippit/checkout_shipping_authorityToLeave" name="shippit.authority_to_leave" as="shippit_authority_to_leave" template="shippit/checkout/onepage/shipping_method/authoritytoleave.phtml" />
|
30 |
</reference>
|
31 |
</checkout_onepage_index>
|
32 |
-
</layout>
|
1 |
<?xml version="1.0"?>
|
|
|
2 |
<!--
|
3 |
/**
|
4 |
* Shippit Pty Ltd
|
15 |
* @license http://www.shippit.com/terms
|
16 |
*/
|
17 |
-->
|
|
|
18 |
<layout version="0.1.0">
|
19 |
<checkout_onepage_index>
|
20 |
<reference name="checkout.onepage.shipping_method">
|
27 |
<block type="shippit/checkout_shipping_authorityToLeave" name="shippit.authority_to_leave" as="shippit_authority_to_leave" template="shippit/checkout/onepage/shipping_method/authoritytoleave.phtml" />
|
28 |
</reference>
|
29 |
</checkout_onepage_index>
|
30 |
+
</layout>
|
app/design/frontend/base/default/template/shippit/checkout/onepage/shipping_method.phtml
CHANGED
@@ -30,7 +30,7 @@
|
|
30 |
<?php echo $this->getChildHtml('shippit_delivery_instructions') ?>
|
31 |
</div>
|
32 |
<?php endif ?>
|
33 |
-
|
34 |
<div id="onepage-checkout-shipping-method-additional-load">
|
35 |
<?php echo $this->getChildHtml('additional') ?>
|
36 |
</div>
|
@@ -41,4 +41,4 @@
|
|
41 |
<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
|
42 |
</span>
|
43 |
</div>
|
44 |
-
</form>
|
30 |
<?php echo $this->getChildHtml('shippit_delivery_instructions') ?>
|
31 |
</div>
|
32 |
<?php endif ?>
|
33 |
+
|
34 |
<div id="onepage-checkout-shipping-method-additional-load">
|
35 |
<?php echo $this->getChildHtml('additional') ?>
|
36 |
</div>
|
41 |
<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
|
42 |
</span>
|
43 |
</div>
|
44 |
+
</form>
|
app/design/frontend/base/default/template/shippit/checkout/onepage/shipping_method/authoritytoleave.phtml
CHANGED
@@ -25,4 +25,4 @@
|
|
25 |
</label>
|
26 |
</li>
|
27 |
</ul>
|
28 |
-
</div>
|
25 |
</label>
|
26 |
</li>
|
27 |
</ul>
|
28 |
+
</div>
|
app/design/frontend/base/default/template/shippit/checkout/onepage/shipping_method/deliveryinstructions.phtml
CHANGED
@@ -27,4 +27,4 @@
|
|
27 |
</div>
|
28 |
</li>
|
29 |
</ul>
|
30 |
-
</div>
|
27 |
</div>
|
28 |
</li>
|
29 |
</ul>
|
30 |
+
</div>
|
app/design/frontend/base/default/template/shippit/email/order/shipment/track.phtml
CHANGED
@@ -30,7 +30,7 @@
|
|
30 |
<?php
|
31 |
$i++;
|
32 |
$_trackingNumberDetail = $_item->getNumberDetail();
|
33 |
-
|
34 |
if ($_trackingNumberDetail && $_trackingNumberDetail instanceof Mage_Shipping_Model_Tracking_Result_Status) {
|
35 |
$_trackingUrl = $_trackingNumberDetail->getUrl();
|
36 |
}
|
@@ -51,4 +51,4 @@
|
|
51 |
<?php endforeach ?>
|
52 |
</tbody>
|
53 |
</table>
|
54 |
-
<?php endif ?>
|
30 |
<?php
|
31 |
$i++;
|
32 |
$_trackingNumberDetail = $_item->getNumberDetail();
|
33 |
+
|
34 |
if ($_trackingNumberDetail && $_trackingNumberDetail instanceof Mage_Shipping_Model_Tracking_Result_Status) {
|
35 |
$_trackingUrl = $_trackingNumberDetail->getUrl();
|
36 |
}
|
51 |
<?php endforeach ?>
|
52 |
</tbody>
|
53 |
</table>
|
54 |
+
<?php endif ?>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Shippit_Shippit</name>
|
4 |
-
<version>4.
|
5 |
<stability>stable</stability>
|
6 |
<license>Open Software Licence</license>
|
7 |
<channel>community</channel>
|
@@ -18,9 +18,9 @@ Allows for retrieving shipping quotes during checkout and sending orders to Ship
|
|
18 |

|
19 |
Also adds Australian States and Territories to the available region options and Authority to Leave and Delivery Comments to the checkout process.</notes>
|
20 |
<authors><author><name>Matthew Muscat</name><user>matthewmuscat</user><email>matthew@mamis.com.au</email></author><author><name>William On</name><user>williamon</user><email>will@shippit.com</email></author></authors>
|
21 |
-
<date>
|
22 |
-
<time>
|
23 |
-
<contents><target name="magelib"><dir name="shippit-bugsnag"><file name="Autoload.php" hash="55266ba5e2f5b3d9e9331c6eaa0945d5"/><file name="Client.php" hash="e58b339776f7d039a7486c4381e31134"/><file name="Configuration.php" hash="d303821a0ee820f2191540f8b3df4379"/><file name="Diagnostics.php" hash="fe944e2c0e3cfd06931bf251da18d544"/><file name="Error.php" hash="a23e6f17acc4d295bec537c4ee4897e8"/><file name="ErrorTypes.php" hash="e273be2371c9251dbfdd89d4490280dd"/><file name="Notification.php" hash="77f1f6352d82f69408499c5e5487ea42"/><file name="Request.php" hash="4b5e27bb029d1423ed823ad2b327189d"/><file name="Stacktrace.php" hash="6a0ca0f67fcdf4058b150f7dd602c803"/></dir></target><target name="magecommunity"><dir name="Shippit"><dir name="Shippit"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="Grid.php" hash="
|
24 |
<compatible/>
|
25 |
<dependencies><required><php><min>5.2.0</min><max>8.0.0</max></php></required></dependencies>
|
26 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Shippit_Shippit</name>
|
4 |
+
<version>4.5.4</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>Open Software Licence</license>
|
7 |
<channel>community</channel>
|
18 |

|
19 |
Also adds Australian States and Territories to the available region options and Authority to Leave and Delivery Comments to the checkout process.</notes>
|
20 |
<authors><author><name>Matthew Muscat</name><user>matthewmuscat</user><email>matthew@mamis.com.au</email></author><author><name>William On</name><user>williamon</user><email>will@shippit.com</email></author></authors>
|
21 |
+
<date>2017-02-01</date>
|
22 |
+
<time>04:06:57</time>
|
23 |
+
<contents><target name="magelib"><dir name="shippit-bugsnag"><file name="Autoload.php" hash="55266ba5e2f5b3d9e9331c6eaa0945d5"/><file name="Client.php" hash="e58b339776f7d039a7486c4381e31134"/><file name="Configuration.php" hash="d303821a0ee820f2191540f8b3df4379"/><file name="Diagnostics.php" hash="fe944e2c0e3cfd06931bf251da18d544"/><file name="Error.php" hash="a23e6f17acc4d295bec537c4ee4897e8"/><file name="ErrorTypes.php" hash="e273be2371c9251dbfdd89d4490280dd"/><file name="Notification.php" hash="77f1f6352d82f69408499c5e5487ea42"/><file name="Request.php" hash="4b5e27bb029d1423ed823ad2b327189d"/><file name="Stacktrace.php" hash="6a0ca0f67fcdf4058b150f7dd602c803"/></dir></target><target name="magecommunity"><dir name="Shippit"><dir name="Shippit"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="Grid.php" hash="ea8b684c1f7100a8e192364cbf6ce5d0"/><file name="Items.php" hash="3fcc1a47e93f7727bd5a0d62f33969e5"/></dir><file name="Order.php" hash="501e7ce8682d1e2741d61b0321d5394c"/></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><dir name="Renderer"><dir name="Shipping"><file name="Methods.php" hash="11dd6028429d6c0d8341b444c7a76218"/></dir><dir name="Shippit"><file name="ServiceClass.php" hash="6e93a1a0b3425c1f4fb9fd1c82330860"/></dir></dir><dir name="Sync"><dir name="Order"><file name="ShippingMethodMapping.php" hash="4aa39c09601a55647d9588e9888f70ea"/></dir></dir></dir><dir name="Fieldset"><file name="Version.php" hash="f7fe07753000690dde5db9e67f799a65"/></dir></dir></dir></dir></dir><dir name="Checkout"><dir name="Cart"><file name="Shipping.php" hash="d67e00e26fbdf100afce0d47ccfdb780"/></dir><dir name="Shipping"><file name="AuthorityToLeave.php" hash="cb53917cb8b5b7d985812487c650d006"/><file name="DeliveryInstructions.php" hash="f8208960cbfe24096bc7e56b33ccd30d"/></dir></dir></dir><file name="Exception.php" hash="5b2856b2d6ec47ce6ed9edcac0f6d23a"/><dir name="Helper"><file name="Api.php" hash="13e218a19fae6428a9dffea4025e1c96"/><file name="Bugsnag.php" hash="c6606336a9d173e494b57aa32404173c"/><file name="Carrier.php" hash="a7795c25a3ea76d3b17ee6f61b50b507"/><file name="Checkout.php" hash="88fa00fd912308995854094d7d9d13c0"/><file name="Data.php" hash="9ac1820f8ee9bcd2af1931daac9ea49c"/><dir name="Sync"><file name="Item.php" hash="b8a2cce24bc99078a710d79eb03636cd"/><file name="Order.php" hash="b86c8c307b7c100a232a0defb3ce6272"/><file name="Shipping.php" hash="a38b1adce4a51ab27027a8f94cf610f3"/></dir></dir><dir name="Model"><dir name="Api"><file name="Order.php" hash="a32bf86ad206ceebbc42cb218fe1e37a"/></dir><file name="Logger.php" hash="8857081b83a2a872273a99cc9c39d2a1"/><dir name="Observer"><dir name="Adminhtml"><dir name="Sales"><file name="Order.php" hash="f84e8890e6342cb9a8be37b94491973b"/></dir></dir><dir name="Order"><file name="Sync.php" hash="69d8ae1b2b86b581f34670f88d1720df"/></dir><dir name="Quote"><file name="AuthorityToLeave.php" hash="f2e25048b4c7ee76031b96f83c76aaf6"/><file name="DeliveryInstructions.php" hash="6e30c2f81204cd33c50d6c7b046856c0"/></dir><dir name="Shipping"><file name="Tracking.php" hash="b1f2f60b2762f242f2dca4e34c56972a"/></dir><file name="Shippit.php" hash="bb402502553edc860ad5fc17be0c1351"/><dir name="System"><file name="Config.php" hash="857766ffe3ad035dd7f7603a1509f524"/></dir></dir><dir name="Request"><dir name="Api"><file name="Order.php" hash="ffc06538c8ffe36ba517386316746685"/><file name="Shipment.php" hash="e5c074a461cdb9e041b03cf3792b52be"/></dir><dir name="Sync"><file name="Order.php" hash="76fe88c297b5456bf6237c3aeb0a73dc"/></dir></dir><dir name="Resource"><file name="Setup.php" hash="531118edacd2743c64c49c011ddb9e6b"/><dir name="Sync"><dir name="Order"><file name="Collection.php" hash="3a71559789919f1d5ec60f5ffc638c74"/><dir name="Item"><file name="Collection.php" hash="f77437ac0d1cc01dbf3050fd9f2afd71"/></dir><file name="Item.php" hash="abde43e1accf6ec657788a18857708ef"/></dir><file name="Order.php" hash="c62edbb564e62b398df9093f318f3cb9"/></dir></dir><dir name="Shipping"><dir name="Carrier"><file name="Shippit.php" hash="69903d2f04d18fad3ca99d0d94b6d16e"/></dir></dir><file name="Shippit.php" hash="e5611796f09beea74b21bd2779cca9a2"/><dir name="Sync"><dir name="Order"><file name="Config.php" hash="bdc221dc64eb612d211916bb9b73a352"/><file name="Item.php" hash="4490b378753e0a77fcf8d3b6b560c9c7"/></dir><file name="Order.php" hash="f02b2cfc4af8bcc3eab4d0b5d7449c39"/></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="Catalog"><dir name="Attributes"><file name="Location.php" hash="0cccddf92a93919c72a9af15adade33b"/></dir><file name="Attributes.php" hash="ced0f730837bf9be5d432c1e8f8cf7b7"/><file name="Products.php" hash="52674d834dc4d485d716e70377522d9c"/><dir name="Unit"><file name="Dimensions.php" hash="48769093ab55a22b525743cb1145230f"/><file name="Weight.php" hash="75dfbda6dfbf8413df21f73d6fd8ed3f"/></dir></dir><dir name="Order"><dir name="Status"><file name="Processing.php" hash="716bd33831c83b214e4d5e63a4825c42"/></dir></dir><dir name="Shipping"><file name="Methods.php" hash="befe35083b33bb72ebf4ebb0e451543d"/></dir><dir name="Shippit"><file name="Environment.php" hash="32bafd736d9b3eb643a03482bd51608f"/><file name="Margin.php" hash="73091e2c5af04580201ee6515f519004"/><file name="MaxTimeslots.php" hash="116f0990ea82ad579e0f8c31aeecd216"/><file name="Methods.php" hash="139cc8724c94ddee224928b62af41f24"/><dir name="Order"><file name="Status.php" hash="603cac85f22a26bf8483c7514b1da747"/></dir><dir name="Sync"><file name="Mode.php" hash="3de2a6b3ce63eae48dbe51bc8ed61af2"/><file name="SendAllOrders.php" hash="5d8a44a02bcf6be41b8f6a01bd1ab175"/></dir></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Shippit"><dir name="Order"><file name="SyncController.php" hash="b1ba3c1523b1264beae2b9a1f12e8268"/></dir><file name="OrderController.php" hash="0d93d6c61d21f10c93ac12d037ffd325"/></dir></dir><file name="OrderController.php" hash="c92e2871c03c04da0a4913db14bfedeb"/></dir><dir name="data"><dir name="shippit_setup"><file name="data-install-4.0.0.php" hash="697699a8c1e9a6f13c6587a4dd85b90f"/><file name="data-upgrade-4.1.0-4.1.1.php" hash="a391029786d7b4494d90407efcd38b55"/><file name="data-upgrade-4.1.6-4.1.7.php" hash="4f9d3ca5fbdde9bd10224e7d4890e2d8"/><file name="data-upgrade-4.2.3-4.2.4.php" hash="1efb4a61a8a0b33c80c2cd7bf1961a47"/><file name="data-upgrade-4.3.2-4.3.3.php" hash="2913a32430b6ce38231e5a3320c28257"/><file name="data-upgrade-4.4.0-4.5.0.php" hash="8e14331df4f68b7cc3cf5477c0cfde83"/><file name="data-upgrade-4.5.3-4.5.4.php" hash="6a4c6b51663b713d570fbc774cc1d040"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="bede308ad2b36e42f1abe21291e69f47"/><file name="config.xml" hash="d23298807439a096ed88a859b1925f00"/><file name="system.xml" hash="b8b3c399d0e6144e6946f78253d46fbf"/></dir><dir name="sql"><dir name="shippit_setup"><file name="install-4.0.0.php" hash="db14361293596f04930a85eb9d51bf16"/><file name="upgrade-4.0.9-4.1.0.php" hash="827e3c6e974784cd332f2d60a9f6339c"/><file name="upgrade-4.1.0-4.1.1.php" hash="0c297e5c884ba6413c7fa1c2bb088c28"/><file name="upgrade-4.2.5-4.2.6.php" hash="3235a26356bcdf11a84e0095691adeba"/><file name="upgrade-4.2.6-4.3.0.php" hash="2d83ca7fd22a378b1a4413d2dbec6412"/><file name="upgrade-4.4.0-4.5.0.php" hash="dd978cc94b83182c88eeda26e559efa3"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="shippit.xml" hash="86f4993749f5ab519809dad6201f0deb"/></dir><dir name="template"><dir name="shippit"><dir name="checkout"><dir name="onepage"><dir name="shipping_method"><file name="authoritytoleave.phtml" hash="8ce68fb005caf885b8107d8c9e3dfc49"/><file name="deliveryinstructions.phtml" hash="bff8e3093ad6702f5ced2b41fd08c559"/></dir><file name="shipping_method.phtml" hash="efe3500895f215ee3463eda0e7ef851b"/></dir></dir><dir name="email"><dir name="order"><dir name="shipment"><file name="track.phtml" hash="f9c3ad5074fc57b2c405bfee6a4cbcf9"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="shippit.xml" hash="f40743bda8cc4da5b8a118d544b8c214"/></dir><dir name="template"><dir name="shippit"><dir name="system"><dir name="config"><dir name="form"><dir name="field"><file name="array.phtml" hash="d90ecc5b623a2c27e6822cb1f48d4456"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Shippit_Shippit.xml" hash="401f33d7db491808587c51209d8d6a8b"/></dir></target></contents>
|
24 |
<compatible/>
|
25 |
<dependencies><required><php><min>5.2.0</min><max>8.0.0</max></php></required></dependencies>
|
26 |
</package>
|