Version Notes
Fixed error/issues
Download this release
Release Info
Developer | Joshua Oliver |
Extension | Transdirect_Shipping |
Version | 1.1.4 |
Comparing to | |
See all releases |
Code changes from version 1.1.3 to 1.1.4
- app/code/local/Transdirect/.DS_Store +0 -0
- app/code/local/Transdirect/Ship/.DS_Store +0 -0
- app/code/local/Transdirect/Ship/Block/.DS_Store +0 -0
- app/code/local/Transdirect/Ship/Block/Country.php +0 -1
- app/code/local/Transdirect/Ship/Block/Couriers.php +27 -28
- app/code/local/Transdirect/Ship/Block/Custom/Order.php +12 -0
- app/code/local/Transdirect/Ship/Block/Enablecourier.php +2 -3
- app/code/local/Transdirect/Ship/Block/Unitcourier.php +2 -2
- app/code/local/Transdirect/Ship/Model/Carrier/Transdirect.php +8 -8
- app/code/local/Transdirect/Ship/Model/Source/AddressType.php +1 -12
- app/code/local/Transdirect/Ship/controllers/IndexController.php +73 -561
- app/code/local/Transdirect/Ship/etc/system.xml +2 -2
- app/code/local/Transdirect/Ship/sql/ship_setup_sales/.DS_Store +0 -0
- app/design/frontend/default/default/template/checkout/.DS_Store +0 -0
- app/design/frontend/default/default/template/checkout/onepage/.DS_Store +0 -0
- app/design/frontend/default/default/template/checkout/onepage/shipping.phtml +0 -166
- app/design/frontend/default/default/template/ship/checkout/cart/totals.phtml +0 -48
- app/design/frontend/default/default/template/ship/footer/js.phtml +0 -5
- app/design/frontend/default/default/template/ship/product_shipping.phtml +0 -614
- app/design/frontend/default/default/template/ship/shipping.phtml +0 -719
- app/{code/local/Transdirect/Ship/sql → design/frontend/rwd/default/template/ship}/.DS_Store +0 -0
- package.xml +13 -7
app/code/local/Transdirect/.DS_Store
DELETED
Binary file
|
app/code/local/Transdirect/Ship/.DS_Store
DELETED
Binary file
|
app/code/local/Transdirect/Ship/Block/.DS_Store
DELETED
Binary file
|
app/code/local/Transdirect/Ship/Block/Country.php
CHANGED
@@ -4,7 +4,6 @@ class Transdirect_Ship_Block_Country extends Mage_Core_Block_Text
|
|
4 |
public function _toHtml()
|
5 |
{
|
6 |
// is_render_to_js_template,type,name,column_name,column,module_name
|
7 |
-
|
8 |
// groups[displayoptions][fields][shipping_costs][value][0][enable_courier]
|
9 |
// groups[displayoptions][fields][shipping_costs][value][0][country]
|
10 |
return '<span>#{' . $this->getData('column_name') . '}</span>';
|
4 |
public function _toHtml()
|
5 |
{
|
6 |
// is_render_to_js_template,type,name,column_name,column,module_name
|
|
|
7 |
// groups[displayoptions][fields][shipping_costs][value][0][enable_courier]
|
8 |
// groups[displayoptions][fields][shipping_costs][value][0][country]
|
9 |
return '<span>#{' . $this->getData('column_name') . '}</span>';
|
app/code/local/Transdirect/Ship/Block/Couriers.php
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
<?php
|
2 |
-
class Transdirect_Ship_Block_Couriers
|
3 |
-
extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
|
4 |
{
|
5 |
protected $_itemEnabledRenderer;
|
6 |
protected $_itemRenderer;
|
@@ -93,34 +92,34 @@ class Transdirect_Ship_Block_Couriers
|
|
93 |
}
|
94 |
|
95 |
protected function _getRenderer()
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
|
|
|
|
102 |
}
|
103 |
-
return $this->_itemRenderer;
|
104 |
-
}
|
105 |
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
|
125 |
-
|
126 |
}
|
1 |
<?php
|
2 |
+
class Transdirect_Ship_Block_Couriers extends Mage_Adminhtml_Block_System_Config_Form_Field_Array_Abstract
|
|
|
3 |
{
|
4 |
protected $_itemEnabledRenderer;
|
5 |
protected $_itemRenderer;
|
92 |
}
|
93 |
|
94 |
protected function _getRenderer()
|
95 |
+
{
|
96 |
+
if (!$this->_itemRenderer) {
|
97 |
+
$this->_itemRenderer = $this->getLayout()->createBlock(
|
98 |
+
'ship/country', '',
|
99 |
+
array('is_render_to_js_template' => true)
|
100 |
+
);
|
101 |
+
}
|
102 |
+
return $this->_itemRenderer;
|
103 |
}
|
|
|
|
|
104 |
|
105 |
+
protected function _prepareArrayRow(Varien_Object $row)
|
106 |
+
{
|
107 |
+
$row->setData(
|
108 |
+
'option_extra_attr_' . $this->_getEnabledRenderer()
|
109 |
+
->calcOptionHash($row->getData('enable_courier')),
|
110 |
+
'selected="selected"'
|
111 |
+
);
|
112 |
+
$row->setData(
|
113 |
+
'option_extra_attr_' . $this->_getEnabledSurchageRenderer()
|
114 |
+
->calcOptionHash($row->getData('enable_surcharge_courier')),
|
115 |
+
'selected="selected"'
|
116 |
+
);
|
117 |
|
118 |
+
$row->setData(
|
119 |
+
'option_extra_attr_' . $this->_getUnitRenderer()
|
120 |
+
->calcOptionHash($row->getData('surcharge_courier_unit')),
|
121 |
+
'selected="selected"'
|
122 |
+
);
|
123 |
|
124 |
+
}
|
125 |
}
|
app/code/local/Transdirect/Ship/Block/Custom/Order.php
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Transdirect_Ship_Block_Custom_Order extends Mage_Core_Block_Template
|
3 |
+
{
|
4 |
+
public function getCustomVars(){
|
5 |
+
$model = Mage::getModel('custom/custom_order');
|
6 |
+
return $model->getByOrder($this->getOrder()->getId());
|
7 |
+
}
|
8 |
+
public function getOrder()
|
9 |
+
{
|
10 |
+
return Mage::registry('current_order');
|
11 |
+
}
|
12 |
+
}
|
app/code/local/Transdirect/Ship/Block/Enablecourier.php
CHANGED
@@ -2,14 +2,13 @@
|
|
2 |
class Transdirect_Ship_Block_Enablecourier extends Mage_Core_Block_Html_Select
|
3 |
{
|
4 |
public function _toHtml()
|
5 |
-
|
6 |
$options = Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray();
|
7 |
foreach ($options as $option) {
|
8 |
$this->addOption($option['value'], $option['label']);
|
9 |
}
|
10 |
-
|
11 |
return parent::_toHtml();
|
12 |
-
|
13 |
|
14 |
public function setInputName($value)
|
15 |
{
|
2 |
class Transdirect_Ship_Block_Enablecourier extends Mage_Core_Block_Html_Select
|
3 |
{
|
4 |
public function _toHtml()
|
5 |
+
{
|
6 |
$options = Mage::getSingleton('adminhtml/system_config_source_yesno')->toOptionArray();
|
7 |
foreach ($options as $option) {
|
8 |
$this->addOption($option['value'], $option['label']);
|
9 |
}
|
|
|
10 |
return parent::_toHtml();
|
11 |
+
}
|
12 |
|
13 |
public function setInputName($value)
|
14 |
{
|
app/code/local/Transdirect/Ship/Block/Unitcourier.php
CHANGED
@@ -2,14 +2,14 @@
|
|
2 |
class Transdirect_Ship_Block_UnitCourier extends Mage_Core_Block_Html_Select
|
3 |
{
|
4 |
public function _toHtml()
|
5 |
-
|
6 |
$options = Mage::getSingleton('ship/source_unit')->toOptionArray();
|
7 |
foreach ($options as $option) {
|
8 |
$this->addOption($option['value'], $option['label']);
|
9 |
}
|
10 |
|
11 |
return parent::_toHtml();
|
12 |
-
|
13 |
|
14 |
public function setInputName($value)
|
15 |
{
|
2 |
class Transdirect_Ship_Block_UnitCourier extends Mage_Core_Block_Html_Select
|
3 |
{
|
4 |
public function _toHtml()
|
5 |
+
{
|
6 |
$options = Mage::getSingleton('ship/source_unit')->toOptionArray();
|
7 |
foreach ($options as $option) {
|
8 |
$this->addOption($option['value'], $option['label']);
|
9 |
}
|
10 |
|
11 |
return parent::_toHtml();
|
12 |
+
}
|
13 |
|
14 |
public function setInputName($value)
|
15 |
{
|
app/code/local/Transdirect/Ship/Model/Carrier/Transdirect.php
CHANGED
@@ -6,6 +6,7 @@ class Transdirect_Ship_Model_Carrier_Transdirect extends Mage_Shipping_Model_Car
|
|
6 |
|
7 |
public function collectRates(Mage_Shipping_Model_Rate_Request $request) {
|
8 |
|
|
|
9 |
//echo '<pre>'; print_r($request); die('request');
|
10 |
if (!Mage::getStoreConfig('carriers/'.$this->_code.'/active')) {
|
11 |
return false;
|
@@ -100,9 +101,6 @@ class Transdirect_Ship_Model_Carrier_Transdirect extends Mage_Shipping_Model_Car
|
|
100 |
if($cart_total_weight > $cubic_weight) {
|
101 |
$cubic_weight = $cart_total_weight;
|
102 |
}
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
for($x = 1; $x <= $productQty; $x++) {
|
107 |
if ($cubic_weight > $order_box_size) {
|
108 |
|
@@ -322,11 +320,13 @@ class Transdirect_Ship_Model_Carrier_Transdirect extends Mage_Shipping_Model_Car
|
|
322 |
// }
|
323 |
|
324 |
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
|
|
|
|
330 |
|
331 |
|
332 |
$display_quote = Mage::getStoreConfig('transdirect_section/displayoptions/quotedisplay');
|
6 |
|
7 |
public function collectRates(Mage_Shipping_Model_Rate_Request $request) {
|
8 |
|
9 |
+
|
10 |
//echo '<pre>'; print_r($request); die('request');
|
11 |
if (!Mage::getStoreConfig('carriers/'.$this->_code.'/active')) {
|
12 |
return false;
|
101 |
if($cart_total_weight > $cubic_weight) {
|
102 |
$cubic_weight = $cart_total_weight;
|
103 |
}
|
|
|
|
|
|
|
104 |
for($x = 1; $x <= $productQty; $x++) {
|
105 |
if ($cubic_weight > $order_box_size) {
|
106 |
|
320 |
// }
|
321 |
|
322 |
|
323 |
+
if(!function_exists(getCheapest)){
|
324 |
+
function getCheapest($a, $b)
|
325 |
+
{
|
326 |
+
// Sort row primarily by total being cheapest total on top
|
327 |
+
return $a['total'] - $b['total'];
|
328 |
+
}
|
329 |
+
}
|
330 |
|
331 |
|
332 |
$display_quote = Mage::getStoreConfig('transdirect_section/displayoptions/quotedisplay');
|
app/code/local/Transdirect/Ship/Model/Source/AddressType.php
CHANGED
@@ -1,27 +1,16 @@
|
|
1 |
<?php
|
2 |
|
3 |
-
|
4 |
-
|
5 |
class Transdirect_Ship_Model_Source_AddressType extends Varien_Object
|
6 |
|
7 |
{
|
8 |
-
|
9 |
public function toOptionArray()
|
10 |
|
11 |
{
|
12 |
-
|
13 |
-
$hlp = Mage::helper('ship');
|
14 |
-
|
15 |
return array(
|
16 |
-
|
17 |
array('value' => 'residential', 'label' => $hlp->__('Residential')),
|
18 |
-
|
19 |
array('value' => 'business', 'label' => $hlp->__('Commercial')),
|
20 |
-
|
21 |
);
|
22 |
-
|
23 |
}
|
24 |
|
25 |
-
|
26 |
-
|
27 |
}
|
1 |
<?php
|
2 |
|
|
|
|
|
3 |
class Transdirect_Ship_Model_Source_AddressType extends Varien_Object
|
4 |
|
5 |
{
|
|
|
6 |
public function toOptionArray()
|
7 |
|
8 |
{
|
9 |
+
$hlp = Mage::helper('ship');
|
|
|
|
|
10 |
return array(
|
|
|
11 |
array('value' => 'residential', 'label' => $hlp->__('Residential')),
|
|
|
12 |
array('value' => 'business', 'label' => $hlp->__('Commercial')),
|
|
|
13 |
);
|
|
|
14 |
}
|
15 |
|
|
|
|
|
16 |
}
|
app/code/local/Transdirect/Ship/controllers/IndexController.php
CHANGED
@@ -1,27 +1,19 @@
|
|
1 |
<?php
|
2 |
|
3 |
class Transdirect_Ship_IndexController extends Mage_Core_Controller_Front_Action
|
4 |
-
|
5 |
{
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
protected function _getCart()
|
10 |
-
|
11 |
{
|
12 |
|
13 |
return Mage::getSingleton('checkout/cart');
|
14 |
|
15 |
}
|
16 |
|
17 |
-
|
18 |
-
|
19 |
/**
|
20 |
|
21 |
* Get checkout session model instance
|
22 |
-
|
23 |
*
|
24 |
-
|
25 |
* @return Mage_Checkout_Model_Session
|
26 |
|
27 |
*/
|
@@ -33,15 +25,10 @@ protected function _getCart()
|
|
33 |
return Mage::getSingleton('checkout/session');
|
34 |
|
35 |
}
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
/**
|
40 |
|
41 |
* Get current active quote instance
|
42 |
|
43 |
-
*
|
44 |
-
|
45 |
* @return Mage_Sales_Model_Quote
|
46 |
|
47 |
*/
|
@@ -49,15 +36,10 @@ protected function _getCart()
|
|
49 |
protected function _getQuote()
|
50 |
|
51 |
{
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
return $this->_getCart()->getQuote();
|
56 |
|
57 |
}
|
58 |
|
59 |
-
|
60 |
-
|
61 |
protected function _goBack()
|
62 |
|
63 |
{
|
@@ -65,200 +47,95 @@ protected function _getCart()
|
|
65 |
$returnUrl = $this->getRequest()->getParam('return_url');
|
66 |
|
67 |
if ($returnUrl) {
|
68 |
-
|
69 |
-
//die('if');
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
if (!$this->_isUrlInternal($returnUrl)) {
|
74 |
-
|
75 |
throw new Mage_Exception('External urls redirect to "' . $returnUrl . '" denied!');
|
76 |
-
|
77 |
}
|
78 |
|
79 |
-
|
80 |
-
|
81 |
$this->_getSession()->getMessages(true);
|
82 |
-
|
83 |
$this->getResponse()->setRedirect($returnUrl);
|
84 |
|
85 |
-
} elseif (!Mage::getStoreConfig('checkout/cart/redirect_to_cart')
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
&& !$this->getRequest()->getParam('in_cart')
|
90 |
-
|
91 |
-
&& $backUrl = $this->_getRefererUrl()
|
92 |
-
|
93 |
-
) {// die('else if');
|
94 |
-
|
95 |
-
$this->getResponse()->setRedirect($backUrl);
|
96 |
|
97 |
} else {
|
98 |
-
|
99 |
-
//die('else');
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
if (($this->getRequest()->getActionName() == 'add') && !$this->getRequest()->getParam('in_cart')) {
|
104 |
|
105 |
$this->_getSession()->setContinueShoppingUrl($this->_getRefererUrl());
|
106 |
|
107 |
}
|
108 |
-
|
109 |
$this->_redirect('checkout/cart');
|
110 |
-
|
111 |
-
//die('go back');
|
112 |
-
|
113 |
-
//$this->_redirectReferer();
|
114 |
-
|
115 |
}
|
116 |
-
|
117 |
return $this;
|
118 |
-
|
119 |
}
|
120 |
|
121 |
|
122 |
|
123 |
function indexAction()
|
124 |
|
125 |
-
{
|
126 |
-
|
127 |
-
//die('index');
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
//$this->loadLayout();
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
$account_email = Mage::getStoreConfig('transdirect_section/authentication/email');
|
136 |
-
|
137 |
$account_password = Mage::getStoreConfig('transdirect_section/authentication/password');
|
138 |
-
|
139 |
$warehouse_postcode = Mage::getStoreConfig('transdirect_section/warehouseaddress/postcode');
|
140 |
-
|
141 |
$warehouse_address = Mage::getStoreConfig('transdirect_section/warehouseaddress/address');
|
142 |
-
|
143 |
$dimension_width = Mage::getStoreConfig('transdirect_section/defaultitemsize/dimensionswidth');
|
144 |
-
|
145 |
$dimension_height = Mage::getStoreConfig('transdirect_section/defaultitemsize/dimensionsheight');
|
146 |
-
|
147 |
$dimension_dim = Mage::getStoreConfig('transdirect_section/defaultitemsize/dimensionsdim');
|
148 |
-
|
149 |
$dimension_weight = Mage::getStoreConfig('transdirect_section/defaultitemsize/weight');
|
150 |
-
|
151 |
$display_carriers = Mage::getStoreConfig('transdirect_section/displayoptions/availablecoriers');
|
152 |
-
|
153 |
$display_quote = Mage::getStoreConfig('transdirect_section/displayoptions/quotedisplay');
|
154 |
-
|
155 |
$display_fixedprice = Mage::getStoreConfig('transdirect_section/displayoptions/fixedpriceonerror');
|
156 |
-
|
157 |
$display_fixedprice1 = Mage::getStoreConfig('transdirect_section/displayoptions/fixedpriceonerror1');
|
158 |
-
|
159 |
$display_showcouriername = Mage::getStoreConfig('transdirect_section/displayoptions/showcouriernames');
|
160 |
-
|
161 |
$display_surcharge = Mage::getStoreConfig('transdirect_section/displayoptions/handlingsurcharge');
|
162 |
-
|
163 |
$display_surcharge1 = Mage::getStoreConfig('transdirect_section/displayoptions/handlingsurcharge1');
|
164 |
-
|
165 |
$display_includesurchage = Mage::getStoreConfig('transdirect_section/displayoptions/includesurcharge');
|
166 |
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
// Cart Total Weight Code Start by Nayan
|
172 |
|
173 |
-
|
174 |
-
|
175 |
$quote = Mage::getSingleton('checkout/session')->getQuote();
|
176 |
-
|
177 |
$cartItems = $quote->getAllVisibleItems();
|
178 |
-
|
179 |
//$total_qty = Mage::helper('checkout/cart')->getSummaryCount();
|
180 |
|
181 |
$total_qty = '1';
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
/* if(Mage::registry('current_product')) {
|
186 |
-
|
187 |
//this is a product page, do some stuff
|
188 |
-
|
189 |
die('product');
|
190 |
-
|
191 |
}
|
192 |
-
|
193 |
else {
|
194 |
-
|
195 |
die('not product');
|
196 |
-
|
197 |
-
}
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
echo Mage::app()->getFrontController()->getRequest()->getRouteName();
|
202 |
-
|
203 |
die('name');*/
|
204 |
|
205 |
-
|
206 |
-
|
207 |
$weight = 0;
|
208 |
-
|
209 |
$height = 0;
|
210 |
-
|
211 |
$width = 0;
|
212 |
-
|
213 |
$length = 0;
|
214 |
|
215 |
foreach ($cartItems as $item)
|
216 |
|
217 |
{
|
218 |
-
|
219 |
//echo '<pre>'; print_r($item->getQty()); die;
|
220 |
-
|
221 |
$productId = $item->getProductId();
|
222 |
-
|
223 |
$productQty = $item->getQty();
|
224 |
|
225 |
-
|
226 |
-
|
227 |
$product = Mage::getModel('catalog/product')->load($productId);
|
228 |
-
|
229 |
//echo $product->getItemWeight();
|
230 |
-
|
231 |
$weight += $product->getItemWeight() * $productQty;
|
232 |
-
|
233 |
$height += $product->getItemHeight() * $productQty;
|
234 |
-
|
235 |
$width += $product->getItemWidth() * $productQty;
|
236 |
-
|
237 |
$length += $product->getItemDim() * $productQty;
|
238 |
|
239 |
}
|
240 |
|
241 |
-
|
242 |
-
|
243 |
$product = Mage::getModel('catalog/product')->load($productId);
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
$cart_total_weight = $product->getItemWeight();
|
248 |
-
|
249 |
-
$cart_total_height = $product->getItemHeight();
|
250 |
-
|
251 |
$cart_total_width = $product->getItemWidth();
|
|
|
252 |
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
// Cart Total Weight Code End by Nayan
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
|
263 |
if(!$cart_total_weight){ $cart_total_weight = $dimension_weight; }
|
264 |
|
@@ -268,54 +145,29 @@ protected function _getCart()
|
|
268 |
|
269 |
if(!$cart_total_length){ $cart_total_length = $dimension_dim; }
|
270 |
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
echo 'height---'.$cart_total_height;
|
276 |
-
|
277 |
-
echo 'width---'.$cart_total_width;
|
278 |
-
|
279 |
-
echo 'length---'.$cart_total_length;
|
280 |
-
|
281 |
die('here');
|
282 |
|
283 |
*/
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
// Getting Cart page Quote Address Details Code Start by Nayan
|
288 |
-
|
289 |
-
|
290 |
|
291 |
$receiver_country = (string) $this->getRequest()->getParam('country_id');
|
292 |
-
|
293 |
$receiver_postcode = (string) $this->getRequest()->getParam('estimate_postcode');
|
294 |
-
|
295 |
$receiver_regionId = (string) $this->getRequest()->getParam('region_id');
|
296 |
-
|
297 |
$receiver_region = (string) $this->getRequest()->getParam('region');
|
298 |
|
299 |
-
|
300 |
-
|
301 |
$region = Mage::getModel('directory/region')->load($receiver_regionId);
|
302 |
-
|
303 |
$receiver_region_tmp = $region->getName();
|
304 |
|
305 |
-
|
306 |
-
|
307 |
/*if($receiver_region == '') {
|
308 |
-
|
309 |
Mage::getSingleton('checkout/session')->addError("Please enter state/province.");
|
310 |
-
|
311 |
-
session_write_close();
|
312 |
-
|
313 |
$this->_redirectReferer();
|
314 |
-
|
315 |
}*/
|
316 |
|
317 |
-
|
318 |
-
|
319 |
/*if(!is_numeric($receiver_postcode) || $receiver_postcode == "0" || $receiver_postcode == "00" || $receiver_postcode == "000" || $receiver_postcode == "0000" || $receiver_postcode == "00000" || $receiver_postcode == "000000" || $receiver_postcode == "0000000") {
|
320 |
|
321 |
Mage::getSingleton('checkout/session')->addError("Please enter valid and correct postcode.");
|
@@ -326,510 +178,193 @@ protected function _getCart()
|
|
326 |
|
327 |
}*/
|
328 |
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
{
|
334 |
-
|
335 |
-
$receiver_suburb = $receiver_region;
|
336 |
-
|
337 |
}
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
{
|
342 |
-
|
343 |
$receiver_suburb = $receiver_region_tmp;
|
344 |
|
345 |
}
|
346 |
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
$receiver_postcode = $_COOKIE['cart_postocde'];
|
352 |
-
|
353 |
-
$receiver_suburb = $_COOKIE['cart_locality'];
|
354 |
-
|
355 |
-
|
356 |
|
357 |
//echo $receiver_suburb; die('suburb');
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
// Getting Cart page Quote Address Details Code End by Nayan
|
362 |
|
363 |
-
|
364 |
-
|
365 |
$quoteDetails = array(
|
366 |
-
|
367 |
-
'declared_value'=>10000,
|
368 |
-
|
369 |
'items' => array
|
370 |
-
|
371 |
(
|
372 |
-
|
373 |
array('width' => $cart_total_width, 'height' => $cart_total_height, 'weight'=> $cart_total_weight, 'length'=> $cart_total_length, 'quantity'=>$total_qty, 'description'=>'item description')
|
374 |
-
|
375 |
-
),
|
376 |
-
|
377 |
'sender' => array('country' => 'AU', 'suburb'=>'SYDNEY', 'postcode' => $warehouse_postcode, 'type'=> $warehouse_address),
|
378 |
-
|
379 |
'receiver' => array('country' => $receiver_country, 'suburb'=>$receiver_suburb, 'postcode' => $receiver_postcode, 'type'=> 'residential')
|
380 |
-
|
381 |
);
|
382 |
|
383 |
-
|
384 |
-
|
385 |
$json_data = json_encode($quoteDetails);
|
386 |
-
|
387 |
-
//echo '<pre>'; print_r($json_data); die('encode');
|
388 |
-
|
389 |
-
|
390 |
|
391 |
$ch = curl_init();
|
392 |
-
|
393 |
-
curl_setopt($ch, CURLOPT_URL, "https://www.staging.transdirect.com.au/api/bookings");
|
394 |
-
|
395 |
-
//curl_setopt($ch, CURLOPT_URL, "https://www.transdirect.com.au/api/bookings");
|
396 |
-
|
397 |
curl_setopt($ch, CURLOPT_USERPWD, "$account_email:$account_password");
|
398 |
-
|
399 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
|
400 |
-
|
401 |
curl_setopt($ch, CURLOPT_HEADER, FALSE);
|
402 |
-
|
403 |
curl_setopt($ch, CURLOPT_POST, TRUE);
|
404 |
-
|
405 |
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);
|
406 |
-
|
407 |
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json"));
|
408 |
-
|
409 |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
410 |
-
|
411 |
$response = curl_exec($ch);
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
$report = curl_getinfo($ch);
|
416 |
|
417 |
-
//echo '<pre>'; print_r($report);
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
if(curl_errno($ch)) {
|
422 |
-
|
423 |
echo 'Response error: ' . curl_error($ch);
|
424 |
-
|
425 |
}
|
426 |
|
427 |
-
|
428 |
-
|
429 |
curl_close($ch);
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
if ($response) {
|
434 |
-
|
435 |
-
//echo '<pre>'.$response;
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
$json_decode_varible = json_decode($response, true);
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
$quotes_val = $json_decode_varible['quotes'];
|
448 |
-
|
449 |
//echo "<pre>"; print_r($quotes_val); die('decode');
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
// Passing Data from Controller to Template file code Start
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
//$quotes_val = Mage::register('quotes_val', $quotes_val);
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
// End
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
Mage::getSingleton('core/session')->unsSomeSessionVar();
|
470 |
-
|
471 |
Mage::getSingleton('core/session')->unsCountryVal();
|
472 |
-
|
473 |
Mage::getSingleton('core/session')->unsPostcodeVal();
|
474 |
-
|
475 |
-
Mage::getSingleton('core/session')->
|
476 |
-
|
477 |
-
Mage::getSingleton('core/session')->unsRegionVal();
|
478 |
-
|
479 |
-
|
480 |
|
481 |
$country = (string) $this->getRequest()->getParam('country_id');
|
482 |
-
|
483 |
$postcode = (string) $this->getRequest()->getParam('estimate_postcode');
|
484 |
-
|
485 |
$regionId = (string) $this->getRequest()->getParam('region_id');
|
486 |
-
|
487 |
$region = (string) $this->getRequest()->getParam('region');
|
488 |
|
489 |
-
|
490 |
-
|
491 |
//echo $country. $postcode . $city . $regionId . $region; die('data');
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
//echo "<pre>"; print_r($quotes_val);
|
496 |
-
|
497 |
-
|
498 |
|
499 |
/*function build_sorter($key) {
|
500 |
-
|
501 |
return function ($a, $b) use ($key) {
|
502 |
-
|
503 |
return strnatcmp($a[$key], $b[$key]);
|
504 |
-
|
505 |
};
|
506 |
|
507 |
}*/
|
508 |
|
509 |
-
|
510 |
-
|
511 |
-
$display_quote = Mage::getStoreConfig('transdirect_section/displayoptions/quotedisplay');
|
512 |
-
|
513 |
-
|
514 |
|
515 |
//if($display_quote == 'display_cheapest'){ uasort($quotes_val, build_sorter('total')); }
|
516 |
-
|
517 |
//if($display_quote == 'display_cheapest_fastest'){ uasort($quotes_val, build_sorter('transit_time')); }
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
//echo "<pre>"; print_r($quotes_val); die('after');
|
522 |
|
523 |
-
|
524 |
-
|
525 |
$session_val = Mage::getSingleton('core/session')->setSomeSessionVar($quotes_val); // In the Controller
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
$quote_form_country_val = Mage::getSingleton('core/session')->setCountryVal($country); // In the Controller
|
530 |
-
|
531 |
$quote_form_postcode_val = Mage::getSingleton('core/session')->setPostcodeVal($postcode); // In the Controller
|
532 |
-
|
533 |
$quote_form_regionId_val = Mage::getSingleton('core/session')->setRegionIdVal($regionId); // In the Controller
|
534 |
-
|
535 |
$quote_form_region_val = Mage::getSingleton('core/session')->setRegionVal($region); // In the Controller
|
536 |
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
//echo '<pre>'; print_r($session_val->getSomeSessionVar());
|
544 |
-
|
545 |
//die('set');
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
/*
|
550 |
|
551 |
foreach($quotes_val as $key => $val) {
|
552 |
-
|
553 |
$courier_title = $key;
|
554 |
-
|
555 |
$courier_price = $quotes_val[$key]['total'];
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
// Mage::register('couriertitledisplay', $courier_title);
|
560 |
-
|
561 |
// Mage::register('courierpricedisplay', $courier_price);
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
$block = $this->getLayout()->createBlock(
|
570 |
-
|
571 |
-
'Mage_Core_Block_Template',
|
572 |
-
|
573 |
'ship.quotes',
|
574 |
-
|
575 |
array(
|
576 |
-
|
577 |
'template' => 'ship/quotes.phtml'
|
578 |
-
|
579 |
)
|
580 |
|
581 |
) // NOTE - Custom Variables Below
|
582 |
-
|
583 |
->setData('courier_title', $courier_title)
|
584 |
-
|
585 |
->setData('courier_price', $courier_price);
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
$this->getLayout()->getBlock('content')->append($block);
|
592 |
-
|
593 |
-
}
|
594 |
-
|
595 |
-
*/
|
596 |
-
|
597 |
-
|
598 |
|
599 |
} else {
|
600 |
-
|
601 |
echo "Failed";
|
602 |
-
|
603 |
}
|
604 |
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
$available_carriers = explode( ',', $display_carriers);
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
$handling = Mage::getStoreConfig('carriers/'.$this->_code.'/handling');
|
614 |
-
|
615 |
$result = Mage::getModel('shipping/rate_result');
|
616 |
-
|
617 |
$show = true;
|
618 |
-
|
619 |
if($show){
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
//die('before');
|
624 |
-
|
625 |
//$quotes_val = Mage::getSingleton('core/session')->getSomeSessionVar();
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
//$session = Mage::getSingleton('core/session', array('name' => 'frontend'));
|
630 |
-
|
631 |
//echo $session->getSomeSessionVar();
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
//echo '<pre>'; print_r($session->getSomeSessionVar());
|
636 |
-
|
637 |
//die('after');
|
638 |
|
639 |
-
|
640 |
-
|
641 |
if($quotes_val == ''){ //die('if');
|
642 |
-
|
643 |
//echo $quote_form_postcode_val; die;
|
644 |
-
|
645 |
/* if(!is_numeric($quote_form_postcode_val) || $quote_form_postcode_val == "0" || $quote_form_postcode_val == "00" || $quote_form_postcode_val == "000" || $quote_form_postcode_val == "0000" || $quote_form_postcode_val == "00000" || $quote_form_postcode_val == "000000" || $quote_form_postcode_val == "0000000") {
|
646 |
-
|
647 |
Mage::getSingleton('checkout/session')->addError("Please enter valid and correct postcode.");
|
648 |
-
|
649 |
} else {*/
|
650 |
-
|
651 |
// Mage::getSingleton('core/session')->addError("Please enter correct details, either suburb or postcode not entered properly.");
|
652 |
|
653 |
//}
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
//Mage::getSingleton('core/session')->addError("Please fill the information properly, there are some fields are missing or not entered properly.");
|
660 |
|
661 |
-
|
662 |
-
|
663 |
$method = Mage::getModel('shipping/rate_result_method');
|
664 |
-
|
665 |
$method->setCarrier($this->_code);
|
666 |
-
|
667 |
$method->setMethod($this->_code);
|
668 |
-
|
669 |
$method->setCarrierTitle('Carrier');
|
670 |
-
|
671 |
$method->setMethodTitle('Fixed Price');
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
if($display_fixedprice == '1'){
|
676 |
-
|
677 |
$method->setPrice($display_fixedprice1);
|
678 |
-
|
679 |
-
$method->setCost($display_fixedprice1);
|
680 |
-
|
681 |
-
}
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
$result->append($method);
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
}
|
690 |
-
|
691 |
-
else {
|
692 |
-
|
693 |
-
//die('else');
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
foreach($quotes_val as $key => $val) {
|
702 |
-
|
703 |
-
// echo count($val); die;
|
704 |
-
|
705 |
-
//echo $key.'<br>';
|
706 |
-
|
707 |
-
//print_r($available_carriers);
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
//usort($quotes_val, 'cmp1');
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
$courier_title = $key;
|
716 |
-
|
717 |
-
$courier_price = $quotes_val[$key]['total'];
|
718 |
-
|
719 |
-
|
720 |
-
|
721 |
-
$method = Mage::getModel('shipping/rate_result_method');
|
722 |
-
|
723 |
-
$method->setCarrier($this->_code);
|
724 |
-
|
725 |
-
$method->setMethod($courier_title);
|
726 |
-
|
727 |
-
$method->setCarrierTitle('Carriers');
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
if($display_surcharge == '1'){
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
$tmp_display_surcharge = $courier_price + $display_surcharge1;
|
736 |
-
|
737 |
-
$tmp_method_title = $courier_title.' + Handling Charge';
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
$method->setMethodTitle($tmp_method_title);
|
742 |
-
|
743 |
-
$method->setPrice($tmp_display_surcharge);
|
744 |
-
|
745 |
-
$method->setCost($tmp_display_surcharge);
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
} else {
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
if(in_array($key,$available_carriers)) {
|
754 |
-
|
755 |
-
//echo '<br>'.$key . ' - matched<br>';
|
756 |
-
|
757 |
-
$method->setMethodTitle($courier_title);
|
758 |
-
|
759 |
-
$method->setPrice($courier_price);
|
760 |
-
|
761 |
-
$method->setCost($courier_price);
|
762 |
-
|
763 |
-
} else {
|
764 |
-
|
765 |
-
//echo '<br>'.$key . ' - not found<br>';
|
766 |
-
|
767 |
-
}
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
|
775 |
}
|
776 |
-
|
777 |
-
|
778 |
-
|
779 |
$result->append($method);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
780 |
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
}
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
//echo '<pre>'; print_r($result); //die('model');
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
}else{
|
798 |
-
|
799 |
-
$error = Mage::getModel('shipping/rate_result_error');
|
800 |
-
|
801 |
-
$error->setCarrier($this->_code);
|
802 |
-
|
803 |
-
$error->setCarrierTitle('Carrier Title');
|
804 |
-
|
805 |
-
$error->setErrorMessage('Error');
|
806 |
-
|
807 |
-
$result->append($error);
|
808 |
-
|
809 |
}
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
//return $result;
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
//$this->renderLayout();
|
820 |
-
|
821 |
$this->_getQuote()->save();
|
822 |
-
|
823 |
$this->_goBack();
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
$this->_redirectReferer();
|
828 |
-
|
829 |
-
|
830 |
-
|
831 |
-
return $this;
|
832 |
-
|
833 |
}
|
834 |
|
835 |
|
@@ -837,45 +372,22 @@ protected function _getCart()
|
|
837 |
function productAction(){
|
838 |
|
839 |
$country = (string) $this->getRequest()->getParam('country_id');
|
840 |
-
|
841 |
$postcode = (string) $this->getRequest()->getParam('estimate_postcode');
|
842 |
-
|
843 |
$city = (string) $this->getRequest()->getParam('estimate_city');
|
844 |
-
|
845 |
$regionId = (string) $this->getRequest()->getParam('region_id');
|
846 |
-
|
847 |
$region = (string) $this->getRequest()->getParam('region');
|
848 |
|
849 |
-
|
850 |
-
|
851 |
$this->_getQuote()->getShippingAddress()
|
852 |
-
|
853 |
->setCountryId($country)
|
854 |
-
|
855 |
->setCity($city)
|
856 |
-
|
857 |
->setPostcode($postcode)
|
858 |
-
|
859 |
->setRegionId($regionId)
|
860 |
-
|
861 |
->setRegion($region)
|
862 |
-
|
863 |
->setCollectShippingRates(true);
|
864 |
|
865 |
$this->_getQuote()->save();
|
866 |
-
|
867 |
$this->_goBack();
|
868 |
-
|
869 |
//$this->_redirectReferer();
|
870 |
-
|
871 |
-
|
872 |
-
|
873 |
}
|
874 |
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
}
|
1 |
<?php
|
2 |
|
3 |
class Transdirect_Ship_IndexController extends Mage_Core_Controller_Front_Action
|
|
|
4 |
{
|
5 |
|
6 |
+
protected function _getCart()
|
|
|
|
|
|
|
7 |
{
|
8 |
|
9 |
return Mage::getSingleton('checkout/cart');
|
10 |
|
11 |
}
|
12 |
|
|
|
|
|
13 |
/**
|
14 |
|
15 |
* Get checkout session model instance
|
|
|
16 |
*
|
|
|
17 |
* @return Mage_Checkout_Model_Session
|
18 |
|
19 |
*/
|
25 |
return Mage::getSingleton('checkout/session');
|
26 |
|
27 |
}
|
|
|
|
|
|
|
28 |
/**
|
29 |
|
30 |
* Get current active quote instance
|
31 |
|
|
|
|
|
32 |
* @return Mage_Sales_Model_Quote
|
33 |
|
34 |
*/
|
36 |
protected function _getQuote()
|
37 |
|
38 |
{
|
|
|
|
|
|
|
39 |
return $this->_getCart()->getQuote();
|
40 |
|
41 |
}
|
42 |
|
|
|
|
|
43 |
protected function _goBack()
|
44 |
|
45 |
{
|
47 |
$returnUrl = $this->getRequest()->getParam('return_url');
|
48 |
|
49 |
if ($returnUrl) {
|
|
|
|
|
|
|
|
|
|
|
50 |
if (!$this->_isUrlInternal($returnUrl)) {
|
|
|
51 |
throw new Mage_Exception('External urls redirect to "' . $returnUrl . '" denied!');
|
|
|
52 |
}
|
53 |
|
|
|
|
|
54 |
$this->_getSession()->getMessages(true);
|
|
|
55 |
$this->getResponse()->setRedirect($returnUrl);
|
56 |
|
57 |
+
} elseif (!Mage::getStoreConfig('checkout/cart/redirect_to_cart') && !$this->getRequest()->getParam('in_cart') && $backUrl = $this->_getRefererUrl()) {
|
58 |
+
$this->getResponse()->setRedirect($backUrl);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
|
60 |
} else {
|
|
|
|
|
|
|
|
|
|
|
61 |
if (($this->getRequest()->getActionName() == 'add') && !$this->getRequest()->getParam('in_cart')) {
|
62 |
|
63 |
$this->_getSession()->setContinueShoppingUrl($this->_getRefererUrl());
|
64 |
|
65 |
}
|
|
|
66 |
$this->_redirect('checkout/cart');
|
|
|
|
|
|
|
|
|
|
|
67 |
}
|
|
|
68 |
return $this;
|
|
|
69 |
}
|
70 |
|
71 |
|
72 |
|
73 |
function indexAction()
|
74 |
|
75 |
+
{
|
76 |
+
//$this->loadLayout();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
$account_email = Mage::getStoreConfig('transdirect_section/authentication/email');
|
|
|
78 |
$account_password = Mage::getStoreConfig('transdirect_section/authentication/password');
|
|
|
79 |
$warehouse_postcode = Mage::getStoreConfig('transdirect_section/warehouseaddress/postcode');
|
|
|
80 |
$warehouse_address = Mage::getStoreConfig('transdirect_section/warehouseaddress/address');
|
|
|
81 |
$dimension_width = Mage::getStoreConfig('transdirect_section/defaultitemsize/dimensionswidth');
|
|
|
82 |
$dimension_height = Mage::getStoreConfig('transdirect_section/defaultitemsize/dimensionsheight');
|
|
|
83 |
$dimension_dim = Mage::getStoreConfig('transdirect_section/defaultitemsize/dimensionsdim');
|
|
|
84 |
$dimension_weight = Mage::getStoreConfig('transdirect_section/defaultitemsize/weight');
|
|
|
85 |
$display_carriers = Mage::getStoreConfig('transdirect_section/displayoptions/availablecoriers');
|
|
|
86 |
$display_quote = Mage::getStoreConfig('transdirect_section/displayoptions/quotedisplay');
|
|
|
87 |
$display_fixedprice = Mage::getStoreConfig('transdirect_section/displayoptions/fixedpriceonerror');
|
|
|
88 |
$display_fixedprice1 = Mage::getStoreConfig('transdirect_section/displayoptions/fixedpriceonerror1');
|
|
|
89 |
$display_showcouriername = Mage::getStoreConfig('transdirect_section/displayoptions/showcouriernames');
|
|
|
90 |
$display_surcharge = Mage::getStoreConfig('transdirect_section/displayoptions/handlingsurcharge');
|
|
|
91 |
$display_surcharge1 = Mage::getStoreConfig('transdirect_section/displayoptions/handlingsurcharge1');
|
|
|
92 |
$display_includesurchage = Mage::getStoreConfig('transdirect_section/displayoptions/includesurcharge');
|
93 |
|
|
|
|
|
|
|
|
|
94 |
// Cart Total Weight Code Start by Nayan
|
95 |
|
|
|
|
|
96 |
$quote = Mage::getSingleton('checkout/session')->getQuote();
|
|
|
97 |
$cartItems = $quote->getAllVisibleItems();
|
|
|
98 |
//$total_qty = Mage::helper('checkout/cart')->getSummaryCount();
|
99 |
|
100 |
$total_qty = '1';
|
101 |
+
/*if(Mage::registry('current_product')) {
|
|
|
|
|
|
|
|
|
102 |
//this is a product page, do some stuff
|
|
|
103 |
die('product');
|
|
|
104 |
}
|
|
|
105 |
else {
|
|
|
106 |
die('not product');
|
107 |
+
}
|
|
|
|
|
|
|
|
|
108 |
echo Mage::app()->getFrontController()->getRequest()->getRouteName();
|
|
|
109 |
die('name');*/
|
110 |
|
|
|
|
|
111 |
$weight = 0;
|
|
|
112 |
$height = 0;
|
|
|
113 |
$width = 0;
|
|
|
114 |
$length = 0;
|
115 |
|
116 |
foreach ($cartItems as $item)
|
117 |
|
118 |
{
|
|
|
119 |
//echo '<pre>'; print_r($item->getQty()); die;
|
|
|
120 |
$productId = $item->getProductId();
|
|
|
121 |
$productQty = $item->getQty();
|
122 |
|
|
|
|
|
123 |
$product = Mage::getModel('catalog/product')->load($productId);
|
|
|
124 |
//echo $product->getItemWeight();
|
|
|
125 |
$weight += $product->getItemWeight() * $productQty;
|
|
|
126 |
$height += $product->getItemHeight() * $productQty;
|
|
|
127 |
$width += $product->getItemWidth() * $productQty;
|
|
|
128 |
$length += $product->getItemDim() * $productQty;
|
129 |
|
130 |
}
|
131 |
|
|
|
|
|
132 |
$product = Mage::getModel('catalog/product')->load($productId);
|
133 |
+
$cart_total_weight = $product->getItemWeight();
|
134 |
+
$cart_total_height = $product->getItemHeight();
|
|
|
|
|
|
|
|
|
|
|
135 |
$cart_total_width = $product->getItemWidth();
|
136 |
+
$cart_total_length = $product->getItemDim();
|
137 |
|
138 |
+
// Cart Total Weight Code End by Nayan
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
|
140 |
if(!$cart_total_weight){ $cart_total_weight = $dimension_weight; }
|
141 |
|
145 |
|
146 |
if(!$cart_total_length){ $cart_total_length = $dimension_dim; }
|
147 |
|
148 |
+
/* echo 'width--'.$cart_total_weight;
|
149 |
+
echo 'height---'.$cart_total_height;
|
150 |
+
echo 'width---'.$cart_total_width;
|
151 |
+
echo 'length---'.$cart_total_length;
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
die('here');
|
153 |
|
154 |
*/
|
155 |
+
// Getting Cart page Quote Address Details Code Start by Nayan
|
|
|
|
|
|
|
|
|
|
|
156 |
|
157 |
$receiver_country = (string) $this->getRequest()->getParam('country_id');
|
|
|
158 |
$receiver_postcode = (string) $this->getRequest()->getParam('estimate_postcode');
|
|
|
159 |
$receiver_regionId = (string) $this->getRequest()->getParam('region_id');
|
|
|
160 |
$receiver_region = (string) $this->getRequest()->getParam('region');
|
161 |
|
|
|
|
|
162 |
$region = Mage::getModel('directory/region')->load($receiver_regionId);
|
|
|
163 |
$receiver_region_tmp = $region->getName();
|
164 |
|
|
|
|
|
165 |
/*if($receiver_region == '') {
|
|
|
166 |
Mage::getSingleton('checkout/session')->addError("Please enter state/province.");
|
167 |
+
session_write_close();
|
|
|
|
|
168 |
$this->_redirectReferer();
|
|
|
169 |
}*/
|
170 |
|
|
|
|
|
171 |
/*if(!is_numeric($receiver_postcode) || $receiver_postcode == "0" || $receiver_postcode == "00" || $receiver_postcode == "000" || $receiver_postcode == "0000" || $receiver_postcode == "00000" || $receiver_postcode == "000000" || $receiver_postcode == "0000000") {
|
172 |
|
173 |
Mage::getSingleton('checkout/session')->addError("Please enter valid and correct postcode.");
|
178 |
|
179 |
}*/
|
180 |
|
181 |
+
if(!$receiver_regionId)
|
182 |
+
{
|
183 |
+
$receiver_suburb = $receiver_region;
|
|
|
|
|
|
|
|
|
|
|
184 |
}
|
185 |
+
else
|
186 |
+
{
|
|
|
|
|
|
|
187 |
$receiver_suburb = $receiver_region_tmp;
|
188 |
|
189 |
}
|
190 |
|
|
|
|
|
|
|
|
|
191 |
$receiver_postcode = $_COOKIE['cart_postocde'];
|
192 |
+
$receiver_suburb = $_COOKIE['cart_locality'];
|
|
|
|
|
|
|
193 |
|
194 |
//echo $receiver_suburb; die('suburb');
|
|
|
|
|
|
|
195 |
// Getting Cart page Quote Address Details Code End by Nayan
|
196 |
|
|
|
|
|
197 |
$quoteDetails = array(
|
198 |
+
'declared_value'=>10000,
|
|
|
|
|
199 |
'items' => array
|
|
|
200 |
(
|
|
|
201 |
array('width' => $cart_total_width, 'height' => $cart_total_height, 'weight'=> $cart_total_weight, 'length'=> $cart_total_length, 'quantity'=>$total_qty, 'description'=>'item description')
|
202 |
+
),
|
|
|
|
|
203 |
'sender' => array('country' => 'AU', 'suburb'=>'SYDNEY', 'postcode' => $warehouse_postcode, 'type'=> $warehouse_address),
|
|
|
204 |
'receiver' => array('country' => $receiver_country, 'suburb'=>$receiver_suburb, 'postcode' => $receiver_postcode, 'type'=> 'residential')
|
|
|
205 |
);
|
206 |
|
|
|
|
|
207 |
$json_data = json_encode($quoteDetails);
|
208 |
+
//echo '<pre>'; print_r($json_data); die('encode');
|
|
|
|
|
|
|
209 |
|
210 |
$ch = curl_init();
|
211 |
+
curl_setopt($ch, CURLOPT_URL, "https://www.transdirect.com.au/api/bookings");
|
|
|
|
|
|
|
|
|
212 |
curl_setopt($ch, CURLOPT_USERPWD, "$account_email:$account_password");
|
|
|
213 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
|
|
|
214 |
curl_setopt($ch, CURLOPT_HEADER, FALSE);
|
|
|
215 |
curl_setopt($ch, CURLOPT_POST, TRUE);
|
|
|
216 |
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_data);
|
|
|
217 |
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json"));
|
|
|
218 |
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
|
|
219 |
$response = curl_exec($ch);
|
|
|
|
|
|
|
220 |
$report = curl_getinfo($ch);
|
221 |
|
|
|
|
|
|
|
|
|
222 |
if(curl_errno($ch)) {
|
|
|
223 |
echo 'Response error: ' . curl_error($ch);
|
|
|
224 |
}
|
225 |
|
|
|
|
|
226 |
curl_close($ch);
|
|
|
|
|
|
|
227 |
if ($response) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
$json_decode_varible = json_decode($response, true);
|
|
|
|
|
|
|
229 |
$quotes_val = $json_decode_varible['quotes'];
|
|
|
230 |
//echo "<pre>"; print_r($quotes_val); die('decode');
|
231 |
+
// Passing Data from Controller to Template file code Start
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
//$quotes_val = Mage::register('quotes_val', $quotes_val);
|
|
|
|
|
|
|
233 |
// End
|
|
|
|
|
|
|
234 |
Mage::getSingleton('core/session')->unsSomeSessionVar();
|
|
|
235 |
Mage::getSingleton('core/session')->unsCountryVal();
|
|
|
236 |
Mage::getSingleton('core/session')->unsPostcodeVal();
|
237 |
+
Mage::getSingleton('core/session')->unsRegionIdVal();
|
238 |
+
Mage::getSingleton('core/session')->unsRegionVal();
|
|
|
|
|
|
|
|
|
239 |
|
240 |
$country = (string) $this->getRequest()->getParam('country_id');
|
|
|
241 |
$postcode = (string) $this->getRequest()->getParam('estimate_postcode');
|
|
|
242 |
$regionId = (string) $this->getRequest()->getParam('region_id');
|
|
|
243 |
$region = (string) $this->getRequest()->getParam('region');
|
244 |
|
|
|
|
|
245 |
//echo $country. $postcode . $city . $regionId . $region; die('data');
|
246 |
+
//echo "<pre>"; print_r($quotes_val);
|
|
|
|
|
|
|
|
|
|
|
247 |
|
248 |
/*function build_sorter($key) {
|
|
|
249 |
return function ($a, $b) use ($key) {
|
|
|
250 |
return strnatcmp($a[$key], $b[$key]);
|
|
|
251 |
};
|
252 |
|
253 |
}*/
|
254 |
|
255 |
+
$display_quote = Mage::getStoreConfig('transdirect_section/displayoptions/quotedisplay');
|
|
|
|
|
|
|
|
|
256 |
|
257 |
//if($display_quote == 'display_cheapest'){ uasort($quotes_val, build_sorter('total')); }
|
|
|
258 |
//if($display_quote == 'display_cheapest_fastest'){ uasort($quotes_val, build_sorter('transit_time')); }
|
|
|
|
|
|
|
259 |
//echo "<pre>"; print_r($quotes_val); die('after');
|
260 |
|
|
|
|
|
261 |
$session_val = Mage::getSingleton('core/session')->setSomeSessionVar($quotes_val); // In the Controller
|
|
|
|
|
|
|
262 |
$quote_form_country_val = Mage::getSingleton('core/session')->setCountryVal($country); // In the Controller
|
|
|
263 |
$quote_form_postcode_val = Mage::getSingleton('core/session')->setPostcodeVal($postcode); // In the Controller
|
|
|
264 |
$quote_form_regionId_val = Mage::getSingleton('core/session')->setRegionIdVal($regionId); // In the Controller
|
|
|
265 |
$quote_form_region_val = Mage::getSingleton('core/session')->setRegionVal($region); // In the Controller
|
266 |
|
|
|
|
|
|
|
|
|
|
|
|
|
267 |
//echo '<pre>'; print_r($session_val->getSomeSessionVar());
|
|
|
268 |
//die('set');
|
|
|
|
|
|
|
269 |
/*
|
270 |
|
271 |
foreach($quotes_val as $key => $val) {
|
|
|
272 |
$courier_title = $key;
|
|
|
273 |
$courier_price = $quotes_val[$key]['total'];
|
|
|
|
|
|
|
274 |
// Mage::register('couriertitledisplay', $courier_title);
|
|
|
275 |
// Mage::register('courierpricedisplay', $courier_price);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
$block = $this->getLayout()->createBlock(
|
277 |
+
'Mage_Core_Block_Template'
|
|
|
|
|
278 |
'ship.quotes',
|
|
|
279 |
array(
|
|
|
280 |
'template' => 'ship/quotes.phtml'
|
|
|
281 |
)
|
282 |
|
283 |
) // NOTE - Custom Variables Below
|
|
|
284 |
->setData('courier_title', $courier_title)
|
|
|
285 |
->setData('courier_price', $courier_price);
|
|
|
|
|
|
|
|
|
|
|
286 |
$this->getLayout()->getBlock('content')->append($block);
|
287 |
+
}*/
|
|
|
|
|
|
|
|
|
|
|
288 |
|
289 |
} else {
|
|
|
290 |
echo "Failed";
|
|
|
291 |
}
|
292 |
|
|
|
|
|
|
|
|
|
293 |
$available_carriers = explode( ',', $display_carriers);
|
|
|
|
|
|
|
294 |
$handling = Mage::getStoreConfig('carriers/'.$this->_code.'/handling');
|
|
|
295 |
$result = Mage::getModel('shipping/rate_result');
|
|
|
296 |
$show = true;
|
|
|
297 |
if($show){
|
|
|
|
|
|
|
298 |
//die('before');
|
|
|
299 |
//$quotes_val = Mage::getSingleton('core/session')->getSomeSessionVar();
|
|
|
|
|
|
|
300 |
//$session = Mage::getSingleton('core/session', array('name' => 'frontend'));
|
|
|
301 |
//echo $session->getSomeSessionVar();
|
|
|
|
|
|
|
302 |
//echo '<pre>'; print_r($session->getSomeSessionVar());
|
|
|
303 |
//die('after');
|
304 |
|
|
|
|
|
305 |
if($quotes_val == ''){ //die('if');
|
|
|
306 |
//echo $quote_form_postcode_val; die;
|
|
|
307 |
/* if(!is_numeric($quote_form_postcode_val) || $quote_form_postcode_val == "0" || $quote_form_postcode_val == "00" || $quote_form_postcode_val == "000" || $quote_form_postcode_val == "0000" || $quote_form_postcode_val == "00000" || $quote_form_postcode_val == "000000" || $quote_form_postcode_val == "0000000") {
|
|
|
308 |
Mage::getSingleton('checkout/session')->addError("Please enter valid and correct postcode.");
|
|
|
309 |
} else {*/
|
|
|
310 |
// Mage::getSingleton('core/session')->addError("Please enter correct details, either suburb or postcode not entered properly.");
|
311 |
|
312 |
//}
|
|
|
|
|
|
|
|
|
|
|
313 |
//Mage::getSingleton('core/session')->addError("Please fill the information properly, there are some fields are missing or not entered properly.");
|
314 |
|
|
|
|
|
315 |
$method = Mage::getModel('shipping/rate_result_method');
|
|
|
316 |
$method->setCarrier($this->_code);
|
|
|
317 |
$method->setMethod($this->_code);
|
|
|
318 |
$method->setCarrierTitle('Carrier');
|
|
|
319 |
$method->setMethodTitle('Fixed Price');
|
|
|
|
|
|
|
320 |
if($display_fixedprice == '1'){
|
|
|
321 |
$method->setPrice($display_fixedprice1);
|
322 |
+
$method->setCost($display_fixedprice1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
|
324 |
}
|
|
|
|
|
|
|
325 |
$result->append($method);
|
326 |
+
} else {
|
327 |
+
foreach($quotes_val as $key => $val) {
|
328 |
+
$courier_title = $key;
|
329 |
+
$courier_price = $quotes_val[$key]['total'];
|
330 |
+
$method = Mage::getModel('shipping/rate_result_method');
|
331 |
+
$method->setCarrier($this->_code);
|
332 |
+
$method->setMethod($courier_title);
|
333 |
+
$method->setCarrierTitle('Carriers');
|
334 |
+
|
335 |
+
if($display_surcharge == '1'){
|
336 |
+
$tmp_display_surcharge = $courier_price + $display_surcharge1;
|
337 |
+
$tmp_method_title = $courier_title.' + Handling Charge';
|
338 |
+
$method->setMethodTitle($tmp_method_title);
|
339 |
+
$method->setPrice($tmp_display_surcharge);
|
340 |
+
$method->setCost($tmp_display_surcharge);
|
341 |
+
} else {
|
342 |
+
if(in_array($key,$available_carriers)) {
|
343 |
+
//echo '<br>'.$key . ' - matched<br>';
|
344 |
+
$method->setMethodTitle($courier_title);
|
345 |
+
$method->setPrice($courier_price);
|
346 |
+
$method->setCost($courier_price);
|
347 |
+
} else {
|
348 |
+
//echo '<br>'.$key . ' - not found<br>';
|
349 |
+
}
|
350 |
+
|
351 |
+
}
|
352 |
+
$result->append($method);
|
353 |
+
}
|
354 |
+
}
|
355 |
|
356 |
+
} else {
|
357 |
+
$error = Mage::getModel('shipping/rate_result_error');
|
358 |
+
$error->setCarrier($this->_code);
|
359 |
+
$error->setCarrierTitle('Carrier Title');
|
360 |
+
$error->setErrorMessage('Error');
|
361 |
+
$result->append($error);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
362 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
363 |
//$this->renderLayout();
|
|
|
364 |
$this->_getQuote()->save();
|
|
|
365 |
$this->_goBack();
|
366 |
+
$this->_redirectReferer();
|
367 |
+
return $this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
368 |
}
|
369 |
|
370 |
|
372 |
function productAction(){
|
373 |
|
374 |
$country = (string) $this->getRequest()->getParam('country_id');
|
|
|
375 |
$postcode = (string) $this->getRequest()->getParam('estimate_postcode');
|
|
|
376 |
$city = (string) $this->getRequest()->getParam('estimate_city');
|
|
|
377 |
$regionId = (string) $this->getRequest()->getParam('region_id');
|
|
|
378 |
$region = (string) $this->getRequest()->getParam('region');
|
379 |
|
|
|
|
|
380 |
$this->_getQuote()->getShippingAddress()
|
|
|
381 |
->setCountryId($country)
|
|
|
382 |
->setCity($city)
|
|
|
383 |
->setPostcode($postcode)
|
|
|
384 |
->setRegionId($regionId)
|
|
|
385 |
->setRegion($region)
|
|
|
386 |
->setCollectShippingRates(true);
|
387 |
|
388 |
$this->_getQuote()->save();
|
|
|
389 |
$this->_goBack();
|
|
|
390 |
//$this->_redirectReferer();
|
|
|
|
|
|
|
391 |
}
|
392 |
|
393 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Transdirect/Ship/etc/system.xml
CHANGED
@@ -178,7 +178,7 @@
|
|
178 |
<show_in_website>1</show_in_website>
|
179 |
<show_in_store>1</show_in_store>
|
180 |
<frontend_type>select</frontend_type>
|
181 |
-
<source_model>ship/
|
182 |
</orderstatus>
|
183 |
|
184 |
<fromdate type="short">
|
@@ -420,4 +420,4 @@
|
|
420 |
</groups>
|
421 |
</transdirect_section>
|
422 |
</sections>
|
423 |
-
</config>
|
178 |
<show_in_website>1</show_in_website>
|
179 |
<show_in_store>1</show_in_store>
|
180 |
<frontend_type>select</frontend_type>
|
181 |
+
<source_model>ship/source_orderStatus</source_model>
|
182 |
</orderstatus>
|
183 |
|
184 |
<fromdate type="short">
|
420 |
</groups>
|
421 |
</transdirect_section>
|
422 |
</sections>
|
423 |
+
</config>
|
app/code/local/Transdirect/Ship/sql/ship_setup_sales/.DS_Store
DELETED
Binary file
|
app/design/frontend/default/default/template/checkout/.DS_Store
DELETED
Binary file
|
app/design/frontend/default/default/template/checkout/onepage/.DS_Store
DELETED
Binary file
|
app/design/frontend/default/default/template/checkout/onepage/shipping.phtml
DELETED
@@ -1,166 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magento.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magento.com for more information.
|
20 |
-
*
|
21 |
-
* @category design
|
22 |
-
* @package base_default
|
23 |
-
* @copyright Copyright (c) 2006-2015 X.commerce, Inc. (http://www.magento.com)
|
24 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
-
*/
|
26 |
-
?>
|
27 |
-
<form action="" id="co-shipping-form">
|
28 |
-
<ul class="form-list">
|
29 |
-
<?php if ($this->customerHasAddresses()): ?>
|
30 |
-
<li class="wide">
|
31 |
-
<label for="shipping-address-select"><?php echo $this->__('Select a shipping address from your address book or enter a new address.') ?></label>
|
32 |
-
<div class="input-box">
|
33 |
-
<?php echo $this->getAddressesHtmlSelect('shipping') ?>
|
34 |
-
</div>
|
35 |
-
</li>
|
36 |
-
<?php endif ?>
|
37 |
-
<li id="shipping-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif ?>>
|
38 |
-
<fieldset>
|
39 |
-
<input type="hidden" name="shipping[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="shipping:address_id" />
|
40 |
-
<ul>
|
41 |
-
<li class="fields"><?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress())->setFieldIdFormat('shipping:%s')->setFieldNameFormat('shipping[%s]')->setFieldParams('onchange="shipping.setSameAsBilling(false)"')->toHtml() ?></li>
|
42 |
-
<li class="fields">
|
43 |
-
<div class="fields">
|
44 |
-
<label for="shipping:company"><?php echo $this->__('Company') ?></label>
|
45 |
-
<div class="input-box">
|
46 |
-
<input type="text" id="shipping:company" name="shipping[company]" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" onchange="shipping.setSameAsBilling(false);" />
|
47 |
-
</div>
|
48 |
-
</div>
|
49 |
-
</li>
|
50 |
-
<?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
|
51 |
-
<li class="wide">
|
52 |
-
<label for="shipping:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
|
53 |
-
<div class="input-box">
|
54 |
-
<input type="text" title="<?php echo $this->__('Street Address') ?>" name="shipping[street][]" id="shipping:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" onchange="shipping.setSameAsBilling(false);" />
|
55 |
-
</div>
|
56 |
-
</li>
|
57 |
-
<?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
|
58 |
-
<?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
|
59 |
-
<li class="wide">
|
60 |
-
<div class="input-box">
|
61 |
-
<input type="text" title="<?php echo $this->__('Street Address %s', $_i) ?>" name="shipping[street][]" id="shipping:street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClass ?>" onchange="shipping.setSameAsBilling(false);" />
|
62 |
-
</div>
|
63 |
-
</li>
|
64 |
-
<?php endfor; ?>
|
65 |
-
<?php if ($this->helper('customer/address')->isVatAttributeVisible()) : ?>
|
66 |
-
<li class="wide">
|
67 |
-
<label for="billing:vat_id"><?php echo $this->__('VAT Number'); ?></label>
|
68 |
-
<div class="input-box">
|
69 |
-
<input type="text" id="shipping:vat_id" name="shipping[vat_id]" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()); ?>" title="<?php echo $this->__('VAT Number'); ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('vat_id') ?>" />
|
70 |
-
</div>
|
71 |
-
</li>
|
72 |
-
<?php endif; ?>
|
73 |
-
<li class="fields">
|
74 |
-
<div class="field">
|
75 |
-
<label for="shipping:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
|
76 |
-
<div class="input-box">
|
77 |
-
<input type="text" title="<?php echo $this->__('City') ?>" name="shipping[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>" id="shipping:city" onchange="shipping.setSameAsBilling(false);" />
|
78 |
-
</div>
|
79 |
-
</div>
|
80 |
-
<div class="field">
|
81 |
-
<label for="shipping:region" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
|
82 |
-
<div class="input-box">
|
83 |
-
<select id="shipping:region_id" name="shipping[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
|
84 |
-
<option value=""><?php echo $this->__('Please select region, state or province') ?></option>
|
85 |
-
</select>
|
86 |
-
<script type="text/javascript">
|
87 |
-
//<![CDATA[
|
88 |
-
$('shipping:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
|
89 |
-
//]]>
|
90 |
-
</script>
|
91 |
-
<input type="text" id="shipping:region" name="shipping[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" style="display:none;" />
|
92 |
-
</div>
|
93 |
-
</div>
|
94 |
-
</li>
|
95 |
-
<li class="fields">
|
96 |
-
<div class="field">
|
97 |
-
<label for="shipping:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
|
98 |
-
<div class="input-box">
|
99 |
-
<input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="shipping[postcode]" id="shipping:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" onchange="shipping.setSameAsBilling(false);" />
|
100 |
-
</div>
|
101 |
-
</div>
|
102 |
-
<div class="field">
|
103 |
-
<label for="shipping:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
|
104 |
-
<div class="input-box">
|
105 |
-
<?php echo $this->getCountryHtmlSelect('shipping') ?>
|
106 |
-
</div>
|
107 |
-
</div>
|
108 |
-
</li>
|
109 |
-
<li class="fields">
|
110 |
-
<div class="field">
|
111 |
-
<label for="shipping:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
|
112 |
-
<div class="input-box">
|
113 |
-
<input type="text" name="shipping[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" id="shipping:telephone" onchange="shipping.setSameAsBilling(false);" />
|
114 |
-
</div>
|
115 |
-
</div>
|
116 |
-
<div class="field">
|
117 |
-
<label for="shipping:fax"><?php echo $this->__('Fax') ?></label>
|
118 |
-
<div class="input-box">
|
119 |
-
<input type="text" name="shipping[fax]" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('fax') ?>" id="shipping:fax" onchange="shipping.setSameAsBilling(false);" />
|
120 |
-
</div>
|
121 |
-
</div>
|
122 |
-
</li>
|
123 |
-
<?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
|
124 |
-
<li class="control">
|
125 |
-
<input type="checkbox" name="shipping[save_in_address_book]" value="1" title="<?php echo $this->__('Save in address book') ?>" id="shipping:save_in_address_book" onchange="shipping.setSameAsBilling(false);"<?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /><label for="shipping:save_in_address_book"><?php echo $this->__('Save in address book') ?></label></li>
|
126 |
-
<?php else:?>
|
127 |
-
<li class="no-display"><input type="hidden" name="shipping[save_in_address_book]" value="1" /></li>
|
128 |
-
<?php endif;?>
|
129 |
-
</ul>
|
130 |
-
</fieldset>
|
131 |
-
</li>
|
132 |
-
<li class="control">
|
133 |
-
<input type="checkbox" name="shipping[same_as_billing]" id="shipping:same_as_billing" value="1"<?php if($this->getAddress()->getSameAsBilling()): ?> checked="checked"<?php endif; ?> title="<?php echo $this->__('Use Billing Address') ?>" onclick="shipping.setSameAsBilling(this.checked)" class="checkbox" /><label for="shipping:same_as_billing"><?php echo $this->__('Use Billing Address') ?></label>
|
134 |
-
</li>
|
135 |
-
<li class="fields">
|
136 |
-
<div class="field">
|
137 |
-
<?php $booking_id = Mage::getSingleton('core/session')->getSomeSessionVar2();?>
|
138 |
-
<div class="input-box">
|
139 |
-
<input type="hidden" name="booking_id" value="<?php echo $this->htmlEscape($booking_id) ?>" title="<?php echo $this->__('Booking ID') ?>" id="booking_id" class="input-text" />
|
140 |
-
</div>
|
141 |
-
|
142 |
-
</div>
|
143 |
-
</li>
|
144 |
-
</ul>
|
145 |
-
|
146 |
-
<div class="buttons-set" id="shipping-buttons-container">
|
147 |
-
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
|
148 |
-
<p class="back-link"><a href="#" onclick="checkout.back(); return false;"><small>« </small><?php echo $this->__('Back') ?></a></p>
|
149 |
-
<button type="button" class="button" title="<?php echo $this->__('Continue') ?>" onclick="shipping.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
|
150 |
-
<span id="shipping-please-wait" class="please-wait" style="display:none;">
|
151 |
-
<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
|
152 |
-
</span>
|
153 |
-
</div>
|
154 |
-
</form>
|
155 |
-
<script type="text/javascript">
|
156 |
-
//<![CDATA[
|
157 |
-
var shipping = new Shipping('co-shipping-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveShipping') ?>',
|
158 |
-
'<?php echo $this->getUrl('checkout/onepage/shippingMethod') ?>');
|
159 |
-
var shippingForm = new VarienForm('co-shipping-form');
|
160 |
-
shippingForm.extraChildParams = ' onchange="shipping.setSameAsBilling(false);"';
|
161 |
-
//shippingForm.setElementsRelation('shipping:country_id', 'shipping:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
|
162 |
-
$('shipping-address-select') && shipping.newAddress(!$('shipping-address-select').value);
|
163 |
-
|
164 |
-
var shippingRegionUpdater = new RegionUpdater('shipping:country_id', 'shipping:region', 'shipping:region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'shipping:postcode');
|
165 |
-
//]]>
|
166 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/default/default/template/ship/checkout/cart/totals.phtml
DELETED
@@ -1,48 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Magento
|
4 |
-
*
|
5 |
-
* NOTICE OF LICENSE
|
6 |
-
*
|
7 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
8 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
9 |
-
* It is also available through the world-wide-web at this URL:
|
10 |
-
* http://opensource.org/licenses/afl-3.0.php
|
11 |
-
* If you did not receive a copy of the license and are unable to
|
12 |
-
* obtain it through the world-wide-web, please send an email
|
13 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
14 |
-
*
|
15 |
-
* DISCLAIMER
|
16 |
-
*
|
17 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
18 |
-
* versions in the future. If you wish to customize Magento for your
|
19 |
-
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
-
*
|
21 |
-
* @category design
|
22 |
-
* @package base_default
|
23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
24 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
25 |
-
*/
|
26 |
-
?>
|
27 |
-
<?php
|
28 |
-
/**
|
29 |
-
* Shopping cart totals template
|
30 |
-
*
|
31 |
-
* @see Mage_Checkout_Block_Cart_Totals
|
32 |
-
* @var $this Mage_Checkout_Block_Cart_Totals
|
33 |
-
*/
|
34 |
-
?>
|
35 |
-
<?php if ($this->canApplyMsrp()): ?>
|
36 |
-
<div class="cart-msrp-totals"><?php echo $this->__('ORDER TOTAL WILL BE DISPLAYED BEFORE YOU SUBMIT THE ORDER'); ?></div>
|
37 |
-
<?php else: ?>
|
38 |
-
<table id="shopping-cart-totals-table">
|
39 |
-
<col />
|
40 |
-
<col width="1" />
|
41 |
-
<tfoot>
|
42 |
-
<?php echo $this->renderTotals('footer'); ?>
|
43 |
-
</tfoot>
|
44 |
-
<tbody>
|
45 |
-
<?php echo $this->renderTotals(); ?>
|
46 |
-
</tbody>
|
47 |
-
</table>
|
48 |
-
<?php endif; ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/default/default/template/ship/footer/js.phtml
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
<link href="<?php echo $this->getSkinUrl();?>ship/css/jquery.autoSuggest.css" rel="stylesheet" />
|
2 |
-
<script type="text/javascript" src="<?php echo $this->getSkinUrl();?>ship/js/jquery-1.11.0.js"></script>
|
3 |
-
<script type="text/javascript">jQuery.noConflict();</script>
|
4 |
-
<script type="text/javascript" src="https://www.transdirect.com.au/api/locations/script"></script>
|
5 |
-
<script src="<?php echo $this->getSkinUrl();?>ship/js/jquery.autoSuggest.js"></script>
|
|
|
|
|
|
|
|
|
|
app/design/frontend/default/default/template/ship/product_shipping.phtml
DELETED
@@ -1,614 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
|
5 |
-
* Magento
|
6 |
-
|
7 |
-
*
|
8 |
-
|
9 |
-
* NOTICE OF LICENSE
|
10 |
-
|
11 |
-
*
|
12 |
-
|
13 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
14 |
-
|
15 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
16 |
-
|
17 |
-
* It is also available through the world-wide-web at this URL:
|
18 |
-
|
19 |
-
* http://opensource.org/licenses/afl-3.0.php
|
20 |
-
|
21 |
-
* If you did not receive a copy of the license and are unable to
|
22 |
-
|
23 |
-
* obtain it through the world-wide-web, please send an email
|
24 |
-
|
25 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
26 |
-
|
27 |
-
*
|
28 |
-
|
29 |
-
* DISCLAIMER
|
30 |
-
|
31 |
-
*
|
32 |
-
|
33 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
34 |
-
|
35 |
-
* versions in the future. If you wish to customize Magento for your
|
36 |
-
|
37 |
-
* needs please refer to http://www.magentocommerce.com for more information.
|
38 |
-
|
39 |
-
*
|
40 |
-
|
41 |
-
* @category design
|
42 |
-
|
43 |
-
* @package base_default
|
44 |
-
|
45 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
46 |
-
|
47 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
48 |
-
|
49 |
-
*/
|
50 |
-
|
51 |
-
?>
|
52 |
-
|
53 |
-
<?php /** @var $this Mage_Checkout_Block_Cart_Shipping */ ?>
|
54 |
-
|
55 |
-
<?php if(Mage::getStoreConfig('transdirect_section/enabletab/enable')){ ?>
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
<script type="text/javascript">
|
60 |
-
|
61 |
-
jQuery(document).ready(function(e) {
|
62 |
-
|
63 |
-
var result;
|
64 |
-
|
65 |
-
var data = {items: []};
|
66 |
-
|
67 |
-
jQuery.each( TDLocationsList, function( i, item ) {
|
68 |
-
|
69 |
-
data.items.push({ value: TDLocationsList[i].postcode +' '+ TDLocationsList[i].locality , name: TDLocationsList[i].postcode +' '+ TDLocationsList[i].locality});
|
70 |
-
|
71 |
-
});
|
72 |
-
|
73 |
-
jQuery("#autosuggest").autoSuggest(data.items,
|
74 |
-
|
75 |
-
{
|
76 |
-
|
77 |
-
selectedItemProp: "name",
|
78 |
-
|
79 |
-
searchObjProps: "name",
|
80 |
-
|
81 |
-
selectionLimit: 1,
|
82 |
-
|
83 |
-
minChars: 3,
|
84 |
-
|
85 |
-
selectionAdded: function(elem)
|
86 |
-
|
87 |
-
{
|
88 |
-
|
89 |
-
result = elem.text();
|
90 |
-
|
91 |
-
getresultval(result);
|
92 |
-
|
93 |
-
}
|
94 |
-
|
95 |
-
}
|
96 |
-
|
97 |
-
);
|
98 |
-
|
99 |
-
function getresultval(res){
|
100 |
-
|
101 |
-
var postcode = res.substr(1,4);
|
102 |
-
|
103 |
-
var locality = res.substr(6);
|
104 |
-
|
105 |
-
jQuery('#suburb').attr("value", locality);
|
106 |
-
|
107 |
-
jQuery('#postcode').attr("value", postcode);
|
108 |
-
|
109 |
-
|
110 |
-
var d = new Date();
|
111 |
-
d.setTime(d.getTime() + (5*24*60*60*1000));
|
112 |
-
|
113 |
-
document.cookie="cart_postocde="+postcode+"; expires="+d.toUTCString()+"; path=/";
|
114 |
-
document.cookie="cart_locality="+locality+"; expires="+d.toUTCString()+"; path=/";
|
115 |
-
|
116 |
-
}
|
117 |
-
|
118 |
-
});
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
</script>
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
<?php $tmp_cart_postcode_val = $_COOKIE['cart_postocde'];
|
127 |
-
|
128 |
-
$tmp_cart_locality_val = $_COOKIE['cart_locality'];
|
129 |
-
|
130 |
-
?>
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
<?php
|
135 |
-
|
136 |
-
$country_val = Mage::getSingleton('core/session')->getCountryVal();
|
137 |
-
|
138 |
-
$postocde_val = Mage::getSingleton('core/session')->getPostcodeVal();
|
139 |
-
|
140 |
-
$regionid_val = Mage::getSingleton('core/session')->getRegionIdVal();
|
141 |
-
|
142 |
-
$region_val = Mage::getSingleton('core/session')->getRegionVal();
|
143 |
-
|
144 |
-
?>
|
145 |
-
|
146 |
-
<div class="shipping_product">
|
147 |
-
|
148 |
-
<h2><?php echo $this->__('Get A Shipping Quote') ?></h2>
|
149 |
-
|
150 |
-
<div class="shipping-form">
|
151 |
-
|
152 |
-
<form action="<?php echo $this->getUrl('ship/index/index/') ?>" method="post" id="shipping-zip-form">
|
153 |
-
|
154 |
-
<p><?php echo $this->__('Enter your destination to get a shipping estimate.') ?></p>
|
155 |
-
|
156 |
-
<ul class="form-list">
|
157 |
-
|
158 |
-
<li>
|
159 |
-
|
160 |
-
<label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
|
161 |
-
|
162 |
-
<div class="input-box">
|
163 |
-
|
164 |
-
<select name="country_id" id="country" class="validate-select" title="Country" >
|
165 |
-
|
166 |
-
<option value="AU" selected="selected" ><?php echo $this->__('Australia') ?></option>
|
167 |
-
|
168 |
-
</select>
|
169 |
-
|
170 |
-
</div>
|
171 |
-
|
172 |
-
<?php /*?><div class="input-box">
|
173 |
-
|
174 |
-
<?php echo Mage::getBlockSingleton('directory/data')->getCountryHtmlSelect($this->getEstimateCountryId()) ?>
|
175 |
-
|
176 |
-
</div><?php */?>
|
177 |
-
|
178 |
-
</li>
|
179 |
-
|
180 |
-
<?php /*
|
181 |
-
|
182 |
-
//if($this->getStateActive()):
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
?>
|
187 |
-
|
188 |
-
<li>
|
189 |
-
|
190 |
-
<label for="region_id"<?php if ($this->isStateProvinceRequired()) echo ' class="required"' ?>><?php if ($this->isStateProvinceRequired()) echo '<em>*</em>' ?><?php echo $this->__('Suburb') ?></label>
|
191 |
-
|
192 |
-
<div class="input-box">
|
193 |
-
|
194 |
-
<select id="region_id" name="region_id" title="<?php echo $this->__('Suburb') ?>" style="display:none;"<?php echo ($this->isStateProvinceRequired() ? ' class="validate-select"' : '') ?>>
|
195 |
-
|
196 |
-
<option value=""><?php echo $this->__('Please select region, state or province') ?></option>
|
197 |
-
|
198 |
-
</select>
|
199 |
-
|
200 |
-
<script type="text/javascript">
|
201 |
-
|
202 |
-
//<![CDATA[
|
203 |
-
|
204 |
-
$('region_id').setAttribute('defaultValue', "<?php echo $this->getEstimateRegionId() ?>");
|
205 |
-
|
206 |
-
//]]>
|
207 |
-
|
208 |
-
</script>
|
209 |
-
|
210 |
-
<input type="text" id="region" name="region" value="<?php if($region_val){ echo $region_val;} else { echo $this->escapeHtml($this->getEstimateRegion()); } ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text required-entry" style="display:none;" />
|
211 |
-
|
212 |
-
</div>
|
213 |
-
|
214 |
-
</li>
|
215 |
-
|
216 |
-
<?php //endif; */ ?>
|
217 |
-
|
218 |
-
<?php if($this->getCityActive()): ?>
|
219 |
-
|
220 |
-
<li>
|
221 |
-
|
222 |
-
<label for="city"<?php if ($this->isCityRequired()) echo ' class="required"' ?>><?php if ($this->isCityRequired()) echo '<em>*</em>' ?><?php echo $this->__('City') ?></label>
|
223 |
-
|
224 |
-
<div class="input-box">
|
225 |
-
|
226 |
-
<input class="input-text<?php if ($this->isCityRequired()):?> required-entry<?php endif;?>" id="city" type="text" name="estimate_city" value="<?php echo $this->escapeHtml($this->getEstimateCity()) ?>" />
|
227 |
-
|
228 |
-
</div>
|
229 |
-
|
230 |
-
</li>
|
231 |
-
|
232 |
-
<?php endif; ?>
|
233 |
-
|
234 |
-
<li>
|
235 |
-
|
236 |
-
<label for="postcode"<?php if ($this->isZipCodeRequired()) echo ' class="required"' ?>><?php if ($this->isZipCodeRequired()) echo '<em>*</em>' ?><?php echo $this->__('Zip/Postal Code') ?></label>
|
237 |
-
|
238 |
-
<div class="input-box postcode_suburb">
|
239 |
-
|
240 |
-
<?php /*?><input class="input-text validate-number validate-postcode<?php if ($this->isZipCodeRequired()):?> required-entry<?php endif;?>" type="text" id="postcode" name="estimate_postcode" value="<?php if($postocde_val){ echo $postocde_val;} else { echo $this->escapeHtml($this->getEstimatePostcode()); } ?>" maxlength="4" /><?php */?>
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
<input id="autosuggest" type="text" />
|
245 |
-
|
246 |
-
<input type="hidden" name="suburb" id="suburb" value="" />
|
247 |
-
|
248 |
-
<input type="hidden" name="postcode" id="postcode" value="" />
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
<?php
|
253 |
-
|
254 |
-
//echo $tmp_cart_postcode_val; die('val');
|
255 |
-
|
256 |
-
if(!$tmp_cart_postcode_val=='' || !$tmp_cart_locality_val==''){ ?>
|
257 |
-
|
258 |
-
<script type="text/javascript">
|
259 |
-
|
260 |
-
var prev_suggest_value = '<div class="previous-selection"><span class="text"><?php echo 'Your Last Selection:'.' '?></span><span class="post"><?php echo 'Postcode:'.' '.$tmp_cart_postcode_val.' '; ?></span><span class="locality"><?php echo 'Suburb:'.' '.$tmp_cart_locality_val?></span></div>';
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
jQuery(document).ready(function(e) {
|
265 |
-
|
266 |
-
if(jQuery(".as-selections").find(".as-selection-item").html()){
|
267 |
-
|
268 |
-
} else {
|
269 |
-
|
270 |
-
jQuery("#shipping-zip-form .postcode_suburb").after(prev_suggest_value);
|
271 |
-
|
272 |
-
}
|
273 |
-
|
274 |
-
});
|
275 |
-
|
276 |
-
</script>
|
277 |
-
|
278 |
-
<?php } ?>
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
</div>
|
283 |
-
|
284 |
-
</li>
|
285 |
-
|
286 |
-
</ul>
|
287 |
-
|
288 |
-
<div class="buttons-set">
|
289 |
-
|
290 |
-
<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>
|
291 |
-
|
292 |
-
</div>
|
293 |
-
|
294 |
-
</form>
|
295 |
-
|
296 |
-
<script type="text/javascript">
|
297 |
-
|
298 |
-
//<![CDATA[
|
299 |
-
|
300 |
-
new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>);
|
301 |
-
|
302 |
-
//]]>
|
303 |
-
|
304 |
-
</script>
|
305 |
-
|
306 |
-
<?php //if (($_shippingRateGroups = $this->getEstimateRates())): ?>
|
307 |
-
|
308 |
-
<form id="co-shipping-method-form" action="<?php echo $this->getUrl('checkout/cart/estimateUpdatePost') ?>">
|
309 |
-
|
310 |
-
<dl class="sp-methods">
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
<?php
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
//$quotes_val = Mage::register('store_id', Mage::app()->getStore()->getId());
|
319 |
-
|
320 |
-
//$quotes_val = Mage::registry('quotes_val');
|
321 |
-
|
322 |
-
//echo '<pre>'; print_r($quotes_val); //die('val');
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
//$val = Mage::getSingleton('checkout/session')->getQuote();
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
$quotes_val = Mage::getSingleton('core/session')->getSomeSessionVar();
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
//echo $country_val. $postocde_val . $regionid_val . $region_val; //die('data');
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
//echo '<pre>'; print_r($quotes_val);
|
343 |
-
|
344 |
-
//die('sess set');
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
if($quotes_val){ //die('response');
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
?>
|
353 |
-
|
354 |
-
<dt><?php echo $this->__('Carrier');?></dt>
|
355 |
-
|
356 |
-
<dd>
|
357 |
-
|
358 |
-
<ul>
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
<?php
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
//foreach($quotes_val as $key => $val) {
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
$display_carriers = Mage::getStoreConfig('transdirect_section/displayoptions/availablecoriers');
|
371 |
-
|
372 |
-
$available_carriers = explode( ',', $display_carriers);
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
foreach ($quotes_val as $key => $val):
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
if(in_array($key,$available_carriers)) {
|
381 |
-
|
382 |
-
//echo '<br>'.$key . ' - matched<br>';
|
383 |
-
|
384 |
-
$xyz[$key] = $quotes_val[$key];
|
385 |
-
|
386 |
-
}
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
endforeach; //die;
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
foreach($xyz as $key => $abc):
|
395 |
-
|
396 |
-
if($key){
|
397 |
-
|
398 |
-
?>
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
<li>
|
403 |
-
|
404 |
-
<label for="s_method">
|
405 |
-
|
406 |
-
<?php
|
407 |
-
|
408 |
-
$display_showcouriername = Mage::getStoreConfig('transdirect_section/displayoptions/showcouriernames');
|
409 |
-
|
410 |
-
$display_surcharge = Mage::getStoreConfig('transdirect_section/displayoptions/handlingsurcharge');
|
411 |
-
|
412 |
-
$display_surcharge1 = Mage::getStoreConfig('transdirect_section/displayoptions/handlingsurcharge1');
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
if($display_showcouriername == '1'){
|
417 |
-
|
418 |
-
//echo $key;
|
419 |
-
|
420 |
-
if($key=='fastway'){echo $this->__("Fastway"); }
|
421 |
-
|
422 |
-
if($key=='toll_priority_overnight'){echo $this->__("Toll Priority Overnight"); }
|
423 |
-
|
424 |
-
if($key=='couriers_please'){echo $this->__("Couriers Please"); }
|
425 |
-
|
426 |
-
if($key=='allied'){echo $this->__("Allied Express"); }
|
427 |
-
|
428 |
-
if($key=='toll'){echo $this->__("Toll"); }
|
429 |
-
|
430 |
-
if($key=='mainfreight'){echo $this->__("Mainfreight"); }
|
431 |
-
|
432 |
-
if($key=='northline'){echo $this->__("Northline"); }
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
}
|
437 |
-
|
438 |
-
if($display_showcouriername == '1' && $display_surcharge == '1') {
|
439 |
-
|
440 |
-
echo ' + '.$this->__("Handling Charge");
|
441 |
-
|
442 |
-
}
|
443 |
-
|
444 |
-
?>
|
445 |
-
|
446 |
-
<?php //echo $key.' '; ?>
|
447 |
-
|
448 |
-
<?php $curr_symbol = Mage::app()->getLocale()->currency(Mage::app()->getStore()->getCurrentCurrencyCode())->getSymbol();?>
|
449 |
-
|
450 |
-
<span class="price">
|
451 |
-
|
452 |
-
<?php
|
453 |
-
|
454 |
-
$tmp_display_surcharge = $abc['total'] + $display_surcharge1;
|
455 |
-
|
456 |
-
if($display_surcharge == '1'){
|
457 |
-
|
458 |
-
echo $curr_symbol. number_format($tmp_display_surcharge,2);
|
459 |
-
|
460 |
-
} else {
|
461 |
-
|
462 |
-
echo $curr_symbol. number_format($abc['total'],2);
|
463 |
-
|
464 |
-
}
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
?></span>
|
469 |
-
|
470 |
-
<span>
|
471 |
-
|
472 |
-
<?php echo '(Shipping Time - '. $abc['transit_time'].')'; ?>
|
473 |
-
|
474 |
-
</span>
|
475 |
-
|
476 |
-
</label>
|
477 |
-
|
478 |
-
</li>
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
<?php }
|
483 |
-
|
484 |
-
endforeach; //} ?>
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
</ul>
|
489 |
-
|
490 |
-
</dd>
|
491 |
-
|
492 |
-
<?php }
|
493 |
-
|
494 |
-
if($quotes_val == '' && $postocde_val != ''){
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
$display_fixedprice = Mage::getStoreConfig('transdirect_section/displayoptions/fixedpriceonerror');
|
499 |
-
|
500 |
-
$display_fixedprice1 = Mage::getStoreConfig('transdirect_section/displayoptions/fixedpriceonerror1');
|
501 |
-
|
502 |
-
?>
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
<dt><?php echo $this->__('Carrier');?></dt>
|
507 |
-
|
508 |
-
<dd>
|
509 |
-
|
510 |
-
<ul>
|
511 |
-
|
512 |
-
<li>
|
513 |
-
|
514 |
-
<label for="s_method"> <?php echo $this->__('Fixed Price'); ?>
|
515 |
-
|
516 |
-
<span class="price"> <?php echo $display_fixedprice1; ?> </span>
|
517 |
-
|
518 |
-
</label>
|
519 |
-
|
520 |
-
</li>
|
521 |
-
|
522 |
-
</ul>
|
523 |
-
|
524 |
-
</dd>
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
<?php } ?>
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
</dl>
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
<script type="text/javascript">
|
537 |
-
|
538 |
-
//<![CDATA[
|
539 |
-
|
540 |
-
var coShippingMethodForm = new VarienForm('shipping-zip-form');
|
541 |
-
|
542 |
-
var countriesWithOptionalZip = <?php echo $this->helper('directory')->getCountriesWithOptionalZip(true) ?>;
|
543 |
-
|
544 |
-
coShippingMethodForm.submit = function () {
|
545 |
-
|
546 |
-
var country = $F('country');
|
547 |
-
|
548 |
-
var optionalZip = false;
|
549 |
-
|
550 |
-
var optionregion = false;
|
551 |
-
|
552 |
-
for (i=0; i < countriesWithOptionalZip.length; i++) {
|
553 |
-
|
554 |
-
if (countriesWithOptionalZip[i] == country) {
|
555 |
-
|
556 |
-
optionalZip = true;
|
557 |
-
|
558 |
-
}
|
559 |
-
|
560 |
-
}
|
561 |
-
|
562 |
-
if (optionalZip) {
|
563 |
-
|
564 |
-
$('postcode').removeClassName('required-entry');
|
565 |
-
|
566 |
-
}
|
567 |
-
|
568 |
-
else {
|
569 |
-
|
570 |
-
$('postcode').addClassName('required-entry');
|
571 |
-
|
572 |
-
}
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
/*if (optionregion) {
|
577 |
-
|
578 |
-
$('region').removeClassName('required-entry');
|
579 |
-
|
580 |
-
}
|
581 |
-
|
582 |
-
else {
|
583 |
-
|
584 |
-
$('region').addClassName('required-entry');
|
585 |
-
|
586 |
-
}*/
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
return VarienForm.prototype.submit.bind(coShippingMethodForm)();
|
591 |
-
|
592 |
-
}
|
593 |
-
|
594 |
-
//]]>
|
595 |
-
|
596 |
-
</script>
|
597 |
-
|
598 |
-
</div>
|
599 |
-
|
600 |
-
</div>
|
601 |
-
|
602 |
-
<style type="text/css">
|
603 |
-
|
604 |
-
.shipping_product {border: 1px solid #D0CBC1; margin: 0 0 18px; padding: 10px;}
|
605 |
-
|
606 |
-
.shipping-form,.form-list .input-box, .form-list select {width:100%;}
|
607 |
-
|
608 |
-
.form-list input.input-text{width:97%;}
|
609 |
-
|
610 |
-
</style>
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/default/default/template/ship/shipping.phtml
DELETED
@@ -1,719 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
|
5 |
-
* Magento
|
6 |
-
|
7 |
-
*
|
8 |
-
|
9 |
-
* NOTICE OF LICENSE
|
10 |
-
|
11 |
-
*
|
12 |
-
|
13 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
14 |
-
|
15 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
16 |
-
|
17 |
-
* It is also available through the world-wide-web at this URL:
|
18 |
-
|
19 |
-
* http://opensource.org/licenses/afl-3.0.php
|
20 |
-
|
21 |
-
* If you did not receive a copy of the license and are unable to
|
22 |
-
|
23 |
-
* obtain it through the world-wide-web, please send an email
|
24 |
-
|
25 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
26 |
-
|
27 |
-
*
|
28 |
-
|
29 |
-
* DISCLAIMER
|
30 |
-
|
31 |
-
*
|
32 |
-
|
33 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
34 |
-
|
35 |
-
* versions in the future. If you wish to customize Magento for your
|
36 |
-
|
37 |
-
* needs please refer to http://www.magentocommerce.com for more information.
|
38 |
-
|
39 |
-
*
|
40 |
-
|
41 |
-
* @category design
|
42 |
-
|
43 |
-
* @package base_default
|
44 |
-
|
45 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
46 |
-
|
47 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
48 |
-
|
49 |
-
*/
|
50 |
-
|
51 |
-
?>
|
52 |
-
|
53 |
-
<?php /** @var $this Mage_Checkout_Block_Cart_Shipping */
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
?>
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
<?php if(Mage::getStoreConfig('transdirect_section/enabletab/enable')){ ?>
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
<!--<link href="<?php echo $this->getSkinUrl();?>ship/js/jquery.autoSuggest.css" rel="stylesheet" />
|
66 |
-
|
67 |
-
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
|
68 |
-
|
69 |
-
<script type="text/javascript" src="https://www.transdirect.com.au/api/locations/script"></script>
|
70 |
-
|
71 |
-
<script src="<?php //echo $this->getSkinUrl();?>ship/js/location_script.js"></script>
|
72 |
-
|
73 |
-
<script src="<?php echo $this->getSkinUrl();?>ship/js/jquery.autoSuggest.js"></script>-->
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
<script type="text/javascript">
|
78 |
-
|
79 |
-
jQuery(document).ready(function(e) {
|
80 |
-
|
81 |
-
var result;
|
82 |
-
|
83 |
-
var data = {items: []};
|
84 |
-
|
85 |
-
jQuery.each( TDLocationsList, function( i, item ) {
|
86 |
-
|
87 |
-
data.items.push({ value: TDLocationsList[i].postcode +' '+ TDLocationsList[i].locality , name: TDLocationsList[i].postcode +' '+ TDLocationsList[i].locality});
|
88 |
-
|
89 |
-
});
|
90 |
-
|
91 |
-
jQuery("#autosuggest").autoSuggest(data.items,
|
92 |
-
|
93 |
-
{
|
94 |
-
|
95 |
-
selectedItemProp: "name",
|
96 |
-
|
97 |
-
searchObjProps: "name",
|
98 |
-
|
99 |
-
selectionLimit: 1,
|
100 |
-
|
101 |
-
minChars: 3,
|
102 |
-
|
103 |
-
selectionAdded: function(elem)
|
104 |
-
|
105 |
-
{
|
106 |
-
|
107 |
-
result = elem.text();
|
108 |
-
|
109 |
-
getresultval(result);
|
110 |
-
|
111 |
-
}
|
112 |
-
|
113 |
-
}
|
114 |
-
|
115 |
-
);
|
116 |
-
|
117 |
-
function getresultval(res){
|
118 |
-
|
119 |
-
var postcode = res.substr(1,4);
|
120 |
-
|
121 |
-
var locality = res.substr(6);
|
122 |
-
|
123 |
-
jQuery('#suburb').attr("value", locality);
|
124 |
-
|
125 |
-
jQuery('#postcode').attr("value", postcode);
|
126 |
-
|
127 |
-
|
128 |
-
var d = new Date();
|
129 |
-
d.setTime(d.getTime() + (5*24*60*60*1000));
|
130 |
-
|
131 |
-
document.cookie="cart_postocde="+postcode+"; expires="+d.toUTCString()+"; path=/";
|
132 |
-
document.cookie="cart_locality="+locality+"; expires="+d.toUTCString()+"; path=/";
|
133 |
-
|
134 |
-
/*document.cookie="cart_postocde="+postcode;
|
135 |
-
|
136 |
-
document.cookie="cart_locality="+locality;*/
|
137 |
-
|
138 |
-
}
|
139 |
-
|
140 |
-
if(jQuery( ".as-results .as-message:contains('No Results Found')" )){
|
141 |
-
|
142 |
-
jQuery(".postcode_suburb .as-results").css("display","none");
|
143 |
-
|
144 |
-
}
|
145 |
-
|
146 |
-
});
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
</script>
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
<?php
|
155 |
-
|
156 |
-
$tmp_cart_postcode_val = $_COOKIE['cart_postocde'];
|
157 |
-
|
158 |
-
$tmp_cart_locality_val = $_COOKIE['cart_locality'];
|
159 |
-
|
160 |
-
?>
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
<?php Mage::getSingleton('core/session')->unsCartpostcodeVal();
|
165 |
-
|
166 |
-
Mage::getSingleton('core/session')->unsCartlocalityVal();
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
// $cart_postcode_val = Mage::getSingleton('core/session')->setCartpostcodeVal($tmp_cart_postcode_val);
|
171 |
-
|
172 |
-
// $cart_locality_val = Mage::getSingleton('core/session')->setCartlocalityVal($tmp_cart_locality_val);
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
?>
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
<?php
|
181 |
-
$transit_val = Mage::getSingleton('core/session')->getTransitVal(); //die('tra');
|
182 |
-
$quotes_val1 = Mage::getSingleton('core/session')->getSomeSessionVar1();
|
183 |
-
$booking_id = Mage::getSingleton('core/session')->getSomeSessionVar2();
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
// var_dump($transit_val);
|
188 |
-
|
189 |
-
// var_dump($quotes_val1);
|
190 |
-
|
191 |
-
//echo '<pre>'; print_r($quotes_val1); die;
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
//$quote_form_postcode_val = Mage::getSingleton('core/session')->setPostcodeVal($postcode); // In the Controller
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
?>
|
200 |
-
|
201 |
-
<div class="shipping">
|
202 |
-
|
203 |
-
<h2><?php echo $this->__('Get A Shipping Quote') ?></h2>
|
204 |
-
|
205 |
-
<?php echo $this->getChildHtml('global_messages') ?>
|
206 |
-
|
207 |
-
<div class="shipping-form">
|
208 |
-
|
209 |
-
<form action="<?php echo $this->getUrl('checkout/cart/estimatePost') ?>" method="post" id="shipping-zip-form">
|
210 |
-
|
211 |
-
<p><?php echo $this->__('Enter your destination to get a shipping estimate.') ?></p>
|
212 |
-
|
213 |
-
<ul class="form-list">
|
214 |
-
|
215 |
-
<li>
|
216 |
-
|
217 |
-
<label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
|
218 |
-
|
219 |
-
<div class="input-box">
|
220 |
-
|
221 |
-
<select name="country_id" id="country" class="validate-select" title="Country" >
|
222 |
-
|
223 |
-
<option value="AU" selected="selected" >Australia</option>
|
224 |
-
|
225 |
-
</select>
|
226 |
-
|
227 |
-
</div>
|
228 |
-
|
229 |
-
<?php /*?><div class="input-box">
|
230 |
-
|
231 |
-
<?php echo Mage::getBlockSingleton('directory/data')->getCountryHtmlSelect($this->getEstimateCountryId()) ?>
|
232 |
-
|
233 |
-
</div><?php */?>
|
234 |
-
|
235 |
-
</li>
|
236 |
-
|
237 |
-
<?php //if($this->getStateActive()): ?>
|
238 |
-
|
239 |
-
<?php /*?>
|
240 |
-
|
241 |
-
<li>
|
242 |
-
|
243 |
-
<label for="region_id"<?php if ($this->isStateProvinceRequired()) echo ' class="required"' ?>>
|
244 |
-
|
245 |
-
<?php if ($this->isStateProvinceRequired()) echo '<em>*</em>' ?>
|
246 |
-
|
247 |
-
<?php echo $this->__('Suburb') ?></label>
|
248 |
-
|
249 |
-
<div class="input-box">
|
250 |
-
|
251 |
-
<select id="region_id" name="region_id" title="<?php echo $this->__('Suburb') ?>" style="display:none;"<?php echo ($this->isStateProvinceRequired() ? ' class="validate-select"' : '') ?>>
|
252 |
-
|
253 |
-
<option value=""><?php echo $this->__('Please select region, state or province') ?></option>
|
254 |
-
|
255 |
-
</select>
|
256 |
-
|
257 |
-
<script type="text/javascript">
|
258 |
-
|
259 |
-
//<![CDATA[
|
260 |
-
|
261 |
-
$('region_id').setAttribute('defaultValue', "<?php echo $this->getEstimateRegionId() ?>");
|
262 |
-
|
263 |
-
//]]>
|
264 |
-
|
265 |
-
</script>
|
266 |
-
|
267 |
-
<input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getEstimateRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text required-entry" />
|
268 |
-
|
269 |
-
</div>
|
270 |
-
|
271 |
-
</li><?php */?>
|
272 |
-
|
273 |
-
<?php //endif; ?>
|
274 |
-
|
275 |
-
<?php if($this->getCityActive()): ?>
|
276 |
-
|
277 |
-
<li>
|
278 |
-
|
279 |
-
<label for="city"<?php if ($this->isCityRequired()) echo ' class="required"' ?>>
|
280 |
-
|
281 |
-
<?php if ($this->isCityRequired()) echo '<em>*</em>' ?>
|
282 |
-
|
283 |
-
<?php echo $this->__('City') ?></label>
|
284 |
-
|
285 |
-
<div class="input-box">
|
286 |
-
|
287 |
-
<input class="input-text<?php if ($this->isCityRequired()):?> required-entry<?php endif;?>" id="city" type="text" name="estimate_city" value="<?php echo $this->escapeHtml($this->getEstimateCity()) ?>" />
|
288 |
-
|
289 |
-
</div>
|
290 |
-
|
291 |
-
</li>
|
292 |
-
|
293 |
-
<?php endif; ?>
|
294 |
-
|
295 |
-
<li>
|
296 |
-
|
297 |
-
<label for="postcode"<?php if ($this->isZipCodeRequired()) echo ' class="required"' ?>>
|
298 |
-
|
299 |
-
<?php if ($this->isZipCodeRequired()) echo '<em>*</em>' ?>
|
300 |
-
|
301 |
-
<?php echo $this->__('Suburb / Postal Code') ?></label>
|
302 |
-
|
303 |
-
<div class="input-box postcode_suburb">
|
304 |
-
|
305 |
-
<?php /*?><input class="input-text validate-number validate-postcode<?php if ($this->isZipCodeRequired()):?> required-entry<?php endif;?>" type="text" id="postcode" name="estimate_postcode" value="<?php echo $this->escapeHtml($this->getEstimatePostcode()) ?>" maxlength="4"/><?php */?>
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
<input id="autosuggest" type="text" />
|
310 |
-
|
311 |
-
<input type="hidden" name="suburb" id="suburb" value="" />
|
312 |
-
|
313 |
-
<input type="hidden" name="postcode" id="postcode" value="" />
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
<?php
|
318 |
-
|
319 |
-
//echo $tmp_cart_postcode_val; die('val');
|
320 |
-
|
321 |
-
if(!$tmp_cart_postcode_val=='' || !$tmp_cart_locality_val==''){ ?>
|
322 |
-
|
323 |
-
<script type="text/javascript">
|
324 |
-
|
325 |
-
var prev_suggest_value = '<div class="previous-selection"><span class="text"><?php echo 'Your Last Selection:'.' '?></span><span class="post"><?php echo 'Postcode:'.' '.$tmp_cart_postcode_val.' '; ?></span><span class="locality"><?php echo 'Suburb:'.' '.$tmp_cart_locality_val?></span></div>';
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
jQuery(document).ready(function(e) {
|
330 |
-
|
331 |
-
if(jQuery(".as-selections").find(".as-selection-item").html()){
|
332 |
-
|
333 |
-
jQuery(".previous-selection").css('display','none');
|
334 |
-
|
335 |
-
} else {
|
336 |
-
|
337 |
-
jQuery("#shipping-zip-form .postcode_suburb").after(prev_suggest_value);
|
338 |
-
|
339 |
-
}
|
340 |
-
|
341 |
-
});
|
342 |
-
|
343 |
-
</script>
|
344 |
-
|
345 |
-
<?php } ?>
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
</div>
|
350 |
-
|
351 |
-
</li>
|
352 |
-
|
353 |
-
</ul>
|
354 |
-
|
355 |
-
<div class="buttons-set">
|
356 |
-
|
357 |
-
<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>
|
358 |
-
|
359 |
-
</div>
|
360 |
-
|
361 |
-
</form>
|
362 |
-
|
363 |
-
<script type="text/javascript">
|
364 |
-
|
365 |
-
//<![CDATA[
|
366 |
-
|
367 |
-
new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>);
|
368 |
-
|
369 |
-
//]]>
|
370 |
-
|
371 |
-
</script>
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
<?php if (($_shippingRateGroups = $this->getEstimateRates())): ?>
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
<form id="co-shipping-method-form" action="<?php echo $this->getUrl('checkout/cart/estimateUpdatePost') ?>">
|
380 |
-
|
381 |
-
<dl class="sp-methods">
|
382 |
-
|
383 |
-
<dt><?php echo $this->__("Carrier"); ?></dt>
|
384 |
-
|
385 |
-
<?php
|
386 |
-
|
387 |
-
/*function cmp($a, $b) {
|
388 |
-
|
389 |
-
$display_quote = Mage::getStoreConfig('transdirect_section/displayoptions/quotedisplay');
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
if($display_quote == 'display_cheapest'){ return strcmp($a['price'], $b['price']); } else { return strcmp($a['method_title'], $b['method_title']); }
|
394 |
-
|
395 |
-
} */
|
396 |
-
|
397 |
-
function cmp($key) {
|
398 |
-
|
399 |
-
return function ($a, $b) use ($key) {
|
400 |
-
|
401 |
-
return strnatcmp($a[$key], $b[$key]);
|
402 |
-
|
403 |
-
};
|
404 |
-
|
405 |
-
}
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
$display_quote = Mage::getStoreConfig('transdirect_section/displayoptions/quotedisplay');
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
/* function build_sorter($key) {
|
414 |
-
|
415 |
-
return function ($a, $b) use ($key) {
|
416 |
-
|
417 |
-
return strnatcmp($a[$key], $b[$key]);
|
418 |
-
|
419 |
-
};
|
420 |
-
|
421 |
-
}*/
|
422 |
-
|
423 |
-
//echo '<pre>'; print_r($_shippingRateGroups); die;
|
424 |
-
|
425 |
-
?>
|
426 |
-
|
427 |
-
<!-- get data -->
|
428 |
-
|
429 |
-
<?php /*?> <dt><?php echo $this->escapeHtml($this->getCarrierName($code)) ?></dt><?php */
|
430 |
-
|
431 |
-
?>
|
432 |
-
|
433 |
-
<dd>
|
434 |
-
|
435 |
-
<ul>
|
436 |
-
|
437 |
-
<?php //usort($_rates, 'cmp');
|
438 |
-
|
439 |
-
foreach ($_shippingRateGroups as $code => $_rates):
|
440 |
-
|
441 |
-
foreach ($_rates as $ratekey => $_rate):
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
$xyz[] = $_rates[$ratekey]->getData();
|
446 |
-
|
447 |
-
$ratekey = sizeof($xyz) - 1;
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
foreach ($quotes_val1 as $key => $val):
|
452 |
-
|
453 |
-
//echo $key .' = '. $xyz[$ratekey]['method'].'<br>';
|
454 |
-
|
455 |
-
//echo $quotes_val1[$key]['transit_time'];
|
456 |
-
|
457 |
-
if($key == $xyz[$ratekey]['method']) {
|
458 |
-
|
459 |
-
// var_dump($xyz[$ratekey]);
|
460 |
-
|
461 |
-
$xyz[$ratekey]['transit_time'] = $quotes_val1[$key]['transit_time'];
|
462 |
-
|
463 |
-
break;
|
464 |
-
|
465 |
-
}
|
466 |
-
|
467 |
-
endforeach;
|
468 |
-
|
469 |
-
//die;
|
470 |
-
|
471 |
-
//$xyz[] = $transit_val;
|
472 |
-
|
473 |
-
//echo '<pre>'; print_r($_rate->getData());
|
474 |
-
|
475 |
-
endforeach;
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
endforeach;
|
480 |
-
|
481 |
-
//echo '<pre>'; print_r($xyz); die;
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
// sorting
|
486 |
-
|
487 |
-
if($display_quote == 'display_cheapest'){ usort($xyz, cmp('price')); }
|
488 |
-
|
489 |
-
if($display_quote == 'display_all_quotes'){ usort($xyz, cmp('method_title')); }
|
490 |
-
|
491 |
-
if($display_quote == 'display_cheapest_fastest'){ usort($xyz, cmp('transit_time')); }
|
492 |
-
|
493 |
-
//usort($xyz, cmp('price'));
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
/*
|
498 |
-
|
499 |
-
$display_quote = Mage::getStoreConfig('transdirect_section/displayoptions/quotedisplay');
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
if($display_quote == 'display_cheapest'){ usort($xyz, build_sorter('price')); }
|
504 |
-
|
505 |
-
if($display_quote == 'display_all_quotes'){ usort($xyz, build_sorter('price')); }
|
506 |
-
|
507 |
-
if($display_quote == 'display_cheapest_fastest'){ usort($xyz, build_sorter('price')); }
|
508 |
-
|
509 |
-
*/
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
//echo '<pre>'; print_r($xyz);
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
// display
|
518 |
-
|
519 |
-
foreach($xyz as $key => $abc):
|
520 |
-
|
521 |
-
//echo '<pre>'; print_r($abc); die('ship');
|
522 |
-
|
523 |
-
//endforeach;
|
524 |
-
|
525 |
-
//echo $abc['code'];die;
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
if($abc['method_title']){?>
|
530 |
-
|
531 |
-
<li<?php if ($_rate->getErrorMessage()) echo ' class="error-msg"';?>>
|
532 |
-
|
533 |
-
<?php if ($_rate->getErrorMessage()): ?>
|
534 |
-
|
535 |
-
<?php echo $this->escapeHtml($_rate->getErrorMessage()) ?>
|
536 |
-
|
537 |
-
<?php else: ?>
|
538 |
-
|
539 |
-
<input name="estimate_method" type="radio" value="<?php echo $abc['code'];
|
540 |
-
|
541 |
-
//$this->escapeHtml($_rate->getCode()) ?>" id="s_method_<?php echo $abc['code'] ?>"
|
542 |
-
|
543 |
-
<?php if($abc['code']===$this->getAddressShippingMethod()) echo ' checked="checked"' ?>
|
544 |
-
|
545 |
-
class="radio" />
|
546 |
-
|
547 |
-
<label for="s_method_<?php echo $abc['code']; ?>">
|
548 |
-
|
549 |
-
<?php
|
550 |
-
|
551 |
-
$display_showcouriername = Mage::getStoreConfig('transdirect_section/displayoptions/showcouriernames');
|
552 |
-
|
553 |
-
if($display_showcouriername == '1'){
|
554 |
-
|
555 |
-
echo $abc['method_title'];
|
556 |
-
|
557 |
-
/*
|
558 |
-
|
559 |
-
if($abc['method_title']=='fastway'){echo $this->__("Fastway"); }
|
560 |
-
|
561 |
-
if($abc['method_title']=='toll_priority_overnight'){echo $this->__("Toll Priority Overnight"); }
|
562 |
-
|
563 |
-
if($abc['method_title']=='couriers_please'){echo $this->__("Couriers Please"); }
|
564 |
-
|
565 |
-
if($abc['method_title']=='allied'){echo $this->__("Allied Express"); }
|
566 |
-
|
567 |
-
if($abc['method_title']=='toll'){echo $this->__("Toll"); }
|
568 |
-
|
569 |
-
if($abc['method_title']=='mainfreight'){echo $this->__("Mainfreight"); }
|
570 |
-
|
571 |
-
if($abc['method_title']=='northline'){echo $this->__("Northline"); }
|
572 |
-
|
573 |
-
*/
|
574 |
-
|
575 |
-
//$this->escapeHtml($_rate->getMethodTitle());
|
576 |
-
|
577 |
-
}
|
578 |
-
|
579 |
-
?>
|
580 |
-
|
581 |
-
<?php $_excl = $this->getShippingPrice($abc['price'],
|
582 |
-
|
583 |
-
$this->helper('tax')->displayShippingPriceIncludingTax()); ?>
|
584 |
-
|
585 |
-
<?php $_incl = $this->getShippingPrice($abc['price'], true); ?>
|
586 |
-
|
587 |
-
<?php echo $_excl; ?>
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
<?php if ($this->helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?>
|
592 |
-
|
593 |
-
(<?php echo $this->__('Incl. Tax'); ?> <?php echo $_incl; ?>)
|
594 |
-
|
595 |
-
<?php endif; ?>
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
<?php if($abc['method_title'] != 'Fixed Price' && $abc['transit_time'] != '') {?>
|
600 |
-
|
601 |
-
<span> <?php echo ' (Shipping Time - '. $abc['transit_time'].')';?> </span>
|
602 |
-
|
603 |
-
<?php } ?>
|
604 |
-
|
605 |
-
</label>
|
606 |
-
|
607 |
-
<?php endif; ?>
|
608 |
-
|
609 |
-
</li>
|
610 |
-
|
611 |
-
<?php }
|
612 |
-
|
613 |
-
endforeach;
|
614 |
-
|
615 |
-
// die('rate'); ?>
|
616 |
-
|
617 |
-
<?php /*?> <li>
|
618 |
-
|
619 |
-
<input name="estimate_method" type="radio" value="<?php echo $this->escapeHtml($_rate->getCode()) ?>" id="s_method_<?php echo $_rate->getCode() ?>"<?php if($_rate->getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> class="radio" />
|
620 |
-
|
621 |
-
<label for="s_method_<?php echo $_rate->getCode() ?>"><?php echo $this->escapeHtml($_rate->getMethodTitleOne()) ?>
|
622 |
-
|
623 |
-
<?php $_incl = $this->getShippingPrice($_rate->getPriceOne(), true); ?>
|
624 |
-
|
625 |
-
</li><?php */?>
|
626 |
-
|
627 |
-
</ul>
|
628 |
-
|
629 |
-
</dd>
|
630 |
-
|
631 |
-
<?php //endforeach; ?>
|
632 |
-
|
633 |
-
</dl>
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
<div class="buttons-set">
|
640 |
-
|
641 |
-
<button type="submit" title="<?php echo $this->__('Update Total') ?>" class="button" name="do" value="<?php echo $this->__('Update Total') ?>"><span><span><?php echo $this->__('Update Total') ?></span></span></button>
|
642 |
-
|
643 |
-
</div>
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
</form>
|
648 |
-
|
649 |
-
<?php endif; ?>
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
<script type="text/javascript">
|
654 |
-
|
655 |
-
//<![CDATA[
|
656 |
-
|
657 |
-
var coShippingMethodForm = new VarienForm('shipping-zip-form');
|
658 |
-
|
659 |
-
var countriesWithOptionalZip = <?php echo $this->helper('directory')->getCountriesWithOptionalZip(true) ?>;
|
660 |
-
|
661 |
-
coShippingMethodForm.submit = function () {
|
662 |
-
|
663 |
-
var country = $F('country');
|
664 |
-
|
665 |
-
var optionalZip = false;
|
666 |
-
|
667 |
-
var optionregion = false;
|
668 |
-
|
669 |
-
for (i=0; i < countriesWithOptionalZip.length; i++) {
|
670 |
-
|
671 |
-
if (countriesWithOptionalZip[i] == country) {
|
672 |
-
|
673 |
-
optionalZip = true;
|
674 |
-
|
675 |
-
}
|
676 |
-
|
677 |
-
}
|
678 |
-
|
679 |
-
if (optionalZip) {
|
680 |
-
|
681 |
-
$('postcode').removeClassName('required-entry');
|
682 |
-
|
683 |
-
}
|
684 |
-
|
685 |
-
else {
|
686 |
-
|
687 |
-
$('postcode').addClassName('required-entry');
|
688 |
-
|
689 |
-
}
|
690 |
-
|
691 |
-
/* if (optionregion) {
|
692 |
-
|
693 |
-
$('region').removeClassName('required-entry');
|
694 |
-
|
695 |
-
}
|
696 |
-
|
697 |
-
else {
|
698 |
-
|
699 |
-
$('region').addClassName('required-entry');
|
700 |
-
|
701 |
-
}
|
702 |
-
|
703 |
-
*/
|
704 |
-
|
705 |
-
return VarienForm.prototype.submit.bind(coShippingMethodForm)();
|
706 |
-
|
707 |
-
}
|
708 |
-
|
709 |
-
//]]>
|
710 |
-
|
711 |
-
</script>
|
712 |
-
|
713 |
-
</div>
|
714 |
-
|
715 |
-
</div>
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
<?php } ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/{code/local/Transdirect/Ship/sql → design/frontend/rwd/default/template/ship}/.DS_Store
RENAMED
Binary file
|
package.xml
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Transdirect_Shipping</name>
|
4 |
-
<version>1.1.
|
5 |
<stability>stable</stability>
|
6 |
-
<license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>This Extension provides delivery quotes from Australia's largest Carriers in a Seamless checkout process.</summary>
|
@@ -27,14 +27,20 @@ and more.
|
|
27 |

|
28 |
- Insurance Options available.
|
29 |

|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
To find out more about Transdirect's service, please contact sales@transdirect.com.au.
|
31 |

|
32 |
Transdirect - Delivering Solutions.</description>
|
33 |
-
<notes>
|
34 |
-
<authors><author><name>Joshua Oliver</name><user>
|
35 |
-
<date>
|
36 |
-
<time>
|
37 |
-
<contents><target name="magelocal"><dir name="Transdirect"><dir name="Ship"><dir name="Block"><dir name="Adminhtml"><file name="Grid.php" hash="fd7f272097ff678f7a7696c179f2a968"/><dir name="System"><dir name="Config"><file name="Date.php" hash="ad27b62a061cde0e1a8f05e06d960d81"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir><file name=".DS_Store" hash="413ad75aa33a5df85f230c6a4c955fde"/></dir><file name=".DS_Store" hash="b5d686c6ef525f9d00a5bd6760fb7600"/></dir><file name="Country.php" hash="
|
38 |
<compatible/>
|
39 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
40 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Transdirect_Shipping</name>
|
4 |
+
<version>1.1.4</version>
|
5 |
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>This Extension provides delivery quotes from Australia's largest Carriers in a Seamless checkout process.</summary>
|
27 |

|
28 |
- Insurance Options available.
|
29 |

|
30 |
+
---
|
31 |
+

|
32 |
+
This extension will allow your clients to get accurate shipping quotes australia wide via the transdirect API.
|
33 |
+

|
34 |
+
---
|
35 |
+

|
36 |
To find out more about Transdirect's service, please contact sales@transdirect.com.au.
|
37 |

|
38 |
Transdirect - Delivering Solutions.</description>
|
39 |
+
<notes>Fixed error/issues</notes>
|
40 |
+
<authors><author><name>Joshua Oliver</name><user>Josh</user><email>josh+transdirect@bywave.com.au</email></author></authors>
|
41 |
+
<date>2016-03-29</date>
|
42 |
+
<time>08:43:58</time>
|
43 |
+
<contents><target name="magelocal"><dir name="Transdirect"><dir name="Ship"><dir name="Block"><dir name="Adminhtml"><file name="Grid.php" hash="fd7f272097ff678f7a7696c179f2a968"/><dir name="System"><dir name="Config"><file name="Date.php" hash="ad27b62a061cde0e1a8f05e06d960d81"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir><file name=".DS_Store" hash="413ad75aa33a5df85f230c6a4c955fde"/></dir><file name=".DS_Store" hash="b5d686c6ef525f9d00a5bd6760fb7600"/></dir><file name="Country.php" hash="a0f91831dc1ac4330e1d9e0ff548ddf5"/><file name="Couriers.php" hash="65de59dcb8df329cc905568b0d2806d2"/><dir name="Custom"><file name="Order.php" hash="63d5a214f9ff005e8e131a755d84ebc2"/></dir><file name="Enablecourier.php" hash="5db639568161e90f0ff66a3facae7615"/><file name="Quotes.php" hash="0e539cc0a2831069789a3d9b3f647772"/><file name="Ship.php" hash="27112cddd22559ebd1f3d6b7abf64a3d"/><file name="Unitcourier.php" hash="9504d24c44a198384e4309d03d98a24b"/></dir><dir name="Helper"><file name="Data.php" hash="0252ec0e51cfda0a3f23ddf359f75202"/></dir><dir name="Model"><dir name="Carrier"><file name="Transdirect.php" hash="f640fcf7a01f9d6e9e1484e646cf241f"/></dir><file name="Observer.php" hash="190f8f9662de5e72ae4dcd405133ca11"/><dir name="Resource"><file name="Setup.php" hash="190fa03ddd1b3d6fff1b930122ea189b"/></dir><dir name="Source"><file name="AddressType.php" hash="c3f1548a42e4f7a2ecc42d2470837707"/><file name="Couriers.php" hash="574fc2c0480f7b4e517f12bfb9708a39"/><file name="OrderStatus.php" hash="654d24a98571156e0b31f24f910182ee"/><file name="Quotes.php" hash="d382cf07326522786c4f929bbb5e228f"/><file name="Unit.php" hash="31307975b626a49d0d06078cbee1ecd6"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><file name="Serialized.php" hash="b2eae87914abb9aac6606cfc09f4b2e3"/></dir><file name=".DS_Store" hash="17065e11290b0f019609037f64bb45c4"/></dir><file name=".DS_Store" hash="16da9705f2c6c41bc4f59460dc80842a"/></dir><file name=".DS_Store" hash="3831c8a3aac8444857f0035951233456"/></dir><dir name="controllers"><file name="IndexController.php" hash="beae45f2433619d17379421ee2b8289c"/></dir><dir name="etc"><file name="adminhtml.xml" hash="79534cef195241413dc4503010a9ad18"/><file name="config.xml" hash="1208f298c6c8ac4c612301cb74964897"/><file name="system.xml" hash="9750c40ac152cbc567c1d7da23b08b19"/></dir><dir name="sql"><dir name="ship_setup_catalog"><file name="mysql4-install-0.1.0.php" hash="ff4817bf11abbf293862311418d86e26"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir><dir name="ship_setup_sales"><file name="mysql4-install-0.1.0.php" hash="3ab28c009fa43907f495c4de18085274"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="ship.xml" hash="7b6b6dcee52e6af102111b227da4b16d"/></dir><dir name="template"><dir name="checkout"><dir name="onepage"><file name="shipping.html" hash=""/></dir></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="layout"><file name="ship.xml" hash="7b6b6dcee52e6af102111b227da4b16d"/></dir><dir name="template"><dir name="checkout"><dir name="onepage"><file name="custom-shipping.phtml" hash="88930ea6f21c47ef49243c55e28b2984"/></dir></dir><dir name="ship"><dir name="checkout"><dir name="cart"><file name="totals.phtml" hash="96e28634c4a68102067349ef0149cd32"/></dir></dir><dir name="footer"><file name="js.phtml" hash="729153a7b05e9e397ad96abbda8e3a84"/></dir><file name="product_shipping.phtml" hash="f86fc4817054df798c0549970bc9dc16"/><file name="shipping.phtml" hash="a8e00a911251ba4af976d77b838feb01"/><file name=".DS_Store" hash="a3c48e138e8da71e70b32f3fda1c51e5"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="system"><dir name="config"><dir name="form"><dir name="field"><file name="couriersarray.phtml" hash="44fab4c7b846230f8802ae71706e4377"/></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Transdirect_Ship.xml" hash="fbc66a2834c10ad65dd55a7dd4bea798"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="ship"><dir name="css"><file name="jquery.autoSuggest.css" hash="e976e6a48799083cf955aa5373d2838c"/></dir><dir name="js"><file name="jquery-1.11.0.js" hash="573025dfa115bc306dac7dfa18153675"/><file name="jquery.autoSuggest.js" hash="b1833197f28b1321b565b3c56b8a1403"/><file name="location_script.js" hash="9238343017e0cb8552bc7b02c6ad2c04"/></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="ship"><dir name="css"><file name="jquery.autoSuggest.css" hash="e976e6a48799083cf955aa5373d2838c"/></dir><dir name="js"><file name="jquery-1.11.0.js" hash="573025dfa115bc306dac7dfa18153675"/><file name="jquery.autoSuggest.js" hash="b1833197f28b1321b565b3c56b8a1403"/><file name="location_script.js" hash="9238343017e0cb8552bc7b02c6ad2c04"/></dir></dir></dir></dir></dir></target></contents>
|
44 |
<compatible/>
|
45 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
46 |
</package>
|