Version Notes
Temando Shipping Extension – Starter Version
• New Feature - Addition of editable shipping method title
• New Feature - Addition of destination type selection in the cart & checkout
• New Feature - Addition of retrieve manifest
• New Feature - Addition of dangerous good product attribute
• New Feature - Delivery Options on checkout
• Feature Update: Sorting of the carrier list by name
• Bug Fix: Fix for getTrackingInfo if no tracking history is available
Download this release
Release Info
Developer | Temando |
Extension | Temando_Temando |
Version | 1.4.0 |
Comparing to | |
See all releases |
Code changes from version 1.3.1 to 1.4.0
- app/code/community/Temando/Temando/Block/Adminhtml/Manifest.php +13 -2
- app/code/community/Temando/Temando/Block/Adminhtml/Manifest/Filter/Form.php +7 -2
- app/code/community/Temando/Temando/Block/Adminhtml/Manifest/Grid.php +8 -2
- app/code/community/Temando/Temando/Block/Adminhtml/Manifest/Grid/Renderer/Checkbox.php +6 -1
- app/code/community/Temando/Temando/Block/Adminhtml/Shipment.php +8 -2
- app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit.php +11 -2
- app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit/Form.php +13 -2
- app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit/Tab/Abstract.php +8 -2
- app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit/Tab/Form.php +6 -1
- app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit/Tab/Form/Anytime.php +8 -2
- app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit/Tab/Form/Anywhere.php +8 -2
- app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit/Tab/Form/Boxes.php +8 -2
- app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit/Tab/Form/Insurance.php +8 -2
- app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit/Tab/Form/Origin.php +8 -2
- app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit/Tab/Form/Products.php +8 -2
- app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit/Tab/Form/Quotes.php +8 -2
- app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit/Tab/Form/Status.php +8 -2
- app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit/Tabs.php +8 -2
- app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Grid.php +8 -2
- app/code/community/Temando/Temando/Block/Adminhtml/System/Config/Form/Button/Rule.php +9 -3
- app/code/community/Temando/Temando/Block/Adminhtml/System/Config/Form/Button/Update.php +9 -2
- app/code/community/Temando/Temando/Block/Adminhtml/System/Config/Form/Button/Warehouse.php +10 -3
- app/code/community/Temando/Temando/Block/Adminhtml/System/Config/Form/Field/Insurance.php +14 -5
- app/code/community/Temando/Temando/Block/Adminhtml/System/Config/Form/Field/Required.php +8 -2
- app/code/community/Temando/Temando/Block/Adminhtml/System/Config/Form/Fieldset/General.php +8 -2
- app/code/community/Temando/Temando/Block/Cart/Shipping.php +59 -3
- app/code/community/Temando/Temando/Block/Onepage/Shipping/Delivery/Options.php +89 -0
- app/code/community/Temando/Temando/Block/Onepage/Shipping/Method/Available.php +6 -1
- app/code/community/Temando/Temando/Block/Onepage/Shipping/Method/Available/Single.php +11 -2
- app/code/community/Temando/Temando/Block/Product/Shipping.php +6 -1
- app/code/community/Temando/Temando/Block/Product/Shipping/Methods.php +6 -2
- app/code/community/Temando/Temando/Block/Wizard/Html.php +32 -16
- app/code/community/Temando/Temando/Helper/Data.php +109 -76
- app/code/community/Temando/Temando/Helper/Functions.php +16 -16
- app/code/community/Temando/Temando/Helper/Wizard.php +8 -3
- app/code/community/Temando/Temando/Model/Api/Client.php +66 -36
- app/code/community/Temando/Temando/Model/Api/Request.php +18 -4
- app/code/community/Temando/Temando/Model/Api/Request/Anything.php +24 -17
- app/code/community/Temando/Temando/Model/Api/Request/Anythings.php +26 -14
- app/code/community/Temando/Temando/Model/Api/Request/Anytime.php +16 -6
- app/code/community/Temando/Temando/Model/Api/Request/Anywhere.php +45 -7
- app/code/community/Temando/Temando/Model/Box.php +9 -3
- app/code/community/Temando/Temando/Model/Carrier.php +5 -0
- app/code/community/Temando/Temando/Model/Checkout/Delivery/Options.php +79 -0
- app/code/community/Temando/Temando/Model/Entity/Attribute/Source/Packaging.php +6 -1
- app/code/community/Temando/Temando/Model/Entity/Attribute/Source/Packaging/Mode.php +9 -5
- app/code/community/Temando/Temando/Model/Manifest.php +6 -1
- app/code/community/Temando/Temando/Model/Mysql4/Box.php +6 -1
- app/code/community/Temando/Temando/Model/Mysql4/Box/Collection.php +8 -2
- app/code/community/Temando/Temando/Model/Mysql4/Carrier.php +8 -2
- app/code/community/Temando/Temando/Model/Mysql4/Carrier/Collection.php +8 -2
- app/code/community/Temando/Temando/Model/Mysql4/Manifest.php +8 -2
- app/code/community/Temando/Temando/Model/Mysql4/Manifest/Collection.php +8 -2
- app/code/community/Temando/Temando/Model/Mysql4/Quote.php +6 -1
- app/code/community/Temando/Temando/Model/Mysql4/Quote/Collection.php +6 -1
- app/code/community/Temando/Temando/Model/Mysql4/Shipment.php +6 -1
- app/code/community/Temando/Temando/Model/Mysql4/Shipment/Collection.php +17 -10
- app/code/community/Temando/Temando/Model/Observer.php +55 -20
- app/code/community/Temando/Temando/Model/Option/Abstract.php +6 -1
- app/code/community/Temando/Temando/Model/Option/Action/Abstract.php +6 -1
- app/code/community/Temando/Temando/Model/Option/Action/Carbon.php +6 -1
- app/code/community/Temando/Temando/Model/Option/Action/Footprints.php +8 -2
- app/code/community/Temando/Temando/Model/Option/Action/Insurance.php +8 -2
- app/code/community/Temando/Temando/Model/Option/Action/Markup.php +8 -2
- app/code/community/Temando/Temando/Model/Option/Boolean.php +9 -5
- app/code/community/Temando/Temando/Model/Option/Carbonoffset.php +6 -1
- app/code/community/Temando/Temando/Model/Option/Footprints.php +8 -2
- app/code/community/Temando/Temando/Model/Option/Insurance.php +6 -1
- app/code/community/Temando/Temando/Model/Options.php +6 -1
- app/code/community/Temando/Temando/Model/Pcs.php +5 -0
- app/code/community/Temando/Temando/Model/Quote.php +50 -38
- app/code/community/Temando/Temando/Model/Shipment.php +63 -39
- app/code/community/Temando/Temando/Model/Shipping/Carrier/Temando.php +131 -92
- app/code/community/Temando/Temando/Model/Shipping/Carrier/Temando/Source/Method.php +9 -1
- app/code/community/Temando/Temando/Model/Status.php +8 -3
- app/code/community/Temando/Temando/Model/System/Config/Backend/Form/Field/Required/Businessresidential.php +11 -5
- app/code/community/Temando/Temando/Model/System/Config/Backend/Form/Field/Required/Country.php +8 -2
- app/code/community/Temando/Temando/Model/System/Config/Backend/Form/Field/Required/Location.php +8 -2
- app/code/community/Temando/Temando/Model/System/Config/Backend/Form/Field/Required/Text.php +8 -2
- app/code/community/Temando/Temando/Model/System/Config/Source.php +6 -1
- app/code/community/Temando/Temando/Model/System/Config/Source/Carbon.php +8 -2
- app/code/community/Temando/Temando/Model/System/Config/Source/Client/Type.php +6 -1
- app/code/community/Temando/Temando/Model/System/Config/Source/Country.php +11 -4
- app/code/community/Temando/Temando/Model/System/Config/Source/Errorprocess.php +8 -2
- app/code/community/Temando/Temando/Model/System/Config/Source/Footprints.php +8 -2
- app/code/community/Temando/Temando/Model/System/Config/Source/Insurance.php +8 -2
- app/code/community/Temando/Temando/Model/System/Config/Source/Labeltype.php +8 -2
- app/code/community/Temando/Temando/Model/System/Config/Source/Origin/Type.php +6 -1
- app/code/community/Temando/Temando/Model/System/Config/Source/Payment.php +6 -1
- app/code/community/Temando/Temando/Model/System/Config/Source/Pricing.php +8 -2
- app/code/community/Temando/Temando/Model/System/Config/Source/Readytime.php +8 -2
- app/code/community/Temando/Temando/Model/System/Config/Source/Regions.php +8 -2
- app/code/community/Temando/Temando/Model/System/Config/Source/Rule/Action/Adjustment/Type.php +6 -1
- app/code/community/Temando/Temando/Model/System/Config/Source/Rule/Action/Filter.php +6 -1
- app/code/community/Temando/Temando/Model/System/Config/Source/Rule/Condition/Time.php +6 -1
- app/code/community/Temando/Temando/Model/System/Config/Source/Rule/Condition/Type.php +8 -2
- app/code/community/Temando/Temando/Model/System/Config/Source/Rule/Type.php +8 -2
- app/code/community/Temando/Temando/Model/System/Config/Source/Sales/Order/Status.php +11 -4
- app/code/community/Temando/Temando/Model/System/Config/Source/Shipment/Class.php +8 -2
- app/code/community/Temando/Temando/Model/System/Config/Source/Shipment/Packaging.php +8 -2
- app/code/community/Temando/Temando/Model/System/Config/Source/Shipment/Packaging/Mode.php +8 -2
- app/code/community/Temando/Temando/Model/System/Config/Source/Shipment/Service.php +8 -2
- app/code/community/Temando/Temando/Model/System/Config/Source/Shipment/Status.php +8 -2
- app/code/community/Temando/Temando/Model/System/Config/Source/Unit.php +8 -2
- app/code/community/Temando/Temando/Model/System/Config/Source/Unit/Measure.php +8 -2
- app/code/community/Temando/Temando/Model/System/Config/Source/Unit/Weight.php +8 -2
- app/code/community/Temando/Temando/Model/System/Config/Source/Wizard.php +8 -2
- app/code/community/Temando/Temando/Model/Wizard.php +10 -4
- app/code/community/Temando/Temando/controllers/Adminhtml/CarrierController.php +10 -3
- app/code/community/Temando/Temando/controllers/Adminhtml/JsonController.php +6 -1
- app/code/community/Temando/Temando/controllers/Adminhtml/ManifestController.php +68 -1
- app/code/community/Temando/Temando/controllers/Adminhtml/ShipmentController.php +37 -22
- app/code/community/Temando/Temando/controllers/Adminhtml/WizardController.php +8 -2
- app/code/community/Temando/Temando/controllers/PcsController.php +27 -22
- app/code/community/Temando/Temando/controllers/WizardController.php +8 -2
- app/code/community/Temando/Temando/etc/adminhtml.xml +4 -4
- app/code/community/Temando/Temando/etc/config.xml +12 -2
- app/code/community/Temando/Temando/etc/system.xml +71 -48
- app/code/community/Temando/Temando/sql/temando_setup/mysql4-upgrade-1.3.8-1.3.9.php +70 -0
- app/design/adminhtml/default/default/template/temando/temando/manifest.phtml +15 -0
- app/design/adminhtml/default/default/template/temando/temando/shipment/anywhere.phtml +14 -1
- app/design/adminhtml/default/default/template/temando/temando/shipment/boxes.phtml +16 -0
- app/design/frontend/base/default/layout/temando.xml +18 -12
- app/design/frontend/base/default/template/temando/temando/checkout/cart/shipping.phtml +22 -4
- app/design/frontend/base/default/template/temando/temando/checkout/onepage/delivery/options.phtml +52 -0
- app/design/frontend/base/default/template/temando/temando/shipping_method/available.phtml +1 -0
- app/locale/en_US/Temando_Temando.csv +661 -622
- js/temando/grid.js +0 -8
- js/temando/menu.js +1 -1
- package.xml +11 -8
- skin/frontend/base/default/css/temando/cart.css +19 -0
- skin/frontend/base/default/css/temando/styles.css +39 -1
- skin/frontend/base/default/js/temando/checkout.js +30 -11
app/code/community/Temando/Temando/Block/Adminhtml/Manifest.php
CHANGED
@@ -1,5 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
{
|
4 |
|
5 |
public function __construct()
|
@@ -17,9 +24,13 @@ class Temando_Temando_Block_Adminhtml_Manifest extends Mage_Adminhtml_Block_Widg
|
|
17 |
}
|
18 |
|
19 |
$this->$add_button_method('add_form_submit', array(
|
20 |
-
'label' => Mage::helper('temando')->__('
|
21 |
'onclick' => 'addFormSubmit()'
|
22 |
));
|
|
|
|
|
|
|
|
|
23 |
$this->$add_button_method('confirm', array(
|
24 |
'label' => Mage::helper('temando')->__('Confirm Manifests'),
|
25 |
'onclick' => 'setLocation(\'' . $this->getUrl('*/*/confirm') .'\')',
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Admin Manifest Block
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Block_Adminhtml_Manifest
|
9 |
+
extends Mage_Adminhtml_Block_Widget_Grid_Container
|
10 |
{
|
11 |
|
12 |
public function __construct()
|
24 |
}
|
25 |
|
26 |
$this->$add_button_method('add_form_submit', array(
|
27 |
+
'label' => Mage::helper('temando')->__('Draft Manifest'),
|
28 |
'onclick' => 'addFormSubmit()'
|
29 |
));
|
30 |
+
$this->$add_button_method('retrieve', array(
|
31 |
+
'label' => Mage::helper('temando')->__('Retrieve Previous Manifest'),
|
32 |
+
'onclick' => 'retrieveFormSubmit()',
|
33 |
+
));
|
34 |
$this->$add_button_method('confirm', array(
|
35 |
'label' => Mage::helper('temando')->__('Confirm Manifests'),
|
36 |
'onclick' => 'setLocation(\'' . $this->getUrl('*/*/confirm') .'\')',
|
app/code/community/Temando/Temando/Block/Adminhtml/Manifest/Filter/Form.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Block_Adminhtml_Manifest_Filter_Form extends Mage_Adminhtml_Block_Widget_Form
|
4 |
{
|
5 |
/**
|
@@ -15,7 +20,7 @@ class Temando_Temando_Block_Adminhtml_Manifest_Filter_Form extends Mage_Adminhtm
|
|
15 |
);
|
16 |
$htmlIdPrefix = 'add_manifest_';
|
17 |
$form->setHtmlIdPrefix($htmlIdPrefix);
|
18 |
-
$fieldset = $form->addFieldset('base_fieldset', array('legend'=>Mage::helper('temando')->__("Create New Manifest - Please note, to manifest you must have a permanent pickup.
|
19 |
|
20 |
$dateFormatIso = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
|
21 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Manifest Filter Form
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Block_Adminhtml_Manifest_Filter_Form extends Mage_Adminhtml_Block_Widget_Form
|
9 |
{
|
10 |
/**
|
20 |
);
|
21 |
$htmlIdPrefix = 'add_manifest_';
|
22 |
$form->setHtmlIdPrefix($htmlIdPrefix);
|
23 |
+
$fieldset = $form->addFieldset('base_fieldset', array('legend'=>Mage::helper('temando')->__("Create New Manifest - Please note, to manifest you must have a permanent pickup.")));
|
24 |
|
25 |
$dateFormatIso = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
|
26 |
|
app/code/community/Temando/Temando/Block/Adminhtml/Manifest/Grid.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
public function __construct()
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Manifest Grid
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Block_Adminhtml_Manifest_Grid
|
9 |
+
extends Mage_Adminhtml_Block_Widget_Grid
|
10 |
{
|
11 |
|
12 |
public function __construct()
|
app/code/community/Temando/Temando/Block/Adminhtml/Manifest/Grid/Renderer/Checkbox.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Block_Adminhtml_Manifest_Grid_Renderer_Checkbox extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Massaction
|
4 |
{
|
5 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Manifest Grid Renderer Checkbox
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Block_Adminhtml_Manifest_Grid_Renderer_Checkbox extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Massaction
|
9 |
{
|
10 |
|
app/code/community/Temando/Temando/Block/Adminhtml/Shipment.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
public function __construct()
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Admin Shipment Block
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Block_Adminhtml_Shipment
|
9 |
+
extends Mage_Adminhtml_Block_Widget_Grid_Container
|
10 |
{
|
11 |
|
12 |
public function __construct()
|
app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
protected $_shipment;
|
@@ -125,6 +131,7 @@ class Temando_Temando_Block_Adminhtml_Shipment_Edit extends Mage_Adminhtml_Block
|
|
125 |
$('box_' + num + '_comment').value = box.comment;
|
126 |
$('box_' + num + '_packaging').value = box.packaging;
|
127 |
$('box_' + num + '_fragile').value = box.fragile;
|
|
|
128 |
$('box_' + num + '_qty').value = box.qty;
|
129 |
$('box_' + num + '_value').value = box.value;
|
130 |
$('box_' + num + '_weight').value = box.weight;
|
@@ -197,12 +204,14 @@ class Temando_Temando_Block_Adminhtml_Shipment_Edit extends Mage_Adminhtml_Block
|
|
197 |
$width = (float) $product->getTemandoWidth();
|
198 |
$packaging = $product->getTemandoPackaging();
|
199 |
$fragile = $product->getTemandoFragile();
|
|
|
200 |
|
201 |
$products .= "
|
202 |
$variable_name.push({
|
203 |
'comment': '" . addslashes($product->getName()) . "',
|
204 |
'packaging': '{$packaging}',
|
205 |
'fragile': '{$fragile}',
|
|
|
206 |
'qty': '{$item->getQtyToShip()}',
|
207 |
'value': '{$item->getRowTotal()}',
|
208 |
'weight': '$weight',
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Shipment Edit
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Block_Adminhtml_Shipment_Edit
|
9 |
+
extends Mage_Adminhtml_Block_Widget_Form_Container
|
10 |
{
|
11 |
|
12 |
protected $_shipment;
|
131 |
$('box_' + num + '_comment').value = box.comment;
|
132 |
$('box_' + num + '_packaging').value = box.packaging;
|
133 |
$('box_' + num + '_fragile').value = box.fragile;
|
134 |
+
$('box_' + num + '_dangerous').value = box.dangerous;
|
135 |
$('box_' + num + '_qty').value = box.qty;
|
136 |
$('box_' + num + '_value').value = box.value;
|
137 |
$('box_' + num + '_weight').value = box.weight;
|
204 |
$width = (float) $product->getTemandoWidth();
|
205 |
$packaging = $product->getTemandoPackaging();
|
206 |
$fragile = $product->getTemandoFragile();
|
207 |
+
$dangerous = $product->getTemandoDangerous();
|
208 |
|
209 |
$products .= "
|
210 |
$variable_name.push({
|
211 |
'comment': '" . addslashes($product->getName()) . "',
|
212 |
'packaging': '{$packaging}',
|
213 |
'fragile': '{$fragile}',
|
214 |
+
'dangerous': '{$dangerous}',
|
215 |
'qty': '{$item->getQtyToShip()}',
|
216 |
'value': '{$item->getRowTotal()}',
|
217 |
'weight': '$weight',
|
app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit/Form.php
CHANGED
@@ -1,8 +1,19 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
|
|
|
|
|
|
|
|
|
|
6 |
protected function _prepareForm()
|
7 |
{
|
8 |
$form = new Varien_Data_Form(
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Shipment Edit Form
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Block_Adminhtml_Shipment_Edit_Form
|
9 |
+
extends Mage_Adminhtml_Block_Widget_Form
|
10 |
{
|
11 |
|
12 |
+
/**
|
13 |
+
* Prepare the form
|
14 |
+
*
|
15 |
+
* @return parent
|
16 |
+
*/
|
17 |
protected function _prepareForm()
|
18 |
{
|
19 |
$form = new Varien_Data_Form(
|
app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit/Tab/Abstract.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
protected $_helper = null;
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Shipment Edit Tab Abstract
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
abstract class Temando_Temando_Block_Adminhtml_Shipment_Edit_Tab_Abstract
|
9 |
+
extends Mage_Adminhtml_Block_Template
|
10 |
{
|
11 |
|
12 |
protected $_helper = null;
|
app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit/Tab/Form.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Block_Adminhtml_Shipment_Edit_Tab_Form
|
4 |
extends Temando_Temando_Block_Adminhtml_Shipment_Edit_Tab_Abstract
|
5 |
implements Mage_Adminhtml_Block_Widget_Tab_Interface
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Shipment Edit Tab Form
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Block_Adminhtml_Shipment_Edit_Tab_Form
|
9 |
extends Temando_Temando_Block_Adminhtml_Shipment_Edit_Tab_Abstract
|
10 |
implements Mage_Adminhtml_Block_Widget_Tab_Interface
|
app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit/Tab/Form/Anytime.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Shipment Edit Tab Form Anytime
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Block_Adminhtml_Shipment_Edit_Tab_Form_Anytime
|
9 |
+
extends Temando_Temando_Block_Adminhtml_Shipment_Edit_Tab_Abstract
|
10 |
{
|
11 |
|
12 |
|
app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit/Tab/Form/Anywhere.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Shipment Edit Tab Form Anywhere
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Block_Adminhtml_Shipment_Edit_Tab_Form_Anywhere
|
9 |
+
extends Temando_Temando_Block_Adminhtml_Shipment_Edit_Tab_Abstract
|
10 |
{
|
11 |
|
12 |
|
app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit/Tab/Form/Boxes.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
/**
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Shipment Edit Tab Form Boxes
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Block_Adminhtml_Shipment_Edit_Tab_Form_Boxes
|
9 |
+
extends Temando_Temando_Block_Adminhtml_Shipment_Edit_Tab_Abstract
|
10 |
{
|
11 |
|
12 |
/**
|
app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit/Tab/Form/Insurance.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
public function getTotalGoodsValue()
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Shipment Edit Tab Form Insurance
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Block_Adminhtml_Shipment_Edit_Tab_Form_Insurance
|
9 |
+
extends Temando_Temando_Block_Adminhtml_Shipment_Edit_Tab_Abstract
|
10 |
{
|
11 |
|
12 |
public function getTotalGoodsValue()
|
app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit/Tab/Form/Origin.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
public function getWarehouse() {
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Shipment Edit Tab Form Origin
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Block_Adminhtml_Shipment_Edit_Tab_Form_Origin
|
9 |
+
extends Temando_Temando_Block_Adminhtml_Shipment_Edit_Tab_Abstract
|
10 |
{
|
11 |
|
12 |
public function getWarehouse() {
|
app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit/Tab/Form/Products.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
/**
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Shipment Edit Tab Form Products
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Block_Adminhtml_Shipment_Edit_Tab_Form_Products
|
9 |
+
extends Temando_Temando_Block_Adminhtml_Shipment_Edit_Tab_Abstract
|
10 |
{
|
11 |
|
12 |
/**
|
app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit/Tab/Form/Quotes.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
protected $_cheapest_quote_id;
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Shipment Edit Tab Form Quotes
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Block_Adminhtml_Shipment_Edit_Tab_Form_Quotes
|
9 |
+
extends Temando_Temando_Block_Adminhtml_Shipment_Edit_Tab_Abstract
|
10 |
{
|
11 |
|
12 |
protected $_cheapest_quote_id;
|
app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit/Tab/Form/Status.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
/**
|
6 |
* @var Temando_Temando_Model_Quote
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Shipment Edit Tab Form Status
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Block_Adminhtml_Shipment_Edit_Tab_Form_Status
|
9 |
+
extends Temando_Temando_Block_Adminhtml_Shipment_Edit_Tab_Abstract
|
10 |
{
|
11 |
/**
|
12 |
* @var Temando_Temando_Model_Quote
|
app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Edit/Tabs.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
public function __construct()
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Shipment Edit Tabs
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Block_Adminhtml_Shipment_Edit_Tabs
|
9 |
+
extends Mage_Adminhtml_Block_Widget_Tabs
|
10 |
{
|
11 |
|
12 |
public function __construct()
|
app/code/community/Temando/Temando/Block/Adminhtml/Shipment/Grid.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
public function __construct()
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Shipment Grid
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Block_Adminhtml_Shipment_Grid
|
9 |
+
extends Mage_Adminhtml_Block_Widget_Grid
|
10 |
{
|
11 |
|
12 |
public function __construct()
|
app/code/community/Temando/Temando/Block/Adminhtml/System/Config/Form/Button/Rule.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
|
6 |
$this->setElement($element);
|
@@ -9,7 +15,7 @@ class Temando_Temando_Block_Adminhtml_System_Config_Form_Button_Rule extends Mag
|
|
9 |
->setType('button')->setClass('scalable go disabled')
|
10 |
->setLabel('Add New Rule')
|
11 |
->setOnClick('return false;')
|
12 |
-
->setTitle('Available in the
|
13 |
->toHtml();
|
14 |
return $html;
|
15 |
}
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Form Button Rule
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Block_Adminhtml_System_Config_Form_Button_Rule
|
9 |
+
extends Mage_Adminhtml_Block_System_Config_Form_Field {
|
10 |
|
11 |
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
|
12 |
$this->setElement($element);
|
15 |
->setType('button')->setClass('scalable go disabled')
|
16 |
->setLabel('Add New Rule')
|
17 |
->setOnClick('return false;')
|
18 |
+
->setTitle('Available in the Business Plan')
|
19 |
->toHtml();
|
20 |
return $html;
|
21 |
}
|
app/code/community/Temando/Temando/Block/Adminhtml/System/Config/Form/Button/Update.php
CHANGED
@@ -1,6 +1,13 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
|
6 |
$this->setElement($element);
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Form Button Update
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Block_Adminhtml_System_Config_Form_Button_Update
|
9 |
+
extends Mage_Adminhtml_Block_System_Config_Form_Field
|
10 |
+
{
|
11 |
|
12 |
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
|
13 |
$this->setElement($element);
|
app/code/community/Temando/Temando/Block/Adminhtml/System/Config/Form/Button/Warehouse.php
CHANGED
@@ -1,6 +1,13 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
|
6 |
$this->setElement($element);
|
@@ -9,7 +16,7 @@ class Temando_Temando_Block_Adminhtml_System_Config_Form_Button_Warehouse extend
|
|
9 |
->setType('button')->setClass('scalable go disabled')
|
10 |
->setLabel('Add New Warehouse')
|
11 |
->setOnClick('return false;')
|
12 |
-
->setTitle('Available in the
|
13 |
->toHtml();
|
14 |
return $html;
|
15 |
}
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Form Button Warehouse
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Block_Adminhtml_System_Config_Form_Button_Warehouse
|
9 |
+
extends Mage_Adminhtml_Block_System_Config_Form_Field
|
10 |
+
{
|
11 |
|
12 |
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) {
|
13 |
$this->setElement($element);
|
16 |
->setType('button')->setClass('scalable go disabled')
|
17 |
->setLabel('Add New Warehouse')
|
18 |
->setOnClick('return false;')
|
19 |
+
->setTitle('Available in the Business Plan')
|
20 |
->toHtml();
|
21 |
return $html;
|
22 |
}
|
app/code/community/Temando/Temando/Block/Adminhtml/System/Config/Form/Field/Insurance.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
protected $_confirm_text = array(
|
@@ -23,7 +29,9 @@ Whilst every effort has been made to insure your item, you should understand tha
|
|
23 |
|
24 |
- Motor Vehicles and boats (note, this does not mean car parts, which can be covered).
|
25 |
|
26 |
-
Please also note that the insurance only covers items where the origin address and the delivery address are both located in Australia. In other words, if you are sending your item to a country that is not Australia, then there is no insurance. Conversely, if you are resident in a country other than Australia, but sending the item to Australia the insurance will not apply either
|
|
|
|
|
27 |
<table style='padding-top: 10px;'><tr><td class='c1'>%mandatory_input%</td><td class='c2'>I confirm that I have read & understood the terms & conditions outlined in the <a href='http://www.temando.com/downloads/Product%20Disclosure%20Statement%20and%20Wording.pdf' target='_blank'>Product Disclosure Statement and wording</a>, the <a href='http://www.temando.com/downloads/Financial%20Services%20Guide.pdf' target='_blank'>Financial Services Guide</a> and the <a href='http://www.temando.com/downloads/Privacy%20Statement.pdf' target='_blank'>Privacy Statement</a> and will take advantage of this offer.</td></tr></table>",
|
28 |
"disabled" => "<div class='error-msg' style='height: 35px; border: 0 !important; background-color: transparent !important; padding-left: 33px; padding-top: 9px; color: #2F2F2F !important;'>Even though Insurance will be unavailable to your buyers, you may still insure shipments as a seller.</div>
|
29 |
<textarea style='height: 100px; width: 100%'>Athough every care is taken by the transport company whilst transporting and storing the item being transacted, it may still become lost or damaged.
|
@@ -44,7 +52,9 @@ Whilst every effort has been made to insure your item, you should understand tha
|
|
44 |
|
45 |
- Motor Vehicles and boats (note, this does not mean car parts, which can be covered).
|
46 |
|
47 |
-
Please also note that the insurance only covers items where the origin address and the delivery address are both located in Australia. In other words, if you are sending your item to a country that is not Australia, then there is no insurance. Conversely, if you are resident in a country other than Australia, but sending the item to Australia the insurance will not apply either
|
|
|
|
|
48 |
<table style='padding-top: 10px;'><tr><td class='c1'>%disabled_input%</td><td class='c2'>I confirm that I have read & understood the terms & conditions outlined in the <a href='http://www.temando.com/downloads/Product%20Disclosure%20Statement%20and%20Wording.pdf' target='_blank'>Product Disclosure Statement and wording</a>, the <a href='http://www.temando.com/downloads/Financial%20Services%20Guide.pdf' target='_blank'>Financial Services Guide</a> and the <a href='http://www.temando.com/downloads/Privacy%20Statement.pdf' target='_blank'>Privacy Statement</a> and will take advantage of this offer.</td></tr></table>",
|
49 |
);
|
50 |
|
@@ -80,5 +90,4 @@ Please also note that the insurance only covers items where the origin address a
|
|
80 |
|
81 |
return $return;
|
82 |
}
|
83 |
-
|
84 |
}
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Form Field Insurance
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Block_Adminhtml_System_Config_Form_Field_Insurance
|
9 |
+
extends Temando_Temando_Block_Adminhtml_System_Config_Form_Field_Required
|
10 |
{
|
11 |
|
12 |
protected $_confirm_text = array(
|
29 |
|
30 |
- Motor Vehicles and boats (note, this does not mean car parts, which can be covered).
|
31 |
|
32 |
+
Please also note that the insurance only covers items where the origin address and the delivery address are both located in Australia. In other words, if you are sending your item to a country that is not Australia, then there is no insurance. Conversely, if you are resident in a country other than Australia, but sending the item to Australia the insurance will not apply either.
|
33 |
+
|
34 |
+
Insurance is not currently available for clients using this extension in the US and UK regions.</textarea>
|
35 |
<table style='padding-top: 10px;'><tr><td class='c1'>%mandatory_input%</td><td class='c2'>I confirm that I have read & understood the terms & conditions outlined in the <a href='http://www.temando.com/downloads/Product%20Disclosure%20Statement%20and%20Wording.pdf' target='_blank'>Product Disclosure Statement and wording</a>, the <a href='http://www.temando.com/downloads/Financial%20Services%20Guide.pdf' target='_blank'>Financial Services Guide</a> and the <a href='http://www.temando.com/downloads/Privacy%20Statement.pdf' target='_blank'>Privacy Statement</a> and will take advantage of this offer.</td></tr></table>",
|
36 |
"disabled" => "<div class='error-msg' style='height: 35px; border: 0 !important; background-color: transparent !important; padding-left: 33px; padding-top: 9px; color: #2F2F2F !important;'>Even though Insurance will be unavailable to your buyers, you may still insure shipments as a seller.</div>
|
37 |
<textarea style='height: 100px; width: 100%'>Athough every care is taken by the transport company whilst transporting and storing the item being transacted, it may still become lost or damaged.
|
52 |
|
53 |
- Motor Vehicles and boats (note, this does not mean car parts, which can be covered).
|
54 |
|
55 |
+
Please also note that the insurance only covers items where the origin address and the delivery address are both located in Australia. In other words, if you are sending your item to a country that is not Australia, then there is no insurance. Conversely, if you are resident in a country other than Australia, but sending the item to Australia the insurance will not apply either.
|
56 |
+
|
57 |
+
Insurance is not currently available for clients using this extension in the US and UK regions.</textarea>
|
58 |
<table style='padding-top: 10px;'><tr><td class='c1'>%disabled_input%</td><td class='c2'>I confirm that I have read & understood the terms & conditions outlined in the <a href='http://www.temando.com/downloads/Product%20Disclosure%20Statement%20and%20Wording.pdf' target='_blank'>Product Disclosure Statement and wording</a>, the <a href='http://www.temando.com/downloads/Financial%20Services%20Guide.pdf' target='_blank'>Financial Services Guide</a> and the <a href='http://www.temando.com/downloads/Privacy%20Statement.pdf' target='_blank'>Privacy Statement</a> and will take advantage of this offer.</td></tr></table>",
|
59 |
);
|
60 |
|
90 |
|
91 |
return $return;
|
92 |
}
|
|
|
93 |
}
|
app/code/community/Temando/Temando/Block/Adminhtml/System/Config/Form/Field/Required.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
protected $_element;
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Form Field Required
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Block_Adminhtml_System_Config_Form_Field_Required
|
9 |
+
extends Mage_Adminhtml_Block_System_Config_Form_Field
|
10 |
{
|
11 |
|
12 |
protected $_element;
|
app/code/community/Temando/Temando/Block/Adminhtml/System/Config/Form/Fieldset/General.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
/**
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Form Fieldset General
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Block_Adminhtml_System_Config_Form_Fieldset_General
|
9 |
+
extends Mage_Adminhtml_Block_System_Config_Form_Fieldset
|
10 |
{
|
11 |
|
12 |
/**
|
app/code/community/Temando/Temando/Block/Cart/Shipping.php
CHANGED
@@ -1,9 +1,19 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
-
|
|
|
|
|
|
|
|
|
7 |
public function getCityActive()
|
8 |
{
|
9 |
return (bool)Mage::getStoreConfig('carriers/temando/active') || parent::getCityActive();
|
@@ -39,6 +49,11 @@ class Temando_Temando_Block_Cart_Shipping extends Mage_Checkout_Block_Cart_Shipp
|
|
39 |
return (bool)Mage::getStoreConfig('carriers/temando/active') || parent::isZipCodeRequired();
|
40 |
}
|
41 |
|
|
|
|
|
|
|
|
|
|
|
42 |
public function getEstimatePostcode()
|
43 |
{
|
44 |
$return = parent::getEstimatePostcode();
|
@@ -49,6 +64,11 @@ class Temando_Temando_Block_Cart_Shipping extends Mage_Checkout_Block_Cart_Shipp
|
|
49 |
return $return;
|
50 |
}
|
51 |
|
|
|
|
|
|
|
|
|
|
|
52 |
public function getEstimateCity()
|
53 |
{
|
54 |
$return = parent::getEstimateCity();
|
@@ -59,6 +79,11 @@ class Temando_Temando_Block_Cart_Shipping extends Mage_Checkout_Block_Cart_Shipp
|
|
59 |
return $return;
|
60 |
}
|
61 |
|
|
|
|
|
|
|
|
|
|
|
62 |
public function getEstimateRegionId()
|
63 |
{
|
64 |
$return = parent::getEstimateRegionId();
|
@@ -69,6 +94,11 @@ class Temando_Temando_Block_Cart_Shipping extends Mage_Checkout_Block_Cart_Shipp
|
|
69 |
return $return;
|
70 |
}
|
71 |
|
|
|
|
|
|
|
|
|
|
|
72 |
public function getEstimateRegion()
|
73 |
{
|
74 |
$return = parent::getEstimateRegion();
|
@@ -79,4 +109,30 @@ class Temando_Temando_Block_Cart_Shipping extends Mage_Checkout_Block_Cart_Shipp
|
|
79 |
return $return;
|
80 |
}
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
}
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Cart Shipping Block
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Block_Cart_Shipping
|
9 |
+
extends Mage_Checkout_Block_Cart_Shipping
|
10 |
{
|
11 |
|
12 |
+
/**
|
13 |
+
* Check if the city is active
|
14 |
+
*
|
15 |
+
* @return boolean
|
16 |
+
*/
|
17 |
public function getCityActive()
|
18 |
{
|
19 |
return (bool)Mage::getStoreConfig('carriers/temando/active') || parent::getCityActive();
|
49 |
return (bool)Mage::getStoreConfig('carriers/temando/active') || parent::isZipCodeRequired();
|
50 |
}
|
51 |
|
52 |
+
/**
|
53 |
+
* Get the estimate postcode
|
54 |
+
*
|
55 |
+
* @return string
|
56 |
+
*/
|
57 |
public function getEstimatePostcode()
|
58 |
{
|
59 |
$return = parent::getEstimatePostcode();
|
64 |
return $return;
|
65 |
}
|
66 |
|
67 |
+
/**
|
68 |
+
* Get the estimate city
|
69 |
+
*
|
70 |
+
* @return string
|
71 |
+
*/
|
72 |
public function getEstimateCity()
|
73 |
{
|
74 |
$return = parent::getEstimateCity();
|
79 |
return $return;
|
80 |
}
|
81 |
|
82 |
+
/**
|
83 |
+
* Get the estimate region id
|
84 |
+
*
|
85 |
+
* @return string
|
86 |
+
*/
|
87 |
public function getEstimateRegionId()
|
88 |
{
|
89 |
$return = parent::getEstimateRegionId();
|
94 |
return $return;
|
95 |
}
|
96 |
|
97 |
+
/**
|
98 |
+
* Get the estimate region
|
99 |
+
*
|
100 |
+
* @return string
|
101 |
+
*/
|
102 |
public function getEstimateRegion()
|
103 |
{
|
104 |
$return = parent::getEstimateRegion();
|
109 |
return $return;
|
110 |
}
|
111 |
|
112 |
+
/**
|
113 |
+
* Show location type selection to customer?
|
114 |
+
*
|
115 |
+
* @return boolean
|
116 |
+
*/
|
117 |
+
public function showLocationType()
|
118 |
+
{
|
119 |
+
$options = Mage::helper('temando')->getConfigData('checkout/delivery_options');
|
120 |
+
if (!$options) {
|
121 |
+
return false;
|
122 |
+
}
|
123 |
+
return Mage::helper('temando')->getConfigData('checkout/location_type');
|
124 |
+
}
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Return saved destination type as selected by customer
|
128 |
+
*
|
129 |
+
* @return string
|
130 |
+
*/
|
131 |
+
public function getDestinationType()
|
132 |
+
{
|
133 |
+
$destinationType = Mage::getSingleton('checkout/session')->getData('destination_type');
|
134 |
+
return $destinationType ?
|
135 |
+
$destinationType :
|
136 |
+
Temando_Temando_Model_Checkout_Delivery_Options::DESTINATION_RESIDENCE;
|
137 |
+
}
|
138 |
}
|
app/code/community/Temando/Temando/Block/Onepage/Shipping/Delivery/Options.php
ADDED
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Onepage Shipping Delivery Options
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Block_Onepage_Shipping_Delivery_Options
|
9 |
+
extends Mage_Checkout_Block_Onepage_Abstract
|
10 |
+
{
|
11 |
+
|
12 |
+
/**
|
13 |
+
* Delivery options enabled in system configuration for display in checkout
|
14 |
+
*
|
15 |
+
* @var array
|
16 |
+
*/
|
17 |
+
protected $_enabledOptions = null;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* Retrieve Temando system configuration value
|
21 |
+
*
|
22 |
+
* @param string $field The identifier of config entry
|
23 |
+
* @return mixed
|
24 |
+
*/
|
25 |
+
public function getConfigData($field)
|
26 |
+
{
|
27 |
+
return Mage::helper('temando')->getConfigData($field);
|
28 |
+
}
|
29 |
+
|
30 |
+
/**
|
31 |
+
* Show location type selection to customer?
|
32 |
+
*
|
33 |
+
* @return boolean
|
34 |
+
*/
|
35 |
+
public function showLocationType()
|
36 |
+
{
|
37 |
+
return $this->getConfigData('checkout/location_type');
|
38 |
+
}
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Show additional delivery options to customer?
|
42 |
+
*
|
43 |
+
* @return boolean
|
44 |
+
*/
|
45 |
+
public function showOptions()
|
46 |
+
{
|
47 |
+
return $this->getConfigData('checkout/delivery_options');
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Return saved destination type as selected by customer
|
52 |
+
*
|
53 |
+
* @return string
|
54 |
+
*/
|
55 |
+
public function getDestinationType()
|
56 |
+
{
|
57 |
+
$destinationType = Mage::getSingleton('checkout/session')->getData('destination_type');
|
58 |
+
return $destinationType ?
|
59 |
+
$destinationType :
|
60 |
+
Temando_Temando_Model_Checkout_Delivery_Options::DESTINATION_RESIDENCE;
|
61 |
+
}
|
62 |
+
|
63 |
+
/**
|
64 |
+
* Returns enabled checkout options
|
65 |
+
*
|
66 |
+
* @return array
|
67 |
+
*/
|
68 |
+
public function getEnabledOptions()
|
69 |
+
{
|
70 |
+
if (!$this->_enabledOptions) {
|
71 |
+
$this->_enabledOptions = Mage::getModel('temando/checkout_delivery_options')->getEnabledOptions();
|
72 |
+
}
|
73 |
+
return $this->_enabledOptions;
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Returns customer selected delivery options
|
78 |
+
*
|
79 |
+
* @return array Customer selected options
|
80 |
+
*/
|
81 |
+
public function getSelectedOptions()
|
82 |
+
{
|
83 |
+
$selected = Mage::getSingleton('checkout/session')->getData('selected_delivery_options');
|
84 |
+
if (!is_array($selected)) {
|
85 |
+
$selected = array();
|
86 |
+
}
|
87 |
+
return $selected;
|
88 |
+
}
|
89 |
+
}
|
app/code/community/Temando/Temando/Block/Onepage/Shipping/Method/Available.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Block_Onepage_Shipping_Method_Available
|
4 |
extends Mage_Checkout_Block_Onepage_Shipping_Method_Available
|
5 |
{
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Onepage Shipping Method Available
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Block_Onepage_Shipping_Method_Available
|
9 |
extends Mage_Checkout_Block_Onepage_Shipping_Method_Available
|
10 |
{
|
app/code/community/Temando/Temando/Block/Onepage/Shipping/Method/Available/Single.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
/**
|
6 |
* One shipping method only?
|
@@ -9,6 +15,9 @@ class Temando_Temando_Block_Onepage_Shipping_Method_Available_Single extends Tem
|
|
9 |
*/
|
10 |
public function getSole()
|
11 |
{
|
|
|
|
|
|
|
12 |
$groups = $this->getShippingRates();
|
13 |
if(count($groups) == 1) {
|
14 |
$rates = array_pop($groups);
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Onepage Shipping Method Available Single
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Block_Onepage_Shipping_Method_Available_Single
|
9 |
+
extends Temando_Temando_Block_Onepage_Shipping_Method_Available
|
10 |
{
|
11 |
/**
|
12 |
* One shipping method only?
|
15 |
*/
|
16 |
public function getSole()
|
17 |
{
|
18 |
+
// by default the following will return false. remove the
|
19 |
+
// line below to actually check if it is the only method
|
20 |
+
return false;
|
21 |
$groups = $this->getShippingRates();
|
22 |
if(count($groups) == 1) {
|
23 |
$rates = array_pop($groups);
|
app/code/community/Temando/Temando/Block/Product/Shipping.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Block_Product_Shipping extends Mage_Core_Block_Template
|
4 |
{
|
5 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Product Shipping
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Block_Product_Shipping extends Mage_Core_Block_Template
|
9 |
{
|
10 |
|
app/code/community/Temando/Temando/Block/Product/Shipping/Methods.php
CHANGED
@@ -1,6 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
4 |
class Temando_Temando_Block_Product_Shipping_Methods extends Mage_Core_Block_Template
|
5 |
{
|
6 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Product Shipping Methods
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Block_Product_Shipping_Methods extends Mage_Core_Block_Template
|
9 |
{
|
10 |
|
app/code/community/Temando/Temando/Block/Wizard/Html.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
public function __construct() {
|
6 |
parent::__construct();
|
@@ -11,7 +17,8 @@ class Temando_Temando_Block_Wizard_Html extends Mage_Install_Block_Abstract {
|
|
11 |
* @param string $type
|
12 |
* @return string
|
13 |
*/
|
14 |
-
public function getHtmlSelect($type)
|
|
|
15 |
$select = $this->getSelectOptions($type);
|
16 |
$html = $this->getLayout()->createBlock('core/html_select')
|
17 |
->setExtraParams($select['extraParams'])
|
@@ -29,7 +36,8 @@ class Temando_Temando_Block_Wizard_Html extends Mage_Install_Block_Abstract {
|
|
29 |
* Gets Temando Account mode options
|
30 |
* @return array
|
31 |
*/
|
32 |
-
public function modeOptions()
|
|
|
33 |
$mode = array(
|
34 |
array(
|
35 |
'value' => 0,
|
@@ -43,10 +51,11 @@ class Temando_Temando_Block_Wizard_Html extends Mage_Install_Block_Abstract {
|
|
43 |
}
|
44 |
|
45 |
/**
|
46 |
-
* Gets Temando Fragile options
|
47 |
* @return array
|
48 |
*/
|
49 |
-
public function yesNoOptions()
|
|
|
50 |
$yesno = array(
|
51 |
array(
|
52 |
'value' => 0,
|
@@ -63,7 +72,8 @@ class Temando_Temando_Block_Wizard_Html extends Mage_Install_Block_Abstract {
|
|
63 |
* Gets Temando Account Payment options
|
64 |
* @return array
|
65 |
*/
|
66 |
-
public function paymentOptions()
|
|
|
67 |
$payment = array(
|
68 |
array(
|
69 |
'value' => 'Credit',
|
@@ -80,7 +90,8 @@ class Temando_Temando_Block_Wizard_Html extends Mage_Install_Block_Abstract {
|
|
80 |
* Gets Allowed or Specific Country options
|
81 |
* @return array
|
82 |
*/
|
83 |
-
public function allowedCountryOptions()
|
|
|
84 |
$country = array(
|
85 |
array(
|
86 |
'value' => 0,
|
@@ -97,7 +108,8 @@ class Temando_Temando_Block_Wizard_Html extends Mage_Install_Block_Abstract {
|
|
97 |
* Gets Temando Rule Type options
|
98 |
* @return string
|
99 |
*/
|
100 |
-
public function ruleTypeOptions()
|
|
|
101 |
$options = Mage::getModel('temando/system_config_source_pricing')->getOptions();
|
102 |
return $options;
|
103 |
}
|
@@ -108,7 +120,8 @@ class Temando_Temando_Block_Wizard_Html extends Mage_Install_Block_Abstract {
|
|
108 |
* @param string $key
|
109 |
* @return null
|
110 |
*/
|
111 |
-
public function getTmdSession($name, $key)
|
|
|
112 |
$session = Mage::getSingleton('core/session')->getData($name);
|
113 |
if (is_array($session)) {
|
114 |
if (array_key_exists($key, $session)) {
|
@@ -126,17 +139,19 @@ class Temando_Temando_Block_Wizard_Html extends Mage_Install_Block_Abstract {
|
|
126 |
* @param string $field
|
127 |
* @return string
|
128 |
*/
|
129 |
-
public function getCarrierData($field)
|
|
|
130 |
$path = 'carriers/temando/' . $field;
|
131 |
return Mage::getStoreConfig($path);
|
132 |
}
|
133 |
-
|
134 |
/**
|
135 |
* Gets Temando Carrier Data in Array
|
136 |
* @param string $field
|
137 |
* @return string
|
138 |
*/
|
139 |
-
public function getCarrierDataArray($field)
|
|
|
140 |
$values = explode(',', Mage::getStoreConfig('carriers/temando/' . $field));
|
141 |
return $values;
|
142 |
}
|
@@ -145,7 +160,8 @@ class Temando_Temando_Block_Wizard_Html extends Mage_Install_Block_Abstract {
|
|
145 |
* Gets current admin url
|
146 |
* @return string
|
147 |
*/
|
148 |
-
public function getCancelUrl()
|
|
|
149 |
return Mage::getSingleton('core/session')->getTemandoCancelUrl();
|
150 |
}
|
151 |
|
@@ -154,7 +170,8 @@ class Temando_Temando_Block_Wizard_Html extends Mage_Install_Block_Abstract {
|
|
154 |
* @param string $type
|
155 |
* @return array
|
156 |
*/
|
157 |
-
protected function getSelectOptions($type)
|
|
|
158 |
$types = array(
|
159 |
'mode' => array(
|
160 |
'extraParams' => '',
|
@@ -267,5 +284,4 @@ class Temando_Temando_Block_Wizard_Html extends Mage_Install_Block_Abstract {
|
|
267 |
);
|
268 |
return $types[$type];
|
269 |
}
|
270 |
-
|
271 |
}
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Wizard Html
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Block_Wizard_Html extends Mage_Install_Block_Abstract
|
9 |
+
{
|
10 |
|
11 |
public function __construct() {
|
12 |
parent::__construct();
|
17 |
* @param string $type
|
18 |
* @return string
|
19 |
*/
|
20 |
+
public function getHtmlSelect($type)
|
21 |
+
{
|
22 |
$select = $this->getSelectOptions($type);
|
23 |
$html = $this->getLayout()->createBlock('core/html_select')
|
24 |
->setExtraParams($select['extraParams'])
|
36 |
* Gets Temando Account mode options
|
37 |
* @return array
|
38 |
*/
|
39 |
+
public function modeOptions()
|
40 |
+
{
|
41 |
$mode = array(
|
42 |
array(
|
43 |
'value' => 0,
|
51 |
}
|
52 |
|
53 |
/**
|
54 |
+
* Gets Temando Fragile options
|
55 |
* @return array
|
56 |
*/
|
57 |
+
public function yesNoOptions()
|
58 |
+
{
|
59 |
$yesno = array(
|
60 |
array(
|
61 |
'value' => 0,
|
72 |
* Gets Temando Account Payment options
|
73 |
* @return array
|
74 |
*/
|
75 |
+
public function paymentOptions()
|
76 |
+
{
|
77 |
$payment = array(
|
78 |
array(
|
79 |
'value' => 'Credit',
|
90 |
* Gets Allowed or Specific Country options
|
91 |
* @return array
|
92 |
*/
|
93 |
+
public function allowedCountryOptions()
|
94 |
+
{
|
95 |
$country = array(
|
96 |
array(
|
97 |
'value' => 0,
|
108 |
* Gets Temando Rule Type options
|
109 |
* @return string
|
110 |
*/
|
111 |
+
public function ruleTypeOptions()
|
112 |
+
{
|
113 |
$options = Mage::getModel('temando/system_config_source_pricing')->getOptions();
|
114 |
return $options;
|
115 |
}
|
120 |
* @param string $key
|
121 |
* @return null
|
122 |
*/
|
123 |
+
public function getTmdSession($name, $key)
|
124 |
+
{
|
125 |
$session = Mage::getSingleton('core/session')->getData($name);
|
126 |
if (is_array($session)) {
|
127 |
if (array_key_exists($key, $session)) {
|
139 |
* @param string $field
|
140 |
* @return string
|
141 |
*/
|
142 |
+
public function getCarrierData($field)
|
143 |
+
{
|
144 |
$path = 'carriers/temando/' . $field;
|
145 |
return Mage::getStoreConfig($path);
|
146 |
}
|
147 |
+
|
148 |
/**
|
149 |
* Gets Temando Carrier Data in Array
|
150 |
* @param string $field
|
151 |
* @return string
|
152 |
*/
|
153 |
+
public function getCarrierDataArray($field)
|
154 |
+
{
|
155 |
$values = explode(',', Mage::getStoreConfig('carriers/temando/' . $field));
|
156 |
return $values;
|
157 |
}
|
160 |
* Gets current admin url
|
161 |
* @return string
|
162 |
*/
|
163 |
+
public function getCancelUrl()
|
164 |
+
{
|
165 |
return Mage::getSingleton('core/session')->getTemandoCancelUrl();
|
166 |
}
|
167 |
|
170 |
* @param string $type
|
171 |
* @return array
|
172 |
*/
|
173 |
+
protected function getSelectOptions($type)
|
174 |
+
{
|
175 |
$types = array(
|
176 |
'mode' => array(
|
177 |
'extraParams' => '',
|
284 |
);
|
285 |
return $types[$type];
|
286 |
}
|
|
|
287 |
}
|
app/code/community/Temando/Temando/Helper/Data.php
CHANGED
@@ -1,29 +1,28 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Helper_Data extends Mage_Core_Helper_Abstract {
|
4 |
|
5 |
const DEFAULT_WAREHOUSE_NAME = 'Magento Warehouse';
|
6 |
-
|
7 |
const DEFAULT_CURRENCY_CODE = 'AUD';
|
8 |
-
|
9 |
const DEFAULT_COUNTRY_ID = 'AU';
|
10 |
-
|
11 |
private $_temandoAttributes = array(
|
12 |
'temando_packaging_mode',
|
13 |
'temando_packaging',
|
14 |
'temando_fragile',
|
|
|
15 |
'temando_length',
|
16 |
'temando_width',
|
17 |
'temando_height'
|
18 |
);
|
19 |
|
20 |
-
protected $_allowedCountries = array(
|
21 |
-
'AU' => 'Australia',
|
22 |
-
'NZ' => 'New Zealand',
|
23 |
-
'GB' => 'United Kingdom',
|
24 |
-
'US' => 'United States'
|
25 |
-
);
|
26 |
-
|
27 |
/**
|
28 |
* Returns default weight unit
|
29 |
*/
|
@@ -31,15 +30,15 @@ class Temando_Temando_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
31 |
{
|
32 |
return Temando_Temando_Model_System_Config_Source_Unit_Weight::KILOGRAMS;
|
33 |
}
|
34 |
-
|
35 |
/**
|
36 |
* Returns default distance unit
|
37 |
*/
|
38 |
-
public function getDefaultDistanceUnit()
|
39 |
{
|
40 |
return Temando_Temando_Model_System_Config_Source_Unit_Measure::CENTIMETRES;
|
41 |
}
|
42 |
-
|
43 |
/**
|
44 |
* Returns default currency code
|
45 |
*/
|
@@ -47,7 +46,7 @@ class Temando_Temando_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
47 |
{
|
48 |
return self::DEFAULT_CURRENCY_CODE;
|
49 |
}
|
50 |
-
|
51 |
/**
|
52 |
* Returns default country id
|
53 |
*/
|
@@ -55,48 +54,68 @@ class Temando_Temando_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
55 |
{
|
56 |
return self::DEFAULT_COUNTRY_ID;
|
57 |
}
|
58 |
-
|
59 |
|
60 |
/**
|
61 |
* Retrieves an element from the module configuration data.
|
62 |
*
|
63 |
* @param string $field
|
64 |
*/
|
65 |
-
public function getConfigData($field)
|
|
|
66 |
$path = 'temando/' . $field;
|
67 |
return Mage::getStoreConfig($path);
|
68 |
}
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
/**
|
71 |
* Returns array of allowed countries based on Magento system configuration
|
72 |
* and Temando plugin allowed countries.
|
73 |
-
*
|
74 |
* @param boolean $asJson
|
75 |
* @return array
|
76 |
*/
|
77 |
-
public function getAllowedCountries($asJson = false)
|
|
|
78 |
$specific = Mage::getStoreConfig('carriers/temando/sallowspecific');
|
79 |
//check if all allowed and return selected
|
80 |
-
|
81 |
$availableCountries = explode(',', Mage::getStoreConfig('carriers/temando/specificcountry'));
|
82 |
-
|
83 |
-
|
84 |
return Mage::helper('core')->jsonEncode($countries);
|
85 |
} else {
|
86 |
return $countries;
|
87 |
-
}
|
88 |
}
|
89 |
//return all allowed
|
90 |
-
|
91 |
-
|
|
|
|
|
92 |
} else {
|
93 |
-
|
94 |
}
|
95 |
}
|
96 |
-
|
97 |
/**
|
98 |
* Applies Temando attributes to sales quote item object
|
99 |
-
*
|
100 |
* @param Mage_Sales_Model_Order_Item $item
|
101 |
*/
|
102 |
public function applyTemandoParamsToItem($item)
|
@@ -106,12 +125,12 @@ class Temando_Temando_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
106 |
$item->setData($key, $val);
|
107 |
}
|
108 |
}
|
109 |
-
|
110 |
/**
|
111 |
* Returns values for Temando specific product attributes. Currently handles simple
|
112 |
* and configurable products only. Default attribute values from configuration are
|
113 |
* returned if product temando retrieval mode is set to 'Use Defaults'
|
114 |
-
*
|
115 |
* @param Mage_Sales_Model_Order_Item $item
|
116 |
* @param Mage_Catalog_Model_Product $product
|
117 |
* @return array Temando specific product attributes
|
@@ -175,7 +194,8 @@ class Temando_Temando_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
175 |
* @param <type> $ready_time timestamp for when the package will be ready
|
176 |
* to ship, defaults to 10 days from current date
|
177 |
*/
|
178 |
-
public function getReadyDate($ready_time = NULL)
|
|
|
179 |
if (is_null($ready_time)) {
|
180 |
$ready_time = strtotime('+10 days');
|
181 |
}
|
@@ -191,18 +211,19 @@ class Temando_Temando_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
191 |
/**
|
192 |
* Gets selected simple product from configurable
|
193 |
* (using the fact that getSku() on item returns selected simple product sku)
|
194 |
-
*
|
195 |
* @param Mage_Sales_Model_Order_Item $item
|
196 |
* @return Mage_Catalog_Model_Product
|
197 |
*/
|
198 |
-
public function getSelectedSimpleProductFromConfigurable($item)
|
|
|
199 |
$simpleProductId = Mage::getModel('catalog/product')->getIdBySku($item->getSku());
|
200 |
return Mage::getModel('catalog/product')->load($simpleProductId);
|
201 |
}
|
202 |
-
|
203 |
/**
|
204 |
* Retrieve Default Temando Product Attributes from Configuration
|
205 |
-
*
|
206 |
* @return array
|
207 |
*/
|
208 |
public function getDefaultTemandoAttributes()
|
@@ -211,15 +232,16 @@ class Temando_Temando_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
211 |
'temando_packaging_mode' => 0, //defaults
|
212 |
'temando_packaging' => $this->getConfigData('defaults/packaging'),
|
213 |
'temando_fragile' => $this->getConfigData('defaults/fragile'),
|
|
|
214 |
'temando_length' => (float)$this->getConfigData('defaults/length'),
|
215 |
'temando_width' => (float)$this->getConfigData('defaults/width'),
|
216 |
'temando_height' => (float)$this->getConfigData('defaults/height'),
|
217 |
);
|
218 |
}
|
219 |
-
|
220 |
/**
|
221 |
* Converts given weight from configured unit to grams
|
222 |
-
*
|
223 |
* @param float $value Weight to convert
|
224 |
* @param string $currentUnit Current weight unit
|
225 |
* @return float Converted weight in grams
|
@@ -232,22 +254,22 @@ class Temando_Temando_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
232 |
switch($currentUnit) {
|
233 |
case Temando_Temando_Model_System_Config_Source_Unit_Weight::KILOGRAMS:
|
234 |
return $value * 1000; break;
|
235 |
-
|
236 |
-
case Temando_Temando_Model_System_Config_Source_Unit_Weight::OUNCES:
|
237 |
return $value * 28.3495; break;
|
238 |
-
|
239 |
-
case Temando_Temando_Model_System_Config_Source_Unit_Weight::POUNDS:
|
240 |
return $value * 453.592; break;
|
241 |
-
|
242 |
default: return $value; break;
|
243 |
}
|
244 |
}
|
245 |
-
|
246 |
/**
|
247 |
* Converts given distance from configured unit to centimetres
|
248 |
-
*
|
249 |
* @param float $value Distance to convert
|
250 |
-
* @param string $currentUnit Current measure unit
|
251 |
* @return float Converted distance in centimetres
|
252 |
*/
|
253 |
public function getDistanceInCentimetres($value, $currentUnit = null)
|
@@ -257,33 +279,35 @@ class Temando_Temando_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
257 |
switch($currentUnit) {
|
258 |
case Temando_Temando_Model_System_Config_Source_Unit_Measure::METRES:
|
259 |
return $value * 100; break;
|
260 |
-
|
261 |
case Temando_Temando_Model_System_Config_Source_Unit_Measure::FEET:
|
262 |
return $value * 30.48; break;
|
263 |
-
|
264 |
case Temando_Temando_Model_System_Config_Source_Unit_Measure::INCHES:
|
265 |
return $value * 2.54; break;
|
266 |
-
|
267 |
default: return $value; break;
|
268 |
}
|
269 |
}
|
270 |
|
271 |
/**
|
272 |
* Returns Client ID from system configuration
|
273 |
-
*
|
274 |
* @return string
|
275 |
*/
|
276 |
-
public function getClientId()
|
|
|
277 |
return $this->getConfigData('general/client');
|
278 |
}
|
279 |
|
280 |
/**
|
281 |
* Retrieves cached address validation results
|
282 |
-
*
|
283 |
* @param string $words
|
284 |
* @return array of results or false if no cache
|
285 |
*/
|
286 |
-
public function getSuggestionsCache($words)
|
|
|
287 |
if (is_file($this->getFileCacheByWords($words))) {
|
288 |
return file_get_contents($this->getFileCacheByWords($words));
|
289 |
}
|
@@ -293,25 +317,27 @@ class Temando_Temando_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
293 |
|
294 |
/**
|
295 |
* Returns path to the cache file
|
296 |
-
*
|
297 |
* @param string $words
|
298 |
* @return string
|
299 |
*/
|
300 |
-
public function getFileCacheByWords($words)
|
|
|
301 |
$key = md5(strtolower(join('_', $words)));
|
302 |
$path = Mage::getBaseDir('cache');
|
303 |
return $path . DS . 'temando' . DS . $key[0] . DS . $key[1] . DS . $key . '.cache';
|
304 |
}
|
305 |
|
306 |
/**
|
307 |
-
* Register cached results
|
308 |
* (saves results into a cache file or removes file if results empty)
|
309 |
-
*
|
310 |
* @param string $words
|
311 |
* @param string $value
|
312 |
* @return void
|
313 |
*/
|
314 |
-
public function setSuggestionsCache($words, $value)
|
|
|
315 |
if (strlen(join(' ', $words)) > 4) {
|
316 |
return;
|
317 |
}
|
@@ -338,7 +364,8 @@ class Temando_Temando_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
338 |
* Returns region name saved in customers session
|
339 |
* @return string|null
|
340 |
*/
|
341 |
-
public function getSessionRegion()
|
|
|
342 |
$data = Mage::getSingleton('customer/session')->getData('estimate_product_shipping');
|
343 |
if ($data) {
|
344 |
return Mage::getModel('directory/region')->load($data['region_id'])->getName();
|
@@ -351,7 +378,8 @@ class Temando_Temando_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
351 |
* Returns city name saved in customers session
|
352 |
* @return string|null
|
353 |
*/
|
354 |
-
public function getSessionCity()
|
|
|
355 |
$data = Mage::getSingleton('customer/session')->getData('estimate_product_shipping');
|
356 |
if ($data) {
|
357 |
return $data['city'];
|
@@ -364,7 +392,8 @@ class Temando_Temando_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
364 |
* Returns postal code saved in customers session
|
365 |
* @return string|null
|
366 |
*/
|
367 |
-
public function getSessionPostcode()
|
|
|
368 |
$data = Mage::getSingleton('customer/session')->getData('estimate_product_shipping');
|
369 |
if ($data) {
|
370 |
return $data['postcode'];
|
@@ -377,7 +406,8 @@ class Temando_Temando_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
377 |
* Returns id of the region saved in customers session
|
378 |
* @return int|null
|
379 |
*/
|
380 |
-
public function getSessionRegionId()
|
|
|
381 |
$data = Mage::getSingleton('customer/session')->getData('estimate_product_shipping');
|
382 |
if ($data) {
|
383 |
return $data['region_id'];
|
@@ -388,21 +418,23 @@ class Temando_Temando_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
388 |
|
389 |
/**
|
390 |
* Return list of available origin locations
|
391 |
-
*
|
392 |
* @return array
|
393 |
*/
|
394 |
-
public function getLocationList()
|
|
|
395 |
return array(
|
396 |
self::DEFAULT_WAREHOUSE_NAME => self::DEFAULT_WAREHOUSE_NAME
|
397 |
);
|
398 |
}
|
399 |
-
|
400 |
/**
|
401 |
* Returns location create/update request array
|
402 |
-
*
|
403 |
* @return array
|
404 |
*/
|
405 |
-
public function getOriginRequestArray(Varien_Object $data)
|
|
|
406 |
return array(
|
407 |
'description' => self::DEFAULT_WAREHOUSE_NAME,
|
408 |
'type' => 'Origin',
|
@@ -427,11 +459,12 @@ class Temando_Temando_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
427 |
|
428 |
/**
|
429 |
* Returns true if street address is a PO Box
|
430 |
-
*
|
431 |
* @param string $street
|
432 |
-
* @return boolean
|
433 |
*/
|
434 |
-
public function isStreetWithPO($street)
|
|
|
435 |
if (!is_string($street)) {
|
436 |
return false;
|
437 |
}
|
@@ -453,11 +486,12 @@ class Temando_Temando_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
453 |
/**
|
454 |
* Returns true if shipping quote is dynamic quote obtained
|
455 |
* from Temando API
|
456 |
-
*
|
457 |
* @param int $quote_id
|
458 |
* @return boolean
|
459 |
*/
|
460 |
-
public function isQuoteDynamic($quote_id)
|
|
|
461 |
$fixed_carriers = array(
|
462 |
Temando_Temando_Model_Carrier::FLAT_RATE,
|
463 |
Temando_Temando_Model_Carrier::FREE,
|
@@ -466,13 +500,13 @@ class Temando_Temando_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
466 |
if (in_array($quote_id, $fixed_carriers)) {
|
467 |
return false;
|
468 |
}
|
469 |
-
|
470 |
return true;
|
471 |
}
|
472 |
-
|
473 |
/**
|
474 |
* Creates a sales quote based on current ship request
|
475 |
-
*
|
476 |
* @param Mage_Shipping_Model_Rate_Request $request
|
477 |
* @return Mage_Sales_Model_Quote
|
478 |
*/
|
@@ -496,5 +530,4 @@ class Temando_Temando_Helper_Data extends Mage_Core_Helper_Abstract {
|
|
496 |
$quote->collectTotals();
|
497 |
return $quote;
|
498 |
}
|
499 |
-
|
500 |
-
}
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Temando Helper Data
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Helper_Data extends Mage_Core_Helper_Abstract {
|
9 |
|
10 |
const DEFAULT_WAREHOUSE_NAME = 'Magento Warehouse';
|
11 |
+
|
12 |
const DEFAULT_CURRENCY_CODE = 'AUD';
|
13 |
+
|
14 |
const DEFAULT_COUNTRY_ID = 'AU';
|
15 |
+
|
16 |
private $_temandoAttributes = array(
|
17 |
'temando_packaging_mode',
|
18 |
'temando_packaging',
|
19 |
'temando_fragile',
|
20 |
+
'temando_dangerous',
|
21 |
'temando_length',
|
22 |
'temando_width',
|
23 |
'temando_height'
|
24 |
);
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
/**
|
27 |
* Returns default weight unit
|
28 |
*/
|
30 |
{
|
31 |
return Temando_Temando_Model_System_Config_Source_Unit_Weight::KILOGRAMS;
|
32 |
}
|
33 |
+
|
34 |
/**
|
35 |
* Returns default distance unit
|
36 |
*/
|
37 |
+
public function getDefaultDistanceUnit()
|
38 |
{
|
39 |
return Temando_Temando_Model_System_Config_Source_Unit_Measure::CENTIMETRES;
|
40 |
}
|
41 |
+
|
42 |
/**
|
43 |
* Returns default currency code
|
44 |
*/
|
46 |
{
|
47 |
return self::DEFAULT_CURRENCY_CODE;
|
48 |
}
|
49 |
+
|
50 |
/**
|
51 |
* Returns default country id
|
52 |
*/
|
54 |
{
|
55 |
return self::DEFAULT_COUNTRY_ID;
|
56 |
}
|
57 |
+
|
58 |
|
59 |
/**
|
60 |
* Retrieves an element from the module configuration data.
|
61 |
*
|
62 |
* @param string $field
|
63 |
*/
|
64 |
+
public function getConfigData($field)
|
65 |
+
{
|
66 |
$path = 'temando/' . $field;
|
67 |
return Mage::getStoreConfig($path);
|
68 |
}
|
69 |
|
70 |
+
/**
|
71 |
+
* Returns an array of all Magento countries
|
72 |
+
*
|
73 |
+
* @return array
|
74 |
+
*/
|
75 |
+
public function getAllCountries()
|
76 |
+
{
|
77 |
+
$countries = array();
|
78 |
+
$countryCollection = Mage::getModel('directory/country')->getCollection();
|
79 |
+
foreach ($countryCollection as $country) {
|
80 |
+
/* @var $country Mage_Directory_Model_Country */
|
81 |
+
$countries[$country->getId()] = $country->getName();
|
82 |
+
}
|
83 |
+
return $countries;
|
84 |
+
}
|
85 |
+
|
86 |
/**
|
87 |
* Returns array of allowed countries based on Magento system configuration
|
88 |
* and Temando plugin allowed countries.
|
89 |
+
*
|
90 |
* @param boolean $asJson
|
91 |
* @return array
|
92 |
*/
|
93 |
+
public function getAllowedCountries($asJson = false)
|
94 |
+
{
|
95 |
$specific = Mage::getStoreConfig('carriers/temando/sallowspecific');
|
96 |
//check if all allowed and return selected
|
97 |
+
if ($specific == 1) {
|
98 |
$availableCountries = explode(',', Mage::getStoreConfig('carriers/temando/specificcountry'));
|
99 |
+
$countries = array_intersect_key($this->getAllCountries(), array_flip($availableCountries));
|
100 |
+
if ($asJson) {
|
101 |
return Mage::helper('core')->jsonEncode($countries);
|
102 |
} else {
|
103 |
return $countries;
|
104 |
+
}
|
105 |
}
|
106 |
//return all allowed
|
107 |
+
$availableCountries = explode(',', Mage::getStoreConfig('general/country/allow'));
|
108 |
+
$countries = array_intersect_key($this->getAllCountries(), array_flip($availableCountries));
|
109 |
+
if ($asJson) {
|
110 |
+
return Mage::helper('core')->jsonEncode($countries);
|
111 |
} else {
|
112 |
+
return $countries;
|
113 |
}
|
114 |
}
|
115 |
+
|
116 |
/**
|
117 |
* Applies Temando attributes to sales quote item object
|
118 |
+
*
|
119 |
* @param Mage_Sales_Model_Order_Item $item
|
120 |
*/
|
121 |
public function applyTemandoParamsToItem($item)
|
125 |
$item->setData($key, $val);
|
126 |
}
|
127 |
}
|
128 |
+
|
129 |
/**
|
130 |
* Returns values for Temando specific product attributes. Currently handles simple
|
131 |
* and configurable products only. Default attribute values from configuration are
|
132 |
* returned if product temando retrieval mode is set to 'Use Defaults'
|
133 |
+
*
|
134 |
* @param Mage_Sales_Model_Order_Item $item
|
135 |
* @param Mage_Catalog_Model_Product $product
|
136 |
* @return array Temando specific product attributes
|
194 |
* @param <type> $ready_time timestamp for when the package will be ready
|
195 |
* to ship, defaults to 10 days from current date
|
196 |
*/
|
197 |
+
public function getReadyDate($ready_time = NULL)
|
198 |
+
{
|
199 |
if (is_null($ready_time)) {
|
200 |
$ready_time = strtotime('+10 days');
|
201 |
}
|
211 |
/**
|
212 |
* Gets selected simple product from configurable
|
213 |
* (using the fact that getSku() on item returns selected simple product sku)
|
214 |
+
*
|
215 |
* @param Mage_Sales_Model_Order_Item $item
|
216 |
* @return Mage_Catalog_Model_Product
|
217 |
*/
|
218 |
+
public function getSelectedSimpleProductFromConfigurable($item)
|
219 |
+
{
|
220 |
$simpleProductId = Mage::getModel('catalog/product')->getIdBySku($item->getSku());
|
221 |
return Mage::getModel('catalog/product')->load($simpleProductId);
|
222 |
}
|
223 |
+
|
224 |
/**
|
225 |
* Retrieve Default Temando Product Attributes from Configuration
|
226 |
+
*
|
227 |
* @return array
|
228 |
*/
|
229 |
public function getDefaultTemandoAttributes()
|
232 |
'temando_packaging_mode' => 0, //defaults
|
233 |
'temando_packaging' => $this->getConfigData('defaults/packaging'),
|
234 |
'temando_fragile' => $this->getConfigData('defaults/fragile'),
|
235 |
+
'temando_dangerous' => $this->getConfigData('defaults/dangerous'),
|
236 |
'temando_length' => (float)$this->getConfigData('defaults/length'),
|
237 |
'temando_width' => (float)$this->getConfigData('defaults/width'),
|
238 |
'temando_height' => (float)$this->getConfigData('defaults/height'),
|
239 |
);
|
240 |
}
|
241 |
+
|
242 |
/**
|
243 |
* Converts given weight from configured unit to grams
|
244 |
+
*
|
245 |
* @param float $value Weight to convert
|
246 |
* @param string $currentUnit Current weight unit
|
247 |
* @return float Converted weight in grams
|
254 |
switch($currentUnit) {
|
255 |
case Temando_Temando_Model_System_Config_Source_Unit_Weight::KILOGRAMS:
|
256 |
return $value * 1000; break;
|
257 |
+
|
258 |
+
case Temando_Temando_Model_System_Config_Source_Unit_Weight::OUNCES:
|
259 |
return $value * 28.3495; break;
|
260 |
+
|
261 |
+
case Temando_Temando_Model_System_Config_Source_Unit_Weight::POUNDS:
|
262 |
return $value * 453.592; break;
|
263 |
+
|
264 |
default: return $value; break;
|
265 |
}
|
266 |
}
|
267 |
+
|
268 |
/**
|
269 |
* Converts given distance from configured unit to centimetres
|
270 |
+
*
|
271 |
* @param float $value Distance to convert
|
272 |
+
* @param string $currentUnit Current measure unit
|
273 |
* @return float Converted distance in centimetres
|
274 |
*/
|
275 |
public function getDistanceInCentimetres($value, $currentUnit = null)
|
279 |
switch($currentUnit) {
|
280 |
case Temando_Temando_Model_System_Config_Source_Unit_Measure::METRES:
|
281 |
return $value * 100; break;
|
282 |
+
|
283 |
case Temando_Temando_Model_System_Config_Source_Unit_Measure::FEET:
|
284 |
return $value * 30.48; break;
|
285 |
+
|
286 |
case Temando_Temando_Model_System_Config_Source_Unit_Measure::INCHES:
|
287 |
return $value * 2.54; break;
|
288 |
+
|
289 |
default: return $value; break;
|
290 |
}
|
291 |
}
|
292 |
|
293 |
/**
|
294 |
* Returns Client ID from system configuration
|
295 |
+
*
|
296 |
* @return string
|
297 |
*/
|
298 |
+
public function getClientId()
|
299 |
+
{
|
300 |
return $this->getConfigData('general/client');
|
301 |
}
|
302 |
|
303 |
/**
|
304 |
* Retrieves cached address validation results
|
305 |
+
*
|
306 |
* @param string $words
|
307 |
* @return array of results or false if no cache
|
308 |
*/
|
309 |
+
public function getSuggestionsCache($words)
|
310 |
+
{
|
311 |
if (is_file($this->getFileCacheByWords($words))) {
|
312 |
return file_get_contents($this->getFileCacheByWords($words));
|
313 |
}
|
317 |
|
318 |
/**
|
319 |
* Returns path to the cache file
|
320 |
+
*
|
321 |
* @param string $words
|
322 |
* @return string
|
323 |
*/
|
324 |
+
public function getFileCacheByWords($words)
|
325 |
+
{
|
326 |
$key = md5(strtolower(join('_', $words)));
|
327 |
$path = Mage::getBaseDir('cache');
|
328 |
return $path . DS . 'temando' . DS . $key[0] . DS . $key[1] . DS . $key . '.cache';
|
329 |
}
|
330 |
|
331 |
/**
|
332 |
+
* Register cached results
|
333 |
* (saves results into a cache file or removes file if results empty)
|
334 |
+
*
|
335 |
* @param string $words
|
336 |
* @param string $value
|
337 |
* @return void
|
338 |
*/
|
339 |
+
public function setSuggestionsCache($words, $value)
|
340 |
+
{
|
341 |
if (strlen(join(' ', $words)) > 4) {
|
342 |
return;
|
343 |
}
|
364 |
* Returns region name saved in customers session
|
365 |
* @return string|null
|
366 |
*/
|
367 |
+
public function getSessionRegion()
|
368 |
+
{
|
369 |
$data = Mage::getSingleton('customer/session')->getData('estimate_product_shipping');
|
370 |
if ($data) {
|
371 |
return Mage::getModel('directory/region')->load($data['region_id'])->getName();
|
378 |
* Returns city name saved in customers session
|
379 |
* @return string|null
|
380 |
*/
|
381 |
+
public function getSessionCity()
|
382 |
+
{
|
383 |
$data = Mage::getSingleton('customer/session')->getData('estimate_product_shipping');
|
384 |
if ($data) {
|
385 |
return $data['city'];
|
392 |
* Returns postal code saved in customers session
|
393 |
* @return string|null
|
394 |
*/
|
395 |
+
public function getSessionPostcode()
|
396 |
+
{
|
397 |
$data = Mage::getSingleton('customer/session')->getData('estimate_product_shipping');
|
398 |
if ($data) {
|
399 |
return $data['postcode'];
|
406 |
* Returns id of the region saved in customers session
|
407 |
* @return int|null
|
408 |
*/
|
409 |
+
public function getSessionRegionId()
|
410 |
+
{
|
411 |
$data = Mage::getSingleton('customer/session')->getData('estimate_product_shipping');
|
412 |
if ($data) {
|
413 |
return $data['region_id'];
|
418 |
|
419 |
/**
|
420 |
* Return list of available origin locations
|
421 |
+
*
|
422 |
* @return array
|
423 |
*/
|
424 |
+
public function getLocationList()
|
425 |
+
{
|
426 |
return array(
|
427 |
self::DEFAULT_WAREHOUSE_NAME => self::DEFAULT_WAREHOUSE_NAME
|
428 |
);
|
429 |
}
|
430 |
+
|
431 |
/**
|
432 |
* Returns location create/update request array
|
433 |
+
*
|
434 |
* @return array
|
435 |
*/
|
436 |
+
public function getOriginRequestArray(Varien_Object $data)
|
437 |
+
{
|
438 |
return array(
|
439 |
'description' => self::DEFAULT_WAREHOUSE_NAME,
|
440 |
'type' => 'Origin',
|
459 |
|
460 |
/**
|
461 |
* Returns true if street address is a PO Box
|
462 |
+
*
|
463 |
* @param string $street
|
464 |
+
* @return boolean
|
465 |
*/
|
466 |
+
public function isStreetWithPO($street)
|
467 |
+
{
|
468 |
if (!is_string($street)) {
|
469 |
return false;
|
470 |
}
|
486 |
/**
|
487 |
* Returns true if shipping quote is dynamic quote obtained
|
488 |
* from Temando API
|
489 |
+
*
|
490 |
* @param int $quote_id
|
491 |
* @return boolean
|
492 |
*/
|
493 |
+
public function isQuoteDynamic($quote_id)
|
494 |
+
{
|
495 |
$fixed_carriers = array(
|
496 |
Temando_Temando_Model_Carrier::FLAT_RATE,
|
497 |
Temando_Temando_Model_Carrier::FREE,
|
500 |
if (in_array($quote_id, $fixed_carriers)) {
|
501 |
return false;
|
502 |
}
|
503 |
+
|
504 |
return true;
|
505 |
}
|
506 |
+
|
507 |
/**
|
508 |
* Creates a sales quote based on current ship request
|
509 |
+
*
|
510 |
* @param Mage_Shipping_Model_Rate_Request $request
|
511 |
* @return Mage_Sales_Model_Quote
|
512 |
*/
|
530 |
$quote->collectTotals();
|
531 |
return $quote;
|
532 |
}
|
533 |
+
}
|
|
app/code/community/Temando/Temando/Helper/Functions.php
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
-
*
|
4 |
*
|
5 |
-
* @
|
|
|
6 |
*/
|
7 |
-
class Temando_Temando_Helper_Functions extends Mage_Core_Helper_Abstract
|
|
|
8 |
|
9 |
public function getFastestQuote($quotes)
|
10 |
{
|
@@ -14,7 +16,7 @@ class Temando_Temando_Helper_Functions extends Mage_Core_Helper_Abstract {
|
|
14 |
}
|
15 |
return $fastest;
|
16 |
}
|
17 |
-
|
18 |
protected function _getFaster($a, $b)
|
19 |
{
|
20 |
// if one is null, return the other.
|
@@ -24,11 +26,11 @@ class Temando_Temando_Helper_Functions extends Mage_Core_Helper_Abstract {
|
|
24 |
if (is_null($b)) {
|
25 |
return $a;
|
26 |
}
|
27 |
-
|
28 |
// average ETA
|
29 |
$a_eta = ($a->getEtaFrom() + $a->getEtaTo()) / 2;
|
30 |
$b_eta = ($b->getEtaFrom() + $b->getEtaTo()) / 2;
|
31 |
-
|
32 |
if ($a_eta != $b_eta) {
|
33 |
// different speed, return faster
|
34 |
return $a_eta <= $b_eta ? $a : $b;
|
@@ -37,7 +39,7 @@ class Temando_Temando_Helper_Functions extends Mage_Core_Helper_Abstract {
|
|
37 |
return self::_getCheaper($a, $b);
|
38 |
}
|
39 |
}
|
40 |
-
|
41 |
public function getCheapestQuote($quotes)
|
42 |
{
|
43 |
$cheapest = null;
|
@@ -46,7 +48,7 @@ class Temando_Temando_Helper_Functions extends Mage_Core_Helper_Abstract {
|
|
46 |
}
|
47 |
return $cheapest;
|
48 |
}
|
49 |
-
|
50 |
protected function _getCheaper($a, $b)
|
51 |
{
|
52 |
// if one is null, return the other (if both are null, null is returned).
|
@@ -56,21 +58,19 @@ class Temando_Temando_Helper_Functions extends Mage_Core_Helper_Abstract {
|
|
56 |
if (is_null($b)) {
|
57 |
return $a;
|
58 |
}
|
59 |
-
|
60 |
return $a->getTotalPrice() <= $b->getTotalPrice() ? $a : $b;
|
61 |
-
}
|
62 |
-
|
63 |
public function getCheapestAndFastestQuotes($quotes)
|
64 |
{
|
65 |
$cheapest = $this->getCheapestQuote($quotes);
|
66 |
$fastest = $this->getFastestQuote($quotes);
|
67 |
-
|
68 |
if($cheapest->getId() === $fastest->getId())
|
69 |
return array($cheapest);
|
70 |
-
|
71 |
return array($cheapest, $fastest);
|
72 |
}
|
73 |
-
|
74 |
-
}
|
75 |
-
|
76 |
|
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Temando Helper Functions
|
4 |
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
*/
|
8 |
+
class Temando_Temando_Helper_Functions extends Mage_Core_Helper_Abstract
|
9 |
+
{
|
10 |
|
11 |
public function getFastestQuote($quotes)
|
12 |
{
|
16 |
}
|
17 |
return $fastest;
|
18 |
}
|
19 |
+
|
20 |
protected function _getFaster($a, $b)
|
21 |
{
|
22 |
// if one is null, return the other.
|
26 |
if (is_null($b)) {
|
27 |
return $a;
|
28 |
}
|
29 |
+
|
30 |
// average ETA
|
31 |
$a_eta = ($a->getEtaFrom() + $a->getEtaTo()) / 2;
|
32 |
$b_eta = ($b->getEtaFrom() + $b->getEtaTo()) / 2;
|
33 |
+
|
34 |
if ($a_eta != $b_eta) {
|
35 |
// different speed, return faster
|
36 |
return $a_eta <= $b_eta ? $a : $b;
|
39 |
return self::_getCheaper($a, $b);
|
40 |
}
|
41 |
}
|
42 |
+
|
43 |
public function getCheapestQuote($quotes)
|
44 |
{
|
45 |
$cheapest = null;
|
48 |
}
|
49 |
return $cheapest;
|
50 |
}
|
51 |
+
|
52 |
protected function _getCheaper($a, $b)
|
53 |
{
|
54 |
// if one is null, return the other (if both are null, null is returned).
|
58 |
if (is_null($b)) {
|
59 |
return $a;
|
60 |
}
|
61 |
+
|
62 |
return $a->getTotalPrice() <= $b->getTotalPrice() ? $a : $b;
|
63 |
+
}
|
64 |
+
|
65 |
public function getCheapestAndFastestQuotes($quotes)
|
66 |
{
|
67 |
$cheapest = $this->getCheapestQuote($quotes);
|
68 |
$fastest = $this->getFastestQuote($quotes);
|
69 |
+
|
70 |
if($cheapest->getId() === $fastest->getId())
|
71 |
return array($cheapest);
|
72 |
+
|
73 |
return array($cheapest, $fastest);
|
74 |
}
|
|
|
|
|
|
|
75 |
|
76 |
+
}
|
app/code/community/Temando/Temando/Helper/Wizard.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Helper_Wizard extends Mage_Directory_Helper_Data {
|
4 |
|
5 |
/**
|
@@ -7,7 +12,8 @@ class Temando_Temando_Helper_Wizard extends Mage_Directory_Helper_Data {
|
|
7 |
*
|
8 |
* @return string
|
9 |
*/
|
10 |
-
public function getRegionJson()
|
|
|
11 |
|
12 |
if (true/* empty($json) */) {
|
13 |
$countryIds = array();
|
@@ -43,5 +49,4 @@ class Temando_Temando_Helper_Wizard extends Mage_Directory_Helper_Data {
|
|
43 |
|
44 |
return $json;
|
45 |
}
|
46 |
-
|
47 |
}
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Temando Helper Wizard
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Helper_Wizard extends Mage_Directory_Helper_Data {
|
9 |
|
10 |
/**
|
12 |
*
|
13 |
* @return string
|
14 |
*/
|
15 |
+
public function getRegionJson()
|
16 |
+
{
|
17 |
|
18 |
if (true/* empty($json) */) {
|
19 |
$countryIds = array();
|
49 |
|
50 |
return $json;
|
51 |
}
|
|
|
52 |
}
|
app/code/community/Temando/Temando/Model/Api/Client.php
CHANGED
@@ -1,33 +1,52 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
Mage::log($request, null, 'raw-request.xml', true);
|
7 |
$response = parent::__doRequest($request, $location, $action, $version, $one_way);
|
8 |
Mage::log($response, null, 'raw-response.xml', true);
|
9 |
return $response;
|
10 |
}
|
11 |
-
|
12 |
}
|
13 |
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
const NO_SHIP_DATE = 'Unable to send on the specified date and/or location.';
|
17 |
|
|
|
|
|
|
|
18 |
protected $_client = null;
|
19 |
protected $_is_sand = null;
|
20 |
|
21 |
-
public function __construct()
|
|
|
22 |
parent::__construct();
|
23 |
}
|
24 |
|
25 |
-
public function connect($username = null, $password = null, $sandbox = false)
|
|
|
26 |
$this->_is_sand = $sandbox;
|
27 |
if ($sandbox) {
|
28 |
-
$url =
|
29 |
} else {
|
30 |
-
$url =
|
31 |
}
|
32 |
|
33 |
if (!$username) {
|
@@ -66,11 +85,13 @@ class Temando_Temando_Model_Api_Client extends Mage_Core_Model_Abstract {
|
|
66 |
* @param array $request the request parameters, in an array format.
|
67 |
* @return array
|
68 |
*/
|
69 |
-
public function getQuotesByRequest($request)
|
|
|
70 |
return $this->getQuotes($request);
|
71 |
}
|
72 |
|
73 |
-
public function getQuotes($request)
|
|
|
74 |
if (!$this->_client) {
|
75 |
return false;
|
76 |
}
|
@@ -81,6 +102,7 @@ class Temando_Temando_Model_Api_Client extends Mage_Core_Model_Abstract {
|
|
81 |
|
82 |
$response = $this->_client->getQuotes($request);
|
83 |
//check for no ship days - public holidays - and retry with date +1 (up to +10) days before exiting
|
|
|
84 |
if (isset($request['anytime']['readyDate'])) {
|
85 |
while(is_soap_fault($response) && $response->faultstring == self::NO_SHIP_DATE && ++$i <= 10)
|
86 |
{
|
@@ -92,7 +114,7 @@ class Temando_Temando_Model_Api_Client extends Mage_Core_Model_Abstract {
|
|
92 |
$response = $this->_client->getQuotes($request);
|
93 |
}
|
94 |
}
|
95 |
-
if(is_soap_fault($response)) {
|
96 |
throw new Exception($response->faultstring);
|
97 |
}
|
98 |
//make sure we have an array
|
@@ -110,11 +132,13 @@ class Temando_Temando_Model_Api_Client extends Mage_Core_Model_Abstract {
|
|
110 |
return $quotes;
|
111 |
}
|
112 |
|
113 |
-
public function makeBookingByRequest($request)
|
|
|
114 |
return $this->makeBooking($request);
|
115 |
}
|
116 |
|
117 |
-
public function makeBooking($request)
|
|
|
118 |
if (!$this->_is_sand) {
|
119 |
$request['clientId'] = Mage::helper('temando')->getClientId();
|
120 |
}
|
@@ -123,43 +147,46 @@ class Temando_Temando_Model_Api_Client extends Mage_Core_Model_Abstract {
|
|
123 |
}
|
124 |
|
125 |
$response = $this->_client->makeBooking($request);
|
126 |
-
if(is_soap_fault($response)) {
|
127 |
throw new Exception($response->faultstring);
|
128 |
}
|
129 |
return $response;
|
130 |
}
|
131 |
|
132 |
-
public function getRequest($request)
|
|
|
133 |
if (!$this->_client) {
|
134 |
return false;
|
135 |
}
|
136 |
|
137 |
$response = $this->_client->getRequest($request);
|
138 |
-
if(is_soap_fault($response)) {
|
139 |
throw new Exception($response->faultstring);
|
140 |
}
|
141 |
return $response;
|
142 |
}
|
143 |
|
144 |
-
public function confirmManifest($request)
|
|
|
145 |
if (!$this->_client) {
|
146 |
return false;
|
147 |
}
|
148 |
|
149 |
$response = $this->_client->confirmManifest($request);
|
150 |
-
if(is_soap_fault($response)) {
|
151 |
throw new Exception($response->faultstring);
|
152 |
}
|
153 |
return $response;
|
154 |
}
|
155 |
|
156 |
-
public function getManifest($request)
|
|
|
157 |
if (!$this->_client) {
|
158 |
return false;
|
159 |
}
|
160 |
|
161 |
$response = $this->_client->getManifest($request);
|
162 |
-
if(is_soap_fault($response)) {
|
163 |
throw new Exception($response->faultstring);
|
164 |
}
|
165 |
return $response;
|
@@ -171,13 +198,14 @@ class Temando_Temando_Model_Api_Client extends Mage_Core_Model_Abstract {
|
|
171 |
* @param $request
|
172 |
* @return bool
|
173 |
*/
|
174 |
-
public function getLocations($request)
|
|
|
175 |
if (!$this->_client) {
|
176 |
return false;
|
177 |
}
|
178 |
|
179 |
$response = $this->_client->getLocations($request);
|
180 |
-
if(is_soap_fault($response)) {
|
181 |
throw new Exception($response->faultstring);
|
182 |
}
|
183 |
return $response;
|
@@ -189,7 +217,8 @@ class Temando_Temando_Model_Api_Client extends Mage_Core_Model_Abstract {
|
|
189 |
* @param $request
|
190 |
* @return bool
|
191 |
*/
|
192 |
-
public function createLocation($request)
|
|
|
193 |
if (!$this->_client) {
|
194 |
return false;
|
195 |
}
|
@@ -197,7 +226,7 @@ class Temando_Temando_Model_Api_Client extends Mage_Core_Model_Abstract {
|
|
197 |
$request['clientId'] = Mage::helper('temando')->getClientId();
|
198 |
|
199 |
$response = $this->_client->createLocation($request);
|
200 |
-
if(is_soap_fault($response)) {
|
201 |
throw new Exception($response->faultstring);
|
202 |
}
|
203 |
return $response;
|
@@ -209,7 +238,8 @@ class Temando_Temando_Model_Api_Client extends Mage_Core_Model_Abstract {
|
|
209 |
* @param $request
|
210 |
* @return bool
|
211 |
*/
|
212 |
-
public function updateLocation($request)
|
|
|
213 |
if (!$this->_client) {
|
214 |
return false;
|
215 |
}
|
@@ -229,13 +259,14 @@ class Temando_Temando_Model_Api_Client extends Mage_Core_Model_Abstract {
|
|
229 |
* @param $request
|
230 |
* @return bool
|
231 |
*/
|
232 |
-
public function getCarriers($request)
|
|
|
233 |
if (!$this->_client) {
|
234 |
return false;
|
235 |
}
|
236 |
|
237 |
$response = $this->_client->getCarriers($request);
|
238 |
-
if(is_soap_fault($response)) {
|
239 |
throw new Exception($response->faultstring);
|
240 |
}
|
241 |
return $response;
|
@@ -247,23 +278,22 @@ class Temando_Temando_Model_Api_Client extends Mage_Core_Model_Abstract {
|
|
247 |
* To add insurance to a quote, the total price should be multiplied by
|
248 |
* this value.
|
249 |
*/
|
250 |
-
public function getInsuranceMultiplier()
|
|
|
251 |
return 1.01; // 1%
|
252 |
}
|
253 |
|
254 |
|
255 |
-
public function getClient($request)
|
|
|
256 |
if (!$this->_client) {
|
257 |
return false;
|
258 |
}
|
259 |
|
260 |
$response = $this->_client->getClient($request);
|
261 |
-
if(is_soap_fault($response)) {
|
262 |
throw new Exception($response->faultstring);
|
263 |
}
|
264 |
return $response;
|
265 |
}
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
}
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Debugging SoapClient
|
4 |
+
* Logs request and response in var/log
|
5 |
+
*
|
6 |
+
* @package Temando_Temando
|
7 |
+
* @author Temando Magento Team <marketing@temando.com>
|
8 |
+
*/
|
9 |
+
class DebugSoapClient extends SoapClient
|
10 |
+
{
|
11 |
+
|
12 |
+
public function __doRequest($request, $location, $action, $version, $one_way = 0)
|
13 |
+
{
|
14 |
Mage::log($request, null, 'raw-request.xml', true);
|
15 |
$response = parent::__doRequest($request, $location, $action, $version, $one_way);
|
16 |
Mage::log($response, null, 'raw-response.xml', true);
|
17 |
return $response;
|
18 |
}
|
|
|
19 |
}
|
20 |
|
21 |
+
/**
|
22 |
+
* Api Client
|
23 |
+
*
|
24 |
+
* @package Temando_Temando
|
25 |
+
* @author Temando Magento Team <marketing@temando.com>
|
26 |
+
*/
|
27 |
+
class Temando_Temando_Model_Api_Client extends Mage_Core_Model_Abstract
|
28 |
+
{
|
29 |
+
|
30 |
const NO_SHIP_DATE = 'Unable to send on the specified date and/or location.';
|
31 |
|
32 |
+
protected $temandoApiSandbox = 'https://api-demo.temando.com/schema/2009_06/server.wsdl';
|
33 |
+
protected $temandoApi = 'https://api.temando.com/schema/2009_06/server.wsdl';
|
34 |
+
|
35 |
protected $_client = null;
|
36 |
protected $_is_sand = null;
|
37 |
|
38 |
+
public function __construct()
|
39 |
+
{
|
40 |
parent::__construct();
|
41 |
}
|
42 |
|
43 |
+
public function connect($username = null, $password = null, $sandbox = false)
|
44 |
+
{
|
45 |
$this->_is_sand = $sandbox;
|
46 |
if ($sandbox) {
|
47 |
+
$url = $this->temandoApiSandbox;
|
48 |
} else {
|
49 |
+
$url = $this->temandoApi;
|
50 |
}
|
51 |
|
52 |
if (!$username) {
|
85 |
* @param array $request the request parameters, in an array format.
|
86 |
* @return array
|
87 |
*/
|
88 |
+
public function getQuotesByRequest($request)
|
89 |
+
{
|
90 |
return $this->getQuotes($request);
|
91 |
}
|
92 |
|
93 |
+
public function getQuotes($request)
|
94 |
+
{
|
95 |
if (!$this->_client) {
|
96 |
return false;
|
97 |
}
|
102 |
|
103 |
$response = $this->_client->getQuotes($request);
|
104 |
//check for no ship days - public holidays - and retry with date +1 (up to +10) days before exiting
|
105 |
+
$i = 0;
|
106 |
if (isset($request['anytime']['readyDate'])) {
|
107 |
while(is_soap_fault($response) && $response->faultstring == self::NO_SHIP_DATE && ++$i <= 10)
|
108 |
{
|
114 |
$response = $this->_client->getQuotes($request);
|
115 |
}
|
116 |
}
|
117 |
+
if (is_soap_fault($response)) {
|
118 |
throw new Exception($response->faultstring);
|
119 |
}
|
120 |
//make sure we have an array
|
132 |
return $quotes;
|
133 |
}
|
134 |
|
135 |
+
public function makeBookingByRequest($request)
|
136 |
+
{
|
137 |
return $this->makeBooking($request);
|
138 |
}
|
139 |
|
140 |
+
public function makeBooking($request)
|
141 |
+
{
|
142 |
if (!$this->_is_sand) {
|
143 |
$request['clientId'] = Mage::helper('temando')->getClientId();
|
144 |
}
|
147 |
}
|
148 |
|
149 |
$response = $this->_client->makeBooking($request);
|
150 |
+
if (is_soap_fault($response)) {
|
151 |
throw new Exception($response->faultstring);
|
152 |
}
|
153 |
return $response;
|
154 |
}
|
155 |
|
156 |
+
public function getRequest($request)
|
157 |
+
{
|
158 |
if (!$this->_client) {
|
159 |
return false;
|
160 |
}
|
161 |
|
162 |
$response = $this->_client->getRequest($request);
|
163 |
+
if (is_soap_fault($response)) {
|
164 |
throw new Exception($response->faultstring);
|
165 |
}
|
166 |
return $response;
|
167 |
}
|
168 |
|
169 |
+
public function confirmManifest($request)
|
170 |
+
{
|
171 |
if (!$this->_client) {
|
172 |
return false;
|
173 |
}
|
174 |
|
175 |
$response = $this->_client->confirmManifest($request);
|
176 |
+
if (is_soap_fault($response)) {
|
177 |
throw new Exception($response->faultstring);
|
178 |
}
|
179 |
return $response;
|
180 |
}
|
181 |
|
182 |
+
public function getManifest($request)
|
183 |
+
{
|
184 |
if (!$this->_client) {
|
185 |
return false;
|
186 |
}
|
187 |
|
188 |
$response = $this->_client->getManifest($request);
|
189 |
+
if (is_soap_fault($response)) {
|
190 |
throw new Exception($response->faultstring);
|
191 |
}
|
192 |
return $response;
|
198 |
* @param $request
|
199 |
* @return bool
|
200 |
*/
|
201 |
+
public function getLocations($request)
|
202 |
+
{
|
203 |
if (!$this->_client) {
|
204 |
return false;
|
205 |
}
|
206 |
|
207 |
$response = $this->_client->getLocations($request);
|
208 |
+
if (is_soap_fault($response)) {
|
209 |
throw new Exception($response->faultstring);
|
210 |
}
|
211 |
return $response;
|
217 |
* @param $request
|
218 |
* @return bool
|
219 |
*/
|
220 |
+
public function createLocation($request)
|
221 |
+
{
|
222 |
if (!$this->_client) {
|
223 |
return false;
|
224 |
}
|
226 |
$request['clientId'] = Mage::helper('temando')->getClientId();
|
227 |
|
228 |
$response = $this->_client->createLocation($request);
|
229 |
+
if (is_soap_fault($response)) {
|
230 |
throw new Exception($response->faultstring);
|
231 |
}
|
232 |
return $response;
|
238 |
* @param $request
|
239 |
* @return bool
|
240 |
*/
|
241 |
+
public function updateLocation($request)
|
242 |
+
{
|
243 |
if (!$this->_client) {
|
244 |
return false;
|
245 |
}
|
259 |
* @param $request
|
260 |
* @return bool
|
261 |
*/
|
262 |
+
public function getCarriers($request)
|
263 |
+
{
|
264 |
if (!$this->_client) {
|
265 |
return false;
|
266 |
}
|
267 |
|
268 |
$response = $this->_client->getCarriers($request);
|
269 |
+
if (is_soap_fault($response)) {
|
270 |
throw new Exception($response->faultstring);
|
271 |
}
|
272 |
return $response;
|
278 |
* To add insurance to a quote, the total price should be multiplied by
|
279 |
* this value.
|
280 |
*/
|
281 |
+
public function getInsuranceMultiplier()
|
282 |
+
{
|
283 |
return 1.01; // 1%
|
284 |
}
|
285 |
|
286 |
|
287 |
+
public function getClient($request)
|
288 |
+
{
|
289 |
if (!$this->_client) {
|
290 |
return false;
|
291 |
}
|
292 |
|
293 |
$response = $this->_client->getClient($request);
|
294 |
+
if (is_soap_fault($response)) {
|
295 |
throw new Exception($response->faultstring);
|
296 |
}
|
297 |
return $response;
|
298 |
}
|
|
|
|
|
|
|
299 |
}
|
app/code/community/Temando/Temando/Model/Api/Request.php
CHANGED
@@ -1,5 +1,14 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_Api_Request extends Mage_Core_Model_Abstract
|
4 |
{
|
5 |
/**
|
@@ -46,13 +55,15 @@ class Temando_Temando_Model_Api_Request extends Mage_Core_Model_Abstract
|
|
46 |
return $this;
|
47 |
}
|
48 |
|
49 |
-
public function setDestination($country, $postcode, $city, $street = null)
|
50 |
{
|
51 |
$this->_anywhere
|
52 |
->setDestinationCountry($country)
|
53 |
->setDestinationPostcode($postcode)
|
54 |
->setDestinationCity($city)
|
55 |
-
->setDestinationStreet($street)
|
|
|
|
|
56 |
return $this;
|
57 |
}
|
58 |
|
@@ -160,7 +171,10 @@ class Temando_Temando_Model_Api_Request extends Mage_Core_Model_Abstract
|
|
160 |
$goodsValue = $this->_anythings->getGoodsValue();
|
161 |
$return = array(
|
162 |
'anythings' => $this->_anythings->toRequestArray(),
|
163 |
-
'anywhere' => $this
|
|
|
|
|
|
|
164 |
);
|
165 |
|
166 |
if ($goodsValue) {
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Api Request
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*
|
8 |
+
* @method Temando_Temando_Model_Api_Request setDeliveryOptions($options)
|
9 |
+
*
|
10 |
+
* @method array getDeliveryOptions()
|
11 |
+
*/
|
12 |
class Temando_Temando_Model_Api_Request extends Mage_Core_Model_Abstract
|
13 |
{
|
14 |
/**
|
55 |
return $this;
|
56 |
}
|
57 |
|
58 |
+
public function setDestination($country, $postcode, $city, $street = null, $destinationType = Temando_Temando_Model_Checkout_Delivery_Options::DESTINATION_RESIDENCE)
|
59 |
{
|
60 |
$this->_anywhere
|
61 |
->setDestinationCountry($country)
|
62 |
->setDestinationPostcode($postcode)
|
63 |
->setDestinationCity($city)
|
64 |
+
->setDestinationStreet($street)
|
65 |
+
->setDestinationType($destinationType)
|
66 |
+
->setDeliveryOptions($this->getDeliveryOptions());
|
67 |
return $this;
|
68 |
}
|
69 |
|
171 |
$goodsValue = $this->_anythings->getGoodsValue();
|
172 |
$return = array(
|
173 |
'anythings' => $this->_anythings->toRequestArray(),
|
174 |
+
'anywhere' => $this
|
175 |
+
->_anywhere
|
176 |
+
->setDeliveryOptions($this->getDeliveryOptions())
|
177 |
+
->toRequestArray(),
|
178 |
);
|
179 |
|
180 |
if ($goodsValue) {
|
app/code/community/Temando/Temando/Model/Api/Request/Anything.php
CHANGED
@@ -1,32 +1,37 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_Api_Request_Anything extends Mage_Core_Model_Abstract
|
4 |
-
{
|
5 |
const GOODS_CLASS = 'General Goods';
|
6 |
const GOODS_SUBCLASS = 'Household Goods';
|
7 |
const PALLET_TYPE = 'Plain';
|
8 |
const PALLET_NATURE = 'Not Required';
|
9 |
-
|
10 |
/**
|
11 |
* @var Mage_Sales_Model_Order_Item
|
12 |
*/
|
13 |
protected $_item = null;
|
14 |
-
|
15 |
public function _construct()
|
16 |
{
|
17 |
parent::_construct();
|
18 |
$this->_init('temando/api_request_anything');
|
19 |
}
|
20 |
-
|
21 |
public function setItem($item)
|
22 |
{
|
23 |
-
if ($item instanceof Mage_Sales_Model_Quote_Item || $item instanceof Mage_Sales_Model_Order_Item ||
|
24 |
$item instanceof Mage_Sales_Model_Quote_Address_Item || $item instanceof Temando_Temando_Model_Box) {
|
25 |
$this->_item = $item;
|
26 |
}
|
27 |
return $this;
|
28 |
}
|
29 |
-
|
30 |
/**
|
31 |
* Gets the order item for this Anything object.
|
32 |
*
|
@@ -39,13 +44,13 @@ class Temando_Temando_Model_Api_Request_Anything extends Mage_Core_Model_Abstrac
|
|
39 |
}
|
40 |
return false;
|
41 |
}
|
42 |
-
|
43 |
public function toRequestArray()
|
44 |
{
|
45 |
if (!$this->validate()) {
|
46 |
return false;
|
47 |
}
|
48 |
-
|
49 |
if ($this->_item instanceof Temando_Temando_Model_Box) {
|
50 |
$anything = array(
|
51 |
'class' => 'General Goods',
|
@@ -59,15 +64,16 @@ class Temando_Temando_Model_Api_Request_Anything extends Mage_Core_Model_Abstrac
|
|
59 |
'width' => Mage::helper('temando')->getDistanceInCentimetres($this->_item->getWidth(), $this->_item->getMeasureUnit()),
|
60 |
'height' => Mage::helper('temando')->getDistanceInCentimetres($this->_item->getHeight(), $this->_item->getMeasureUnit()),
|
61 |
'qualifierFreightGeneralFragile' => $this->_item->getFragile() == '1' ? 'Y' : 'N',
|
|
|
62 |
'description' => $this->_item->getComment()
|
63 |
);
|
64 |
if($this->_item->getPackaging() == Temando_Temando_Model_System_Config_Source_Shipment_Packaging::PALLET) {
|
65 |
$anything['palletType'] = self::PALLET_TYPE;
|
66 |
$anything['palletNature'] = self::PALLET_NATURE;
|
67 |
}
|
68 |
-
|
69 |
} else {
|
70 |
-
|
71 |
Mage::helper('temando')->applyTemandoParamsToItem($this->_item);
|
72 |
$anything = array(
|
73 |
'class' => 'General Goods',
|
@@ -81,6 +87,7 @@ class Temando_Temando_Model_Api_Request_Anything extends Mage_Core_Model_Abstrac
|
|
81 |
'width' => Mage::helper('temando')->getDistanceInCentimetres($this->_item->getTemandoWidth(), Mage::helper('temando')->getConfigData('units/measure')),
|
82 |
'height' => Mage::helper('temando')->getDistanceInCentimetres($this->_item->getTemandoHeight(), Mage::helper('temando')->getConfigData('units/measure')),
|
83 |
'qualifierFreightGeneralFragile' => $this->_item->getTemandoFragile() == '1' ? 'Y' : 'N',
|
|
|
84 |
'description' => $this->_item->getName(),
|
85 |
'articles' => $this->getArticlesElement()
|
86 |
);
|
@@ -88,14 +95,14 @@ class Temando_Temando_Model_Api_Request_Anything extends Mage_Core_Model_Abstrac
|
|
88 |
$anything['palletType'] = self::PALLET_TYPE;
|
89 |
$anything['palletNature'] = self::PALLET_NATURE;
|
90 |
}
|
91 |
-
|
92 |
-
}
|
93 |
return $anything;
|
94 |
-
}
|
95 |
-
|
96 |
/**
|
97 |
* Prepares articles element for this anything
|
98 |
-
*
|
99 |
* @return array
|
100 |
*/
|
101 |
public function getArticlesElement()
|
@@ -111,7 +118,7 @@ class Temando_Temando_Model_Api_Request_Anything extends Mage_Core_Model_Abstrac
|
|
111 |
}
|
112 |
return $articles;
|
113 |
}
|
114 |
-
|
115 |
public function validate()
|
116 |
{
|
117 |
return $this->_item instanceof Mage_Sales_Model_Quote_Item ||
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Api Request Anything
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Model_Api_Request_Anything extends Mage_Core_Model_Abstract
|
9 |
+
{
|
10 |
const GOODS_CLASS = 'General Goods';
|
11 |
const GOODS_SUBCLASS = 'Household Goods';
|
12 |
const PALLET_TYPE = 'Plain';
|
13 |
const PALLET_NATURE = 'Not Required';
|
14 |
+
|
15 |
/**
|
16 |
* @var Mage_Sales_Model_Order_Item
|
17 |
*/
|
18 |
protected $_item = null;
|
19 |
+
|
20 |
public function _construct()
|
21 |
{
|
22 |
parent::_construct();
|
23 |
$this->_init('temando/api_request_anything');
|
24 |
}
|
25 |
+
|
26 |
public function setItem($item)
|
27 |
{
|
28 |
+
if ($item instanceof Mage_Sales_Model_Quote_Item || $item instanceof Mage_Sales_Model_Order_Item ||
|
29 |
$item instanceof Mage_Sales_Model_Quote_Address_Item || $item instanceof Temando_Temando_Model_Box) {
|
30 |
$this->_item = $item;
|
31 |
}
|
32 |
return $this;
|
33 |
}
|
34 |
+
|
35 |
/**
|
36 |
* Gets the order item for this Anything object.
|
37 |
*
|
44 |
}
|
45 |
return false;
|
46 |
}
|
47 |
+
|
48 |
public function toRequestArray()
|
49 |
{
|
50 |
if (!$this->validate()) {
|
51 |
return false;
|
52 |
}
|
53 |
+
|
54 |
if ($this->_item instanceof Temando_Temando_Model_Box) {
|
55 |
$anything = array(
|
56 |
'class' => 'General Goods',
|
64 |
'width' => Mage::helper('temando')->getDistanceInCentimetres($this->_item->getWidth(), $this->_item->getMeasureUnit()),
|
65 |
'height' => Mage::helper('temando')->getDistanceInCentimetres($this->_item->getHeight(), $this->_item->getMeasureUnit()),
|
66 |
'qualifierFreightGeneralFragile' => $this->_item->getFragile() == '1' ? 'Y' : 'N',
|
67 |
+
'qualifierFreightGeneralDangerousGoods' => $this->_item->getDangerous() == '1' ? 'Y' : 'N',
|
68 |
'description' => $this->_item->getComment()
|
69 |
);
|
70 |
if($this->_item->getPackaging() == Temando_Temando_Model_System_Config_Source_Shipment_Packaging::PALLET) {
|
71 |
$anything['palletType'] = self::PALLET_TYPE;
|
72 |
$anything['palletNature'] = self::PALLET_NATURE;
|
73 |
}
|
74 |
+
|
75 |
} else {
|
76 |
+
|
77 |
Mage::helper('temando')->applyTemandoParamsToItem($this->_item);
|
78 |
$anything = array(
|
79 |
'class' => 'General Goods',
|
87 |
'width' => Mage::helper('temando')->getDistanceInCentimetres($this->_item->getTemandoWidth(), Mage::helper('temando')->getConfigData('units/measure')),
|
88 |
'height' => Mage::helper('temando')->getDistanceInCentimetres($this->_item->getTemandoHeight(), Mage::helper('temando')->getConfigData('units/measure')),
|
89 |
'qualifierFreightGeneralFragile' => $this->_item->getTemandoFragile() == '1' ? 'Y' : 'N',
|
90 |
+
'qualifierFreightGeneralDangerousGoods' => $this->_item->getTemandoDangerous() == '1' ? 'Y' : 'N',
|
91 |
'description' => $this->_item->getName(),
|
92 |
'articles' => $this->getArticlesElement()
|
93 |
);
|
95 |
$anything['palletType'] = self::PALLET_TYPE;
|
96 |
$anything['palletNature'] = self::PALLET_NATURE;
|
97 |
}
|
98 |
+
|
99 |
+
}
|
100 |
return $anything;
|
101 |
+
}
|
102 |
+
|
103 |
/**
|
104 |
* Prepares articles element for this anything
|
105 |
+
*
|
106 |
* @return array
|
107 |
*/
|
108 |
public function getArticlesElement()
|
118 |
}
|
119 |
return $articles;
|
120 |
}
|
121 |
+
|
122 |
public function validate()
|
123 |
{
|
124 |
return $this->_item instanceof Mage_Sales_Model_Quote_Item ||
|
app/code/community/Temando/Temando/Model/Api/Request/Anythings.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_Api_Request_Anythings extends Mage_Core_Model_Abstract {
|
4 |
|
5 |
/**
|
@@ -8,13 +13,15 @@ class Temando_Temando_Model_Api_Request_Anythings extends Mage_Core_Model_Abstra
|
|
8 |
protected $_anythings;
|
9 |
protected $_need_optimize = false;
|
10 |
|
11 |
-
public function _construct()
|
|
|
12 |
parent::_construct();
|
13 |
$this->_init('temando/api_request_anythings');
|
14 |
$this->_anythings = array();
|
15 |
}
|
16 |
|
17 |
-
public function setItems($items)
|
|
|
18 |
$this->_anythings = array();
|
19 |
foreach ($items as $item) {
|
20 |
if ($item->getParentItem() || $item->getIsVirtual()) {
|
@@ -36,7 +43,8 @@ class Temando_Temando_Model_Api_Request_Anythings extends Mage_Core_Model_Abstra
|
|
36 |
return $this;
|
37 |
}
|
38 |
|
39 |
-
public function addItem($item)
|
|
|
40 |
if ($item instanceof Mage_Sales_Model_Quote_Item || $item instanceof Mage_Sales_Model_Order_Item || $item instanceof Mage_Sales_Model_Quote_Address_Item || $item instanceof Temando_Temando_Model_Box) {
|
41 |
if ($item instanceof Mage_Sales_Model_Quote_Item || $item instanceof Mage_Sales_Model_Order_Item || $item instanceof Mage_Sales_Model_Quote_Address_Item) {
|
42 |
$this->_need_optimize = true;
|
@@ -48,11 +56,13 @@ class Temando_Temando_Model_Api_Request_Anythings extends Mage_Core_Model_Abstra
|
|
48 |
return $this;
|
49 |
}
|
50 |
|
51 |
-
public function getItems()
|
|
|
52 |
return $this->_anythings;
|
53 |
}
|
54 |
|
55 |
-
public function validate()
|
|
|
56 |
if (!count($this->_anythings)) {
|
57 |
// no child items
|
58 |
return false;
|
@@ -70,20 +80,21 @@ class Temando_Temando_Model_Api_Request_Anythings extends Mage_Core_Model_Abstra
|
|
70 |
|
71 |
/**
|
72 |
* Prepares array of anythings for XML API SOAP call
|
73 |
-
*
|
74 |
* @return boolean
|
75 |
*/
|
76 |
-
public function toRequestArray()
|
|
|
77 |
if (!$this->validate()) {
|
78 |
return false;
|
79 |
}
|
80 |
$output = $this->_consolidate();
|
81 |
return $output;
|
82 |
}
|
83 |
-
|
84 |
/**
|
85 |
* Returns combined value of request items.
|
86 |
-
*
|
87 |
* @return float
|
88 |
*/
|
89 |
public function getGoodsValue()
|
@@ -100,13 +111,14 @@ class Temando_Temando_Model_Api_Request_Anythings extends Mage_Core_Model_Abstra
|
|
100 |
}
|
101 |
return (float) $goodsValue;
|
102 |
}
|
103 |
-
|
104 |
/**
|
105 |
* Basic satchel or carton consolidation - 1x satchel or carton for items up to 5kg of weight
|
106 |
-
*
|
107 |
* @return string
|
108 |
*/
|
109 |
-
protected function _consolidate()
|
|
|
110 |
$only_satchel_and_carton = true;
|
111 |
$has_carton = false;
|
112 |
$output = array();
|
@@ -158,7 +170,7 @@ class Temando_Temando_Model_Api_Request_Anythings extends Mage_Core_Model_Abstra
|
|
158 |
} else {
|
159 |
$output[] = $request;
|
160 |
}
|
161 |
-
|
162 |
if ($only_satchel_and_carton && $has_carton) {
|
163 |
foreach ($output as $k => $v) {
|
164 |
$v['packaging'] = 'Carton';
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Api Request Anythings
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Model_Api_Request_Anythings extends Mage_Core_Model_Abstract {
|
9 |
|
10 |
/**
|
13 |
protected $_anythings;
|
14 |
protected $_need_optimize = false;
|
15 |
|
16 |
+
public function _construct()
|
17 |
+
{
|
18 |
parent::_construct();
|
19 |
$this->_init('temando/api_request_anythings');
|
20 |
$this->_anythings = array();
|
21 |
}
|
22 |
|
23 |
+
public function setItems($items)
|
24 |
+
{
|
25 |
$this->_anythings = array();
|
26 |
foreach ($items as $item) {
|
27 |
if ($item->getParentItem() || $item->getIsVirtual()) {
|
43 |
return $this;
|
44 |
}
|
45 |
|
46 |
+
public function addItem($item)
|
47 |
+
{
|
48 |
if ($item instanceof Mage_Sales_Model_Quote_Item || $item instanceof Mage_Sales_Model_Order_Item || $item instanceof Mage_Sales_Model_Quote_Address_Item || $item instanceof Temando_Temando_Model_Box) {
|
49 |
if ($item instanceof Mage_Sales_Model_Quote_Item || $item instanceof Mage_Sales_Model_Order_Item || $item instanceof Mage_Sales_Model_Quote_Address_Item) {
|
50 |
$this->_need_optimize = true;
|
56 |
return $this;
|
57 |
}
|
58 |
|
59 |
+
public function getItems()
|
60 |
+
{
|
61 |
return $this->_anythings;
|
62 |
}
|
63 |
|
64 |
+
public function validate()
|
65 |
+
{
|
66 |
if (!count($this->_anythings)) {
|
67 |
// no child items
|
68 |
return false;
|
80 |
|
81 |
/**
|
82 |
* Prepares array of anythings for XML API SOAP call
|
83 |
+
*
|
84 |
* @return boolean
|
85 |
*/
|
86 |
+
public function toRequestArray()
|
87 |
+
{
|
88 |
if (!$this->validate()) {
|
89 |
return false;
|
90 |
}
|
91 |
$output = $this->_consolidate();
|
92 |
return $output;
|
93 |
}
|
94 |
+
|
95 |
/**
|
96 |
* Returns combined value of request items.
|
97 |
+
*
|
98 |
* @return float
|
99 |
*/
|
100 |
public function getGoodsValue()
|
111 |
}
|
112 |
return (float) $goodsValue;
|
113 |
}
|
114 |
+
|
115 |
/**
|
116 |
* Basic satchel or carton consolidation - 1x satchel or carton for items up to 5kg of weight
|
117 |
+
*
|
118 |
* @return string
|
119 |
*/
|
120 |
+
protected function _consolidate()
|
121 |
+
{
|
122 |
$only_satchel_and_carton = true;
|
123 |
$has_carton = false;
|
124 |
$output = array();
|
170 |
} else {
|
171 |
$output[] = $request;
|
172 |
}
|
173 |
+
|
174 |
if ($only_satchel_and_carton && $has_carton) {
|
175 |
foreach ($output as $k => $v) {
|
176 |
$v['packaging'] = 'Carton';
|
app/code/community/Temando/Temando/Model/Api/Request/Anytime.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_Api_Request_Anytime extends Mage_Core_Model_Abstract {
|
4 |
|
5 |
/**
|
@@ -12,7 +17,8 @@ class Temando_Temando_Model_Api_Request_Anytime extends Mage_Core_Model_Abstract
|
|
12 |
*/
|
13 |
protected $_ready_date = null;
|
14 |
|
15 |
-
public function _construct()
|
|
|
16 |
parent::_construct();
|
17 |
$this->_init('temando/api_request_anytime');
|
18 |
}
|
@@ -28,25 +34,29 @@ class Temando_Temando_Model_Api_Request_Anytime extends Mage_Core_Model_Abstract
|
|
28 |
* (only the date information is used, the time of day is set separately)
|
29 |
*
|
30 |
*/
|
31 |
-
public function setReadyDate($timestamp = null)
|
|
|
32 |
$this->_ready_date = Mage::helper('temando')->getReadyDate($timestamp);
|
33 |
return $this;
|
34 |
}
|
35 |
|
36 |
-
public function setReadyTimeOfDay($time_of_day = 'AM')
|
|
|
37 |
if (strtoupper($time_of_day) === 'AM' || strtoupper($time_of_day) === 'PM') {
|
38 |
$this->_ready_time_of_day = strtoupper($time_of_day);
|
39 |
}
|
40 |
return $this;
|
41 |
}
|
42 |
|
43 |
-
public function validate()
|
|
|
44 |
return
|
45 |
($this->_ready_time_of_day == 'AM' || $this->_ready_time_of_day == 'PM') &&
|
46 |
is_numeric($this->_ready_date);
|
47 |
}
|
48 |
|
49 |
-
public function toRequestArray()
|
|
|
50 |
if (!$this->validate()) {
|
51 |
return false;
|
52 |
}
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Api Request Anytime
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Model_Api_Request_Anytime extends Mage_Core_Model_Abstract {
|
9 |
|
10 |
/**
|
17 |
*/
|
18 |
protected $_ready_date = null;
|
19 |
|
20 |
+
public function _construct()
|
21 |
+
{
|
22 |
parent::_construct();
|
23 |
$this->_init('temando/api_request_anytime');
|
24 |
}
|
34 |
* (only the date information is used, the time of day is set separately)
|
35 |
*
|
36 |
*/
|
37 |
+
public function setReadyDate($timestamp = null)
|
38 |
+
{
|
39 |
$this->_ready_date = Mage::helper('temando')->getReadyDate($timestamp);
|
40 |
return $this;
|
41 |
}
|
42 |
|
43 |
+
public function setReadyTimeOfDay($time_of_day = 'AM')
|
44 |
+
{
|
45 |
if (strtoupper($time_of_day) === 'AM' || strtoupper($time_of_day) === 'PM') {
|
46 |
$this->_ready_time_of_day = strtoupper($time_of_day);
|
47 |
}
|
48 |
return $this;
|
49 |
}
|
50 |
|
51 |
+
public function validate()
|
52 |
+
{
|
53 |
return
|
54 |
($this->_ready_time_of_day == 'AM' || $this->_ready_time_of_day == 'PM') &&
|
55 |
is_numeric($this->_ready_date);
|
56 |
}
|
57 |
|
58 |
+
public function toRequestArray()
|
59 |
+
{
|
60 |
if (!$this->validate()) {
|
61 |
return false;
|
62 |
}
|
app/code/community/Temando/Temando/Model/Api/Request/Anywhere.php
CHANGED
@@ -1,40 +1,78 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_Api_Request_Anywhere extends Mage_Core_Model_Abstract
|
4 |
{
|
5 |
-
|
6 |
public function _construct()
|
7 |
{
|
8 |
parent::_construct();
|
9 |
$this->_init('temando/api_request_anywhere');
|
|
|
10 |
}
|
11 |
-
|
12 |
public function toRequestArray()
|
13 |
{
|
14 |
if (!$this->validate()) {
|
15 |
return false;
|
16 |
}
|
17 |
|
|
|
|
|
|
|
|
|
18 |
$data = array(
|
19 |
'itemNature' => 'Domestic',
|
20 |
'itemMethod' => 'Door to Door',
|
21 |
'destinationCountry' => $this->getDestinationCountry(),
|
22 |
'destinationCode' => $this->getDestinationPostcode(),
|
23 |
'destinationSuburb' => $this->getDestinationCity(),
|
24 |
-
'destinationIs' =>
|
25 |
'destinationBusNotifyBefore' => 'N',
|
26 |
'destinationBusLimitedAccess' => 'N',
|
|
|
|
|
|
|
|
|
27 |
'originBusNotifyBefore' => 'Y',
|
28 |
'originDescription' => Temando_Temando_Helper_Data::DEFAULT_WAREHOUSE_NAME
|
29 |
);
|
30 |
|
31 |
if (Mage::helper('temando')->isStreetWithPO($this->getDestinationStreet())) {
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
}
|
34 |
|
35 |
return $data;
|
36 |
}
|
37 |
-
|
38 |
public function validate()
|
39 |
{
|
40 |
return
|
@@ -42,5 +80,5 @@ class Temando_Temando_Model_Api_Request_Anywhere extends Mage_Core_Model_Abstrac
|
|
42 |
$this->getDestinationPostcode() &&
|
43 |
$this->getDestinationCity();
|
44 |
}
|
45 |
-
|
46 |
}
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Api Request Anywhere
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Model_Api_Request_Anywhere extends Mage_Core_Model_Abstract
|
9 |
{
|
10 |
+
|
11 |
public function _construct()
|
12 |
{
|
13 |
parent::_construct();
|
14 |
$this->_init('temando/api_request_anywhere');
|
15 |
+
$this->setDeliveryOptions(array());
|
16 |
}
|
17 |
+
|
18 |
public function toRequestArray()
|
19 |
{
|
20 |
if (!$this->validate()) {
|
21 |
return false;
|
22 |
}
|
23 |
|
24 |
+
switch ($this->getDestinationType()) {
|
25 |
+
|
26 |
+
case Temando_Temando_Model_Checkout_Delivery_Options::DESTINATION_BUSINESS:
|
27 |
+
|
28 |
$data = array(
|
29 |
'itemNature' => 'Domestic',
|
30 |
'itemMethod' => 'Door to Door',
|
31 |
'destinationCountry' => $this->getDestinationCountry(),
|
32 |
'destinationCode' => $this->getDestinationPostcode(),
|
33 |
'destinationSuburb' => $this->getDestinationCity(),
|
34 |
+
'destinationIs' => ucfirst(Temando_Temando_Model_Checkout_Delivery_Options::DESTINATION_BUSINESS),
|
35 |
'destinationBusNotifyBefore' => 'N',
|
36 |
'destinationBusLimitedAccess' => 'N',
|
37 |
+
'destinationBusUnattended' => array_key_exists(
|
38 |
+
'unattended_delivery',
|
39 |
+
$this->getDeliveryOptions()
|
40 |
+
) ? 'Y' : 'N',
|
41 |
'originBusNotifyBefore' => 'Y',
|
42 |
'originDescription' => Temando_Temando_Helper_Data::DEFAULT_WAREHOUSE_NAME
|
43 |
);
|
44 |
|
45 |
if (Mage::helper('temando')->isStreetWithPO($this->getDestinationStreet())) {
|
46 |
+
$data['destinationBusPostalBox'] = 'Y';
|
47 |
+
}
|
48 |
+
break;
|
49 |
+
default:
|
50 |
+
$data = array(
|
51 |
+
'itemNature' => 'Domestic',
|
52 |
+
'itemMethod' => 'Door to Door',
|
53 |
+
'destinationCountry' => $this->getDestinationCountry(),
|
54 |
+
'destinationCode' => $this->getDestinationPostcode(),
|
55 |
+
'destinationSuburb' => $this->getDestinationCity(),
|
56 |
+
'destinationIs' => ucfirst(Temando_Temando_Model_Checkout_Delivery_Options::DESTINATION_RESIDENCE),
|
57 |
+
'destinationResNotifyBefore' => 'N',
|
58 |
+
'destinationResLimitedAccess' => 'N',
|
59 |
+
'destinationResUnattended' => array_key_exists(
|
60 |
+
'unattended_delivery',
|
61 |
+
$this->getDeliveryOptions()
|
62 |
+
) ? 'Y' : 'N',
|
63 |
+
'originBusNotifyBefore' => 'Y',
|
64 |
+
'originDescription' => Temando_Temando_Helper_Data::DEFAULT_WAREHOUSE_NAME
|
65 |
+
);
|
66 |
+
|
67 |
+
if (Mage::helper('temando')->isStreetWithPO($this->getDestinationStreet())) {
|
68 |
+
$data['destinationResPostalBox'] = 'Y';
|
69 |
+
}
|
70 |
+
break;
|
71 |
}
|
72 |
|
73 |
return $data;
|
74 |
}
|
75 |
+
|
76 |
public function validate()
|
77 |
{
|
78 |
return
|
80 |
$this->getDestinationPostcode() &&
|
81 |
$this->getDestinationCity();
|
82 |
}
|
83 |
+
|
84 |
}
|
app/code/community/Temando/Temando/Model/Box.php
CHANGED
@@ -1,6 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/**
|
|
|
|
|
|
|
|
|
|
|
4 |
* @method string getShipmentId()
|
5 |
* @method string getComment()
|
6 |
* @method string getQty()
|
@@ -11,6 +15,7 @@
|
|
11 |
* @method string getWeight()
|
12 |
* @method string getWeightUnit()
|
13 |
* @method string getFragile()
|
|
|
14 |
*
|
15 |
* @method Temando_Temando_Model_Box setShipmentId()
|
16 |
* @method Temando_Temando_Model_Box setComment()
|
@@ -22,14 +27,15 @@
|
|
22 |
* @method Temando_Temando_Model_Box setWeight()
|
23 |
* @method Temando_Temando_Model_Box setWeightUnit()
|
24 |
* @method Temando_Temando_Model_Box setFragile()
|
|
|
25 |
*/
|
26 |
class Temando_Temando_Model_Box extends Mage_Core_Model_Abstract
|
27 |
{
|
28 |
-
|
29 |
public function _construct()
|
30 |
{
|
31 |
parent::_construct();
|
32 |
$this->_init('temando/box');
|
33 |
}
|
34 |
-
|
35 |
}
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
+
* Box Model
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*
|
8 |
* @method string getShipmentId()
|
9 |
* @method string getComment()
|
10 |
* @method string getQty()
|
15 |
* @method string getWeight()
|
16 |
* @method string getWeightUnit()
|
17 |
* @method string getFragile()
|
18 |
+
* @method string getDangerous()
|
19 |
*
|
20 |
* @method Temando_Temando_Model_Box setShipmentId()
|
21 |
* @method Temando_Temando_Model_Box setComment()
|
27 |
* @method Temando_Temando_Model_Box setWeight()
|
28 |
* @method Temando_Temando_Model_Box setWeightUnit()
|
29 |
* @method Temando_Temando_Model_Box setFragile()
|
30 |
+
* @method Temando_Temando_Model_Box setDangerous()
|
31 |
*/
|
32 |
class Temando_Temando_Model_Box extends Mage_Core_Model_Abstract
|
33 |
{
|
34 |
+
|
35 |
public function _construct()
|
36 |
{
|
37 |
parent::_construct();
|
38 |
$this->_init('temando/box');
|
39 |
}
|
40 |
+
|
41 |
}
|
app/code/community/Temando/Temando/Model/Carrier.php
CHANGED
@@ -1,6 +1,11 @@
|
|
1 |
<?php
|
2 |
|
3 |
/**
|
|
|
|
|
|
|
|
|
|
|
4 |
* @method Temando_Temando_Model_Carrier setCarrierId()
|
5 |
* @method Temando_Temando_Model_Carrier setCompanyName()
|
6 |
* @method Temando_Temando_Model_Carrier setCompanyContact()
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
+
* Carrier Model
|
5 |
+
*
|
6 |
+
* @package Temando_Temando
|
7 |
+
* @author Temando Magento Team <marketing@temando.com>
|
8 |
+
*
|
9 |
* @method Temando_Temando_Model_Carrier setCarrierId()
|
10 |
* @method Temando_Temando_Model_Carrier setCompanyName()
|
11 |
* @method Temando_Temando_Model_Carrier setCompanyContact()
|
app/code/community/Temando/Temando/Model/Checkout/Delivery/Options.php
ADDED
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Checkout Delivery Options
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_Checkout_Delivery_Options extends Mage_Core_Model_Abstract
|
9 |
+
{
|
10 |
+
|
11 |
+
const DESTINATION_RESIDENCE = 'residence';
|
12 |
+
const DESTINATION_BUSINESS = 'business';
|
13 |
+
|
14 |
+
/**
|
15 |
+
* All available delivery options
|
16 |
+
* key must be the same as defined in system.xml
|
17 |
+
*/
|
18 |
+
protected $_allOptions = array(
|
19 |
+
self::DESTINATION_RESIDENCE => array(
|
20 |
+
'unattended_delivery' => 'Unattended delivery',
|
21 |
+
),
|
22 |
+
self::DESTINATION_BUSINESS => array(
|
23 |
+
)
|
24 |
+
);
|
25 |
+
|
26 |
+
/**
|
27 |
+
* Delivery options enabled in system configuration
|
28 |
+
*
|
29 |
+
* @var array
|
30 |
+
*/
|
31 |
+
protected $_enabledOptions = null;
|
32 |
+
|
33 |
+
|
34 |
+
public function __construct()
|
35 |
+
{
|
36 |
+
parent::__construct();
|
37 |
+
}
|
38 |
+
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Returns enabled checkout options
|
42 |
+
*
|
43 |
+
* @return array
|
44 |
+
*/
|
45 |
+
public function getEnabledOptions()
|
46 |
+
{
|
47 |
+
if (!$this->_enabledOptions) {
|
48 |
+
foreach ($this->_allOptions as $destType => $options) {
|
49 |
+
foreach ($options as $key => $description) {
|
50 |
+
if ($this->getConfigData("checkout/{$key}")) {
|
51 |
+
$this->_enabledOptions[$destType][$key] = $description;
|
52 |
+
}
|
53 |
+
}
|
54 |
+
}
|
55 |
+
}
|
56 |
+
return $this->_enabledOptions;
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Return all available delivery options
|
61 |
+
*
|
62 |
+
* @return array
|
63 |
+
*/
|
64 |
+
public function getAllOptions()
|
65 |
+
{
|
66 |
+
return $this->_allOptions;
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Retrieve Temando system configuration value
|
71 |
+
*
|
72 |
+
* @param string $field The identifier of config entry
|
73 |
+
* @return mixed
|
74 |
+
*/
|
75 |
+
public function getConfigData($field)
|
76 |
+
{
|
77 |
+
return Mage::helper('temando')->getConfigData($field);
|
78 |
+
}
|
79 |
+
}
|
app/code/community/Temando/Temando/Model/Entity/Attribute/Source/Packaging.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_Entity_Attribute_Source_Packaging extends Mage_Eav_Model_Entity_Attribute_Source_Abstract
|
4 |
{
|
5 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Entity Attribute Source Packaging
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Model_Entity_Attribute_Source_Packaging extends Mage_Eav_Model_Entity_Attribute_Source_Abstract
|
9 |
{
|
10 |
|
app/code/community/Temando/Temando/Model/Entity/Attribute/Source/Packaging/Mode.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
public function getAllOptions()
|
@@ -58,7 +64,5 @@ class Temando_Temando_Model_Entity_Attribute_Source_Packaging_Mode extends Mage_
|
|
58 |
{
|
59 |
return Mage::getResourceModel('eav/entity_attribute')
|
60 |
->getFlatUpdateSelect($this->getAttribute(), $store);
|
61 |
-
}
|
62 |
-
|
63 |
}
|
64 |
-
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Entity Attribute Source Packaging Mode
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_Entity_Attribute_Source_Packaging_Mode
|
9 |
+
extends Mage_Eav_Model_Entity_Attribute_Source_Abstract
|
10 |
{
|
11 |
|
12 |
public function getAllOptions()
|
64 |
{
|
65 |
return Mage::getResourceModel('eav/entity_attribute')
|
66 |
->getFlatUpdateSelect($this->getAttribute(), $store);
|
67 |
+
}
|
|
|
68 |
}
|
|
app/code/community/Temando/Temando/Model/Manifest.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_Manifest extends Mage_Core_Model_Abstract
|
4 |
{
|
5 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Manifest Model
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Model_Manifest extends Mage_Core_Model_Abstract
|
9 |
{
|
10 |
|
app/code/community/Temando/Temando/Model/Mysql4/Box.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_Mysql4_Box extends Mage_Core_Model_Mysql4_Abstract
|
4 |
{
|
5 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Mysql4 Box
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Model_Mysql4_Box extends Mage_Core_Model_Mysql4_Abstract
|
9 |
{
|
10 |
|
app/code/community/Temando/Temando/Model/Mysql4/Box/Collection.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
public function _construct()
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Mysql4 Box Collection
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_Mysql4_Box_Collection
|
9 |
+
extends Mage_Core_Model_Mysql4_Collection_Abstract
|
10 |
{
|
11 |
|
12 |
public function _construct()
|
app/code/community/Temando/Temando/Model/Mysql4/Carrier.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
public function _construct()
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Mysql4 Carrier
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_Mysql4_Carrier
|
9 |
+
extends Mage_Core_Model_Mysql4_Abstract
|
10 |
{
|
11 |
|
12 |
public function _construct()
|
app/code/community/Temando/Temando/Model/Mysql4/Carrier/Collection.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
public function _construct()
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Mysql4 Carrier Collection
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_Mysql4_Carrier_Collection
|
9 |
+
extends Mage_Core_Model_Mysql4_Collection_Abstract
|
10 |
{
|
11 |
|
12 |
public function _construct()
|
app/code/community/Temando/Temando/Model/Mysql4/Manifest.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
public function _construct()
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Mysql4 Manifest
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_Mysql4_Manifest
|
9 |
+
extends Mage_Core_Model_Mysql4_Abstract
|
10 |
{
|
11 |
|
12 |
public function _construct()
|
app/code/community/Temando/Temando/Model/Mysql4/Manifest/Collection.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
public function _construct()
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Mysql4 Manifest Collection
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_Mysql4_Manifest_Collection
|
9 |
+
extends Mage_Core_Model_Mysql4_Collection_Abstract
|
10 |
{
|
11 |
|
12 |
public function _construct()
|
app/code/community/Temando/Temando/Model/Mysql4/Quote.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_Mysql4_Quote extends Mage_Core_Model_Mysql4_Abstract
|
4 |
{
|
5 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Mysql4 Quote
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Model_Mysql4_Quote extends Mage_Core_Model_Mysql4_Abstract
|
9 |
{
|
10 |
|
app/code/community/Temando/Temando/Model/Mysql4/Quote/Collection.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_Mysql4_Quote_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
{
|
5 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Mysql4 Quote Collection
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Model_Mysql4_Quote_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
9 |
{
|
10 |
|
app/code/community/Temando/Temando/Model/Mysql4/Shipment.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_Mysql4_Shipment extends Mage_Core_Model_Mysql4_Abstract
|
4 |
{
|
5 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Mysql4 Shipment
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Model_Mysql4_Shipment extends Mage_Core_Model_Mysql4_Abstract
|
9 |
{
|
10 |
|
app/code/community/Temando/Temando/Model/Mysql4/Shipment/Collection.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
public function _construct()
|
@@ -8,22 +14,23 @@ class Temando_Temando_Model_Mysql4_Shipment_Collection extends Mage_Core_Model_M
|
|
8 |
parent::_construct();
|
9 |
$this->_init('temando/shipment');
|
10 |
}
|
11 |
-
|
12 |
/**
|
13 |
* Returns the shipment associated to an order or null if none
|
14 |
-
*
|
15 |
* NO SUPPORT FOR PARTIAL-SHIPMENTS HERE; ONLY 1 IS RETURNED
|
16 |
-
*
|
17 |
* @param string $orderId
|
18 |
-
* @return null|\Temando_Temando_Model_Shipment
|
19 |
*/
|
20 |
-
public function loadByOrderId($orderId)
|
|
|
21 |
if(!$orderId) return false;
|
22 |
-
|
23 |
$this->addFieldToFilter('order_id', $orderId)->load();
|
24 |
if($this->count())
|
25 |
return $this->getFirstItem ();
|
26 |
-
|
27 |
return false;
|
28 |
-
}
|
29 |
}
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Mysql4 Shipment Collection
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_Mysql4_Shipment_Collection
|
9 |
+
extends Mage_Core_Model_Mysql4_Collection_Abstract
|
10 |
{
|
11 |
|
12 |
public function _construct()
|
14 |
parent::_construct();
|
15 |
$this->_init('temando/shipment');
|
16 |
}
|
17 |
+
|
18 |
/**
|
19 |
* Returns the shipment associated to an order or null if none
|
20 |
+
*
|
21 |
* NO SUPPORT FOR PARTIAL-SHIPMENTS HERE; ONLY 1 IS RETURNED
|
22 |
+
*
|
23 |
* @param string $orderId
|
24 |
+
* @return null|\Temando_Temando_Model_Shipment
|
25 |
*/
|
26 |
+
public function loadByOrderId($orderId)
|
27 |
+
{
|
28 |
if(!$orderId) return false;
|
29 |
+
|
30 |
$this->addFieldToFilter('order_id', $orderId)->load();
|
31 |
if($this->count())
|
32 |
return $this->getFirstItem ();
|
33 |
+
|
34 |
return false;
|
35 |
+
}
|
36 |
}
|
app/code/community/Temando/Temando/Model/Observer.php
CHANGED
@@ -1,8 +1,13 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_Observer
|
4 |
{
|
5 |
-
|
6 |
/**
|
7 |
* Handles sales_order_place_after event
|
8 |
*/
|
@@ -12,28 +17,35 @@ class Temando_Temando_Model_Observer
|
|
12 |
/* @var $order Mage_Sales_Model_Order */
|
13 |
|
14 |
$shippingMethod = $order->getShippingMethod();
|
15 |
-
$__t = explode('_', $shippingMethod);
|
16 |
if ($__t[0] != 'temando') {
|
17 |
return;
|
18 |
}
|
19 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
$selected_quote_id = preg_replace('#^[^_]*_#', '', $shippingMethod);
|
21 |
$selected_options = preg_replace('#^([^_]*_){2}#', '', $shippingMethod);
|
22 |
-
|
23 |
$selected_quote = Mage::getModel('temando/quote')->load($selected_quote_id);
|
24 |
if(!$selected_quote->getId()) {
|
25 |
//try loading cheapeast quote
|
26 |
try {
|
27 |
-
$selected_quote = $this->loadCheapestQuote($order);
|
28 |
/* @var $selected_quote Temando_Temando_Model_Quote */
|
29 |
} catch (Exception $e) {
|
30 |
$selected_quote = null;
|
31 |
-
}
|
32 |
}
|
33 |
-
|
34 |
$temando_shipment = Mage::getModel('temando/shipment');
|
35 |
/* @var $temando_shipment Temando_Temando_Model_Shipment */
|
36 |
-
|
37 |
if(Mage::helper('temando')->isQuoteDynamic($selected_quote_id)) {
|
38 |
//DYNAMIC: carrier quote selected by customer - must have at least 1 available quote
|
39 |
$temando_shipment
|
@@ -44,20 +56,20 @@ class Temando_Temando_Model_Observer
|
|
44 |
$temando_shipment
|
45 |
->setCustomerSelectedQuoteDescription($selected_quote->getDescription())
|
46 |
->setAnticipatedCost($selected_quote->getTotalPrice());
|
47 |
-
|
48 |
} else {
|
49 |
//STATIC: flat rate / free shipping selected by customer
|
50 |
$temando_shipment
|
51 |
->setCustomerSelectedQuoteDescription($selected_quote_id == Temando_Temando_Model_Carrier::FLAT_RATE ? Mage::helper('temando')->__('Flat Rate') : Mage::helper('temando')->__('Free Shipping'))
|
52 |
->setCustomerSelectedOptions('insurance_N_carbonoffset_N_footprints_N');
|
53 |
-
|
54 |
if($selected_quote instanceof Temando_Temando_Model_Quote) {
|
55 |
//set cheapest as admin selected
|
56 |
$temando_shipment->setAdminSelectedQuoteId($selected_quote->getId())
|
57 |
->setAnticipatedCost($selected_quote->getTotalPrice());
|
58 |
}
|
59 |
}
|
60 |
-
|
61 |
$email = $order->getShippingAddress()->getEmail();
|
62 |
if(!$email) {
|
63 |
$email = $order->getCustomerEmail();
|
@@ -72,18 +84,23 @@ class Temando_Temando_Model_Observer
|
|
72 |
->setDestinationRegion($order->getShippingAddress()->getRegionCode())
|
73 |
->setDestinationPhone($order->getShippingAddress()->getTelephone())
|
74 |
->setDestinationEmail($email)
|
|
|
|
|
|
|
|
|
75 |
->setDestinationCountry($order->getShippingAddress()->getCountryId())
|
76 |
->setDestinationPostcode($order->getShippingAddress()->getPostcode())
|
77 |
->setDestinationCity($order->getShippingAddress()->getCity())
|
78 |
->setReadyTime('AM')
|
|
|
79 |
->save();
|
80 |
-
|
81 |
foreach ($order->getAllVisibleItems() as $item) {
|
82 |
$product = Mage::getModel('catalog/product')->load($item->getProductId());
|
83 |
if($product->isVirtual()) { continue; }
|
84 |
-
|
85 |
Mage::helper('temando')->applyTemandoParamsToItem($item);
|
86 |
-
|
87 |
$qty = $item->getQty() ? $item->getQty() : $item->getQtyOrdered();
|
88 |
$box = Mage::getModel('temando/box');
|
89 |
/* @var $box Temando_Temando_Model_Box */
|
@@ -100,12 +117,13 @@ class Temando_Temando_Model_Observer
|
|
100 |
->setWeightUnit(Mage::helper('temando')->getConfigData('units/weight'))
|
101 |
->setPackaging($item->getTemandoPackaging())
|
102 |
->setFragile($item->getTemandoFragile())
|
|
|
103 |
->save();
|
104 |
}
|
105 |
}
|
106 |
|
107 |
-
|
108 |
-
protected function loadCheapestQuote($order)
|
109 |
{
|
110 |
$allowed_carriers = explode(',', Mage::getStoreConfig('carriers/temando/allowed_methods'));
|
111 |
$request = Mage::getModel('temando/api_request');
|
@@ -119,18 +137,20 @@ class Temando_Temando_Model_Observer
|
|
119 |
$order->getShippingAddress()->getCountry(),
|
120 |
$order->getShippingAddress()->getPostcode(),
|
121 |
$order->getShippingAddress()->getCity(),
|
122 |
-
$order->getShippingAddress()->getStreet1()
|
|
|
123 |
->setItems($order->getAllItems())
|
124 |
->setReady()
|
|
|
125 |
->setAllowedCarriers($allowed_carriers);
|
126 |
|
127 |
$quotes = $request->getQuotes();
|
128 |
if ($quotes instanceof Temando_Temando_Model_Mysql4_Quote_Collection) {
|
129 |
return Mage::helper('temando/functions')->getCheapestQuote($quotes->getItems());
|
130 |
}
|
131 |
-
return null;
|
132 |
}
|
133 |
-
|
134 |
|
135 |
public function hookCartSaveAddress($observer)
|
136 |
{
|
@@ -146,5 +166,20 @@ class Temando_Temando_Model_Observer
|
|
146 |
Mage::getSingleton('customer/session')->setData('estimate_product_shipping', new Varien_Object($data));
|
147 |
}
|
148 |
}
|
149 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
150 |
}
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Temando Observer
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Model_Observer
|
9 |
{
|
10 |
+
|
11 |
/**
|
12 |
* Handles sales_order_place_after event
|
13 |
*/
|
17 |
/* @var $order Mage_Sales_Model_Order */
|
18 |
|
19 |
$shippingMethod = $order->getShippingMethod();
|
20 |
+
$__t = explode('_', $shippingMethod);
|
21 |
if ($__t[0] != 'temando') {
|
22 |
return;
|
23 |
}
|
24 |
|
25 |
+
//prepare data from request/session
|
26 |
+
$destinationType = Mage::getSingleton('checkout/session')->getData('destination_type');
|
27 |
+
$delivery_options = Mage::getSingleton('checkout/session')->getData('selected_delivery_options');
|
28 |
+
if (!is_array($delivery_options)) {
|
29 |
+
$delivery_options = array();
|
30 |
+
}
|
31 |
+
|
32 |
$selected_quote_id = preg_replace('#^[^_]*_#', '', $shippingMethod);
|
33 |
$selected_options = preg_replace('#^([^_]*_){2}#', '', $shippingMethod);
|
34 |
+
|
35 |
$selected_quote = Mage::getModel('temando/quote')->load($selected_quote_id);
|
36 |
if(!$selected_quote->getId()) {
|
37 |
//try loading cheapeast quote
|
38 |
try {
|
39 |
+
$selected_quote = $this->loadCheapestQuote($order, $delivery_options, $destinationType);
|
40 |
/* @var $selected_quote Temando_Temando_Model_Quote */
|
41 |
} catch (Exception $e) {
|
42 |
$selected_quote = null;
|
43 |
+
}
|
44 |
}
|
45 |
+
|
46 |
$temando_shipment = Mage::getModel('temando/shipment');
|
47 |
/* @var $temando_shipment Temando_Temando_Model_Shipment */
|
48 |
+
|
49 |
if(Mage::helper('temando')->isQuoteDynamic($selected_quote_id)) {
|
50 |
//DYNAMIC: carrier quote selected by customer - must have at least 1 available quote
|
51 |
$temando_shipment
|
56 |
$temando_shipment
|
57 |
->setCustomerSelectedQuoteDescription($selected_quote->getDescription())
|
58 |
->setAnticipatedCost($selected_quote->getTotalPrice());
|
59 |
+
|
60 |
} else {
|
61 |
//STATIC: flat rate / free shipping selected by customer
|
62 |
$temando_shipment
|
63 |
->setCustomerSelectedQuoteDescription($selected_quote_id == Temando_Temando_Model_Carrier::FLAT_RATE ? Mage::helper('temando')->__('Flat Rate') : Mage::helper('temando')->__('Free Shipping'))
|
64 |
->setCustomerSelectedOptions('insurance_N_carbonoffset_N_footprints_N');
|
65 |
+
|
66 |
if($selected_quote instanceof Temando_Temando_Model_Quote) {
|
67 |
//set cheapest as admin selected
|
68 |
$temando_shipment->setAdminSelectedQuoteId($selected_quote->getId())
|
69 |
->setAnticipatedCost($selected_quote->getTotalPrice());
|
70 |
}
|
71 |
}
|
72 |
+
|
73 |
$email = $order->getShippingAddress()->getEmail();
|
74 |
if(!$email) {
|
75 |
$email = $order->getCustomerEmail();
|
84 |
->setDestinationRegion($order->getShippingAddress()->getRegionCode())
|
85 |
->setDestinationPhone($order->getShippingAddress()->getTelephone())
|
86 |
->setDestinationEmail($email)
|
87 |
+
->setDestinationType(
|
88 |
+
$destinationType ? $destinationType :
|
89 |
+
Temando_Temando_Model_Checkout_Delivery_Options::DESTINATION_RESIDENCE
|
90 |
+
)
|
91 |
->setDestinationCountry($order->getShippingAddress()->getCountryId())
|
92 |
->setDestinationPostcode($order->getShippingAddress()->getPostcode())
|
93 |
->setDestinationCity($order->getShippingAddress()->getCity())
|
94 |
->setReadyTime('AM')
|
95 |
+
->setCustomerSelectedDeliveryOptions(implode(',', array_keys($delivery_options)))
|
96 |
->save();
|
97 |
+
|
98 |
foreach ($order->getAllVisibleItems() as $item) {
|
99 |
$product = Mage::getModel('catalog/product')->load($item->getProductId());
|
100 |
if($product->isVirtual()) { continue; }
|
101 |
+
|
102 |
Mage::helper('temando')->applyTemandoParamsToItem($item);
|
103 |
+
|
104 |
$qty = $item->getQty() ? $item->getQty() : $item->getQtyOrdered();
|
105 |
$box = Mage::getModel('temando/box');
|
106 |
/* @var $box Temando_Temando_Model_Box */
|
117 |
->setWeightUnit(Mage::helper('temando')->getConfigData('units/weight'))
|
118 |
->setPackaging($item->getTemandoPackaging())
|
119 |
->setFragile($item->getTemandoFragile())
|
120 |
+
->setDangerous($item->getTemandoDangerous())
|
121 |
->save();
|
122 |
}
|
123 |
}
|
124 |
|
125 |
+
|
126 |
+
protected function loadCheapestQuote($order, $delivery_options, $destinationType)
|
127 |
{
|
128 |
$allowed_carriers = explode(',', Mage::getStoreConfig('carriers/temando/allowed_methods'));
|
129 |
$request = Mage::getModel('temando/api_request');
|
137 |
$order->getShippingAddress()->getCountry(),
|
138 |
$order->getShippingAddress()->getPostcode(),
|
139 |
$order->getShippingAddress()->getCity(),
|
140 |
+
$order->getShippingAddress()->getStreet1(),
|
141 |
+
$destinationType)
|
142 |
->setItems($order->getAllItems())
|
143 |
->setReady()
|
144 |
+
->setDeliveryOptions($delivery_options)
|
145 |
->setAllowedCarriers($allowed_carriers);
|
146 |
|
147 |
$quotes = $request->getQuotes();
|
148 |
if ($quotes instanceof Temando_Temando_Model_Mysql4_Quote_Collection) {
|
149 |
return Mage::helper('temando/functions')->getCheapestQuote($quotes->getItems());
|
150 |
}
|
151 |
+
return null;
|
152 |
}
|
153 |
+
|
154 |
|
155 |
public function hookCartSaveAddress($observer)
|
156 |
{
|
166 |
Mage::getSingleton('customer/session')->setData('estimate_product_shipping', new Varien_Object($data));
|
167 |
}
|
168 |
}
|
169 |
+
|
170 |
+
/**
|
171 |
+
* Saves the destination type in the session if entered in the
|
172 |
+
* cart page
|
173 |
+
*
|
174 |
+
* @return \Temando_Temando_Model_Observer
|
175 |
+
*/
|
176 |
+
public function saveDestinationType()
|
177 |
+
{
|
178 |
+
$destinationType = Mage::app()->getRequest()->getParam('destination-type');
|
179 |
+
if ($destinationType) {
|
180 |
+
Mage::getSingleton('checkout/session')->setData(
|
181 |
+
'destination_type', $destinationType);
|
182 |
+
}
|
183 |
+
return $this;
|
184 |
+
}
|
185 |
}
|
app/code/community/Temando/Temando/Model/Option/Abstract.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
abstract class Temando_Temando_Model_Option_Abstract extends Varien_Object
|
4 |
{
|
5 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Option Abstract
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
abstract class Temando_Temando_Model_Option_Abstract extends Varien_Object
|
9 |
{
|
10 |
|
app/code/community/Temando/Temando/Model/Option/Action/Abstract.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
abstract class Temando_Temando_Model_Option_Action_Abstract extends Varien_Object
|
4 |
{
|
5 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Option Action Abstract
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
abstract class Temando_Temando_Model_Option_Action_Abstract extends Varien_Object
|
9 |
{
|
10 |
|
app/code/community/Temando/Temando/Model/Option/Action/Carbon.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_Option_Action_Carbon extends Temando_Temando_Model_Option_Action_Abstract
|
4 |
{
|
5 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Option Action Carbon
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Model_Option_Action_Carbon extends Temando_Temando_Model_Option_Action_Abstract
|
9 |
{
|
10 |
|
app/code/community/Temando/Temando/Model/Option/Action/Footprints.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
public function apply(&$quote)
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Option Action Footprints
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_Option_Action_Footprints
|
9 |
+
extends Temando_Temando_Model_Option_Action_Abstract
|
10 |
{
|
11 |
|
12 |
public function apply(&$quote)
|
app/code/community/Temando/Temando/Model/Option/Action/Insurance.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
public function apply(&$quote)
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Option Action Insurance
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_Option_Action_Insurance
|
9 |
+
extends Temando_Temando_Model_Option_Action_Abstract
|
10 |
{
|
11 |
|
12 |
public function apply(&$quote)
|
app/code/community/Temando/Temando/Model/Option/Action/Markup.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
/**
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Option Action Markup
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_Option_Action_Markup
|
9 |
+
extends Temando_Temando_Model_Option_Action_Abstract
|
10 |
{
|
11 |
|
12 |
/**
|
app/code/community/Temando/Temando/Model/Option/Boolean.php
CHANGED
@@ -1,6 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/**
|
|
|
|
|
|
|
|
|
|
|
4 |
* A boolean (yes/no) option.
|
5 |
*
|
6 |
* The action (specified by $this->_action_type) is applied to quotes if the
|
@@ -13,10 +17,10 @@
|
|
13 |
*/
|
14 |
abstract class Temando_Temando_Model_Option_Boolean extends Temando_Temando_Model_Option_Abstract
|
15 |
{
|
16 |
-
|
17 |
const YES = 'Y';
|
18 |
const NO = 'N';
|
19 |
-
|
20 |
protected function _setupValues()
|
21 |
{
|
22 |
$this->_values= array(
|
@@ -24,7 +28,7 @@ abstract class Temando_Temando_Model_Option_Boolean extends Temando_Temando_Mode
|
|
24 |
self::NO => Mage::helper('temando')->__('No'),
|
25 |
);
|
26 |
}
|
27 |
-
|
28 |
/**
|
29 |
* Only apply the action if the forced value is self::YES, or the value
|
30 |
* is self::YES (as long as the forced value isn't self::NO).
|
@@ -42,5 +46,5 @@ abstract class Temando_Temando_Model_Option_Boolean extends Temando_Temando_Mode
|
|
42 |
return false;
|
43 |
}
|
44 |
}
|
45 |
-
|
46 |
}
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
+
* Option Boolean
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*
|
8 |
* A boolean (yes/no) option.
|
9 |
*
|
10 |
* The action (specified by $this->_action_type) is applied to quotes if the
|
17 |
*/
|
18 |
abstract class Temando_Temando_Model_Option_Boolean extends Temando_Temando_Model_Option_Abstract
|
19 |
{
|
20 |
+
|
21 |
const YES = 'Y';
|
22 |
const NO = 'N';
|
23 |
+
|
24 |
protected function _setupValues()
|
25 |
{
|
26 |
$this->_values= array(
|
28 |
self::NO => Mage::helper('temando')->__('No'),
|
29 |
);
|
30 |
}
|
31 |
+
|
32 |
/**
|
33 |
* Only apply the action if the forced value is self::YES, or the value
|
34 |
* is self::YES (as long as the forced value isn't self::NO).
|
46 |
return false;
|
47 |
}
|
48 |
}
|
49 |
+
|
50 |
}
|
app/code/community/Temando/Temando/Model/Option/Carbonoffset.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_Option_Carbonoffset extends Temando_Temando_Model_Option_Boolean
|
4 |
{
|
5 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Option Carbonoffset
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Model_Option_Carbonoffset extends Temando_Temando_Model_Option_Boolean
|
9 |
{
|
10 |
|
app/code/community/Temando/Temando/Model/Option/Footprints.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
protected $_id = 'footprints';
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Option Footprints
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_Option_Footprints
|
9 |
+
extends Temando_Temando_Model_Option_Boolean
|
10 |
{
|
11 |
|
12 |
protected $_id = 'footprints';
|
app/code/community/Temando/Temando/Model/Option/Insurance.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_Option_Insurance extends Temando_Temando_Model_Option_Boolean
|
4 |
{
|
5 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Option Insurance
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Model_Option_Insurance extends Temando_Temando_Model_Option_Boolean
|
9 |
{
|
10 |
|
app/code/community/Temando/Temando/Model/Options.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_Options extends Varien_Data_Collection
|
4 |
{
|
5 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Options Model
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Model_Options extends Varien_Data_Collection
|
9 |
{
|
10 |
|
app/code/community/Temando/Temando/Model/Pcs.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
/**
|
|
|
|
|
|
|
|
|
|
|
3 |
* @method Temando_Temando_Model_Pcs setCountry()
|
4 |
* @method Temando_Temando_Model_Pcs setQuery()
|
5 |
*
|
1 |
<?php
|
2 |
/**
|
3 |
+
* Pcs Model
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*
|
8 |
* @method Temando_Temando_Model_Pcs setCountry()
|
9 |
* @method Temando_Temando_Model_Pcs setQuery()
|
10 |
*
|
app/code/community/Temando/Temando/Model/Quote.php
CHANGED
@@ -1,6 +1,11 @@
|
|
1 |
<?php
|
2 |
|
3 |
/**
|
|
|
|
|
|
|
|
|
|
|
4 |
* @method Temando_Temando_Model_Quote setGenerated()
|
5 |
* @method Temando_Temando_Model_Quote setAccepted()
|
6 |
* @method Temando_Temando_Model_Quote setTotalPrice()
|
@@ -45,20 +50,20 @@
|
|
45 |
*/
|
46 |
class Temando_Temando_Model_Quote extends Mage_Core_Model_Abstract
|
47 |
{
|
48 |
-
|
49 |
protected $_carrier = null;
|
50 |
-
|
51 |
public function _construct()
|
52 |
{
|
53 |
parent::_construct();
|
54 |
$this->_init('temando/quote');
|
55 |
}
|
56 |
-
|
57 |
public function __clone()
|
58 |
{
|
59 |
$this->_carrier = clone $this->getCarrier();
|
60 |
}
|
61 |
-
|
62 |
/**
|
63 |
* Sets the carrier providing this quote.
|
64 |
*
|
@@ -70,7 +75,7 @@ class Temando_Temando_Model_Quote extends Mage_Core_Model_Abstract
|
|
70 |
{
|
71 |
$carrier = Mage::getModel('temando/carrier')
|
72 |
->load($carrier_id);
|
73 |
-
|
74 |
if ($carrier->getId() == $carrier_id) {
|
75 |
// exists in the database
|
76 |
$this->_carrier = $carrier;
|
@@ -78,7 +83,7 @@ class Temando_Temando_Model_Quote extends Mage_Core_Model_Abstract
|
|
78 |
}
|
79 |
return $this;
|
80 |
}
|
81 |
-
|
82 |
/**
|
83 |
* Gets the carrier providing this quote.
|
84 |
*
|
@@ -91,7 +96,7 @@ class Temando_Temando_Model_Quote extends Mage_Core_Model_Abstract
|
|
91 |
}
|
92 |
return $this->_carrier;
|
93 |
}
|
94 |
-
|
95 |
/**
|
96 |
* Loads values into this object from a
|
97 |
*
|
@@ -103,7 +108,7 @@ class Temando_Temando_Model_Quote extends Mage_Core_Model_Abstract
|
|
103 |
if ($response instanceof stdClass) {
|
104 |
$carrier = Mage::getModel('temando/carrier')->load($response->carrier->id, 'carrier_id');
|
105 |
/* @var $carrier Temando_Temando_Model_Carrier */
|
106 |
-
|
107 |
$carrier
|
108 |
->setCarrierId(isset($response->carrier->id) ? $response->carrier->id : '')
|
109 |
->setCompanyName(isset($response->carrier->companyName) ? $response->carrier->companyName : '')
|
@@ -124,14 +129,14 @@ class Temando_Temando_Model_Quote extends Mage_Core_Model_Abstract
|
|
124 |
->setEmail(isset($response->carrier->email) ? $response->carrier->email : '')
|
125 |
->setWebsite(isset($response->carrier->website) ? $response->carrier->website : '')
|
126 |
->save();
|
127 |
-
|
128 |
-
$extras = $response->extras->extra;
|
129 |
if (!is_array($extras)) {
|
130 |
$extras = array($extras);
|
131 |
}
|
132 |
-
|
133 |
$extras_array = array();
|
134 |
-
|
135 |
foreach ($extras as $extra) {
|
136 |
$extra_id = trim(strtolower($extra->summary));
|
137 |
$extra_id = str_replace(' ', '', $extra_id);
|
@@ -143,10 +148,17 @@ class Temando_Temando_Model_Quote extends Mage_Core_Model_Abstract
|
|
143 |
'tax' => $extra->tax,
|
144 |
);
|
145 |
}
|
146 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
$this
|
148 |
->setCarrier($carrier->getId())
|
149 |
-
->setAccepted($
|
150 |
->setTotalPrice($response->totalPrice)
|
151 |
->setBasePrice($response->basePrice)
|
152 |
->setTax($response->tax)
|
@@ -163,29 +175,29 @@ class Temando_Temando_Model_Quote extends Mage_Core_Model_Abstract
|
|
163 |
}
|
164 |
return $this;
|
165 |
}
|
166 |
-
|
167 |
public function toBookingRequestArray($options)
|
168 |
{
|
169 |
$extras = $this->getExtras();
|
170 |
-
|
171 |
if (isset($options['insurance']) && ($options['insurance'] === 'Y')) {
|
172 |
$insurance = $extras['insurance'];
|
173 |
} else {
|
174 |
$insurance = false;
|
175 |
}
|
176 |
-
|
177 |
if (isset($options['carbonoffset']) && ($options['carbonoffset'] === 'Y')) {
|
178 |
$carbon = $extras['carbonoffset'];
|
179 |
} else {
|
180 |
$carbon = false;
|
181 |
}
|
182 |
-
|
183 |
if (isset($options['footprints']) && ($options['footprints'] === 'Y')) {
|
184 |
$footprints = $extras['footprints'];
|
185 |
} else {
|
186 |
$footprints = false;
|
187 |
}
|
188 |
-
|
189 |
$request = array(
|
190 |
'totalPrice' => $this->getTotalPrice(),
|
191 |
'basePrice' => $this->getBasePrice(),
|
@@ -197,12 +209,12 @@ class Temando_Temando_Model_Quote extends Mage_Core_Model_Abstract
|
|
197 |
'guaranteedEta' => $this->getGuaranteedEta() ? 'Y' : 'N',
|
198 |
'carrierId' => $this->getCarrier()->getCarrierId(),
|
199 |
);
|
200 |
-
|
201 |
if ($carbon || $insurance || $footprints) {
|
202 |
$request['extras'] = array();
|
203 |
$request['extras']['extra'] = array();
|
204 |
}
|
205 |
-
|
206 |
if ($carbon) {
|
207 |
$request['extras']['extra'][] = $carbon;
|
208 |
}
|
@@ -212,16 +224,16 @@ class Temando_Temando_Model_Quote extends Mage_Core_Model_Abstract
|
|
212 |
if ($footprints) {
|
213 |
$request['extras']['extra'][] = $footprints;
|
214 |
}
|
215 |
-
|
216 |
return $request;
|
217 |
}
|
218 |
-
|
219 |
public function setExtras($extras)
|
220 |
{
|
221 |
$this->setData('extras', serialize($extras));
|
222 |
return $this;
|
223 |
}
|
224 |
-
|
225 |
public function getExtras()
|
226 |
{
|
227 |
if ($this->getData('extras')) {
|
@@ -229,12 +241,12 @@ class Temando_Temando_Model_Quote extends Mage_Core_Model_Abstract
|
|
229 |
}
|
230 |
return null;
|
231 |
}
|
232 |
-
|
233 |
public function getDescription($showMethod = true, $showEta = true)
|
234 |
{
|
235 |
-
$title = '';
|
236 |
$title .= $this->getCarrier()->getCompanyName();
|
237 |
-
|
238 |
if ($showMethod && $showEta) {
|
239 |
$title .= ' - ' . $this->getDeliveryMethod(). ' [' . $this->getEtaDescription() . ']';
|
240 |
} else if ($showMethod) {
|
@@ -242,11 +254,11 @@ class Temando_Temando_Model_Quote extends Mage_Core_Model_Abstract
|
|
242 |
} else if ($showEta) {
|
243 |
$title .= ' [' . $this->getEtaDescription(). ']';
|
244 |
}
|
245 |
-
|
246 |
return $title . ' ' . $this->getExtraTitle();;
|
247 |
}
|
248 |
-
|
249 |
-
|
250 |
public function getTotalPriceIncSelectedExtras()
|
251 |
{
|
252 |
$price = $this->getTotalPrice();
|
@@ -259,9 +271,9 @@ class Temando_Temando_Model_Quote extends Mage_Core_Model_Abstract
|
|
259 |
if($this->getFootprintsIncluded()) {
|
260 |
$price += $this->getFootprintsTotalPrice();
|
261 |
}
|
262 |
-
|
263 |
return $price;
|
264 |
-
|
265 |
}
|
266 |
|
267 |
public function getExtraTitle()
|
@@ -289,24 +301,24 @@ class Temando_Temando_Model_Quote extends Mage_Core_Model_Abstract
|
|
289 |
|
290 |
return $title;
|
291 |
}
|
292 |
-
|
293 |
public function getEtaDescription()
|
294 |
{
|
295 |
$title = $this->getEtaFrom();
|
296 |
-
|
297 |
if ($this->getEtaFrom() != $this->getEtaTo()) {
|
298 |
$title .= ' - ' . $this->getEtaTo();
|
299 |
}
|
300 |
-
|
301 |
$title .= Mage::helper('temando')->__(' day');
|
302 |
-
|
303 |
if ($this->getEtaTo() > 1) {
|
304 |
$title .= Mage::helper('temando')->__('s');
|
305 |
}
|
306 |
-
|
307 |
return $title;
|
308 |
}
|
309 |
-
|
310 |
/**
|
311 |
* Returns the average ETA.
|
312 |
*
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
+
* Quote Model
|
5 |
+
*
|
6 |
+
* @package Temando_Temando
|
7 |
+
* @author Temando Magento Team <marketing@temando.com>
|
8 |
+
*
|
9 |
* @method Temando_Temando_Model_Quote setGenerated()
|
10 |
* @method Temando_Temando_Model_Quote setAccepted()
|
11 |
* @method Temando_Temando_Model_Quote setTotalPrice()
|
50 |
*/
|
51 |
class Temando_Temando_Model_Quote extends Mage_Core_Model_Abstract
|
52 |
{
|
53 |
+
|
54 |
protected $_carrier = null;
|
55 |
+
|
56 |
public function _construct()
|
57 |
{
|
58 |
parent::_construct();
|
59 |
$this->_init('temando/quote');
|
60 |
}
|
61 |
+
|
62 |
public function __clone()
|
63 |
{
|
64 |
$this->_carrier = clone $this->getCarrier();
|
65 |
}
|
66 |
+
|
67 |
/**
|
68 |
* Sets the carrier providing this quote.
|
69 |
*
|
75 |
{
|
76 |
$carrier = Mage::getModel('temando/carrier')
|
77 |
->load($carrier_id);
|
78 |
+
|
79 |
if ($carrier->getId() == $carrier_id) {
|
80 |
// exists in the database
|
81 |
$this->_carrier = $carrier;
|
83 |
}
|
84 |
return $this;
|
85 |
}
|
86 |
+
|
87 |
/**
|
88 |
* Gets the carrier providing this quote.
|
89 |
*
|
96 |
}
|
97 |
return $this->_carrier;
|
98 |
}
|
99 |
+
|
100 |
/**
|
101 |
* Loads values into this object from a
|
102 |
*
|
108 |
if ($response instanceof stdClass) {
|
109 |
$carrier = Mage::getModel('temando/carrier')->load($response->carrier->id, 'carrier_id');
|
110 |
/* @var $carrier Temando_Temando_Model_Carrier */
|
111 |
+
|
112 |
$carrier
|
113 |
->setCarrierId(isset($response->carrier->id) ? $response->carrier->id : '')
|
114 |
->setCompanyName(isset($response->carrier->companyName) ? $response->carrier->companyName : '')
|
129 |
->setEmail(isset($response->carrier->email) ? $response->carrier->email : '')
|
130 |
->setWebsite(isset($response->carrier->website) ? $response->carrier->website : '')
|
131 |
->save();
|
132 |
+
|
133 |
+
$extras = isset($response->extras->extra) ? $response->extras->extra : array();
|
134 |
if (!is_array($extras)) {
|
135 |
$extras = array($extras);
|
136 |
}
|
137 |
+
|
138 |
$extras_array = array();
|
139 |
+
|
140 |
foreach ($extras as $extra) {
|
141 |
$extra_id = trim(strtolower($extra->summary));
|
142 |
$extra_id = str_replace(' ', '', $extra_id);
|
148 |
'tax' => $extra->tax,
|
149 |
);
|
150 |
}
|
151 |
+
|
152 |
+
$accepted = false;
|
153 |
+
if (isset($response->accepted)) {
|
154 |
+
if ($response->accepted == 'Y') {
|
155 |
+
$accepted = true;
|
156 |
+
}
|
157 |
+
}
|
158 |
+
|
159 |
$this
|
160 |
->setCarrier($carrier->getId())
|
161 |
+
->setAccepted($accepted)
|
162 |
->setTotalPrice($response->totalPrice)
|
163 |
->setBasePrice($response->basePrice)
|
164 |
->setTax($response->tax)
|
175 |
}
|
176 |
return $this;
|
177 |
}
|
178 |
+
|
179 |
public function toBookingRequestArray($options)
|
180 |
{
|
181 |
$extras = $this->getExtras();
|
182 |
+
|
183 |
if (isset($options['insurance']) && ($options['insurance'] === 'Y')) {
|
184 |
$insurance = $extras['insurance'];
|
185 |
} else {
|
186 |
$insurance = false;
|
187 |
}
|
188 |
+
|
189 |
if (isset($options['carbonoffset']) && ($options['carbonoffset'] === 'Y')) {
|
190 |
$carbon = $extras['carbonoffset'];
|
191 |
} else {
|
192 |
$carbon = false;
|
193 |
}
|
194 |
+
|
195 |
if (isset($options['footprints']) && ($options['footprints'] === 'Y')) {
|
196 |
$footprints = $extras['footprints'];
|
197 |
} else {
|
198 |
$footprints = false;
|
199 |
}
|
200 |
+
|
201 |
$request = array(
|
202 |
'totalPrice' => $this->getTotalPrice(),
|
203 |
'basePrice' => $this->getBasePrice(),
|
209 |
'guaranteedEta' => $this->getGuaranteedEta() ? 'Y' : 'N',
|
210 |
'carrierId' => $this->getCarrier()->getCarrierId(),
|
211 |
);
|
212 |
+
|
213 |
if ($carbon || $insurance || $footprints) {
|
214 |
$request['extras'] = array();
|
215 |
$request['extras']['extra'] = array();
|
216 |
}
|
217 |
+
|
218 |
if ($carbon) {
|
219 |
$request['extras']['extra'][] = $carbon;
|
220 |
}
|
224 |
if ($footprints) {
|
225 |
$request['extras']['extra'][] = $footprints;
|
226 |
}
|
227 |
+
|
228 |
return $request;
|
229 |
}
|
230 |
+
|
231 |
public function setExtras($extras)
|
232 |
{
|
233 |
$this->setData('extras', serialize($extras));
|
234 |
return $this;
|
235 |
}
|
236 |
+
|
237 |
public function getExtras()
|
238 |
{
|
239 |
if ($this->getData('extras')) {
|
241 |
}
|
242 |
return null;
|
243 |
}
|
244 |
+
|
245 |
public function getDescription($showMethod = true, $showEta = true)
|
246 |
{
|
247 |
+
$title = '';
|
248 |
$title .= $this->getCarrier()->getCompanyName();
|
249 |
+
|
250 |
if ($showMethod && $showEta) {
|
251 |
$title .= ' - ' . $this->getDeliveryMethod(). ' [' . $this->getEtaDescription() . ']';
|
252 |
} else if ($showMethod) {
|
254 |
} else if ($showEta) {
|
255 |
$title .= ' [' . $this->getEtaDescription(). ']';
|
256 |
}
|
257 |
+
|
258 |
return $title . ' ' . $this->getExtraTitle();;
|
259 |
}
|
260 |
+
|
261 |
+
|
262 |
public function getTotalPriceIncSelectedExtras()
|
263 |
{
|
264 |
$price = $this->getTotalPrice();
|
271 |
if($this->getFootprintsIncluded()) {
|
272 |
$price += $this->getFootprintsTotalPrice();
|
273 |
}
|
274 |
+
|
275 |
return $price;
|
276 |
+
|
277 |
}
|
278 |
|
279 |
public function getExtraTitle()
|
301 |
|
302 |
return $title;
|
303 |
}
|
304 |
+
|
305 |
public function getEtaDescription()
|
306 |
{
|
307 |
$title = $this->getEtaFrom();
|
308 |
+
|
309 |
if ($this->getEtaFrom() != $this->getEtaTo()) {
|
310 |
$title .= ' - ' . $this->getEtaTo();
|
311 |
}
|
312 |
+
|
313 |
$title .= Mage::helper('temando')->__(' day');
|
314 |
+
|
315 |
if ($this->getEtaTo() > 1) {
|
316 |
$title .= Mage::helper('temando')->__('s');
|
317 |
}
|
318 |
+
|
319 |
return $title;
|
320 |
}
|
321 |
+
|
322 |
/**
|
323 |
* Returns the average ETA.
|
324 |
*
|
app/code/community/Temando/Temando/Model/Shipment.php
CHANGED
@@ -1,6 +1,11 @@
|
|
1 |
<?php
|
2 |
|
3 |
/**
|
|
|
|
|
|
|
|
|
|
|
4 |
* @method int getId()
|
5 |
* @method int getOrderId()
|
6 |
* @method string getCustomerSelectedQuoteId()
|
@@ -17,6 +22,7 @@
|
|
17 |
* @method string getReadyTime()
|
18 |
* @method string getCustomerSelectedOptions()
|
19 |
* @method string getOrderItems()
|
|
|
20 |
*
|
21 |
* @method Temando_Temando_Model_Shipment setId()
|
22 |
* @method Temando_Temando_Model_Shipment setOrderId()
|
@@ -33,27 +39,28 @@
|
|
33 |
* @method Temando_Temando_Model_Shipment setReadyTime()
|
34 |
* @method Temando_Temando_Model_Shipment setCustomerSelectedOptions()
|
35 |
* @method Temando_Temando_Model_Shipment setOrderItems()
|
|
|
36 |
*
|
37 |
*/
|
38 |
class Temando_Temando_Model_Shipment extends Mage_Core_Model_Abstract
|
39 |
{
|
40 |
-
|
41 |
/**
|
42 |
* @var Mage_Sales_Model_Order
|
43 |
*/
|
44 |
protected $_order = null;
|
45 |
-
|
46 |
/**
|
47 |
* @var array
|
48 |
*/
|
49 |
protected $_boxes = null;
|
50 |
-
|
51 |
public function _construct()
|
52 |
{
|
53 |
parent::_construct();
|
54 |
$this->_init('temando/shipment');
|
55 |
}
|
56 |
-
|
57 |
/**
|
58 |
* Overridden to enforce the use of custom getters.
|
59 |
*
|
@@ -77,7 +84,7 @@ class Temando_Temando_Model_Shipment extends Mage_Core_Model_Abstract
|
|
77 |
}
|
78 |
return parent::getData($key, $index);
|
79 |
}
|
80 |
-
|
81 |
/**
|
82 |
* Gets the Magento order associated with this shipment.
|
83 |
*
|
@@ -90,7 +97,7 @@ class Temando_Temando_Model_Shipment extends Mage_Core_Model_Abstract
|
|
90 |
}
|
91 |
return $this->_order;
|
92 |
}
|
93 |
-
|
94 |
/**
|
95 |
* Gets the creation date of this shipment.
|
96 |
*/
|
@@ -101,7 +108,7 @@ class Temando_Temando_Model_Shipment extends Mage_Core_Model_Abstract
|
|
101 |
}
|
102 |
return null;
|
103 |
}
|
104 |
-
|
105 |
/**
|
106 |
* Gets the Magento order number (as shown to customers, e.g. 100000123)
|
107 |
*/
|
@@ -112,13 +119,13 @@ class Temando_Temando_Model_Shipment extends Mage_Core_Model_Abstract
|
|
112 |
}
|
113 |
return null;
|
114 |
}
|
115 |
-
|
116 |
public function getBoxes()
|
117 |
{
|
118 |
return Mage::getModel('temando/box')->getCollection()
|
119 |
->addFieldToFilter('shipment_id', $this->getId());
|
120 |
}
|
121 |
-
|
122 |
/**
|
123 |
* Gets the carrier description.
|
124 |
*
|
@@ -138,7 +145,7 @@ class Temando_Temando_Model_Shipment extends Mage_Core_Model_Abstract
|
|
138 |
}
|
139 |
return null;
|
140 |
}
|
141 |
-
|
142 |
/**
|
143 |
* Gets the selected quote.
|
144 |
*
|
@@ -151,7 +158,7 @@ class Temando_Temando_Model_Shipment extends Mage_Core_Model_Abstract
|
|
151 |
public function getSelectedQuote()
|
152 |
{
|
153 |
$quote = null;
|
154 |
-
|
155 |
switch ($this->getStatus()) {
|
156 |
case Temando_Temando_Model_System_Config_Source_Shipment_Status::BOOKED:
|
157 |
$quote = Mage::getModel('temando/quote')
|
@@ -163,10 +170,10 @@ class Temando_Temando_Model_Shipment extends Mage_Core_Model_Abstract
|
|
163 |
->load($this->getCustomerSelectedQuoteId());
|
164 |
break;
|
165 |
}
|
166 |
-
|
167 |
return $quote;
|
168 |
}
|
169 |
-
|
170 |
/**
|
171 |
* Gets the quote using $this->getQuote(), and applies the selected
|
172 |
* options to it as well.
|
@@ -176,25 +183,25 @@ class Temando_Temando_Model_Shipment extends Mage_Core_Model_Abstract
|
|
176 |
public function getSelectedQuotePermutation()
|
177 |
{
|
178 |
$quote = $this->getSelectedQuote();
|
179 |
-
|
180 |
/* @var $quote Temando_Temando_Model_Quote */
|
181 |
if ($quote !== null) {
|
182 |
$options = Mage::getModel('temando/options');
|
183 |
/* @var $options Temando_Temando_Model_Options */
|
184 |
|
185 |
-
$option_array = $this->getOptions();
|
186 |
foreach ($option_array as $option) {
|
187 |
$options->addItem($option);
|
188 |
}
|
189 |
-
|
190 |
$permutations = $options->applyAll($quote);
|
191 |
-
|
192 |
if ($permutations) {
|
193 |
return reset($permutations);
|
194 |
}
|
195 |
}
|
196 |
}
|
197 |
-
|
198 |
/**
|
199 |
* Gets the shipping amount the customer paid on this order.
|
200 |
*/
|
@@ -205,7 +212,7 @@ class Temando_Temando_Model_Shipment extends Mage_Core_Model_Abstract
|
|
205 |
}
|
206 |
return null;
|
207 |
}
|
208 |
-
|
209 |
/**
|
210 |
* Fixes up database-style dates after loading.
|
211 |
*
|
@@ -220,14 +227,14 @@ class Temando_Temando_Model_Shipment extends Mage_Core_Model_Abstract
|
|
220 |
$this->unsReadyTime();
|
221 |
}
|
222 |
}
|
223 |
-
|
224 |
/**
|
225 |
* Gets Temando quotes for this shipment.
|
226 |
*/
|
227 |
public function fetchQuotes($username = null, $password = null, $sandbox = false)
|
228 |
-
{
|
229 |
/* @var $request Temando_Temando_Model_Api_Request */
|
230 |
-
|
231 |
$request = Mage::getModel('temando/api_request');
|
232 |
$request
|
233 |
->setUsername($username)
|
@@ -238,7 +245,9 @@ class Temando_Temando_Model_Shipment extends Mage_Core_Model_Abstract
|
|
238 |
$this->getDestinationCountry(),
|
239 |
$this->getDestinationPostcode(),
|
240 |
$this->getDestinationCity(),
|
241 |
-
$this->getDestinationStreet()
|
|
|
|
|
242 |
->setItems($this->getBoxes());
|
243 |
if ($this->getReadyDate()) {
|
244 |
$request->setReady(strtotime($this->getReadyDate()), $this->getReadyTime());
|
@@ -251,7 +260,7 @@ class Temando_Temando_Model_Shipment extends Mage_Core_Model_Abstract
|
|
251 |
|
252 |
$request->getQuotes();
|
253 |
}
|
254 |
-
|
255 |
/**
|
256 |
* Clears all quotes from the database relating to this shipment.
|
257 |
*/
|
@@ -265,8 +274,8 @@ class Temando_Temando_Model_Shipment extends Mage_Core_Model_Abstract
|
|
265 |
}
|
266 |
return $this;
|
267 |
}
|
268 |
-
|
269 |
-
|
270 |
/**
|
271 |
* Gets the quotes for this shipment from the database
|
272 |
*
|
@@ -305,8 +314,8 @@ class Temando_Temando_Model_Shipment extends Mage_Core_Model_Abstract
|
|
305 |
->addFieldToFilter('magento_quote_id', $this->getOrder()->getQuoteId());
|
306 |
}
|
307 |
}
|
308 |
-
|
309 |
-
|
310 |
/**
|
311 |
* Gets the customer selected options as an array.
|
312 |
*
|
@@ -323,16 +332,16 @@ class Temando_Temando_Model_Shipment extends Mage_Core_Model_Abstract
|
|
323 |
{
|
324 |
$string = $this->getCustomerSelectedOptions();
|
325 |
$elements = explode('_', $string);
|
326 |
-
|
327 |
$options = array();
|
328 |
-
|
329 |
for ($i = 0; $i < count($elements); $i += 2) {
|
330 |
$options[$elements[$i]] = $elements[$i + 1];
|
331 |
}
|
332 |
-
|
333 |
return $options;
|
334 |
}
|
335 |
-
|
336 |
/**
|
337 |
* Gets the customer selected options as an array of Option objects.
|
338 |
*
|
@@ -370,29 +379,44 @@ class Temando_Temando_Model_Shipment extends Mage_Core_Model_Abstract
|
|
370 |
$options[] = $option;
|
371 |
}
|
372 |
}
|
373 |
-
|
374 |
return $options;
|
375 |
}
|
376 |
-
|
377 |
/**
|
378 |
* Checks wether this shipment can be shipped
|
379 |
-
*
|
380 |
* @return boolean
|
381 |
*/
|
382 |
public function isStatusOpened()
|
383 |
{
|
384 |
-
return
|
385 |
$this->getStatus() == Temando_Temando_Model_System_Config_Source_Shipment_Status::PENDING;
|
386 |
}
|
387 |
-
|
388 |
/**
|
389 |
* Is this shipment a TZ pickup?
|
390 |
-
*
|
391 |
* @return boolean
|
392 |
*/
|
393 |
public function isPickup()
|
394 |
{
|
395 |
return (boolean)$this->getPickupDescription();
|
396 |
}
|
397 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
398 |
}
|
1 |
<?php
|
2 |
|
3 |
/**
|
4 |
+
* Shipment Model
|
5 |
+
*
|
6 |
+
* @package Temando_Temando
|
7 |
+
* @author Temando Magento Team <marketing@temando.com>
|
8 |
+
*
|
9 |
* @method int getId()
|
10 |
* @method int getOrderId()
|
11 |
* @method string getCustomerSelectedQuoteId()
|
22 |
* @method string getReadyTime()
|
23 |
* @method string getCustomerSelectedOptions()
|
24 |
* @method string getOrderItems()
|
25 |
+
* @method string getDestinationType()
|
26 |
*
|
27 |
* @method Temando_Temando_Model_Shipment setId()
|
28 |
* @method Temando_Temando_Model_Shipment setOrderId()
|
39 |
* @method Temando_Temando_Model_Shipment setReadyTime()
|
40 |
* @method Temando_Temando_Model_Shipment setCustomerSelectedOptions()
|
41 |
* @method Temando_Temando_Model_Shipment setOrderItems()
|
42 |
+
* @method Temando_Temando_Model_Shipment setDestinationType()
|
43 |
*
|
44 |
*/
|
45 |
class Temando_Temando_Model_Shipment extends Mage_Core_Model_Abstract
|
46 |
{
|
47 |
+
|
48 |
/**
|
49 |
* @var Mage_Sales_Model_Order
|
50 |
*/
|
51 |
protected $_order = null;
|
52 |
+
|
53 |
/**
|
54 |
* @var array
|
55 |
*/
|
56 |
protected $_boxes = null;
|
57 |
+
|
58 |
public function _construct()
|
59 |
{
|
60 |
parent::_construct();
|
61 |
$this->_init('temando/shipment');
|
62 |
}
|
63 |
+
|
64 |
/**
|
65 |
* Overridden to enforce the use of custom getters.
|
66 |
*
|
84 |
}
|
85 |
return parent::getData($key, $index);
|
86 |
}
|
87 |
+
|
88 |
/**
|
89 |
* Gets the Magento order associated with this shipment.
|
90 |
*
|
97 |
}
|
98 |
return $this->_order;
|
99 |
}
|
100 |
+
|
101 |
/**
|
102 |
* Gets the creation date of this shipment.
|
103 |
*/
|
108 |
}
|
109 |
return null;
|
110 |
}
|
111 |
+
|
112 |
/**
|
113 |
* Gets the Magento order number (as shown to customers, e.g. 100000123)
|
114 |
*/
|
119 |
}
|
120 |
return null;
|
121 |
}
|
122 |
+
|
123 |
public function getBoxes()
|
124 |
{
|
125 |
return Mage::getModel('temando/box')->getCollection()
|
126 |
->addFieldToFilter('shipment_id', $this->getId());
|
127 |
}
|
128 |
+
|
129 |
/**
|
130 |
* Gets the carrier description.
|
131 |
*
|
145 |
}
|
146 |
return null;
|
147 |
}
|
148 |
+
|
149 |
/**
|
150 |
* Gets the selected quote.
|
151 |
*
|
158 |
public function getSelectedQuote()
|
159 |
{
|
160 |
$quote = null;
|
161 |
+
|
162 |
switch ($this->getStatus()) {
|
163 |
case Temando_Temando_Model_System_Config_Source_Shipment_Status::BOOKED:
|
164 |
$quote = Mage::getModel('temando/quote')
|
170 |
->load($this->getCustomerSelectedQuoteId());
|
171 |
break;
|
172 |
}
|
173 |
+
|
174 |
return $quote;
|
175 |
}
|
176 |
+
|
177 |
/**
|
178 |
* Gets the quote using $this->getQuote(), and applies the selected
|
179 |
* options to it as well.
|
183 |
public function getSelectedQuotePermutation()
|
184 |
{
|
185 |
$quote = $this->getSelectedQuote();
|
186 |
+
|
187 |
/* @var $quote Temando_Temando_Model_Quote */
|
188 |
if ($quote !== null) {
|
189 |
$options = Mage::getModel('temando/options');
|
190 |
/* @var $options Temando_Temando_Model_Options */
|
191 |
|
192 |
+
$option_array = $this->getOptions();
|
193 |
foreach ($option_array as $option) {
|
194 |
$options->addItem($option);
|
195 |
}
|
196 |
+
|
197 |
$permutations = $options->applyAll($quote);
|
198 |
+
|
199 |
if ($permutations) {
|
200 |
return reset($permutations);
|
201 |
}
|
202 |
}
|
203 |
}
|
204 |
+
|
205 |
/**
|
206 |
* Gets the shipping amount the customer paid on this order.
|
207 |
*/
|
212 |
}
|
213 |
return null;
|
214 |
}
|
215 |
+
|
216 |
/**
|
217 |
* Fixes up database-style dates after loading.
|
218 |
*
|
227 |
$this->unsReadyTime();
|
228 |
}
|
229 |
}
|
230 |
+
|
231 |
/**
|
232 |
* Gets Temando quotes for this shipment.
|
233 |
*/
|
234 |
public function fetchQuotes($username = null, $password = null, $sandbox = false)
|
235 |
+
{
|
236 |
/* @var $request Temando_Temando_Model_Api_Request */
|
237 |
+
|
238 |
$request = Mage::getModel('temando/api_request');
|
239 |
$request
|
240 |
->setUsername($username)
|
245 |
$this->getDestinationCountry(),
|
246 |
$this->getDestinationPostcode(),
|
247 |
$this->getDestinationCity(),
|
248 |
+
$this->getDestinationStreet(),
|
249 |
+
$this->getDestinationType())
|
250 |
+
->setDeliveryOptions($this->getDeliveryOptionsArray())
|
251 |
->setItems($this->getBoxes());
|
252 |
if ($this->getReadyDate()) {
|
253 |
$request->setReady(strtotime($this->getReadyDate()), $this->getReadyTime());
|
260 |
|
261 |
$request->getQuotes();
|
262 |
}
|
263 |
+
|
264 |
/**
|
265 |
* Clears all quotes from the database relating to this shipment.
|
266 |
*/
|
274 |
}
|
275 |
return $this;
|
276 |
}
|
277 |
+
|
278 |
+
|
279 |
/**
|
280 |
* Gets the quotes for this shipment from the database
|
281 |
*
|
314 |
->addFieldToFilter('magento_quote_id', $this->getOrder()->getQuoteId());
|
315 |
}
|
316 |
}
|
317 |
+
|
318 |
+
|
319 |
/**
|
320 |
* Gets the customer selected options as an array.
|
321 |
*
|
332 |
{
|
333 |
$string = $this->getCustomerSelectedOptions();
|
334 |
$elements = explode('_', $string);
|
335 |
+
|
336 |
$options = array();
|
337 |
+
|
338 |
for ($i = 0; $i < count($elements); $i += 2) {
|
339 |
$options[$elements[$i]] = $elements[$i + 1];
|
340 |
}
|
341 |
+
|
342 |
return $options;
|
343 |
}
|
344 |
+
|
345 |
/**
|
346 |
* Gets the customer selected options as an array of Option objects.
|
347 |
*
|
379 |
$options[] = $option;
|
380 |
}
|
381 |
}
|
382 |
+
|
383 |
return $options;
|
384 |
}
|
385 |
+
|
386 |
/**
|
387 |
* Checks wether this shipment can be shipped
|
388 |
+
*
|
389 |
* @return boolean
|
390 |
*/
|
391 |
public function isStatusOpened()
|
392 |
{
|
393 |
+
return
|
394 |
$this->getStatus() == Temando_Temando_Model_System_Config_Source_Shipment_Status::PENDING;
|
395 |
}
|
396 |
+
|
397 |
/**
|
398 |
* Is this shipment a TZ pickup?
|
399 |
+
*
|
400 |
* @return boolean
|
401 |
*/
|
402 |
public function isPickup()
|
403 |
{
|
404 |
return (boolean)$this->getPickupDescription();
|
405 |
}
|
406 |
+
|
407 |
+
/**
|
408 |
+
* Transform saved delivery options to key=>val array
|
409 |
+
* of customer selected options
|
410 |
+
*
|
411 |
+
* @return array
|
412 |
+
*/
|
413 |
+
public function getDeliveryOptionsArray()
|
414 |
+
{
|
415 |
+
$arr = array();
|
416 |
+
$deliveryOptions = explode(',', $this->getCustomerSelectedDeliveryOptions());
|
417 |
+
foreach ($deliveryOptions as $deliveryOption) {
|
418 |
+
$arr[$deliveryOption] = 'on';
|
419 |
+
}
|
420 |
+
return $arr;
|
421 |
+
}
|
422 |
}
|
app/code/community/Temando/Temando/Model/Shipping/Carrier/Temando.php
CHANGED
@@ -1,15 +1,27 @@
|
|
1 |
<?php
|
|
|
2 |
/**
|
|
|
|
|
|
|
|
|
|
|
3 |
* @method Temando_Temando_Model_Shipping_Carrier_Temando setIsProductPage(boolean $flag)
|
4 |
* @method Temando_Temando_Model_Shipping_Carrier_Temando setIsCartPage(boolean $flag)
|
5 |
-
*
|
|
|
|
|
|
|
6 |
* @method boolean getIsProductPage()
|
7 |
* @method boolean getIsCartPage()
|
|
|
|
|
|
|
8 |
*/
|
9 |
|
10 |
|
11 |
-
class Temando_Temando_Model_Shipping_Carrier_Temando
|
12 |
-
extends Mage_Shipping_Model_Carrier_Abstract
|
13 |
implements Mage_Shipping_Model_Carrier_Interface
|
14 |
{
|
15 |
/**
|
@@ -19,29 +31,29 @@ class Temando_Temando_Model_Shipping_Carrier_Temando
|
|
19 |
const ERR_INVALID_DEST = 'Please enter a delivery address to view available shipping methods';
|
20 |
const ERR_NO_METHODS = 'No shipping methods available';
|
21 |
const ERR_INTERNATIONAL = 'International delivery is not available at this time.';
|
22 |
-
|
23 |
/**
|
24 |
* Carrier's code
|
25 |
*/
|
26 |
const CARRIER_CODE = 'temando';
|
27 |
-
|
28 |
/**
|
29 |
* Error Map
|
30 |
-
*
|
31 |
-
* @var array
|
32 |
*/
|
33 |
protected static $_errors_map = array(
|
34 |
"The 'destinationCountry', 'destinationCode' and 'destinationSuburb' elements (within the 'Anywhere' type) do not contain valid values. These values must match with the predefined settings in the Temando system."
|
35 |
=> "Invalid suburb / postcode combination."
|
36 |
);
|
37 |
-
|
38 |
/**
|
39 |
* Carrier's code
|
40 |
*
|
41 |
* @var string
|
42 |
*/
|
43 |
protected $_code = 'temando';
|
44 |
-
|
45 |
/**
|
46 |
* Carrier's title
|
47 |
*
|
@@ -55,16 +67,16 @@ class Temando_Temando_Model_Shipping_Carrier_Temando
|
|
55 |
* @var array|null
|
56 |
*/
|
57 |
protected $_rates;
|
58 |
-
|
59 |
/**
|
60 |
* @var Mage_Shipping_Model_Rate_Request
|
61 |
*/
|
62 |
protected $_rate_request;
|
63 |
-
|
64 |
/**
|
65 |
* Current pricing method as set in Temando Settings
|
66 |
-
*
|
67 |
-
* @var string
|
68 |
*/
|
69 |
protected $_pricing_method;
|
70 |
|
@@ -77,7 +89,7 @@ class Temando_Temando_Model_Shipping_Carrier_Temando
|
|
77 |
{
|
78 |
return true;
|
79 |
}
|
80 |
-
|
81 |
/**
|
82 |
* Check if carrier has shipping label option available
|
83 |
*
|
@@ -87,16 +99,46 @@ class Temando_Temando_Model_Shipping_Carrier_Temando
|
|
87 |
{
|
88 |
return false;
|
89 |
}
|
90 |
-
|
91 |
-
|
92 |
public function __construct()
|
93 |
{
|
94 |
parent::__construct();
|
95 |
$this->_pricing_method = $this->getConfigData('pricing/method');
|
96 |
$this->setIsProductPage(("etemando" == Mage::app()->getRequest()->getModuleName()) && ("pcs" == Mage::app()->getRequest()->getControllerName()));
|
97 |
$this->setIsCartPage(("checkout" == Mage::app()->getRequest()->getModuleName()) && ("cart" == Mage::app()->getRequest()->getControllerName()));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
}
|
99 |
-
|
100 |
/**
|
101 |
* Checks if the to address is within allowed countries
|
102 |
*
|
@@ -106,7 +148,7 @@ class Temando_Temando_Model_Shipping_Carrier_Temando
|
|
106 |
{
|
107 |
return array_key_exists($request->getDestCountryId(), Mage::helper('temando')->getAllowedCountries());
|
108 |
}
|
109 |
-
|
110 |
/**
|
111 |
* Creates a rate method based on a Temando API quote.
|
112 |
*
|
@@ -122,15 +164,15 @@ class Temando_Temando_Model_Shipping_Carrier_Temando
|
|
122 |
|
123 |
$method = Mage::getModel('shipping/rate_result_method')
|
124 |
->setCarrier($this->_code)
|
125 |
-
->setCarrierTitle(
|
126 |
->setMethodTitle($title)
|
127 |
->setMethod($method_id)
|
128 |
->setPrice($price)
|
129 |
->setCost($quote->getTotalPrice());
|
130 |
-
|
131 |
return $method;
|
132 |
}
|
133 |
-
|
134 |
/**
|
135 |
* Creates the flat rate method, with the price set in the config. An
|
136 |
* optional parameter allows the price to be overridden.
|
@@ -138,7 +180,7 @@ class Temando_Temando_Model_Shipping_Carrier_Temando
|
|
138 |
* @return Mage_Shipping_Model_Rate_Result_Method
|
139 |
*/
|
140 |
protected function _getFlatRateMethod($price = false, $free = false)
|
141 |
-
{
|
142 |
if ($price === false) {
|
143 |
$cost = $this->getConfigData('pricing/shipping_fee');
|
144 |
$price = $this->getFinalPriceWithHandlingFee($cost);
|
@@ -149,18 +191,18 @@ class Temando_Temando_Model_Shipping_Carrier_Temando
|
|
149 |
$title = $free ? Mage::helper('temando')->__('Free Shipping') : Mage::helper('temando')->__('Flat Rate');
|
150 |
$method = Mage::getModel('shipping/rate_result_method')
|
151 |
->setCarrier($this->_code)
|
152 |
-
->setCarrierTitle(
|
153 |
->setMethodTitle($title)
|
154 |
->setMethod($free ? Temando_Temando_Model_Carrier::FREE : Temando_Temando_Model_Carrier::FLAT_RATE)
|
155 |
->setPrice($price)
|
156 |
->setCost($cost);
|
157 |
-
|
158 |
return $method;
|
159 |
}
|
160 |
|
161 |
/**
|
162 |
-
* Returns shipping rate result error method
|
163 |
-
*
|
164 |
* @param string $errorText
|
165 |
* @return Mage_Shipping_Model_Rate_Result_Error
|
166 |
*/
|
@@ -168,7 +210,7 @@ class Temando_Temando_Model_Shipping_Carrier_Temando
|
|
168 |
{
|
169 |
$error = Mage::getModel('shipping/rate_result_error');
|
170 |
$error->setCarrier($this->_code);
|
171 |
-
$error->setCarrierTitle(
|
172 |
if (isset(self::$_errors_map[$errorText])) {
|
173 |
$errorText = self::$_errors_map[$errorText];
|
174 |
}
|
@@ -176,7 +218,7 @@ class Temando_Temando_Model_Shipping_Carrier_Temando
|
|
176 |
|
177 |
return $error;
|
178 |
}
|
179 |
-
|
180 |
/**
|
181 |
* Creates a string describing the applicable elements of a rate request.
|
182 |
*
|
@@ -193,18 +235,19 @@ class Temando_Temando_Model_Shipping_Carrier_Temando
|
|
193 |
foreach ($request->getAllItems() as $item) {
|
194 |
$requestString .= $item->getProductId() . 'x' . $item->getQty();
|
195 |
}
|
196 |
-
|
197 |
$requestString .= '|' . $request->getDestCity();
|
198 |
$requestString .= '|' . $request->getDestCountryId();
|
199 |
$requestString .= '|' . $request->getDestPostcode();
|
200 |
-
|
|
|
201 |
return $requestString;
|
202 |
}
|
203 |
-
|
204 |
/**
|
205 |
* Returns available shipping methods for current request based on pricing method
|
206 |
* specified in Temando Settings
|
207 |
-
*
|
208 |
* @param Mage_Shipping_Model_Rate_Request $request
|
209 |
* @return Mage_Shipping_Model_Rate_Result|Mage_Shipping_Model_Rate_Result_Error
|
210 |
*/
|
@@ -212,10 +255,13 @@ class Temando_Temando_Model_Shipping_Carrier_Temando
|
|
212 |
{
|
213 |
$result = Mage::getModel('shipping/rate_result');
|
214 |
/* @var $result Mage_Shipping_Model_Rate_Result */
|
215 |
-
|
216 |
//check origin/destination country
|
217 |
-
if (!$this->_canShip($request)) {
|
218 |
-
|
|
|
|
|
|
|
219 |
}
|
220 |
|
221 |
//OneStepCheckout inserts '-' in city/pcode if no default configured
|
@@ -223,7 +269,7 @@ class Temando_Temando_Model_Shipping_Carrier_Temando
|
|
223 |
$request->getDestPostcode() == '-' || $request->getDestCity() == '-') {
|
224 |
return $this->_getErrorMethod(self::ERR_INVALID_DEST);
|
225 |
}
|
226 |
-
|
227 |
//get magento sales quote & id
|
228 |
$salesQuote = Mage::getSingleton('checkout/session')->getQuote();
|
229 |
/* @var $salesQuote Mage_Sales_Model_Quote */
|
@@ -234,7 +280,7 @@ class Temando_Temando_Model_Shipping_Carrier_Temando
|
|
234 |
$salesQuote = Mage::helper('temando')->getDummySalesQuoteFromRequest($request);
|
235 |
}
|
236 |
$salesQuoteId = $salesQuote->getId();
|
237 |
-
|
238 |
//check if eligible for free shipping
|
239 |
if ($this->isFreeShipping($salesQuote)) {
|
240 |
$result->append($this->_getFlatRateMethod('0.00', true));
|
@@ -251,8 +297,8 @@ class Temando_Temando_Model_Shipping_Carrier_Temando
|
|
251 |
$insurance = Mage::getModel('temando/option_insurance')->setSetting(Mage::getStoreConfig('temando/insurance/status'));
|
252 |
$carbon = Mage::getModel('temando/option_carbonoffset')->setSetting(Mage::getStoreConfig('temando/carbon/status'));
|
253 |
$footprints = Mage::getModel('temando/option_footprints')->setSetting(Mage::getStoreConfig('temando/footprints/status'));
|
254 |
-
|
255 |
-
if ($this->getIsProductPage() || $this->getIsCartPage())
|
256 |
{
|
257 |
if (!in_array($insurance->getForcedValue(), array(Temando_Temando_Model_Option_Boolean::YES, Temando_Temando_Model_Option_Boolean::NO))) {
|
258 |
$insurance->setForcedValue(Temando_Temando_Model_Option_Boolean::NO);
|
@@ -261,7 +307,7 @@ class Temando_Temando_Model_Shipping_Carrier_Temando
|
|
261 |
if (!in_array($carbon->getForcedValue(), array(Temando_Temando_Model_Option_Boolean::YES, Temando_Temando_Model_Option_Boolean::NO))) {
|
262 |
$carbon->setForcedValue(Temando_Temando_Model_Option_Boolean::NO);
|
263 |
}
|
264 |
-
|
265 |
if (!in_array($footprints->getForcedValue(), array(Temando_Temando_Model_Option_Boolean::YES, Temando_Temando_Model_Option_Boolean::NO))) {
|
266 |
$footprints->setForcedValue(Temando_Temando_Model_Option_Boolean::NO);
|
267 |
}
|
@@ -277,17 +323,17 @@ class Temando_Temando_Model_Shipping_Carrier_Temando
|
|
277 |
//get available shipping methods (quotes from the API)
|
278 |
//check if request same as previous
|
279 |
$lastRequest = Mage::getSingleton('checkout/session')->getTemandoRequestString();
|
280 |
-
if ($lastRequest == $this->_createRequestString($request, $salesQuoteId))
|
281 |
{
|
282 |
//request is the same as previous, load existing quotes from DB
|
283 |
$quotes = Mage::getModel('temando/quote')->getCollection()
|
284 |
->addFieldToFilter('magento_quote_id', $salesQuoteId)
|
285 |
->getItems();
|
286 |
-
}
|
287 |
-
else
|
288 |
-
{
|
289 |
try {
|
290 |
-
$apiRequest = Mage::getModel('temando/api_request');
|
291 |
$apiRequest
|
292 |
->setUsername($this->getConfigData('general/username'))
|
293 |
->setPassword($this->getConfigData('general/password'))
|
@@ -297,11 +343,13 @@ class Temando_Temando_Model_Shipping_Carrier_Temando
|
|
297 |
$request->getDestCountryId(),
|
298 |
$request->getDestPostcode(),
|
299 |
$request->getDestCity(),
|
300 |
-
$request->getDestStreet()
|
|
|
301 |
->setItems($request->getAllItems())
|
302 |
->setReady(Mage::helper('temando')->getReadyDate())
|
|
|
303 |
->setAllowedCarriers($this->getAllowedMethods());
|
304 |
-
|
305 |
$coll = $apiRequest->getQuotes();
|
306 |
if ($coll instanceof Temando_Temando_Model_Mysql4_Quote_Collection) {
|
307 |
$quotes = $coll->getItems();
|
@@ -348,10 +396,10 @@ class Temando_Temando_Model_Shipping_Carrier_Temando
|
|
348 |
Mage::getSingleton('checkout/session')->setTemandoRequestString($this->_createRequestString($request, $salesQuoteId));
|
349 |
return $result;
|
350 |
}
|
351 |
-
|
352 |
/**
|
353 |
* Returns true if request is elegible for free shipping, false otherwise
|
354 |
-
*
|
355 |
* @param Mage_Sales_Model_Quote $salesQuote
|
356 |
* @return boolean
|
357 |
*/
|
@@ -361,37 +409,28 @@ class Temando_Temando_Model_Shipping_Carrier_Temando
|
|
361 |
if($this->_pricing_method == Temando_Temando_Model_System_Config_Source_Pricing::FREE) {
|
362 |
return true;
|
363 |
}
|
364 |
-
|
365 |
//check if all items have free shipping or free shipping over amount enabled and valid for this request
|
366 |
$allItemsFree = true; $total = 0;
|
367 |
foreach ($salesQuote->getAllItems() as $item) {
|
368 |
/* @var $item Mage_Sales_Model_Quote_Item */
|
369 |
if ($item->getProduct()->isVirtual() || $item->getParentItem()) { continue; }
|
370 |
if ($item->getFreeShipping()) { continue; }
|
371 |
-
|
372 |
-
$value = $item->getValue();
|
373 |
-
if (!$value) { $value = $item->getRowTotalInclTax(); }
|
374 |
-
if (!$value) { $value = $item->getRowTotal(); }
|
375 |
-
if (!$value) {
|
376 |
-
$qty = $item->getQty() ? $item->getQty() : $item->getQtyOrdered();
|
377 |
-
$value = $item->getPrice() * $qty;
|
378 |
-
}
|
379 |
-
$total += $value;
|
380 |
//not all items with free shipping if here
|
381 |
$allItemsFree = false;
|
382 |
}
|
383 |
-
|
384 |
-
if($allItemsFree
|
385 |
-
($this->getConfigData('free_shipping_enable') && $total >= $this->getConfigData('free_shipping_subtotal'))) {
|
386 |
return true;
|
387 |
}
|
388 |
-
|
389 |
return false;
|
390 |
}
|
391 |
|
392 |
/**
|
393 |
* Return list of allowed carriers
|
394 |
-
*
|
395 |
* @return array
|
396 |
*/
|
397 |
public function getAllowedMethods()
|
@@ -413,7 +452,7 @@ class Temando_Temando_Model_Shipping_Carrier_Temando
|
|
413 |
}
|
414 |
|
415 |
$status = $api->getRequest(array('requestId' => $tracking_number));
|
416 |
-
|
417 |
$result = Mage::getModel('shipping/tracking_result_abstract')
|
418 |
->setTracking($tracking_number);
|
419 |
/* @var $result Mage_Shipping_Model_Tracking_Result_Abstract */
|
@@ -427,7 +466,7 @@ class Temando_Temando_Model_Shipping_Carrier_Temando
|
|
427 |
} else {
|
428 |
$result->setStatus(Mage::helper('temando')->__('Unavailable'));
|
429 |
}
|
430 |
-
|
431 |
$text = '';
|
432 |
if (isset($status->request->quotes->quote->trackingFurtherDetails)) {
|
433 |
$text .= $status->request->quotes->quote->trackingFurtherDetails;
|
@@ -435,35 +474,34 @@ class Temando_Temando_Model_Shipping_Carrier_Temando
|
|
435 |
if (isset($status->request->quotes->quote->trackingLastChecked)) {
|
436 |
$text .= 'Last Update: ' . date('Y-m-d h:ia', strtotime($status->request->quotes->quote->trackingLastChecked));
|
437 |
}
|
438 |
-
|
439 |
if ($text) {
|
440 |
$result->setTrackSummary($text);
|
441 |
}
|
442 |
-
|
443 |
-
if (!isset($status->request->quotes->quote->trackingHistories->trackingHistory)) {
|
444 |
-
$status->request->quotes->quote->trackingHistories->trackingHistory = array();
|
445 |
-
} else if (isset($status->request->quotes->quote->trackingHistories->trackingHistory) && !is_array($status->request->quotes->quote->trackingHistories->trackingHistory)) {
|
446 |
-
$status->request->quotes->quote->trackingHistories->trackingHistory = array(0 => $status->request->quotes->quote->trackingHistories->trackingHistory);
|
447 |
-
}
|
448 |
|
449 |
-
$trackingHistories
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
457 |
}
|
458 |
-
|
459 |
-
$result->setProgressdetail($trackingHistories);
|
460 |
} else {
|
461 |
$result->setErrorMessage(Mage::helper('temando')->__('An error occurred while fetching the shipment status.'));
|
462 |
}
|
463 |
-
|
464 |
return $result;
|
465 |
}
|
466 |
-
|
467 |
public function getConfigData($field)
|
468 |
{
|
469 |
if (in_array($field, array('handling_fee', 'handling_type'))) {
|
@@ -473,25 +511,26 @@ class Temando_Temando_Model_Shipping_Carrier_Temando
|
|
473 |
$parent = parent::getConfigData($field);
|
474 |
return $parent !== null ? $parent : Mage::helper('temando')->getConfigData($field);
|
475 |
}
|
476 |
-
|
477 |
/**
|
478 |
* Returns Temando carrier code
|
479 |
-
*
|
480 |
* @return string
|
481 |
*/
|
482 |
public function getCode()
|
483 |
{
|
484 |
return $this->_code;
|
485 |
}
|
486 |
-
|
487 |
/**
|
488 |
* Returns Temando carrier title
|
489 |
-
*
|
490 |
* @return string
|
491 |
*/
|
492 |
-
public function getTitle()
|
493 |
{
|
494 |
-
|
|
|
495 |
}
|
496 |
|
497 |
/**
|
@@ -524,5 +563,5 @@ class Temando_Temando_Model_Shipping_Carrier_Temando
|
|
524 |
{
|
525 |
return true;
|
526 |
}
|
527 |
-
|
528 |
}
|
1 |
<?php
|
2 |
+
|
3 |
/**
|
4 |
+
* Temando Carrier
|
5 |
+
*
|
6 |
+
* @package Temando_Temando
|
7 |
+
* @author Temando Magento Team <marketing@temando.com>
|
8 |
+
*
|
9 |
* @method Temando_Temando_Model_Shipping_Carrier_Temando setIsProductPage(boolean $flag)
|
10 |
* @method Temando_Temando_Model_Shipping_Carrier_Temando setIsCartPage(boolean $flag)
|
11 |
+
* @method Temando_Temando_Model_Shipping_Carrier_Temando setDeliveryOptions()
|
12 |
+
* @method Temando_Temando_Model_Shipping_Carrier_Temando setDestinationType()
|
13 |
+
* @method Temando_Temando_Model_Shipping_Carrier_Temando setUpdateDeliveryOptions(boolean $flag)
|
14 |
+
*
|
15 |
* @method boolean getIsProductPage()
|
16 |
* @method boolean getIsCartPage()
|
17 |
+
* @method array getDeliveryOptions()
|
18 |
+
* @method string getDestinationType()
|
19 |
+
* @method boolean getUpdateDeliveryOptions()
|
20 |
*/
|
21 |
|
22 |
|
23 |
+
class Temando_Temando_Model_Shipping_Carrier_Temando
|
24 |
+
extends Mage_Shipping_Model_Carrier_Abstract
|
25 |
implements Mage_Shipping_Model_Carrier_Interface
|
26 |
{
|
27 |
/**
|
31 |
const ERR_INVALID_DEST = 'Please enter a delivery address to view available shipping methods';
|
32 |
const ERR_NO_METHODS = 'No shipping methods available';
|
33 |
const ERR_INTERNATIONAL = 'International delivery is not available at this time.';
|
34 |
+
|
35 |
/**
|
36 |
* Carrier's code
|
37 |
*/
|
38 |
const CARRIER_CODE = 'temando';
|
39 |
+
|
40 |
/**
|
41 |
* Error Map
|
42 |
+
*
|
43 |
+
* @var array
|
44 |
*/
|
45 |
protected static $_errors_map = array(
|
46 |
"The 'destinationCountry', 'destinationCode' and 'destinationSuburb' elements (within the 'Anywhere' type) do not contain valid values. These values must match with the predefined settings in the Temando system."
|
47 |
=> "Invalid suburb / postcode combination."
|
48 |
);
|
49 |
+
|
50 |
/**
|
51 |
* Carrier's code
|
52 |
*
|
53 |
* @var string
|
54 |
*/
|
55 |
protected $_code = 'temando';
|
56 |
+
|
57 |
/**
|
58 |
* Carrier's title
|
59 |
*
|
67 |
* @var array|null
|
68 |
*/
|
69 |
protected $_rates;
|
70 |
+
|
71 |
/**
|
72 |
* @var Mage_Shipping_Model_Rate_Request
|
73 |
*/
|
74 |
protected $_rate_request;
|
75 |
+
|
76 |
/**
|
77 |
* Current pricing method as set in Temando Settings
|
78 |
+
*
|
79 |
+
* @var string
|
80 |
*/
|
81 |
protected $_pricing_method;
|
82 |
|
89 |
{
|
90 |
return true;
|
91 |
}
|
92 |
+
|
93 |
/**
|
94 |
* Check if carrier has shipping label option available
|
95 |
*
|
99 |
{
|
100 |
return false;
|
101 |
}
|
102 |
+
|
103 |
+
|
104 |
public function __construct()
|
105 |
{
|
106 |
parent::__construct();
|
107 |
$this->_pricing_method = $this->getConfigData('pricing/method');
|
108 |
$this->setIsProductPage(("etemando" == Mage::app()->getRequest()->getModuleName()) && ("pcs" == Mage::app()->getRequest()->getControllerName()));
|
109 |
$this->setIsCartPage(("checkout" == Mage::app()->getRequest()->getModuleName()) && ("cart" == Mage::app()->getRequest()->getControllerName()));
|
110 |
+
|
111 |
+
$this->setUpdateDeliveryOptions(Mage::app()->getRequest()->getParam('delivery_option_change', false));
|
112 |
+
|
113 |
+
if ($this->getUpdateDeliveryOptions()) {
|
114 |
+
Mage::getSingleton('checkout/session')->setData(
|
115 |
+
'selected_delivery_options',
|
116 |
+
Mage::app()->getRequest()->getParam(
|
117 |
+
'delivery_options',
|
118 |
+
array()
|
119 |
+
)
|
120 |
+
);
|
121 |
+
Mage::getSingleton('checkout/session')->setData(
|
122 |
+
'destination_type',
|
123 |
+
Mage::app()->getRequest()->getParam(
|
124 |
+
'destination_type',
|
125 |
+
Temando_Temando_Model_Checkout_Delivery_Options::DESTINATION_RESIDENCE
|
126 |
+
)
|
127 |
+
);
|
128 |
+
}
|
129 |
+
|
130 |
+
$this->setDeliveryOptions(
|
131 |
+
is_array(Mage::getSingleton('checkout/session')->getData('selected_delivery_options')) ?
|
132 |
+
Mage::getSingleton('checkout/session')->getData('selected_delivery_options') :
|
133 |
+
array()
|
134 |
+
);
|
135 |
+
$this->setDestinationType(
|
136 |
+
Mage::getSingleton('checkout/session')->getData('destination_type') ?
|
137 |
+
Mage::getSingleton('checkout/session')->getData('destination_type') :
|
138 |
+
Temando_Temando_Model_Checkout_Delivery_Options::DESTINATION_RESIDENCE
|
139 |
+
);
|
140 |
}
|
141 |
+
|
142 |
/**
|
143 |
* Checks if the to address is within allowed countries
|
144 |
*
|
148 |
{
|
149 |
return array_key_exists($request->getDestCountryId(), Mage::helper('temando')->getAllowedCountries());
|
150 |
}
|
151 |
+
|
152 |
/**
|
153 |
* Creates a rate method based on a Temando API quote.
|
154 |
*
|
164 |
|
165 |
$method = Mage::getModel('shipping/rate_result_method')
|
166 |
->setCarrier($this->_code)
|
167 |
+
->setCarrierTitle(self::getTitle())
|
168 |
->setMethodTitle($title)
|
169 |
->setMethod($method_id)
|
170 |
->setPrice($price)
|
171 |
->setCost($quote->getTotalPrice());
|
172 |
+
|
173 |
return $method;
|
174 |
}
|
175 |
+
|
176 |
/**
|
177 |
* Creates the flat rate method, with the price set in the config. An
|
178 |
* optional parameter allows the price to be overridden.
|
180 |
* @return Mage_Shipping_Model_Rate_Result_Method
|
181 |
*/
|
182 |
protected function _getFlatRateMethod($price = false, $free = false)
|
183 |
+
{
|
184 |
if ($price === false) {
|
185 |
$cost = $this->getConfigData('pricing/shipping_fee');
|
186 |
$price = $this->getFinalPriceWithHandlingFee($cost);
|
191 |
$title = $free ? Mage::helper('temando')->__('Free Shipping') : Mage::helper('temando')->__('Flat Rate');
|
192 |
$method = Mage::getModel('shipping/rate_result_method')
|
193 |
->setCarrier($this->_code)
|
194 |
+
->setCarrierTitle(self::getTitle())
|
195 |
->setMethodTitle($title)
|
196 |
->setMethod($free ? Temando_Temando_Model_Carrier::FREE : Temando_Temando_Model_Carrier::FLAT_RATE)
|
197 |
->setPrice($price)
|
198 |
->setCost($cost);
|
199 |
+
|
200 |
return $method;
|
201 |
}
|
202 |
|
203 |
/**
|
204 |
+
* Returns shipping rate result error method
|
205 |
+
*
|
206 |
* @param string $errorText
|
207 |
* @return Mage_Shipping_Model_Rate_Result_Error
|
208 |
*/
|
210 |
{
|
211 |
$error = Mage::getModel('shipping/rate_result_error');
|
212 |
$error->setCarrier($this->_code);
|
213 |
+
$error->setCarrierTitle(self::getTitle());
|
214 |
if (isset(self::$_errors_map[$errorText])) {
|
215 |
$errorText = self::$_errors_map[$errorText];
|
216 |
}
|
218 |
|
219 |
return $error;
|
220 |
}
|
221 |
+
|
222 |
/**
|
223 |
* Creates a string describing the applicable elements of a rate request.
|
224 |
*
|
235 |
foreach ($request->getAllItems() as $item) {
|
236 |
$requestString .= $item->getProductId() . 'x' . $item->getQty();
|
237 |
}
|
238 |
+
|
239 |
$requestString .= '|' . $request->getDestCity();
|
240 |
$requestString .= '|' . $request->getDestCountryId();
|
241 |
$requestString .= '|' . $request->getDestPostcode();
|
242 |
+
$requestString .= '|' . $this->getDestinationType();
|
243 |
+
|
244 |
return $requestString;
|
245 |
}
|
246 |
+
|
247 |
/**
|
248 |
* Returns available shipping methods for current request based on pricing method
|
249 |
* specified in Temando Settings
|
250 |
+
*
|
251 |
* @param Mage_Shipping_Model_Rate_Request $request
|
252 |
* @return Mage_Shipping_Model_Rate_Result|Mage_Shipping_Model_Rate_Result_Error
|
253 |
*/
|
255 |
{
|
256 |
$result = Mage::getModel('shipping/rate_result');
|
257 |
/* @var $result Mage_Shipping_Model_Rate_Result */
|
258 |
+
|
259 |
//check origin/destination country
|
260 |
+
if (!$this->_canShip($request)) {
|
261 |
+
return;
|
262 |
+
// by default no error will show. Remove the above and uncomment
|
263 |
+
// the line below to enable an error in the shipping method
|
264 |
+
// return $this->_getErrorMethod(self::ERR_INVALID_COUNTRY);
|
265 |
}
|
266 |
|
267 |
//OneStepCheckout inserts '-' in city/pcode if no default configured
|
269 |
$request->getDestPostcode() == '-' || $request->getDestCity() == '-') {
|
270 |
return $this->_getErrorMethod(self::ERR_INVALID_DEST);
|
271 |
}
|
272 |
+
|
273 |
//get magento sales quote & id
|
274 |
$salesQuote = Mage::getSingleton('checkout/session')->getQuote();
|
275 |
/* @var $salesQuote Mage_Sales_Model_Quote */
|
280 |
$salesQuote = Mage::helper('temando')->getDummySalesQuoteFromRequest($request);
|
281 |
}
|
282 |
$salesQuoteId = $salesQuote->getId();
|
283 |
+
|
284 |
//check if eligible for free shipping
|
285 |
if ($this->isFreeShipping($salesQuote)) {
|
286 |
$result->append($this->_getFlatRateMethod('0.00', true));
|
297 |
$insurance = Mage::getModel('temando/option_insurance')->setSetting(Mage::getStoreConfig('temando/insurance/status'));
|
298 |
$carbon = Mage::getModel('temando/option_carbonoffset')->setSetting(Mage::getStoreConfig('temando/carbon/status'));
|
299 |
$footprints = Mage::getModel('temando/option_footprints')->setSetting(Mage::getStoreConfig('temando/footprints/status'));
|
300 |
+
|
301 |
+
if ($this->getIsProductPage() || $this->getIsCartPage())
|
302 |
{
|
303 |
if (!in_array($insurance->getForcedValue(), array(Temando_Temando_Model_Option_Boolean::YES, Temando_Temando_Model_Option_Boolean::NO))) {
|
304 |
$insurance->setForcedValue(Temando_Temando_Model_Option_Boolean::NO);
|
307 |
if (!in_array($carbon->getForcedValue(), array(Temando_Temando_Model_Option_Boolean::YES, Temando_Temando_Model_Option_Boolean::NO))) {
|
308 |
$carbon->setForcedValue(Temando_Temando_Model_Option_Boolean::NO);
|
309 |
}
|
310 |
+
|
311 |
if (!in_array($footprints->getForcedValue(), array(Temando_Temando_Model_Option_Boolean::YES, Temando_Temando_Model_Option_Boolean::NO))) {
|
312 |
$footprints->setForcedValue(Temando_Temando_Model_Option_Boolean::NO);
|
313 |
}
|
323 |
//get available shipping methods (quotes from the API)
|
324 |
//check if request same as previous
|
325 |
$lastRequest = Mage::getSingleton('checkout/session')->getTemandoRequestString();
|
326 |
+
if ($lastRequest == $this->_createRequestString($request, $salesQuoteId) && !$this->getUpdateDeliveryOptions())
|
327 |
{
|
328 |
//request is the same as previous, load existing quotes from DB
|
329 |
$quotes = Mage::getModel('temando/quote')->getCollection()
|
330 |
->addFieldToFilter('magento_quote_id', $salesQuoteId)
|
331 |
->getItems();
|
332 |
+
}
|
333 |
+
else
|
334 |
+
{
|
335 |
try {
|
336 |
+
$apiRequest = Mage::getModel('temando/api_request');
|
337 |
$apiRequest
|
338 |
->setUsername($this->getConfigData('general/username'))
|
339 |
->setPassword($this->getConfigData('general/password'))
|
343 |
$request->getDestCountryId(),
|
344 |
$request->getDestPostcode(),
|
345 |
$request->getDestCity(),
|
346 |
+
$request->getDestStreet(),
|
347 |
+
$this->getDestinationType())
|
348 |
->setItems($request->getAllItems())
|
349 |
->setReady(Mage::helper('temando')->getReadyDate())
|
350 |
+
->setDeliveryOptions($this->getDeliveryOptions())
|
351 |
->setAllowedCarriers($this->getAllowedMethods());
|
352 |
+
|
353 |
$coll = $apiRequest->getQuotes();
|
354 |
if ($coll instanceof Temando_Temando_Model_Mysql4_Quote_Collection) {
|
355 |
$quotes = $coll->getItems();
|
396 |
Mage::getSingleton('checkout/session')->setTemandoRequestString($this->_createRequestString($request, $salesQuoteId));
|
397 |
return $result;
|
398 |
}
|
399 |
+
|
400 |
/**
|
401 |
* Returns true if request is elegible for free shipping, false otherwise
|
402 |
+
*
|
403 |
* @param Mage_Sales_Model_Quote $salesQuote
|
404 |
* @return boolean
|
405 |
*/
|
409 |
if($this->_pricing_method == Temando_Temando_Model_System_Config_Source_Pricing::FREE) {
|
410 |
return true;
|
411 |
}
|
412 |
+
|
413 |
//check if all items have free shipping or free shipping over amount enabled and valid for this request
|
414 |
$allItemsFree = true; $total = 0;
|
415 |
foreach ($salesQuote->getAllItems() as $item) {
|
416 |
/* @var $item Mage_Sales_Model_Quote_Item */
|
417 |
if ($item->getProduct()->isVirtual() || $item->getParentItem()) { continue; }
|
418 |
if ($item->getFreeShipping()) { continue; }
|
419 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
420 |
//not all items with free shipping if here
|
421 |
$allItemsFree = false;
|
422 |
}
|
423 |
+
|
424 |
+
if ($allItemsFree) {
|
|
|
425 |
return true;
|
426 |
}
|
427 |
+
|
428 |
return false;
|
429 |
}
|
430 |
|
431 |
/**
|
432 |
* Return list of allowed carriers
|
433 |
+
*
|
434 |
* @return array
|
435 |
*/
|
436 |
public function getAllowedMethods()
|
452 |
}
|
453 |
|
454 |
$status = $api->getRequest(array('requestId' => $tracking_number));
|
455 |
+
|
456 |
$result = Mage::getModel('shipping/tracking_result_abstract')
|
457 |
->setTracking($tracking_number);
|
458 |
/* @var $result Mage_Shipping_Model_Tracking_Result_Abstract */
|
466 |
} else {
|
467 |
$result->setStatus(Mage::helper('temando')->__('Unavailable'));
|
468 |
}
|
469 |
+
|
470 |
$text = '';
|
471 |
if (isset($status->request->quotes->quote->trackingFurtherDetails)) {
|
472 |
$text .= $status->request->quotes->quote->trackingFurtherDetails;
|
474 |
if (isset($status->request->quotes->quote->trackingLastChecked)) {
|
475 |
$text .= 'Last Update: ' . date('Y-m-d h:ia', strtotime($status->request->quotes->quote->trackingLastChecked));
|
476 |
}
|
477 |
+
|
478 |
if ($text) {
|
479 |
$result->setTrackSummary($text);
|
480 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
481 |
|
482 |
+
if (isset($status->request->quotes->quote->trackingHistories->trackingHistory)) {
|
483 |
+
if (!is_array($status->request->quotes->quote->trackingHistories->trackingHistory)) {
|
484 |
+
$status->request->quotes->quote->trackingHistories->trackingHistory =
|
485 |
+
array(0 => $status->request->quotes->quote->trackingHistories->trackingHistory);
|
486 |
+
}
|
487 |
+
$trackingHistories = array();
|
488 |
+
foreach ($status->request->quotes->quote->trackingHistories->trackingHistory as $trackData) {
|
489 |
+
$trackingHistories[] = array(
|
490 |
+
'deliverylocation' => $trackData->trackingStatus,
|
491 |
+
'deliverydate' => date('Y-m-d', strtotime($trackData->trackingStatusOccurred)),
|
492 |
+
'deliverytime' => date('h:ia', strtotime($trackData->trackingStatusOccurred)),
|
493 |
+
'activity' => $trackData->trackingFurtherDetails
|
494 |
+
);
|
495 |
+
}
|
496 |
+
$result->setProgressdetail($trackingHistories);
|
497 |
}
|
|
|
|
|
498 |
} else {
|
499 |
$result->setErrorMessage(Mage::helper('temando')->__('An error occurred while fetching the shipment status.'));
|
500 |
}
|
501 |
+
|
502 |
return $result;
|
503 |
}
|
504 |
+
|
505 |
public function getConfigData($field)
|
506 |
{
|
507 |
if (in_array($field, array('handling_fee', 'handling_type'))) {
|
511 |
$parent = parent::getConfigData($field);
|
512 |
return $parent !== null ? $parent : Mage::helper('temando')->getConfigData($field);
|
513 |
}
|
514 |
+
|
515 |
/**
|
516 |
* Returns Temando carrier code
|
517 |
+
*
|
518 |
* @return string
|
519 |
*/
|
520 |
public function getCode()
|
521 |
{
|
522 |
return $this->_code;
|
523 |
}
|
524 |
+
|
525 |
/**
|
526 |
* Returns Temando carrier title
|
527 |
+
*
|
528 |
* @return string
|
529 |
*/
|
530 |
+
static public function getTitle()
|
531 |
{
|
532 |
+
$config = Mage::getStoreConfig('carriers/temando/title');
|
533 |
+
return $config ? $config : $this->_title;
|
534 |
}
|
535 |
|
536 |
/**
|
563 |
{
|
564 |
return true;
|
565 |
}
|
566 |
+
|
567 |
}
|
app/code/community/Temando/Temando/Model/Shipping/Carrier/Temando/Source/Method.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_Shipping_Carrier_Temando_Source_Method
|
4 |
{
|
5 |
|
@@ -8,6 +13,7 @@ class Temando_Temando_Model_Shipping_Carrier_Temando_Source_Method
|
|
8 |
$options = array();
|
9 |
|
10 |
$carriers = Mage::getModel('temando/carrier')->getCollection();
|
|
|
11 |
foreach ($carriers as $carrier) {
|
12 |
$options[] = array('value' => $carrier->getCarrierId(), 'label' => $carrier->getCompanyName());
|
13 |
}
|
@@ -28,6 +34,7 @@ class Temando_Temando_Model_Shipping_Carrier_Temando_Source_Method
|
|
28 |
}
|
29 |
|
30 |
$carriers = Mage::getModel('temando/carrier')->getCollection();
|
|
|
31 |
foreach ($carriers as $carrier) {
|
32 |
if(!$carrier->getCarrierId())
|
33 |
continue;
|
@@ -51,6 +58,7 @@ class Temando_Temando_Model_Shipping_Carrier_Temando_Source_Method
|
|
51 |
{
|
52 |
$options = array();
|
53 |
$carriers = Mage::getModel('temando/carrier')->getCollection();
|
|
|
54 |
foreach ($carriers as $carrier) {
|
55 |
if(!$carrier->getCarrierId())
|
56 |
continue;
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Shipping Carrier Temando Source Method
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Model_Shipping_Carrier_Temando_Source_Method
|
9 |
{
|
10 |
|
13 |
$options = array();
|
14 |
|
15 |
$carriers = Mage::getModel('temando/carrier')->getCollection();
|
16 |
+
$carriers->setOrder('company_name', 'ASC');
|
17 |
foreach ($carriers as $carrier) {
|
18 |
$options[] = array('value' => $carrier->getCarrierId(), 'label' => $carrier->getCompanyName());
|
19 |
}
|
34 |
}
|
35 |
|
36 |
$carriers = Mage::getModel('temando/carrier')->getCollection();
|
37 |
+
$carriers->setOrder('company_name', 'ASC');
|
38 |
foreach ($carriers as $carrier) {
|
39 |
if(!$carrier->getCarrierId())
|
40 |
continue;
|
58 |
{
|
59 |
$options = array();
|
60 |
$carriers = Mage::getModel('temando/carrier')->getCollection();
|
61 |
+
$carriers->setOrder('company_name', 'ASC');
|
62 |
foreach ($carriers as $carrier) {
|
63 |
if(!$carrier->getCarrierId())
|
64 |
continue;
|
app/code/community/Temando/Temando/Model/Status.php
CHANGED
@@ -1,8 +1,13 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_Status extends Varien_Object
|
4 |
{
|
5 |
-
|
6 |
const STATUS_ENABLED = 1;
|
7 |
const STATUS_DISABLED = 2;
|
8 |
|
@@ -20,5 +25,5 @@ class Temando_Temando_Model_Status extends Varien_Object
|
|
20 |
self::STATUS_DISABLED => Mage::helper('temando')->__('Disabled')
|
21 |
);
|
22 |
}
|
23 |
-
|
24 |
}
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Module Status
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Model_Status extends Varien_Object
|
9 |
{
|
10 |
+
|
11 |
const STATUS_ENABLED = 1;
|
12 |
const STATUS_DISABLED = 2;
|
13 |
|
25 |
self::STATUS_DISABLED => Mage::helper('temando')->__('Disabled')
|
26 |
);
|
27 |
}
|
28 |
+
|
29 |
}
|
app/code/community/Temando/Temando/Model/System/Config/Backend/Form/Field/Required/Businessresidential.php
CHANGED
@@ -1,17 +1,23 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
-
|
6 |
protected function _beforeSave()
|
7 |
{
|
8 |
$value = $this->getValue();
|
9 |
$types = array('Business', 'Residence');
|
10 |
-
|
11 |
if (!in_array($value, $types)) {
|
12 |
Mage::throwException(Mage::helper('temando')->__('Please select a location type from the list.', $value));
|
13 |
}
|
14 |
return $this;
|
15 |
}
|
16 |
-
|
17 |
}
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Backend Form Field Required Businessresidential
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_System_Config_Backend_Form_Field_Required_Businessresidential
|
9 |
+
extends Mage_Core_Model_Config_Data
|
10 |
{
|
11 |
+
|
12 |
protected function _beforeSave()
|
13 |
{
|
14 |
$value = $this->getValue();
|
15 |
$types = array('Business', 'Residence');
|
16 |
+
|
17 |
if (!in_array($value, $types)) {
|
18 |
Mage::throwException(Mage::helper('temando')->__('Please select a location type from the list.', $value));
|
19 |
}
|
20 |
return $this;
|
21 |
}
|
22 |
+
|
23 |
}
|
app/code/community/Temando/Temando/Model/System/Config/Backend/Form/Field/Required/Country.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
protected function _beforeSave()
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Backend Form Field Required Country
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_System_Config_Backend_Form_Field_Required_Country
|
9 |
+
extends Mage_Core_Model_Config_Data
|
10 |
{
|
11 |
|
12 |
protected function _beforeSave()
|
app/code/community/Temando/Temando/Model/System/Config/Backend/Form/Field/Required/Location.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
/**
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Backend Form Field Required Location
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_System_Config_Backend_Form_Field_Required_Location
|
9 |
+
extends Temando_Temando_Model_System_Config_Backend_Form_Field_Required_Text
|
10 |
{
|
11 |
|
12 |
/**
|
app/code/community/Temando/Temando/Model/System/Config/Backend/Form/Field/Required/Text.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
protected function _beforeSave()
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Backend Form Field Required Text
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_System_Config_Backend_Form_Field_Required_Text
|
9 |
+
extends Mage_Core_Model_Config_Data
|
10 |
{
|
11 |
|
12 |
protected function _beforeSave()
|
app/code/community/Temando/Temando/Model/System/Config/Source.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
abstract class Temando_Temando_Model_System_Config_Source
|
4 |
{
|
5 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
abstract class Temando_Temando_Model_System_Config_Source
|
9 |
{
|
10 |
|
app/code/community/Temando/Temando/Model/System/Config/Source/Carbon.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
const DISABLED = 'disabled';
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Carbon
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_System_Config_Source_Carbon
|
9 |
+
extends Temando_Temando_Model_System_Config_Source
|
10 |
{
|
11 |
|
12 |
const DISABLED = 'disabled';
|
app/code/community/Temando/Temando/Model/System/Config/Source/Client/Type.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_System_Config_Source_Client_Type extends Temando_Temando_Model_System_Config_Source
|
4 |
{
|
5 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Client Type
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Model_System_Config_Source_Client_Type extends Temando_Temando_Model_System_Config_Source
|
9 |
{
|
10 |
|
app/code/community/Temando/Temando/Model/System/Config/Source/Country.php
CHANGED
@@ -1,13 +1,20 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
protected $_options;
|
7 |
|
8 |
-
public function _setupOptions()
|
|
|
9 |
|
10 |
-
if(!$this->_options) {
|
11 |
$countries = Mage::getResourceModel('directory/country_collection')->loadData()->toOptionArray(false);
|
12 |
|
13 |
foreach($countries as $country => $arr) {
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Country
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_System_Config_Source_Country
|
9 |
+
extends Temando_Temando_Model_System_Config_Source
|
10 |
{
|
11 |
|
12 |
protected $_options;
|
13 |
|
14 |
+
public function _setupOptions()
|
15 |
+
{
|
16 |
|
17 |
+
if (!$this->_options) {
|
18 |
$countries = Mage::getResourceModel('directory/country_collection')->loadData()->toOptionArray(false);
|
19 |
|
20 |
foreach($countries as $country => $arr) {
|
app/code/community/Temando/Temando/Model/System/Config/Source/Errorprocess.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
const VIEW = 'view';
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Errorprocess
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_System_Config_Source_Errorprocess
|
9 |
+
extends Temando_Temando_Model_System_Config_Source
|
10 |
{
|
11 |
|
12 |
const VIEW = 'view';
|
app/code/community/Temando/Temando/Model/System/Config/Source/Footprints.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
const DISABLED = 'disabled';
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Footprints
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_System_Config_Source_Footprints
|
9 |
+
extends Temando_Temando_Model_System_Config_Source
|
10 |
{
|
11 |
|
12 |
const DISABLED = 'disabled';
|
app/code/community/Temando/Temando/Model/System/Config/Source/Insurance.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
const DISABLED = 'disabled';
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Insurance
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_System_Config_Source_Insurance
|
9 |
+
extends Temando_Temando_Model_System_Config_Source
|
10 |
{
|
11 |
|
12 |
const DISABLED = 'disabled';
|
app/code/community/Temando/Temando/Model/System/Config/Source/Labeltype.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
const STANDARD = 'Standard';
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Labeltype
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_System_Config_Source_Labeltype
|
9 |
+
extends Temando_Temando_Model_System_Config_Source
|
10 |
{
|
11 |
|
12 |
const STANDARD = 'Standard';
|
app/code/community/Temando/Temando/Model/System/Config/Source/Origin/Type.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_System_Config_Source_Origin_Type extends Temando_Temando_Model_System_Config_Source
|
4 |
{
|
5 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Origin Type
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Model_System_Config_Source_Origin_Type extends Temando_Temando_Model_System_Config_Source
|
9 |
{
|
10 |
|
app/code/community/Temando/Temando/Model/System/Config/Source/Payment.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_System_Config_Source_Payment extends Temando_Temando_Model_System_Config_Source
|
4 |
{
|
5 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Payment
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Model_System_Config_Source_Payment extends Temando_Temando_Model_System_Config_Source
|
9 |
{
|
10 |
|
app/code/community/Temando/Temando/Model/System/Config/Source/Pricing.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
const FREE = 'free';
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Pricing
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_System_Config_Source_Pricing
|
9 |
+
extends Temando_Temando_Model_System_Config_Source
|
10 |
{
|
11 |
|
12 |
const FREE = 'free';
|
app/code/community/Temando/Temando/Model/System/Config/Source/Readytime.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
const AM = 'AM';
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Readytime
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_System_Config_Source_Readytime
|
9 |
+
extends Temando_Temando_Model_System_Config_Source
|
10 |
{
|
11 |
|
12 |
const AM = 'AM';
|
app/code/community/Temando/Temando/Model/System/Config/Source/Regions.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
protected function _setupOptions()
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Regions
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_System_Config_Source_Regions
|
9 |
+
extends Temando_Temando_Model_System_Config_Source
|
10 |
{
|
11 |
|
12 |
protected function _setupOptions()
|
app/code/community/Temando/Temando/Model/System/Config/Source/Rule/Action/Adjustment/Type.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_System_Config_Source_Rule_Action_Adjustment_Type
|
4 |
extends Temando_Temando_Model_System_Config_Source {
|
5 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Rule Action Adjustment Type
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Model_System_Config_Source_Rule_Action_Adjustment_Type
|
9 |
extends Temando_Temando_Model_System_Config_Source {
|
10 |
|
app/code/community/Temando/Temando/Model/System/Config/Source/Rule/Action/Filter.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_System_Config_Source_Rule_Action_Filter
|
4 |
extends Temando_Temando_Model_System_Config_Source {
|
5 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Rule Action Filter
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Model_System_Config_Source_Rule_Action_Filter
|
9 |
extends Temando_Temando_Model_System_Config_Source {
|
10 |
|
app/code/community/Temando/Temando/Model/System/Config/Source/Rule/Condition/Time.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_System_Config_Source_Rule_Condition_Time
|
4 |
extends Temando_Temando_Model_System_Config_Source {
|
5 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Rule Condition Time
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Model_System_Config_Source_Rule_Condition_Time
|
9 |
extends Temando_Temando_Model_System_Config_Source {
|
10 |
|
app/code/community/Temando/Temando/Model/System/Config/Source/Rule/Condition/Type.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_System_Config_Source_Rule_Condition_Type
|
4 |
extends Temando_Temando_Model_System_Config_Source {
|
5 |
|
@@ -7,7 +12,8 @@ class Temando_Temando_Model_System_Config_Source_Rule_Condition_Type
|
|
7 |
const SUBTOTAL = '2';
|
8 |
const ZONE = '3';
|
9 |
|
10 |
-
protected function _setupOptions()
|
|
|
11 |
$this->_options = array(
|
12 |
self::WEIGHT => Mage::helper('temando')->__('Weight'),
|
13 |
self::SUBTOTAL => Mage::helper('temando')->__('Subtotal'),
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Rule Condition Type
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Model_System_Config_Source_Rule_Condition_Type
|
9 |
extends Temando_Temando_Model_System_Config_Source {
|
10 |
|
12 |
const SUBTOTAL = '2';
|
13 |
const ZONE = '3';
|
14 |
|
15 |
+
protected function _setupOptions()
|
16 |
+
{
|
17 |
$this->_options = array(
|
18 |
self::WEIGHT => Mage::helper('temando')->__('Weight'),
|
19 |
self::SUBTOTAL => Mage::helper('temando')->__('Subtotal'),
|
app/code/community/Temando/Temando/Model/System/Config/Source/Rule/Type.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Model_System_Config_Source_Rule_Type
|
4 |
extends Temando_Temando_Model_System_Config_Source {
|
5 |
|
@@ -8,7 +13,8 @@ class Temando_Temando_Model_System_Config_Source_Rule_Type
|
|
8 |
const DYNAMIC = '3';
|
9 |
const RESTRICT = '4';
|
10 |
|
11 |
-
protected function _setupOptions()
|
|
|
12 |
$this->_options = array(
|
13 |
self::FLATRATE => Mage::helper('temando')->__('Flat Rate'),
|
14 |
self::FREE => Mage::helper('temando')->__('Free Shipping'),
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Rule Type
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Model_System_Config_Source_Rule_Type
|
9 |
extends Temando_Temando_Model_System_Config_Source {
|
10 |
|
13 |
const DYNAMIC = '3';
|
14 |
const RESTRICT = '4';
|
15 |
|
16 |
+
protected function _setupOptions()
|
17 |
+
{
|
18 |
$this->_options = array(
|
19 |
self::FLATRATE => Mage::helper('temando')->__('Flat Rate'),
|
20 |
self::FREE => Mage::helper('temando')->__('Free Shipping'),
|
app/code/community/Temando/Temando/Model/System/Config/Source/Sales/Order/Status.php
CHANGED
@@ -1,9 +1,16 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
|
6 |
-
public function toOptionArray($isMultiselect=false)
|
|
|
7 |
|
8 |
$statuses = Mage::getSingleton('sales/order_config')->getStatuses();
|
9 |
|
@@ -15,7 +22,7 @@ class Temando_Temando_Model_System_Config_Source_Sales_Order_Status {
|
|
15 |
'label' => $label
|
16 |
);
|
17 |
}
|
18 |
-
if(!$isMultiselect){
|
19 |
array_unshift($options, array('value'=>'', 'label'=> Mage::helper('adminhtml')->__('--Please Select--')));
|
20 |
}
|
21 |
return $options;
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Sales Order Status
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_System_Config_Source_Sales_Order_Status
|
9 |
+
{
|
10 |
|
11 |
|
12 |
+
public function toOptionArray($isMultiselect=false)
|
13 |
+
{
|
14 |
|
15 |
$statuses = Mage::getSingleton('sales/order_config')->getStatuses();
|
16 |
|
22 |
'label' => $label
|
23 |
);
|
24 |
}
|
25 |
+
if (!$isMultiselect){
|
26 |
array_unshift($options, array('value'=>'', 'label'=> Mage::helper('adminhtml')->__('--Please Select--')));
|
27 |
}
|
28 |
return $options;
|
app/code/community/Temando/Temando/Model/System/Config/Source/Shipment/Class.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
const GENERAL_GOODS = 0;
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Shipment Class
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_System_Config_Source_Shipment_Class
|
9 |
+
extends Temando_Temando_Model_System_Config_Source
|
10 |
{
|
11 |
|
12 |
const GENERAL_GOODS = 0;
|
app/code/community/Temando/Temando/Model/System/Config/Source/Shipment/Packaging.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
const BOX = 0;
|
6 |
const CARTON = 1;
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Shipment Packaging
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_System_Config_Source_Shipment_Packaging
|
9 |
+
extends Temando_Temando_Model_System_Config_Source
|
10 |
{
|
11 |
const BOX = 0;
|
12 |
const CARTON = 1;
|
app/code/community/Temando/Temando/Model/System/Config/Source/Shipment/Packaging/Mode.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
const USE_DEFAULTS = 0;
|
6 |
const AS_DEFINED = 1;
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Shipment Packaging Mode
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_System_Config_Source_Shipment_Packaging_Mode
|
9 |
+
extends Temando_Temando_Model_System_Config_Source
|
10 |
{
|
11 |
const USE_DEFAULTS = 0;
|
12 |
const AS_DEFINED = 1;
|
app/code/community/Temando/Temando/Model/System/Config/Source/Shipment/Service.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
const SAME_DAY = 1;
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Shipment Service
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_System_Config_Source_Shipment_Service
|
9 |
+
extends Temando_Temando_Model_System_Config_Source
|
10 |
{
|
11 |
|
12 |
const SAME_DAY = 1;
|
app/code/community/Temando/Temando/Model/System/Config/Source/Shipment/Status.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
const PENDING = '0';
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Shipment Status
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_System_Config_Source_Shipment_Status
|
9 |
+
extends Temando_Temando_Model_System_Config_Source
|
10 |
{
|
11 |
|
12 |
const PENDING = '0';
|
app/code/community/Temando/Temando/Model/System/Config/Source/Unit.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
/**
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Unit
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
abstract class Temando_Temando_Model_System_Config_Source_Unit
|
9 |
+
extends Temando_Temando_Model_System_Config_Source
|
10 |
{
|
11 |
|
12 |
/**
|
app/code/community/Temando/Temando/Model/System/Config/Source/Unit/Measure.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
const CENTIMETRES = 'Centimetres';
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Unit Measure
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_System_Config_Source_Unit_Measure
|
9 |
+
extends Temando_Temando_Model_System_Config_Source_Unit
|
10 |
{
|
11 |
|
12 |
const CENTIMETRES = 'Centimetres';
|
app/code/community/Temando/Temando/Model/System/Config/Source/Unit/Weight.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
const GRAMS = 'Grams';
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Unit Weight
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_System_Config_Source_Unit_Weight
|
9 |
+
extends Temando_Temando_Model_System_Config_Source_Unit
|
10 |
{
|
11 |
|
12 |
const GRAMS = 'Grams';
|
app/code/community/Temando/Temando/Model/System/Config/Source/Wizard.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
{
|
5 |
|
6 |
const ACCOUNT = 1;
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* System Config Source Wizard
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_System_Config_Source_Wizard
|
9 |
+
extends Temando_Temando_Model_System_Config_Source
|
10 |
{
|
11 |
|
12 |
const ACCOUNT = 1;
|
app/code/community/Temando/Temando/Model/Wizard.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
const ERR_WHS_SYNC = 'An error occured when synchronizing with temando.com. Origin location not saved on temando.com.';
|
6 |
const SUC_WHS_SYNC = 'Origin location saved on temando.com.';
|
@@ -78,8 +84,8 @@ class Temando_Temando_Model_Wizard extends Mage_Core_Model_Abstract {
|
|
78 |
try {
|
79 |
$api = Mage::getModel('temando/api_client');
|
80 |
$api->connect(
|
81 |
-
Mage::helper('temando')->getConfigData('general/username'),
|
82 |
-
Mage::helper('temando')->getConfigData('general/password'),
|
83 |
Mage::helper('temando')->getConfigData('general/sandbox')
|
84 |
);
|
85 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Wizard Model
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Model_Wizard extends Mage_Core_Model_Abstract
|
9 |
+
{
|
10 |
|
11 |
const ERR_WHS_SYNC = 'An error occured when synchronizing with temando.com. Origin location not saved on temando.com.';
|
12 |
const SUC_WHS_SYNC = 'Origin location saved on temando.com.';
|
84 |
try {
|
85 |
$api = Mage::getModel('temando/api_client');
|
86 |
$api->connect(
|
87 |
+
Mage::helper('temando')->getConfigData('general/username'),
|
88 |
+
Mage::helper('temando')->getConfigData('general/password'),
|
89 |
Mage::helper('temando')->getConfigData('general/sandbox')
|
90 |
);
|
91 |
|
app/code/community/Temando/Temando/controllers/Adminhtml/CarrierController.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
const CARRIER_ERROR = 'An error occured when synchronizing carriers with temando.com';
|
6 |
const CARRIER_SUCCESS = 'Synchronized carriers';
|
@@ -9,7 +15,8 @@ class Temando_Temando_Adminhtml_CarrierController extends Mage_Adminhtml_Control
|
|
9 |
* Adminhtml controller that refreshes carriers in the temando_carrier table.
|
10 |
* @return
|
11 |
*/
|
12 |
-
public function indexAction()
|
|
|
13 |
|
14 |
try {
|
15 |
$api = Mage::getModel('temando/api_client');
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Carrier Controller
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Adminhtml_CarrierController extends Mage_Adminhtml_Controller_Action
|
9 |
+
{
|
10 |
|
11 |
const CARRIER_ERROR = 'An error occured when synchronizing carriers with temando.com';
|
12 |
const CARRIER_SUCCESS = 'Synchronized carriers';
|
15 |
* Adminhtml controller that refreshes carriers in the temando_carrier table.
|
16 |
* @return
|
17 |
*/
|
18 |
+
public function indexAction()
|
19 |
+
{
|
20 |
|
21 |
try {
|
22 |
$api = Mage::getModel('temando/api_client');
|
app/code/community/Temando/Temando/controllers/Adminhtml/JsonController.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Adminhtml_JsonController extends Mage_Adminhtml_Controller_Action {
|
4 |
|
5 |
/**
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Json Controller
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Adminhtml_JsonController extends Mage_Adminhtml_Controller_Action {
|
9 |
|
10 |
/**
|
app/code/community/Temando/Temando/controllers/Adminhtml/ManifestController.php
CHANGED
@@ -1,5 +1,10 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_Adminhtml_ManifestController extends Mage_Adminhtml_Controller_Action
|
4 |
{
|
5 |
|
@@ -116,6 +121,68 @@ class Temando_Temando_Adminhtml_ManifestController extends Mage_Adminhtml_Contro
|
|
116 |
$this->_redirect('*/*/');
|
117 |
}
|
118 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
public function manifestAction()
|
120 |
{
|
121 |
$manifest = Mage::getModel('temando/manifest')
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Manifest Controller
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_Adminhtml_ManifestController extends Mage_Adminhtml_Controller_Action
|
9 |
{
|
10 |
|
121 |
$this->_redirect('*/*/');
|
122 |
}
|
123 |
|
124 |
+
public function retrieveAction()
|
125 |
+
{
|
126 |
+
$postData = $this->getRequest()->getPost();
|
127 |
+
$post = $this->_filterDates($postData, array('from', 'to'));
|
128 |
+
$carriers = $this->getRequest()->getParam('carrier_id');
|
129 |
+
if (!is_array($carriers)) {
|
130 |
+
$carriers = array($carriers);
|
131 |
+
}
|
132 |
+
|
133 |
+
if (count($carriers) != 1) {
|
134 |
+
$this->_getSession()->addError($this->__('Please only select one carrier at a time to retrieve a previous manifest.'));
|
135 |
+
$this->_redirect('*/*/');
|
136 |
+
} else {
|
137 |
+
$carriers_options = Mage::getModel('temando/shipping_carrier_temando_source_method')->getOptions();
|
138 |
+
$carrierId = $carriers[0];
|
139 |
+
|
140 |
+
$request = array(
|
141 |
+
'carrierId' => $carrierId,
|
142 |
+
'location' => $this->getRequest()->getParam('warehouse_id'),
|
143 |
+
'readyDate' => isset($post['from'])?$post['from']:'',
|
144 |
+
'type' => 'Confirmed',
|
145 |
+
'labelPrinterType' => Mage::helper('temando')->getConfigData('options/label_type')
|
146 |
+
);
|
147 |
+
try {
|
148 |
+
$api = Mage::getModel('temando/api_client');
|
149 |
+
/* @var $api Temando_Temando_Model_Api_Client */
|
150 |
+
$api->connect(
|
151 |
+
Mage::helper('temando')->getConfigData('general/username'),
|
152 |
+
Mage::helper('temando')->getConfigData('general/password'),
|
153 |
+
Mage::helper('temando')->getConfigData('general/sandbox'));
|
154 |
+
$result = $api->getManifest($request);
|
155 |
+
if (!$result) {
|
156 |
+
throw new Exception('Cannot send request');
|
157 |
+
}
|
158 |
+
$carrier_name = $carriers_options[$carrierId];
|
159 |
+
if (!isset($result->manifestDocument) || !((string)$result->manifestDocument)) {
|
160 |
+
throw new Exception('No data for carrier: ' . $carrier_name);
|
161 |
+
}
|
162 |
+
|
163 |
+
$doc = base64_decode($result->manifestDocument);
|
164 |
+
$length = strlen($doc);
|
165 |
+
if ($length) {
|
166 |
+
$this->getResponse()
|
167 |
+
->setHttpResponseCode(200)
|
168 |
+
->setHeader('Pragma', 'public', true)
|
169 |
+
->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true)
|
170 |
+
->setHeader('Content-type', $result->manifestDocumentType, true)
|
171 |
+
->setHeader('Content-Length', $length)
|
172 |
+
->setHeader('Content-Disposition', 'attachment; filename="manifest-' . $carrierId . '-' . $post['from'] . '.pdf"')
|
173 |
+
->setHeader('Last-Modified', date('r'));
|
174 |
+
$this->getResponse()->clearBody();
|
175 |
+
$this->getResponse()->sendHeaders();
|
176 |
+
print $doc;
|
177 |
+
}
|
178 |
+
} catch (Exception $e) {
|
179 |
+
$this->_getSession()
|
180 |
+
->addError($e->getMessage());
|
181 |
+
$this->_redirect('*/*/');
|
182 |
+
}
|
183 |
+
}
|
184 |
+
}
|
185 |
+
|
186 |
public function manifestAction()
|
187 |
{
|
188 |
$manifest = Mage::getModel('temando/manifest')
|
app/code/community/Temando/Temando/controllers/Adminhtml/ShipmentController.php
CHANGED
@@ -1,15 +1,23 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
$this->loadLayout()
|
7 |
->_setActiveMenu('temando/shipment')
|
8 |
->_addBreadcrumb(Mage::helper('adminhtml')->__('Shipment Manager'), Mage::helper('adminhtml')->__('Shipment Manager'))
|
9 |
->renderLayout();
|
10 |
}
|
11 |
|
12 |
-
public function editAction()
|
|
|
13 |
$id = $this->getRequest()->getParam('id');
|
14 |
$shipment = Mage::getModel('temando/shipment')->load($id);
|
15 |
/* @var $shipment Temando_Temando_Model_Shipment */
|
@@ -44,7 +52,8 @@ class Temando_Temando_Adminhtml_ShipmentController extends Mage_Adminhtml_Contro
|
|
44 |
}
|
45 |
}
|
46 |
|
47 |
-
public function saveAction()
|
|
|
48 |
if ($data = $this->getRequest()->getPost()) {
|
49 |
$shipment = Mage::getModel('temando/shipment');
|
50 |
/* @var $shipment Temando_Temando_Model_Shipment */
|
@@ -113,8 +122,8 @@ class Temando_Temando_Adminhtml_ShipmentController extends Mage_Adminhtml_Contro
|
|
113 |
|
114 |
if ($shipment->getBoxes()) {
|
115 |
$shipment->fetchQuotes(
|
116 |
-
Mage::helper('temando')->getConfigData('general/username'),
|
117 |
-
Mage::helper('temando')->getConfigData('general/password'),
|
118 |
Mage::helper('temando')->getConfigData('general/sandbox')
|
119 |
);
|
120 |
}
|
@@ -127,7 +136,7 @@ class Temando_Temando_Adminhtml_ShipmentController extends Mage_Adminhtml_Contro
|
|
127 |
break;
|
128 |
case 'next':
|
129 |
// TODO: save and next
|
130 |
-
default:
|
131 |
$this->_redirect('*/*/');
|
132 |
break;
|
133 |
}
|
@@ -142,7 +151,8 @@ class Temando_Temando_Adminhtml_ShipmentController extends Mage_Adminhtml_Contro
|
|
142 |
$this->_redirect('*/*/');
|
143 |
}
|
144 |
|
145 |
-
protected function _validateFormData(&$data)
|
|
|
146 |
$return = array(
|
147 |
'notices' => array(),
|
148 |
'errors' => array(),
|
@@ -166,7 +176,8 @@ class Temando_Temando_Adminhtml_ShipmentController extends Mage_Adminhtml_Contro
|
|
166 |
return $return;
|
167 |
}
|
168 |
|
169 |
-
public function bookAction()
|
|
|
170 |
$shipment_id = $this->getRequest()->getParam('shipment');
|
171 |
$shipment = Mage::getModel('temando/shipment')
|
172 |
->load($shipment_id);
|
@@ -311,7 +322,8 @@ class Temando_Temando_Adminhtml_ShipmentController extends Mage_Adminhtml_Contro
|
|
311 |
$this->_redirect('*/*/edit', array('id' => $shipment_id));
|
312 |
}
|
313 |
|
314 |
-
protected function _makeBooking(Temando_Temando_Model_Shipment $shipment, Temando_Temando_Model_Quote $quote)
|
|
|
315 |
$order = $shipment->getOrder();
|
316 |
/* @var $order Mage_Sales_Model_Order */
|
317 |
|
@@ -320,10 +332,12 @@ class Temando_Temando_Adminhtml_ShipmentController extends Mage_Adminhtml_Contro
|
|
320 |
$request
|
321 |
->setMagentoQuoteId($order->getQuoteId())
|
322 |
->setDestination(
|
323 |
-
$shipment->getDestinationCountry(),
|
324 |
-
$shipment->getDestinationPostcode(),
|
325 |
-
$shipment->getDestinationCity(),
|
326 |
-
$shipment->getDestinationStreet()
|
|
|
|
|
327 |
->setItems($shipment->getBoxes()->getItems());
|
328 |
if ($shipment->getReadyDate()) {
|
329 |
$request->setReady(strtotime($shipment->getReadyDate()), $shipment->getReadyTime());
|
@@ -341,7 +355,7 @@ class Temando_Temando_Adminhtml_ShipmentController extends Mage_Adminhtml_Contro
|
|
341 |
'companyName' => $shipment->getDestinationCompanyName(),
|
342 |
'street' => $shipment->getDestinationStreet(),
|
343 |
'suburb' => $shipment->getDestinationCity(),
|
344 |
-
'code' =>
|
345 |
'country' => $shipment->getDestinationCountry(),
|
346 |
'phone1' => $shipment->getDestinationPhone(),
|
347 |
'phone2' => '',
|
@@ -369,14 +383,15 @@ class Temando_Temando_Adminhtml_ShipmentController extends Mage_Adminhtml_Contro
|
|
369 |
$api = Mage::getModel('temando/api_client');
|
370 |
/* @var $api Temando_Temando_Model_Api_Client */
|
371 |
$api->connect(
|
372 |
-
Mage::helper('temando')->getConfigData('general/username'),
|
373 |
-
Mage::helper('temando')->getConfigData('general/password'),
|
374 |
Mage::helper('temando')->getConfigData('general/sandbox')
|
375 |
);
|
376 |
return $api->makeBooking($request_array);
|
377 |
}
|
378 |
|
379 |
-
protected function _processBookingResult($booking_result, Temando_Temando_Model_Shipment $shipment, Temando_Temando_Model_Quote $quote)
|
|
|
380 |
if ($booking_result) {
|
381 |
|
382 |
if (!isset($booking_result->bookingNumber)) {
|
@@ -481,7 +496,8 @@ class Temando_Temando_Adminhtml_ShipmentController extends Mage_Adminhtml_Contro
|
|
481 |
/**
|
482 |
* Serve shipping labels
|
483 |
*/
|
484 |
-
public function consignmentAction()
|
|
|
485 |
$shipment = Mage::getModel('temando/shipment')->load($this->getRequest()->getParam('id'));
|
486 |
/* @var $shipment Temando_Temando_Model_Shipment */
|
487 |
|
@@ -517,5 +533,4 @@ class Temando_Temando_Adminhtml_ShipmentController extends Mage_Adminhtml_Contro
|
|
517 |
}
|
518 |
}
|
519 |
}
|
520 |
-
|
521 |
}
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Shipment Controller
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Adminhtml_ShipmentController extends Mage_Adminhtml_Controller_Action
|
9 |
+
{
|
10 |
+
|
11 |
+
public function indexAction()
|
12 |
+
{
|
13 |
$this->loadLayout()
|
14 |
->_setActiveMenu('temando/shipment')
|
15 |
->_addBreadcrumb(Mage::helper('adminhtml')->__('Shipment Manager'), Mage::helper('adminhtml')->__('Shipment Manager'))
|
16 |
->renderLayout();
|
17 |
}
|
18 |
|
19 |
+
public function editAction()
|
20 |
+
{
|
21 |
$id = $this->getRequest()->getParam('id');
|
22 |
$shipment = Mage::getModel('temando/shipment')->load($id);
|
23 |
/* @var $shipment Temando_Temando_Model_Shipment */
|
52 |
}
|
53 |
}
|
54 |
|
55 |
+
public function saveAction()
|
56 |
+
{
|
57 |
if ($data = $this->getRequest()->getPost()) {
|
58 |
$shipment = Mage::getModel('temando/shipment');
|
59 |
/* @var $shipment Temando_Temando_Model_Shipment */
|
122 |
|
123 |
if ($shipment->getBoxes()) {
|
124 |
$shipment->fetchQuotes(
|
125 |
+
Mage::helper('temando')->getConfigData('general/username'),
|
126 |
+
Mage::helper('temando')->getConfigData('general/password'),
|
127 |
Mage::helper('temando')->getConfigData('general/sandbox')
|
128 |
);
|
129 |
}
|
136 |
break;
|
137 |
case 'next':
|
138 |
// TODO: save and next
|
139 |
+
default:
|
140 |
$this->_redirect('*/*/');
|
141 |
break;
|
142 |
}
|
151 |
$this->_redirect('*/*/');
|
152 |
}
|
153 |
|
154 |
+
protected function _validateFormData(&$data)
|
155 |
+
{
|
156 |
$return = array(
|
157 |
'notices' => array(),
|
158 |
'errors' => array(),
|
176 |
return $return;
|
177 |
}
|
178 |
|
179 |
+
public function bookAction()
|
180 |
+
{
|
181 |
$shipment_id = $this->getRequest()->getParam('shipment');
|
182 |
$shipment = Mage::getModel('temando/shipment')
|
183 |
->load($shipment_id);
|
322 |
$this->_redirect('*/*/edit', array('id' => $shipment_id));
|
323 |
}
|
324 |
|
325 |
+
protected function _makeBooking(Temando_Temando_Model_Shipment $shipment, Temando_Temando_Model_Quote $quote)
|
326 |
+
{
|
327 |
$order = $shipment->getOrder();
|
328 |
/* @var $order Mage_Sales_Model_Order */
|
329 |
|
332 |
$request
|
333 |
->setMagentoQuoteId($order->getQuoteId())
|
334 |
->setDestination(
|
335 |
+
$shipment->getDestinationCountry(),
|
336 |
+
$shipment->getDestinationPostcode(),
|
337 |
+
$shipment->getDestinationCity(),
|
338 |
+
$shipment->getDestinationStreet(),
|
339 |
+
$shipment->getDestinationType())
|
340 |
+
->setDeliveryOptions($shipment->getDeliveryOptionsArray())
|
341 |
->setItems($shipment->getBoxes()->getItems());
|
342 |
if ($shipment->getReadyDate()) {
|
343 |
$request->setReady(strtotime($shipment->getReadyDate()), $shipment->getReadyTime());
|
355 |
'companyName' => $shipment->getDestinationCompanyName(),
|
356 |
'street' => $shipment->getDestinationStreet(),
|
357 |
'suburb' => $shipment->getDestinationCity(),
|
358 |
+
'code' => $shipment->getDestinationPostcode(),
|
359 |
'country' => $shipment->getDestinationCountry(),
|
360 |
'phone1' => $shipment->getDestinationPhone(),
|
361 |
'phone2' => '',
|
383 |
$api = Mage::getModel('temando/api_client');
|
384 |
/* @var $api Temando_Temando_Model_Api_Client */
|
385 |
$api->connect(
|
386 |
+
Mage::helper('temando')->getConfigData('general/username'),
|
387 |
+
Mage::helper('temando')->getConfigData('general/password'),
|
388 |
Mage::helper('temando')->getConfigData('general/sandbox')
|
389 |
);
|
390 |
return $api->makeBooking($request_array);
|
391 |
}
|
392 |
|
393 |
+
protected function _processBookingResult($booking_result, Temando_Temando_Model_Shipment $shipment, Temando_Temando_Model_Quote $quote)
|
394 |
+
{
|
395 |
if ($booking_result) {
|
396 |
|
397 |
if (!isset($booking_result->bookingNumber)) {
|
496 |
/**
|
497 |
* Serve shipping labels
|
498 |
*/
|
499 |
+
public function consignmentAction()
|
500 |
+
{
|
501 |
$shipment = Mage::getModel('temando/shipment')->load($this->getRequest()->getParam('id'));
|
502 |
/* @var $shipment Temando_Temando_Model_Shipment */
|
503 |
|
533 |
}
|
534 |
}
|
535 |
}
|
|
|
536 |
}
|
app/code/community/Temando/Temando/controllers/Adminhtml/WizardController.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
const ERR_NO_SOAP = 'SOAP is not enabled on this server. Please enable SOAP to use the Temando plugin.';
|
6 |
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Wizard Controller
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_Adminhtml_WizardController extends Mage_Adminhtml_Controller_Action
|
9 |
+
{
|
10 |
|
11 |
const ERR_NO_SOAP = 'SOAP is not enabled on this server. Please enable SOAP to use the Temando plugin.';
|
12 |
|
app/code/community/Temando/Temando/controllers/PcsController.php
CHANGED
@@ -1,21 +1,26 @@
|
|
1 |
<?php
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
3 |
class Temando_Temando_PcsController extends Mage_Core_Controller_Front_Action
|
4 |
{
|
5 |
/**
|
6 |
-
* @var Temando_Temando_Model_Pcs
|
7 |
*/
|
8 |
protected $_validator = null;
|
9 |
-
|
10 |
public function testAction()
|
11 |
{
|
12 |
$shippingMethod = 'temando_flat';
|
13 |
$selected_quote_id = preg_replace('#^[^_]*_#', '', $shippingMethod);
|
14 |
-
|
15 |
echo Mage::helper('temando')->isQuoteDynamic($selected_quote_id) ?
|
16 |
'DYNAMIC' : 'FREE/FLAT';
|
17 |
}
|
18 |
-
|
19 |
private $_result = array (
|
20 |
'query' => '',
|
21 |
'suggestions' => array(),
|
@@ -29,24 +34,24 @@ class Temando_Temando_PcsController extends Mage_Core_Controller_Front_Action
|
|
29 |
)
|
30 |
)
|
31 |
);
|
32 |
-
|
33 |
public function construct() {
|
34 |
parent:: construct();
|
35 |
-
|
36 |
$this->loadLayout();
|
37 |
$this->renderLayout();
|
38 |
}
|
39 |
-
|
40 |
protected function _makeAutocomplete($query, $country = null)
|
41 |
-
{
|
42 |
$country = $country ? $country : Mage::helper('temando')->getDefaultCountryId();
|
43 |
$this->_result['query'] = Mage::helper('core')->escapeHtml($query);
|
44 |
-
|
45 |
$this->_getValidator();
|
46 |
$this->_validator->setCountry($country)->setQuery($query);
|
47 |
-
|
48 |
$suggestions = $this->_validator->getSuggestions();
|
49 |
-
|
50 |
$i = -1;
|
51 |
if(!empty($suggestions)) {
|
52 |
//have results - load into result array
|
@@ -56,7 +61,7 @@ class Temando_Temando_PcsController extends Mage_Core_Controller_Front_Action
|
|
56 |
$fulltext = $item['name'] .', ';
|
57 |
$fulltext.= array_key_exists('postcodes', $item) && !empty($item['postcodes']) ? $item['postcodes'][0]['code'].' ' : ' ';
|
58 |
$fulltext.= $item['country']['iso_code2'];
|
59 |
-
|
60 |
if (!in_array($fulltext, $this->_result['suggestions'])) {
|
61 |
$i++; $this->_result['suggestions'][$i] = $fulltext;
|
62 |
}
|
@@ -77,12 +82,12 @@ class Temando_Temando_PcsController extends Mage_Core_Controller_Front_Action
|
|
77 |
|
78 |
return $result;
|
79 |
}
|
80 |
-
|
81 |
public function autocompletecartAction() {
|
82 |
-
|
83 |
$query = $this->getRequest()->getParam('query');
|
84 |
$country = $this->getRequest()->getParam('country', Mage::helper('temando')->getDefaultCountryId());
|
85 |
-
|
86 |
echo $this->_makeAutocomplete($query, $country);
|
87 |
exit;
|
88 |
}
|
@@ -157,7 +162,7 @@ class Temando_Temando_PcsController extends Mage_Core_Controller_Front_Action
|
|
157 |
$options[$_t[0]] = $_t[1];
|
158 |
}
|
159 |
}
|
160 |
-
|
161 |
//get bundle products options
|
162 |
$bundle_options = array();
|
163 |
if($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_BUNDLE)
|
@@ -184,11 +189,11 @@ class Temando_Temando_PcsController extends Mage_Core_Controller_Front_Action
|
|
184 |
}
|
185 |
}
|
186 |
}
|
187 |
-
|
188 |
if (count($options)) {
|
189 |
$request['options'] = $options;
|
190 |
-
}
|
191 |
-
|
192 |
if(count($bundle_options)) {
|
193 |
$request['bundle_option'] = $bundle_options;
|
194 |
}
|
@@ -241,7 +246,7 @@ class Temando_Temando_PcsController extends Mage_Core_Controller_Front_Action
|
|
241 |
die($e->getMessage());
|
242 |
}
|
243 |
}
|
244 |
-
|
245 |
protected function _getValidator()
|
246 |
{
|
247 |
if(!$this->_validator) {
|
@@ -249,5 +254,5 @@ class Temando_Temando_PcsController extends Mage_Core_Controller_Front_Action
|
|
249 |
}
|
250 |
return $this;
|
251 |
}
|
252 |
-
|
253 |
}
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Pcs Controller
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
class Temando_Temando_PcsController extends Mage_Core_Controller_Front_Action
|
9 |
{
|
10 |
/**
|
11 |
+
* @var Temando_Temando_Model_Pcs
|
12 |
*/
|
13 |
protected $_validator = null;
|
14 |
+
|
15 |
public function testAction()
|
16 |
{
|
17 |
$shippingMethod = 'temando_flat';
|
18 |
$selected_quote_id = preg_replace('#^[^_]*_#', '', $shippingMethod);
|
19 |
+
|
20 |
echo Mage::helper('temando')->isQuoteDynamic($selected_quote_id) ?
|
21 |
'DYNAMIC' : 'FREE/FLAT';
|
22 |
}
|
23 |
+
|
24 |
private $_result = array (
|
25 |
'query' => '',
|
26 |
'suggestions' => array(),
|
34 |
)
|
35 |
)
|
36 |
);
|
37 |
+
|
38 |
public function construct() {
|
39 |
parent:: construct();
|
40 |
+
|
41 |
$this->loadLayout();
|
42 |
$this->renderLayout();
|
43 |
}
|
44 |
+
|
45 |
protected function _makeAutocomplete($query, $country = null)
|
46 |
+
{
|
47 |
$country = $country ? $country : Mage::helper('temando')->getDefaultCountryId();
|
48 |
$this->_result['query'] = Mage::helper('core')->escapeHtml($query);
|
49 |
+
|
50 |
$this->_getValidator();
|
51 |
$this->_validator->setCountry($country)->setQuery($query);
|
52 |
+
|
53 |
$suggestions = $this->_validator->getSuggestions();
|
54 |
+
|
55 |
$i = -1;
|
56 |
if(!empty($suggestions)) {
|
57 |
//have results - load into result array
|
61 |
$fulltext = $item['name'] .', ';
|
62 |
$fulltext.= array_key_exists('postcodes', $item) && !empty($item['postcodes']) ? $item['postcodes'][0]['code'].' ' : ' ';
|
63 |
$fulltext.= $item['country']['iso_code2'];
|
64 |
+
|
65 |
if (!in_array($fulltext, $this->_result['suggestions'])) {
|
66 |
$i++; $this->_result['suggestions'][$i] = $fulltext;
|
67 |
}
|
82 |
|
83 |
return $result;
|
84 |
}
|
85 |
+
|
86 |
public function autocompletecartAction() {
|
87 |
+
|
88 |
$query = $this->getRequest()->getParam('query');
|
89 |
$country = $this->getRequest()->getParam('country', Mage::helper('temando')->getDefaultCountryId());
|
90 |
+
|
91 |
echo $this->_makeAutocomplete($query, $country);
|
92 |
exit;
|
93 |
}
|
162 |
$options[$_t[0]] = $_t[1];
|
163 |
}
|
164 |
}
|
165 |
+
|
166 |
//get bundle products options
|
167 |
$bundle_options = array();
|
168 |
if($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_BUNDLE)
|
189 |
}
|
190 |
}
|
191 |
}
|
192 |
+
|
193 |
if (count($options)) {
|
194 |
$request['options'] = $options;
|
195 |
+
}
|
196 |
+
|
197 |
if(count($bundle_options)) {
|
198 |
$request['bundle_option'] = $bundle_options;
|
199 |
}
|
246 |
die($e->getMessage());
|
247 |
}
|
248 |
}
|
249 |
+
|
250 |
protected function _getValidator()
|
251 |
{
|
252 |
if(!$this->_validator) {
|
254 |
}
|
255 |
return $this;
|
256 |
}
|
257 |
+
|
258 |
}
|
app/code/community/Temando/Temando/controllers/WizardController.php
CHANGED
@@ -1,6 +1,12 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
const ERR_ORIGIN_EXISTS = 'This warehouse already exists. Please select another name.';
|
6 |
const ERR_NO_CONNECT = 'Cannot connect to the api. Please check your connection and try again.';
|
1 |
<?php
|
2 |
+
/**
|
3 |
+
* Wizard Controller
|
4 |
+
*
|
5 |
+
* @package Temando_Temando
|
6 |
+
* @author Temando Magento Team <marketing@temando.com>
|
7 |
+
*/
|
8 |
+
class Temando_Temando_WizardController extends Mage_Core_Controller_Front_Action
|
9 |
+
{
|
10 |
|
11 |
const ERR_ORIGIN_EXISTS = 'This warehouse already exists. Please select another name.';
|
12 |
const ERR_NO_CONNECT = 'Cannot connect to the api. Please check your connection and try again.';
|
app/code/community/Temando/Temando/etc/adminhtml.xml
CHANGED
@@ -37,11 +37,11 @@
|
|
37 |
</children>
|
38 |
</configuration>
|
39 |
<multiwarehouse translate="title" module="temando">
|
40 |
-
<title>Multi Warehouse -
|
41 |
<sort_order>40</sort_order>
|
42 |
</multiwarehouse>
|
43 |
<advancedrule translate="title" module="temando">
|
44 |
-
<title>Advance Shipping Rules -
|
45 |
<sort_order>50</sort_order>
|
46 |
</advancedrule>
|
47 |
<partialshipments translate="title" module="temando">
|
@@ -80,10 +80,10 @@
|
|
80 |
</children>
|
81 |
</configuration>
|
82 |
<multiwarehouse>
|
83 |
-
<title>Multi Warehouse -
|
84 |
</multiwarehouse>
|
85 |
<advancedrule>
|
86 |
-
<title>Advance Shipping Rules -
|
87 |
</advancedrule>
|
88 |
<partialshipments>
|
89 |
<title>Partial Shipments - Business plan</title>
|
37 |
</children>
|
38 |
</configuration>
|
39 |
<multiwarehouse translate="title" module="temando">
|
40 |
+
<title>Multi Warehouse - Business plan</title>
|
41 |
<sort_order>40</sort_order>
|
42 |
</multiwarehouse>
|
43 |
<advancedrule translate="title" module="temando">
|
44 |
+
<title>Advance Shipping Rules - Business plan</title>
|
45 |
<sort_order>50</sort_order>
|
46 |
</advancedrule>
|
47 |
<partialshipments translate="title" module="temando">
|
80 |
</children>
|
81 |
</configuration>
|
82 |
<multiwarehouse>
|
83 |
+
<title>Multi Warehouse - Business plan</title>
|
84 |
</multiwarehouse>
|
85 |
<advancedrule>
|
86 |
+
<title>Advance Shipping Rules - Business plan</title>
|
87 |
</advancedrule>
|
88 |
<partialshipments>
|
89 |
<title>Partial Shipments - Business plan</title>
|
app/code/community/Temando/Temando/etc/config.xml
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Temando_Temando>
|
5 |
-
<version>1.
|
6 |
</Temando_Temando>
|
7 |
</modules>
|
8 |
<global>
|
@@ -87,6 +87,15 @@
|
|
87 |
</retail_product_view>
|
88 |
</observers>
|
89 |
</controller_action_predispatch_checkout_cart_estimatePost>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
</events>
|
91 |
</global>
|
92 |
<frontend>
|
@@ -187,6 +196,7 @@
|
|
187 |
<subclass><![CDATA[Household Goods]]></subclass>
|
188 |
<packaging><![CDATA[0]]></packaging>
|
189 |
<fragile><![CDATA[0]]></fragile>
|
|
|
190 |
<length><![CDATA[10]]></length>
|
191 |
<width><![CDATA[10]]></width>
|
192 |
<height><![CDATA[10]]></height>
|
@@ -211,7 +221,7 @@
|
|
211 |
<allowed_methods>54381,54426,54359,54396,54360,54429,54433,54432,54425,54343,54430,54431,54427,54428,54344,54398,54358,54410</allowed_methods>
|
212 |
<weightunit>Grams</weightunit>
|
213 |
<name>Temando</name>
|
214 |
-
<title>
|
215 |
<always_use_defaults>0</always_use_defaults>
|
216 |
<specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg>
|
217 |
<sallowspecific>1</sallowspecific>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<Temando_Temando>
|
5 |
+
<version>1.4.0</version>
|
6 |
</Temando_Temando>
|
7 |
</modules>
|
8 |
<global>
|
87 |
</retail_product_view>
|
88 |
</observers>
|
89 |
</controller_action_predispatch_checkout_cart_estimatePost>
|
90 |
+
<sales_quote_save_after>
|
91 |
+
<observers>
|
92 |
+
<temando_sales_quote_save_after_handler>
|
93 |
+
<class>Temando_Temando_Model_Observer</class>
|
94 |
+
<method>saveDestinationType</method>
|
95 |
+
<args></args>
|
96 |
+
</temando_sales_quote_save_after_handler>
|
97 |
+
</observers>
|
98 |
+
</sales_quote_save_after>
|
99 |
</events>
|
100 |
</global>
|
101 |
<frontend>
|
196 |
<subclass><![CDATA[Household Goods]]></subclass>
|
197 |
<packaging><![CDATA[0]]></packaging>
|
198 |
<fragile><![CDATA[0]]></fragile>
|
199 |
+
<dangerous><![CDATA[0]]></dangerous>
|
200 |
<length><![CDATA[10]]></length>
|
201 |
<width><![CDATA[10]]></width>
|
202 |
<height><![CDATA[10]]></height>
|
221 |
<allowed_methods>54381,54426,54359,54396,54360,54429,54433,54432,54425,54343,54430,54431,54427,54428,54344,54398,54358,54410</allowed_methods>
|
222 |
<weightunit>Grams</weightunit>
|
223 |
<name>Temando</name>
|
224 |
+
<title>Shipping Options</title>
|
225 |
<always_use_defaults>0</always_use_defaults>
|
226 |
<specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg>
|
227 |
<sallowspecific>1</sallowspecific>
|
app/code/community/Temando/Temando/etc/system.xml
CHANGED
@@ -118,6 +118,47 @@
|
|
118 |
</show_transit_time>
|
119 |
</fields>
|
120 |
</options>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
<insurance translate="label">
|
122 |
<label>Insurance</label>
|
123 |
<frontend_type>text</frontend_type>
|
@@ -302,11 +343,21 @@
|
|
302 |
<show_in_website>1</show_in_website>
|
303 |
<show_in_store>1</show_in_store>
|
304 |
</fragile>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
<length translate="label">
|
306 |
<label>Length</label>
|
307 |
<frontend_model>temando/adminhtml_system_config_form_field_required</frontend_model>
|
308 |
<frontend_type>text</frontend_type>
|
309 |
-
<sort_order>
|
310 |
<show_in_default>1</show_in_default>
|
311 |
<show_in_website>1</show_in_website>
|
312 |
<show_in_store>1</show_in_store>
|
@@ -315,7 +366,7 @@
|
|
315 |
<label>Width</label>
|
316 |
<frontend_model>temando/adminhtml_system_config_form_field_required</frontend_model>
|
317 |
<frontend_type>text</frontend_type>
|
318 |
-
<sort_order>
|
319 |
<show_in_default>1</show_in_default>
|
320 |
<show_in_website>1</show_in_website>
|
321 |
<show_in_store>1</show_in_store>
|
@@ -324,7 +375,7 @@
|
|
324 |
<label>Height</label>
|
325 |
<frontend_model>temando/adminhtml_system_config_form_field_required</frontend_model>
|
326 |
<frontend_type>text</frontend_type>
|
327 |
-
<sort_order>
|
328 |
<show_in_default>1</show_in_default>
|
329 |
<show_in_website>1</show_in_website>
|
330 |
<show_in_store>1</show_in_store>
|
@@ -486,31 +537,11 @@
|
|
486 |
<show_in_store>0</show_in_store>
|
487 |
<comment><![CDATA[Does the warehouse have a dock?]]></comment>
|
488 |
</dock>
|
489 |
-
<limited_access translate="label">
|
490 |
-
<label>Limited Access</label>
|
491 |
-
<frontend_type>select</frontend_type>
|
492 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
493 |
-
<sort_order>160</sort_order>
|
494 |
-
<show_in_default>1</show_in_default>
|
495 |
-
<show_in_website>0</show_in_website>
|
496 |
-
<show_in_store>0</show_in_store>
|
497 |
-
<comment><![CDATA[Does the warehouse have limited access?]]></comment>
|
498 |
-
</limited_access>
|
499 |
-
<pobox translate="label">
|
500 |
-
<label>PO Box</label>
|
501 |
-
<frontend_type>select</frontend_type>
|
502 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
503 |
-
<sort_order>160</sort_order>
|
504 |
-
<show_in_default>1</show_in_default>
|
505 |
-
<show_in_website>0</show_in_website>
|
506 |
-
<show_in_store>0</show_in_store>
|
507 |
-
<comment><![CDATA[Is the address of this warehouse a postal box?]]></comment>
|
508 |
-
</pobox>
|
509 |
<warehouse_button translate="label">
|
510 |
<label></label>
|
511 |
<frontend_model>temando/adminhtml_system_config_form_button_warehouse</frontend_model>
|
512 |
<frontend_type>button</frontend_type>
|
513 |
-
<sort_order>
|
514 |
<show_in_default>1</show_in_default>
|
515 |
<show_in_website>1</show_in_website>
|
516 |
<show_in_store>1</show_in_store>
|
@@ -539,11 +570,20 @@
|
|
539 |
<show_in_website>1</show_in_website>
|
540 |
<show_in_store>1</show_in_store>
|
541 |
</active>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
542 |
<sallowspecific translate="label">
|
543 |
<label>Ship to applicable countries</label>
|
544 |
<frontend_type>select</frontend_type>
|
545 |
<config_path>carriers/temando/sallowspecific</config_path>
|
546 |
-
<sort_order>
|
547 |
<frontend_class>shipping-applicable-country</frontend_class>
|
548 |
<source_model>adminhtml/system_config_source_shipping_allspecificcountries</source_model>
|
549 |
<show_in_default>1</show_in_default>
|
@@ -553,7 +593,7 @@
|
|
553 |
<specificcountry translate="label">
|
554 |
<label>Ship to specific countries</label>
|
555 |
<frontend_type>multiselect</frontend_type>
|
556 |
-
<sort_order>
|
557 |
<source_model>adminhtml/system_config_source_country</source_model>
|
558 |
<show_in_default>1</show_in_default>
|
559 |
<show_in_website>1</show_in_website>
|
@@ -562,34 +602,17 @@
|
|
562 |
<showmethod translate="label">
|
563 |
<label>Show method if not applicable</label>
|
564 |
<frontend_type>select</frontend_type>
|
565 |
-
<sort_order>
|
566 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
567 |
<show_in_default>1</show_in_default>
|
568 |
<show_in_website>1</show_in_website>
|
569 |
<show_in_store>1</show_in_store>
|
570 |
</showmethod>
|
571 |
-
<free_shipping_enable translate="label">
|
572 |
-
<label>Free Shipping with Minimum Order Amount</label>
|
573 |
-
<frontend_type>select</frontend_type>
|
574 |
-
<source_model>adminhtml/system_config_source_enabledisable</source_model>
|
575 |
-
<sort_order>50</sort_order>
|
576 |
-
<show_in_default>1</show_in_default>
|
577 |
-
<show_in_website>1</show_in_website>
|
578 |
-
<show_in_store>1</show_in_store>
|
579 |
-
</free_shipping_enable>
|
580 |
-
<free_shipping_subtotal translate="label">
|
581 |
-
<label>Minimum Order Amount for Free Shipping</label>
|
582 |
-
<frontend_type>text</frontend_type>
|
583 |
-
<sort_order>60</sort_order>
|
584 |
-
<show_in_default>1</show_in_default>
|
585 |
-
<show_in_website>1</show_in_website>
|
586 |
-
<show_in_store>1</show_in_store>
|
587 |
-
</free_shipping_subtotal>
|
588 |
<specificerrmsg translate="label">
|
589 |
<label>Displayed Error Message</label>
|
590 |
<frontend_type>textarea</frontend_type>
|
591 |
<config_path>carriers/temando/specificerrmsg</config_path>
|
592 |
-
<sort_order>
|
593 |
<show_in_default>1</show_in_default>
|
594 |
<show_in_website>1</show_in_website>
|
595 |
<show_in_store>1</show_in_store>
|
@@ -598,18 +621,18 @@
|
|
598 |
<label>Allowed Carriers</label>
|
599 |
<frontend_type>multiselect</frontend_type>
|
600 |
<config_path>carriers/temando/allowed_methods</config_path>
|
601 |
-
<sort_order>
|
602 |
<source_model>temando/shipping_carrier_temando_source_method</source_model>
|
603 |
<show_in_default>1</show_in_default>
|
604 |
<show_in_website>1</show_in_website>
|
605 |
<show_in_store>1</show_in_store>
|
606 |
-
<comment><![CDATA[Use CTRL + click to select multiple carriers
|
607 |
</allowed_methods>
|
608 |
<update_carrier translate="label">
|
609 |
<label></label>
|
610 |
<frontend_model>temando/adminhtml_system_config_form_button_update</frontend_model>
|
611 |
<frontend_type>button</frontend_type>
|
612 |
-
<sort_order>
|
613 |
<show_in_default>1</show_in_default>
|
614 |
<show_in_website>1</show_in_website>
|
615 |
<show_in_store>1</show_in_store>
|
118 |
</show_transit_time>
|
119 |
</fields>
|
120 |
</options>
|
121 |
+
<checkout translate="label">
|
122 |
+
<label>Checkout Options</label>
|
123 |
+
<frontend_type>text</frontend_type>
|
124 |
+
<sort_order>25</sort_order>
|
125 |
+
<show_in_default>1</show_in_default>
|
126 |
+
<show_in_website>1</show_in_website>
|
127 |
+
<show_in_store>1</show_in_store>
|
128 |
+
<fields>
|
129 |
+
<delivery_options translate="label">
|
130 |
+
<label>Show Delivery Options</label>
|
131 |
+
<frontend_type>select</frontend_type>
|
132 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
133 |
+
<sort_order>10</sort_order>
|
134 |
+
<show_in_default>1</show_in_default>
|
135 |
+
<show_in_website>1</show_in_website>
|
136 |
+
<show_in_store>1</show_in_store>
|
137 |
+
<comment><![CDATA[Show extra delivery options on checkout page?]]></comment>
|
138 |
+
</delivery_options>
|
139 |
+
<location_type translate="label">
|
140 |
+
<label>Destination Location Type</label>
|
141 |
+
<frontend_type>select</frontend_type>
|
142 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
143 |
+
<sort_order>20</sort_order>
|
144 |
+
<show_in_default>1</show_in_default>
|
145 |
+
<show_in_website>1</show_in_website>
|
146 |
+
<show_in_store>1</show_in_store>
|
147 |
+
<depends><delivery_options>1</delivery_options></depends>
|
148 |
+
<comment><![CDATA[Show Residence/Business toggle on checkout?]]></comment>
|
149 |
+
</location_type>
|
150 |
+
<unattended_delivery translate="label">
|
151 |
+
<label>Unattended Delivery</label>
|
152 |
+
<frontend_type>select</frontend_type>
|
153 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
154 |
+
<sort_order>30</sort_order>
|
155 |
+
<show_in_default>1</show_in_default>
|
156 |
+
<show_in_website>1</show_in_website>
|
157 |
+
<show_in_store>1</show_in_store>
|
158 |
+
<depends><delivery_options>1</delivery_options></depends>
|
159 |
+
</unattended_delivery>
|
160 |
+
</fields>
|
161 |
+
</checkout>
|
162 |
<insurance translate="label">
|
163 |
<label>Insurance</label>
|
164 |
<frontend_type>text</frontend_type>
|
343 |
<show_in_website>1</show_in_website>
|
344 |
<show_in_store>1</show_in_store>
|
345 |
</fragile>
|
346 |
+
<dangerous translate="label">
|
347 |
+
<label>Dangerous</label>
|
348 |
+
<frontend_type>select</frontend_type>
|
349 |
+
<frontend_model>temando/adminhtml_system_config_form_field_required</frontend_model>
|
350 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
351 |
+
<sort_order>30</sort_order>
|
352 |
+
<show_in_default>1</show_in_default>
|
353 |
+
<show_in_website>1</show_in_website>
|
354 |
+
<show_in_store>1</show_in_store>
|
355 |
+
</dangerous>
|
356 |
<length translate="label">
|
357 |
<label>Length</label>
|
358 |
<frontend_model>temando/adminhtml_system_config_form_field_required</frontend_model>
|
359 |
<frontend_type>text</frontend_type>
|
360 |
+
<sort_order>40</sort_order>
|
361 |
<show_in_default>1</show_in_default>
|
362 |
<show_in_website>1</show_in_website>
|
363 |
<show_in_store>1</show_in_store>
|
366 |
<label>Width</label>
|
367 |
<frontend_model>temando/adminhtml_system_config_form_field_required</frontend_model>
|
368 |
<frontend_type>text</frontend_type>
|
369 |
+
<sort_order>50</sort_order>
|
370 |
<show_in_default>1</show_in_default>
|
371 |
<show_in_website>1</show_in_website>
|
372 |
<show_in_store>1</show_in_store>
|
375 |
<label>Height</label>
|
376 |
<frontend_model>temando/adminhtml_system_config_form_field_required</frontend_model>
|
377 |
<frontend_type>text</frontend_type>
|
378 |
+
<sort_order>60</sort_order>
|
379 |
<show_in_default>1</show_in_default>
|
380 |
<show_in_website>1</show_in_website>
|
381 |
<show_in_store>1</show_in_store>
|
537 |
<show_in_store>0</show_in_store>
|
538 |
<comment><![CDATA[Does the warehouse have a dock?]]></comment>
|
539 |
</dock>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
540 |
<warehouse_button translate="label">
|
541 |
<label></label>
|
542 |
<frontend_model>temando/adminhtml_system_config_form_button_warehouse</frontend_model>
|
543 |
<frontend_type>button</frontend_type>
|
544 |
+
<sort_order>160</sort_order>
|
545 |
<show_in_default>1</show_in_default>
|
546 |
<show_in_website>1</show_in_website>
|
547 |
<show_in_store>1</show_in_store>
|
570 |
<show_in_website>1</show_in_website>
|
571 |
<show_in_store>1</show_in_store>
|
572 |
</active>
|
573 |
+
<title translate="label">
|
574 |
+
<label>Title</label>
|
575 |
+
<frontend_type>text</frontend_type>
|
576 |
+
<sort_order>20</sort_order>
|
577 |
+
<show_in_default>1</show_in_default>
|
578 |
+
<show_in_website>1</show_in_website>
|
579 |
+
<show_in_store>1</show_in_store>
|
580 |
+
<comment><![CDATA[The heading above the list of Temando shipping methods during checkout.]]></comment>
|
581 |
+
</title>
|
582 |
<sallowspecific translate="label">
|
583 |
<label>Ship to applicable countries</label>
|
584 |
<frontend_type>select</frontend_type>
|
585 |
<config_path>carriers/temando/sallowspecific</config_path>
|
586 |
+
<sort_order>30</sort_order>
|
587 |
<frontend_class>shipping-applicable-country</frontend_class>
|
588 |
<source_model>adminhtml/system_config_source_shipping_allspecificcountries</source_model>
|
589 |
<show_in_default>1</show_in_default>
|
593 |
<specificcountry translate="label">
|
594 |
<label>Ship to specific countries</label>
|
595 |
<frontend_type>multiselect</frontend_type>
|
596 |
+
<sort_order>40</sort_order>
|
597 |
<source_model>adminhtml/system_config_source_country</source_model>
|
598 |
<show_in_default>1</show_in_default>
|
599 |
<show_in_website>1</show_in_website>
|
602 |
<showmethod translate="label">
|
603 |
<label>Show method if not applicable</label>
|
604 |
<frontend_type>select</frontend_type>
|
605 |
+
<sort_order>50</sort_order>
|
606 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
607 |
<show_in_default>1</show_in_default>
|
608 |
<show_in_website>1</show_in_website>
|
609 |
<show_in_store>1</show_in_store>
|
610 |
</showmethod>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
611 |
<specificerrmsg translate="label">
|
612 |
<label>Displayed Error Message</label>
|
613 |
<frontend_type>textarea</frontend_type>
|
614 |
<config_path>carriers/temando/specificerrmsg</config_path>
|
615 |
+
<sort_order>60</sort_order>
|
616 |
<show_in_default>1</show_in_default>
|
617 |
<show_in_website>1</show_in_website>
|
618 |
<show_in_store>1</show_in_store>
|
621 |
<label>Allowed Carriers</label>
|
622 |
<frontend_type>multiselect</frontend_type>
|
623 |
<config_path>carriers/temando/allowed_methods</config_path>
|
624 |
+
<sort_order>70</sort_order>
|
625 |
<source_model>temando/shipping_carrier_temando_source_method</source_model>
|
626 |
<show_in_default>1</show_in_default>
|
627 |
<show_in_website>1</show_in_website>
|
628 |
<show_in_store>1</show_in_store>
|
629 |
+
<comment><![CDATA[Use CTRL + click to select multiple carriers.]]></comment>
|
630 |
</allowed_methods>
|
631 |
<update_carrier translate="label">
|
632 |
<label></label>
|
633 |
<frontend_model>temando/adminhtml_system_config_form_button_update</frontend_model>
|
634 |
<frontend_type>button</frontend_type>
|
635 |
+
<sort_order>80</sort_order>
|
636 |
<show_in_default>1</show_in_default>
|
637 |
<show_in_website>1</show_in_website>
|
638 |
<show_in_store>1</show_in_store>
|
app/code/community/Temando/Temando/sql/temando_setup/mysql4-upgrade-1.3.8-1.3.9.php
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
set_time_limit(0);
|
4 |
+
|
5 |
+
/* @var $this Mage_Eav_Model_Entity_Setup */
|
6 |
+
/* @var $installer Mage_Eav_Model_Entity_Setup */
|
7 |
+
|
8 |
+
$installer = $this;
|
9 |
+
$installer->startSetup();
|
10 |
+
|
11 |
+
/**
|
12 |
+
* Remove free shipping option in Temando shipping method
|
13 |
+
*/
|
14 |
+
$installer->deleteConfigData('carriers/temando/free_shipping_enable');
|
15 |
+
$installer->deleteConfigData('carriers/temando/free_shipping_subtotal');
|
16 |
+
|
17 |
+
/**
|
18 |
+
* Remove limited access and pobox from warehouse options
|
19 |
+
*/
|
20 |
+
$installer->deleteConfigData('temando/origin/limited_access');
|
21 |
+
$installer->deleteConfigData('temando/origin/pobox');
|
22 |
+
|
23 |
+
/**
|
24 |
+
* Dangerous Goods Support
|
25 |
+
*/
|
26 |
+
$installer
|
27 |
+
->getConnection()
|
28 |
+
->addColumn(
|
29 |
+
$this->getTable('temando_box'),
|
30 |
+
'dangerous',
|
31 |
+
'tinyint(1) NOT NULL DEFAULT 0 AFTER `fragile`'
|
32 |
+
);
|
33 |
+
|
34 |
+
$installer->addAttribute('catalog_product', 'temando_dangerous',
|
35 |
+
array(
|
36 |
+
'type' => 'int',
|
37 |
+
'label' => 'Dangerous',
|
38 |
+
'group' => 'Temando',
|
39 |
+
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
|
40 |
+
'source' => 'eav/entity_attribute_source_boolean',
|
41 |
+
'input' => 'select',
|
42 |
+
'default' => false,
|
43 |
+
'visible' => true,
|
44 |
+
'required' => false,
|
45 |
+
'user_defined' => false,
|
46 |
+
'searchable' => false,
|
47 |
+
'filterable' => false,
|
48 |
+
'comparable' => false,
|
49 |
+
'visible_on_front' => false,
|
50 |
+
'unique' => false
|
51 |
+
)
|
52 |
+
);
|
53 |
+
|
54 |
+
$installer
|
55 |
+
->getConnection()
|
56 |
+
->addColumn(
|
57 |
+
$this->getTable('temando_shipment'),
|
58 |
+
'customer_selected_delivery_options',
|
59 |
+
'varchar(500) NULL after `customer_selected_options`'
|
60 |
+
);
|
61 |
+
|
62 |
+
$installer
|
63 |
+
->getConnection()
|
64 |
+
->addColumn(
|
65 |
+
$this->getTable('temando_shipment'),
|
66 |
+
'destination_type',
|
67 |
+
"varchar(30) NOT NULL DEFAULT 'residence' AFTER `destination_email`"
|
68 |
+
);
|
69 |
+
|
70 |
+
$installer->endSetup();
|
app/design/adminhtml/default/default/template/temando/temando/manifest.phtml
CHANGED
@@ -21,6 +21,21 @@
|
|
21 |
}
|
22 |
var validator = new Validation('add_form');
|
23 |
if (validator.validate()) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
$('add_form').submit();
|
25 |
}
|
26 |
}
|
21 |
}
|
22 |
var validator = new Validation('add_form');
|
23 |
if (validator.validate()) {
|
24 |
+
$('add_form').writeAttribute('action', '<?php echo $this->getUrl('*/*/add'); ?>');
|
25 |
+
$('add_form').submit();
|
26 |
+
}
|
27 |
+
}
|
28 |
+
</script>
|
29 |
+
<script type="text/javascript">
|
30 |
+
function retrieveFormSubmit() {
|
31 |
+
var filters = $$('#add_form input', '#add_form select');
|
32 |
+
var elements = [];
|
33 |
+
for(var i in filters){
|
34 |
+
if(filters[i].value && filters[i].value.length && !filters[i].disabled) elements.push(filters[i]);
|
35 |
+
}
|
36 |
+
var validator = new Validation('add_form');
|
37 |
+
if (validator.validate()) {
|
38 |
+
$('add_form').writeAttribute('action', '<?php echo $this->getUrl('*/*/retrieve'); ?>');
|
39 |
$('add_form').submit();
|
40 |
}
|
41 |
}
|
app/design/adminhtml/default/default/template/temando/temando/shipment/anywhere.phtml
CHANGED
@@ -9,6 +9,19 @@ $_shipment = $this->getShipment();
|
|
9 |
</div>
|
10 |
<div class="fieldset">
|
11 |
<table cellspacing="0" class="form-list">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
<tr>
|
13 |
<td class="label"><label><?php echo $this->__('Contact Name'); ?></label></td>
|
14 |
<?php if ($_shipment->isStatusOpened()): ?>
|
@@ -91,7 +104,7 @@ $_shipment = $this->getShipment();
|
|
91 |
</div>
|
92 |
</div>
|
93 |
<script type="text/javascript">
|
94 |
-
//<[CDATA[
|
95 |
var shipping_estimator_url = '<?php echo $this->getUrl('etemando/pcs/autocompletecart', array('_secure' => Mage::app()->getStore()->isCurrentlySecure())); ?>';
|
96 |
var avs = new Avs(
|
97 |
shipping_estimator_url,
|
9 |
</div>
|
10 |
<div class="fieldset">
|
11 |
<table cellspacing="0" class="form-list">
|
12 |
+
<tr>
|
13 |
+
<td class="label"><label><?php echo $this->__('Destination Type'); ?></label></td>
|
14 |
+
<?php if ($_shipment->isStatusOpened()): ?>
|
15 |
+
<td class="value">
|
16 |
+
<select id="destination_type" name="destination_type" class="select">
|
17 |
+
<option value="<?php echo Temando_Temando_Model_Checkout_Delivery_Options::DESTINATION_RESIDENCE ?>" <?php if (Temando_Temando_Model_Checkout_Delivery_Options::DESTINATION_RESIDENCE == $_shipment->getDestinationType()): ?> selected="selected"<?php endif;?>><?php echo ucfirst(Temando_Temando_Model_Checkout_Delivery_Options::DESTINATION_RESIDENCE); ?></option>
|
18 |
+
<option value="<?php echo Temando_Temando_Model_Checkout_Delivery_Options::DESTINATION_BUSINESS ?>" <?php if (Temando_Temando_Model_Checkout_Delivery_Options::DESTINATION_BUSINESS == $_shipment->getDestinationType()): ?> selected="selected"<?php endif;?>><?php echo ucfirst(Temando_Temando_Model_Checkout_Delivery_Options::DESTINATION_BUSINESS); ?></option>
|
19 |
+
</select>
|
20 |
+
</td>
|
21 |
+
<?php else: ?>
|
22 |
+
<td class="value"><?php echo ucfirst($_shipment->getDestinationType()); ?></td>
|
23 |
+
<?php endif; ?>
|
24 |
+
</tr>
|
25 |
<tr>
|
26 |
<td class="label"><label><?php echo $this->__('Contact Name'); ?></label></td>
|
27 |
<?php if ($_shipment->isStatusOpened()): ?>
|
104 |
</div>
|
105 |
</div>
|
106 |
<script type="text/javascript">
|
107 |
+
//<[CDATA[
|
108 |
var shipping_estimator_url = '<?php echo $this->getUrl('etemando/pcs/autocompletecart', array('_secure' => Mage::app()->getStore()->isCurrentlySecure())); ?>';
|
109 |
var avs = new Avs(
|
110 |
shipping_estimator_url,
|
app/design/adminhtml/default/default/template/temando/temando/shipment/boxes.phtml
CHANGED
@@ -27,6 +27,7 @@
|
|
27 |
<col style="width: 150px;" />
|
28 |
<col style="width: 70px;" />
|
29 |
<col style="width: 50px;" />
|
|
|
30 |
<col style="width: 70px;" />
|
31 |
<col style="width: 120px;" />
|
32 |
<col style="width: 90px;" />
|
@@ -45,6 +46,7 @@
|
|
45 |
<th><?php echo $this->__('Comment'); ?></th>
|
46 |
<th class="a-center"><?php echo $this->__('Packaging'); ?></th>
|
47 |
<th class="a-center"><?php echo $this->__('Fragile'); ?></th>
|
|
|
48 |
<th class="a-center"><?php echo $this->__('Qty'); ?></th>
|
49 |
<th class="a-center"><?php echo $this->__('Value'); ?> ($)</th>
|
50 |
<th class="a-center"><?php echo $this->__('Weight'); ?></th>
|
@@ -77,6 +79,13 @@
|
|
77 |
<?php endforeach; ?>
|
78 |
</select>
|
79 |
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
<td><input type="text" id="box_<?php echo $_i; ?>_qty" name="box[<?php echo $_i; ?>][qty]" value="<?php echo (int)$_box->getQty(); ?>" class="input-text" /></td>
|
81 |
<td><input type="text" id="box_<?php echo $_i; ?>_value" name="box[<?php echo $_i; ?>][value]" value="<?php echo sprintf("%01.2f", $_box->getValue()); ?>" class="input-text" /></td>
|
82 |
<td>
|
@@ -127,6 +136,13 @@
|
|
127 |
<?php endforeach; ?>
|
128 |
</select>
|
129 |
</td>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
<td><input type="text" id="box_blank_@@id@@_qty" name="box_blank[@@id@@][qty]" class="input-text" /></td>
|
131 |
<td><input type="text" id="box_blank_@@id@@_value" name="box_blank[@@id@@][value]" class="input-text" /></td>
|
132 |
<td>
|
27 |
<col style="width: 150px;" />
|
28 |
<col style="width: 70px;" />
|
29 |
<col style="width: 50px;" />
|
30 |
+
<col style="width: 50px;" />
|
31 |
<col style="width: 70px;" />
|
32 |
<col style="width: 120px;" />
|
33 |
<col style="width: 90px;" />
|
46 |
<th><?php echo $this->__('Comment'); ?></th>
|
47 |
<th class="a-center"><?php echo $this->__('Packaging'); ?></th>
|
48 |
<th class="a-center"><?php echo $this->__('Fragile'); ?></th>
|
49 |
+
<th class="a-center"><?php echo $this->__('Dangerous'); ?></th>
|
50 |
<th class="a-center"><?php echo $this->__('Qty'); ?></th>
|
51 |
<th class="a-center"><?php echo $this->__('Value'); ?> ($)</th>
|
52 |
<th class="a-center"><?php echo $this->__('Weight'); ?></th>
|
79 |
<?php endforeach; ?>
|
80 |
</select>
|
81 |
</td>
|
82 |
+
<td class="a-center">
|
83 |
+
<select id="box_<?php echo $_i; ?>_dangerous" name="box[<?php echo $_i; ?>][dangerous]" class="select">
|
84 |
+
<?php foreach (Mage::getModel('adminhtml/system_config_source_yesno')->toOptionArray() as $_option): ?>
|
85 |
+
<option value="<?php echo $_option['value']; ?>"<?php if ($_option['value'] == $_box->getDangerous()): ?> selected="selected"<?php endif; ?>><?php echo $_option['label']; ?></option>
|
86 |
+
<?php endforeach; ?>
|
87 |
+
</select>
|
88 |
+
</td>
|
89 |
<td><input type="text" id="box_<?php echo $_i; ?>_qty" name="box[<?php echo $_i; ?>][qty]" value="<?php echo (int)$_box->getQty(); ?>" class="input-text" /></td>
|
90 |
<td><input type="text" id="box_<?php echo $_i; ?>_value" name="box[<?php echo $_i; ?>][value]" value="<?php echo sprintf("%01.2f", $_box->getValue()); ?>" class="input-text" /></td>
|
91 |
<td>
|
136 |
<?php endforeach; ?>
|
137 |
</select>
|
138 |
</td>
|
139 |
+
<td class="a-center">
|
140 |
+
<select id="box_blank_@@id@@_dangerous" name="box_blank[@@id@@][dangerous]" class="select">
|
141 |
+
<?php foreach (Mage::getModel('adminhtml/system_config_source_yesno')->toOptionArray() as $_option): ?>
|
142 |
+
<option value="<?php echo $_option['value']; ?>"><?php echo $_option['label']; ?></option>
|
143 |
+
<?php endforeach; ?>
|
144 |
+
</select>
|
145 |
+
</td>
|
146 |
<td><input type="text" id="box_blank_@@id@@_qty" name="box_blank[@@id@@][qty]" class="input-text" /></td>
|
147 |
<td><input type="text" id="box_blank_@@id@@_value" name="box_blank[@@id@@][value]" class="input-text" /></td>
|
148 |
<td>
|
app/design/frontend/base/default/layout/temando.xml
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<layout>
|
3 |
-
|
4 |
<default>
|
5 |
<reference name="head">
|
6 |
<action method="addJs"><script>temando/autocomplete.js</script></action>
|
@@ -8,19 +8,19 @@
|
|
8 |
<action method="addCss"><stylesheet>css/temando/autocomplete.css</stylesheet></action>
|
9 |
</reference>
|
10 |
</default>
|
11 |
-
|
12 |
<default>
|
13 |
<reference name="before_body_end">
|
14 |
<block type='core/template' name="pcs" template='temando/temando/pcs.phtml' />
|
15 |
</reference>
|
16 |
</default>
|
17 |
-
|
18 |
<etemando_pcs_product>
|
19 |
<reference name="root">
|
20 |
<block type="temando/product_shipping_methods" name="root" template="temando/temando/product/shipping/methods.phtml"/>
|
21 |
</reference>
|
22 |
</etemando_pcs_product>
|
23 |
-
|
24 |
<etemando_wizard_index>
|
25 |
<label>Temando Wizard</label>
|
26 |
<reference name="root">
|
@@ -31,7 +31,7 @@
|
|
31 |
<block type="temando/wizard_html" template="temando/temando/wizard/account.phtml" name="content" as="content"/>
|
32 |
</reference>
|
33 |
</etemando_wizard_index>
|
34 |
-
|
35 |
<checkout_onepage_index>
|
36 |
<reference name="head">
|
37 |
<action method="addItem">
|
@@ -46,18 +46,24 @@
|
|
46 |
<block name="checkout.onepage.shipping_method.available" type="temando/onepage_shipping_method_available" template="temando/temando/shipping_method/available.phtml">
|
47 |
<block name="checkout.onepage.shipping_method.available.single" as="options_single" type="temando/onepage_shipping_method_available_single" template="temando/temando/shipping_method/available/options_single.phtml" />
|
48 |
</block>
|
49 |
-
</reference>
|
50 |
</checkout_onepage_index>
|
51 |
-
|
52 |
<checkout_onepage_shippingmethod>
|
53 |
<reference name="root">
|
54 |
<block name="root" type="temando/onepage_shipping_method_available" template="temando/temando/shipping_method/available.phtml" >
|
55 |
<block name="checkout.onepage.shipping_method.available.single" as="options_single" type="temando/onepage_shipping_method_available_single" template="temando/temando/shipping_method/available/options_single.phtml" />
|
56 |
</block>
|
|
|
57 |
</reference>
|
58 |
</checkout_onepage_shippingmethod>
|
59 |
-
|
60 |
<checkout_cart_index>
|
|
|
|
|
|
|
|
|
|
|
61 |
<reference name="checkout.cart.shipping">
|
62 |
<action method="setTemplate" ifconfig='carriers/temando/active'>
|
63 |
<template>temando/temando/checkout/cart/shipping.phtml</template>
|
@@ -80,23 +86,23 @@
|
|
80 |
<block type="temando/product_shipping" name="temando.product.shipping" before="-" template="temando/temando/product/shipping.phtml"/>
|
81 |
</reference>
|
82 |
</catalog_product_view>
|
83 |
-
|
84 |
<customer_address_form>
|
85 |
<reference name="my.account.wrapper">
|
86 |
<block type="customer/address_edit" name="customer_address_edit" template="temando/temando/customer/address/edit.phtml"/>
|
87 |
</reference>
|
88 |
</customer_address_form>
|
89 |
-
|
90 |
<checkout_multishipping_customer_address translate="label">
|
91 |
<reference name="customer_address_edit">
|
92 |
<block type="customer/address_edit" name="customer_address_edit" template="temando/temando/customer/address/edit.phtml"/>
|
93 |
</reference>
|
94 |
</checkout_multishipping_customer_address>
|
95 |
-
|
96 |
<paypal_express_review>
|
97 |
<reference name="before_body_end">
|
98 |
<remove name="pcs" />
|
99 |
</reference>
|
100 |
</paypal_express_review>
|
101 |
-
|
102 |
</layout>
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<layout>
|
3 |
+
|
4 |
<default>
|
5 |
<reference name="head">
|
6 |
<action method="addJs"><script>temando/autocomplete.js</script></action>
|
8 |
<action method="addCss"><stylesheet>css/temando/autocomplete.css</stylesheet></action>
|
9 |
</reference>
|
10 |
</default>
|
11 |
+
|
12 |
<default>
|
13 |
<reference name="before_body_end">
|
14 |
<block type='core/template' name="pcs" template='temando/temando/pcs.phtml' />
|
15 |
</reference>
|
16 |
</default>
|
17 |
+
|
18 |
<etemando_pcs_product>
|
19 |
<reference name="root">
|
20 |
<block type="temando/product_shipping_methods" name="root" template="temando/temando/product/shipping/methods.phtml"/>
|
21 |
</reference>
|
22 |
</etemando_pcs_product>
|
23 |
+
|
24 |
<etemando_wizard_index>
|
25 |
<label>Temando Wizard</label>
|
26 |
<reference name="root">
|
31 |
<block type="temando/wizard_html" template="temando/temando/wizard/account.phtml" name="content" as="content"/>
|
32 |
</reference>
|
33 |
</etemando_wizard_index>
|
34 |
+
|
35 |
<checkout_onepage_index>
|
36 |
<reference name="head">
|
37 |
<action method="addItem">
|
46 |
<block name="checkout.onepage.shipping_method.available" type="temando/onepage_shipping_method_available" template="temando/temando/shipping_method/available.phtml">
|
47 |
<block name="checkout.onepage.shipping_method.available.single" as="options_single" type="temando/onepage_shipping_method_available_single" template="temando/temando/shipping_method/available/options_single.phtml" />
|
48 |
</block>
|
49 |
+
</reference>
|
50 |
</checkout_onepage_index>
|
51 |
+
|
52 |
<checkout_onepage_shippingmethod>
|
53 |
<reference name="root">
|
54 |
<block name="root" type="temando/onepage_shipping_method_available" template="temando/temando/shipping_method/available.phtml" >
|
55 |
<block name="checkout.onepage.shipping_method.available.single" as="options_single" type="temando/onepage_shipping_method_available_single" template="temando/temando/shipping_method/available/options_single.phtml" />
|
56 |
</block>
|
57 |
+
<block name="delivery_options" type="temando/onepage_shipping_delivery_options" template="temando/temando/checkout/onepage/delivery/options.phtml" />
|
58 |
</reference>
|
59 |
</checkout_onepage_shippingmethod>
|
60 |
+
|
61 |
<checkout_cart_index>
|
62 |
+
<reference name="head">
|
63 |
+
<action method="addCss" ifconfig='carriers/temando/active'>
|
64 |
+
<stylesheet>css/temando/cart.css</stylesheet>
|
65 |
+
</action>
|
66 |
+
</reference>
|
67 |
<reference name="checkout.cart.shipping">
|
68 |
<action method="setTemplate" ifconfig='carriers/temando/active'>
|
69 |
<template>temando/temando/checkout/cart/shipping.phtml</template>
|
86 |
<block type="temando/product_shipping" name="temando.product.shipping" before="-" template="temando/temando/product/shipping.phtml"/>
|
87 |
</reference>
|
88 |
</catalog_product_view>
|
89 |
+
|
90 |
<customer_address_form>
|
91 |
<reference name="my.account.wrapper">
|
92 |
<block type="customer/address_edit" name="customer_address_edit" template="temando/temando/customer/address/edit.phtml"/>
|
93 |
</reference>
|
94 |
</customer_address_form>
|
95 |
+
|
96 |
<checkout_multishipping_customer_address translate="label">
|
97 |
<reference name="customer_address_edit">
|
98 |
<block type="customer/address_edit" name="customer_address_edit" template="temando/temando/customer/address/edit.phtml"/>
|
99 |
</reference>
|
100 |
</checkout_multishipping_customer_address>
|
101 |
+
|
102 |
<paypal_express_review>
|
103 |
<reference name="before_body_end">
|
104 |
<remove name="pcs" />
|
105 |
</reference>
|
106 |
</paypal_express_review>
|
107 |
+
|
108 |
</layout>
|
app/design/frontend/base/default/template/temando/temando/checkout/cart/shipping.phtml
CHANGED
@@ -28,6 +28,8 @@
|
|
28 |
/**
|
29 |
* @see Mage_Checkout_Block_Cart_Shipping
|
30 |
*/
|
|
|
|
|
31 |
?>
|
32 |
<div class="shipping">
|
33 |
<h2><?php echo $this->__('Estimate Shipping and Tax') ?></h2>
|
@@ -52,9 +54,25 @@
|
|
52 |
<div class="input-box">
|
53 |
<input class="input-text validate-postcode<?php if ($this->isZipCodeRequired()):?> required-entry<?php endif;?>" type="text" id="postcode" name="estimate_postcode" value="<?php echo $this->htmlEscape($this->getEstimatePostcode()) ?>" />
|
54 |
</div>
|
55 |
-
</li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
</ul>
|
57 |
-
|
58 |
<div class="buttons-set">
|
59 |
<button type="button" title="<?php echo $this->__('Get a Quote') ?>" onclick="coShippingMethodForm.submit()" class="button"><span><span><?php echo $this->__('Get a Quote') ?></span></span></button>
|
60 |
</div>
|
@@ -97,7 +115,7 @@
|
|
97 |
//<![CDATA[
|
98 |
var coShippingMethodForm = new VarienForm('shipping-zip-form');
|
99 |
var countriesWithOptionalZip = <?php echo $this->helper('directory')->getCountriesWithOptionalZip(true) ?>;
|
100 |
-
|
101 |
coShippingMethodForm.submit = function () {
|
102 |
var country = $F('country');
|
103 |
var optionalZip = false;
|
@@ -120,7 +138,7 @@
|
|
120 |
</div>
|
121 |
</div>
|
122 |
<script type="text/javascript">
|
123 |
-
//<[CDATA[
|
124 |
var shipping_estimator_url = '<?php echo $this->getUrl('etemando/pcs/autocompletecart', array('_secure' => Mage::app()->getStore()->isCurrentlySecure())); ?>';
|
125 |
var avs = new Avs(
|
126 |
shipping_estimator_url,
|
28 |
/**
|
29 |
* @see Mage_Checkout_Block_Cart_Shipping
|
30 |
*/
|
31 |
+
$residence = Temando_Temando_Model_Checkout_Delivery_Options::DESTINATION_RESIDENCE;
|
32 |
+
$business = Temando_Temando_Model_Checkout_Delivery_Options::DESTINATION_BUSINESS;
|
33 |
?>
|
34 |
<div class="shipping">
|
35 |
<h2><?php echo $this->__('Estimate Shipping and Tax') ?></h2>
|
54 |
<div class="input-box">
|
55 |
<input class="input-text validate-postcode<?php if ($this->isZipCodeRequired()):?> required-entry<?php endif;?>" type="text" id="postcode" name="estimate_postcode" value="<?php echo $this->htmlEscape($this->getEstimatePostcode()) ?>" />
|
56 |
</div>
|
57 |
+
</li>
|
58 |
+
<?php if ($this->showLocationType()): ?>
|
59 |
+
<li>
|
60 |
+
<label for="destination-type" class="required"><?php echo $this->__('Deliver To') ?></label>
|
61 |
+
<div id="destination-type" class="input-box destination-type">
|
62 |
+
<ul>
|
63 |
+
<li>
|
64 |
+
<input type="radio" class="radio destination-type-radio" id="residence" name="destination-type" value="<?php echo $residence; ?>" <?php if ($this->getDestinationType() == $residence) echo "checked='checked'" ?> />
|
65 |
+
<label for="destination-type-residence"><?php echo ucwords($residence); ?></label>
|
66 |
+
</li>
|
67 |
+
<li>
|
68 |
+
<input type="radio" class="radio destination-type-radio" id="business" name="destination-type" value="<?php echo $business; ?>" <?php if ($this->getDestinationType() == $business) echo "checked='checked'" ?> />
|
69 |
+
<label for="destination-type-business"><?php echo ucwords($business); ?></label>
|
70 |
+
</li>
|
71 |
+
</ul>
|
72 |
+
</div>
|
73 |
+
</li>
|
74 |
+
<?php endif; ?>
|
75 |
</ul>
|
|
|
76 |
<div class="buttons-set">
|
77 |
<button type="button" title="<?php echo $this->__('Get a Quote') ?>" onclick="coShippingMethodForm.submit()" class="button"><span><span><?php echo $this->__('Get a Quote') ?></span></span></button>
|
78 |
</div>
|
115 |
//<![CDATA[
|
116 |
var coShippingMethodForm = new VarienForm('shipping-zip-form');
|
117 |
var countriesWithOptionalZip = <?php echo $this->helper('directory')->getCountriesWithOptionalZip(true) ?>;
|
118 |
+
|
119 |
coShippingMethodForm.submit = function () {
|
120 |
var country = $F('country');
|
121 |
var optionalZip = false;
|
138 |
</div>
|
139 |
</div>
|
140 |
<script type="text/javascript">
|
141 |
+
//<[CDATA[
|
142 |
var shipping_estimator_url = '<?php echo $this->getUrl('etemando/pcs/autocompletecart', array('_secure' => Mage::app()->getStore()->isCurrentlySecure())); ?>';
|
143 |
var avs = new Avs(
|
144 |
shipping_estimator_url,
|
app/design/frontend/base/default/template/temando/temando/checkout/onepage/delivery/options.phtml
ADDED
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* @var $this Temando_Temando_Block_Onepage_Shipping_Delivery_Options */
|
3 |
+
$options = $this->getEnabledOptions();
|
4 |
+
$selected_options = $this->getSelectedOptions();
|
5 |
+
$residence = Temando_Temando_Model_Checkout_Delivery_Options::DESTINATION_RESIDENCE;
|
6 |
+
$business = Temando_Temando_Model_Checkout_Delivery_Options::DESTINATION_BUSINESS;
|
7 |
+
?>
|
8 |
+
<?php if ($this->showOptions()): ?>
|
9 |
+
<div id="destination-type" class="input-box destination-type"<?php if (!$this->showLocationType()): ?> style="display:none;"<?php endif; ?>>
|
10 |
+
<span class="destination-type-header">Deliver To</span>
|
11 |
+
<input type="radio" class="radio" id="residence" name="destination-type" value="<?php echo $residence; ?>" <?php if($this->getDestinationType() == $residence) echo "checked='checked'" ?> />
|
12 |
+
<label for="destination-type-residence"><?php echo ucwords($residence); ?></label>
|
13 |
+
<input type="radio" class="radio" id="business" name="destination-type" value="<?php echo $business; ?>" <?php if($this->getDestinationType() == $business) echo "checked='checked'" ?> />
|
14 |
+
<label for="destination-type-business"><?php echo ucwords($business); ?></label>
|
15 |
+
</div>
|
16 |
+
<?php if (!empty($options)): ?>
|
17 |
+
<div id="delivery-options">
|
18 |
+
<table class="delivery-options-table" id="delivery-options-table">
|
19 |
+
<thead>
|
20 |
+
<tr><th colspan="2"><?php echo Mage::helper('temando')->__('Extra Delivery Options'); ?></th></tr>
|
21 |
+
</thead>
|
22 |
+
<tbody>
|
23 |
+
<?php foreach($options as $type => $toptions): ?>
|
24 |
+
<?php foreach($toptions as $key => $description): ?>
|
25 |
+
<tr>
|
26 |
+
<td><input type="checkbox" id="delivery_option_<?php echo $key ?>" name="delivery_options[<?php echo $key ?>]" class="checkbox delivery-option <?php echo $type ?>" <?php if(array_key_exists($key, $selected_options)) echo "checked='checked'" ?> /></td>
|
27 |
+
<td><?php echo $this->__($description) ?></td>
|
28 |
+
</tr>
|
29 |
+
<?php endforeach; ?>
|
30 |
+
<?php endforeach; ?>
|
31 |
+
</tbody>
|
32 |
+
</table>
|
33 |
+
</div>
|
34 |
+
<?php endif; ?>
|
35 |
+
<script type="text/javascript">
|
36 |
+
//<![CDATA[
|
37 |
+
$$('input[id^=delivery_option_]').invoke('on', 'change', function() {
|
38 |
+
refreshQuotes(true);
|
39 |
+
});
|
40 |
+
$$('input[id^=delivery_option_]').each(function(control) {
|
41 |
+
control.disabled = false;
|
42 |
+
});
|
43 |
+
$$('input[name=destination-type]').each(function (control) {
|
44 |
+
Event.observe(control, 'click', function () {
|
45 |
+
delivery_type_update(control.id);
|
46 |
+
refreshQuotes(true);
|
47 |
+
});
|
48 |
+
});
|
49 |
+
delivery_type_update('<?php echo $this->getDestinationType(); ?>');
|
50 |
+
//]]>
|
51 |
+
</script>
|
52 |
+
<?php endif; ?>
|
app/design/frontend/base/default/template/temando/temando/shipping_method/available.phtml
CHANGED
@@ -1,2 +1,3 @@
|
|
1 |
<?php /*@var $this Temando_Temando_Block_Onepage_Shipping_Method_Available */ ?>
|
2 |
<?php echo $this->getChildHtml('options_single'); ?>
|
|
1 |
<?php /*@var $this Temando_Temando_Block_Onepage_Shipping_Method_Available */ ?>
|
2 |
<?php echo $this->getChildHtml('options_single'); ?>
|
3 |
+
<?php echo $this->getBlockHtml('delivery_options'); ?>
|
app/locale/en_US/Temando_Temando.csv
CHANGED
@@ -1,622 +1,661 @@
|
|
1 |
-
"Temando","Temando"
|
2 |
-
"General","General"
|
3 |
-
"HS Code Information","HS Code Information"
|
4 |
-
"SKU","SKU"
|
5 |
-
"Origin Country","Origin Country"
|
6 |
-
"Destination Country","Destination Country"
|
7 |
-
"HS Code","HS Code"
|
8 |
-
"HS Code Configuration","HS Code Configuration"
|
9 |
-
"CSV Import","CSV Import"
|
10 |
-
"HS Code Import","HS Code Import"
|
11 |
-
"Select CSV File","Select CSV File"
|
12 |
-
"Save and Continue Edit","Save and Continue Edit"
|
13 |
-
"Edit HS Code '%s'","Edit HS Code '%s'"
|
14 |
-
"New HS Code","New HS Code"
|
15 |
-
"Sku","Sku"
|
16 |
-
"CSV","CSV"
|
17 |
-
"Delete Selected HS Codes","Delete Selected HS Codes"
|
18 |
-
"Import CSV File","Import CSV File"
|
19 |
-
"Create New Manifest - Please note, to manifest you must have a permanent pickup.
|
20 |
-
"Location","Location"
|
21 |
-
"Carrier","Carrier"
|
22 |
-
"Date","Date"
|
23 |
-
"Created At","Created At"
|
24 |
-
"Type","Type"
|
25 |
-
"Manifest Document","Daily Manifest Document"
|
26 |
-
"Download","Download"
|
27 |
-
"Label Document","Label Document"
|
28 |
-
"Confirm","Confirm"
|
29 |
-
"Are you sure?","Are you sure?"
|
30 |
-
"Package Information","Package Information"
|
31 |
-
"Name","Name"
|
32 |
-
"Packaging Type","Packaging Type"
|
33 |
-
"Length","Length"
|
34 |
-
"Width","Width"
|
35 |
-
"Height","Height"
|
36 |
-
"Measure Unit","Measure Unit"
|
37 |
-
"Weight Unit","Weight Unit"
|
38 |
-
"Package Configuration","Package Configuration"
|
39 |
-
"Edit Package '%s'","Edit Package '%s'"
|
40 |
-
"New Package","New Package"
|
41 |
-
"Actions","Actions"
|
42 |
-
"Actions Configuration","Actions Configuration"
|
43 |
-
"Shipping Rate Type","Shipping Rate Type"
|
44 |
-
"Static Rate Configuration","Static Rate Configuration"
|
45 |
-
"Static Rate Value","Static Rate Value"
|
46 |
-
"Applies to free shipping and flat rate.","Applies to free shipping and flat rate."
|
47 |
-
"Static Rate Label","Static Rate Label"
|
48 |
-
"As displayed to a customer. Applies to free shipping & flat rate.","As displayed to a customer. Applies to free shipping & flat rate."
|
49 |
-
"Dynamic Rate Configuration","Dynamic Rate Configuration"
|
50 |
-
"Carriers","Carriers"
|
51 |
-
"Display Filter","Display Filter"
|
52 |
-
"
|
53 |
-
"Rate Adjustment Type","Rate Adjustment Type"
|
54 |
-
"Rate Adjustment Value","Rate Adjustment Value"
|
55 |
-
"For min/max, enter range as min:max (ie \'5.95:10.95\' to keep shipping price between $5.95 - $10.95)","For min/max, enter range as min:max (ie \'5.95:10.95\' to keep shipping price between $5.95 - $10.95)"
|
56 |
-
"Show Carrier Name","Show Carrier Name"
|
57 |
-
"Yes","Yes"
|
58 |
-
"No","No"
|
59 |
-
"Show Transit Type","Show Transit Type"
|
60 |
-
"Show Transit Time","Show Transit Time"
|
61 |
-
"Alternative Method Title","Alternative Method Title"
|
62 |
-
"Appears in place of carrier name when \'Show Carrier Name\' is off","Appears in place of carrier name when \'Show Carrier Name\' is off"
|
63 |
-
"Restrict Shipping Configuration","Restrict Shipping Configuration"
|
64 |
-
"Note","Note"
|
65 |
-
"Displayed to a customer when shipping is restricted.","Displayed to a customer when shipping is restricted."
|
66 |
-
"Conditions","Conditions"
|
67 |
-
"Cart attribute conditions (leave blank for any).","Cart attribute conditions (leave blank for any)."
|
68 |
-
"Time/Day conditions (leave blank for any).","Time/Day conditions (leave blank for any)."
|
69 |
-
"Order Placed Day","Order Placed Day"
|
70 |
-
"Order Placed (time)","Order Placed (time)"
|
71 |
-
"Time","Time"
|
72 |
-
"24HH:MM:SS","24HH:MM:SS"
|
73 |
-
"Rule Information","Rule Information"
|
74 |
-
"General Information","General Information"
|
75 |
-
"Rule Name","Rule Name"
|
76 |
-
"Status","Status"
|
77 |
-
"Enabled","Enabled"
|
78 |
-
"Disabled","Disabled"
|
79 |
-
"Shipment Urgency","Shipment Urgency"
|
80 |
-
"From Date","From Date"
|
81 |
-
"To Date","To Date"
|
82 |
-
"Priority","Priority"
|
83 |
-
"Stop further rules processing.","Stop further rules processing."
|
84 |
-
"Rules with higher number in priority field will not be processed if set to \'Yes\'","Rules with higher number in priority field will not be processed if set to \'Yes\'"
|
85 |
-
"Stores","Stores"
|
86 |
-
"NOT LOGGED IN","NOT LOGGED IN"
|
87 |
-
"Customer Groups","Customer Groups"
|
88 |
-
"Shipping Rule Configuration","Shipping Rule Configuration"
|
89 |
-
"Edit Rule '%s'","Edit Rule '%s'"
|
90 |
-
"New Shipping Rule","New Shipping Rule"
|
91 |
-
"Date Start","Date Start"
|
92 |
-
"Date Expire","Date Expire"
|
93 |
-
"Type","Type"
|
94 |
-
"Stop Other Rules","Stop Other Rules"
|
95 |
-
"Enable Rules","Enable Rules"
|
96 |
-
"Disable Rules","Disable Rules"
|
97 |
-
"Delete Rules","Delete Rules"
|
98 |
-
"Are you sure you want to delete selected shipping rules?","Are you sure you want to delete selected shipping rules?"
|
99 |
-
"View Consignment","View Label"
|
100 |
-
"View Commercial Invoice","View Commercial Invoice"
|
101 |
-
"Ship with Temando","Ship with Temando"
|
102 |
-
"Cheapest","Cheapest"
|
103 |
-
"Fastest","Fastest"
|
104 |
-
"Customer Selected","Customer Selected"
|
105 |
-
"Selected for Booking","Selected for shipping"
|
106 |
-
"Information","Information"
|
107 |
-
"Shipment #","Shipment #"
|
108 |
-
"Ship to Name","Ship to Name"
|
109 |
-
"Date Shipped","Date Shipped"
|
110 |
-
"Total Qty","Total Qty"
|
111 |
-
"Action","Action"
|
112 |
-
"Shipments","Shipments"
|
113 |
-
"Shipment View","Shipment View"
|
114 |
-
"None selected","None selected"
|
115 |
-
"Pick Slip","Pick Slip"
|
116 |
-
"Save and Get Quotes","Save and Get Quotes"
|
117 |
-
"No Consignment","No label"
|
118 |
-
"Order # %s | %s","Order # %s | %s"
|
119 |
-
"Urgency","Urgency"
|
120 |
-
"Order #","Order #"
|
121 |
-
"Purchased On","Purchased On"
|
122 |
-
"Anticipated Cost","Quoted cost"
|
123 |
-
"Shipping Paid","Actual cost"
|
124 |
-
"Customer Selected Quote","Customer Selected Quote"
|
125 |
-
"Admin Selected Quote","Admin Selected Quote"
|
126 |
-
"Origin","Origin"
|
127 |
-
"View","View"
|
128 |
-
"Book Shipments","Process Shipments"
|
129 |
-
"Book selected shipments?","Book selected shipments?"
|
130 |
-
"Remove Shipments","Remove Shipments"
|
131 |
-
"Remove selected shipments?","Remove selected shipments?"
|
132 |
-
"Retrieve Consignment Label","Retrieve Shipping Label"
|
133 |
-
"Retrieve Pick Slip","Retrieve Pick Slip"
|
134 |
-
"Taxes & Duties Information","Taxes & Duties Information"
|
135 |
-
"Taxes & Duties Configuration","Taxes & Duties Configuration"
|
136 |
-
"Edit '%s' to '%s' Tax Type","Edit '%s' to '%s' Tax Type"
|
137 |
-
"New Record","New Record"
|
138 |
-
"Tax/Duty Type","Tax/Duty Type"
|
139 |
-
"Delete Selected Records","Delete Selected Records"
|
140 |
-
"Temando Profile","Temando Profile"
|
141 |
-
"Mode","Mode"
|
142 |
-
"*Use System Configuration","*Use System Configuration"
|
143 |
-
"As Defined","As Defined"
|
144 |
-
"Sandbox","Sandbox"
|
145 |
-
"Client ID","Client ID"
|
146 |
-
"Username","Username"
|
147 |
-
"Password","Password"
|
148 |
-
"Payment Type","Payment Type"
|
149 |
-
"Extra Information","Extra Information"
|
150 |
-
"Extra Location Information","Extra Location Information"
|
151 |
-
"Loading Facilities","Loading Facilities"
|
152 |
-
"Does the warehouse have loading facilities?","Does the warehouse have loading facilities?"
|
153 |
-
"Does the warehouse have a dock?","Does the warehouse have a dock?"
|
154 |
-
"Forklift","Forklift"
|
155 |
-
"Does the warehouse have a forklift?","Does the warehouse have a forklift?"
|
156 |
-
"If set to ""Yes"", the sandbox (testing) service will be used (usually set to ""No"" on a live site)","If set to ""Yes"", the sandbox (testing) service will be used (usually set to ""No"" on a live site)"
|
157 |
-
"Limited Access","Limited Access"
|
158 |
-
"Does the warehouse have limited access?","Does the warehouse have limited access?"
|
159 |
-
"Postal Box","P.O. Box"
|
160 |
-
"Is the address of this warehouse a postal box?","Is the address of this warehouse a postal box?"
|
161 |
-
"Label Type","Label Type"
|
162 |
-
"Consignment document type associated with this warehouse.","Label document type associated with this warehouse."
|
163 |
-
"Company Name","Company Name"
|
164 |
-
"Location Type","Location Type"
|
165 |
-
"Address & Contact","Address & Contact"
|
166 |
-
"Address Details","Address Details"
|
167 |
-
"Street","Street"
|
168 |
-
"City","City"
|
169 |
-
"ZIP/Postal Code","Zip Code"
|
170 |
-
"Country","Country"
|
171 |
-
"Region","State"
|
172 |
-
"Contact Details","Contact Details"
|
173 |
-
"Contact Name","Contact Name"
|
174 |
-
"Contact Email","Contact Email"
|
175 |
-
"Phone 1","Phone 1"
|
176 |
-
"Phone 2","Phone 2"
|
177 |
-
"Fax","Fax"
|
178 |
-
"User ID","User ID"
|
179 |
-
"First Name","First Name"
|
180 |
-
"Last Name","Last Name"
|
181 |
-
"Email","Email"
|
182 |
-
"Role","Role"
|
183 |
-
"Position","Position"
|
184 |
-
"Zones","Zones"
|
185 |
-
"Use CTRL + click to assign multiple zones.","Use CTRL + click to assign multiple zones."
|
186 |
-
"Users Permissions","Users Permissions"
|
187 |
-
"Edit Warehouse '%s'","Edit Warehouse '%s'"
|
188 |
-
"New Warehouse","New Warehouse"
|
189 |
-
"ZIP/Postcode","Zip Code"
|
190 |
-
"Postcode","Zip Code"
|
191 |
-
"Enable Warehouses","Enable Warehouses"
|
192 |
-
"Disable Warehouses","Disable Warehouses"
|
193 |
-
"Delete Warehouses","Delete Warehouses"
|
194 |
-
"Are you sure you want to delete selected warehouses?","Are you sure you want to delete selected warehouses?"
|
195 |
-
"Zone Information","Zone Information"
|
196 |
-
"Postal Code Ranges","Zip Code Ranges"
|
197 |
-
"Use colon to specify range, comma to separate ranges.","Use colon to specify range, comma to separate ranges."
|
198 |
-
"Zone Configuration","Zone Configuration"
|
199 |
-
"Edit Zone '%s'","Edit Zone '%s'"
|
200 |
-
"New Zone","New Zone"
|
201 |
-
"Range","Range"
|
202 |
-
"Manage HS Codes","Manage HS Codes"
|
203 |
-
"Add New HS Code","Add New HS Code"
|
204 |
-
"Manage Manifests","Daily Manifests"
|
205 |
-
"
|
206 |
-
"Confirm Manifests","Confirm Daily Manifests"
|
207 |
-
"Manage Custom Packages","Manage Custom Packages"
|
208 |
-
"Add New Package","Add New Package"
|
209 |
-
"Manage Shipping Rules","Manage Shipping Rules"
|
210 |
-
"Add New Shipping Rule","Add New Shipping Rule"
|
211 |
-
"Manage Shipments","Manage Shipments"
|
212 |
-
"Manage Taxes & Duties","Manage Taxes & Duties"
|
213 |
-
"Add New Record","Add New Record"
|
214 |
-
"Manage Warehouses","Manage Warehouses"
|
215 |
-
"Add New Warehouse","Add New Warehouse"
|
216 |
-
"Manage Zones","Manage Zones"
|
217 |
-
"Add New Zone","Add New Zone"
|
218 |
-
"Suburb","City"
|
219 |
-
"Live","Live"
|
220 |
-
"Credit","Credit"
|
221 |
-
"Account","Account"
|
222 |
-
"All Allowed Countries","All Allowed Countries"
|
223 |
-
"Specific Countries","Specific Countries"
|
224 |
-
"Payment","Payment"
|
225 |
-
"Allow Specific Countries","Allow Specific Countries"
|
226 |
-
"Specific Country","Specific Country"
|
227 |
-
"Allowed Carriers","Allowed Carriers"
|
228 |
-
"Packaging","Packaging"
|
229 |
-
"Fragile","Fragile"
|
230 |
-
"Rule Type","Rule Type"
|
231 |
-
"Dynamic Rule Carriers","Dynamic Rule Carriers"
|
232 |
-
"-- Please select --","-- Please select --"
|
233 |
-
"Invalid HS Code File Format","Invalid HS Code File Format"
|
234 |
-
"An error occurred while importing hs codes.","An error occurred while importing hs codes."
|
235 |
-
"Import finished with errors:<br/> %s","Import finished with errors:<br/> %s"
|
236 |
-
"Invalid HS Code format in the Row #%s","Invalid HS Code format in the Row #%s"
|
237 |
-
"Invalid SKU "%s" in the Row #%s.","Invalid SKU "%s" in the Row #%s."
|
238 |
-
"Invalid Origin Country "%s" in the Row #%s.","Invalid Origin Country "%s" in the Row #%s."
|
239 |
-
"Invalid Destination Country "%s" in the Row #%s.","Invalid Destination Country "%s" in the Row #%s."
|
240 |
-
"Missing or invalid HS Code in the Row #%s.","Missing or invalid HS Code in the Row #%s."
|
241 |
-
"Duplicate Row #%s (SKU "%s", Origin Country "%s", Destination Country "%s" and HS Code "%s").","Duplicate Row #%s (SKU "%s", Origin Country "%s", Destination Country "%s" and HS Code "%s")."
|
242 |
-
"Products","Products"
|
243 |
-
"Qty","Qty"
|
244 |
-
"SKU: ","SKU: "
|
245 |
-
"Weight","Weight"
|
246 |
-
"TEMANDO PICK SLIP","TEMANDO PICK SLIP"
|
247 |
-
"Order # ","Order # "
|
248 |
-
"Order Date: ","Order Date: "
|
249 |
-
"Sold to:","Sold to:"
|
250 |
-
"Ship to:","Ship to:"
|
251 |
-
"Payment Method:","Payment Method:"
|
252 |
-
"Payment Method","Payment Method"
|
253 |
-
"Shipping Method:","Shipping Method:"
|
254 |
-
"Total Shipping Charges","Total Shipping Charges"
|
255 |
-
"Shipping Instructions: ","Shipping Instructions: "
|
256 |
-
"Title","Title"
|
257 |
-
"Number","Number"
|
258 |
-
"Custom Value","Declared value for customs"
|
259 |
-
"Conditions Combination","Conditions Combination"
|
260 |
-
"Cart Item Attribute","Cart Item Attribute"
|
261 |
-
"Product Attribute","Product Attribute"
|
262 |
-
"FOUND","FOUND"
|
263 |
-
"NOT FOUND","NOT FOUND"
|
264 |
-
"If an item is %s in the cart with %s of these conditions true:","If an item is %s in the cart with %s of these conditions true:"
|
265 |
-
"total quantity","total quantity"
|
266 |
-
"total amount","total amount"
|
267 |
-
"is","is"
|
268 |
-
"is not","is not"
|
269 |
-
"equals or greater than","equals or greater than"
|
270 |
-
"equals or less than","equals or less than"
|
271 |
-
"greater than","greater than"
|
272 |
-
"less than","less than"
|
273 |
-
"is one of","is one of"
|
274 |
-
"is not one of","is not one of"
|
275 |
-
"If %s %s %s for a subselection of items in cart matching %s of these conditions:","If %s %s %s for a subselection of items in cart matching %s of these conditions:"
|
276 |
-
"Subtotal","Subtotal"
|
277 |
-
"Subtotal with Discount","Subtotal with Discount"
|
278 |
-
"Total Items Quantity","Total Items Quantity"
|
279 |
-
"Total Weight","Total Weight"
|
280 |
-
"Shipping Postcode","Shipping Zip Code"
|
281 |
-
"Shipping Region","Shipping Region"
|
282 |
-
"Shipping State/Province","Shipping State/Province"
|
283 |
-
"Shipping Country","Shipping Country"
|
284 |
-
"Product attribute combination","Product attribute combination"
|
285 |
-
"Products subselection","Products subselection"
|
286 |
-
"Cart Attribute","Cart Attribute"
|
287 |
-
"Quantity in cart","Quantity in cart"
|
288 |
-
"Price in cart","Price in cart"
|
289 |
-
"Row total in cart","Row total in cart"
|
290 |
-
"--Please Select--","--Please Select--"
|
291 |
-
"Free Shipping","Free Shipping"
|
292 |
-
"Flat Rate","Flat Rate"
|
293 |
-
"An error occurred while fetching the shipment status.","An error occurred while fetching the shipment status."
|
294 |
-
"Please select a location type from the list.","Please select a location type from the list."
|
295 |
-
"Please select a country from the list.","Please select a country from the list."
|
296 |
-
"Individual","Individual"
|
297 |
-
"Company","Company"
|
298 |
-
"Business","Business"
|
299 |
-
"Residential","Residential"
|
300 |
-
"Use Magento","Use Magento"
|
301 |
-
"Use Temando","Use Temando"
|
302 |
-
" -- "," -- "
|
303 |
-
"Markup (fixed)","Markup (fixed)"
|
304 |
-
"Markup (percentage)","Markup (percentage)"
|
305 |
-
"Subsidy (fixed)","Subsidy (fixed)"
|
306 |
-
"Subsidy (percentage)","Subsidy (percentage)"
|
307 |
-
"Min/Max Range","Min/Max Range"
|
308 |
-
"Override","Override"
|
309 |
-
"Standard & Express","Standard & Express"
|
310 |
-
"Standard only","Standard only"
|
311 |
-
"Express only","Express only"
|
312 |
-
"All Quotes","All Quotes"
|
313 |
-
"Cheapest only","Cheapest only"
|
314 |
-
"Fastest only","Fastest only"
|
315 |
-
"Cheapest and Fastest only","Cheapest and Fastest only"
|
316 |
-
"before","before"
|
317 |
-
"after","after"
|
318 |
-
"Zone","Zone"
|
319 |
-
"Dynamic","Dynamic"
|
320 |
-
"Restrict","Restrict"
|
321 |
-
"Use Defaults","Use Defaults"
|
322 |
-
"Same Day","Same Day"
|
323 |
-
"Express","Express"
|
324 |
-
"Standard","Standard"
|
325 |
-
"Pending","Pending"
|
326 |
-
"Partially Booked","Partially Shipped"
|
327 |
-
"Booked","Shipped"
|
328 |
-
"Optional","Optional"
|
329 |
-
"Mandatory","Mandatory"
|
330 |
-
"Show flat rate","Show flat rate"
|
331 |
-
"Show error message","Show error message"
|
332 |
-
"Show custom message","Show custom message"
|
333 |
-
"Plain Paper","Plain Paper"
|
334 |
-
"Thermal","Thermal"
|
335 |
-
"Fixed Price / Flat Rate","Fixed Price / Flat Rate"
|
336 |
-
"Dynamic Pricing (All)","Dynamic Pricing (All)"
|
337 |
-
"Dynamic Pricing (Cheapest only)","Dynamic Pricing (Cheapest only)"
|
338 |
-
"Dynamic Pricing (Fastest only)","Dynamic Pricing (Fastest only)"
|
339 |
-
"Dynamic Pricing (Cheapest and Fastest only)","Dynamic Pricing (Cheapest and Fastest only)"
|
340 |
-
"AM","AM"
|
341 |
-
"PM","PM"
|
342 |
-
", includes insurance",", includes insurance"
|
343 |
-
" and "," and "
|
344 |
-
", includes ",", includes "
|
345 |
-
" carbon offset"," carbon offset"
|
346 |
-
" footprints"," footprints"
|
347 |
-
" day"," day"
|
348 |
-
"s","s"
|
349 |
-
"End Date must be greater than Start Date.","End Date must be greater than Start Date."
|
350 |
-
"Websites must be specified.","Websites must be specified."
|
351 |
-
"Customer Groups must be specified.","Customer Groups must be specified."
|
352 |
-
"Record does not exist","Record does not exist"
|
353 |
-
"Error saving record","Error saving record"
|
354 |
-
"Record was successfully saved.","Record was successfully saved."
|
355 |
-
"Error saving HS Code. SKU not found or combination already exists.","Error saving HS Code. SKU not found or combination already exists."
|
356 |
-
"No data found to save","No data found to save"
|
357 |
-
"The record has been deleted.","The record has been deleted."
|
358 |
-
"Unable to find the record to delete.","Unable to find the record to delete."
|
359 |
-
"Please select at least one record.","Please select at least one record."
|
360 |
-
"Record ID %d not found.","Record ID %d not found."
|
361 |
-
"Total of %d record(s) have been deleted.","Total of %d record(s) have been deleted."
|
362 |
-
"Import successful - all rows imported.","Import successful - all rows imported."
|
363 |
-
"Please select CSV file.","Please select CSV file."
|
364 |
-
"Manifest successful added for carrier: ","Daily Manifest successfully added for carrier: "
|
365 |
-
"Manage Packaging","Manage Packaging"
|
366 |
-
"Package does not exist","Package does not exist"
|
367 |
-
"Error saving package data","Error saving package data"
|
368 |
-
"Package successfully saved.","Package successfully saved."
|
369 |
-
"Package has been deleted.","Package has been deleted."
|
370 |
-
"Unable to find the package to delete.","Unable to find the package to delete."
|
371 |
-
"Manage Rules","Manage Rules"
|
372 |
-
"Rule does not exist","Rule does not exist"
|
373 |
-
"Wrong rule specified.","Wrong rule specified."
|
374 |
-
"The rule has been saved.","The rule has been saved."
|
375 |
-
"An error occurred while saving the rule data. Please review your entries and try again.","An error occurred while saving the rule data. Please review your entries and try again."
|
376 |
-
"The rule has been deleted.","The rule has been deleted."
|
377 |
-
"Unable to find the rule to delete.","Unable to find the rule to delete."
|
378 |
-
"Invalid mode specified for mass status action.","Invalid mode specified for mass status action."
|
379 |
-
"No rules selected.","No rules selected."
|
380 |
-
"Rule ID %d not found.","Rule ID %d not found."
|
381 |
-
"Total of %d rules %s.","Total of %d rules %s."
|
382 |
-
"Shipment Manager","Shipment Manager"
|
383 |
-
"You are not allowed to edit this shipment.","You are not allowed to edit this shipment."
|
384 |
-
"Quotes cannot be refreshed until at least one box is added to the shipment.","Quotes cannot be refreshed until at least one box is added to the shipment."
|
385 |
-
"Shipment does not exist.","Shipment does not exist."
|
386 |
-
"Validation errors:","Validation errors:"
|
387 |
-
"The shipment data has been saved.","The shipment data has been saved."
|
388 |
-
"Pick-up date is not a valid date.","Pick-up date is not a valid date."
|
389 |
-
"Pick-up date is in the past.","Pick-up date is in the past."
|
390 |
-
"Pick-up time is not a valid selection.","Pick-up time is not a valid selection."
|
391 |
-
"Please select valid warehouse from available origin locations.","Please select valid warehouse from available origin locations."
|
392 |
-
"Order # %s cannot be shipped.","Order # %s cannot be shipped."
|
393 |
-
"Selected quote is no longer available. Please refresh quotes by saving the shipment and try again.","Selected quote is no longer available. Please refresh quotes by saving the shipment and try again."
|
394 |
-
"Please agree to the insurance terms & conditions at System -> Configuration -> Temando Settings -> Insurance.","Please agree to the insurance terms & conditions at System -> Configuration -> Temando Settings -> Insurance."
|
395 |
-
"There are no items to be shipped. Please review \'Qty to Ship\' fields and try again.","There are no items to be shipped. Please review \'Qty to Ship\' fields and try again."
|
396 |
-
"Shipment booked.","Shipment booked."
|
397 |
-
"Quote pre-selected for booking.","Quote pre-selected for booking."
|
398 |
-
"Shipment ID or quote ID not found.","Shipment ID or quote ID not found."
|
399 |
-
"No shipments selected for removal.","No shipments selected for removal."
|
400 |
-
"Shipment ID %s not found.","Shipment ID %s not found."
|
401 |
-
"Total of %d shipments removed.","Total of %d shipments removed."
|
402 |
-
"Please select at least one shipment.","Please select at least one shipment."
|
403 |
-
"Consignment label not found for selected shipments.","Shipping label not found for selected shipments."
|
404 |
-
"Consignment label can be retrieved for booked shipments only.","Shipping label can be retrieved for booked shipments only."
|
405 |
-
"No shipments selected for booking.","No shipments selected for booking."
|
406 |
-
"Shipment ID %s no longer exists.","Shipment ID %s no longer exists."
|
407 |
-
"Order #%s: cannot be shipped.","Order #%s: cannot be shipped."
|
408 |
-
"Order #%s: no quote selected for booking or selected quote no longer exists.","Order #%s: no quote selected for booking or selected quote no longer exists."
|
409 |
-
"Order #%s: shipment already booked.","Order #%s: shipment already processed"
|
410 |
-
"Order #%s: Shipment booked.","Order #%s: Shipment processed."
|
411 |
-
"Order #%s: ","Order #%s: "
|
412 |
-
"Error retrieving pick slips. More infomration in exception log.","Error retrieving pick slips. More infomration in exception log."
|
413 |
-
"No orders selected for pick slip retrieval.","No orders selected for pick slip retrieval."
|
414 |
-
"Error saving record. Please check origin and destination country combination is unique and try again.","Error saving record. Please check origin and destination country combination is unique and try again."
|
415 |
-
"Warehouse does not exist","Warehouse does not exist"
|
416 |
-
"Error saving warehouse","Error saving warehouse"
|
417 |
-
"An error occured when synchronizing with temando.com","An error occured when synchronizing with temando.com"
|
418 |
-
"Warehouse was successfully saved.","Warehouse was successfully saved."
|
419 |
-
"The warehouse has been deleted.","The warehouse has been deleted."
|
420 |
-
"Error deleting warehouse.","Error deleting warehouse."
|
421 |
-
"Invalid warehouse id supplied. Warehouse does not exist.","Invalid warehouse id supplied. Warehouse does not exist."
|
422 |
-
"Invalid mode specified for mass status action.","Invalid mode specified for mass status action."
|
423 |
-
"No warehouses selected.","No warehouses selected."
|
424 |
-
"Warehouse ID %s not found.","Warehouse ID %s not found."
|
425 |
-
"Total of %d warehouses %s.","Total of %d warehouses %s."
|
426 |
-
"Zone does not exist","Zone does not exist"
|
427 |
-
"Error saving zone","Error saving zone"
|
428 |
-
"Zone was successfully saved.","Zone was successfully saved."
|
429 |
-
"The zone has been deleted.","The zone has been deleted."
|
430 |
-
"Unable to find the zone to delete.","Unable to find the zone to delete."
|
431 |
-
"No zones selected for deletion.","No zones selected for deletion."
|
432 |
-
"Zone ID %s not found.","Zone ID %s not found."
|
433 |
-
"Total of %d record(s) have been deleted.","Total of %d record(s) have been deleted."
|
434 |
-
"Cannot calculate shipping cost for separate item","Cannot calculate shipping cost for separate item"
|
435 |
-
"Temando Packaging","Temando Packaging"
|
436 |
-
"Packaging Mode","Packaging Mode"
|
437 |
-
"Commercial Invoice - International Freight","Commercial Invoice - International Freight"
|
438 |
-
"Product Description","Product Description"
|
439 |
-
"Composition","Composition"
|
440 |
-
"Country of Manufacture","Country of Manufacture"
|
441 |
-
"Country of Origin","Country of Origin"
|
442 |
-
"Package Details","Package Details"
|
443 |
-
"Description","Description"
|
444 |
-
"Package Type","Package Type"
|
445 |
-
"Value","Value"
|
446 |
-
"Pick-up Date","Pick-up Date"
|
447 |
-
"ASAP","ASAP"
|
448 |
-
"Select Date:","Select Date:"
|
449 |
-
"Time of Day","Time of Day"
|
450 |
-
"Destination","Destination"
|
451 |
-
"Destination Type","Destination Type"
|
452 |
-
"Phone","Phone"
|
453 |
-
"Items Ordered","Items Ordered"
|
454 |
-
"Dimensions","Dimensions"
|
455 |
-
"Product","Product"
|
456 |
-
"Qty to Ship","Qty to Ship"
|
457 |
-
"Article Value (%s)","Item Value (%s)"
|
458 |
-
"Article Description","Item Description"
|
459 |
-
"Ordered","Ordered"
|
460 |
-
"Shipped","Shipped"
|
461 |
-
"Boxes to Ship","Boxes to Ship"
|
462 |
-
"Add Box","Add Box"
|
463 |
-
"Import from Above","Import from Above"
|
464 |
-
"Article Allocation","Item Allocation"
|
465 |
-
"Row ID","Row ID"
|
466 |
-
"Comment","Comment"
|
467 |
-
"Remove","Remove"
|
468 |
-
"Close [X]","Close [X]"
|
469 |
-
"Shipping Instructions & Comments","Shipping Instructions & Comments"
|
470 |
-
"Instructions","Instructions"
|
471 |
-
"Deliver By","Deliver By"
|
472 |
-
"Deliver
|
473 |
-
"
|
474 |
-
"The Buyer indicated that they would
|
475 |
-
"
|
476 |
-
"
|
477 |
-
"
|
478 |
-
"
|
479 |
-
"
|
480 |
-
"
|
481 |
-
"
|
482 |
-
"
|
483 |
-
"
|
484 |
-
"
|
485 |
-
"
|
486 |
-
"
|
487 |
-
"
|
488 |
-
"
|
489 |
-
"
|
490 |
-
"
|
491 |
-
"
|
492 |
-
"
|
493 |
-
"
|
494 |
-
"
|
495 |
-
"Final
|
496 |
-
"
|
497 |
-
"
|
498 |
-
"
|
499 |
-
"
|
500 |
-
"
|
501 |
-
"
|
502 |
-
"
|
503 |
-
"
|
504 |
-
"Maximum
|
505 |
-
"
|
506 |
-
"
|
507 |
-
"
|
508 |
-
"
|
509 |
-
"
|
510 |
-
"
|
511 |
-
"
|
512 |
-
"Account Details","Account Details"
|
513 |
-
"
|
514 |
-
"
|
515 |
-
"
|
516 |
-
"The
|
517 |
-
"
|
518 |
-
"
|
519 |
-
"
|
520 |
-
"
|
521 |
-
"
|
522 |
-
"
|
523 |
-
"
|
524 |
-
"Additional
|
525 |
-
"
|
526 |
-
"
|
527 |
-
"
|
528 |
-
"
|
529 |
-
"
|
530 |
-
"
|
531 |
-
"
|
532 |
-
"
|
533 |
-
"
|
534 |
-
"
|
535 |
-
"
|
536 |
-
"
|
537 |
-
"
|
538 |
-
"
|
539 |
-
"
|
540 |
-
"Temando will return quotes based on the origin location address.","Temando will return quotes based on the origin location address."
|
541 |
-
"
|
542 |
-
"
|
543 |
-
"
|
544 |
-
"Dynamic
|
545 |
-
"
|
546 |
-
"
|
547 |
-
"
|
548 |
-
"
|
549 |
-
"Temando
|
550 |
-
"
|
551 |
-
"
|
552 |
-
"
|
553 |
-
"
|
554 |
-
"
|
555 |
-
"
|
556 |
-
"
|
557 |
-
"
|
558 |
-
"
|
559 |
-
"
|
560 |
-
"Custom error message","Custom error message"
|
561 |
-
"
|
562 |
-
"
|
563 |
-
"Show
|
564 |
-
"
|
565 |
-
"
|
566 |
-
"
|
567 |
-
"
|
568 |
-
"
|
569 |
-
"
|
570 |
-
"
|
571 |
-
"Show
|
572 |
-
"Show
|
573 |
-
"
|
574 |
-
"Allow
|
575 |
-
"
|
576 |
-
"
|
577 |
-
"
|
578 |
-
"
|
579 |
-
"
|
580 |
-
"
|
581 |
-
"
|
582 |
-
"
|
583 |
-
"
|
584 |
-
"
|
585 |
-
"
|
586 |
-
"The units used for product
|
587 |
-
"
|
588 |
-
"
|
589 |
-
"
|
590 |
-
"
|
591 |
-
"
|
592 |
-
"
|
593 |
-
"Ship to
|
594 |
-
"
|
595 |
-
"
|
596 |
-
"Minimum Order Amount
|
597 |
-
"
|
598 |
-
"
|
599 |
-
"
|
600 |
-
"
|
601 |
-
"
|
602 |
-
"
|
603 |
-
"
|
604 |
-
"
|
605 |
-
"
|
606 |
-
"
|
607 |
-
"
|
608 |
-
"
|
609 |
-
"
|
610 |
-
"
|
611 |
-
"
|
612 |
-
"Pricing
|
613 |
-
"
|
614 |
-
"
|
615 |
-
"Handling Fee
|
616 |
-
"
|
617 |
-
"
|
618 |
-
"
|
619 |
-
"
|
620 |
-
"
|
621 |
-
"
|
622 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"Temando","Temando"
|
2 |
+
"General","General"
|
3 |
+
"HS Code Information","HS Code Information"
|
4 |
+
"SKU","SKU"
|
5 |
+
"Origin Country","Origin Country"
|
6 |
+
"Destination Country","Destination Country"
|
7 |
+
"HS Code","HS Code"
|
8 |
+
"HS Code Configuration","HS Code Configuration"
|
9 |
+
"CSV Import","CSV Import"
|
10 |
+
"HS Code Import","HS Code Import"
|
11 |
+
"Select CSV File","Select CSV File"
|
12 |
+
"Save and Continue Edit","Save and Continue Edit"
|
13 |
+
"Edit HS Code '%s'","Edit HS Code '%s'"
|
14 |
+
"New HS Code","New HS Code"
|
15 |
+
"Sku","Sku"
|
16 |
+
"CSV","CSV"
|
17 |
+
"Delete Selected HS Codes","Delete Selected HS Codes"
|
18 |
+
"Import CSV File","Import CSV File"
|
19 |
+
"Create New Manifest - Please note, to manifest you must have a permanent pickup.","Create New Daily Manifest - Please note, to manifest you must have a permanent pickup."
|
20 |
+
"Location","Location"
|
21 |
+
"Carrier","Carrier"
|
22 |
+
"Date","Date"
|
23 |
+
"Created At","Created At"
|
24 |
+
"Type","Type"
|
25 |
+
"Manifest Document","Daily Manifest Document"
|
26 |
+
"Download","Download"
|
27 |
+
"Label Document","Label Document"
|
28 |
+
"Confirm","Confirm"
|
29 |
+
"Are you sure?","Are you sure?"
|
30 |
+
"Package Information","Package Information"
|
31 |
+
"Name","Name"
|
32 |
+
"Packaging Type","Packaging Type"
|
33 |
+
"Length","Length"
|
34 |
+
"Width","Width"
|
35 |
+
"Height","Height"
|
36 |
+
"Measure Unit","Measure Unit"
|
37 |
+
"Weight Unit","Weight Unit"
|
38 |
+
"Package Configuration","Package Configuration"
|
39 |
+
"Edit Package '%s'","Edit Package '%s'"
|
40 |
+
"New Package","New Package"
|
41 |
+
"Actions","Actions"
|
42 |
+
"Actions Configuration","Actions Configuration"
|
43 |
+
"Shipping Rate Type","Shipping Rate Type"
|
44 |
+
"Static Rate Configuration","Static Rate Configuration"
|
45 |
+
"Static Rate Value","Static Rate Value"
|
46 |
+
"Applies to free shipping and flat rate.","Applies to free shipping and flat rate."
|
47 |
+
"Static Rate Label","Static Rate Label"
|
48 |
+
"As displayed to a customer. Applies to free shipping & flat rate.","As displayed to a customer. Applies to free shipping & flat rate."
|
49 |
+
"Dynamic Rate Configuration","Dynamic Rate Configuration"
|
50 |
+
"Carriers","Carriers"
|
51 |
+
"Display Filter","Display Filter"
|
52 |
+
"Carrier Filter","Carrier Filter"
|
53 |
+
"Rate Adjustment Type","Rate Adjustment Type"
|
54 |
+
"Rate Adjustment Value","Rate Adjustment Value"
|
55 |
+
"For min/max, enter range as min:max (ie \'5.95:10.95\' to keep shipping price between $5.95 - $10.95)","For min/max, enter range as min:max (ie \'5.95:10.95\' to keep shipping price between $5.95 - $10.95)"
|
56 |
+
"Show Carrier Name","Show Carrier Name"
|
57 |
+
"Yes","Yes"
|
58 |
+
"No","No"
|
59 |
+
"Show Transit Type","Show Transit Type"
|
60 |
+
"Show Transit Time","Show Transit Time"
|
61 |
+
"Alternative Method Title","Alternative Method Title"
|
62 |
+
"Appears in place of carrier name when \'Show Carrier Name\' is off","Appears in place of carrier name when \'Show Carrier Name\' is off"
|
63 |
+
"Restrict Shipping Configuration","Restrict Shipping Configuration"
|
64 |
+
"Note","Note"
|
65 |
+
"Displayed to a customer when shipping is restricted.","Displayed to a customer when shipping is restricted."
|
66 |
+
"Conditions","Conditions"
|
67 |
+
"Cart attribute conditions (leave blank for any).","Cart attribute conditions (leave blank for any)."
|
68 |
+
"Time/Day conditions (leave blank for any).","Time/Day conditions (leave blank for any)."
|
69 |
+
"Order Placed Day","Order Placed Day"
|
70 |
+
"Order Placed (time)","Order Placed (time)"
|
71 |
+
"Time","Time"
|
72 |
+
"24HH:MM:SS","24HH:MM:SS"
|
73 |
+
"Rule Information","Rule Information"
|
74 |
+
"General Information","General Information"
|
75 |
+
"Rule Name","Rule Name"
|
76 |
+
"Status","Status"
|
77 |
+
"Enabled","Enabled"
|
78 |
+
"Disabled","Disabled"
|
79 |
+
"Shipment Urgency","Shipment Urgency"
|
80 |
+
"From Date","From Date"
|
81 |
+
"To Date","To Date"
|
82 |
+
"Priority","Priority"
|
83 |
+
"Stop further rules processing.","Stop further rules processing."
|
84 |
+
"Rules with higher number in priority field will not be processed if set to \'Yes\'","Rules with higher number in priority field will not be processed if set to \'Yes\'"
|
85 |
+
"Stores","Stores"
|
86 |
+
"NOT LOGGED IN","NOT LOGGED IN"
|
87 |
+
"Customer Groups","Customer Groups"
|
88 |
+
"Shipping Rule Configuration","Shipping Rule Configuration"
|
89 |
+
"Edit Rule '%s'","Edit Rule '%s'"
|
90 |
+
"New Shipping Rule","New Shipping Rule"
|
91 |
+
"Date Start","Date Start"
|
92 |
+
"Date Expire","Date Expire"
|
93 |
+
"Type","Type"
|
94 |
+
"Stop Other Rules","Stop Other Rules"
|
95 |
+
"Enable Rules","Enable Rules"
|
96 |
+
"Disable Rules","Disable Rules"
|
97 |
+
"Delete Rules","Delete Rules"
|
98 |
+
"Are you sure you want to delete selected shipping rules?","Are you sure you want to delete selected shipping rules?"
|
99 |
+
"View Consignment","View Label"
|
100 |
+
"View Commercial Invoice","View Commercial Invoice"
|
101 |
+
"Ship with Temando","Ship with Temando"
|
102 |
+
"Cheapest","Cheapest"
|
103 |
+
"Fastest","Fastest"
|
104 |
+
"Customer Selected","Customer Selected"
|
105 |
+
"Selected for Booking","Selected for shipping"
|
106 |
+
"Information","Information"
|
107 |
+
"Shipment #","Shipment #"
|
108 |
+
"Ship to Name","Ship to Name"
|
109 |
+
"Date Shipped","Date Shipped"
|
110 |
+
"Total Qty","Total Qty"
|
111 |
+
"Action","Action"
|
112 |
+
"Shipments","Shipments"
|
113 |
+
"Shipment View","Shipment View"
|
114 |
+
"None selected","None selected"
|
115 |
+
"Pick Slip","Pick Slip"
|
116 |
+
"Save and Get Quotes","Save and Get Quotes"
|
117 |
+
"No Consignment","No label"
|
118 |
+
"Order # %s | %s","Order # %s | %s"
|
119 |
+
"Urgency","Urgency"
|
120 |
+
"Order #","Order #"
|
121 |
+
"Purchased On","Purchased On"
|
122 |
+
"Anticipated Cost","Quoted cost"
|
123 |
+
"Shipping Paid","Actual cost"
|
124 |
+
"Customer Selected Quote","Customer Selected Quote"
|
125 |
+
"Admin Selected Quote","Admin Selected Quote"
|
126 |
+
"Origin","Origin"
|
127 |
+
"View","View"
|
128 |
+
"Book Shipments","Process Shipments"
|
129 |
+
"Book selected shipments?","Book selected shipments?"
|
130 |
+
"Remove Shipments","Remove Shipments"
|
131 |
+
"Remove selected shipments?","Remove selected shipments?"
|
132 |
+
"Retrieve Consignment Label","Retrieve Shipping Label"
|
133 |
+
"Retrieve Pick Slip","Retrieve Pick Slip"
|
134 |
+
"Taxes & Duties Information","Taxes & Duties Information"
|
135 |
+
"Taxes & Duties Configuration","Taxes & Duties Configuration"
|
136 |
+
"Edit '%s' to '%s' Tax Type","Edit '%s' to '%s' Tax Type"
|
137 |
+
"New Record","New Record"
|
138 |
+
"Tax/Duty Type","Tax/Duty Type"
|
139 |
+
"Delete Selected Records","Delete Selected Records"
|
140 |
+
"Temando Profile","Temando Profile"
|
141 |
+
"Mode","Mode"
|
142 |
+
"*Use System Configuration","*Use System Configuration"
|
143 |
+
"As Defined","As Defined"
|
144 |
+
"Sandbox","Sandbox"
|
145 |
+
"Client ID","Client ID"
|
146 |
+
"Username","Username"
|
147 |
+
"Password","Password"
|
148 |
+
"Payment Type","Payment Type"
|
149 |
+
"Extra Information","Extra Information"
|
150 |
+
"Extra Location Information","Extra Location Information"
|
151 |
+
"Loading Facilities","Loading Facilities"
|
152 |
+
"Does the warehouse have loading facilities?","Does the warehouse have loading facilities?"
|
153 |
+
"Does the warehouse have a dock?","Does the warehouse have a dock?"
|
154 |
+
"Forklift","Forklift"
|
155 |
+
"Does the warehouse have a forklift?","Does the warehouse have a forklift?"
|
156 |
+
"If set to ""Yes"", the sandbox (testing) service will be used (usually set to ""No"" on a live site)","If set to ""Yes"", the sandbox (testing) service will be used (usually set to ""No"" on a live site)"
|
157 |
+
"Limited Access","Limited Access"
|
158 |
+
"Does the warehouse have limited access?","Does the warehouse have limited access?"
|
159 |
+
"Postal Box","P.O. Box"
|
160 |
+
"Is the address of this warehouse a postal box?","Is the address of this warehouse a postal box?"
|
161 |
+
"Label Type","Label Type"
|
162 |
+
"Consignment document type associated with this warehouse.","Label document type associated with this warehouse."
|
163 |
+
"Company Name","Company Name"
|
164 |
+
"Location Type","Location Type"
|
165 |
+
"Address & Contact","Address & Contact"
|
166 |
+
"Address Details","Address Details"
|
167 |
+
"Street","Street"
|
168 |
+
"City","City"
|
169 |
+
"ZIP/Postal Code","Zip Code"
|
170 |
+
"Country","Country"
|
171 |
+
"Region","State"
|
172 |
+
"Contact Details","Contact Details"
|
173 |
+
"Contact Name","Contact Name"
|
174 |
+
"Contact Email","Contact Email"
|
175 |
+
"Phone 1","Phone 1"
|
176 |
+
"Phone 2","Phone 2"
|
177 |
+
"Fax","Fax"
|
178 |
+
"User ID","User ID"
|
179 |
+
"First Name","First Name"
|
180 |
+
"Last Name","Last Name"
|
181 |
+
"Email","Email"
|
182 |
+
"Role","Role"
|
183 |
+
"Position","Position"
|
184 |
+
"Zones","Zones"
|
185 |
+
"Use CTRL + click to assign multiple zones.","Use CTRL + click to assign multiple zones."
|
186 |
+
"Users Permissions","Users Permissions"
|
187 |
+
"Edit Warehouse '%s'","Edit Warehouse '%s'"
|
188 |
+
"New Warehouse","New Warehouse"
|
189 |
+
"ZIP/Postcode","Zip Code"
|
190 |
+
"Postcode","Zip Code"
|
191 |
+
"Enable Warehouses","Enable Warehouses"
|
192 |
+
"Disable Warehouses","Disable Warehouses"
|
193 |
+
"Delete Warehouses","Delete Warehouses"
|
194 |
+
"Are you sure you want to delete selected warehouses?","Are you sure you want to delete selected warehouses?"
|
195 |
+
"Zone Information","Zone Information"
|
196 |
+
"Postal Code Ranges","Zip Code Ranges"
|
197 |
+
"Use colon to specify range, comma to separate ranges.","Use colon to specify range, comma to separate ranges."
|
198 |
+
"Zone Configuration","Zone Configuration"
|
199 |
+
"Edit Zone '%s'","Edit Zone '%s'"
|
200 |
+
"New Zone","New Zone"
|
201 |
+
"Range","Range"
|
202 |
+
"Manage HS Codes","Manage HS Codes"
|
203 |
+
"Add New HS Code","Add New HS Code"
|
204 |
+
"Manage Manifests","Daily Manifests"
|
205 |
+
"Draft Manifest","Draft Daily Manifest"
|
206 |
+
"Confirm Manifests","Confirm Daily Manifests"
|
207 |
+
"Manage Custom Packages","Manage Custom Packages"
|
208 |
+
"Add New Package","Add New Package"
|
209 |
+
"Manage Shipping Rules","Manage Shipping Rules"
|
210 |
+
"Add New Shipping Rule","Add New Shipping Rule"
|
211 |
+
"Manage Shipments","Manage Shipments"
|
212 |
+
"Manage Taxes & Duties","Manage Taxes & Duties"
|
213 |
+
"Add New Record","Add New Record"
|
214 |
+
"Manage Warehouses","Manage Warehouses"
|
215 |
+
"Add New Warehouse","Add New Warehouse"
|
216 |
+
"Manage Zones","Manage Zones"
|
217 |
+
"Add New Zone","Add New Zone"
|
218 |
+
"Suburb","City"
|
219 |
+
"Live","Live"
|
220 |
+
"Credit","Credit"
|
221 |
+
"Account","Account"
|
222 |
+
"All Allowed Countries","All Allowed Countries"
|
223 |
+
"Specific Countries","Specific Countries"
|
224 |
+
"Payment","Payment"
|
225 |
+
"Allow Specific Countries","Allow Specific Countries"
|
226 |
+
"Specific Country","Specific Country"
|
227 |
+
"Allowed Carriers","Allowed Carriers"
|
228 |
+
"Packaging","Packaging"
|
229 |
+
"Fragile","Fragile"
|
230 |
+
"Rule Type","Rule Type"
|
231 |
+
"Dynamic Rule Carriers","Dynamic Rule Carriers"
|
232 |
+
"-- Please select --","-- Please select --"
|
233 |
+
"Invalid HS Code File Format","Invalid HS Code File Format"
|
234 |
+
"An error occurred while importing hs codes.","An error occurred while importing hs codes."
|
235 |
+
"Import finished with errors:<br/> %s","Import finished with errors:<br/> %s"
|
236 |
+
"Invalid HS Code format in the Row #%s","Invalid HS Code format in the Row #%s"
|
237 |
+
"Invalid SKU "%s" in the Row #%s.","Invalid SKU "%s" in the Row #%s."
|
238 |
+
"Invalid Origin Country "%s" in the Row #%s.","Invalid Origin Country "%s" in the Row #%s."
|
239 |
+
"Invalid Destination Country "%s" in the Row #%s.","Invalid Destination Country "%s" in the Row #%s."
|
240 |
+
"Missing or invalid HS Code in the Row #%s.","Missing or invalid HS Code in the Row #%s."
|
241 |
+
"Duplicate Row #%s (SKU "%s", Origin Country "%s", Destination Country "%s" and HS Code "%s").","Duplicate Row #%s (SKU "%s", Origin Country "%s", Destination Country "%s" and HS Code "%s")."
|
242 |
+
"Products","Products"
|
243 |
+
"Qty","Qty"
|
244 |
+
"SKU: ","SKU: "
|
245 |
+
"Weight","Weight"
|
246 |
+
"TEMANDO PICK SLIP","TEMANDO PICK SLIP"
|
247 |
+
"Order # ","Order # "
|
248 |
+
"Order Date: ","Order Date: "
|
249 |
+
"Sold to:","Sold to:"
|
250 |
+
"Ship to:","Ship to:"
|
251 |
+
"Payment Method:","Payment Method:"
|
252 |
+
"Payment Method","Payment Method"
|
253 |
+
"Shipping Method:","Shipping Method:"
|
254 |
+
"Total Shipping Charges","Total Shipping Charges"
|
255 |
+
"Shipping Instructions: ","Shipping Instructions: "
|
256 |
+
"Title","Title"
|
257 |
+
"Number","Number"
|
258 |
+
"Custom Value","Declared value for customs"
|
259 |
+
"Conditions Combination","Conditions Combination"
|
260 |
+
"Cart Item Attribute","Cart Item Attribute"
|
261 |
+
"Product Attribute","Product Attribute"
|
262 |
+
"FOUND","FOUND"
|
263 |
+
"NOT FOUND","NOT FOUND"
|
264 |
+
"If an item is %s in the cart with %s of these conditions true:","If an item is %s in the cart with %s of these conditions true:"
|
265 |
+
"total quantity","total quantity"
|
266 |
+
"total amount","total amount"
|
267 |
+
"is","is"
|
268 |
+
"is not","is not"
|
269 |
+
"equals or greater than","equals or greater than"
|
270 |
+
"equals or less than","equals or less than"
|
271 |
+
"greater than","greater than"
|
272 |
+
"less than","less than"
|
273 |
+
"is one of","is one of"
|
274 |
+
"is not one of","is not one of"
|
275 |
+
"If %s %s %s for a subselection of items in cart matching %s of these conditions:","If %s %s %s for a subselection of items in cart matching %s of these conditions:"
|
276 |
+
"Subtotal","Subtotal"
|
277 |
+
"Subtotal with Discount","Subtotal with Discount"
|
278 |
+
"Total Items Quantity","Total Items Quantity"
|
279 |
+
"Total Weight","Total Weight"
|
280 |
+
"Shipping Postcode","Shipping Zip Code"
|
281 |
+
"Shipping Region","Shipping Region"
|
282 |
+
"Shipping State/Province","Shipping State/Province"
|
283 |
+
"Shipping Country","Shipping Country"
|
284 |
+
"Product attribute combination","Product attribute combination"
|
285 |
+
"Products subselection","Products subselection"
|
286 |
+
"Cart Attribute","Cart Attribute"
|
287 |
+
"Quantity in cart","Quantity in cart"
|
288 |
+
"Price in cart","Price in cart"
|
289 |
+
"Row total in cart","Row total in cart"
|
290 |
+
"--Please Select--","--Please Select--"
|
291 |
+
"Free Shipping","Free Shipping"
|
292 |
+
"Flat Rate","Flat Rate"
|
293 |
+
"An error occurred while fetching the shipment status.","An error occurred while fetching the shipment status."
|
294 |
+
"Please select a location type from the list.","Please select a location type from the list."
|
295 |
+
"Please select a country from the list.","Please select a country from the list."
|
296 |
+
"Individual","Individual"
|
297 |
+
"Company","Company"
|
298 |
+
"Business","Business"
|
299 |
+
"Residential","Residential"
|
300 |
+
"Use Magento","Use Magento"
|
301 |
+
"Use Temando","Use Temando"
|
302 |
+
" -- "," -- "
|
303 |
+
"Markup (fixed)","Markup (fixed)"
|
304 |
+
"Markup (percentage)","Markup (percentage)"
|
305 |
+
"Subsidy (fixed)","Subsidy (fixed)"
|
306 |
+
"Subsidy (percentage)","Subsidy (percentage)"
|
307 |
+
"Min/Max Range","Min/Max Range"
|
308 |
+
"Override","Override"
|
309 |
+
"Standard & Express","Standard & Express"
|
310 |
+
"Standard only","Standard only"
|
311 |
+
"Express only","Express only"
|
312 |
+
"All Quotes","All Quotes"
|
313 |
+
"Cheapest only","Cheapest only"
|
314 |
+
"Fastest only","Fastest only"
|
315 |
+
"Cheapest and Fastest only","Cheapest and Fastest only"
|
316 |
+
"before","before"
|
317 |
+
"after","after"
|
318 |
+
"Zone","Zone"
|
319 |
+
"Dynamic","Dynamic"
|
320 |
+
"Restrict","Restrict"
|
321 |
+
"Use Defaults","Use Defaults"
|
322 |
+
"Same Day","Same Day"
|
323 |
+
"Express","Express"
|
324 |
+
"Standard","Standard"
|
325 |
+
"Pending","Pending"
|
326 |
+
"Partially Booked","Partially Shipped"
|
327 |
+
"Booked","Shipped"
|
328 |
+
"Optional","Optional"
|
329 |
+
"Mandatory","Mandatory"
|
330 |
+
"Show flat rate","Show flat rate"
|
331 |
+
"Show error message","Show error message"
|
332 |
+
"Show custom message","Show custom message"
|
333 |
+
"Plain Paper","Plain Paper"
|
334 |
+
"Thermal","Thermal"
|
335 |
+
"Fixed Price / Flat Rate","Fixed Price / Flat Rate"
|
336 |
+
"Dynamic Pricing (All)","Dynamic Pricing (All)"
|
337 |
+
"Dynamic Pricing (Cheapest only)","Dynamic Pricing (Cheapest only)"
|
338 |
+
"Dynamic Pricing (Fastest only)","Dynamic Pricing (Fastest only)"
|
339 |
+
"Dynamic Pricing (Cheapest and Fastest only)","Dynamic Pricing (Cheapest and Fastest only)"
|
340 |
+
"AM","AM"
|
341 |
+
"PM","PM"
|
342 |
+
", includes insurance",", includes insurance"
|
343 |
+
" and "," and "
|
344 |
+
", includes ",", includes "
|
345 |
+
" carbon offset"," carbon offset"
|
346 |
+
" footprints"," footprints"
|
347 |
+
" day"," day"
|
348 |
+
"s","s"
|
349 |
+
"End Date must be greater than Start Date.","End Date must be greater than Start Date."
|
350 |
+
"Websites must be specified.","Websites must be specified."
|
351 |
+
"Customer Groups must be specified.","Customer Groups must be specified."
|
352 |
+
"Record does not exist","Record does not exist"
|
353 |
+
"Error saving record","Error saving record"
|
354 |
+
"Record was successfully saved.","Record was successfully saved."
|
355 |
+
"Error saving HS Code. SKU not found or combination already exists.","Error saving HS Code. SKU not found or combination already exists."
|
356 |
+
"No data found to save","No data found to save"
|
357 |
+
"The record has been deleted.","The record has been deleted."
|
358 |
+
"Unable to find the record to delete.","Unable to find the record to delete."
|
359 |
+
"Please select at least one record.","Please select at least one record."
|
360 |
+
"Record ID %d not found.","Record ID %d not found."
|
361 |
+
"Total of %d record(s) have been deleted.","Total of %d record(s) have been deleted."
|
362 |
+
"Import successful - all rows imported.","Import successful - all rows imported."
|
363 |
+
"Please select CSV file.","Please select CSV file."
|
364 |
+
"Manifest successful added for carrier: ","Daily Manifest successfully added for carrier: "
|
365 |
+
"Manage Packaging","Manage Packaging"
|
366 |
+
"Package does not exist","Package does not exist"
|
367 |
+
"Error saving package data","Error saving package data"
|
368 |
+
"Package successfully saved.","Package successfully saved."
|
369 |
+
"Package has been deleted.","Package has been deleted."
|
370 |
+
"Unable to find the package to delete.","Unable to find the package to delete."
|
371 |
+
"Manage Rules","Manage Rules"
|
372 |
+
"Rule does not exist","Rule does not exist"
|
373 |
+
"Wrong rule specified.","Wrong rule specified."
|
374 |
+
"The rule has been saved.","The rule has been saved."
|
375 |
+
"An error occurred while saving the rule data. Please review your entries and try again.","An error occurred while saving the rule data. Please review your entries and try again."
|
376 |
+
"The rule has been deleted.","The rule has been deleted."
|
377 |
+
"Unable to find the rule to delete.","Unable to find the rule to delete."
|
378 |
+
"Invalid mode specified for mass status action.","Invalid mode specified for mass status action."
|
379 |
+
"No rules selected.","No rules selected."
|
380 |
+
"Rule ID %d not found.","Rule ID %d not found."
|
381 |
+
"Total of %d rules %s.","Total of %d rules %s."
|
382 |
+
"Shipment Manager","Shipment Manager"
|
383 |
+
"You are not allowed to edit this shipment.","You are not allowed to edit this shipment."
|
384 |
+
"Quotes cannot be refreshed until at least one box is added to the shipment.","Quotes cannot be refreshed until at least one box is added to the shipment."
|
385 |
+
"Shipment does not exist.","Shipment does not exist."
|
386 |
+
"Validation errors:","Validation errors:"
|
387 |
+
"The shipment data has been saved.","The shipment data has been saved."
|
388 |
+
"Pick-up date is not a valid date.","Pick-up date is not a valid date."
|
389 |
+
"Pick-up date is in the past.","Pick-up date is in the past."
|
390 |
+
"Pick-up time is not a valid selection.","Pick-up time is not a valid selection."
|
391 |
+
"Please select valid warehouse from available origin locations.","Please select valid warehouse from available origin locations."
|
392 |
+
"Order # %s cannot be shipped.","Order # %s cannot be shipped."
|
393 |
+
"Selected quote is no longer available. Please refresh quotes by saving the shipment and try again.","Selected quote is no longer available. Please refresh quotes by saving the shipment and try again."
|
394 |
+
"Please agree to the insurance terms & conditions at System -> Configuration -> Temando Settings -> Insurance.","Please agree to the insurance terms & conditions at System -> Configuration -> Temando Settings -> Insurance."
|
395 |
+
"There are no items to be shipped. Please review \'Qty to Ship\' fields and try again.","There are no items to be shipped. Please review \'Qty to Ship\' fields and try again."
|
396 |
+
"Shipment booked.","Shipment booked."
|
397 |
+
"Quote pre-selected for booking.","Quote pre-selected for booking."
|
398 |
+
"Shipment ID or quote ID not found.","Shipment ID or quote ID not found."
|
399 |
+
"No shipments selected for removal.","No shipments selected for removal."
|
400 |
+
"Shipment ID %s not found.","Shipment ID %s not found."
|
401 |
+
"Total of %d shipments removed.","Total of %d shipments removed."
|
402 |
+
"Please select at least one shipment.","Please select at least one shipment."
|
403 |
+
"Consignment label not found for selected shipments.","Shipping label not found for selected shipments."
|
404 |
+
"Consignment label can be retrieved for booked shipments only.","Shipping label can be retrieved for booked shipments only."
|
405 |
+
"No shipments selected for booking.","No shipments selected for booking."
|
406 |
+
"Shipment ID %s no longer exists.","Shipment ID %s no longer exists."
|
407 |
+
"Order #%s: cannot be shipped.","Order #%s: cannot be shipped."
|
408 |
+
"Order #%s: no quote selected for booking or selected quote no longer exists.","Order #%s: no quote selected for booking or selected quote no longer exists."
|
409 |
+
"Order #%s: shipment already booked.","Order #%s: shipment already processed"
|
410 |
+
"Order #%s: Shipment booked.","Order #%s: Shipment processed."
|
411 |
+
"Order #%s: ","Order #%s: "
|
412 |
+
"Error retrieving pick slips. More infomration in exception log.","Error retrieving pick slips. More infomration in exception log."
|
413 |
+
"No orders selected for pick slip retrieval.","No orders selected for pick slip retrieval."
|
414 |
+
"Error saving record. Please check origin and destination country combination is unique and try again.","Error saving record. Please check origin and destination country combination is unique and try again."
|
415 |
+
"Warehouse does not exist","Warehouse does not exist"
|
416 |
+
"Error saving warehouse","Error saving warehouse"
|
417 |
+
"An error occured when synchronizing with temando.com","An error occured when synchronizing with temando.com"
|
418 |
+
"Warehouse was successfully saved.","Warehouse was successfully saved."
|
419 |
+
"The warehouse has been deleted.","The warehouse has been deleted."
|
420 |
+
"Error deleting warehouse.","Error deleting warehouse."
|
421 |
+
"Invalid warehouse id supplied. Warehouse does not exist.","Invalid warehouse id supplied. Warehouse does not exist."
|
422 |
+
"Invalid mode specified for mass status action.","Invalid mode specified for mass status action."
|
423 |
+
"No warehouses selected.","No warehouses selected."
|
424 |
+
"Warehouse ID %s not found.","Warehouse ID %s not found."
|
425 |
+
"Total of %d warehouses %s.","Total of %d warehouses %s."
|
426 |
+
"Zone does not exist","Zone does not exist"
|
427 |
+
"Error saving zone","Error saving zone"
|
428 |
+
"Zone was successfully saved.","Zone was successfully saved."
|
429 |
+
"The zone has been deleted.","The zone has been deleted."
|
430 |
+
"Unable to find the zone to delete.","Unable to find the zone to delete."
|
431 |
+
"No zones selected for deletion.","No zones selected for deletion."
|
432 |
+
"Zone ID %s not found.","Zone ID %s not found."
|
433 |
+
"Total of %d record(s) have been deleted.","Total of %d record(s) have been deleted."
|
434 |
+
"Cannot calculate shipping cost for separate item","Cannot calculate shipping cost for separate item"
|
435 |
+
"Temando Packaging","Temando Packaging"
|
436 |
+
"Packaging Mode","Packaging Mode"
|
437 |
+
"Commercial Invoice - International Freight","Commercial Invoice - International Freight"
|
438 |
+
"Product Description","Product Description"
|
439 |
+
"Composition","Composition"
|
440 |
+
"Country of Manufacture","Country of Manufacture"
|
441 |
+
"Country of Origin","Country of Origin"
|
442 |
+
"Package Details","Package Details"
|
443 |
+
"Description","Description"
|
444 |
+
"Package Type","Package Type"
|
445 |
+
"Value","Value"
|
446 |
+
"Pick-up Date","Pick-up Date"
|
447 |
+
"ASAP","ASAP"
|
448 |
+
"Select Date:","Select Date:"
|
449 |
+
"Time of Day","Time of Day"
|
450 |
+
"Destination","Destination"
|
451 |
+
"Destination Type","Destination Type"
|
452 |
+
"Phone","Phone"
|
453 |
+
"Items Ordered","Items Ordered"
|
454 |
+
"Dimensions","Dimensions"
|
455 |
+
"Product","Product"
|
456 |
+
"Qty to Ship","Qty to Ship"
|
457 |
+
"Article Value (%s)","Item Value (%s)"
|
458 |
+
"Article Description","Item Description"
|
459 |
+
"Ordered","Ordered"
|
460 |
+
"Shipped","Shipped"
|
461 |
+
"Boxes to Ship","Boxes to Ship"
|
462 |
+
"Add Box","Add Box"
|
463 |
+
"Import from Above","Import from Above"
|
464 |
+
"Article Allocation","Item Allocation"
|
465 |
+
"Row ID","Row ID"
|
466 |
+
"Comment","Comment"
|
467 |
+
"Remove","Remove"
|
468 |
+
"Close [X]","Close [X]"
|
469 |
+
"Shipping Instructions & Comments","Shipping Instructions & Comments"
|
470 |
+
"Instructions","Instructions"
|
471 |
+
"Deliver By","Deliver By"
|
472 |
+
"Deliver To","Deliver To"
|
473 |
+
"Deliver by Date","Deliver by Date"
|
474 |
+
"The Buyer has indicated that they would like their shipment insured.","The Buyer has indicated that they would like their shipment insured."
|
475 |
+
"The Buyer indicated that they would not like their shipment insured.","The Buyer indicated that they would not like their shipment insured."
|
476 |
+
"Customer Selected Delivery Options","Customer Selected Delivery Options"
|
477 |
+
"Origin Location","Origin Location"
|
478 |
+
"Warehouse","Warehouse"
|
479 |
+
"Available Quotes","Available Quotes"
|
480 |
+
"Delivery Method","Delivery Method"
|
481 |
+
"ETA","ETA"
|
482 |
+
"Cost","Cost"
|
483 |
+
"Notes","Notes"
|
484 |
+
"Make Booking","Process Booking"
|
485 |
+
"Select for Booking","Select for Booking"
|
486 |
+
"Book Quote","Process Shipping Rate"
|
487 |
+
"Select Quote","Select Quote"
|
488 |
+
"Confirm Reservation","Confirm Pick-up"
|
489 |
+
"Make Reservation","Request Pick-up"
|
490 |
+
"Unsaved changes will be lost. Continue booking?","Unsaved changes will be lost. Continue processesing?"
|
491 |
+
"Shipment Status","Shipment Status"
|
492 |
+
"Selected Pickup Location","Selected Pickup Location"
|
493 |
+
"Carrier Selected by Customer","Carrier Selected by Customer"
|
494 |
+
"Shipping Paid by Customer","Shipping Paid by Customer"
|
495 |
+
"Final Carrier Selected","Final Carrier Selected"
|
496 |
+
"Final Shipping Amount","Final Shipping Amount"
|
497 |
+
"Estimate Shipping and Tax","Estimate Shipping and Tax"
|
498 |
+
"Enter your destination to get a shipping estimate.","Enter your destination to get a shipping estimate."
|
499 |
+
"Get a Quote","Get a Quote"
|
500 |
+
"Incl. Tax","Incl. Tax"
|
501 |
+
"Update Total","Update Total"
|
502 |
+
"The latest I need my order.","The latest I need my order."
|
503 |
+
"Shipping Instructions","Shipping Instructions"
|
504 |
+
"Maximum 30 characters.","Maximum 30 characters."
|
505 |
+
"Maximum 5000 characters.","Maximum 5000 characters."
|
506 |
+
"Sorry, no quotes are available for this order at this time.","Sorry, no quotes are available for this order at this time."
|
507 |
+
"Delivery Options","Delivery Options"
|
508 |
+
"Extra Delivery Options","Extra Delivery Options"
|
509 |
+
"Estimate Shipping","Estimate Shipping"
|
510 |
+
"Suburb/City","City"
|
511 |
+
"Postal Code","Zip Code"
|
512 |
+
"Temando Account Details","Temando Account Details"
|
513 |
+
"Account Details","Account Details"
|
514 |
+
"Sandbox is used for testing.","Sandbox is used for testing."
|
515 |
+
"Login ID","Login ID"
|
516 |
+
"The Login ID created when setting up your Temando.com profile.","The Login ID created when setting up your Temando.com profile."
|
517 |
+
"The password created when setting up your Temando.com profile.","The password created when setting up your Temando.com profile."
|
518 |
+
"Account for those with a pre-approved Trade Account, otherwise select Credit.","Account for those with a pre-approved Trade Account, otherwise select Credit."
|
519 |
+
"Required Fields","Required Fields"
|
520 |
+
"Cancel","Cancel"
|
521 |
+
"Skip","Skip"
|
522 |
+
"Continue","Continue"
|
523 |
+
"Click the name of the carrier/s you want.","Click the name of the carrier/s you want."
|
524 |
+
"Additional Carriers","Additional Carriers"
|
525 |
+
"Additional carriers are available with BYO rates","Additional carriers are available with BYO rates"
|
526 |
+
"Contact me with additional info","Contact me with additional info"
|
527 |
+
"Full Name","Full Name"
|
528 |
+
"Email Address","Email Address"
|
529 |
+
"Back","Back"
|
530 |
+
"Catalog/Product","Catalog/Product"
|
531 |
+
"This area relates to the unique packaging of your products.","This area relates to the unique packaging of your products."
|
532 |
+
"Allows you to specify which carriers you will receive quotes from.","Allows you to specify which carriers you will receive quotes from."
|
533 |
+
"We have provided you with test credentials. To go live, enter your unique details.","We have provided you with test credentials. To go live, enter your unique details."
|
534 |
+
"Allowed Countries","Allowed Countries"
|
535 |
+
"Defines the countries you are using Temando to ship from and to.","Defines the countries you are using Temando to ship from and to."
|
536 |
+
"Configuration Complete","Configuration Complete"
|
537 |
+
"Ship-To Countries","Ship-To Countries"
|
538 |
+
"Shipping Rule","Shipping Rule"
|
539 |
+
"Name & Address","Name & Address"
|
540 |
+
"Temando will return quotes based on the origin location address. Additional locations can be added in the Manage Warehouses tab.","Temando will return quotes based on the origin location address. Additional locations can be added in the Manage Warehouses tab."
|
541 |
+
"Temando will return quotes based on the origin location address.","Temando will return quotes based on the origin location address."
|
542 |
+
"Create a shipping rule to customise the quotes displayed to your customers.","Create a shipping rule to customise the quotes displayed to your customers."
|
543 |
+
"Flat Rate – One price for all shipments","Flat Rate – One price for all shipments"
|
544 |
+
"Dynamic – Allows carrier selection and display filter","Dynamic – Allows carrier selection and display filter"
|
545 |
+
"Dynamic Rule Configuration","Dynamic Rule Configuration"
|
546 |
+
"Select the carriers you would like the rule to use","Select the carriers you would like the rule to use"
|
547 |
+
"Static Rule Configuration","Static Rule Configuration"
|
548 |
+
"Flat Rate Value","Flat Rate Value"
|
549 |
+
"Temando Configuration Wizard","Temando Configuration Wizard"
|
550 |
+
"Temando Settings","Temando Settings"
|
551 |
+
"If set to ""Yes"", the sandbox (testing) service will be used (usually set to ""No"" on a live site)","If set to ""Yes"", the sandbox (testing) service will be used (usually set to ""No"" on a live site)"
|
552 |
+
"<div style=""padding:10px;background-color:#fff;border:1px solid #ddd;margin-bottom:7px;"">If you don't have a Temando account, you can <a href=""https://www.temando.com/register/"" target=""_blank"">Sign Up</a> immediately.</div>","<div style=""padding:10px;background-color:#fff;border:1px solid #ddd;margin-bottom:7px;"">If you don't have a Temando account, you can <a href=""https://www.temando.com/register/"" target=""_blank"">Sign Up</a> immediately.</div>"
|
553 |
+
"If choosing ""credit"", please ensure you have sufficient credit in your Temando account","If choosing ""credit"", please ensure you have sufficient credit in your Temando account"
|
554 |
+
"Options","Options"
|
555 |
+
"Show Estimate Shipping on Product Page","Show Estimate Shipping on Product Page"
|
556 |
+
"Set to yes to enable a shipping estimation widget on the product page.","Set to yes to enable a shipping estimation widget on the product page."
|
557 |
+
"Shipping Label Type","Shipping Label Type"
|
558 |
+
"Error from Temando processing","Error from Temando processing"
|
559 |
+
"Show Temando error message, custom message or a flat rate shipping method when error occurs.","Show Temando error message, custom message or a flat rate shipping method when error occurs."
|
560 |
+
"Custom error message displayed when error is returned from Temando.","Custom error message displayed when error is returned from Temando."
|
561 |
+
"Custom error message","Custom error message"
|
562 |
+
"Checkout Options","Checkout Options"
|
563 |
+
"Show Delivery Options","Show Delivery Options"
|
564 |
+
"Show extra delivery options on checkout page?","Show extra delivery options on checkout page?"
|
565 |
+
"Container Swing Lifter","Container Swing Lifter"
|
566 |
+
"Applies to business deliveries only.","Applies to business deliveries only."
|
567 |
+
"Loading Dock","Loading Dock"
|
568 |
+
"Tailgate Lifter","Tailgate Lifter"
|
569 |
+
"Unattended Delivery","Unattended Delivery"
|
570 |
+
"Heavy Lift","Heavy Lift"
|
571 |
+
"Show Shipping Instructions","Show Shipping Instructions"
|
572 |
+
"Show Customer Comment","Show Customer Comment"
|
573 |
+
"Show 'Deliver By' Calendar","Show 'Deliver By' Calendar"
|
574 |
+
"Allow PO Box Deliveries","Allow PO Box Deliveries"
|
575 |
+
"Allow shipping to PO Box addresses?","Allow shipping to PO Box addresses?"
|
576 |
+
"The error message displayed when delivery to PO Box address is restricted.","The error message displayed when delivery to PO Box address is restricted."
|
577 |
+
"Insurance","Insurance"
|
578 |
+
"Disabled - This option is unavailable to users.<br/>Optional - The option is presented during checkout.<br/>Mandatory - Insurance must be added to all orders.","Disabled - This option is unavailable to users.<br/>Optional - The option is presented during checkout.<br/>Mandatory - Insurance must be added to all orders."
|
579 |
+
"Carbon Offset","Carbon Offset"
|
580 |
+
"Disabled - This option is unavailable to users.<br/>Optional - The option is presented during checkout.<br/>Mandatory - Carbon offsets are added to all orders.","Disabled - This option is unavailable to users.<br/>Optional - The option is presented during checkout.<br/>Mandatory - Carbon offsets are added to all orders."
|
581 |
+
"Footprints","Footprints"
|
582 |
+
"Disabled - This option is unavailable to users.<br/>Optional - The option is presented during checkout.<br/>Mandatory - Footprints are added to all orders.","Disabled - This option is unavailable to users.<br/>Optional - The option is presented during checkout.<br/>Mandatory - Footprints are added to all orders."
|
583 |
+
"Temando Manage Shipments - Filters","Temando Manage Shipments - Filters"
|
584 |
+
"Order Status","Order Status"
|
585 |
+
"Use CTRL + click to select multiple statuses<br/>Refers to <strong>Temando - Manage Shipments</strong> panel.<br/>Shipments linked to an order with selected status are <strong>NOT</strong> displayed on Temando - Manage Shipments grid.","Use CTRL + click to select multiple statuses<br/>Refers to <strong>Temando - Manage Shipments</strong> panel.<br/>Shipments linked to an order with selected status are <strong>NOT</strong> displayed on Temando - Manage Shipments grid."
|
586 |
+
"The units used for product measurements","The units used for product measurements"
|
587 |
+
"The units used for product weights","The units used for product weights"
|
588 |
+
"Default values will be used for all products that do not have product specific dimensions & packaging information configured.","Default values will be used for all products that do not have product specific dimensions & packaging information configured."
|
589 |
+
"Consolidation","Consolidation"
|
590 |
+
"Use packaging details defined in Magento or automated consolidation via Temando API.","Use packaging details defined in Magento or automated consolidation via Temando API."
|
591 |
+
"If unknown use 10x10x10","If unknown use 10x10x10"
|
592 |
+
"The heading above the list of Temando shipping methods during checkout.","The heading above the list of Temando shipping methods during checkout."
|
593 |
+
"Ship to applicable countries","Ship to applicable countries"
|
594 |
+
"Ship to specific countries","Ship to specific countries"
|
595 |
+
"Show method if not applicable","Show method if not applicable"
|
596 |
+
"Free Shipping with Minimum Order Amount","Free Shipping with Minimum Order Amount"
|
597 |
+
"Minimum Order Amount for Free Shipping","Minimum Order Amount for Free Shipping"
|
598 |
+
"Displayed Error Message","Displayed Error Message"
|
599 |
+
"Use CTRL + click to select multiple carriers.","Use CTRL + click to select multiple carriers."
|
600 |
+
"Locations","Locations"
|
601 |
+
"Rule Engine","Rule Engine"
|
602 |
+
"International","International"
|
603 |
+
"Manage Taxes & Duties","Manage Taxes & Duties"
|
604 |
+
"Configuration Settings","Configuration Settings"
|
605 |
+
"Shipping Methods","Shipping Methods"
|
606 |
+
"Configuration Wizard","Configuration Wizard"
|
607 |
+
"This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.","This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us."
|
608 |
+
"Available in the Business Extension","Available in the Business Extension"
|
609 |
+
"Consignment Number: ","Tracking number: "
|
610 |
+
"Request Id: ","Request Id: "
|
611 |
+
"Show error message to customer from Temando or show flat rate shipping method.","Show error message to customer from Temando or show flat rate shipping method."
|
612 |
+
"<strong>Free Shipping</strong> - no charge to customer.<br/><strong>Fixed Price / Flat Rate</strong> - customer always pays the amount set in ""Shipping Price"" below.<br/><strong>Dynamic Pricing</strong><br/>- <strong>All</strong>: All quotes from carriers in ""allowed carriers"" above are shown for the customer to choose from.<br/>- <strong>Cheapest</strong>: Only the cheapest quote is shown.<br/>- <strong>Fastest</strong>: Only the fastest quote is shown.<br/>- <strong>Cheapest and Fastest</strong>: The customer can choose between the cheapest or the fastest quote.","<strong>Free Shipping</strong> - no charge to customer.<br/><strong>Fixed Price / Flat Rate</strong> - customer always pays the amount set in ""Shipping Price"" below.<br/><strong>Dynamic Pricing</strong><br/>- <strong>All</strong>: All quotes from carriers in ""allowed carriers"" above are shown for the customer to choose from.<br/>- <strong>Cheapest</strong>: Only the cheapest quote is shown.<br/>- <strong>Fastest</strong>: Only the fastest quote is shown.<br/>- <strong>Cheapest and Fastest</strong>: The customer can choose between the cheapest or the fastest quote."
|
613 |
+
"Pricing Method","Pricing Method"
|
614 |
+
"Shipping Price","Shipping Price"
|
615 |
+
"Handling Fee / Markup","Handling Fee / Markup"
|
616 |
+
"Handling Fee Calculation","Handling Fee Calculation"
|
617 |
+
"Stock origin (warehouse) details","Stock origin (warehouse) details"
|
618 |
+
"Please enter the details of your pick-up location for all products.","Please enter the details of your pick-up location for all products."
|
619 |
+
"Use CTRL + click to select multiple carriers.","Use CTRL + click to select multiple carriers."
|
620 |
+
"Ensure you populate your Temando tab in the Magento Catalog section.","Ensure you populate your Temando tab in the Magento Catalog section."
|
621 |
+
"Corresponds to the numerical values entered against each of your products in the catalogue.","Corresponds to the numerical values entered against each of your products in the catalogue."
|
622 |
+
"The default package you create will be used for a product if you have not pre-defined dimensions of a product in the Temando Tab of the Catalog section.","The default package you create will be used for a product if you have not pre-defined dimensions of a product in the Temando Tab of the Catalog section."
|
623 |
+
"Configuration","Configuration"
|
624 |
+
"Retrieve Previous Manifest","Retrieve Previous Manifest"
|
625 |
+
"There was an issue generating labels. Please check the exception logs for details.","There was an issue generating labels. Please check the exception logs for details."
|
626 |
+
"Close this window","Close this window"
|
627 |
+
"Plain Paper Label Width","Plain Paper Label Width"
|
628 |
+
"Thermal Label Width","Thermal Label Width"
|
629 |
+
"Print settings for thermal and plain paper consignment documents.","Print settings for thermal and plain paper consignment documents."
|
630 |
+
"Print Settings","Print Settings"
|
631 |
+
"Allowed file types: jpg, jpeg, png.<br/>(Max size 270px x 270px)","Allowed file types: jpg, jpeg, png.<br/>(Max size 270px x 270px)"
|
632 |
+
"Logo Image","Logo Image"
|
633 |
+
"Scan and Print","Scan and Print"
|
634 |
+
"Show custom logo on the pickslip?","Show custom logo on the pickslip?"
|
635 |
+
"Show business address on the pickslip?","Show business address on the pickslip?"
|
636 |
+
"Show Custom Logo","Show Custom Logo"
|
637 |
+
"Show Business Address","Show Business Address"
|
638 |
+
"Pickslip Settings","Pickslip Settings"
|
639 |
+
"Temando Manage Shipments - Urgency","Temando Manage Shipments - Urgency"
|
640 |
+
"Default urgency values that will be displayed in the <strong>Manage Shipments</strong> grid. Shipments will be ordered by <strong>priority</strong>.","Default urgency values that will be displayed in the <strong>Manage Shipments</strong> grid. Shipments will be ordered by <strong>priority</strong>."
|
641 |
+
"Priority 1","Priority 1"
|
642 |
+
"Priority 2","Priority 2"
|
643 |
+
"Priority 3","Priority 3"
|
644 |
+
"Priority 4","Priority 4"
|
645 |
+
"Shipping Rate Applied","Shipping Rate Applied"
|
646 |
+
"Per Order","Per Order"
|
647 |
+
"Charge Items","Charge Items"
|
648 |
+
"Clone Warehouses","Clone Warehouses"
|
649 |
+
"Are you sure you want to clone selected warehouses?","Are you sure you want to clone selected warehouses?"
|
650 |
+
"Clone Rules","Clone Rules"
|
651 |
+
"Are you sure you want to clone selected rules?","Are you sure you want to clone selected rules?"
|
652 |
+
"Clone","Clone"
|
653 |
+
"Are you sure you want to clone the selected package?","Are you sure you want to clone the selected package?"
|
654 |
+
"Dangerous","Dangerous"
|
655 |
+
"No shipments found or available for booking.","No shipments found or available for booking."
|
656 |
+
"Printing disabled: Please install Imagick.","Printing disabled: Please install Imagick."
|
657 |
+
"Error retrieving pick slips. More information in exception log.","Error retrieving pick slips. More information in exception log."
|
658 |
+
"No shipments available for pick slip retrieval.","No shipments available for pick slip retrieval."
|
659 |
+
"Book Shipment","Process Shipment"
|
660 |
+
"Retrieve Pending Pick Slips","Retrieve Pending Pick Slips"
|
661 |
+
"Book","Process"
|
js/temando/grid.js
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
document.observe("dom:loaded", function() {
|
2 |
-
$$('form[id*=_massaction-form]').invoke('hide');
|
3 |
-
checkboxes = $$('input[name^=massaction]');
|
4 |
-
checkboxes.each(function(checkbox) {
|
5 |
-
checkbox.setAttribute('disabled', 'disabled');
|
6 |
-
checkbox.setAttribute('title', 'Batch booking available in Business Extension');
|
7 |
-
});
|
8 |
-
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/temando/menu.js
CHANGED
@@ -3,7 +3,7 @@ function temandoMenu() {
|
|
3 |
var allSpans = document.getElementsByTagName("span");
|
4 |
Array.prototype.forEach.call(allSpans, function(span) {
|
5 |
|
6 |
-
if (span.textContent === 'Partial Shipments - Business plan' || span.textContent === 'Multi Warehouse -
|
7 |
span.setStyle({backgroundColor: '#E5E5E5'});
|
8 |
span.setStyle({color: '#999999'});
|
9 |
span.up().up().setStyle({
|
3 |
var allSpans = document.getElementsByTagName("span");
|
4 |
Array.prototype.forEach.call(allSpans, function(span) {
|
5 |
|
6 |
+
if (span.textContent === 'Partial Shipments - Business plan' || span.textContent === 'Multi Warehouse - Business plan' || span.textContent === 'Advance Shipping Rules - Business plan') {
|
7 |
span.setStyle({backgroundColor: '#E5E5E5'});
|
8 |
span.setStyle({color: '#999999'});
|
9 |
span.up().up().setStyle({
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Temando_Temando</name>
|
4 |
-
<version>1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software Licence</license>
|
7 |
<channel>community</channel>
|
@@ -27,15 +27,18 @@ The Temando Magento shipping extension is more than just shipping software. Adva
|
|
27 |
• Packaging logic to predict box sizes
|
28 |
</description>
|
29 |
<notes>Temando Shipping Extension – Starter Version
|
30 |
-
• New Feature
|
31 |
-
• New Feature
|
32 |
-
•
|
33 |
-
•
|
|
|
|
|
|
|
34 |
</notes>
|
35 |
<authors><author><name>Temando</name><user>Temando</user><email>marketing@temando.com</email></author></authors>
|
36 |
-
<date>2015-
|
37 |
-
<time>
|
38 |
-
<contents><target name="mageetc"><dir name="modules"><file name="Temando_Temando.xml" hash="5bcf129ec4955186ed97d4b57def464b"/></dir></target><target name="magecommunity"><dir name="Temando"><dir name="Temando"><dir name="Block"><dir name="Adminhtml"><dir name="Manifest"><dir name="Filter"><file name="Form.php" hash="e9efc42fb9f7bdd7bbea32fad8e21ab1"/></dir><dir name="Grid"><dir name="Renderer"><file name="Checkbox.php" hash="dbbf607c8fb511e62872cecb0ada8b88"/></dir></dir><file name="Grid.php" hash="4ea69275d91d98cc52d13e0f99398696"/></dir><file name="Manifest.php" hash="9181440e747ba9540493db3f30d2a37b"/><dir name="Shipment"><dir name="Edit"><file name="Form.php" hash="d4d581256d38e9cd8b9ccf0242d18497"/><dir name="Tab"><file name="Abstract.php" hash="155de5f6e4727d461128291e8bcabe10"/><dir name="Form"><file name="Anytime.php" hash="2d3a4223b61a439bc55312b03eb7f883"/><file name="Anywhere.php" hash="27cffb5864d8999c85081bf3dc6714ce"/><file name="Boxes.php" hash="18b4b6325dc512621022eb912b187b28"/><file name="Insurance.php" hash="cbb8c1e5157b80a5af78efee20e016f7"/><file name="Origin.php" hash="0c6f873b02e70b05ecdb01cb63f470ec"/><file name="Products.php" hash="953cc0fe59529484e47e2c38ad7d3e0a"/><file name="Quotes.php" hash="e1c275fe37b658c1dc6492fdaab53667"/><file name="Status.php" hash="9c44fb52c6f9fd38f49942fa868c69d4"/></dir><file name="Form.php" hash="563c145f09c8b90d50d3b77f727fc7b5"/></dir><file name="Tabs.php" hash="1f65e9864e845110e9f86c80606a2652"/></dir><file name="Edit.php" hash="555e299bcff530908cc9f7b5aa7a03a8"/><file name="Grid.php" hash="325f2f18f40ad632bf81acef9ef8ec14"/></dir><file name="Shipment.php" hash="aa9e8aaeb190b2b473a9fea9c461fd80"/><dir name="System"><dir name="Config"><dir name="Form"><dir name="Button"><file name="Rule.php" hash="3bcd4b7971e825c02d70260e6d2d4b24"/><file name="Update.php" hash="c4bb48c2c6c7da9d31e3e06bdd6150f7"/><file name="Warehouse.php" hash="0669b05bcc25fdfb0570ffa65d7bb9b9"/></dir><dir name="Field"><file name="Insurance.php" hash="cd0f849df18e4643d88e756f9dde071c"/><file name="Required.php" hash="0659fe9b8ef9c4c373a1190d92495e36"/></dir><dir name="Fieldset"><file name="General.php" hash="7395ec95b32b67e34b33e5c0efc806a5"/></dir></dir></dir></dir></dir><dir name="Cart"><file name="Shipping.php" hash="1fbc8d7fab262e6b5cd761143a41f051"/></dir><dir name="Onepage"><dir name="Shipping"><dir name="Method"><dir name="Available"><file name="Single.php" hash="c8c8741458ce6a114111411d8eb4b6db"/></dir><file name="Available.php" hash="1e4764e6fec91175b92b8127e67df91d"/></dir></dir></dir><dir name="Product"><dir name="Shipping"><file name="Methods.php" hash="dd1dabfa05cd2e83668a67cabcfd579f"/></dir><file name="Shipping.php" hash="9af077f289c164ca461a288d4cf2883e"/></dir><dir name="Wizard"><file name="Html.php" hash="9cd02a7e33db9ec002be76f0f2f53dac"/></dir></dir><dir name="Helper"><file name="Data.php" hash="0ac90073c40988991528a7180e1e1dff"/><file name="Functions.php" hash="be974e86582c6235f06fcbbe751d3aa6"/><file name="Wizard.php" hash="e6e9d039d321b7495906ac4233a83b18"/></dir><dir name="Model"><dir name="Api"><file name="Client.php" hash="3b487b56146bf72af9c6d09ad9f3818c"/><dir name="Request"><file name="Anything.php" hash="06d11ae8dea59cbb39f102efb17eb6de"/><file name="Anythings.php" hash="d3fb55824ed60a0e836db74805038fa2"/><file name="Anytime.php" hash="0c06ea38006ecbb72de2956328cba062"/><file name="Anywhere.php" hash="472902806c8c5304983b18c9c3cfbd5f"/></dir><file name="Request.php" hash="43825b6d395d9a5fff760c07eebbb105"/></dir><file name="Box.php" hash="e70430957f55d49f1232d005af69f3b2"/><file name="Carrier.php" hash="50756d3ea67163919a75725527e8426c"/><dir name="Entity"><dir name="Attribute"><dir name="Source"><dir name="Packaging"><file name="Mode.php" hash="9df70852ceade33a14cf218097f25a36"/></dir><file name="Packaging.php" hash="ae6e48d5e498d11a11feed2f00e03fa8"/></dir></dir></dir><file name="Manifest.php" hash="b870f55b33b3855754a5a4347e2acfec"/><dir name="Mysql4"><dir name="Box"><file name="Collection.php" hash="17e5ff275a0aa8b04a64caab93768198"/></dir><file name="Box.php" hash="105acbf44a10b982413168c199514319"/><dir name="Carrier"><file name="Collection.php" hash="174b62be56ac079b36ca9a11a99f6142"/></dir><file name="Carrier.php" hash="39ac233fc0ef641ed457c651fd3c2eeb"/><dir name="Manifest"><file name="Collection.php" hash="0c2a69f2d9d5c2e9111bed3253d823ed"/></dir><file name="Manifest.php" hash="536353cfe126f5d43ae95452104ba448"/><dir name="Quote"><file name="Collection.php" hash="dfcd02a112c7f3abf2c3202bed33538a"/></dir><file name="Quote.php" hash="63becb2e43f8fc6ac06844dc6789b303"/><dir name="Shipment"><file name="Collection.php" hash="c8d2075067d5639a81869e95d44feaf1"/></dir><file name="Shipment.php" hash="a8d05cbed0386249f61af2e73c76230b"/></dir><file name="Observer.php" hash="4243925ee963bc00dc6ae70ad5017a78"/><dir name="Option"><file name="Abstract.php" hash="845fdf3b2fee7a96635a84eb06130e6c"/><dir name="Action"><file name="Abstract.php" hash="8e556a5043c78ba9800a64cbea2743a0"/><file name="Carbon.php" hash="2bf7a9c3905a2c4a9dd88bb9bf602ab4"/><file name="Footprints.php" hash="74ee69751cde833b464d6fad7e8bc7b5"/><file name="Insurance.php" hash="1c312f12a62f57f555007530ad9ed722"/><file name="Markup.php" hash="978738810a3d2ebf9b08105c9080bf10"/></dir><file name="Boolean.php" hash="0c4403b4ab0ec33e4439dfc054025a03"/><file name="Carbonoffset.php" hash="bf4d22d25297028013e79780d3256823"/><file name="Footprints.php" hash="c9b88d2871350f7620440cec4c512fb9"/><file name="Insurance.php" hash="7150dadd9c5c7c7e7c8790171724c846"/></dir><file name="Options.php" hash="c46e411a9090f01704b491d9f6c19886"/><file name="Pcs.php" hash="0ef8c4652aa4ec249798cea5b6ce8a15"/><file name="Quote.php" hash="95fa395a9d7667535e3d3b9fc6e5d15f"/><file name="Shipment.php" hash="8e5041e8816edf35fe9147166afc3aa3"/><dir name="Shipping"><dir name="Carrier"><dir name="Temando"><dir name="Source"><file name="Method.php" hash="bf6d6aca40c0412da85137b0926a13c9"/></dir></dir><file name="Temando.php" hash="5a4260546ca082f74a8fcb8980252b1e"/></dir></dir><file name="Status.php" hash="1748281382c1f2b910d7488925ab3d60"/><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Form"><dir name="Field"><dir name="Required"><file name="Businessresidential.php" hash="6a4a4a22dece6e05986afbff0474e258"/><file name="Country.php" hash="7c15ab9b62776c3939f6680e81e1d994"/><file name="Location.php" hash="96507e0e7ed730c99f4dd5f6aa743016"/><file name="Text.php" hash="3961607ac0d632430b484ef141865806"/></dir></dir></dir></dir><dir name="Source"><file name="Carbon.php" hash="07b6561ce1b560905725171c7958405c"/><dir name="Client"><file name="Type.php" hash="835708cd4be50379608fb01f8dbd4850"/></dir><file name="Country.php" hash="0a2557957d861e4ea3ed193f47eba051"/><file name="Errorprocess.php" hash="cd95e7ea47d642cd0f8a21d41e39366e"/><file name="Footprints.php" hash="385e1dc417b73717f17af956e68c385d"/><file name="Insurance.php" hash="11e73d49bac7cb4e3ca0e602c1c1fda9"/><file name="Labeltype.php" hash="1cb544e144805a7bfc95dc88f90d8b76"/><dir name="Origin"><file name="Type.php" hash="167e76f7b939e3c627b98ee0318ab264"/></dir><file name="Payment.php" hash="d3064a5eb8fea1487a47cb93490da3c3"/><file name="Pricing.php" hash="bb23c6250fd511af49e61692f871db72"/><file name="Readytime.php" hash="dfe95a917cf3d4b5e26c7972e6574bc3"/><file name="Regions.php" hash="d5d46eeba382e53a8ede61aaba4836a4"/><dir name="Rule"><dir name="Action"><dir name="Adjustment"><file name="Type.php" hash="32b0133d904961669456aa2889985ce8"/></dir><file name="Filter.php" hash="60d47b88f85a19445a1f49103906fda1"/></dir><dir name="Condition"><file name="Time.php" hash="075adcdcb0be9662b34c517665e912b7"/><file name="Type.php" hash="0622631836a3306e53a11e6b1e326e6d"/></dir><file name="Type.php" hash="5a2e0cee02f99c3f68536bf26cbea199"/></dir><dir name="Sales"><dir name="Order"><file name="Status.php" hash="39eceb8a78224871b19d5b09304a56be"/></dir></dir><dir name="Shipment"><file name="Class.php" hash="3291adbe6ba99934a2dbcf19f6b83e46"/><dir name="Packaging"><file name="Mode.php" hash="f61cc126ebd4addab8a5b94c7c3a3f6c"/></dir><file name="Packaging.php" hash="be982e5c6abd0ba81fef179fe0a71286"/><file name="Service.php" hash="d12ddd193d2f6f74cb9c1ca0e1729a1f"/><file name="Status.php" hash="e74bb51a02f1357f44d8f0052c682181"/></dir><dir name="Unit"><file name="Measure.php" hash="01bbc3e2f7f688f9edf54f40bb46c686"/><file name="Weight.php" hash="6b74dde04ffdc951aeed3fb1db60599e"/></dir><file name="Unit.php" hash="b8e75f2efede007b004c47acadea6a84"/><file name="Wizard.php" hash="e15c3299e167f77d527a46e34b13639f"/></dir><file name="Source.php" hash="a302b7ecd757be23940dcf82521895b6"/></dir></dir><file name="Wizard.php" hash="f95c6731ffa7731012e7d0d73dd0099e"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="CarrierController.php" hash="a213b7332ed0d987a8e8b34f1543404a"/><file name="JsonController.php" hash="ce01376bdf43f939c802448c880cfd32"/><file name="ManifestController.php" hash="fa62d93cc16d380f0bf1ad3aca758911"/><file name="ShipmentController.php" hash="f856c0c8dc8f4eb8be55239761afd5b4"/><file name="WizardController.php" hash="f16d65423c9b5717c48b06683d16cf4b"/></dir><file name="PcsController.php" hash="4b927ced23c83691dc0db668d0322adf"/><file name="WizardController.php" hash="5e5dac3f10dbdc8a07fb0e18fcf5409a"/></dir><dir name="etc"><file name="adminhtml.xml" hash="b751b086b4c92da219b6f281a80e5dd4"/><file name="config.xml" hash="e3e06cd06cd341b57d52deccc56936ad"/><file name="system.xml" hash="9b4a0e4918ed4765a5e973578b65fe8c"/></dir><dir name="sql"><dir name="temando_setup"><file name="mysql4-install-1.0.0.php" hash="8f22dad6cc2162119422a468b8af9941"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="temando.xml" hash="237fb894c1c1c043252b09169bb3b112"/></dir><dir name="template"><dir name="temando"><dir name="temando"><file name="manifest.phtml" hash="d835ced7bd903e5d42d2b49a5537f531"/><file name="menu.phtml" hash="bc78fd42ac729ba19b4219018c052e21"/><file name="origin-avs.phtml" hash="2da4326466b0c2f581c6ecd4ffdf84a8"/><file name="region.phtml" hash="f2e8cbfbc57ef74a6b29925574de5cb1"/><dir name="shipment"><file name="anytime.phtml" hash="c4fcc5734b8740361df38f269231d606"/><file name="anywhere.phtml" hash="44298e9c66554ccbb5a04208e837146a"/><file name="boxes.phtml" hash="17f7c6a64d3c04b9787b5153abe7b11c"/><file name="insurance.phtml" hash="f3879be513ccc3e187d77156456b8033"/><file name="origin.phtml" hash="c53de035c9508d81c078501edcb70ef2"/><file name="products.phtml" hash="50a8ea7f8c1a26957222b031c19574ad"/><file name="quotes.phtml" hash="f7269534550b5b316da2e77ca23db5cc"/><file name="status.phtml" hash="3d54c1e6fd9f141fcf656e7e1d6faa98"/></dir><file name="shipment.phtml" hash="1241671844d42046b21240a2c38bb11d"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="temando.xml" hash="f73f25cfa4ecd30dc33318924737f9f3"/></dir><dir name="template"><dir name="temando"><dir name="temando"><dir name="checkout"><dir name="cart"><file name="shipping.phtml" hash="dd0e55e2e3f5874fc5555712b236074a"/></dir></dir><dir name="customer"><dir name="address"><file name="edit.phtml" hash="eff5b6cb90507e045b8ee51dae663052"/></dir></dir><dir name="onestep"><file name="options.phtml" hash="98531ee392e6978bf89dddcc3455937c"/><file name="shipping_method.phtml" hash="99c92bbdc269c1725762de538d43bc4c"/></dir><file name="pcs.phtml" hash="b7e3f5628f846afe259380be460a8d0b"/><dir name="product"><dir name="shipping"><file name="methods.phtml" hash="36c3f21e81bcd80c2406fffb6e72025c"/></dir><file name="shipping.phtml" hash="d639fe215ebb11d446477fcbece6a643"/></dir><dir name="shipping_method"><dir name="available"><file name="options_single.phtml" hash="72416b76aa5da5213a59dd8cc5b3dc0e"/></dir><file name="available.phtml" hash="98ec0f1e1293b62d2d14e7ef48e3947c"/></dir><dir name="wizard"><file name="account.phtml" hash="72f40a25e1f4d3919ac359d70ed0ea20"/><file name="carriers.phtml" hash="50f59b8dc44524555bc70f1ed4713a7c"/><file name="catalog_product.phtml" hash="db9530c3756488f0052f1fe6ab76d1bb"/><file name="countries.phtml" hash="f2bb5321ec71f85f34e64adb70f714b9"/><file name="end.phtml" hash="0e15bfc374029c9c088d423a313fd405"/><file name="left.phtml" hash="415f16cc0434db85e8b5b19aaa2bf087"/><file name="origin.phtml" hash="a97ef2c7fe6ecf034c5649ea9c46492b"/><file name="rule.phtml" hash="bea3961cb3feacab76623ca4df95a4b4"/></dir><file name="wizard.phtml" hash="c7f8d13602b5b68374290b62a04ce97d"/></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="temando"><file name="autocomplete.js" hash="401e3126c3421cafeaadf67613b40d51"/><file name="avs.js" hash="18b7b8a01b945767842a25dbf4e21acd"/><file name="grid.js" hash="5c35e0afdf1988d3ea2770a00ac5999e"/><file name="menu.js" hash="c6b9d402e0de287d2f92086c897a71c8"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="js"><file name="temando.js" hash="dd7f5c8137271c814a0a25d1db951879"/></dir><dir name="temando"><dir name="images"><file name="ajax-s-load.gif" hash="0ea8ba3fe3e60b73eda7d6de57fd8e01"/><file name="bg_notifications.gif" hash="d2a0489d0c3714bed22f9b06f4b81d43"/><file name="shadow.png" hash="b5b27e0dd88d44d4a5d8e63bb61a1239"/><file name="temando_logo.jpg" hash="04d2dbd664ff68a4be7364113f30572f"/></dir><file name="styles.css" hash="2d9c985c31622016db01e966974d70be"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="temando"><file name="autocomplete.css" hash="90387e5610631653a4bd97c7af3d444e"/><dir name="images"><file name="ajax-s-load.gif" hash="0ea8ba3fe3e60b73eda7d6de57fd8e01"/><file name="find_ext.png" hash="a6ba701a9256a2c775255965df1918c7"/><file name="i_shipping.gif" hash="91a0d2cc2eb2391f90ec8a75c04b3183"/><file name="shadow.png" hash="b5b27e0dd88d44d4a5d8e63bb61a1239"/></dir><file name="product.css" hash="d1679e756012f66391758a09d0918986"/><file name="styles.css" hash="990cb30792de7e9b46042a7d09be73d3"/></dir></dir><dir name="js"><dir name="temando"><file name="checkout.js" hash="36104cf24ce430cec568131597409bb2"/><file name="product.js" hash="989198862c7674f23adbed4d3bfa3de5"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Temando_Temando.csv" hash="6d103ef94de44563bd775e8a2dde9804"/></dir></target></contents>
|
39 |
<compatible/>
|
40 |
<dependencies><required><php><min>5.2.13</min><max>6.0.0</max></php><extension><name>soap</name><min>1.2</min><max/></extension></required></dependencies>
|
41 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Temando_Temando</name>
|
4 |
+
<version>1.4.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software Licence</license>
|
7 |
<channel>community</channel>
|
27 |
• Packaging logic to predict box sizes
|
28 |
</description>
|
29 |
<notes>Temando Shipping Extension – Starter Version
|
30 |
+
• New Feature - Addition of editable shipping method title
|
31 |
+
• New Feature - Addition of destination type selection in the cart & checkout
|
32 |
+
• New Feature - Addition of retrieve manifest 
|
33 |
+
• New Feature - Addition of dangerous good product attribute
|
34 |
+
• New Feature - Delivery Options on checkout
|
35 |
+
• Feature Update: Sorting of the carrier list by name
|
36 |
+
• Bug Fix: Fix for getTrackingInfo if no tracking history is available 
|
37 |
</notes>
|
38 |
<authors><author><name>Temando</name><user>Temando</user><email>marketing@temando.com</email></author></authors>
|
39 |
+
<date>2015-07-03</date>
|
40 |
+
<time>02:36:17</time>
|
41 |
+
<contents><target name="mageetc"><dir name="modules"><file name="Temando_Temando.xml" hash="5bcf129ec4955186ed97d4b57def464b"/></dir></target><target name="magecommunity"><dir name="Temando"><dir name="Temando"><dir name="Block"><dir name="Adminhtml"><dir name="Manifest"><dir name="Filter"><file name="Form.php" hash="b50d9538dc14b713e05e81b106d01e8d"/></dir><dir name="Grid"><dir name="Renderer"><file name="Checkbox.php" hash="aea0559a83dcf57cd3746700e0b154bc"/></dir></dir><file name="Grid.php" hash="883505cf6119ddd650023b103a6f5dd0"/></dir><file name="Manifest.php" hash="54fadcde4fc1eef4bfc3342fd753aa1b"/><dir name="Shipment"><dir name="Edit"><file name="Form.php" hash="f463cfd5a68fbcbbc39b411fd68c6658"/><dir name="Tab"><file name="Abstract.php" hash="40098655ffda3b1889af1c5776c72243"/><dir name="Form"><file name="Anytime.php" hash="356009570dc97be1405c1f7bde1055cf"/><file name="Anywhere.php" hash="cc6f0e2994f71a605dbd971ba280477b"/><file name="Boxes.php" hash="2814eb94147bdc8e6ceef3b56a5842f5"/><file name="Insurance.php" hash="0756ddbb577ff982e5cc048232d6cf0a"/><file name="Origin.php" hash="9b9fcbb04ce032f613e9f6cb8aad42de"/><file name="Products.php" hash="87e3bc8154bb6709185ee9c916d0c930"/><file name="Quotes.php" hash="1010634b24617ed25f5ddf1328d1f5f2"/><file name="Status.php" hash="c0781098106ac38b9aa3e9b2d07bbc48"/></dir><file name="Form.php" hash="bb67f340fdbb39634a3f018fa9955d87"/></dir><file name="Tabs.php" hash="aca2cc202217011258d18386fd07e1d0"/></dir><file name="Edit.php" hash="15a363348caf71ac5df906ec521ed172"/><file name="Grid.php" hash="f19927970dfad99e0a74d03950b68627"/></dir><file name="Shipment.php" hash="cdd48f2b3a19502bd6497ed9684a88be"/><dir name="System"><dir name="Config"><dir name="Form"><dir name="Button"><file name="Rule.php" hash="480867b8f34def26ce2674d4e1453e29"/><file name="Update.php" hash="337722ca578208b389b358b25abef90a"/><file name="Warehouse.php" hash="7b97f8cb48d60c9ff5f92c57f164a72f"/></dir><dir name="Field"><file name="Insurance.php" hash="023112e260cd46ae7754905573a0e367"/><file name="Required.php" hash="ec11ae46b3eeb3ea26c6939279d1b6e9"/></dir><dir name="Fieldset"><file name="General.php" hash="ea8cbf0459c07fc05016354a5d6241c9"/></dir></dir></dir></dir></dir><dir name="Cart"><file name="Shipping.php" hash="9e14409aeabaa093c58e74e3157f4213"/></dir><dir name="Onepage"><dir name="Shipping"><dir name="Delivery"><file name="Options.php" hash="70542d028386dae168367f49e0ddf640"/></dir><dir name="Method"><dir name="Available"><file name="Single.php" hash="de8cdd692a3e5e3ca69e692c42b9f04f"/></dir><file name="Available.php" hash="bcadbfa218104266209452b860375f4f"/></dir></dir></dir><dir name="Product"><dir name="Shipping"><file name="Methods.php" hash="783981474bafb42e55b4f0d7a32d9c7a"/></dir><file name="Shipping.php" hash="e565c0fdc0463b7f0911d38e16a53869"/></dir><dir name="Wizard"><file name="Html.php" hash="47bf2dc61bdd8f0ef67f239c7d762f7b"/></dir></dir><dir name="Helper"><file name="Data.php" hash="416763e81599edea5e90b007640368f6"/><file name="Functions.php" hash="c38f2b99d9dedc090ecb27456519f30a"/><file name="Wizard.php" hash="087b24ad159480f93f12a66d867a76cf"/></dir><dir name="Model"><dir name="Api"><file name="Client.php" hash="c42494d74bad73eab7d6227ccbc87447"/><dir name="Request"><file name="Anything.php" hash="2c131340da62725650c3e030524e2366"/><file name="Anythings.php" hash="54f0e75a03012f593f10849f1e055025"/><file name="Anytime.php" hash="887460ca033594de365b272802c4b059"/><file name="Anywhere.php" hash="e62fcfd8158a030b9acf5e2495662e85"/></dir><file name="Request.php" hash="e0c7ef938d1779f150671255592375a0"/></dir><file name="Box.php" hash="e4ddd66d649d493b6ad594499fb57c71"/><file name="Carrier.php" hash="8bf261a034342beefc1f043e8abf2f28"/><dir name="Checkout"><dir name="Delivery"><file name="Options.php" hash="dc384fcc84d9616ff6898a33280fb792"/></dir></dir><dir name="Entity"><dir name="Attribute"><dir name="Source"><dir name="Packaging"><file name="Mode.php" hash="aa511a6ea13320cec67902be65e4896a"/></dir><file name="Packaging.php" hash="51fab970661c20939397401ee92e0f58"/></dir></dir></dir><file name="Manifest.php" hash="e9a2eecb24647dd51209e6022d92dc97"/><dir name="Mysql4"><dir name="Box"><file name="Collection.php" hash="f2e414a79ed7b3b3e43a486030efb559"/></dir><file name="Box.php" hash="872126d53b4716b3efd6a9cec4c04272"/><dir name="Carrier"><file name="Collection.php" hash="4731b77ae10423967476d5e368a75f80"/></dir><file name="Carrier.php" hash="cd62eda71a2c6c07081aa187b0c35c2f"/><dir name="Manifest"><file name="Collection.php" hash="899f782ab34d6c008972296f59c9cde6"/></dir><file name="Manifest.php" hash="e5e474e5074d4f7b5405f7002add1602"/><dir name="Quote"><file name="Collection.php" hash="90fecb1146d26107773571eab8a3bb6b"/></dir><file name="Quote.php" hash="ca1c40896cdf2e91f1a4e40bd48e0158"/><dir name="Shipment"><file name="Collection.php" hash="bd6034947f6c67b1cc80936138890dfc"/></dir><file name="Shipment.php" hash="1b647da4d0a63b6a0a4e0eb7edac6a06"/></dir><file name="Observer.php" hash="d8657be32220dae140999112db280963"/><dir name="Option"><file name="Abstract.php" hash="eaba5ae86cba4a8232b5e64d4ff98e38"/><dir name="Action"><file name="Abstract.php" hash="8635b58b91e772f78effa3e15e95650f"/><file name="Carbon.php" hash="0df49140f10610b7bb4a23d48cbf51ec"/><file name="Footprints.php" hash="500bbb332a64729415bcb2a6a193abd6"/><file name="Insurance.php" hash="d1e70eac253aa071d9c1ef7a2943c8f5"/><file name="Markup.php" hash="6091ad03e12aeaf13561883d16f1c63d"/></dir><file name="Boolean.php" hash="fef69fd21c5de9f135342428e13e69d7"/><file name="Carbonoffset.php" hash="17c91c83e93c364a01eb63a72e0c9a74"/><file name="Footprints.php" hash="b57c2de2cc392fb48f76d61b99ad4c59"/><file name="Insurance.php" hash="74f421a73ed6363ce720f5af3c20ee5d"/></dir><file name="Options.php" hash="4834b4b722c5ba1eaee6c50651395659"/><file name="Pcs.php" hash="f0a03601d765f6772abc74f7e94c7ce0"/><file name="Quote.php" hash="72b6743ac693b4074cf904de3c928b95"/><file name="Shipment.php" hash="6b57bd421ac95f249db09feaca8c7f79"/><dir name="Shipping"><dir name="Carrier"><dir name="Temando"><dir name="Source"><file name="Method.php" hash="c3e22169434a20d6acbf93e5757714fd"/></dir></dir><file name="Temando.php" hash="7c7fbed312dd495cd1070f165e00b743"/></dir></dir><file name="Status.php" hash="6a9d2783a09b28eccbee278cf487d77f"/><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Form"><dir name="Field"><dir name="Required"><file name="Businessresidential.php" hash="e910070a9cf896e63e50dcc20135d9b4"/><file name="Country.php" hash="281aa176fa9c8deead10427d68f89fc8"/><file name="Location.php" hash="a6176f8aa745e45983ecafe54a5c62cc"/><file name="Text.php" hash="9a27ecf932ad86fdcbe6b9338a0ad766"/></dir></dir></dir></dir><dir name="Source"><file name="Carbon.php" hash="f7fdf1cb68cd462cc24dc79f3e9e937c"/><dir name="Client"><file name="Type.php" hash="8c7bc6cfc61db303d6521dcbfccca586"/></dir><file name="Country.php" hash="9f78a067c6a5bfb1f09cbe13e2a8f783"/><file name="Errorprocess.php" hash="de73413369a2d2576e9beceddcb67de9"/><file name="Footprints.php" hash="93581fe36831c12cde3aa9c921182ee5"/><file name="Insurance.php" hash="e4e86feec2d63927751eeef1f79639cf"/><file name="Labeltype.php" hash="84a96263fe91c34e949163e644e213bb"/><dir name="Origin"><file name="Type.php" hash="ef152aed2dca36860b78263c2488d418"/></dir><file name="Payment.php" hash="b7596b3675425b9b990567bfad88a019"/><file name="Pricing.php" hash="f0a2ca789be1a988631e5bbad24b07a9"/><file name="Readytime.php" hash="6840fffc73e10104977e54d512b4584a"/><file name="Regions.php" hash="9c85df73d0fa9c3e5e40428a5168134f"/><dir name="Rule"><dir name="Action"><dir name="Adjustment"><file name="Type.php" hash="d9db67d7452d9b6a89d84dbe41505d9b"/></dir><file name="Filter.php" hash="f2ddffbdc87a58c57a91d4822261f32b"/></dir><dir name="Condition"><file name="Time.php" hash="fecf942aed7ee0bd2e1acf2303b71ce3"/><file name="Type.php" hash="958e1516c33888917a945a444a8f79ba"/></dir><file name="Type.php" hash="69e2510c398c18c4851458b835c685f2"/></dir><dir name="Sales"><dir name="Order"><file name="Status.php" hash="ed15d292094826482ad4e8882794702d"/></dir></dir><dir name="Shipment"><file name="Class.php" hash="973bb5839634b28124213272a7b5dbb9"/><dir name="Packaging"><file name="Mode.php" hash="b4e1ca265e860c7b144579f128d28a5c"/></dir><file name="Packaging.php" hash="9cf1e7eda9275fe8c96ec4882918e02e"/><file name="Service.php" hash="0e4e5bf85eb70a26d25c0fbec1519926"/><file name="Status.php" hash="344d11d97aab4c1f977b9193a10ee105"/></dir><dir name="Unit"><file name="Measure.php" hash="d5a66b68d43dabd2475e9509608b3278"/><file name="Weight.php" hash="33507ff6d892989c2949de63922a247d"/></dir><file name="Unit.php" hash="0c8b786b4012a535339a39f4f86ec669"/><file name="Wizard.php" hash="fd1f7d1dea8e807f8cc9ecfe2c2dc830"/></dir><file name="Source.php" hash="c1e2741547a1a81d0926fdc0db710de4"/></dir></dir><file name="Wizard.php" hash="178e3a566708da82a1e408a1a0f4878b"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="CarrierController.php" hash="465e529e536ccc4bacbe96063960ed96"/><file name="JsonController.php" hash="3a9990307dcf5b001c18fc6c40182f29"/><file name="ManifestController.php" hash="4741045a13b33ae5678032b6aaf55b85"/><file name="ShipmentController.php" hash="dbb425502926bc5ae02731d3c01d7ae5"/><file name="WizardController.php" hash="a074a15166c4d6228a4583ec6cc5f52e"/></dir><file name="PcsController.php" hash="96561d4ae3f9bb44f1ffef779a6dce4c"/><file name="WizardController.php" hash="db44aa485493fab61b509f6e8fae3560"/></dir><dir name="etc"><file name="adminhtml.xml" hash="c780097d8cc5f57af5c63361f984cc53"/><file name="config.xml" hash="691716c4fcb64ead480a17556f3e4fa7"/><file name="system.xml" hash="754c7128e8ef862fe3ad171eaa091474"/></dir><dir name="sql"><dir name="temando_setup"><file name="mysql4-install-1.0.0.php" hash="8f22dad6cc2162119422a468b8af9941"/><file name="mysql4-upgrade-1.3.8-1.3.9.php" hash="6196267c6a1fe09161659e11505c9815"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="temando.xml" hash="237fb894c1c1c043252b09169bb3b112"/></dir><dir name="template"><dir name="temando"><dir name="temando"><file name="manifest.phtml" hash="8f16e0754f30696597318aa83055e8e6"/><file name="menu.phtml" hash="bc78fd42ac729ba19b4219018c052e21"/><file name="origin-avs.phtml" hash="2da4326466b0c2f581c6ecd4ffdf84a8"/><file name="region.phtml" hash="f2e8cbfbc57ef74a6b29925574de5cb1"/><dir name="shipment"><file name="anytime.phtml" hash="c4fcc5734b8740361df38f269231d606"/><file name="anywhere.phtml" hash="fcd32d682c06b12daddbc67405f3cf02"/><file name="boxes.phtml" hash="d2a8758ab1f7ff600b3eee0b4785552d"/><file name="insurance.phtml" hash="f3879be513ccc3e187d77156456b8033"/><file name="origin.phtml" hash="c53de035c9508d81c078501edcb70ef2"/><file name="products.phtml" hash="50a8ea7f8c1a26957222b031c19574ad"/><file name="quotes.phtml" hash="f7269534550b5b316da2e77ca23db5cc"/><file name="status.phtml" hash="3d54c1e6fd9f141fcf656e7e1d6faa98"/></dir><file name="shipment.phtml" hash="1241671844d42046b21240a2c38bb11d"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="temando.xml" hash="a73e4d56a1aac7198c0362a15822b937"/></dir><dir name="template"><dir name="temando"><dir name="temando"><dir name="checkout"><dir name="cart"><file name="shipping.phtml" hash="d501bc1ece10de7a9a3dccde68757dbf"/></dir><dir name="onepage"><dir name="delivery"><file name="options.phtml" hash="ad38b14142150612a0983849ed4238e9"/></dir></dir></dir><dir name="customer"><dir name="address"><file name="edit.phtml" hash="eff5b6cb90507e045b8ee51dae663052"/></dir></dir><dir name="onestep"><file name="options.phtml" hash="98531ee392e6978bf89dddcc3455937c"/><file name="shipping_method.phtml" hash="99c92bbdc269c1725762de538d43bc4c"/></dir><file name="pcs.phtml" hash="b7e3f5628f846afe259380be460a8d0b"/><dir name="product"><dir name="shipping"><file name="methods.phtml" hash="36c3f21e81bcd80c2406fffb6e72025c"/></dir><file name="shipping.phtml" hash="d639fe215ebb11d446477fcbece6a643"/></dir><dir name="shipping_method"><dir name="available"><file name="options_single.phtml" hash="72416b76aa5da5213a59dd8cc5b3dc0e"/></dir><file name="available.phtml" hash="9b35684046cb14d660a59697414a9197"/></dir><dir name="wizard"><file name="account.phtml" hash="72f40a25e1f4d3919ac359d70ed0ea20"/><file name="carriers.phtml" hash="50f59b8dc44524555bc70f1ed4713a7c"/><file name="catalog_product.phtml" hash="db9530c3756488f0052f1fe6ab76d1bb"/><file name="countries.phtml" hash="f2bb5321ec71f85f34e64adb70f714b9"/><file name="end.phtml" hash="0e15bfc374029c9c088d423a313fd405"/><file name="left.phtml" hash="415f16cc0434db85e8b5b19aaa2bf087"/><file name="origin.phtml" hash="a97ef2c7fe6ecf034c5649ea9c46492b"/><file name="rule.phtml" hash="bea3961cb3feacab76623ca4df95a4b4"/></dir><file name="wizard.phtml" hash="c7f8d13602b5b68374290b62a04ce97d"/></dir></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="temando"><file name="autocomplete.js" hash="401e3126c3421cafeaadf67613b40d51"/><file name="avs.js" hash="18b7b8a01b945767842a25dbf4e21acd"/><file name="menu.js" hash="61c1ee9d0c9aec2161e85cc926d44c11"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="js"><file name="temando.js" hash="dd7f5c8137271c814a0a25d1db951879"/></dir><dir name="temando"><dir name="images"><file name="ajax-s-load.gif" hash="0ea8ba3fe3e60b73eda7d6de57fd8e01"/><file name="bg_notifications.gif" hash="d2a0489d0c3714bed22f9b06f4b81d43"/><file name="shadow.png" hash="b5b27e0dd88d44d4a5d8e63bb61a1239"/><file name="temando_logo.jpg" hash="04d2dbd664ff68a4be7364113f30572f"/></dir><file name="styles.css" hash="2d9c985c31622016db01e966974d70be"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="temando"><file name="autocomplete.css" hash="90387e5610631653a4bd97c7af3d444e"/><file name="cart.css" hash="f4456c3fe147244a12a7b68d7f4d0bc7"/><dir name="images"><file name="ajax-s-load.gif" hash="0ea8ba3fe3e60b73eda7d6de57fd8e01"/><file name="find_ext.png" hash="a6ba701a9256a2c775255965df1918c7"/><file name="i_shipping.gif" hash="91a0d2cc2eb2391f90ec8a75c04b3183"/><file name="shadow.png" hash="b5b27e0dd88d44d4a5d8e63bb61a1239"/></dir><file name="product.css" hash="d1679e756012f66391758a09d0918986"/><file name="styles.css" hash="271bd9dd967c0eb83c6e10e9bfdee952"/></dir></dir><dir name="js"><dir name="temando"><file name="checkout.js" hash="5425f09ae3da50b0ac49e768b8b607d0"/><file name="product.js" hash="989198862c7674f23adbed4d3bfa3de5"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="Temando_Temando.csv" hash="a12b7b049f65fdcd451e6be7b50b6133"/></dir></target></contents>
|
42 |
<compatible/>
|
43 |
<dependencies><required><php><min>5.2.13</min><max>6.0.0</max></php><extension><name>soap</name><min>1.2</min><max/></extension></required></dependencies>
|
44 |
</package>
|
skin/frontend/base/default/css/temando/cart.css
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/* Cart page */
|
2 |
+
|
3 |
+
.checkout-cart-index #postcode {
|
4 |
+
width: 365px !important;
|
5 |
+
max-width: 100% !important;
|
6 |
+
}
|
7 |
+
|
8 |
+
.destination-type li {
|
9 |
+
margin-top: 0px !important;
|
10 |
+
margin-bottom: 0px !important;
|
11 |
+
}
|
12 |
+
|
13 |
+
.destination-type label {
|
14 |
+
margin-top: 3px !important;
|
15 |
+
}
|
16 |
+
|
17 |
+
.destination-type input {
|
18 |
+
height: 20px !important;
|
19 |
+
}
|
skin/frontend/base/default/css/temando/styles.css
CHANGED
@@ -19,13 +19,51 @@ table.insurance td label {
|
|
19 |
color: #F18200;
|
20 |
}
|
21 |
|
22 |
-
div.customer-instructions, div.customer-comment {
|
23 |
background: none repeat scroll 0 0 #F9F3E3;
|
24 |
border: 1px solid #BBAFA0;
|
25 |
margin: 10px;
|
26 |
padding: 15px;
|
27 |
width: 92%;
|
28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
.note {
|
31 |
float: right;
|
19 |
color: #F18200;
|
20 |
}
|
21 |
|
22 |
+
div.customer-instructions, div.customer-comment, div.destination-type {
|
23 |
background: none repeat scroll 0 0 #F9F3E3;
|
24 |
border: 1px solid #BBAFA0;
|
25 |
margin: 10px;
|
26 |
padding: 15px;
|
27 |
width: 92%;
|
28 |
}
|
29 |
+
table.delivery-options-table {
|
30 |
+
background: none repeat scroll 0 0 #F9F3E3;
|
31 |
+
border: 1px solid #BBAFA0;
|
32 |
+
margin: 10px;
|
33 |
+
padding: 15px;
|
34 |
+
width: 97%;
|
35 |
+
}
|
36 |
+
|
37 |
+
table.delivery-options-table th, table.delivery-options-table-onestep th {
|
38 |
+
font-weight: bold;
|
39 |
+
color: #F18200;
|
40 |
+
}
|
41 |
+
table.delivery-options-table td, table.delivery-options-table-onestep td {
|
42 |
+
border-right: none;
|
43 |
+
width: auto;
|
44 |
+
}
|
45 |
+
|
46 |
+
div.customer-instructions-onestep, div.deliverby-onestep, div.customer-comment-onestep, div.destination-type-onestep {
|
47 |
+
background: none repeat scroll 0 0 #F9F3E3;
|
48 |
+
border: 1px solid #BBAFA0;
|
49 |
+
margin: 5px 0;
|
50 |
+
padding: 14px;
|
51 |
+
width: 90%;
|
52 |
+
}
|
53 |
+
|
54 |
+
table.delivery-options-table-onestep {
|
55 |
+
background: none repeat scroll 0 0 #F9F3E3;
|
56 |
+
border: 1px solid #BBAFA0;
|
57 |
+
margin: 5px 0;
|
58 |
+
padding: 14px;
|
59 |
+
width: 100%;
|
60 |
+
}
|
61 |
+
|
62 |
+
span.destination-type-header {
|
63 |
+
font-weight: bold;
|
64 |
+
color: #F18200;
|
65 |
+
display: block;
|
66 |
+
}
|
67 |
|
68 |
.note {
|
69 |
float: right;
|
skin/frontend/base/default/js/temando/checkout.js
CHANGED
@@ -1,17 +1,17 @@
|
|
1 |
function option_update(sole)
|
2 |
{
|
3 |
if (sole) return;
|
4 |
-
|
5 |
// build class
|
6 |
classes = '';
|
7 |
-
|
8 |
checkboxes = $$('#temando_checkboxes input[type=checkbox]');
|
9 |
checkboxes.each(function (checkbox) {
|
10 |
if (checkbox.id.indexOf('temando_checkbox_') === 0) {
|
11 |
classes += '.' + checkbox.id.replace(/temando_checkbox_/, '') + '_' + (checkbox.checked ? 'Y' : 'N');
|
12 |
}
|
13 |
});
|
14 |
-
|
15 |
// hide all
|
16 |
$$('input[name^=shipping_method]').each(function (control) {
|
17 |
if(control.id.match(/^s_method_temando_(\d+)/) && !control.id.match(/^s_method_temando_(free|flat)/)) {
|
@@ -19,7 +19,7 @@ function option_update(sole)
|
|
19 |
control.checked = false;
|
20 |
}
|
21 |
});
|
22 |
-
|
23 |
// show those matching the classes
|
24 |
$$(classes).each(function (control) {
|
25 |
control.up().show();
|
@@ -30,14 +30,14 @@ function option_update_onestep()
|
|
30 |
{
|
31 |
// build class
|
32 |
classes = '';
|
33 |
-
|
34 |
checkboxes = $$('#temando_checkboxes input[type=checkbox]');
|
35 |
checkboxes.each(function (checkbox) {
|
36 |
if (checkbox.id.indexOf('temando_checkbox_') === 0) {
|
37 |
classes += '.' + checkbox.id.replace(/temando_checkbox_/, '') + '_' + (checkbox.checked ? 'Y' : 'N');
|
38 |
}
|
39 |
});
|
40 |
-
|
41 |
// hide all
|
42 |
$$('input[name^=shipping_method]').each(function (control) {
|
43 |
if(control.id.match(/^s_method_temando_(\d+)/) && !control.id.match(/^s_method_temando_(free|flat)/)) {
|
@@ -45,12 +45,12 @@ function option_update_onestep()
|
|
45 |
control.checked = false;
|
46 |
}
|
47 |
});
|
48 |
-
|
49 |
// show those matching the classes
|
50 |
$$(classes).each(function (control) {
|
51 |
control.up().show();
|
52 |
});
|
53 |
-
|
54 |
//preselect shipping method if single
|
55 |
var visible = $$('input[name^=shipping_method]').findAll(function(el) { return el.offsetWidth > 0 && el.offsetHeight > 0; });
|
56 |
if(visible.size() == 1) {
|
@@ -61,6 +61,19 @@ function option_update_onestep()
|
|
61 |
}
|
62 |
}
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
function includingShipping(getShippingCode) {
|
65 |
if ((typeof(shippingMe) !== 'undefined') && (shippingMe != null) && shippingMe && shippingMe.length) {
|
66 |
var newPrice = shippingMe[getShippingCode];
|
@@ -84,7 +97,7 @@ function includingShipping(getShippingCode) {
|
|
84 |
return false;
|
85 |
}
|
86 |
|
87 |
-
function refreshQuotes() {
|
88 |
//get checked options
|
89 |
var delivery_options = $$('input[id^=delivery_option_]');
|
90 |
var params = Form.serializeElements(delivery_options);
|
@@ -95,9 +108,15 @@ function refreshQuotes() {
|
|
95 |
if (validator.validate()) {
|
96 |
checkout.setLoadWaiting('shipping-method');
|
97 |
delivery_options.each(function(control) {
|
98 |
-
control.disabled = true;
|
99 |
});
|
100 |
params += params.length ? '&' + Form.serialize(shipping.form) : Form.serialize(shipping.form);
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
var request = new Ajax.Request(
|
102 |
shipping.saveUrl,
|
103 |
{
|
@@ -108,7 +127,7 @@ function refreshQuotes() {
|
|
108 |
parameters: params
|
109 |
}
|
110 |
);
|
111 |
-
|
112 |
}
|
113 |
}
|
114 |
|
1 |
function option_update(sole)
|
2 |
{
|
3 |
if (sole) return;
|
4 |
+
|
5 |
// build class
|
6 |
classes = '';
|
7 |
+
|
8 |
checkboxes = $$('#temando_checkboxes input[type=checkbox]');
|
9 |
checkboxes.each(function (checkbox) {
|
10 |
if (checkbox.id.indexOf('temando_checkbox_') === 0) {
|
11 |
classes += '.' + checkbox.id.replace(/temando_checkbox_/, '') + '_' + (checkbox.checked ? 'Y' : 'N');
|
12 |
}
|
13 |
});
|
14 |
+
|
15 |
// hide all
|
16 |
$$('input[name^=shipping_method]').each(function (control) {
|
17 |
if(control.id.match(/^s_method_temando_(\d+)/) && !control.id.match(/^s_method_temando_(free|flat)/)) {
|
19 |
control.checked = false;
|
20 |
}
|
21 |
});
|
22 |
+
|
23 |
// show those matching the classes
|
24 |
$$(classes).each(function (control) {
|
25 |
control.up().show();
|
30 |
{
|
31 |
// build class
|
32 |
classes = '';
|
33 |
+
|
34 |
checkboxes = $$('#temando_checkboxes input[type=checkbox]');
|
35 |
checkboxes.each(function (checkbox) {
|
36 |
if (checkbox.id.indexOf('temando_checkbox_') === 0) {
|
37 |
classes += '.' + checkbox.id.replace(/temando_checkbox_/, '') + '_' + (checkbox.checked ? 'Y' : 'N');
|
38 |
}
|
39 |
});
|
40 |
+
|
41 |
// hide all
|
42 |
$$('input[name^=shipping_method]').each(function (control) {
|
43 |
if(control.id.match(/^s_method_temando_(\d+)/) && !control.id.match(/^s_method_temando_(free|flat)/)) {
|
45 |
control.checked = false;
|
46 |
}
|
47 |
});
|
48 |
+
|
49 |
// show those matching the classes
|
50 |
$$(classes).each(function (control) {
|
51 |
control.up().show();
|
52 |
});
|
53 |
+
|
54 |
//preselect shipping method if single
|
55 |
var visible = $$('input[name^=shipping_method]').findAll(function(el) { return el.offsetWidth > 0 && el.offsetHeight > 0; });
|
56 |
if(visible.size() == 1) {
|
61 |
}
|
62 |
}
|
63 |
|
64 |
+
function delivery_type_update(destType)
|
65 |
+
{
|
66 |
+
if (destType == 'residence') {
|
67 |
+
$$('.business').each(function(el) {
|
68 |
+
el.up().up().hide();
|
69 |
+
});
|
70 |
+
} else {
|
71 |
+
$$('.business').each(function(el) {
|
72 |
+
el.up().up().show();
|
73 |
+
});
|
74 |
+
}
|
75 |
+
}
|
76 |
+
|
77 |
function includingShipping(getShippingCode) {
|
78 |
if ((typeof(shippingMe) !== 'undefined') && (shippingMe != null) && shippingMe && shippingMe.length) {
|
79 |
var newPrice = shippingMe[getShippingCode];
|
97 |
return false;
|
98 |
}
|
99 |
|
100 |
+
function refreshQuotes(delivery_option_change) {
|
101 |
//get checked options
|
102 |
var delivery_options = $$('input[id^=delivery_option_]');
|
103 |
var params = Form.serializeElements(delivery_options);
|
108 |
if (validator.validate()) {
|
109 |
checkout.setLoadWaiting('shipping-method');
|
110 |
delivery_options.each(function(control) {
|
111 |
+
control.disabled = true;
|
112 |
});
|
113 |
params += params.length ? '&' + Form.serialize(shipping.form) : Form.serialize(shipping.form);
|
114 |
+
params += params.length ? '&delivery_option_change='+delivery_option_change : 'delivery_option_change='+delivery_option_change;
|
115 |
+
var destType = 'residence';
|
116 |
+
$$('input[name=destination-type]').each(function (control) {
|
117 |
+
if (control.checked) { destType = control.value; }
|
118 |
+
});
|
119 |
+
params += '&destination_type=' + destType;
|
120 |
var request = new Ajax.Request(
|
121 |
shipping.saveUrl,
|
122 |
{
|
127 |
parameters: params
|
128 |
}
|
129 |
);
|
130 |
+
|
131 |
}
|
132 |
}
|
133 |
|