Version Notes
Stable
Download this release
Release Info
| Developer | Freight |
| Extension | FreightCenter_Freight_Shipping |
| Version | 1.0.12 |
| Comparing to | |
| See all releases | |
Code changes from version 1.0.1 to 1.0.12
- app/code/local/{Mage/Shipping → Excellence/Fee}/Model/Carrier/Flatrate.php +2 -2
- app/code/local/Excellence/Fee/etc/config.xml +5 -0
- app/code/local/Mage/Shipping/Block/Tracking/Ajax.php +0 -30
- app/code/local/Mage/Shipping/Block/Tracking/Popup.php +0 -269
- app/code/local/Mage/Shipping/Exception.php +0 -31
- app/code/local/Mage/Shipping/Helper/Data.php +0 -162
- app/code/local/Mage/Shipping/Model/Carrier/Abstract.php +0 -585
- app/code/local/Mage/Shipping/Model/Carrier/Flatrate_org21stJune.php +0 -115
- app/code/local/Mage/Shipping/Model/Carrier/Freeshipping.php +0 -126
- app/code/local/Mage/Shipping/Model/Carrier/Interface.php +0 -45
- app/code/local/Mage/Shipping/Model/Carrier/Pickup.php +0 -78
- app/code/local/Mage/Shipping/Model/Carrier/Tablerate.php +0 -280
- app/code/local/Mage/Shipping/Model/Config.php +0 -125
- app/code/local/Mage/Shipping/Model/Info.php +0 -169
- app/code/local/Mage/Shipping/Model/Mysql4/Carrier/Tablerate.php +0 -37
- app/code/local/Mage/Shipping/Model/Mysql4/Carrier/Tablerate/Collection.php +0 -38
- app/code/local/Mage/Shipping/Model/Rate/Abstract.php +0 -40
- app/code/local/Mage/Shipping/Model/Rate/Request.php +0 -140
- app/code/local/Mage/Shipping/Model/Rate/Result.php +0 -218
- app/code/local/Mage/Shipping/Model/Rate/Result/Abstract.php +0 -31
- app/code/local/Mage/Shipping/Model/Rate/Result/Error.php +0 -38
- app/code/local/Mage/Shipping/Model/Rate/Result/Method.php +0 -50
- app/code/local/Mage/Shipping/Model/Resource/Carrier/Tablerate.php +0 -471
- app/code/local/Mage/Shipping/Model/Resource/Carrier/Tablerate/Collection.php +0 -127
- app/code/local/Mage/Shipping/Model/Shipment/Request.php +0 -89
- app/code/local/Mage/Shipping/Model/Shipment/Return.php +0 -89
- app/code/local/Mage/Shipping/Model/Shipping.php +0 -506
- app/code/local/Mage/Shipping/Model/Source/HandlingAction.php +0 -35
- app/code/local/Mage/Shipping/Model/Source/HandlingType.php +0 -35
- app/code/local/Mage/Shipping/Model/Tracking/Result.php +0 -75
- app/code/local/Mage/Shipping/Model/Tracking/Result/Abstract.php +0 -31
- app/code/local/Mage/Shipping/Model/Tracking/Result/Error.php +0 -39
- app/code/local/Mage/Shipping/Model/Tracking/Result/Status.php +0 -54
- app/code/local/Mage/Shipping/controllers/ShippingController.php +0 -41
- app/code/local/Mage/Shipping/controllers/TrackingController.php +0 -98
- app/code/local/Mage/Shipping/etc/adminhtml.xml +0 -53
- app/code/local/Mage/Shipping/etc/config.xml +0 -176
- app/code/local/Mage/Shipping/etc/system.xml +0 -480
- app/code/local/Mage/Shipping/sql/shipping_setup/install-1.6.0.0.php +0 -79
- app/code/local/Mage/Shipping/sql/shipping_setup/mysql4-install-0.7.0.php +0 -51
- app/code/local/Mage/Shipping/sql/shipping_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php +0 -132
- package.xml +3 -3
app/code/local/{Mage/Shipping → Excellence/Fee}/Model/Carrier/Flatrate.php
RENAMED
|
@@ -32,8 +32,8 @@
|
|
| 32 |
* @package Mage_Shipping
|
| 33 |
* @author Magento Core Team <core@magentocommerce.com>
|
| 34 |
*/
|
| 35 |
-
class
|
| 36 |
-
extends
|
| 37 |
implements Mage_Shipping_Model_Carrier_Interface
|
| 38 |
{
|
| 39 |
|
| 32 |
* @package Mage_Shipping
|
| 33 |
* @author Magento Core Team <core@magentocommerce.com>
|
| 34 |
*/
|
| 35 |
+
class Excellence_Fee_Model_Carrier_Flatrate
|
| 36 |
+
extends Mage_Shipping_Model_Carrier_Flatrate
|
| 37 |
implements Mage_Shipping_Model_Carrier_Interface
|
| 38 |
{
|
| 39 |
|
app/code/local/Excellence/Fee/etc/config.xml
CHANGED
|
@@ -125,6 +125,11 @@
|
|
| 125 |
</fee>
|
| 126 |
</entities>
|
| 127 |
</fee_mysql4>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
</models>
|
| 129 |
<resources>
|
| 130 |
<fee_setup>
|
| 125 |
</fee>
|
| 126 |
</entities>
|
| 127 |
</fee_mysql4>
|
| 128 |
+
<shipping>
|
| 129 |
+
<rewrite>
|
| 130 |
+
<carrier_flatrate>Excellence_Fee_Model_Carrier_Flatrate</carrier_flatrate>
|
| 131 |
+
</rewrite>
|
| 132 |
+
</shipping>
|
| 133 |
</models>
|
| 134 |
<resources>
|
| 135 |
<fee_setup>
|
app/code/local/Mage/Shipping/Block/Tracking/Ajax.php
DELETED
|
@@ -1,30 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
class Mage_Shipping_Block_Tracking_Ajax extends Mage_Core_Block_Template
|
| 28 |
-
{
|
| 29 |
-
|
| 30 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Block/Tracking/Popup.php
DELETED
|
@@ -1,269 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
class Mage_Shipping_Block_Tracking_Popup extends Mage_Core_Block_Template
|
| 28 |
-
{
|
| 29 |
-
/**
|
| 30 |
-
* @deprecated after 1.3.2.3
|
| 31 |
-
*/
|
| 32 |
-
protected $_track_id;
|
| 33 |
-
/**
|
| 34 |
-
* @deprecated after 1.3.2.3
|
| 35 |
-
*/
|
| 36 |
-
protected $_order_id;
|
| 37 |
-
/**
|
| 38 |
-
* @deprecated after 1.3.2.3
|
| 39 |
-
*/
|
| 40 |
-
protected $_ship_id;
|
| 41 |
-
|
| 42 |
-
/**
|
| 43 |
-
* @deprecated after 1.3.2.3
|
| 44 |
-
*/
|
| 45 |
-
public function setOrderId($oid)
|
| 46 |
-
{
|
| 47 |
-
return $this->setData('order_id', $oid);
|
| 48 |
-
}
|
| 49 |
-
|
| 50 |
-
/**
|
| 51 |
-
* @deprecated after 1.3.2.3
|
| 52 |
-
*/
|
| 53 |
-
public function getOrderId()
|
| 54 |
-
{
|
| 55 |
-
return $this->_getData('order_id');
|
| 56 |
-
}
|
| 57 |
-
|
| 58 |
-
/**
|
| 59 |
-
* @deprecated after 1.3.2.3
|
| 60 |
-
*/
|
| 61 |
-
public function setShipId($oid)
|
| 62 |
-
{
|
| 63 |
-
return $this->setData('ship_id', $oid);
|
| 64 |
-
}
|
| 65 |
-
|
| 66 |
-
/**
|
| 67 |
-
* @deprecated after 1.3.2.3
|
| 68 |
-
*/
|
| 69 |
-
public function getShipId()
|
| 70 |
-
{
|
| 71 |
-
return $this->_getData('ship_id');
|
| 72 |
-
}
|
| 73 |
-
|
| 74 |
-
/**
|
| 75 |
-
* @deprecated after 1.3.2.3
|
| 76 |
-
*/
|
| 77 |
-
public function setTrackId($tid='')
|
| 78 |
-
{
|
| 79 |
-
return $this->setData('track_id', $tid);
|
| 80 |
-
}
|
| 81 |
-
|
| 82 |
-
/**
|
| 83 |
-
* @deprecated after 1.3.2.3
|
| 84 |
-
*/
|
| 85 |
-
public function getTrackId()
|
| 86 |
-
{
|
| 87 |
-
return $this->_getData('track_id');
|
| 88 |
-
}
|
| 89 |
-
|
| 90 |
-
/**
|
| 91 |
-
* @deprecated after 1.4.0.0-alpha3
|
| 92 |
-
* Initialize order model instance
|
| 93 |
-
*
|
| 94 |
-
* @return Mage_Sales_Model_Order || false
|
| 95 |
-
*/
|
| 96 |
-
protected function _initOrder()
|
| 97 |
-
{
|
| 98 |
-
$order = Mage::getModel('sales/order')->load($this->getOrderId());
|
| 99 |
-
|
| 100 |
-
if (!$order->getId() || $this->getProtectCode() != $order->getProtectCode()) {
|
| 101 |
-
return false;
|
| 102 |
-
}
|
| 103 |
-
|
| 104 |
-
return $order;
|
| 105 |
-
}
|
| 106 |
-
|
| 107 |
-
/**
|
| 108 |
-
* @deprecated after 1.4.0.0-alpha3
|
| 109 |
-
* Initialize ship model instance
|
| 110 |
-
*
|
| 111 |
-
* @return Mage_Sales_Model_Order_Shipment || false
|
| 112 |
-
*/
|
| 113 |
-
protected function _initShipment()
|
| 114 |
-
{
|
| 115 |
-
$ship = Mage::getModel('sales/order_shipment')->load($this->getShipId());
|
| 116 |
-
|
| 117 |
-
if (!$ship->getEntityId() || $this->getProtectCode() != $ship->getProtectCode()) {
|
| 118 |
-
return false;
|
| 119 |
-
}
|
| 120 |
-
|
| 121 |
-
return $ship;
|
| 122 |
-
}
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
/**
|
| 126 |
-
* Retrieve array of tracking info
|
| 127 |
-
*
|
| 128 |
-
* @return array
|
| 129 |
-
*/
|
| 130 |
-
public function getTrackingInfo()
|
| 131 |
-
{
|
| 132 |
-
/* @var $info Mage_Shipping_Model_Info */
|
| 133 |
-
$info = Mage::registry('current_shipping_info');
|
| 134 |
-
|
| 135 |
-
return $info->getTrackingInfo();
|
| 136 |
-
}
|
| 137 |
-
|
| 138 |
-
/**
|
| 139 |
-
* @deprecated after 1.4.0.0-alpha3
|
| 140 |
-
* Retrieve all tracking by orders id
|
| 141 |
-
*
|
| 142 |
-
* @return array
|
| 143 |
-
*/
|
| 144 |
-
public function getTrackingInfoByOrder()
|
| 145 |
-
{
|
| 146 |
-
$shipTrack = array();
|
| 147 |
-
if ($order = $this->_initOrder()) {
|
| 148 |
-
$shipments = $order->getShipmentsCollection();
|
| 149 |
-
foreach ($shipments as $shipment){
|
| 150 |
-
$increment_id = $shipment->getIncrementId();
|
| 151 |
-
$tracks = $shipment->getTracksCollection();
|
| 152 |
-
|
| 153 |
-
$trackingInfos=array();
|
| 154 |
-
foreach ($tracks as $track){
|
| 155 |
-
$trackingInfos[] = $track->getNumberDetail();
|
| 156 |
-
}
|
| 157 |
-
$shipTrack[$increment_id] = $trackingInfos;
|
| 158 |
-
}
|
| 159 |
-
}
|
| 160 |
-
return $shipTrack;
|
| 161 |
-
}
|
| 162 |
-
|
| 163 |
-
/**
|
| 164 |
-
* @deprecated after 1.4.0.0-alpha3
|
| 165 |
-
* Retrieve all tracking by ship id
|
| 166 |
-
*
|
| 167 |
-
* @return array
|
| 168 |
-
*/
|
| 169 |
-
public function getTrackingInfoByShip()
|
| 170 |
-
{
|
| 171 |
-
$shipTrack = array();
|
| 172 |
-
if ($shipment = $this->_initShipment()) {
|
| 173 |
-
$increment_id = $shipment->getIncrementId();
|
| 174 |
-
$tracks = $shipment->getTracksCollection();
|
| 175 |
-
|
| 176 |
-
$trackingInfos=array();
|
| 177 |
-
foreach ($tracks as $track){
|
| 178 |
-
$trackingInfos[] = $track->getNumberDetail();
|
| 179 |
-
}
|
| 180 |
-
$shipTrack[$increment_id] = $trackingInfos;
|
| 181 |
-
|
| 182 |
-
}
|
| 183 |
-
return $shipTrack;
|
| 184 |
-
}
|
| 185 |
-
|
| 186 |
-
/**
|
| 187 |
-
* @deprecated after 1.4.0.0-alpha3
|
| 188 |
-
* Retrieve tracking by tracking entity id
|
| 189 |
-
*
|
| 190 |
-
* @return array
|
| 191 |
-
*/
|
| 192 |
-
public function getTrackingInfoByTrackId()
|
| 193 |
-
{
|
| 194 |
-
$track = Mage::getModel('sales/order_shipment_track')->load($this->getTrackId());
|
| 195 |
-
if ($this->getProtectCode() == $track->getProtectCode()) {
|
| 196 |
-
return array(array($track->getNumberDetail()));
|
| 197 |
-
}
|
| 198 |
-
return array(array());
|
| 199 |
-
}
|
| 200 |
-
|
| 201 |
-
/**
|
| 202 |
-
* Format given date and time in current locale without changing timezone
|
| 203 |
-
*
|
| 204 |
-
* @param string $date
|
| 205 |
-
* @param string $time
|
| 206 |
-
* @return string
|
| 207 |
-
*/
|
| 208 |
-
public function formatDeliveryDateTime($date, $time)
|
| 209 |
-
{
|
| 210 |
-
return $this->formatDeliveryDate($date) . ' ' . $this->formatDeliveryTime($time);
|
| 211 |
-
}
|
| 212 |
-
|
| 213 |
-
/**
|
| 214 |
-
* Format given date in current locale without changing timezone
|
| 215 |
-
*
|
| 216 |
-
* @param string $date
|
| 217 |
-
* @return string
|
| 218 |
-
*/
|
| 219 |
-
public function formatDeliveryDate($date)
|
| 220 |
-
{
|
| 221 |
-
/* @var $locale Mage_Core_Model_Locale */
|
| 222 |
-
$locale = Mage::app()->getLocale();
|
| 223 |
-
$format = $locale->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM);
|
| 224 |
-
return $locale->date(strtotime($date), Zend_Date::TIMESTAMP, null, false)
|
| 225 |
-
->toString($format);
|
| 226 |
-
}
|
| 227 |
-
|
| 228 |
-
/**
|
| 229 |
-
* Format given time [+ date] in current locale without changing timezone
|
| 230 |
-
*
|
| 231 |
-
* @param string $time
|
| 232 |
-
* @param string $date
|
| 233 |
-
* @return string
|
| 234 |
-
*/
|
| 235 |
-
public function formatDeliveryTime($time, $date = null)
|
| 236 |
-
{
|
| 237 |
-
if (!empty($date)) {
|
| 238 |
-
$time = $date . ' ' . $time;
|
| 239 |
-
}
|
| 240 |
-
|
| 241 |
-
/* @var $locale Mage_Core_Model_Locale */
|
| 242 |
-
$locale = Mage::app()->getLocale();
|
| 243 |
-
|
| 244 |
-
$format = $locale->getTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT);
|
| 245 |
-
return $locale->date(strtotime($time), Zend_Date::TIMESTAMP, null, false)
|
| 246 |
-
->toString($format);
|
| 247 |
-
}
|
| 248 |
-
|
| 249 |
-
/**
|
| 250 |
-
* Is 'contact us' option enabled?
|
| 251 |
-
*
|
| 252 |
-
* @return boolean
|
| 253 |
-
*/
|
| 254 |
-
public function getContactUsEnabled()
|
| 255 |
-
{
|
| 256 |
-
return (bool) Mage::getStoreConfig('contacts/contacts/enabled');
|
| 257 |
-
}
|
| 258 |
-
|
| 259 |
-
public function getStoreSupportEmail()
|
| 260 |
-
{
|
| 261 |
-
return Mage::getStoreConfig('trans_email/ident_support/email');
|
| 262 |
-
}
|
| 263 |
-
|
| 264 |
-
public function getContactUs()
|
| 265 |
-
{
|
| 266 |
-
return $this->getUrl('contacts');
|
| 267 |
-
}
|
| 268 |
-
|
| 269 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Exception.php
DELETED
|
@@ -1,31 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
class Mage_Shipping_Exception extends Zend_Exception
|
| 29 |
-
{
|
| 30 |
-
|
| 31 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Helper/Data.php
DELETED
|
@@ -1,162 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
/**
|
| 28 |
-
* Shipping data helper
|
| 29 |
-
*/
|
| 30 |
-
class Mage_Shipping_Helper_Data extends Mage_Core_Helper_Abstract
|
| 31 |
-
{
|
| 32 |
-
/**
|
| 33 |
-
* Allowed hash keys
|
| 34 |
-
*
|
| 35 |
-
* @var array
|
| 36 |
-
*/
|
| 37 |
-
protected $_allowedHashKeys = array('ship_id', 'order_id', 'track_id');
|
| 38 |
-
|
| 39 |
-
/**
|
| 40 |
-
* Decode url hash
|
| 41 |
-
*
|
| 42 |
-
* @param string $hash
|
| 43 |
-
* @return array
|
| 44 |
-
*/
|
| 45 |
-
public function decodeTrackingHash($hash)
|
| 46 |
-
{
|
| 47 |
-
$hash = explode(':', Mage::helper('core')->urlDecode($hash));
|
| 48 |
-
if (count($hash) === 3 && in_array($hash[0], $this->_allowedHashKeys)) {
|
| 49 |
-
return array('key' => $hash[0], 'id' => (int)$hash[1], 'hash' => $hash[2]);
|
| 50 |
-
}
|
| 51 |
-
return array();
|
| 52 |
-
}
|
| 53 |
-
|
| 54 |
-
/**
|
| 55 |
-
* Retrieve tracking url with params
|
| 56 |
-
*
|
| 57 |
-
* @deprecated the non-model usage
|
| 58 |
-
*
|
| 59 |
-
* @param string $key
|
| 60 |
-
* @param integer|Mage_Sales_Model_Order|Mage_Sales_Model_Order_Shipment|Mage_Sales_Model_Order_Shipment_Track $model
|
| 61 |
-
* @param string $method - option
|
| 62 |
-
* @return string
|
| 63 |
-
*/
|
| 64 |
-
protected function _getTrackingUrl($key, $model, $method = 'getId')
|
| 65 |
-
{
|
| 66 |
-
if (empty($model)) {
|
| 67 |
-
$param = array($key => ''); // @deprecated after 1.4.0.0-alpha3
|
| 68 |
-
} else if (!is_object($model)) {
|
| 69 |
-
$param = array($key => $model); // @deprecated after 1.4.0.0-alpha3
|
| 70 |
-
} else {
|
| 71 |
-
$param = array(
|
| 72 |
-
'hash' => Mage::helper('core')->urlEncode("{$key}:{$model->$method()}:{$model->getProtectCode()}")
|
| 73 |
-
);
|
| 74 |
-
}
|
| 75 |
-
$storeId = is_object($model) ? $model->getStoreId() : null;
|
| 76 |
-
$storeModel = Mage::app()->getStore($storeId);
|
| 77 |
-
return $storeModel->getUrl('shipping/tracking/popup', $param);
|
| 78 |
-
}
|
| 79 |
-
|
| 80 |
-
/**
|
| 81 |
-
* @deprecated after 1.4.0.0-alpha3
|
| 82 |
-
* Retrieve tracking pop up url by order id or object
|
| 83 |
-
*
|
| 84 |
-
* @param int|Mage_Sales_Model_Order $order
|
| 85 |
-
* @return string
|
| 86 |
-
*/
|
| 87 |
-
public function getTrackingPopUpUrlByOrderId($order = '')
|
| 88 |
-
{
|
| 89 |
-
if ($order && !is_object($order)) {
|
| 90 |
-
$order = Mage::getModel('sales/order')->load($order);
|
| 91 |
-
}
|
| 92 |
-
return $this->_getTrackingUrl('order_id', $order);
|
| 93 |
-
}
|
| 94 |
-
|
| 95 |
-
/**
|
| 96 |
-
* @deprecated after 1.4.0.0-alpha3
|
| 97 |
-
* Retrieve tracking pop up url by track id or object
|
| 98 |
-
*
|
| 99 |
-
* @param int|Mage_Sales_Model_Order_Shipment_Track $track
|
| 100 |
-
* @return string
|
| 101 |
-
*/
|
| 102 |
-
public function getTrackingPopUpUrlByTrackId($track = '')
|
| 103 |
-
{
|
| 104 |
-
if ($track && !is_object($track)) {
|
| 105 |
-
$track = Mage::getModel('sales/order_shipment_track')->load($track);
|
| 106 |
-
}
|
| 107 |
-
return $this->_getTrackingUrl('track_id', $track, 'getEntityId');
|
| 108 |
-
}
|
| 109 |
-
|
| 110 |
-
/**
|
| 111 |
-
* @deprecated after 1.4.0.0-alpha3
|
| 112 |
-
* Retrieve tracking pop up url by ship id or object
|
| 113 |
-
*
|
| 114 |
-
* @param int|Mage_Sales_Model_Order_Shipment $track
|
| 115 |
-
* @return string
|
| 116 |
-
*/
|
| 117 |
-
public function getTrackingPopUpUrlByShipId($ship = '')
|
| 118 |
-
{
|
| 119 |
-
if ($ship && !is_object($ship)) {
|
| 120 |
-
$ship = Mage::getModel('sales/order_shipment')->load($ship);
|
| 121 |
-
}
|
| 122 |
-
return $this->_getTrackingUrl('ship_id', $ship);
|
| 123 |
-
}
|
| 124 |
-
|
| 125 |
-
/**
|
| 126 |
-
* Shipping tracking popup URL getter
|
| 127 |
-
*
|
| 128 |
-
* @param Mage_Sales_Model_Abstract $model
|
| 129 |
-
* @return string
|
| 130 |
-
*/
|
| 131 |
-
public function getTrackingPopupUrlBySalesModel($model)
|
| 132 |
-
{
|
| 133 |
-
if ($model instanceof Mage_Sales_Model_Order) {
|
| 134 |
-
return $this->_getTrackingUrl('order_id', $model);
|
| 135 |
-
} elseif ($model instanceof Mage_Sales_Model_Order_Shipment) {
|
| 136 |
-
return $this->_getTrackingUrl('ship_id', $model);
|
| 137 |
-
} elseif ($model instanceof Mage_Sales_Model_Order_Shipment_Track) {
|
| 138 |
-
return $this->_getTrackingUrl('track_id', $model, 'getEntityId');
|
| 139 |
-
}
|
| 140 |
-
return '';
|
| 141 |
-
}
|
| 142 |
-
|
| 143 |
-
/**
|
| 144 |
-
* Retrieve tracking ajax url
|
| 145 |
-
*
|
| 146 |
-
* @return string
|
| 147 |
-
*/
|
| 148 |
-
public function getTrackingAjaxUrl()
|
| 149 |
-
{
|
| 150 |
-
return $this->_getUrl('shipping/tracking/ajax');
|
| 151 |
-
}
|
| 152 |
-
|
| 153 |
-
public function isFreeMethod($method, $storeId = null)
|
| 154 |
-
{
|
| 155 |
-
$arr = explode('_', $method, 2);
|
| 156 |
-
if (!isset($arr[1])) {
|
| 157 |
-
return false;
|
| 158 |
-
}
|
| 159 |
-
$freeMethod = Mage::getStoreConfig('carriers/' . $arr[0] . '/free_method', $storeId);
|
| 160 |
-
return $freeMethod == $arr[1];
|
| 161 |
-
}
|
| 162 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Carrier/Abstract.php
DELETED
|
@@ -1,585 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
abstract class Mage_Shipping_Model_Carrier_Abstract extends Varien_Object
|
| 29 |
-
{
|
| 30 |
-
/**
|
| 31 |
-
* Carrier's code
|
| 32 |
-
*
|
| 33 |
-
* @var string
|
| 34 |
-
*/
|
| 35 |
-
protected $_code;
|
| 36 |
-
|
| 37 |
-
/**
|
| 38 |
-
* Rates result
|
| 39 |
-
*
|
| 40 |
-
* @var array|null
|
| 41 |
-
*/
|
| 42 |
-
protected $_rates;
|
| 43 |
-
|
| 44 |
-
/**
|
| 45 |
-
* Number of boxes in package
|
| 46 |
-
*
|
| 47 |
-
* @var int
|
| 48 |
-
*/
|
| 49 |
-
protected $_numBoxes = 1;
|
| 50 |
-
|
| 51 |
-
/**
|
| 52 |
-
* Free Method config path
|
| 53 |
-
*
|
| 54 |
-
* @var string
|
| 55 |
-
*/
|
| 56 |
-
protected $_freeMethod = 'free_method';
|
| 57 |
-
|
| 58 |
-
/**
|
| 59 |
-
* Whether this carrier has fixed rates calculation
|
| 60 |
-
*
|
| 61 |
-
* @var bool
|
| 62 |
-
*/
|
| 63 |
-
protected $_isFixed = false;
|
| 64 |
-
|
| 65 |
-
/**
|
| 66 |
-
* Container types that could be customized
|
| 67 |
-
*
|
| 68 |
-
* @var array
|
| 69 |
-
*/
|
| 70 |
-
protected $_customizableContainerTypes = array();
|
| 71 |
-
|
| 72 |
-
const USA_COUNTRY_ID = 'US';
|
| 73 |
-
const CANADA_COUNTRY_ID = 'CA';
|
| 74 |
-
const MEXICO_COUNTRY_ID = 'MX';
|
| 75 |
-
|
| 76 |
-
const HANDLING_TYPE_PERCENT = 'P';
|
| 77 |
-
const HANDLING_TYPE_FIXED = 'F';
|
| 78 |
-
|
| 79 |
-
const HANDLING_ACTION_PERPACKAGE = 'P';
|
| 80 |
-
const HANDLING_ACTION_PERORDER = 'O';
|
| 81 |
-
|
| 82 |
-
/**
|
| 83 |
-
* Fields that should be replaced in debug with '***'
|
| 84 |
-
*
|
| 85 |
-
* @var array
|
| 86 |
-
*/
|
| 87 |
-
protected $_debugReplacePrivateDataKeys = array();
|
| 88 |
-
|
| 89 |
-
/**
|
| 90 |
-
* Retrieve information from carrier configuration
|
| 91 |
-
*
|
| 92 |
-
* @param string $field
|
| 93 |
-
* @return mixed
|
| 94 |
-
*/
|
| 95 |
-
public function getConfigData($field)
|
| 96 |
-
{
|
| 97 |
-
if (empty($this->_code)) {
|
| 98 |
-
return false;
|
| 99 |
-
}
|
| 100 |
-
$path = 'carriers/'.$this->_code.'/'.$field;
|
| 101 |
-
return Mage::getStoreConfig($path, $this->getStore());
|
| 102 |
-
}
|
| 103 |
-
|
| 104 |
-
/**
|
| 105 |
-
* Retrieve config flag for store by field
|
| 106 |
-
*
|
| 107 |
-
* @param string $field
|
| 108 |
-
* @return bool
|
| 109 |
-
*/
|
| 110 |
-
public function getConfigFlag($field)
|
| 111 |
-
{
|
| 112 |
-
if (empty($this->_code)) {
|
| 113 |
-
return false;
|
| 114 |
-
}
|
| 115 |
-
$path = 'carriers/'.$this->_code.'/'.$field;
|
| 116 |
-
return Mage::getStoreConfigFlag($path, $this->getStore());
|
| 117 |
-
}
|
| 118 |
-
|
| 119 |
-
/**
|
| 120 |
-
* Collect and get rates
|
| 121 |
-
*
|
| 122 |
-
* @abstract
|
| 123 |
-
* @param Mage_Shipping_Model_Rate_Request $request
|
| 124 |
-
* @return Mage_Shipping_Model_Rate_Result|bool|null
|
| 125 |
-
*/
|
| 126 |
-
abstract public function collectRates(Mage_Shipping_Model_Rate_Request $request);
|
| 127 |
-
|
| 128 |
-
/**
|
| 129 |
-
* Do request to shipment
|
| 130 |
-
* Implementation must be in overridden method
|
| 131 |
-
*
|
| 132 |
-
* @param Mage_Shipping_Model_Shipment_Request $request
|
| 133 |
-
* @return Varien_Object
|
| 134 |
-
*/
|
| 135 |
-
public function requestToShipment(Mage_Shipping_Model_Shipment_Request $request)
|
| 136 |
-
{
|
| 137 |
-
return new Varien_Object();
|
| 138 |
-
}
|
| 139 |
-
|
| 140 |
-
/**
|
| 141 |
-
* Do return of shipment
|
| 142 |
-
* Implementation must be in overridden method
|
| 143 |
-
*
|
| 144 |
-
* @param $request
|
| 145 |
-
* @return Varien_Object
|
| 146 |
-
*/
|
| 147 |
-
public function returnOfShipment($request)
|
| 148 |
-
{
|
| 149 |
-
return new Varien_Object();
|
| 150 |
-
}
|
| 151 |
-
|
| 152 |
-
/**
|
| 153 |
-
* Return container types of carrier
|
| 154 |
-
*
|
| 155 |
-
* @param Varien_Object|null $params
|
| 156 |
-
* @return array
|
| 157 |
-
*/
|
| 158 |
-
public function getContainerTypes(Varien_Object $params = null)
|
| 159 |
-
{
|
| 160 |
-
return array();
|
| 161 |
-
}
|
| 162 |
-
|
| 163 |
-
/**
|
| 164 |
-
* Get allowed containers of carrier
|
| 165 |
-
*
|
| 166 |
-
* @param Varien_Object|null $params
|
| 167 |
-
* @return array|bool
|
| 168 |
-
*/
|
| 169 |
-
protected function _getAllowedContainers(Varien_Object $params = null)
|
| 170 |
-
{
|
| 171 |
-
$containersAll = $this->getContainerTypesAll();
|
| 172 |
-
if (empty($containersAll)) {
|
| 173 |
-
return array();
|
| 174 |
-
}
|
| 175 |
-
if (empty($params)) {
|
| 176 |
-
return $containersAll;
|
| 177 |
-
}
|
| 178 |
-
$containersFilter = $this->getContainerTypesFilter();
|
| 179 |
-
$containersFiltered = array();
|
| 180 |
-
$method = $params->getMethod();
|
| 181 |
-
$countryShipper = $params->getCountryShipper();
|
| 182 |
-
$countryRecipient = $params->getCountryRecipient();
|
| 183 |
-
|
| 184 |
-
if (empty($containersFilter)) {
|
| 185 |
-
return $containersAll;
|
| 186 |
-
}
|
| 187 |
-
if (!$params || !$method || !$countryShipper || !$countryRecipient) {
|
| 188 |
-
return $containersAll;
|
| 189 |
-
}
|
| 190 |
-
|
| 191 |
-
if ($countryShipper == self::USA_COUNTRY_ID && $countryRecipient == self::USA_COUNTRY_ID) {
|
| 192 |
-
$direction = 'within_us';
|
| 193 |
-
} else if ($countryShipper == self::USA_COUNTRY_ID && $countryRecipient != self::USA_COUNTRY_ID) {
|
| 194 |
-
$direction = 'from_us';
|
| 195 |
-
} else {
|
| 196 |
-
return $containersAll;
|
| 197 |
-
}
|
| 198 |
-
|
| 199 |
-
foreach ($containersFilter as $dataItem) {
|
| 200 |
-
$containers = $dataItem['containers'];
|
| 201 |
-
$filters = $dataItem['filters'];
|
| 202 |
-
if (!empty($filters[$direction]['method'])
|
| 203 |
-
&& in_array($method, $filters[$direction]['method'])
|
| 204 |
-
) {
|
| 205 |
-
foreach ($containers as $container) {
|
| 206 |
-
if (!empty($containersAll[$container])) {
|
| 207 |
-
$containersFiltered[$container] = $containersAll[$container];
|
| 208 |
-
}
|
| 209 |
-
}
|
| 210 |
-
}
|
| 211 |
-
}
|
| 212 |
-
|
| 213 |
-
return !empty($containersFiltered) ? $containersFiltered : $containersAll;
|
| 214 |
-
}
|
| 215 |
-
|
| 216 |
-
/**
|
| 217 |
-
* Get Container Types, that could be customized
|
| 218 |
-
*
|
| 219 |
-
* @return array
|
| 220 |
-
*/
|
| 221 |
-
public function getCustomizableContainerTypes()
|
| 222 |
-
{
|
| 223 |
-
return $this->_customizableContainerTypes;
|
| 224 |
-
}
|
| 225 |
-
|
| 226 |
-
/**
|
| 227 |
-
* Return delivery confirmation types of carrier
|
| 228 |
-
*
|
| 229 |
-
* @param Varien_Object|null $params
|
| 230 |
-
* @return array
|
| 231 |
-
*/
|
| 232 |
-
public function getDeliveryConfirmationTypes(Varien_Object $params = null)
|
| 233 |
-
{
|
| 234 |
-
return array();
|
| 235 |
-
}
|
| 236 |
-
|
| 237 |
-
public function checkAvailableShipCountries(Mage_Shipping_Model_Rate_Request $request)
|
| 238 |
-
{
|
| 239 |
-
$speCountriesAllow = $this->getConfigData('sallowspecific');
|
| 240 |
-
/*
|
| 241 |
-
* for specific countries, the flag will be 1
|
| 242 |
-
*/
|
| 243 |
-
if ($speCountriesAllow && $speCountriesAllow == 1){
|
| 244 |
-
$showMethod = $this->getConfigData('showmethod');
|
| 245 |
-
$availableCountries = array();
|
| 246 |
-
if($this->getConfigData('specificcountry')) {
|
| 247 |
-
$availableCountries = explode(',',$this->getConfigData('specificcountry'));
|
| 248 |
-
}
|
| 249 |
-
if ($availableCountries && in_array($request->getDestCountryId(), $availableCountries)) {
|
| 250 |
-
return $this;
|
| 251 |
-
} elseif ($showMethod && (!$availableCountries || ($availableCountries
|
| 252 |
-
&& !in_array($request->getDestCountryId(), $availableCountries)))
|
| 253 |
-
){
|
| 254 |
-
$error = Mage::getModel('shipping/rate_result_error');
|
| 255 |
-
$error->setCarrier($this->_code);
|
| 256 |
-
$error->setCarrierTitle($this->getConfigData('title'));
|
| 257 |
-
$errorMsg = $this->getConfigData('specificerrmsg');
|
| 258 |
-
$error->setErrorMessage($errorMsg ? $errorMsg : Mage::helper('shipping')->__('The shipping module is not available for selected delivery country.'));
|
| 259 |
-
return $error;
|
| 260 |
-
} else {
|
| 261 |
-
/*
|
| 262 |
-
* The admin set not to show the shipping module if the devliery country is not within specific countries
|
| 263 |
-
*/
|
| 264 |
-
return false;
|
| 265 |
-
}
|
| 266 |
-
}
|
| 267 |
-
return $this;
|
| 268 |
-
}
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
/**
|
| 272 |
-
* Processing additional validation to check is carrier applicable.
|
| 273 |
-
*
|
| 274 |
-
* @param Mage_Shipping_Model_Rate_Request $request
|
| 275 |
-
* @return Mage_Shipping_Model_Carrier_Abstract|Mage_Shipping_Model_Rate_Result_Error|boolean
|
| 276 |
-
*/
|
| 277 |
-
public function proccessAdditionalValidation(Mage_Shipping_Model_Rate_Request $request)
|
| 278 |
-
{
|
| 279 |
-
return $this;
|
| 280 |
-
}
|
| 281 |
-
|
| 282 |
-
/**
|
| 283 |
-
* Determine whether current carrier enabled for activity
|
| 284 |
-
*
|
| 285 |
-
* @return bool
|
| 286 |
-
*/
|
| 287 |
-
public function isActive()
|
| 288 |
-
{
|
| 289 |
-
$active = $this->getConfigData('active');
|
| 290 |
-
return $active==1 || $active=='true';
|
| 291 |
-
}
|
| 292 |
-
|
| 293 |
-
/**
|
| 294 |
-
* Whether this carrier has fixed rates calculation
|
| 295 |
-
*
|
| 296 |
-
* @return bool
|
| 297 |
-
*/
|
| 298 |
-
public function isFixed()
|
| 299 |
-
{
|
| 300 |
-
return $this->_isFixed;
|
| 301 |
-
}
|
| 302 |
-
|
| 303 |
-
/**
|
| 304 |
-
* Check if carrier has shipping tracking option available
|
| 305 |
-
*
|
| 306 |
-
* @return boolean
|
| 307 |
-
*/
|
| 308 |
-
public function isTrackingAvailable()
|
| 309 |
-
{
|
| 310 |
-
return false;
|
| 311 |
-
}
|
| 312 |
-
|
| 313 |
-
/**
|
| 314 |
-
* Check if carrier has shipping label option available
|
| 315 |
-
*
|
| 316 |
-
* @return boolean
|
| 317 |
-
*/
|
| 318 |
-
public function isShippingLabelsAvailable()
|
| 319 |
-
{
|
| 320 |
-
return false;
|
| 321 |
-
}
|
| 322 |
-
|
| 323 |
-
/**
|
| 324 |
-
* Retrieve sort order of current carrier
|
| 325 |
-
*
|
| 326 |
-
* @return mixed
|
| 327 |
-
*/
|
| 328 |
-
public function getSortOrder()
|
| 329 |
-
{
|
| 330 |
-
return $this->getConfigData('sort_order');
|
| 331 |
-
}
|
| 332 |
-
|
| 333 |
-
/**
|
| 334 |
-
* @param Mage_Shipping_Model_Rate_Request $request
|
| 335 |
-
* @return null
|
| 336 |
-
*/
|
| 337 |
-
protected function _updateFreeMethodQuote($request)
|
| 338 |
-
{
|
| 339 |
-
if ($request->getFreeMethodWeight() == $request->getPackageWeight() || !$request->hasFreeMethodWeight()) {
|
| 340 |
-
return;
|
| 341 |
-
}
|
| 342 |
-
|
| 343 |
-
$freeMethod = $this->getConfigData($this->_freeMethod);
|
| 344 |
-
if (!$freeMethod) {
|
| 345 |
-
return;
|
| 346 |
-
}
|
| 347 |
-
$freeRateId = false;
|
| 348 |
-
|
| 349 |
-
if (is_object($this->_result)) {
|
| 350 |
-
foreach ($this->_result->getAllRates() as $i=>$item) {
|
| 351 |
-
if ($item->getMethod() == $freeMethod) {
|
| 352 |
-
$freeRateId = $i;
|
| 353 |
-
break;
|
| 354 |
-
}
|
| 355 |
-
}
|
| 356 |
-
}
|
| 357 |
-
|
| 358 |
-
if ($freeRateId === false) {
|
| 359 |
-
return;
|
| 360 |
-
}
|
| 361 |
-
$price = null;
|
| 362 |
-
if ($request->getFreeMethodWeight() > 0) {
|
| 363 |
-
$this->_setFreeMethodRequest($freeMethod);
|
| 364 |
-
|
| 365 |
-
$result = $this->_getQuotes();
|
| 366 |
-
if ($result && ($rates = $result->getAllRates()) && count($rates)>0) {
|
| 367 |
-
if ((count($rates) == 1) && ($rates[0] instanceof Mage_Shipping_Model_Rate_Result_Method)) {
|
| 368 |
-
$price = $rates[0]->getPrice();
|
| 369 |
-
}
|
| 370 |
-
if (count($rates) > 1) {
|
| 371 |
-
foreach ($rates as $rate) {
|
| 372 |
-
if ($rate instanceof Mage_Shipping_Model_Rate_Result_Method
|
| 373 |
-
&& $rate->getMethod() == $freeMethod
|
| 374 |
-
) {
|
| 375 |
-
$price = $rate->getPrice();
|
| 376 |
-
}
|
| 377 |
-
}
|
| 378 |
-
}
|
| 379 |
-
}
|
| 380 |
-
} else {
|
| 381 |
-
/**
|
| 382 |
-
* if we can apply free shipping for all order we should force price
|
| 383 |
-
* to $0.00 for shipping with out sending second request to carrier
|
| 384 |
-
*/
|
| 385 |
-
$price = 0;
|
| 386 |
-
}
|
| 387 |
-
|
| 388 |
-
/**
|
| 389 |
-
* if we did not get our free shipping method in response we must use its old price
|
| 390 |
-
*/
|
| 391 |
-
if (!is_null($price)) {
|
| 392 |
-
$this->_result->getRateById($freeRateId)->setPrice($price);
|
| 393 |
-
}
|
| 394 |
-
}
|
| 395 |
-
|
| 396 |
-
/**
|
| 397 |
-
* Calculate price considering free shipping and handling fee
|
| 398 |
-
*
|
| 399 |
-
* @param string $cost
|
| 400 |
-
* @param string $method
|
| 401 |
-
* @return float|string
|
| 402 |
-
*/
|
| 403 |
-
public function getMethodPrice($cost, $method = '')
|
| 404 |
-
{
|
| 405 |
-
return $method == $this->getConfigData($this->_freeMethod)
|
| 406 |
-
&& $this->getConfigFlag('free_shipping_enable')
|
| 407 |
-
&& $this->getConfigData('free_shipping_subtotal') <= $this->_rawRequest->getBaseSubtotalInclTax()
|
| 408 |
-
? '0.00'
|
| 409 |
-
: $this->getFinalPriceWithHandlingFee($cost);
|
| 410 |
-
}
|
| 411 |
-
|
| 412 |
-
/**
|
| 413 |
-
* Get the handling fee for the shipping + cost
|
| 414 |
-
*
|
| 415 |
-
* @param float $cost
|
| 416 |
-
* @return float final price for shipping method
|
| 417 |
-
*/
|
| 418 |
-
public function getFinalPriceWithHandlingFee($cost)
|
| 419 |
-
{
|
| 420 |
-
$handlingFee = $this->getConfigData('handling_fee');
|
| 421 |
-
$handlingType = $this->getConfigData('handling_type');
|
| 422 |
-
if (!$handlingType) {
|
| 423 |
-
$handlingType = self::HANDLING_TYPE_FIXED;
|
| 424 |
-
}
|
| 425 |
-
$handlingAction = $this->getConfigData('handling_action');
|
| 426 |
-
if (!$handlingAction) {
|
| 427 |
-
$handlingAction = self::HANDLING_ACTION_PERORDER;
|
| 428 |
-
}
|
| 429 |
-
|
| 430 |
-
return $handlingAction == self::HANDLING_ACTION_PERPACKAGE
|
| 431 |
-
? $this->_getPerpackagePrice($cost, $handlingType, $handlingFee)
|
| 432 |
-
: $this->_getPerorderPrice($cost, $handlingType, $handlingFee);
|
| 433 |
-
}
|
| 434 |
-
|
| 435 |
-
/**
|
| 436 |
-
* Get final price for shipping method with handling fee per package
|
| 437 |
-
*
|
| 438 |
-
* @param float $cost
|
| 439 |
-
* @param string $handlingType
|
| 440 |
-
* @param float $handlingFee
|
| 441 |
-
* @return float
|
| 442 |
-
*/
|
| 443 |
-
protected function _getPerpackagePrice($cost, $handlingType, $handlingFee)
|
| 444 |
-
{
|
| 445 |
-
if ($handlingType == self::HANDLING_TYPE_PERCENT) {
|
| 446 |
-
return ($cost + ($cost * $handlingFee/100)) * $this->_numBoxes;
|
| 447 |
-
}
|
| 448 |
-
|
| 449 |
-
return ($cost + $handlingFee) * $this->_numBoxes;
|
| 450 |
-
}
|
| 451 |
-
|
| 452 |
-
/**
|
| 453 |
-
* Get final price for shipping method with handling fee per order
|
| 454 |
-
*
|
| 455 |
-
* @param float $cost
|
| 456 |
-
* @param string $handlingType
|
| 457 |
-
* @param float $handlingFee
|
| 458 |
-
* @return float
|
| 459 |
-
*/
|
| 460 |
-
protected function _getPerorderPrice($cost, $handlingType, $handlingFee)
|
| 461 |
-
{
|
| 462 |
-
if ($handlingType == self::HANDLING_TYPE_PERCENT) {
|
| 463 |
-
return ($cost * $this->_numBoxes) + ($cost * $this->_numBoxes * $handlingFee / 100);
|
| 464 |
-
}
|
| 465 |
-
|
| 466 |
-
return ($cost * $this->_numBoxes) + $handlingFee;
|
| 467 |
-
}
|
| 468 |
-
|
| 469 |
-
/**
|
| 470 |
-
* Return weight in pounds
|
| 471 |
-
*
|
| 472 |
-
* @param integer Weight in someone measure
|
| 473 |
-
* @return float Weight in pounds
|
| 474 |
-
*/
|
| 475 |
-
public function convertWeightToLbs($weight)
|
| 476 |
-
{
|
| 477 |
-
return $weight;
|
| 478 |
-
}
|
| 479 |
-
|
| 480 |
-
/**
|
| 481 |
-
* set the number of boxes for shipping
|
| 482 |
-
*
|
| 483 |
-
* @return weight
|
| 484 |
-
*/
|
| 485 |
-
public function getTotalNumOfBoxes($weight)
|
| 486 |
-
{
|
| 487 |
-
/*
|
| 488 |
-
reset num box first before retrieve again
|
| 489 |
-
*/
|
| 490 |
-
$this->_numBoxes = 1;
|
| 491 |
-
$weight = $this->convertWeightToLbs($weight);
|
| 492 |
-
$maxPackageWeight = $this->getConfigData('max_package_weight');
|
| 493 |
-
if ($weight > $maxPackageWeight && $maxPackageWeight != 0) {
|
| 494 |
-
$this->_numBoxes = ceil($weight/$maxPackageWeight);
|
| 495 |
-
$weight = $weight/$this->_numBoxes;
|
| 496 |
-
}
|
| 497 |
-
return $weight;
|
| 498 |
-
}
|
| 499 |
-
|
| 500 |
-
/**
|
| 501 |
-
* Is state province required
|
| 502 |
-
*
|
| 503 |
-
* @return bool
|
| 504 |
-
*/
|
| 505 |
-
public function isStateProvinceRequired()
|
| 506 |
-
{
|
| 507 |
-
return false;
|
| 508 |
-
}
|
| 509 |
-
|
| 510 |
-
/**
|
| 511 |
-
* Check if city option required
|
| 512 |
-
*
|
| 513 |
-
* @return boolean
|
| 514 |
-
*/
|
| 515 |
-
public function isCityRequired()
|
| 516 |
-
{
|
| 517 |
-
return false;
|
| 518 |
-
}
|
| 519 |
-
|
| 520 |
-
/**
|
| 521 |
-
* Determine whether zip-code is required for the country of destination
|
| 522 |
-
*
|
| 523 |
-
* @param string|null $countryId
|
| 524 |
-
* @return bool
|
| 525 |
-
*/
|
| 526 |
-
public function isZipCodeRequired($countryId = null)
|
| 527 |
-
{
|
| 528 |
-
return false;
|
| 529 |
-
}
|
| 530 |
-
|
| 531 |
-
/**
|
| 532 |
-
* Log debug data to file
|
| 533 |
-
*
|
| 534 |
-
* @param mixed $debugData
|
| 535 |
-
*/
|
| 536 |
-
protected function _debug($debugData)
|
| 537 |
-
{
|
| 538 |
-
if ($this->getDebugFlag()) {
|
| 539 |
-
Mage::getModel('core/log_adapter', 'shipping_' . $this->getCarrierCode() . '.log')
|
| 540 |
-
->setFilterDataKeys($this->_debugReplacePrivateDataKeys)
|
| 541 |
-
->log($debugData);
|
| 542 |
-
}
|
| 543 |
-
}
|
| 544 |
-
|
| 545 |
-
/**
|
| 546 |
-
* Define if debugging is enabled
|
| 547 |
-
*
|
| 548 |
-
* @return bool
|
| 549 |
-
*/
|
| 550 |
-
public function getDebugFlag()
|
| 551 |
-
{
|
| 552 |
-
return $this->getConfigData('debug');
|
| 553 |
-
}
|
| 554 |
-
|
| 555 |
-
/**
|
| 556 |
-
* Used to call debug method from not Payment Method context
|
| 557 |
-
*
|
| 558 |
-
* @param mixed $debugData
|
| 559 |
-
*/
|
| 560 |
-
public function debugData($debugData)
|
| 561 |
-
{
|
| 562 |
-
$this->_debug($debugData);
|
| 563 |
-
}
|
| 564 |
-
|
| 565 |
-
/**
|
| 566 |
-
* Getter for carrier code
|
| 567 |
-
*
|
| 568 |
-
* @return string
|
| 569 |
-
*/
|
| 570 |
-
public function getCarrierCode()
|
| 571 |
-
{
|
| 572 |
-
return $this->_code;
|
| 573 |
-
}
|
| 574 |
-
|
| 575 |
-
/**
|
| 576 |
-
* Return content types of package
|
| 577 |
-
*
|
| 578 |
-
* @param Varien_Object $params
|
| 579 |
-
* @return array
|
| 580 |
-
*/
|
| 581 |
-
public function getContentTypes(Varien_Object $params)
|
| 582 |
-
{
|
| 583 |
-
return array();
|
| 584 |
-
}
|
| 585 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Carrier/Flatrate_org21stJune.php
DELETED
|
@@ -1,115 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
/**
|
| 29 |
-
* Flat rate shipping model
|
| 30 |
-
*
|
| 31 |
-
* @category Mage
|
| 32 |
-
* @package Mage_Shipping
|
| 33 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
| 34 |
-
*/
|
| 35 |
-
class Mage_Shipping_Model_Carrier_Flatrate
|
| 36 |
-
extends Mage_Shipping_Model_Carrier_Abstract
|
| 37 |
-
implements Mage_Shipping_Model_Carrier_Interface
|
| 38 |
-
{
|
| 39 |
-
|
| 40 |
-
protected $_code = 'flatrate';
|
| 41 |
-
protected $_isFixed = true;
|
| 42 |
-
|
| 43 |
-
/**
|
| 44 |
-
* Enter description here...
|
| 45 |
-
*
|
| 46 |
-
* @param Mage_Shipping_Model_Rate_Request $data
|
| 47 |
-
* @return Mage_Shipping_Model_Rate_Result
|
| 48 |
-
*/
|
| 49 |
-
public function collectRates(Mage_Shipping_Model_Rate_Request $request)
|
| 50 |
-
{
|
| 51 |
-
if (!$this->getConfigFlag('active')) {
|
| 52 |
-
return false;
|
| 53 |
-
}
|
| 54 |
-
|
| 55 |
-
$freeBoxes = 0;
|
| 56 |
-
if ($request->getAllItems()) {
|
| 57 |
-
foreach ($request->getAllItems() as $item) {
|
| 58 |
-
|
| 59 |
-
if ($item->getProduct()->isVirtual() || $item->getParentItem()) {
|
| 60 |
-
continue;
|
| 61 |
-
}
|
| 62 |
-
|
| 63 |
-
if ($item->getHasChildren() && $item->isShipSeparately()) {
|
| 64 |
-
foreach ($item->getChildren() as $child) {
|
| 65 |
-
if ($child->getFreeShipping() && !$child->getProduct()->isVirtual()) {
|
| 66 |
-
$freeBoxes += $item->getQty() * $child->getQty();
|
| 67 |
-
}
|
| 68 |
-
}
|
| 69 |
-
} elseif ($item->getFreeShipping()) {
|
| 70 |
-
$freeBoxes += $item->getQty();
|
| 71 |
-
}
|
| 72 |
-
}
|
| 73 |
-
}
|
| 74 |
-
$this->setFreeBoxes($freeBoxes);
|
| 75 |
-
|
| 76 |
-
$result = Mage::getModel('shipping/rate_result');
|
| 77 |
-
if ($this->getConfigData('type') == 'O') { // per order
|
| 78 |
-
$shippingPrice = $this->getConfigData('price');
|
| 79 |
-
} elseif ($this->getConfigData('type') == 'I') { // per item
|
| 80 |
-
$shippingPrice = ($request->getPackageQty() * $this->getConfigData('price')) - ($this->getFreeBoxes() * $this->getConfigData('price'));
|
| 81 |
-
} else {
|
| 82 |
-
$shippingPrice = false;
|
| 83 |
-
}
|
| 84 |
-
|
| 85 |
-
$shippingPrice = $this->getFinalPriceWithHandlingFee($shippingPrice);
|
| 86 |
-
|
| 87 |
-
if ($shippingPrice !== false) {
|
| 88 |
-
$method = Mage::getModel('shipping/rate_result_method');
|
| 89 |
-
|
| 90 |
-
$method->setCarrier('flatrate');
|
| 91 |
-
$method->setCarrierTitle($this->getConfigData('title'));
|
| 92 |
-
|
| 93 |
-
$method->setMethod('flatrate');
|
| 94 |
-
$method->setMethodTitle($this->getConfigData('name'));
|
| 95 |
-
|
| 96 |
-
if ($request->getFreeShipping() === true || $request->getPackageQty() == $this->getFreeBoxes()) {
|
| 97 |
-
$shippingPrice = '0.00';
|
| 98 |
-
}
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
$method->setPrice($shippingPrice);
|
| 102 |
-
$method->setCost($shippingPrice);
|
| 103 |
-
|
| 104 |
-
$result->append($method);
|
| 105 |
-
}
|
| 106 |
-
|
| 107 |
-
return $result;
|
| 108 |
-
}
|
| 109 |
-
|
| 110 |
-
public function getAllowedMethods()
|
| 111 |
-
{
|
| 112 |
-
return array('flatrate'=>$this->getConfigData('name'));
|
| 113 |
-
}
|
| 114 |
-
|
| 115 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Carrier/Freeshipping.php
DELETED
|
@@ -1,126 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
/**
|
| 29 |
-
* Free shipping model
|
| 30 |
-
*
|
| 31 |
-
* @category Mage
|
| 32 |
-
* @package Mage_Shipping
|
| 33 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
| 34 |
-
*/
|
| 35 |
-
class Mage_Shipping_Model_Carrier_Freeshipping
|
| 36 |
-
extends Mage_Shipping_Model_Carrier_Abstract
|
| 37 |
-
implements Mage_Shipping_Model_Carrier_Interface
|
| 38 |
-
{
|
| 39 |
-
|
| 40 |
-
/**
|
| 41 |
-
* Carrier's code
|
| 42 |
-
*
|
| 43 |
-
* @var string
|
| 44 |
-
*/
|
| 45 |
-
protected $_code = 'freeshipping';
|
| 46 |
-
|
| 47 |
-
/**
|
| 48 |
-
* Whether this carrier has fixed rates calculation
|
| 49 |
-
*
|
| 50 |
-
* @var bool
|
| 51 |
-
*/
|
| 52 |
-
protected $_isFixed = true;
|
| 53 |
-
|
| 54 |
-
/**
|
| 55 |
-
* FreeShipping Rates Collector
|
| 56 |
-
*
|
| 57 |
-
* @param Mage_Shipping_Model_Rate_Request $request
|
| 58 |
-
* @return Mage_Shipping_Model_Rate_Result
|
| 59 |
-
*/
|
| 60 |
-
public function collectRates(Mage_Shipping_Model_Rate_Request $request)
|
| 61 |
-
{
|
| 62 |
-
if (!$this->getConfigFlag('active')) {
|
| 63 |
-
return false;
|
| 64 |
-
}
|
| 65 |
-
|
| 66 |
-
$result = Mage::getModel('shipping/rate_result');
|
| 67 |
-
|
| 68 |
-
$this->_updateFreeMethodQuote($request);
|
| 69 |
-
|
| 70 |
-
if (($request->getFreeShipping())
|
| 71 |
-
|| ($request->getBaseSubtotalInclTax() >=
|
| 72 |
-
$this->getConfigData('free_shipping_subtotal'))
|
| 73 |
-
) {
|
| 74 |
-
$method = Mage::getModel('shipping/rate_result_method');
|
| 75 |
-
|
| 76 |
-
$method->setCarrier('freeshipping');
|
| 77 |
-
$method->setCarrierTitle($this->getConfigData('title'));
|
| 78 |
-
|
| 79 |
-
$method->setMethod('freeshipping');
|
| 80 |
-
$method->setMethodTitle($this->getConfigData('name'));
|
| 81 |
-
|
| 82 |
-
$method->setPrice('0.00');
|
| 83 |
-
$method->setCost('0.00');
|
| 84 |
-
|
| 85 |
-
$result->append($method);
|
| 86 |
-
}
|
| 87 |
-
|
| 88 |
-
return $result;
|
| 89 |
-
}
|
| 90 |
-
|
| 91 |
-
/**
|
| 92 |
-
* Allows free shipping when all product items have free shipping (promotions etc.)
|
| 93 |
-
*
|
| 94 |
-
* @param Mage_Shipping_Model_Rate_Request $request
|
| 95 |
-
* @return void
|
| 96 |
-
*/
|
| 97 |
-
protected function _updateFreeMethodQuote($request)
|
| 98 |
-
{
|
| 99 |
-
$freeShipping = false;
|
| 100 |
-
$items = $request->getAllItems();
|
| 101 |
-
$c = count($items);
|
| 102 |
-
for ($i = 0; $i < $c; $i++) {
|
| 103 |
-
if ($items[$i]->getProduct() instanceof Mage_Catalog_Model_Product) {
|
| 104 |
-
if ($items[$i]->getFreeShipping()) {
|
| 105 |
-
$freeShipping = true;
|
| 106 |
-
} else {
|
| 107 |
-
return;
|
| 108 |
-
}
|
| 109 |
-
}
|
| 110 |
-
}
|
| 111 |
-
if ($freeShipping) {
|
| 112 |
-
$request->setFreeShipping(true);
|
| 113 |
-
}
|
| 114 |
-
}
|
| 115 |
-
|
| 116 |
-
/**
|
| 117 |
-
* Get allowed shipping methods
|
| 118 |
-
*
|
| 119 |
-
* @return array
|
| 120 |
-
*/
|
| 121 |
-
public function getAllowedMethods()
|
| 122 |
-
{
|
| 123 |
-
return array('freeshipping' => $this->getConfigData('name'));
|
| 124 |
-
}
|
| 125 |
-
|
| 126 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Carrier/Interface.php
DELETED
|
@@ -1,45 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
interface Mage_Shipping_Model_Carrier_Interface
|
| 29 |
-
{
|
| 30 |
-
|
| 31 |
-
/**
|
| 32 |
-
* Check if carrier has shipping tracking option available
|
| 33 |
-
*
|
| 34 |
-
* @return boolean
|
| 35 |
-
*/
|
| 36 |
-
public function isTrackingAvailable();
|
| 37 |
-
|
| 38 |
-
/**
|
| 39 |
-
* Get allowed shipping methods
|
| 40 |
-
*
|
| 41 |
-
* @return array
|
| 42 |
-
*/
|
| 43 |
-
public function getAllowedMethods();
|
| 44 |
-
|
| 45 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Carrier/Pickup.php
DELETED
|
@@ -1,78 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
class Mage_Shipping_Model_Carrier_Pickup
|
| 29 |
-
extends Mage_Shipping_Model_Carrier_Abstract
|
| 30 |
-
implements Mage_Shipping_Model_Carrier_Interface
|
| 31 |
-
{
|
| 32 |
-
|
| 33 |
-
protected $_code = 'pickup';
|
| 34 |
-
protected $_isFixed = true;
|
| 35 |
-
|
| 36 |
-
/**
|
| 37 |
-
* Enter description here...
|
| 38 |
-
*
|
| 39 |
-
* @param Mage_Shipping_Model_Rate_Request $data
|
| 40 |
-
* @return Mage_Shipping_Model_Rate_Result
|
| 41 |
-
*/
|
| 42 |
-
public function collectRates(Mage_Shipping_Model_Rate_Request $request)
|
| 43 |
-
{
|
| 44 |
-
if (!$this->getConfigFlag('active')) {
|
| 45 |
-
return false;
|
| 46 |
-
}
|
| 47 |
-
|
| 48 |
-
$result = Mage::getModel('shipping/rate_result');
|
| 49 |
-
|
| 50 |
-
if (!empty($rate)) {
|
| 51 |
-
$method = Mage::getModel('shipping/rate_result_method');
|
| 52 |
-
|
| 53 |
-
$method->setCarrier('pickup');
|
| 54 |
-
$method->setCarrierTitle($this->getConfigData('title'));
|
| 55 |
-
|
| 56 |
-
$method->setMethod('store');
|
| 57 |
-
$method->setMethodTitle(Mage::helper('shipping')->__('Store Pickup'));
|
| 58 |
-
|
| 59 |
-
$method->setPrice(0);
|
| 60 |
-
$method->setCost(0);
|
| 61 |
-
|
| 62 |
-
$result->append($method);
|
| 63 |
-
}
|
| 64 |
-
|
| 65 |
-
return $result;
|
| 66 |
-
}
|
| 67 |
-
|
| 68 |
-
/**
|
| 69 |
-
* Get allowed shipping methods
|
| 70 |
-
*
|
| 71 |
-
* @return array
|
| 72 |
-
*/
|
| 73 |
-
public function getAllowedMethods()
|
| 74 |
-
{
|
| 75 |
-
return array('pickup'=>Mage::helper('shipping')->__('Store Pickup'));
|
| 76 |
-
}
|
| 77 |
-
|
| 78 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Carrier/Tablerate.php
DELETED
|
@@ -1,280 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
/*
|
| 28 |
-
* Class Mage_Shipping_Model_Carrier_Tablerate
|
| 29 |
-
*/
|
| 30 |
-
class Mage_Shipping_Model_Carrier_Tablerate
|
| 31 |
-
extends Mage_Shipping_Model_Carrier_Abstract
|
| 32 |
-
implements Mage_Shipping_Model_Carrier_Interface
|
| 33 |
-
{
|
| 34 |
-
|
| 35 |
-
/**
|
| 36 |
-
* code name
|
| 37 |
-
*
|
| 38 |
-
* @var string
|
| 39 |
-
*/
|
| 40 |
-
protected $_code = 'tablerate';
|
| 41 |
-
|
| 42 |
-
/**
|
| 43 |
-
* boolean isFixed
|
| 44 |
-
*
|
| 45 |
-
* @var boolean
|
| 46 |
-
*/
|
| 47 |
-
protected $_isFixed = true;
|
| 48 |
-
|
| 49 |
-
/**
|
| 50 |
-
* Default condition name
|
| 51 |
-
*
|
| 52 |
-
* @var string
|
| 53 |
-
*/
|
| 54 |
-
protected $_default_condition_name = 'package_weight';
|
| 55 |
-
|
| 56 |
-
/**
|
| 57 |
-
* Condition names
|
| 58 |
-
*
|
| 59 |
-
* @var array
|
| 60 |
-
*/
|
| 61 |
-
protected $_conditionNames = array();
|
| 62 |
-
|
| 63 |
-
/*
|
| 64 |
-
* Constructor
|
| 65 |
-
*/
|
| 66 |
-
public function __construct()
|
| 67 |
-
{
|
| 68 |
-
parent::__construct();
|
| 69 |
-
foreach ($this->getCode('condition_name') as $k => $v) {
|
| 70 |
-
$this->_conditionNames[] = $k;
|
| 71 |
-
}
|
| 72 |
-
}
|
| 73 |
-
|
| 74 |
-
/**
|
| 75 |
-
* Collect and get rates
|
| 76 |
-
*
|
| 77 |
-
* @param Mage_Shipping_Model_Rate_Request $request
|
| 78 |
-
* @return Mage_Shipping_Model_Rate_Result
|
| 79 |
-
*/
|
| 80 |
-
public function collectRates(Mage_Shipping_Model_Rate_Request $request)
|
| 81 |
-
{
|
| 82 |
-
if (!$this->getConfigFlag('active')) {
|
| 83 |
-
return false;
|
| 84 |
-
}
|
| 85 |
-
|
| 86 |
-
// exclude Virtual products price from Package value if pre-configured
|
| 87 |
-
if (!$this->getConfigFlag('include_virtual_price') && $request->getAllItems()) {
|
| 88 |
-
foreach ($request->getAllItems() as $item) {
|
| 89 |
-
if ($item->getParentItem()) {
|
| 90 |
-
continue;
|
| 91 |
-
}
|
| 92 |
-
if ($item->getHasChildren() && $item->isShipSeparately()) {
|
| 93 |
-
foreach ($item->getChildren() as $child) {
|
| 94 |
-
if ($child->getProduct()->isVirtual()) {
|
| 95 |
-
$request->setPackageValue($request->getPackageValue() - $child->getBaseRowTotal());
|
| 96 |
-
}
|
| 97 |
-
}
|
| 98 |
-
} elseif ($item->getProduct()->isVirtual()) {
|
| 99 |
-
$request->setPackageValue($request->getPackageValue() - $item->getBaseRowTotal());
|
| 100 |
-
}
|
| 101 |
-
}
|
| 102 |
-
}
|
| 103 |
-
|
| 104 |
-
// Free shipping by qty
|
| 105 |
-
$freeQty = 0;
|
| 106 |
-
if ($request->getAllItems()) {
|
| 107 |
-
$freePackageValue = 0;
|
| 108 |
-
foreach ($request->getAllItems() as $item) {
|
| 109 |
-
if ($item->getProduct()->isVirtual() || $item->getParentItem()) {
|
| 110 |
-
continue;
|
| 111 |
-
}
|
| 112 |
-
|
| 113 |
-
if ($item->getHasChildren() && $item->isShipSeparately()) {
|
| 114 |
-
foreach ($item->getChildren() as $child) {
|
| 115 |
-
if ($child->getFreeShipping() && !$child->getProduct()->isVirtual()) {
|
| 116 |
-
$freeShipping = is_numeric($child->getFreeShipping()) ? $child->getFreeShipping() : 0;
|
| 117 |
-
$freeQty += $item->getQty() * ($child->getQty() - $freeShipping);
|
| 118 |
-
}
|
| 119 |
-
}
|
| 120 |
-
} elseif ($item->getFreeShipping()) {
|
| 121 |
-
$freeShipping = is_numeric($item->getFreeShipping()) ? $item->getFreeShipping() : 0;
|
| 122 |
-
$freeQty += $item->getQty() - $freeShipping;
|
| 123 |
-
$freePackageValue += $item->getBaseRowTotal();
|
| 124 |
-
}
|
| 125 |
-
}
|
| 126 |
-
$oldValue = $request->getPackageValue();
|
| 127 |
-
$request->setPackageValue($oldValue - $freePackageValue);
|
| 128 |
-
}
|
| 129 |
-
|
| 130 |
-
if ($freePackageValue) {
|
| 131 |
-
$request->setPackageValue($request->getPackageValue() - $freePackageValue);
|
| 132 |
-
}
|
| 133 |
-
if (!$request->getConditionName()) {
|
| 134 |
-
$conditionName = $this->getConfigData('condition_name');
|
| 135 |
-
$request->setConditionName($conditionName ? $conditionName : $this->_default_condition_name);
|
| 136 |
-
}
|
| 137 |
-
|
| 138 |
-
// Package weight and qty free shipping
|
| 139 |
-
$oldWeight = $request->getPackageWeight();
|
| 140 |
-
$oldQty = $request->getPackageQty();
|
| 141 |
-
|
| 142 |
-
$request->setPackageWeight($request->getFreeMethodWeight());
|
| 143 |
-
$request->setPackageQty($oldQty - $freeQty);
|
| 144 |
-
|
| 145 |
-
$result = $this->_getModel('shipping/rate_result');
|
| 146 |
-
$rate = $this->getRate($request);
|
| 147 |
-
|
| 148 |
-
$request->setPackageWeight($oldWeight);
|
| 149 |
-
$request->setPackageQty($oldQty);
|
| 150 |
-
|
| 151 |
-
if (!empty($rate) && $rate['price'] >= 0) {
|
| 152 |
-
$method = $this->_getModel('shipping/rate_result_method');
|
| 153 |
-
|
| 154 |
-
$method->setCarrier('tablerate');
|
| 155 |
-
$method->setCarrierTitle($this->getConfigData('title'));
|
| 156 |
-
|
| 157 |
-
$method->setMethod('bestway');
|
| 158 |
-
$method->setMethodTitle($this->getConfigData('name'));
|
| 159 |
-
|
| 160 |
-
if ($request->getFreeShipping() === true || ($request->getPackageQty() == $freeQty)) {
|
| 161 |
-
$shippingPrice = 0;
|
| 162 |
-
} else {
|
| 163 |
-
$shippingPrice = $this->getFinalPriceWithHandlingFee($rate['price']);
|
| 164 |
-
}
|
| 165 |
-
|
| 166 |
-
$method->setPrice($shippingPrice);
|
| 167 |
-
$method->setCost($rate['cost']);
|
| 168 |
-
|
| 169 |
-
$result->append($method);
|
| 170 |
-
} elseif (empty($rate) && $request->getFreeShipping() === true) {
|
| 171 |
-
/**
|
| 172 |
-
* was applied promotion rule for whole cart
|
| 173 |
-
* other shipping methods could be switched off at all
|
| 174 |
-
* we must show table rate method with 0$ price, if grand_total more, than min table condition_value
|
| 175 |
-
* free setPackageWeight() has already was taken into account
|
| 176 |
-
*/
|
| 177 |
-
$request->setPackageValue($freePackageValue);
|
| 178 |
-
$request->setPackageQty($freeQty);
|
| 179 |
-
$rate = $this->getRate($request);
|
| 180 |
-
if (!empty($rate) && $rate['price'] >= 0) {
|
| 181 |
-
$method = $this->_getModel('shipping/rate_result_method');
|
| 182 |
-
|
| 183 |
-
$method->setCarrier('tablerate');
|
| 184 |
-
$method->setCarrierTitle($this->getConfigData('title'));
|
| 185 |
-
|
| 186 |
-
$method->setMethod('bestway');
|
| 187 |
-
$method->setMethodTitle($this->getConfigData('name'));
|
| 188 |
-
|
| 189 |
-
$method->setPrice(0);
|
| 190 |
-
$method->setCost(0);
|
| 191 |
-
|
| 192 |
-
$result->append($method);
|
| 193 |
-
}
|
| 194 |
-
} else {
|
| 195 |
-
$error = $this->_getModel('shipping/rate_result_error');
|
| 196 |
-
$error->setCarrier('tablerate');
|
| 197 |
-
$error->setCarrierTitle($this->getConfigData('title'));
|
| 198 |
-
$error->setErrorMessage($this->getConfigData('specificerrmsg'));
|
| 199 |
-
$result->append($error);
|
| 200 |
-
}
|
| 201 |
-
|
| 202 |
-
return $result;
|
| 203 |
-
}
|
| 204 |
-
|
| 205 |
-
/**
|
| 206 |
-
* Get Model
|
| 207 |
-
*
|
| 208 |
-
* @param string $modelName
|
| 209 |
-
*
|
| 210 |
-
* @return Mage_Core_Model_Abstract
|
| 211 |
-
*/
|
| 212 |
-
protected function _getModel($modelName)
|
| 213 |
-
{
|
| 214 |
-
return Mage::getModel($modelName);
|
| 215 |
-
}
|
| 216 |
-
|
| 217 |
-
/**
|
| 218 |
-
* Get Rate
|
| 219 |
-
*
|
| 220 |
-
* @param Mage_Shipping_Model_Rate_Request $request
|
| 221 |
-
*
|
| 222 |
-
* @return Mage_Core_Model_Abstract
|
| 223 |
-
*/
|
| 224 |
-
public function getRate(Mage_Shipping_Model_Rate_Request $request)
|
| 225 |
-
{
|
| 226 |
-
return Mage::getResourceModel('shipping/carrier_tablerate')->getRate($request);
|
| 227 |
-
}
|
| 228 |
-
|
| 229 |
-
/**
|
| 230 |
-
* Get code
|
| 231 |
-
*
|
| 232 |
-
* @param string $type
|
| 233 |
-
* @param string $code
|
| 234 |
-
*
|
| 235 |
-
* @return array
|
| 236 |
-
*/
|
| 237 |
-
public function getCode($type, $code = '')
|
| 238 |
-
{
|
| 239 |
-
$codes = array(
|
| 240 |
-
|
| 241 |
-
'condition_name' => array(
|
| 242 |
-
'package_weight' => Mage::helper('shipping')->__('Weight vs. Destination'),
|
| 243 |
-
'package_value' => Mage::helper('shipping')->__('Price vs. Destination'),
|
| 244 |
-
'package_qty' => Mage::helper('shipping')->__('# of Items vs. Destination'),
|
| 245 |
-
),
|
| 246 |
-
|
| 247 |
-
'condition_name_short' => array(
|
| 248 |
-
'package_weight' => Mage::helper('shipping')->__('Weight (and above)'),
|
| 249 |
-
'package_value' => Mage::helper('shipping')->__('Order Subtotal (and above)'),
|
| 250 |
-
'package_qty' => Mage::helper('shipping')->__('# of Items (and above)'),
|
| 251 |
-
),
|
| 252 |
-
|
| 253 |
-
);
|
| 254 |
-
|
| 255 |
-
if (!isset($codes[$type])) {
|
| 256 |
-
throw Mage::exception('Mage_Shipping', Mage::helper('shipping')->__('Invalid Table Rate code type: %s', $type));
|
| 257 |
-
}
|
| 258 |
-
|
| 259 |
-
if ('' === $code) {
|
| 260 |
-
return $codes[$type];
|
| 261 |
-
}
|
| 262 |
-
|
| 263 |
-
if (!isset($codes[$type][$code])) {
|
| 264 |
-
throw Mage::exception('Mage_Shipping', Mage::helper('shipping')->__('Invalid Table Rate code for type %s: %s', $type, $code));
|
| 265 |
-
}
|
| 266 |
-
|
| 267 |
-
return $codes[$type][$code];
|
| 268 |
-
}
|
| 269 |
-
|
| 270 |
-
/**
|
| 271 |
-
* Get allowed shipping methods
|
| 272 |
-
*
|
| 273 |
-
* @return array
|
| 274 |
-
*/
|
| 275 |
-
public function getAllowedMethods()
|
| 276 |
-
{
|
| 277 |
-
return array('bestway' => $this->getConfigData('name'));
|
| 278 |
-
}
|
| 279 |
-
|
| 280 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Config.php
DELETED
|
@@ -1,125 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
class Mage_Shipping_Model_Config extends Varien_Object
|
| 29 |
-
{
|
| 30 |
-
/**
|
| 31 |
-
* Shipping origin settings
|
| 32 |
-
*/
|
| 33 |
-
const XML_PATH_ORIGIN_COUNTRY_ID = 'shipping/origin/country_id';
|
| 34 |
-
const XML_PATH_ORIGIN_REGION_ID = 'shipping/origin/region_id';
|
| 35 |
-
const XML_PATH_ORIGIN_CITY = 'shipping/origin/city';
|
| 36 |
-
const XML_PATH_ORIGIN_POSTCODE = 'shipping/origin/postcode';
|
| 37 |
-
|
| 38 |
-
protected static $_carriers;
|
| 39 |
-
|
| 40 |
-
/**
|
| 41 |
-
* Retrieve active system carriers
|
| 42 |
-
*
|
| 43 |
-
* @param mixed $store
|
| 44 |
-
* @return array
|
| 45 |
-
*/
|
| 46 |
-
public function getActiveCarriers($store = null)
|
| 47 |
-
{
|
| 48 |
-
$carriers = array();
|
| 49 |
-
$config = Mage::getStoreConfig('carriers', $store);
|
| 50 |
-
foreach ($config as $code => $carrierConfig) {
|
| 51 |
-
if (Mage::getStoreConfigFlag('carriers/'.$code.'/active', $store)) {
|
| 52 |
-
$carrierModel = $this->_getCarrier($code, $carrierConfig, $store);
|
| 53 |
-
if ($carrierModel) {
|
| 54 |
-
$carriers[$code] = $carrierModel;
|
| 55 |
-
}
|
| 56 |
-
}
|
| 57 |
-
}
|
| 58 |
-
return $carriers;
|
| 59 |
-
}
|
| 60 |
-
|
| 61 |
-
/**
|
| 62 |
-
* Retrieve all system carriers
|
| 63 |
-
*
|
| 64 |
-
* @param mixed $store
|
| 65 |
-
* @return array
|
| 66 |
-
*/
|
| 67 |
-
public function getAllCarriers($store = null)
|
| 68 |
-
{
|
| 69 |
-
$carriers = array();
|
| 70 |
-
$config = Mage::getStoreConfig('carriers', $store);
|
| 71 |
-
foreach ($config as $code => $carrierConfig) {
|
| 72 |
-
$model = $this->_getCarrier($code, $carrierConfig, $store);
|
| 73 |
-
if ($model) {
|
| 74 |
-
$carriers[$code] = $model;
|
| 75 |
-
}
|
| 76 |
-
}
|
| 77 |
-
return $carriers;
|
| 78 |
-
}
|
| 79 |
-
|
| 80 |
-
/**
|
| 81 |
-
* Retrieve carrier model instance by carrier code
|
| 82 |
-
*
|
| 83 |
-
* @param string $carrierCode
|
| 84 |
-
* @param mixed $store
|
| 85 |
-
* @return Mage_Usa_Model_Shipping_Carrier_Abstract
|
| 86 |
-
*/
|
| 87 |
-
public function getCarrierInstance($carrierCode, $store = null)
|
| 88 |
-
{
|
| 89 |
-
$carrierConfig = Mage::getStoreConfig('carriers/'.$carrierCode, $store);
|
| 90 |
-
if (!empty($carrierConfig)) {
|
| 91 |
-
return $this->_getCarrier($carrierCode, $carrierConfig, $store);
|
| 92 |
-
}
|
| 93 |
-
return false;
|
| 94 |
-
}
|
| 95 |
-
|
| 96 |
-
/**
|
| 97 |
-
* Get carrier model object
|
| 98 |
-
*
|
| 99 |
-
* @param string $code
|
| 100 |
-
* @param array $config
|
| 101 |
-
* @param mixed $store
|
| 102 |
-
* @return Mage_Shipping_Model_Carrier_Abstract
|
| 103 |
-
*/
|
| 104 |
-
protected function _getCarrier($code, $config, $store = null)
|
| 105 |
-
{
|
| 106 |
-
if (!isset($config['model'])) {
|
| 107 |
-
return false;
|
| 108 |
-
}
|
| 109 |
-
$modelName = $config['model'];
|
| 110 |
-
|
| 111 |
-
/**
|
| 112 |
-
* Added protection from not existing models usage.
|
| 113 |
-
* Related with module uninstall process
|
| 114 |
-
*/
|
| 115 |
-
try {
|
| 116 |
-
$carrier = Mage::getModel($modelName);
|
| 117 |
-
} catch (Exception $e) {
|
| 118 |
-
Mage::logException($e);
|
| 119 |
-
return false;
|
| 120 |
-
}
|
| 121 |
-
$carrier->setId($code)->setStore($store);
|
| 122 |
-
self::$_carriers[$code] = $carrier;
|
| 123 |
-
return self::$_carriers[$code];
|
| 124 |
-
}
|
| 125 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Info.php
DELETED
|
@@ -1,169 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
class Mage_Shipping_Model_Info extends Varien_Object
|
| 29 |
-
{
|
| 30 |
-
/**
|
| 31 |
-
* Tracking info
|
| 32 |
-
*
|
| 33 |
-
* @var array
|
| 34 |
-
*/
|
| 35 |
-
protected $_trackingInfo = array();
|
| 36 |
-
|
| 37 |
-
/**
|
| 38 |
-
* Generating tracking info
|
| 39 |
-
*
|
| 40 |
-
* @param array $hash
|
| 41 |
-
* @return Mage_Shipping_Model_Info
|
| 42 |
-
*/
|
| 43 |
-
public function loadByHash($hash)
|
| 44 |
-
{
|
| 45 |
-
/* @var $helper Mage_Shipping_Helper_Data */
|
| 46 |
-
$helper = Mage::helper('shipping');
|
| 47 |
-
$data = $helper->decodeTrackingHash($hash);
|
| 48 |
-
if (!empty($data)) {
|
| 49 |
-
$this->setData($data['key'], $data['id']);
|
| 50 |
-
$this->setProtectCode($data['hash']);
|
| 51 |
-
|
| 52 |
-
if ($this->getOrderId() > 0) {
|
| 53 |
-
$this->getTrackingInfoByOrder();
|
| 54 |
-
} elseif($this->getShipId() > 0) {
|
| 55 |
-
$this->getTrackingInfoByShip();
|
| 56 |
-
} else {
|
| 57 |
-
$this->getTrackingInfoByTrackId();
|
| 58 |
-
}
|
| 59 |
-
}
|
| 60 |
-
return $this;
|
| 61 |
-
}
|
| 62 |
-
|
| 63 |
-
/**
|
| 64 |
-
* Retrieve tracking info
|
| 65 |
-
*
|
| 66 |
-
* @return array
|
| 67 |
-
*/
|
| 68 |
-
public function getTrackingInfo()
|
| 69 |
-
{
|
| 70 |
-
return $this->_trackingInfo;
|
| 71 |
-
}
|
| 72 |
-
|
| 73 |
-
/**
|
| 74 |
-
* Instantiate order model
|
| 75 |
-
*
|
| 76 |
-
* @return Mage_Sales_Model_Order|bool
|
| 77 |
-
*/
|
| 78 |
-
protected function _initOrder()
|
| 79 |
-
{
|
| 80 |
-
$order = Mage::getModel('sales/order')->load($this->getOrderId());
|
| 81 |
-
|
| 82 |
-
if (!$order->getId() || $this->getProtectCode() != $order->getProtectCode()) {
|
| 83 |
-
return false;
|
| 84 |
-
}
|
| 85 |
-
|
| 86 |
-
return $order;
|
| 87 |
-
}
|
| 88 |
-
|
| 89 |
-
/**
|
| 90 |
-
* Instantiate ship model
|
| 91 |
-
*
|
| 92 |
-
* @return Mage_Sales_Model_Order_Shipment|bool
|
| 93 |
-
*/
|
| 94 |
-
protected function _initShipment()
|
| 95 |
-
{
|
| 96 |
-
/* @var $model Mage_Sales_Model_Order_Shipment */
|
| 97 |
-
$model = Mage::getModel('sales/order_shipment');
|
| 98 |
-
$ship = $model->load($this->getShipId());
|
| 99 |
-
if (!$ship->getEntityId() || $this->getProtectCode() != $ship->getProtectCode()) {
|
| 100 |
-
return false;
|
| 101 |
-
}
|
| 102 |
-
|
| 103 |
-
return $ship;
|
| 104 |
-
}
|
| 105 |
-
|
| 106 |
-
/**
|
| 107 |
-
* Retrieve all tracking by order id
|
| 108 |
-
*
|
| 109 |
-
* @return array
|
| 110 |
-
*/
|
| 111 |
-
public function getTrackingInfoByOrder()
|
| 112 |
-
{
|
| 113 |
-
$shipTrack = array();
|
| 114 |
-
$order = $this->_initOrder();
|
| 115 |
-
if ($order) {
|
| 116 |
-
$shipments = $order->getShipmentsCollection();
|
| 117 |
-
foreach ($shipments as $shipment){
|
| 118 |
-
$increment_id = $shipment->getIncrementId();
|
| 119 |
-
$tracks = $shipment->getTracksCollection();
|
| 120 |
-
|
| 121 |
-
$trackingInfos=array();
|
| 122 |
-
foreach ($tracks as $track){
|
| 123 |
-
$trackingInfos[] = $track->getNumberDetail();
|
| 124 |
-
}
|
| 125 |
-
$shipTrack[$increment_id] = $trackingInfos;
|
| 126 |
-
}
|
| 127 |
-
}
|
| 128 |
-
$this->_trackingInfo = $shipTrack;
|
| 129 |
-
return $this->_trackingInfo;
|
| 130 |
-
}
|
| 131 |
-
|
| 132 |
-
/**
|
| 133 |
-
* Retrieve all tracking by ship id
|
| 134 |
-
*
|
| 135 |
-
* @return array
|
| 136 |
-
*/
|
| 137 |
-
public function getTrackingInfoByShip()
|
| 138 |
-
{
|
| 139 |
-
$shipTrack = array();
|
| 140 |
-
$shipment = $this->_initShipment();
|
| 141 |
-
if ($shipment) {
|
| 142 |
-
$increment_id = $shipment->getIncrementId();
|
| 143 |
-
$tracks = $shipment->getTracksCollection();
|
| 144 |
-
|
| 145 |
-
$trackingInfos=array();
|
| 146 |
-
foreach ($tracks as $track){
|
| 147 |
-
$trackingInfos[] = $track->getNumberDetail();
|
| 148 |
-
}
|
| 149 |
-
$shipTrack[$increment_id] = $trackingInfos;
|
| 150 |
-
|
| 151 |
-
}
|
| 152 |
-
$this->_trackingInfo = $shipTrack;
|
| 153 |
-
return $this->_trackingInfo;
|
| 154 |
-
}
|
| 155 |
-
|
| 156 |
-
/**
|
| 157 |
-
* Retrieve tracking by tracking entity id
|
| 158 |
-
*
|
| 159 |
-
* @return array
|
| 160 |
-
*/
|
| 161 |
-
public function getTrackingInfoByTrackId()
|
| 162 |
-
{
|
| 163 |
-
$track = Mage::getModel('sales/order_shipment_track')->load($this->getTrackId());
|
| 164 |
-
if ($track->getId() && $this->getProtectCode() == $track->getProtectCode()) {
|
| 165 |
-
$this->_trackingInfo = array(array($track->getNumberDetail()));
|
| 166 |
-
}
|
| 167 |
-
return $this->_trackingInfo;
|
| 168 |
-
}
|
| 169 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Mysql4/Carrier/Tablerate.php
DELETED
|
@@ -1,37 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
/**
|
| 29 |
-
* Shipping table rates
|
| 30 |
-
*
|
| 31 |
-
* @category Mage
|
| 32 |
-
* @package Mage_Shipping
|
| 33 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
| 34 |
-
*/
|
| 35 |
-
class Mage_Shipping_Model_Mysql4_Carrier_Tablerate extends Mage_Shipping_Model_Resource_Carrier_Tablerate
|
| 36 |
-
{
|
| 37 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Mysql4/Carrier/Tablerate/Collection.php
DELETED
|
@@ -1,38 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
/**
|
| 29 |
-
* Shipping table rates collection
|
| 30 |
-
*
|
| 31 |
-
* @category Mage
|
| 32 |
-
* @package Mage_Shipping
|
| 33 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
| 34 |
-
*/
|
| 35 |
-
class Mage_Shipping_Model_Mysql4_Carrier_Tablerate_Collection
|
| 36 |
-
extends Mage_Shipping_Model_Resource_Carrier_Tablerate_Collection
|
| 37 |
-
{
|
| 38 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Rate/Abstract.php
DELETED
|
@@ -1,40 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
abstract class Mage_Shipping_Model_Rate_Abstract extends Mage_Core_Model_Abstract
|
| 29 |
-
{
|
| 30 |
-
static protected $_instances;
|
| 31 |
-
|
| 32 |
-
public function getCarrierInstance()
|
| 33 |
-
{
|
| 34 |
-
$code = $this->getCarrier();
|
| 35 |
-
if (!isset(self::$_instances[$code])) {
|
| 36 |
-
self::$_instances[$code] = Mage::getModel('shipping/config')->getCarrierInstance($code);
|
| 37 |
-
}
|
| 38 |
-
return self::$_instances[$code];
|
| 39 |
-
}
|
| 40 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Rate/Request.php
DELETED
|
@@ -1,140 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
/**
|
| 28 |
-
* Fields:
|
| 29 |
-
* - orig:
|
| 30 |
-
* - country_id: UK
|
| 31 |
-
* - region_id: 1
|
| 32 |
-
* - postcode: 90034
|
| 33 |
-
* - dest:
|
| 34 |
-
* - country_id: UK
|
| 35 |
-
* - region_id: 2
|
| 36 |
-
* - postcode: 01005
|
| 37 |
-
* - package:
|
| 38 |
-
* - value: $100
|
| 39 |
-
* - weight: 1.5 lb
|
| 40 |
-
* - height: 10"
|
| 41 |
-
* - width: 10"
|
| 42 |
-
* - depth: 10"
|
| 43 |
-
* - order:
|
| 44 |
-
* - total_qty: 10
|
| 45 |
-
* - subtotal: $100
|
| 46 |
-
* - option
|
| 47 |
-
* - insurance: true
|
| 48 |
-
* - handling: $1
|
| 49 |
-
* - table (shiptable)
|
| 50 |
-
* - condition_name: package_weight
|
| 51 |
-
* - limit
|
| 52 |
-
* - carrier: ups
|
| 53 |
-
* - method: 3dp
|
| 54 |
-
* - ups
|
| 55 |
-
* - pickup: CC
|
| 56 |
-
* - container: CP
|
| 57 |
-
* - address: RES
|
| 58 |
-
*
|
| 59 |
-
* @method int getStoreId()
|
| 60 |
-
* @method Mage_Shipping_Model_Rate_Request setStoreId(int $value)
|
| 61 |
-
* @method int getWebsiteId()
|
| 62 |
-
* @method Mage_Shipping_Model_Rate_Request setWebsiteId(int $value)
|
| 63 |
-
* @method string getBaseCurrency()
|
| 64 |
-
* @method Mage_Shipping_Model_Rate_Request setBaseCurrency(string $value)
|
| 65 |
-
*
|
| 66 |
-
* @method Mage_Shipping_Model_Rate_Request setAllItems(array $items)
|
| 67 |
-
* @method array getAllItems()
|
| 68 |
-
*
|
| 69 |
-
* @method Mage_Shipping_Model_Rate_Request setOrigCountryId(string $value)
|
| 70 |
-
* @method string getOrigCountryId()
|
| 71 |
-
* @method Mage_Shipping_Model_Rate_Request setOrigRegionId(int $value)
|
| 72 |
-
* @method int getOrigRegionId()
|
| 73 |
-
* @method Mage_Shipping_Model_Rate_Request setOrigPostcode(string $value)
|
| 74 |
-
* @method string getOrigPostcode()
|
| 75 |
-
* @method Mage_Shipping_Model_Rate_Request setOrigCity(string $value)
|
| 76 |
-
* @method string getOrigCity()
|
| 77 |
-
*
|
| 78 |
-
* @method Mage_Shipping_Model_Rate_Request setDestCountryId(string $value)
|
| 79 |
-
* @method string getDestCountryId()
|
| 80 |
-
* @method Mage_Shipping_Model_Rate_Request setDestRegionId(int $value)
|
| 81 |
-
* @method int getDestRegionId()
|
| 82 |
-
* @method Mage_Shipping_Model_Rate_Request setDestRegionCode(string $value)
|
| 83 |
-
* @method string getDestRegionCode()
|
| 84 |
-
* @method Mage_Shipping_Model_Rate_Request setDestPostcode(string $value)
|
| 85 |
-
* @method string getDestPostcode()
|
| 86 |
-
* @method Mage_Shipping_Model_Rate_Request setDestCity(string $value)
|
| 87 |
-
* @method string getDestCity()
|
| 88 |
-
* @method Mage_Shipping_Model_Rate_Request setDestStreet(string $value)
|
| 89 |
-
* @method string getDestStreet()
|
| 90 |
-
*
|
| 91 |
-
* @method Mage_Shipping_Model_Rate_Request setPackageValue(float $value)
|
| 92 |
-
* @method float getPackageValue()
|
| 93 |
-
* @method Mage_Shipping_Model_Rate_Request setPackageValueWithDiscount(float $value)
|
| 94 |
-
* @method float getPackageValueWithDiscount()
|
| 95 |
-
* @method Mage_Shipping_Model_Rate_Request setPackagePhysicalValue(float $value)
|
| 96 |
-
* @method float getPackagePhysicalValue()
|
| 97 |
-
* @method Mage_Shipping_Model_Rate_Request setPackageQty(float $value)
|
| 98 |
-
* @method float getPackageQty()
|
| 99 |
-
* @method Mage_Shipping_Model_Rate_Request setPackageWeight(float $value)
|
| 100 |
-
* @method float getPackageWeight()
|
| 101 |
-
* @method Mage_Shipping_Model_Rate_Request setPackageHeight(int $value)
|
| 102 |
-
* @method int getPackageHeight()
|
| 103 |
-
* @method Mage_Shipping_Model_Rate_Request setPackageWidth(int $value)
|
| 104 |
-
* @method int getPackageWidth()
|
| 105 |
-
* @method Mage_Shipping_Model_Rate_Request setPackageDepth(int $value)
|
| 106 |
-
* @method int getPackageDepth()
|
| 107 |
-
* @method Mage_Shipping_Model_Rate_Request setPackageCurrency(string $value)
|
| 108 |
-
* @method string getPackageCurrency()
|
| 109 |
-
*
|
| 110 |
-
* @method Mage_Shipping_Model_Rate_Request setOrderTotalQty(float $value)
|
| 111 |
-
* @method float getOrderTotalQty()
|
| 112 |
-
* @method Mage_Shipping_Model_Rate_Request setOrderSubtotal(float $value)
|
| 113 |
-
* @method float getOrderSubtotal()
|
| 114 |
-
*
|
| 115 |
-
* @method boolean getFreeShipping()
|
| 116 |
-
* @method Mage_Shipping_Model_Rate_Request setFreeShipping(boolean $flag)
|
| 117 |
-
* @method float getFreeMethodWeight()
|
| 118 |
-
* @method Mage_Shipping_Model_Rate_Request setFreeMethodWeight(float $value)
|
| 119 |
-
*
|
| 120 |
-
* @method Mage_Shipping_Model_Rate_Request setOptionInsurance(boolean $value)
|
| 121 |
-
* @method boolean getOptionInsurance()
|
| 122 |
-
* @method Mage_Shipping_Model_Rate_Request setOptionHandling(float $flag)
|
| 123 |
-
* @method float getOptionHandling()
|
| 124 |
-
*
|
| 125 |
-
* @method Mage_Shipping_Model_Rate_Request setConditionName(array $value)
|
| 126 |
-
* @method Mage_Shipping_Model_Rate_Request setConditionName(string $value)
|
| 127 |
-
* @method string getConditionName()
|
| 128 |
-
* @method array getConditionName()
|
| 129 |
-
*
|
| 130 |
-
* @method Mage_Shipping_Model_Rate_Request setLimitCarrier(string $value)
|
| 131 |
-
* @method string getLimitCarrier()
|
| 132 |
-
* @method Mage_Shipping_Model_Rate_Request setLimitMethod(string $value)
|
| 133 |
-
* @method string getLimitMethod()
|
| 134 |
-
*
|
| 135 |
-
* @category Mage
|
| 136 |
-
* @package Mage_Shipping
|
| 137 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
| 138 |
-
*/
|
| 139 |
-
class Mage_Shipping_Model_Rate_Request extends Varien_Object
|
| 140 |
-
{}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Rate/Result.php
DELETED
|
@@ -1,218 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
class Mage_Shipping_Model_Rate_Result
|
| 29 |
-
{
|
| 30 |
-
/**
|
| 31 |
-
* Shippin method rates
|
| 32 |
-
*
|
| 33 |
-
* @var array
|
| 34 |
-
*/
|
| 35 |
-
protected $_rates = array();
|
| 36 |
-
|
| 37 |
-
/**
|
| 38 |
-
* Shipping errors
|
| 39 |
-
*
|
| 40 |
-
* @var null|bool
|
| 41 |
-
*/
|
| 42 |
-
protected $_error = null;
|
| 43 |
-
|
| 44 |
-
/**
|
| 45 |
-
* Reset result
|
| 46 |
-
*
|
| 47 |
-
* @return Mage_Shipping_Model_Rate_Result
|
| 48 |
-
*/
|
| 49 |
-
public function reset()
|
| 50 |
-
{
|
| 51 |
-
$this->_rates = array();
|
| 52 |
-
return $this;
|
| 53 |
-
}
|
| 54 |
-
|
| 55 |
-
/**
|
| 56 |
-
* Set Error
|
| 57 |
-
*
|
| 58 |
-
* @param bool $error
|
| 59 |
-
* @return void
|
| 60 |
-
*/
|
| 61 |
-
public function setError($error)
|
| 62 |
-
{
|
| 63 |
-
$this->_error = $error;
|
| 64 |
-
}
|
| 65 |
-
|
| 66 |
-
/**
|
| 67 |
-
* Get Error
|
| 68 |
-
*
|
| 69 |
-
* @return null|bool;
|
| 70 |
-
*/
|
| 71 |
-
public function getError()
|
| 72 |
-
{
|
| 73 |
-
return $this->_error;
|
| 74 |
-
}
|
| 75 |
-
|
| 76 |
-
/**
|
| 77 |
-
* Add a rate to the result
|
| 78 |
-
*
|
| 79 |
-
* @param Mage_Shipping_Model_Rate_Result_Abstract|Mage_Shipping_Model_Rate_Result $result
|
| 80 |
-
* @return Mage_Shipping_Model_Rate_Result
|
| 81 |
-
*/
|
| 82 |
-
public function append($result)
|
| 83 |
-
{
|
| 84 |
-
if ($result instanceof Mage_Shipping_Model_Rate_Result_Error) {
|
| 85 |
-
$this->setError(true);
|
| 86 |
-
}
|
| 87 |
-
if ($result instanceof Mage_Shipping_Model_Rate_Result_Abstract) {
|
| 88 |
-
$this->_rates[] = $result;
|
| 89 |
-
}
|
| 90 |
-
elseif ($result instanceof Mage_Shipping_Model_Rate_Result) {
|
| 91 |
-
$rates = $result->getAllRates();
|
| 92 |
-
foreach ($rates as $rate) {
|
| 93 |
-
$this->append($rate);
|
| 94 |
-
}
|
| 95 |
-
}
|
| 96 |
-
return $this;
|
| 97 |
-
}
|
| 98 |
-
|
| 99 |
-
/**
|
| 100 |
-
* Return all quotes in the result
|
| 101 |
-
*
|
| 102 |
-
* @return array
|
| 103 |
-
*/
|
| 104 |
-
public function getAllRates()
|
| 105 |
-
{
|
| 106 |
-
return $this->_rates;
|
| 107 |
-
}
|
| 108 |
-
|
| 109 |
-
/**
|
| 110 |
-
* Return rate by id in array
|
| 111 |
-
*
|
| 112 |
-
* @param int $id
|
| 113 |
-
* @return Mage_Shipping_Model_Rate_Result_Method|null
|
| 114 |
-
*/
|
| 115 |
-
public function getRateById($id)
|
| 116 |
-
{
|
| 117 |
-
return isset($this->_rates[$id]) ? $this->_rates[$id] : null;
|
| 118 |
-
}
|
| 119 |
-
|
| 120 |
-
/**
|
| 121 |
-
* Return quotes for specified type
|
| 122 |
-
*
|
| 123 |
-
* @param string $carrier
|
| 124 |
-
* @return array
|
| 125 |
-
*/
|
| 126 |
-
public function getRatesByCarrier($carrier)
|
| 127 |
-
{
|
| 128 |
-
$result = array();
|
| 129 |
-
foreach ($this->_rates as $rate) {
|
| 130 |
-
if ($rate->getCarrier() === $carrier) {
|
| 131 |
-
$result[] = $rate;
|
| 132 |
-
}
|
| 133 |
-
}
|
| 134 |
-
return $result;
|
| 135 |
-
}
|
| 136 |
-
|
| 137 |
-
/**
|
| 138 |
-
* Converts object to array
|
| 139 |
-
*
|
| 140 |
-
* @return array
|
| 141 |
-
*/
|
| 142 |
-
public function asArray()
|
| 143 |
-
{
|
| 144 |
-
$currencyFilter = Mage::app()->getStore()->getPriceFilter();
|
| 145 |
-
$rates = array();
|
| 146 |
-
$allRates = $this->getAllRates();
|
| 147 |
-
foreach ($allRates as $rate) {
|
| 148 |
-
$rates[$rate->getCarrier()]['title'] = $rate->getCarrierTitle();
|
| 149 |
-
$rates[$rate->getCarrier()]['methods'][$rate->getMethod()] = array(
|
| 150 |
-
'title' => $rate->getMethodTitle(),
|
| 151 |
-
'price' => $rate->getPrice(),
|
| 152 |
-
'price_formatted' => $currencyFilter->filter($rate->getPrice()),
|
| 153 |
-
);
|
| 154 |
-
}
|
| 155 |
-
return $rates;
|
| 156 |
-
}
|
| 157 |
-
|
| 158 |
-
/**
|
| 159 |
-
* Get cheapest rate
|
| 160 |
-
*
|
| 161 |
-
* @return null|Mage_Shipping_Model_Rate_Result_Method
|
| 162 |
-
*/
|
| 163 |
-
public function getCheapestRate()
|
| 164 |
-
{
|
| 165 |
-
$cheapest = null;
|
| 166 |
-
$minPrice = 100000;
|
| 167 |
-
foreach ($this->getAllRates() as $rate) {
|
| 168 |
-
if (is_numeric($rate->getPrice()) && $rate->getPrice() < $minPrice) {
|
| 169 |
-
$cheapest = $rate;
|
| 170 |
-
$minPrice = $rate->getPrice();
|
| 171 |
-
}
|
| 172 |
-
}
|
| 173 |
-
return $cheapest;
|
| 174 |
-
}
|
| 175 |
-
|
| 176 |
-
/**
|
| 177 |
-
* Sort rates by price from min to max
|
| 178 |
-
*
|
| 179 |
-
* @return Mage_Shipping_Model_Rate_Result
|
| 180 |
-
*/
|
| 181 |
-
public function sortRatesByPrice()
|
| 182 |
-
{
|
| 183 |
-
if (!is_array($this->_rates) || !count($this->_rates)) {
|
| 184 |
-
return $this;
|
| 185 |
-
}
|
| 186 |
-
/* @var $rate Mage_Shipping_Model_Rate_Result_Method */
|
| 187 |
-
foreach ($this->_rates as $i => $rate) {
|
| 188 |
-
$tmp[$i] = $rate->getPrice();
|
| 189 |
-
}
|
| 190 |
-
|
| 191 |
-
natsort($tmp);
|
| 192 |
-
|
| 193 |
-
foreach ($tmp as $i => $price) {
|
| 194 |
-
$result[] = $this->_rates[$i];
|
| 195 |
-
}
|
| 196 |
-
|
| 197 |
-
$this->reset();
|
| 198 |
-
$this->_rates = $result;
|
| 199 |
-
return $this;
|
| 200 |
-
}
|
| 201 |
-
|
| 202 |
-
/**
|
| 203 |
-
* Set price for each rate according to count of packages
|
| 204 |
-
*
|
| 205 |
-
* @param int $packageCount
|
| 206 |
-
* @return Mage_Shipping_Model_Rate_Result
|
| 207 |
-
*/
|
| 208 |
-
public function updateRatePrice($packageCount)
|
| 209 |
-
{
|
| 210 |
-
if ($packageCount > 1) {
|
| 211 |
-
foreach ($this->_rates as $rate) {
|
| 212 |
-
$rate->setPrice($rate->getPrice() * $packageCount);
|
| 213 |
-
}
|
| 214 |
-
}
|
| 215 |
-
|
| 216 |
-
return $this;
|
| 217 |
-
}
|
| 218 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Rate/Result/Abstract.php
DELETED
|
@@ -1,31 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
class Mage_Shipping_Model_Rate_Result_Abstract extends Varien_Object
|
| 29 |
-
{
|
| 30 |
-
|
| 31 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Rate/Result/Error.php
DELETED
|
@@ -1,38 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
class Mage_Shipping_Model_Rate_Result_Error extends Mage_Shipping_Model_Rate_Result_Abstract
|
| 29 |
-
{
|
| 30 |
-
|
| 31 |
-
public function getErrorMessage()
|
| 32 |
-
{
|
| 33 |
-
if (!$this->getData('error_message')) {
|
| 34 |
-
$this->setData('error_message', Mage::helper('shipping')->__('This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.'));
|
| 35 |
-
}
|
| 36 |
-
return $this->getData('error_message');
|
| 37 |
-
}
|
| 38 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Rate/Result/Method.php
DELETED
|
@@ -1,50 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
/**
|
| 29 |
-
* Fields:
|
| 30 |
-
* - carrier: ups
|
| 31 |
-
* - carrierTitle: United Parcel Service
|
| 32 |
-
* - method: 2day
|
| 33 |
-
* - methodTitle: UPS 2nd Day Priority
|
| 34 |
-
* - price: $9.40 (cost+handling)
|
| 35 |
-
* - cost: $8.00
|
| 36 |
-
*/
|
| 37 |
-
class Mage_Shipping_Model_Rate_Result_Method extends Mage_Shipping_Model_Rate_Result_Abstract
|
| 38 |
-
{
|
| 39 |
-
/**
|
| 40 |
-
* Round shipping carrier's method price
|
| 41 |
-
*
|
| 42 |
-
* @param string|float|int $price
|
| 43 |
-
* @return Mage_Shipping_Model_Rate_Result_Method
|
| 44 |
-
*/
|
| 45 |
-
public function setPrice($price)
|
| 46 |
-
{
|
| 47 |
-
$this->setData('price', Mage::app()->getStore()->roundPrice($price));
|
| 48 |
-
return $this;
|
| 49 |
-
}
|
| 50 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Resource/Carrier/Tablerate.php
DELETED
|
@@ -1,471 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
/**
|
| 28 |
-
* Shipping table rates
|
| 29 |
-
*
|
| 30 |
-
* @category Mage
|
| 31 |
-
* @package Mage_Shipping
|
| 32 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
| 33 |
-
*/
|
| 34 |
-
class Mage_Shipping_Model_Resource_Carrier_Tablerate extends Mage_Core_Model_Resource_Db_Abstract
|
| 35 |
-
{
|
| 36 |
-
/**
|
| 37 |
-
* Import table rates website ID
|
| 38 |
-
*
|
| 39 |
-
* @var int
|
| 40 |
-
*/
|
| 41 |
-
protected $_importWebsiteId = 0;
|
| 42 |
-
|
| 43 |
-
/**
|
| 44 |
-
* Errors in import process
|
| 45 |
-
*
|
| 46 |
-
* @var array
|
| 47 |
-
*/
|
| 48 |
-
protected $_importErrors = array();
|
| 49 |
-
|
| 50 |
-
/**
|
| 51 |
-
* Count of imported table rates
|
| 52 |
-
*
|
| 53 |
-
* @var int
|
| 54 |
-
*/
|
| 55 |
-
protected $_importedRows = 0;
|
| 56 |
-
|
| 57 |
-
/**
|
| 58 |
-
* Array of unique table rate keys to protect from duplicates
|
| 59 |
-
*
|
| 60 |
-
* @var array
|
| 61 |
-
*/
|
| 62 |
-
protected $_importUniqueHash = array();
|
| 63 |
-
|
| 64 |
-
/**
|
| 65 |
-
* Array of countries keyed by iso2 code
|
| 66 |
-
*
|
| 67 |
-
* @var array
|
| 68 |
-
*/
|
| 69 |
-
protected $_importIso2Countries;
|
| 70 |
-
|
| 71 |
-
/**
|
| 72 |
-
* Array of countries keyed by iso3 code
|
| 73 |
-
*
|
| 74 |
-
* @var array
|
| 75 |
-
*/
|
| 76 |
-
protected $_importIso3Countries;
|
| 77 |
-
|
| 78 |
-
/**
|
| 79 |
-
* Associative array of countries and regions
|
| 80 |
-
* [country_id][region_code] = region_id
|
| 81 |
-
*
|
| 82 |
-
* @var array
|
| 83 |
-
*/
|
| 84 |
-
protected $_importRegions;
|
| 85 |
-
|
| 86 |
-
/**
|
| 87 |
-
* Import Table Rate condition name
|
| 88 |
-
*
|
| 89 |
-
* @var string
|
| 90 |
-
*/
|
| 91 |
-
protected $_importConditionName;
|
| 92 |
-
|
| 93 |
-
/**
|
| 94 |
-
* Array of condition full names
|
| 95 |
-
*
|
| 96 |
-
* @var array
|
| 97 |
-
*/
|
| 98 |
-
protected $_conditionFullNames = array();
|
| 99 |
-
|
| 100 |
-
/**
|
| 101 |
-
* Define main table and id field name
|
| 102 |
-
*
|
| 103 |
-
* @return void
|
| 104 |
-
*/
|
| 105 |
-
protected function _construct()
|
| 106 |
-
{
|
| 107 |
-
$this->_init('shipping/tablerate', 'pk');
|
| 108 |
-
}
|
| 109 |
-
|
| 110 |
-
/**
|
| 111 |
-
* Return table rate array or false by rate request
|
| 112 |
-
*
|
| 113 |
-
* @param Mage_Shipping_Model_Rate_Request $request
|
| 114 |
-
* @return array|boolean
|
| 115 |
-
*/
|
| 116 |
-
public function getRate(Mage_Shipping_Model_Rate_Request $request)
|
| 117 |
-
{
|
| 118 |
-
$adapter = $this->_getReadAdapter();
|
| 119 |
-
$bind = array(
|
| 120 |
-
':website_id' => (int) $request->getWebsiteId(),
|
| 121 |
-
':country_id' => $request->getDestCountryId(),
|
| 122 |
-
':region_id' => (int) $request->getDestRegionId(),
|
| 123 |
-
':postcode' => $request->getDestPostcode()
|
| 124 |
-
);
|
| 125 |
-
$select = $adapter->select()
|
| 126 |
-
->from($this->getMainTable())
|
| 127 |
-
->where('website_id = :website_id')
|
| 128 |
-
->order(array('dest_country_id DESC', 'dest_region_id DESC', 'dest_zip DESC', 'condition_value DESC'))
|
| 129 |
-
->limit(1);
|
| 130 |
-
|
| 131 |
-
// Render destination condition
|
| 132 |
-
$orWhere = '(' . implode(') OR (', array(
|
| 133 |
-
"dest_country_id = :country_id AND dest_region_id = :region_id AND dest_zip = :postcode",
|
| 134 |
-
"dest_country_id = :country_id AND dest_region_id = :region_id AND dest_zip = ''",
|
| 135 |
-
|
| 136 |
-
// Handle asterix in dest_zip field
|
| 137 |
-
"dest_country_id = :country_id AND dest_region_id = :region_id AND dest_zip = '*'",
|
| 138 |
-
"dest_country_id = :country_id AND dest_region_id = 0 AND dest_zip = '*'",
|
| 139 |
-
"dest_country_id = '0' AND dest_region_id = :region_id AND dest_zip = '*'",
|
| 140 |
-
"dest_country_id = '0' AND dest_region_id = 0 AND dest_zip = '*'",
|
| 141 |
-
|
| 142 |
-
"dest_country_id = :country_id AND dest_region_id = 0 AND dest_zip = ''",
|
| 143 |
-
"dest_country_id = :country_id AND dest_region_id = 0 AND dest_zip = :postcode",
|
| 144 |
-
"dest_country_id = :country_id AND dest_region_id = 0 AND dest_zip = '*'",
|
| 145 |
-
)) . ')';
|
| 146 |
-
$select->where($orWhere);
|
| 147 |
-
|
| 148 |
-
// Render condition by condition name
|
| 149 |
-
if (is_array($request->getConditionName())) {
|
| 150 |
-
$orWhere = array();
|
| 151 |
-
$i = 0;
|
| 152 |
-
foreach ($request->getConditionName() as $conditionName) {
|
| 153 |
-
$bindNameKey = sprintf(':condition_name_%d', $i);
|
| 154 |
-
$bindValueKey = sprintf(':condition_value_%d', $i);
|
| 155 |
-
$orWhere[] = "(condition_name = {$bindNameKey} AND condition_value <= {$bindValueKey})";
|
| 156 |
-
$bind[$bindNameKey] = $conditionName;
|
| 157 |
-
$bind[$bindValueKey] = $request->getData($conditionName);
|
| 158 |
-
$i++;
|
| 159 |
-
}
|
| 160 |
-
|
| 161 |
-
if ($orWhere) {
|
| 162 |
-
$select->where(implode(' OR ', $orWhere));
|
| 163 |
-
}
|
| 164 |
-
} else {
|
| 165 |
-
$bind[':condition_name'] = $request->getConditionName();
|
| 166 |
-
$bind[':condition_value'] = $request->getData($request->getConditionName());
|
| 167 |
-
|
| 168 |
-
$select->where('condition_name = :condition_name');
|
| 169 |
-
$select->where('condition_value <= :condition_value');
|
| 170 |
-
}
|
| 171 |
-
|
| 172 |
-
$result = $adapter->fetchRow($select, $bind);
|
| 173 |
-
// Normalize destination zip code
|
| 174 |
-
if ($result && $result['dest_zip'] == '*') {
|
| 175 |
-
$result['dest_zip'] = '';
|
| 176 |
-
}
|
| 177 |
-
return $result;
|
| 178 |
-
}
|
| 179 |
-
|
| 180 |
-
/**
|
| 181 |
-
* Upload table rate file and import data from it
|
| 182 |
-
*
|
| 183 |
-
* @param Varien_Object $object
|
| 184 |
-
* @throws Mage_Core_Exception
|
| 185 |
-
* @return Mage_Shipping_Model_Resource_Carrier_Tablerate
|
| 186 |
-
*/
|
| 187 |
-
public function uploadAndImport(Varien_Object $object)
|
| 188 |
-
{
|
| 189 |
-
if (empty($_FILES['groups']['tmp_name']['tablerate']['fields']['import']['value'])) {
|
| 190 |
-
return $this;
|
| 191 |
-
}
|
| 192 |
-
|
| 193 |
-
$csvFile = $_FILES['groups']['tmp_name']['tablerate']['fields']['import']['value'];
|
| 194 |
-
$website = Mage::app()->getWebsite($object->getScopeId());
|
| 195 |
-
|
| 196 |
-
$this->_importWebsiteId = (int)$website->getId();
|
| 197 |
-
$this->_importUniqueHash = array();
|
| 198 |
-
$this->_importErrors = array();
|
| 199 |
-
$this->_importedRows = 0;
|
| 200 |
-
|
| 201 |
-
$io = new Varien_Io_File();
|
| 202 |
-
$info = pathinfo($csvFile);
|
| 203 |
-
$io->open(array('path' => $info['dirname']));
|
| 204 |
-
$io->streamOpen($info['basename'], 'r');
|
| 205 |
-
|
| 206 |
-
// check and skip headers
|
| 207 |
-
$headers = $io->streamReadCsv();
|
| 208 |
-
if ($headers === false || count($headers) < 5) {
|
| 209 |
-
$io->streamClose();
|
| 210 |
-
Mage::throwException(Mage::helper('shipping')->__('Invalid Table Rates File Format'));
|
| 211 |
-
}
|
| 212 |
-
|
| 213 |
-
if ($object->getData('groups/tablerate/fields/condition_name/inherit') == '1') {
|
| 214 |
-
$conditionName = (string)Mage::getConfig()->getNode('default/carriers/tablerate/condition_name');
|
| 215 |
-
} else {
|
| 216 |
-
$conditionName = $object->getData('groups/tablerate/fields/condition_name/value');
|
| 217 |
-
}
|
| 218 |
-
$this->_importConditionName = $conditionName;
|
| 219 |
-
|
| 220 |
-
$adapter = $this->_getWriteAdapter();
|
| 221 |
-
$adapter->beginTransaction();
|
| 222 |
-
|
| 223 |
-
try {
|
| 224 |
-
$rowNumber = 1;
|
| 225 |
-
$importData = array();
|
| 226 |
-
|
| 227 |
-
$this->_loadDirectoryCountries();
|
| 228 |
-
$this->_loadDirectoryRegions();
|
| 229 |
-
|
| 230 |
-
// delete old data by website and condition name
|
| 231 |
-
$condition = array(
|
| 232 |
-
'website_id = ?' => $this->_importWebsiteId,
|
| 233 |
-
'condition_name = ?' => $this->_importConditionName
|
| 234 |
-
);
|
| 235 |
-
$adapter->delete($this->getMainTable(), $condition);
|
| 236 |
-
|
| 237 |
-
while (false !== ($csvLine = $io->streamReadCsv())) {
|
| 238 |
-
$rowNumber ++;
|
| 239 |
-
|
| 240 |
-
if (empty($csvLine)) {
|
| 241 |
-
continue;
|
| 242 |
-
}
|
| 243 |
-
|
| 244 |
-
$row = $this->_getImportRow($csvLine, $rowNumber);
|
| 245 |
-
if ($row !== false) {
|
| 246 |
-
$importData[] = $row;
|
| 247 |
-
}
|
| 248 |
-
|
| 249 |
-
if (count($importData) == 5000) {
|
| 250 |
-
$this->_saveImportData($importData);
|
| 251 |
-
$importData = array();
|
| 252 |
-
}
|
| 253 |
-
}
|
| 254 |
-
$this->_saveImportData($importData);
|
| 255 |
-
$io->streamClose();
|
| 256 |
-
} catch (Mage_Core_Exception $e) {
|
| 257 |
-
$adapter->rollback();
|
| 258 |
-
$io->streamClose();
|
| 259 |
-
Mage::throwException($e->getMessage());
|
| 260 |
-
} catch (Exception $e) {
|
| 261 |
-
$adapter->rollback();
|
| 262 |
-
$io->streamClose();
|
| 263 |
-
Mage::logException($e);
|
| 264 |
-
Mage::throwException(Mage::helper('shipping')->__('An error occurred while import table rates.'));
|
| 265 |
-
}
|
| 266 |
-
|
| 267 |
-
$adapter->commit();
|
| 268 |
-
|
| 269 |
-
if ($this->_importErrors) {
|
| 270 |
-
$error = Mage::helper('shipping')->__('File has not been imported. See the following list of errors: %s', implode(" \n", $this->_importErrors));
|
| 271 |
-
Mage::throwException($error);
|
| 272 |
-
}
|
| 273 |
-
|
| 274 |
-
return $this;
|
| 275 |
-
}
|
| 276 |
-
|
| 277 |
-
/**
|
| 278 |
-
* Load directory countries
|
| 279 |
-
*
|
| 280 |
-
* @return Mage_Shipping_Model_Resource_Carrier_Tablerate
|
| 281 |
-
*/
|
| 282 |
-
protected function _loadDirectoryCountries()
|
| 283 |
-
{
|
| 284 |
-
if (!is_null($this->_importIso2Countries) && !is_null($this->_importIso3Countries)) {
|
| 285 |
-
return $this;
|
| 286 |
-
}
|
| 287 |
-
|
| 288 |
-
$this->_importIso2Countries = array();
|
| 289 |
-
$this->_importIso3Countries = array();
|
| 290 |
-
|
| 291 |
-
/** @var $collection Mage_Directory_Model_Resource_Country_Collection */
|
| 292 |
-
$collection = Mage::getResourceModel('directory/country_collection');
|
| 293 |
-
foreach ($collection->getData() as $row) {
|
| 294 |
-
$this->_importIso2Countries[$row['iso2_code']] = $row['country_id'];
|
| 295 |
-
$this->_importIso3Countries[$row['iso3_code']] = $row['country_id'];
|
| 296 |
-
}
|
| 297 |
-
|
| 298 |
-
return $this;
|
| 299 |
-
}
|
| 300 |
-
|
| 301 |
-
/**
|
| 302 |
-
* Load directory regions
|
| 303 |
-
*
|
| 304 |
-
* @return Mage_Shipping_Model_Resource_Carrier_Tablerate
|
| 305 |
-
*/
|
| 306 |
-
protected function _loadDirectoryRegions()
|
| 307 |
-
{
|
| 308 |
-
if (!is_null($this->_importRegions)) {
|
| 309 |
-
return $this;
|
| 310 |
-
}
|
| 311 |
-
|
| 312 |
-
$this->_importRegions = array();
|
| 313 |
-
|
| 314 |
-
/** @var $collection Mage_Directory_Model_Resource_Region_Collection */
|
| 315 |
-
$collection = Mage::getResourceModel('directory/region_collection');
|
| 316 |
-
foreach ($collection->getData() as $row) {
|
| 317 |
-
$this->_importRegions[$row['country_id']][$row['code']] = (int)$row['region_id'];
|
| 318 |
-
}
|
| 319 |
-
|
| 320 |
-
return $this;
|
| 321 |
-
}
|
| 322 |
-
|
| 323 |
-
/**
|
| 324 |
-
* Return import condition full name by condition name code
|
| 325 |
-
*
|
| 326 |
-
* @param string $conditionName
|
| 327 |
-
* @return string
|
| 328 |
-
*/
|
| 329 |
-
protected function _getConditionFullName($conditionName)
|
| 330 |
-
{
|
| 331 |
-
if (!isset($this->_conditionFullNames[$conditionName])) {
|
| 332 |
-
$name = Mage::getSingleton('shipping/carrier_tablerate')->getCode('condition_name_short', $conditionName);
|
| 333 |
-
$this->_conditionFullNames[$conditionName] = $name;
|
| 334 |
-
}
|
| 335 |
-
|
| 336 |
-
return $this->_conditionFullNames[$conditionName];
|
| 337 |
-
}
|
| 338 |
-
|
| 339 |
-
/**
|
| 340 |
-
* Validate row for import and return table rate array or false
|
| 341 |
-
* Error will be add to _importErrors array
|
| 342 |
-
*
|
| 343 |
-
* @param array $row
|
| 344 |
-
* @param int $rowNumber
|
| 345 |
-
* @return array|false
|
| 346 |
-
*/
|
| 347 |
-
protected function _getImportRow($row, $rowNumber = 0)
|
| 348 |
-
{
|
| 349 |
-
// validate row
|
| 350 |
-
if (count($row) < 5) {
|
| 351 |
-
$this->_importErrors[] = Mage::helper('shipping')->__('Invalid Table Rates format in the Row #%s', $rowNumber);
|
| 352 |
-
return false;
|
| 353 |
-
}
|
| 354 |
-
|
| 355 |
-
// strip whitespace from the beginning and end of each row
|
| 356 |
-
foreach ($row as $k => $v) {
|
| 357 |
-
$row[$k] = trim($v);
|
| 358 |
-
}
|
| 359 |
-
|
| 360 |
-
// validate country
|
| 361 |
-
if (isset($this->_importIso2Countries[$row[0]])) {
|
| 362 |
-
$countryId = $this->_importIso2Countries[$row[0]];
|
| 363 |
-
} elseif (isset($this->_importIso3Countries[$row[0]])) {
|
| 364 |
-
$countryId = $this->_importIso3Countries[$row[0]];
|
| 365 |
-
} elseif ($row[0] == '*' || $row[0] == '') {
|
| 366 |
-
$countryId = '0';
|
| 367 |
-
} else {
|
| 368 |
-
$this->_importErrors[] = Mage::helper('shipping')->__('Invalid Country "%s" in the Row #%s.', $row[0], $rowNumber);
|
| 369 |
-
return false;
|
| 370 |
-
}
|
| 371 |
-
|
| 372 |
-
// validate region
|
| 373 |
-
if ($countryId != '0' && isset($this->_importRegions[$countryId][$row[1]])) {
|
| 374 |
-
$regionId = $this->_importRegions[$countryId][$row[1]];
|
| 375 |
-
} elseif ($row[1] == '*' || $row[1] == '') {
|
| 376 |
-
$regionId = 0;
|
| 377 |
-
} else {
|
| 378 |
-
$this->_importErrors[] = Mage::helper('shipping')->__('Invalid Region/State "%s" in the Row #%s.', $row[1], $rowNumber);
|
| 379 |
-
return false;
|
| 380 |
-
}
|
| 381 |
-
|
| 382 |
-
// detect zip code
|
| 383 |
-
if ($row[2] == '*' || $row[2] == '') {
|
| 384 |
-
$zipCode = '*';
|
| 385 |
-
} else {
|
| 386 |
-
$zipCode = $row[2];
|
| 387 |
-
}
|
| 388 |
-
|
| 389 |
-
// validate condition value
|
| 390 |
-
$value = $this->_parseDecimalValue($row[3]);
|
| 391 |
-
if ($value === false) {
|
| 392 |
-
$this->_importErrors[] = Mage::helper('shipping')->__('Invalid %s "%s" in the Row #%s.', $this->_getConditionFullName($this->_importConditionName), $row[3], $rowNumber);
|
| 393 |
-
return false;
|
| 394 |
-
}
|
| 395 |
-
|
| 396 |
-
// validate price
|
| 397 |
-
$price = $this->_parseDecimalValue($row[4]);
|
| 398 |
-
if ($price === false) {
|
| 399 |
-
$this->_importErrors[] = Mage::helper('shipping')->__('Invalid Shipping Price "%s" in the Row #%s.', $row[4], $rowNumber);
|
| 400 |
-
return false;
|
| 401 |
-
}
|
| 402 |
-
|
| 403 |
-
// protect from duplicate
|
| 404 |
-
$hash = sprintf("%s-%d-%s-%F", $countryId, $regionId, $zipCode, $value);
|
| 405 |
-
if (isset($this->_importUniqueHash[$hash])) {
|
| 406 |
-
$this->_importErrors[] = Mage::helper('shipping')->__('Duplicate Row #%s (Country "%s", Region/State "%s", Zip "%s" and Value "%s").', $rowNumber, $row[0], $row[1], $zipCode, $value);
|
| 407 |
-
return false;
|
| 408 |
-
}
|
| 409 |
-
$this->_importUniqueHash[$hash] = true;
|
| 410 |
-
|
| 411 |
-
return array(
|
| 412 |
-
$this->_importWebsiteId, // website_id
|
| 413 |
-
$countryId, // dest_country_id
|
| 414 |
-
$regionId, // dest_region_id,
|
| 415 |
-
$zipCode, // dest_zip
|
| 416 |
-
$this->_importConditionName,// condition_name,
|
| 417 |
-
$value, // condition_value
|
| 418 |
-
$price // price
|
| 419 |
-
);
|
| 420 |
-
}
|
| 421 |
-
|
| 422 |
-
/**
|
| 423 |
-
* Save import data batch
|
| 424 |
-
*
|
| 425 |
-
* @param array $data
|
| 426 |
-
* @return Mage_Shipping_Model_Resource_Carrier_Tablerate
|
| 427 |
-
*/
|
| 428 |
-
protected function _saveImportData(array $data)
|
| 429 |
-
{
|
| 430 |
-
if (!empty($data)) {
|
| 431 |
-
$columns = array('website_id', 'dest_country_id', 'dest_region_id', 'dest_zip',
|
| 432 |
-
'condition_name', 'condition_value', 'price');
|
| 433 |
-
$this->_getWriteAdapter()->insertArray($this->getMainTable(), $columns, $data);
|
| 434 |
-
$this->_importedRows += count($data);
|
| 435 |
-
}
|
| 436 |
-
|
| 437 |
-
return $this;
|
| 438 |
-
}
|
| 439 |
-
|
| 440 |
-
/**
|
| 441 |
-
* Parse and validate positive decimal value
|
| 442 |
-
* Return false if value is not decimal or is not positive
|
| 443 |
-
*
|
| 444 |
-
* @param string $value
|
| 445 |
-
* @return bool|float
|
| 446 |
-
*/
|
| 447 |
-
protected function _parseDecimalValue($value)
|
| 448 |
-
{
|
| 449 |
-
if (!is_numeric($value)) {
|
| 450 |
-
return false;
|
| 451 |
-
}
|
| 452 |
-
$value = (float)sprintf('%.4F', $value);
|
| 453 |
-
if ($value < 0.0000) {
|
| 454 |
-
return false;
|
| 455 |
-
}
|
| 456 |
-
return $value;
|
| 457 |
-
}
|
| 458 |
-
|
| 459 |
-
/**
|
| 460 |
-
* Parse and validate positive decimal value
|
| 461 |
-
*
|
| 462 |
-
* @see self::_parseDecimalValue()
|
| 463 |
-
* @deprecated since 1.4.1.0
|
| 464 |
-
* @param string $value
|
| 465 |
-
* @return bool|float
|
| 466 |
-
*/
|
| 467 |
-
protected function _isPositiveDecimalNumber($value)
|
| 468 |
-
{
|
| 469 |
-
return $this->_parseDecimalValue($value);
|
| 470 |
-
}
|
| 471 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Resource/Carrier/Tablerate/Collection.php
DELETED
|
@@ -1,127 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
/**
|
| 28 |
-
* Shipping table rates collection
|
| 29 |
-
*
|
| 30 |
-
* @category Mage
|
| 31 |
-
* @package Mage_Shipping
|
| 32 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
| 33 |
-
*/
|
| 34 |
-
class Mage_Shipping_Model_Resource_Carrier_Tablerate_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
|
| 35 |
-
{
|
| 36 |
-
/**
|
| 37 |
-
* main table name
|
| 38 |
-
*
|
| 39 |
-
* @deprecated since 1.4.1.0
|
| 40 |
-
* @var string
|
| 41 |
-
*/
|
| 42 |
-
protected $_shipTable;
|
| 43 |
-
|
| 44 |
-
/**
|
| 45 |
-
* directory/country table name
|
| 46 |
-
*
|
| 47 |
-
* @var string
|
| 48 |
-
*/
|
| 49 |
-
protected $_countryTable;
|
| 50 |
-
|
| 51 |
-
/**
|
| 52 |
-
* directory/country_region table name
|
| 53 |
-
*
|
| 54 |
-
* @var string
|
| 55 |
-
*/
|
| 56 |
-
protected $_regionTable;
|
| 57 |
-
|
| 58 |
-
/**
|
| 59 |
-
* Define resource model and item
|
| 60 |
-
*
|
| 61 |
-
*/
|
| 62 |
-
protected function _construct()
|
| 63 |
-
{
|
| 64 |
-
$this->_init('shipping/carrier_tablerate');
|
| 65 |
-
$this->_shipTable = $this->getMainTable();
|
| 66 |
-
$this->_countryTable = $this->getTable('directory/country');
|
| 67 |
-
$this->_regionTable = $this->getTable('directory/country_region');
|
| 68 |
-
}
|
| 69 |
-
|
| 70 |
-
/**
|
| 71 |
-
* Initialize select, add country iso3 code and region name
|
| 72 |
-
*
|
| 73 |
-
* @return void
|
| 74 |
-
*/
|
| 75 |
-
public function _initSelect()
|
| 76 |
-
{
|
| 77 |
-
parent::_initSelect();
|
| 78 |
-
|
| 79 |
-
$this->_select
|
| 80 |
-
->joinLeft(
|
| 81 |
-
array('country_table' => $this->_countryTable),
|
| 82 |
-
'country_table.country_id = main_table.dest_country_id',
|
| 83 |
-
array('dest_country' => 'iso3_code'))
|
| 84 |
-
->joinLeft(
|
| 85 |
-
array('region_table' => $this->_regionTable),
|
| 86 |
-
'region_table.region_id = main_table.dest_region_id',
|
| 87 |
-
array('dest_region' => 'code'));
|
| 88 |
-
|
| 89 |
-
$this->addOrder('dest_country', self::SORT_ORDER_ASC);
|
| 90 |
-
$this->addOrder('dest_region', self::SORT_ORDER_ASC);
|
| 91 |
-
$this->addOrder('dest_zip', self::SORT_ORDER_ASC);
|
| 92 |
-
$this->addOrder('condition_value', self::SORT_ORDER_ASC);
|
| 93 |
-
}
|
| 94 |
-
|
| 95 |
-
/**
|
| 96 |
-
* Add website filter to collection
|
| 97 |
-
*
|
| 98 |
-
* @param int $websiteId
|
| 99 |
-
* @return Mage_Shipping_Model_Resource_Carrier_Tablerate_Collection
|
| 100 |
-
*/
|
| 101 |
-
public function setWebsiteFilter($websiteId)
|
| 102 |
-
{
|
| 103 |
-
return $this->addFieldToFilter('website_id', $websiteId);
|
| 104 |
-
}
|
| 105 |
-
|
| 106 |
-
/**
|
| 107 |
-
* Add condition name (code) filter to collection
|
| 108 |
-
*
|
| 109 |
-
* @param string $conditionName
|
| 110 |
-
* @return Mage_Shipping_Model_Resource_Carrier_Tablerate_Collection
|
| 111 |
-
*/
|
| 112 |
-
public function setConditionFilter($conditionName)
|
| 113 |
-
{
|
| 114 |
-
return $this->addFieldToFilter('condition_name', $conditionName);
|
| 115 |
-
}
|
| 116 |
-
|
| 117 |
-
/**
|
| 118 |
-
* Add country filter to collection
|
| 119 |
-
*
|
| 120 |
-
* @param string $countryId
|
| 121 |
-
* @return Mage_Shipping_Model_Resource_Carrier_Tablerate_Collection
|
| 122 |
-
*/
|
| 123 |
-
public function setCountryFilter($countryId)
|
| 124 |
-
{
|
| 125 |
-
return $this->addFieldToFilter('dest_country_id', $countryId);
|
| 126 |
-
}
|
| 127 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Shipment/Request.php
DELETED
|
@@ -1,89 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
/**
|
| 28 |
-
* @method Mage_Shipping_Model_Shipment_Request setOrderShipment(Mage_Sales_Model_Order_Shipment $orderShipment)
|
| 29 |
-
* @method Mage_Sales_Model_Order_Shipment getOrderShipment()
|
| 30 |
-
* @method Mage_Shipping_Model_Shipment_Request setShipperContactPersonName(string $value)
|
| 31 |
-
* @method string getShipperContactPersonName()
|
| 32 |
-
* @method Mage_Shipping_Model_Shipment_Request setShipperContactPersonFirstName(string $value)
|
| 33 |
-
* @method string getShipperContactPersonFirstName()
|
| 34 |
-
* @method Mage_Shipping_Model_Shipment_Request setShipperContactPersonLastName(string $value)
|
| 35 |
-
* @method string getShipperContactPersonLastName()
|
| 36 |
-
* @method Mage_Shipping_Model_Shipment_Request setShipperContactCompanyName(string $value)
|
| 37 |
-
* @method string getShipperContactCompanyName()
|
| 38 |
-
* @method Mage_Shipping_Model_Shipment_Request setShipperContactPhoneNumber(int $value)
|
| 39 |
-
* @method int getShipperContactPhoneNumber()
|
| 40 |
-
* @method Mage_Shipping_Model_Shipment_Request setShipperAddressStreet(string $value)
|
| 41 |
-
* @method string getShipperAddressStreet()
|
| 42 |
-
* @method Mage_Shipping_Model_Shipment_Request setShipperAddressStreet1(string $value)
|
| 43 |
-
* @method string getShipperAddressStreet1()
|
| 44 |
-
* @method Mage_Shipping_Model_Shipment_Request setShipperAddressStreet2(string $value)
|
| 45 |
-
* @method string getShipperAddressStreet2()
|
| 46 |
-
* @method Mage_Shipping_Model_Shipment_Request setShipperAddressCity(string $value)
|
| 47 |
-
* @method string getShipperAddressCity()
|
| 48 |
-
* @method Mage_Shipping_Model_Shipment_Request setShipperAddressStateOrProvinceCode(string $value)
|
| 49 |
-
* @method string getShipperAddressStateOrProvinceCode()
|
| 50 |
-
* @method Mage_Shipping_Model_Shipment_Request setShipperAddressPostalCode(int $value)
|
| 51 |
-
* @method int getShipperAddressPostalCode()
|
| 52 |
-
* @method Mage_Shipping_Model_Shipment_Request setShipperAddressCountryCode(string $value)
|
| 53 |
-
* @method string getShipperAddressCountryCode()
|
| 54 |
-
* @method Mage_Shipping_Model_Shipment_Request setRecipientContactPersonName(string $value)
|
| 55 |
-
* @method string getRecipientContactPersonName()
|
| 56 |
-
* @method Mage_Shipping_Model_Shipment_Request setRecipientContactPersonFirstName(string $value)
|
| 57 |
-
* @method string getRecipientContactPersonFirstName()
|
| 58 |
-
* @method Mage_Shipping_Model_Shipment_Request setRecipientContactPersonLastName(string $value)
|
| 59 |
-
* @method string getRecipientContactPersonLastName()
|
| 60 |
-
* @method Mage_Shipping_Model_Shipment_Request setRecipientContactCompanyName(string $value)
|
| 61 |
-
* @method string getRecipientContactCompanyName()
|
| 62 |
-
* @method Mage_Shipping_Model_Shipment_Request setRecipientContactPhoneNumber(int $value)
|
| 63 |
-
* @method int getRecipientContactPhoneNumber()
|
| 64 |
-
* @method Mage_Shipping_Model_Shipment_Request setRecipientAddressStreet(string $value)
|
| 65 |
-
* @method string getRecipientAddressStreet()
|
| 66 |
-
* @method Mage_Shipping_Model_Shipment_Request setRecipientAddressStreet1(string $value)
|
| 67 |
-
* @method string getRecipientAddressStreet1()
|
| 68 |
-
* @method Mage_Shipping_Model_Shipment_Request setRecipientAddressStreet2(string $value)
|
| 69 |
-
* @method string getRecipientAddressStreet2()
|
| 70 |
-
* @method Mage_Shipping_Model_Shipment_Request setRecipientAddressCity(string $value)
|
| 71 |
-
* @method string getRecipientAddressCity()
|
| 72 |
-
* @method Mage_Shipping_Model_Shipment_Request setRecipientAddressStateOrProvinceCode(string $value)
|
| 73 |
-
* @method string getRecipientAddressStateOrProvinceCode()
|
| 74 |
-
* @method Mage_Shipping_Model_Shipment_Request setRecipientAddressPostalCode(int $value)
|
| 75 |
-
* @method int getRecipientAddressPostalCode()
|
| 76 |
-
* @method Mage_Shipping_Model_Shipment_Request setRecipientAddressCountryCode(string $value)
|
| 77 |
-
* @method string getRecipientAddressCountryCode()
|
| 78 |
-
* @method Mage_Shipping_Model_Shipment_Request setShippingMethod(string $value)
|
| 79 |
-
* @method string getShippingMethod()
|
| 80 |
-
* @method Mage_Shipping_Model_Shipment_Request setPackageWeight(float $value)
|
| 81 |
-
* @method float getPackageWeight()
|
| 82 |
-
*
|
| 83 |
-
* @category Mage
|
| 84 |
-
* @package Mage_Shipping
|
| 85 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
| 86 |
-
*/
|
| 87 |
-
class Mage_Shipping_Model_Shipment_Request extends Varien_Object
|
| 88 |
-
{
|
| 89 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Shipment/Return.php
DELETED
|
@@ -1,89 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
/**
|
| 28 |
-
* @method Mage_Shipping_Model_Shipment_Request setOrderShipment(Mage_Sales_Model_Order_Shipment $orderShipment)
|
| 29 |
-
* @method Mage_Sales_Model_Order_Shipment getOrderShipment()
|
| 30 |
-
* @method Mage_Shipping_Model_Shipment_Request setShipperContactPersonName(string $value)
|
| 31 |
-
* @method string getShipperContactPersonName()
|
| 32 |
-
* @method Mage_Shipping_Model_Shipment_Request setShipperContactPersonFirstName(string $value)
|
| 33 |
-
* @method string getShipperContactPersonFirstName()
|
| 34 |
-
* @method Mage_Shipping_Model_Shipment_Request setShipperContactPersonLastName(string $value)
|
| 35 |
-
* @method string getShipperContactPersonLastName()
|
| 36 |
-
* @method Mage_Shipping_Model_Shipment_Request setShipperContactCompanyName(string $value)
|
| 37 |
-
* @method string getShipperContactCompanyName()
|
| 38 |
-
* @method Mage_Shipping_Model_Shipment_Request setShipperContactPhoneNumber(int $value)
|
| 39 |
-
* @method int getShipperContactPhoneNumber()
|
| 40 |
-
* @method Mage_Shipping_Model_Shipment_Request setShipperAddressStreet(string $value)
|
| 41 |
-
* @method string getShipperAddressStreet()
|
| 42 |
-
* @method Mage_Shipping_Model_Shipment_Request setShipperAddressStreet1(string $value)
|
| 43 |
-
* @method string getShipperAddressStreet1()
|
| 44 |
-
* @method Mage_Shipping_Model_Shipment_Request setShipperAddressStreet2(string $value)
|
| 45 |
-
* @method string getShipperAddressStreet2()
|
| 46 |
-
* @method Mage_Shipping_Model_Shipment_Request setShipperAddressCity(string $value)
|
| 47 |
-
* @method string getShipperAddressCity()
|
| 48 |
-
* @method Mage_Shipping_Model_Shipment_Request setShipperAddressStateOrProvinceCode(string $value)
|
| 49 |
-
* @method string getShipperAddressStateOrProvinceCode()
|
| 50 |
-
* @method Mage_Shipping_Model_Shipment_Request setShipperAddressPostalCode(int $value)
|
| 51 |
-
* @method int getShipperAddressPostalCode()
|
| 52 |
-
* @method Mage_Shipping_Model_Shipment_Request setShipperAddressCountryCode(string $value)
|
| 53 |
-
* @method string getShipperAddressCountryCode()
|
| 54 |
-
* @method Mage_Shipping_Model_Shipment_Request setRecipientContactPersonName(string $value)
|
| 55 |
-
* @method string getRecipientContactPersonName()
|
| 56 |
-
* @method Mage_Shipping_Model_Shipment_Request setRecipientContactPersonFirstName(string $value)
|
| 57 |
-
* @method string getRecipientContactPersonFirstName()
|
| 58 |
-
* @method Mage_Shipping_Model_Shipment_Request setRecipientContactPersonLastName(string $value)
|
| 59 |
-
* @method string getRecipientContactPersonLastName()
|
| 60 |
-
* @method Mage_Shipping_Model_Shipment_Request setRecipientContactCompanyName(string $value)
|
| 61 |
-
* @method string getRecipientContactCompanyName()
|
| 62 |
-
* @method Mage_Shipping_Model_Shipment_Request setRecipientContactPhoneNumber(int $value)
|
| 63 |
-
* @method int getRecipientContactPhoneNumber()
|
| 64 |
-
* @method Mage_Shipping_Model_Shipment_Request setRecipientAddressStreet(string $value)
|
| 65 |
-
* @method string getRecipientAddressStreet()
|
| 66 |
-
* @method Mage_Shipping_Model_Shipment_Request setRecipientAddressStreet1(string $value)
|
| 67 |
-
* @method string getRecipientAddressStreet1()
|
| 68 |
-
* @method Mage_Shipping_Model_Shipment_Request setRecipientAddressStreet2(string $value)
|
| 69 |
-
* @method string getRecipientAddressStreet2()
|
| 70 |
-
* @method Mage_Shipping_Model_Shipment_Request setRecipientAddressCity(string $value)
|
| 71 |
-
* @method string getRecipientAddressCity()
|
| 72 |
-
* @method Mage_Shipping_Model_Shipment_Request setRecipientAddressStateOrProvinceCode(string $value)
|
| 73 |
-
* @method string getRecipientAddressStateOrProvinceCode()
|
| 74 |
-
* @method Mage_Shipping_Model_Shipment_Request setRecipientAddressPostalCode(int $value)
|
| 75 |
-
* @method int getRecipientAddressPostalCode()
|
| 76 |
-
* @method Mage_Shipping_Model_Shipment_Request setRecipientAddressCountryCode(string $value)
|
| 77 |
-
* @method string getRecipientAddressCountryCode()
|
| 78 |
-
* @method Mage_Shipping_Model_Shipment_Request setShippingMethod(string $value)
|
| 79 |
-
* @method string getShippingMethod()
|
| 80 |
-
* @method Mage_Shipping_Model_Shipment_Request setPackageWeight(float $value)
|
| 81 |
-
* @method float getPackageWeight()
|
| 82 |
-
*
|
| 83 |
-
* @category Mage
|
| 84 |
-
* @package Mage_Shipping
|
| 85 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
| 86 |
-
*/
|
| 87 |
-
class Mage_Shipping_Model_Shipment_Return extends Varien_Object
|
| 88 |
-
{
|
| 89 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Shipping.php
DELETED
|
@@ -1,506 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
class Mage_Shipping_Model_Shipping
|
| 29 |
-
{
|
| 30 |
-
/**
|
| 31 |
-
* Store address
|
| 32 |
-
*/
|
| 33 |
-
const XML_PATH_STORE_ADDRESS1 = 'shipping/origin/street_line1';
|
| 34 |
-
const XML_PATH_STORE_ADDRESS2 = 'shipping/origin/street_line2';
|
| 35 |
-
const XML_PATH_STORE_CITY = 'shipping/origin/city';
|
| 36 |
-
const XML_PATH_STORE_REGION_ID = 'shipping/origin/region_id';
|
| 37 |
-
const XML_PATH_STORE_ZIP = 'shipping/origin/postcode';
|
| 38 |
-
const XML_PATH_STORE_COUNTRY_ID = 'shipping/origin/country_id';
|
| 39 |
-
|
| 40 |
-
/**
|
| 41 |
-
* Default shipping orig for requests
|
| 42 |
-
*
|
| 43 |
-
* @var array
|
| 44 |
-
*/
|
| 45 |
-
protected $_orig = null;
|
| 46 |
-
|
| 47 |
-
/**
|
| 48 |
-
* Cached result
|
| 49 |
-
*
|
| 50 |
-
* @var Mage_Sales_Model_Shipping_Method_Result
|
| 51 |
-
*/
|
| 52 |
-
protected $_result = null;
|
| 53 |
-
|
| 54 |
-
/**
|
| 55 |
-
* Part of carrier xml config path
|
| 56 |
-
*
|
| 57 |
-
* @var string
|
| 58 |
-
*/
|
| 59 |
-
protected $_availabilityConfigField = 'active';
|
| 60 |
-
|
| 61 |
-
/**
|
| 62 |
-
* Get shipping rate result model
|
| 63 |
-
*
|
| 64 |
-
* @return Mage_Shipping_Model_Rate_Result
|
| 65 |
-
*/
|
| 66 |
-
public function getResult()
|
| 67 |
-
{
|
| 68 |
-
if (empty($this->_result)) {
|
| 69 |
-
$this->_result = Mage::getModel('shipping/rate_result');
|
| 70 |
-
}
|
| 71 |
-
return $this->_result;
|
| 72 |
-
}
|
| 73 |
-
|
| 74 |
-
/**
|
| 75 |
-
* Set shipping orig data
|
| 76 |
-
*
|
| 77 |
-
* @param array $data
|
| 78 |
-
* @return null
|
| 79 |
-
*/
|
| 80 |
-
public function setOrigData($data)
|
| 81 |
-
{
|
| 82 |
-
$this->_orig = $data;
|
| 83 |
-
}
|
| 84 |
-
|
| 85 |
-
/**
|
| 86 |
-
* Reset cached result
|
| 87 |
-
*
|
| 88 |
-
* @return Mage_Shipping_Model_Shipping
|
| 89 |
-
*/
|
| 90 |
-
public function resetResult()
|
| 91 |
-
{
|
| 92 |
-
$this->getResult()->reset();
|
| 93 |
-
return $this;
|
| 94 |
-
}
|
| 95 |
-
|
| 96 |
-
/**
|
| 97 |
-
* Retrieve configuration model
|
| 98 |
-
*
|
| 99 |
-
* @return Mage_Shipping_Model_Config
|
| 100 |
-
*/
|
| 101 |
-
public function getConfig()
|
| 102 |
-
{
|
| 103 |
-
return Mage::getSingleton('shipping/config');
|
| 104 |
-
}
|
| 105 |
-
|
| 106 |
-
/**
|
| 107 |
-
* Retrieve all methods for supplied shipping data
|
| 108 |
-
*
|
| 109 |
-
* @todo make it ordered
|
| 110 |
-
* @param Mage_Shipping_Model_Shipping_Method_Request $data
|
| 111 |
-
* @return Mage_Shipping_Model_Shipping
|
| 112 |
-
*/
|
| 113 |
-
public function collectRates(Mage_Shipping_Model_Rate_Request $request)
|
| 114 |
-
{
|
| 115 |
-
$storeId = $request->getStoreId();
|
| 116 |
-
if (!$request->getOrig()) {
|
| 117 |
-
$request
|
| 118 |
-
->setCountryId(Mage::getStoreConfig(self::XML_PATH_STORE_COUNTRY_ID, $request->getStore()))
|
| 119 |
-
->setRegionId(Mage::getStoreConfig(self::XML_PATH_STORE_REGION_ID, $request->getStore()))
|
| 120 |
-
->setCity(Mage::getStoreConfig(self::XML_PATH_STORE_CITY, $request->getStore()))
|
| 121 |
-
->setPostcode(Mage::getStoreConfig(self::XML_PATH_STORE_ZIP, $request->getStore()));
|
| 122 |
-
}
|
| 123 |
-
|
| 124 |
-
$limitCarrier = $request->getLimitCarrier();
|
| 125 |
-
if (!$limitCarrier) {
|
| 126 |
-
$carriers = Mage::getStoreConfig('carriers', $storeId);
|
| 127 |
-
|
| 128 |
-
foreach ($carriers as $carrierCode => $carrierConfig) {
|
| 129 |
-
$this->collectCarrierRates($carrierCode, $request);
|
| 130 |
-
}
|
| 131 |
-
} else {
|
| 132 |
-
if (!is_array($limitCarrier)) {
|
| 133 |
-
$limitCarrier = array($limitCarrier);
|
| 134 |
-
}
|
| 135 |
-
foreach ($limitCarrier as $carrierCode) {
|
| 136 |
-
$carrierConfig = Mage::getStoreConfig('carriers/' . $carrierCode, $storeId);
|
| 137 |
-
if (!$carrierConfig) {
|
| 138 |
-
continue;
|
| 139 |
-
}
|
| 140 |
-
$this->collectCarrierRates($carrierCode, $request);
|
| 141 |
-
}
|
| 142 |
-
}
|
| 143 |
-
|
| 144 |
-
return $this;
|
| 145 |
-
}
|
| 146 |
-
|
| 147 |
-
/**
|
| 148 |
-
* Collect rates of given carrier
|
| 149 |
-
*
|
| 150 |
-
* @param string $carrierCode
|
| 151 |
-
* @param Mage_Shipping_Model_Rate_Request $request
|
| 152 |
-
* @return Mage_Shipping_Model_Shipping
|
| 153 |
-
*/
|
| 154 |
-
public function collectCarrierRates($carrierCode, $request)
|
| 155 |
-
{
|
| 156 |
-
/* @var $carrier Mage_Shipping_Model_Carrier_Abstract */
|
| 157 |
-
$carrier = $this->getCarrierByCode($carrierCode, $request->getStoreId());
|
| 158 |
-
if (!$carrier) {
|
| 159 |
-
return $this;
|
| 160 |
-
}
|
| 161 |
-
$carrier->setActiveFlag($this->_availabilityConfigField);
|
| 162 |
-
$result = $carrier->checkAvailableShipCountries($request);
|
| 163 |
-
if (false !== $result && !($result instanceof Mage_Shipping_Model_Rate_Result_Error)) {
|
| 164 |
-
$result = $carrier->proccessAdditionalValidation($request);
|
| 165 |
-
}
|
| 166 |
-
/*
|
| 167 |
-
* Result will be false if the admin set not to show the shipping module
|
| 168 |
-
* if the delivery country is not within specific countries
|
| 169 |
-
*/
|
| 170 |
-
if (false !== $result){
|
| 171 |
-
if (!$result instanceof Mage_Shipping_Model_Rate_Result_Error) {
|
| 172 |
-
if ($carrier->getConfigData('shipment_requesttype')) {
|
| 173 |
-
$packages = $this->composePackagesForCarrier($carrier, $request);
|
| 174 |
-
if (!empty($packages)) {
|
| 175 |
-
$sumResults = array();
|
| 176 |
-
foreach ($packages as $weight => $packageCount) {
|
| 177 |
-
//clone carrier for multi-requests
|
| 178 |
-
$carrierObj = clone $carrier;
|
| 179 |
-
$request->setPackageWeight($weight);
|
| 180 |
-
$result = $carrierObj->collectRates($request);
|
| 181 |
-
if (!$result) {
|
| 182 |
-
return $this;
|
| 183 |
-
} else {
|
| 184 |
-
$result->updateRatePrice($packageCount);
|
| 185 |
-
}
|
| 186 |
-
$sumResults[] = $result;
|
| 187 |
-
}
|
| 188 |
-
if (!empty($sumResults) && count($sumResults) > 1) {
|
| 189 |
-
$result = array();
|
| 190 |
-
foreach ($sumResults as $res) {
|
| 191 |
-
if (empty($result)) {
|
| 192 |
-
$result = $res;
|
| 193 |
-
continue;
|
| 194 |
-
}
|
| 195 |
-
foreach ($res->getAllRates() as $method) {
|
| 196 |
-
foreach ($result->getAllRates() as $resultMethod) {
|
| 197 |
-
if ($method->getMethod() == $resultMethod->getMethod()) {
|
| 198 |
-
$resultMethod->setPrice($method->getPrice() + $resultMethod->getPrice());
|
| 199 |
-
continue;
|
| 200 |
-
}
|
| 201 |
-
}
|
| 202 |
-
}
|
| 203 |
-
}
|
| 204 |
-
}
|
| 205 |
-
} else {
|
| 206 |
-
$result = $carrier->collectRates($request);
|
| 207 |
-
}
|
| 208 |
-
} else {
|
| 209 |
-
$result = $carrier->collectRates($request);
|
| 210 |
-
}
|
| 211 |
-
if (!$result) {
|
| 212 |
-
return $this;
|
| 213 |
-
}
|
| 214 |
-
}
|
| 215 |
-
if ($carrier->getConfigData('showmethod') == 0 && $result->getError()) {
|
| 216 |
-
return $this;
|
| 217 |
-
}
|
| 218 |
-
// sort rates by price
|
| 219 |
-
if (method_exists($result, 'sortRatesByPrice')) {
|
| 220 |
-
$result->sortRatesByPrice();
|
| 221 |
-
}
|
| 222 |
-
$this->getResult()->append($result);
|
| 223 |
-
}
|
| 224 |
-
return $this;
|
| 225 |
-
}
|
| 226 |
-
|
| 227 |
-
/**
|
| 228 |
-
* Compose Packages For Carrier.
|
| 229 |
-
* Devides order into items and items into parts if it's neccesary
|
| 230 |
-
*
|
| 231 |
-
* @param Mage_Shipping_Model_Carrier_Abstract $carrier
|
| 232 |
-
* @param Mage_Shipping_Model_Rate_Request $request
|
| 233 |
-
* @return array [int, float]
|
| 234 |
-
*/
|
| 235 |
-
public function composePackagesForCarrier($carrier, $request)
|
| 236 |
-
{
|
| 237 |
-
$allItems = $request->getAllItems();
|
| 238 |
-
$fullItems = array();
|
| 239 |
-
|
| 240 |
-
$maxWeight = (float) $carrier->getConfigData('max_package_weight');
|
| 241 |
-
|
| 242 |
-
foreach ($allItems as $item) {
|
| 243 |
-
if ($item->getProductType() == Mage_Catalog_Model_Product_Type::TYPE_BUNDLE
|
| 244 |
-
&& $item->getProduct()->getShipmentType()
|
| 245 |
-
) {
|
| 246 |
-
continue;
|
| 247 |
-
}
|
| 248 |
-
|
| 249 |
-
$qty = $item->getQty();
|
| 250 |
-
$changeQty = true;
|
| 251 |
-
$checkWeight = true;
|
| 252 |
-
$decimalItems = array();
|
| 253 |
-
|
| 254 |
-
if ($item->getParentItem()) {
|
| 255 |
-
if (!$item->getParentItem()->getProduct()->getShipmentType()) {
|
| 256 |
-
continue;
|
| 257 |
-
}
|
| 258 |
-
$qty = $item->getIsQtyDecimal()
|
| 259 |
-
? $item->getParentItem()->getQty()
|
| 260 |
-
: $item->getParentItem()->getQty() * $item->getQty();
|
| 261 |
-
}
|
| 262 |
-
|
| 263 |
-
$itemWeight = $item->getWeight();
|
| 264 |
-
if ($item->getIsQtyDecimal() && $item->getProductType() != Mage_Catalog_Model_Product_Type::TYPE_BUNDLE) {
|
| 265 |
-
$stockItem = $item->getProduct()->getStockItem();
|
| 266 |
-
if ($stockItem->getIsDecimalDivided()) {
|
| 267 |
-
if ($stockItem->getEnableQtyIncrements() && $stockItem->getQtyIncrements()) {
|
| 268 |
-
$itemWeight = $itemWeight * $stockItem->getQtyIncrements();
|
| 269 |
-
$qty = round(($item->getWeight() / $itemWeight) * $qty);
|
| 270 |
-
$changeQty = false;
|
| 271 |
-
} else {
|
| 272 |
-
$itemWeight = $itemWeight * $item->getQty();
|
| 273 |
-
if ($itemWeight > $maxWeight) {
|
| 274 |
-
$qtyItem = floor($itemWeight / $maxWeight);
|
| 275 |
-
$decimalItems[] = array('weight' => $maxWeight, 'qty' => $qtyItem);
|
| 276 |
-
$weightItem = Mage::helper('core')->getExactDivision($itemWeight, $maxWeight);
|
| 277 |
-
if ($weightItem) {
|
| 278 |
-
$decimalItems[] = array('weight' => $weightItem, 'qty' => 1);
|
| 279 |
-
}
|
| 280 |
-
$checkWeight = false;
|
| 281 |
-
} else {
|
| 282 |
-
$itemWeight = $itemWeight * $item->getQty();
|
| 283 |
-
}
|
| 284 |
-
}
|
| 285 |
-
} else {
|
| 286 |
-
$itemWeight = $itemWeight * $item->getQty();
|
| 287 |
-
}
|
| 288 |
-
}
|
| 289 |
-
|
| 290 |
-
if ($checkWeight && $maxWeight && $itemWeight > $maxWeight) {
|
| 291 |
-
return array();
|
| 292 |
-
}
|
| 293 |
-
|
| 294 |
-
if ($changeQty && !$item->getParentItem() && $item->getIsQtyDecimal()
|
| 295 |
-
&& $item->getProductType() != Mage_Catalog_Model_Product_Type::TYPE_BUNDLE
|
| 296 |
-
) {
|
| 297 |
-
$qty = 1;
|
| 298 |
-
}
|
| 299 |
-
|
| 300 |
-
if (!empty($decimalItems)) {
|
| 301 |
-
foreach ($decimalItems as $decimalItem) {
|
| 302 |
-
$fullItems = array_merge($fullItems,
|
| 303 |
-
array_fill(0, $decimalItem['qty'] * $qty, $decimalItem['weight'])
|
| 304 |
-
);
|
| 305 |
-
}
|
| 306 |
-
} else {
|
| 307 |
-
$fullItems = array_merge($fullItems, array_fill(0, $qty, $itemWeight));
|
| 308 |
-
}
|
| 309 |
-
}
|
| 310 |
-
sort($fullItems);
|
| 311 |
-
|
| 312 |
-
return $this->_makePieces($fullItems, $maxWeight);
|
| 313 |
-
}
|
| 314 |
-
|
| 315 |
-
/**
|
| 316 |
-
* Make pieces
|
| 317 |
-
* Compose packeges list based on given items, so that each package is as heavy as possible
|
| 318 |
-
*
|
| 319 |
-
* @param array $items
|
| 320 |
-
* @param float $maxWeight
|
| 321 |
-
* @return array
|
| 322 |
-
*/
|
| 323 |
-
protected function _makePieces($items, $maxWeight)
|
| 324 |
-
{
|
| 325 |
-
$pieces = array();
|
| 326 |
-
if (!empty($items)) {
|
| 327 |
-
$sumWeight = 0;
|
| 328 |
-
|
| 329 |
-
$reverseOrderItems = $items;
|
| 330 |
-
arsort($reverseOrderItems);
|
| 331 |
-
|
| 332 |
-
foreach ($reverseOrderItems as $key => $weight) {
|
| 333 |
-
if (!isset($items[$key])) {
|
| 334 |
-
continue;
|
| 335 |
-
}
|
| 336 |
-
unset($items[$key]);
|
| 337 |
-
$sumWeight = $weight;
|
| 338 |
-
foreach ($items as $key => $weight) {
|
| 339 |
-
if (($sumWeight + $weight) < $maxWeight) {
|
| 340 |
-
unset($items[$key]);
|
| 341 |
-
$sumWeight += $weight;
|
| 342 |
-
} elseif (($sumWeight + $weight) > $maxWeight) {
|
| 343 |
-
$pieces[] = (string)(float)$sumWeight;
|
| 344 |
-
break;
|
| 345 |
-
} else {
|
| 346 |
-
unset($items[$key]);
|
| 347 |
-
$pieces[] = (string)(float)($sumWeight + $weight);
|
| 348 |
-
$sumWeight = 0;
|
| 349 |
-
break;
|
| 350 |
-
}
|
| 351 |
-
}
|
| 352 |
-
}
|
| 353 |
-
if ($sumWeight > 0) {
|
| 354 |
-
$pieces[] = (string)(float)$sumWeight;
|
| 355 |
-
}
|
| 356 |
-
$pieces = array_count_values($pieces);
|
| 357 |
-
}
|
| 358 |
-
|
| 359 |
-
return $pieces;
|
| 360 |
-
}
|
| 361 |
-
|
| 362 |
-
/**
|
| 363 |
-
* Collect rates by address
|
| 364 |
-
*
|
| 365 |
-
* @param Varien_Object $address
|
| 366 |
-
* @param null|bool|array $limitCarrier
|
| 367 |
-
* @return Mage_Shipping_Model_Shipping
|
| 368 |
-
*/
|
| 369 |
-
public function collectRatesByAddress(Varien_Object $address, $limitCarrier = null)
|
| 370 |
-
{
|
| 371 |
-
/** @var $request Mage_Shipping_Model_Rate_Request */
|
| 372 |
-
$request = Mage::getModel('shipping/rate_request');
|
| 373 |
-
$request->setAllItems($address->getAllItems());
|
| 374 |
-
$request->setDestCountryId($address->getCountryId());
|
| 375 |
-
$request->setDestRegionId($address->getRegionId());
|
| 376 |
-
$request->setDestPostcode($address->getPostcode());
|
| 377 |
-
$request->setPackageValue($address->getBaseSubtotal());
|
| 378 |
-
$request->setPackageValueWithDiscount($address->getBaseSubtotalWithDiscount());
|
| 379 |
-
$request->setPackageWeight($address->getWeight());
|
| 380 |
-
$request->setFreeMethodWeight($address->getFreeMethodWeight());
|
| 381 |
-
$request->setPackageQty($address->getItemQty());
|
| 382 |
-
$request->setStoreId(Mage::app()->getStore()->getId());
|
| 383 |
-
$request->setWebsiteId(Mage::app()->getStore()->getWebsiteId());
|
| 384 |
-
$request->setBaseCurrency(Mage::app()->getStore()->getBaseCurrency());
|
| 385 |
-
$request->setPackageCurrency(Mage::app()->getStore()->getCurrentCurrency());
|
| 386 |
-
$request->setLimitCarrier($limitCarrier);
|
| 387 |
-
|
| 388 |
-
$request->setBaseSubtotalInclTax($address->getBaseSubtotalInclTax()
|
| 389 |
-
+ $address->getBaseExtraTaxAmount());
|
| 390 |
-
|
| 391 |
-
return $this->collectRates($request);
|
| 392 |
-
}
|
| 393 |
-
|
| 394 |
-
/**
|
| 395 |
-
* Set part of carrier xml config path
|
| 396 |
-
*
|
| 397 |
-
* @param string $code
|
| 398 |
-
* @return Mage_Shipping_Model_Shipping
|
| 399 |
-
*/
|
| 400 |
-
public function setCarrierAvailabilityConfigField($code = 'active')
|
| 401 |
-
{
|
| 402 |
-
$this->_availabilityConfigField = $code;
|
| 403 |
-
return $this;
|
| 404 |
-
}
|
| 405 |
-
|
| 406 |
-
/**
|
| 407 |
-
* Get carrier by its code
|
| 408 |
-
*
|
| 409 |
-
* @param string $carrierCode
|
| 410 |
-
* @param null|int $storeId
|
| 411 |
-
* @return bool|Mage_Core_Model_Abstract
|
| 412 |
-
*/
|
| 413 |
-
public function getCarrierByCode($carrierCode, $storeId = null)
|
| 414 |
-
{
|
| 415 |
-
if (!Mage::getStoreConfigFlag('carriers/'.$carrierCode.'/'.$this->_availabilityConfigField, $storeId)) {
|
| 416 |
-
return false;
|
| 417 |
-
}
|
| 418 |
-
$className = Mage::getStoreConfig('carriers/'.$carrierCode.'/model', $storeId);
|
| 419 |
-
if (!$className) {
|
| 420 |
-
return false;
|
| 421 |
-
}
|
| 422 |
-
$obj = Mage::getModel($className);
|
| 423 |
-
if ($storeId) {
|
| 424 |
-
$obj->setStore($storeId);
|
| 425 |
-
}
|
| 426 |
-
return $obj;
|
| 427 |
-
}
|
| 428 |
-
|
| 429 |
-
/**
|
| 430 |
-
* Prepare and do request to shipment
|
| 431 |
-
*
|
| 432 |
-
* @param Mage_Sales_Model_Order_Shipment $orderShipment
|
| 433 |
-
* @return Varien_Object
|
| 434 |
-
*/
|
| 435 |
-
public function requestToShipment(Mage_Sales_Model_Order_Shipment $orderShipment)
|
| 436 |
-
{
|
| 437 |
-
$admin = Mage::getSingleton('admin/session')->getUser();
|
| 438 |
-
$order = $orderShipment->getOrder();
|
| 439 |
-
$address = $order->getShippingAddress();
|
| 440 |
-
$shippingMethod = $order->getShippingMethod(true);
|
| 441 |
-
$shipmentStoreId = $orderShipment->getStoreId();
|
| 442 |
-
$shipmentCarrier = $order->getShippingCarrier();
|
| 443 |
-
$baseCurrencyCode = Mage::app()->getStore($shipmentStoreId)->getBaseCurrencyCode();
|
| 444 |
-
if (!$shipmentCarrier) {
|
| 445 |
-
Mage::throwException('Invalid carrier: ' . $shippingMethod->getCarrierCode());
|
| 446 |
-
}
|
| 447 |
-
$shipperRegionCode = Mage::getStoreConfig(self::XML_PATH_STORE_REGION_ID, $shipmentStoreId);
|
| 448 |
-
if (is_numeric($shipperRegionCode)) {
|
| 449 |
-
$shipperRegionCode = Mage::getModel('directory/region')->load($shipperRegionCode)->getCode();
|
| 450 |
-
}
|
| 451 |
-
|
| 452 |
-
$recipientRegionCode = Mage::getModel('directory/region')->load($address->getRegionId())->getCode();
|
| 453 |
-
|
| 454 |
-
$originStreet1 = Mage::getStoreConfig(self::XML_PATH_STORE_ADDRESS1, $shipmentStoreId);
|
| 455 |
-
$originStreet2 = Mage::getStoreConfig(self::XML_PATH_STORE_ADDRESS2, $shipmentStoreId);
|
| 456 |
-
$storeInfo = new Varien_Object(Mage::getStoreConfig('general/store_information', $shipmentStoreId));
|
| 457 |
-
|
| 458 |
-
if (!$admin->getFirstname() || !$admin->getLastname() || !$storeInfo->getName() || !$storeInfo->getPhone()
|
| 459 |
-
|| !$originStreet1 || !Mage::getStoreConfig(self::XML_PATH_STORE_CITY, $shipmentStoreId)
|
| 460 |
-
|| !$shipperRegionCode || !Mage::getStoreConfig(self::XML_PATH_STORE_ZIP, $shipmentStoreId)
|
| 461 |
-
|| !Mage::getStoreConfig(self::XML_PATH_STORE_COUNTRY_ID, $shipmentStoreId)
|
| 462 |
-
) {
|
| 463 |
-
Mage::throwException(
|
| 464 |
-
Mage::helper('sales')->__('Insufficient information to create shipping label(s). Please verify your Store Information and Shipping Settings.')
|
| 465 |
-
);
|
| 466 |
-
}
|
| 467 |
-
|
| 468 |
-
/** @var $request Mage_Shipping_Model_Shipment_Request */
|
| 469 |
-
$request = Mage::getModel('shipping/shipment_request');
|
| 470 |
-
$request->setOrderShipment($orderShipment);
|
| 471 |
-
$request->setShipperContactPersonName($admin->getName());
|
| 472 |
-
$request->setShipperContactPersonFirstName($admin->getFirstname());
|
| 473 |
-
$request->setShipperContactPersonLastName($admin->getLastname());
|
| 474 |
-
$request->setShipperContactCompanyName($storeInfo->getName());
|
| 475 |
-
$request->setShipperContactPhoneNumber($storeInfo->getPhone());
|
| 476 |
-
$request->setShipperEmail($admin->getEmail());
|
| 477 |
-
$request->setShipperAddressStreet(trim($originStreet1 . ' ' . $originStreet2));
|
| 478 |
-
$request->setShipperAddressStreet1($originStreet1);
|
| 479 |
-
$request->setShipperAddressStreet2($originStreet2);
|
| 480 |
-
$request->setShipperAddressCity(Mage::getStoreConfig(self::XML_PATH_STORE_CITY, $shipmentStoreId));
|
| 481 |
-
$request->setShipperAddressStateOrProvinceCode($shipperRegionCode);
|
| 482 |
-
$request->setShipperAddressPostalCode(Mage::getStoreConfig(self::XML_PATH_STORE_ZIP, $shipmentStoreId));
|
| 483 |
-
$request->setShipperAddressCountryCode(Mage::getStoreConfig(self::XML_PATH_STORE_COUNTRY_ID, $shipmentStoreId));
|
| 484 |
-
$request->setRecipientContactPersonName(trim($address->getFirstname() . ' ' . $address->getLastname()));
|
| 485 |
-
$request->setRecipientContactPersonFirstName($address->getFirstname());
|
| 486 |
-
$request->setRecipientContactPersonLastName($address->getLastname());
|
| 487 |
-
$request->setRecipientContactCompanyName($address->getCompany());
|
| 488 |
-
$request->setRecipientContactPhoneNumber($address->getTelephone());
|
| 489 |
-
$request->setRecipientEmail($address->getEmail());
|
| 490 |
-
$request->setRecipientAddressStreet(trim($address->getStreet1() . ' ' . $address->getStreet2()));
|
| 491 |
-
$request->setRecipientAddressStreet1($address->getStreet1());
|
| 492 |
-
$request->setRecipientAddressStreet2($address->getStreet2());
|
| 493 |
-
$request->setRecipientAddressCity($address->getCity());
|
| 494 |
-
$request->setRecipientAddressStateOrProvinceCode($address->getRegionCode());
|
| 495 |
-
$request->setRecipientAddressRegionCode($recipientRegionCode);
|
| 496 |
-
$request->setRecipientAddressPostalCode($address->getPostcode());
|
| 497 |
-
$request->setRecipientAddressCountryCode($address->getCountryId());
|
| 498 |
-
$request->setShippingMethod($shippingMethod->getMethod());
|
| 499 |
-
$request->setPackageWeight($order->getWeight());
|
| 500 |
-
$request->setPackages($orderShipment->getPackages());
|
| 501 |
-
$request->setBaseCurrencyCode($baseCurrencyCode);
|
| 502 |
-
$request->setStoreId($shipmentStoreId);
|
| 503 |
-
|
| 504 |
-
return $shipmentCarrier->requestToShipment($request);
|
| 505 |
-
}
|
| 506 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Source/HandlingAction.php
DELETED
|
@@ -1,35 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
class Mage_Shipping_Model_Source_HandlingAction
|
| 27 |
-
{
|
| 28 |
-
public function toOptionArray()
|
| 29 |
-
{
|
| 30 |
-
return array(
|
| 31 |
-
array('value' => Mage_Shipping_Model_Carrier_Abstract::HANDLING_ACTION_PERORDER, 'label' => Mage::helper('shipping')->__('Per Order')),
|
| 32 |
-
array('value' => Mage_Shipping_Model_Carrier_Abstract::HANDLING_ACTION_PERPACKAGE , 'label' => Mage::helper('shipping')->__('Per Package')),
|
| 33 |
-
);
|
| 34 |
-
}
|
| 35 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Source/HandlingType.php
DELETED
|
@@ -1,35 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
class Mage_Shipping_Model_Source_HandlingType
|
| 27 |
-
{
|
| 28 |
-
public function toOptionArray()
|
| 29 |
-
{
|
| 30 |
-
return array(
|
| 31 |
-
array('value' => Mage_Shipping_Model_Carrier_Abstract::HANDLING_TYPE_FIXED, 'label' => Mage::helper('shipping')->__('Fixed')),
|
| 32 |
-
array('value' => Mage_Shipping_Model_Carrier_Abstract::HANDLING_TYPE_PERCENT, 'label' => Mage::helper('shipping')->__('Percent')),
|
| 33 |
-
);
|
| 34 |
-
}
|
| 35 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Tracking/Result.php
DELETED
|
@@ -1,75 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
class Mage_Shipping_Model_Tracking_Result
|
| 28 |
-
{
|
| 29 |
-
|
| 30 |
-
protected $_trackings = array();
|
| 31 |
-
protected $_error = null;
|
| 32 |
-
|
| 33 |
-
/**
|
| 34 |
-
* Reset tracking
|
| 35 |
-
*/
|
| 36 |
-
public function reset()
|
| 37 |
-
{
|
| 38 |
-
$this->_trackings = array();
|
| 39 |
-
return $this;
|
| 40 |
-
}
|
| 41 |
-
|
| 42 |
-
public function setError($error)
|
| 43 |
-
{
|
| 44 |
-
$this->_error = $error;
|
| 45 |
-
}
|
| 46 |
-
|
| 47 |
-
public function getError()
|
| 48 |
-
{
|
| 49 |
-
return $this->_error;
|
| 50 |
-
}
|
| 51 |
-
/**
|
| 52 |
-
* Add a tracking to the result
|
| 53 |
-
*/
|
| 54 |
-
public function append($result)
|
| 55 |
-
{
|
| 56 |
-
if ($result instanceof Mage_Shipping_Model_Tracking_Result_Abstract) {
|
| 57 |
-
$this->_trackings[] = $result;
|
| 58 |
-
} elseif ($result instanceof Mage_Shipping_Model_Rate_Result) {
|
| 59 |
-
$trackings = $result->getAllTrackings();
|
| 60 |
-
foreach ($trackings as $track) {
|
| 61 |
-
$this->append($track);
|
| 62 |
-
}
|
| 63 |
-
}
|
| 64 |
-
return $this;
|
| 65 |
-
}
|
| 66 |
-
|
| 67 |
-
/**
|
| 68 |
-
* Return all trackings in the result
|
| 69 |
-
*/
|
| 70 |
-
public function getAllTrackings()
|
| 71 |
-
{
|
| 72 |
-
return $this->_trackings;
|
| 73 |
-
}
|
| 74 |
-
|
| 75 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Tracking/Result/Abstract.php
DELETED
|
@@ -1,31 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
class Mage_Shipping_Model_Tracking_Result_Abstract extends Varien_Object
|
| 29 |
-
{
|
| 30 |
-
|
| 31 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Tracking/Result/Error.php
DELETED
|
@@ -1,39 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
class Mage_Shipping_Model_Tracking_Result_Error extends Mage_Shipping_Model_Tracking_Result_Abstract
|
| 29 |
-
{
|
| 30 |
-
public function getAllData()
|
| 31 |
-
{
|
| 32 |
-
return $this->_data;
|
| 33 |
-
}
|
| 34 |
-
|
| 35 |
-
public function getErrorMessage()
|
| 36 |
-
{
|
| 37 |
-
return Mage::helper('shipping')->__('Tracking information is currently unavailable.');
|
| 38 |
-
}
|
| 39 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/Model/Tracking/Result/Status.php
DELETED
|
@@ -1,54 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
/**
|
| 29 |
-
* Fields:
|
| 30 |
-
* - carrier: fedex
|
| 31 |
-
* - carrierTitle: Federal Express
|
| 32 |
-
* - tracking: 749011111111
|
| 33 |
-
* - status: delivered
|
| 34 |
-
* - service: home delivery
|
| 35 |
-
* - delivery date: 2007-11-23
|
| 36 |
-
* - delivery time: 16:01:00
|
| 37 |
-
* - delivery location: Frontdoor
|
| 38 |
-
* - signedby: lindy
|
| 39 |
-
*
|
| 40 |
-
* Fields:
|
| 41 |
-
* -carrier: ups cgi
|
| 42 |
-
* -popup: 1
|
| 43 |
-
* -url: http://wwwapps.ups.com/WebTracking/processInputRequest?HTMLVersion=5.0&error_carried=true&tracknums_displayed=5&TypeOfInquiryNumber=T&loc=en_US&InquiryNumber1=$tracking
|
| 44 |
-
*
|
| 45 |
-
* Fields:
|
| 46 |
-
* -carrier: usps
|
| 47 |
-
* -tracksummary: Your item was delivered at 6:50 am on February 6 in Los Angeles CA 90064
|
| 48 |
-
*/
|
| 49 |
-
class Mage_Shipping_Model_Tracking_Result_Status extends Mage_Shipping_Model_Tracking_Result_Abstract
|
| 50 |
-
{
|
| 51 |
-
public function getAllData(){
|
| 52 |
-
return $this->_data;
|
| 53 |
-
}
|
| 54 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/controllers/ShippingController.php
DELETED
|
@@ -1,41 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
/**
|
| 28 |
-
* @deprecated after 1.3.2.3 - this controller is not used anywhere
|
| 29 |
-
*/
|
| 30 |
-
class Mage_Shipping_ShippingController extends Mage_Core_Controller_Front_Action
|
| 31 |
-
{
|
| 32 |
-
/**
|
| 33 |
-
* @deprecated after 1.3.2.3
|
| 34 |
-
*/
|
| 35 |
-
public function viewAction()
|
| 36 |
-
{
|
| 37 |
-
$params = $this->getRequest()->getPost();
|
| 38 |
-
$this->loadLayout();
|
| 39 |
-
$this->renderLayout();
|
| 40 |
-
}
|
| 41 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/controllers/TrackingController.php
DELETED
|
@@ -1,98 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
/**
|
| 28 |
-
* Sales orders controller
|
| 29 |
-
*
|
| 30 |
-
* @category Mage
|
| 31 |
-
* @package Mage_Sales
|
| 32 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
| 33 |
-
*/
|
| 34 |
-
|
| 35 |
-
class Mage_Shipping_TrackingController extends Mage_Core_Controller_Front_Action
|
| 36 |
-
{
|
| 37 |
-
/**
|
| 38 |
-
* Ajax action
|
| 39 |
-
*
|
| 40 |
-
*/
|
| 41 |
-
public function ajaxAction()
|
| 42 |
-
{
|
| 43 |
-
if ($order = $this->_initOrder()) {
|
| 44 |
-
$response = '';
|
| 45 |
-
$tracks = $order->getTracksCollection();
|
| 46 |
-
|
| 47 |
-
$className = Mage::getConfig()->getBlockClassName('core/template');
|
| 48 |
-
$block = new $className();
|
| 49 |
-
$block->setType('core/template')
|
| 50 |
-
->setIsAnonymous(true)
|
| 51 |
-
->setTemplate('sales/order/trackinginfo.phtml');
|
| 52 |
-
|
| 53 |
-
foreach ($tracks as $track){
|
| 54 |
-
$trackingInfo = $track->getNumberDetail();
|
| 55 |
-
$block->setTrackingInfo($trackingInfo);
|
| 56 |
-
$response .= $block->toHtml()."\n<br />";
|
| 57 |
-
}
|
| 58 |
-
|
| 59 |
-
$this->getResponse()->setBody($response);
|
| 60 |
-
}
|
| 61 |
-
}
|
| 62 |
-
|
| 63 |
-
/**
|
| 64 |
-
* Popup action
|
| 65 |
-
* Shows tracking info if it's present, otherwise redirects to 404
|
| 66 |
-
*/
|
| 67 |
-
public function popupAction()
|
| 68 |
-
{
|
| 69 |
-
$shippingInfoModel = Mage::getModel('shipping/info')->loadByHash($this->getRequest()->getParam('hash'));
|
| 70 |
-
Mage::register('current_shipping_info', $shippingInfoModel);
|
| 71 |
-
if (count($shippingInfoModel->getTrackingInfo()) == 0) {
|
| 72 |
-
$this->norouteAction();
|
| 73 |
-
return;
|
| 74 |
-
}
|
| 75 |
-
$this->loadLayout();
|
| 76 |
-
$this->renderLayout();
|
| 77 |
-
}
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
/**
|
| 81 |
-
* Initialize order model instance
|
| 82 |
-
*
|
| 83 |
-
* @return Mage_Sales_Model_Order || false
|
| 84 |
-
*/
|
| 85 |
-
protected function _initOrder()
|
| 86 |
-
{
|
| 87 |
-
$id = $this->getRequest()->getParam('order_id');
|
| 88 |
-
|
| 89 |
-
$order = Mage::getModel('sales/order')->load($id);
|
| 90 |
-
$customerId = Mage::getSingleton('customer/session')->getCustomerId();
|
| 91 |
-
|
| 92 |
-
if (!$order->getId() || !$customerId || $order->getCustomerId() != $customerId) {
|
| 93 |
-
return false;
|
| 94 |
-
}
|
| 95 |
-
return $order;
|
| 96 |
-
}
|
| 97 |
-
|
| 98 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/etc/adminhtml.xml
DELETED
|
@@ -1,53 +0,0 @@
|
|
| 1 |
-
<?xml version="1.0"?>
|
| 2 |
-
<!--
|
| 3 |
-
/**
|
| 4 |
-
* Magento
|
| 5 |
-
*
|
| 6 |
-
* NOTICE OF LICENSE
|
| 7 |
-
*
|
| 8 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 9 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 10 |
-
* It is also available through the world-wide-web at this URL:
|
| 11 |
-
* http://opensource.org/licenses/afl-3.0.php
|
| 12 |
-
* If you did not receive a copy of the license and are unable to
|
| 13 |
-
* obtain it through the world-wide-web, please send an email
|
| 14 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 15 |
-
*
|
| 16 |
-
* DISCLAIMER
|
| 17 |
-
*
|
| 18 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
| 19 |
-
* versions in the future. If you wish to customize Magento for your
|
| 20 |
-
* needs please refer to http://www.magentocommerce.com for more information.
|
| 21 |
-
*
|
| 22 |
-
* @category Mage
|
| 23 |
-
* @package Mage_Shipping
|
| 24 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 25 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 26 |
-
*/
|
| 27 |
-
-->
|
| 28 |
-
<config>
|
| 29 |
-
<acl>
|
| 30 |
-
<resources>
|
| 31 |
-
<admin>
|
| 32 |
-
<children>
|
| 33 |
-
<system>
|
| 34 |
-
<children>
|
| 35 |
-
<config>
|
| 36 |
-
<children>
|
| 37 |
-
<shipping translate="title" module="shipping">
|
| 38 |
-
<title>Shipping Settings Section</title>
|
| 39 |
-
<sort_order>0</sort_order>
|
| 40 |
-
</shipping>
|
| 41 |
-
<carriers translate="title" module="shipping">
|
| 42 |
-
<title>Shipping Methods Section</title>
|
| 43 |
-
<sort_order>0</sort_order>
|
| 44 |
-
</carriers>
|
| 45 |
-
</children>
|
| 46 |
-
</config>
|
| 47 |
-
</children>
|
| 48 |
-
</system>
|
| 49 |
-
</children>
|
| 50 |
-
</admin>
|
| 51 |
-
</resources>
|
| 52 |
-
</acl>
|
| 53 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/etc/config.xml
DELETED
|
@@ -1,176 +0,0 @@
|
|
| 1 |
-
<?xml version="1.0"?>
|
| 2 |
-
<!--
|
| 3 |
-
/**
|
| 4 |
-
* Magento
|
| 5 |
-
*
|
| 6 |
-
* NOTICE OF LICENSE
|
| 7 |
-
*
|
| 8 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 9 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 10 |
-
* It is also available through the world-wide-web at this URL:
|
| 11 |
-
* http://opensource.org/licenses/afl-3.0.php
|
| 12 |
-
* If you did not receive a copy of the license and are unable to
|
| 13 |
-
* obtain it through the world-wide-web, please send an email
|
| 14 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 15 |
-
*
|
| 16 |
-
* DISCLAIMER
|
| 17 |
-
*
|
| 18 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
| 19 |
-
* versions in the future. If you wish to customize Magento for your
|
| 20 |
-
* needs please refer to http://www.magentocommerce.com for more information.
|
| 21 |
-
*
|
| 22 |
-
* @category Mage
|
| 23 |
-
* @package Mage_Shipping
|
| 24 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 25 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 26 |
-
*/
|
| 27 |
-
-->
|
| 28 |
-
<config>
|
| 29 |
-
<modules>
|
| 30 |
-
<Mage_Shipping>
|
| 31 |
-
<version>1.6.0.0</version>
|
| 32 |
-
</Mage_Shipping>
|
| 33 |
-
</modules>
|
| 34 |
-
<global>
|
| 35 |
-
<models>
|
| 36 |
-
<shipping>
|
| 37 |
-
<class>Mage_Shipping_Model</class>
|
| 38 |
-
<resourceModel>shipping_resource</resourceModel>
|
| 39 |
-
</shipping>
|
| 40 |
-
<shipping_resource>
|
| 41 |
-
<class>Mage_Shipping_Model_Resource</class>
|
| 42 |
-
<deprecatedNode>shipping_mysql4</deprecatedNode>
|
| 43 |
-
<entities>
|
| 44 |
-
<tablerate>
|
| 45 |
-
<table>shipping_tablerate</table>
|
| 46 |
-
</tablerate>
|
| 47 |
-
</entities>
|
| 48 |
-
</shipping_resource>
|
| 49 |
-
</models>
|
| 50 |
-
<resources>
|
| 51 |
-
<shipping_setup>
|
| 52 |
-
<setup>
|
| 53 |
-
<module>Mage_Shipping</module>
|
| 54 |
-
</setup>
|
| 55 |
-
</shipping_setup>
|
| 56 |
-
</resources>
|
| 57 |
-
<sales>
|
| 58 |
-
<shipping>
|
| 59 |
-
<rule>
|
| 60 |
-
<conditions>
|
| 61 |
-
<dest_country>
|
| 62 |
-
<class>Mage_Sales_Model_Shipping_Rule_Condition_Dest_Country</class>
|
| 63 |
-
</dest_country>
|
| 64 |
-
<dest_region>
|
| 65 |
-
<class>Mage_Sales_Model_Shipping_Rule_Condition_Dest_Region</class>
|
| 66 |
-
</dest_region>
|
| 67 |
-
<dest_zip>
|
| 68 |
-
<class>Mage_Sales_Model_Shipping_Rule_Condition_Dest_Zip</class>
|
| 69 |
-
</dest_zip>
|
| 70 |
-
<package_weight>
|
| 71 |
-
<class>Mage_Sales_Model_Shipping_Rule_Condition_Package_Weight</class>
|
| 72 |
-
</package_weight>
|
| 73 |
-
<order_subtotal>
|
| 74 |
-
<class>Mage_Sales_Model_Shipping_Rule_Condition_Order_Subtotal</class>
|
| 75 |
-
</order_subtotal>
|
| 76 |
-
<order_totalqty>
|
| 77 |
-
<class>Mage_Sales_Model_Shipping_Rule_Condition_Order_Totalqty</class>
|
| 78 |
-
</order_totalqty>
|
| 79 |
-
</conditions>
|
| 80 |
-
<actions>
|
| 81 |
-
<carrier>
|
| 82 |
-
<class>Mage_Sales_Model_Shipping_Rule_Action_Carrier</class>
|
| 83 |
-
</carrier>
|
| 84 |
-
<method>
|
| 85 |
-
<class>Mage_Sales_Model_Shipping_Rule_Action_Method</class>
|
| 86 |
-
</method>
|
| 87 |
-
</actions>
|
| 88 |
-
</rule>
|
| 89 |
-
</shipping>
|
| 90 |
-
</sales>
|
| 91 |
-
</global>
|
| 92 |
-
<adminhtml>
|
| 93 |
-
<translate>
|
| 94 |
-
<modules>
|
| 95 |
-
<Mage_Shipping>
|
| 96 |
-
<files>
|
| 97 |
-
<default>Mage_Shipping.csv</default>
|
| 98 |
-
</files>
|
| 99 |
-
</Mage_Shipping>
|
| 100 |
-
</modules>
|
| 101 |
-
</translate>
|
| 102 |
-
</adminhtml>
|
| 103 |
-
<frontend>
|
| 104 |
-
<translate>
|
| 105 |
-
<modules>
|
| 106 |
-
<Mage_Shipping>
|
| 107 |
-
<files>
|
| 108 |
-
<default>Mage_Shipping.csv</default>
|
| 109 |
-
</files>
|
| 110 |
-
</Mage_Shipping>
|
| 111 |
-
</modules>
|
| 112 |
-
</translate>
|
| 113 |
-
<routers>
|
| 114 |
-
<shipping>
|
| 115 |
-
<use>standard</use>
|
| 116 |
-
<args>
|
| 117 |
-
<module>Mage_Shipping</module>
|
| 118 |
-
<frontName>shipping</frontName>
|
| 119 |
-
</args>
|
| 120 |
-
</shipping>
|
| 121 |
-
</routers>
|
| 122 |
-
<layout>
|
| 123 |
-
<updates>
|
| 124 |
-
<shipping>
|
| 125 |
-
<file>shipping.xml</file>
|
| 126 |
-
</shipping>
|
| 127 |
-
</updates>
|
| 128 |
-
</layout>
|
| 129 |
-
</frontend>
|
| 130 |
-
<default>
|
| 131 |
-
<shipping>
|
| 132 |
-
<option>
|
| 133 |
-
<checkout_multiple>1</checkout_multiple>
|
| 134 |
-
<checkout_multiple_maximum_qty>100</checkout_multiple_maximum_qty>
|
| 135 |
-
</option>
|
| 136 |
-
<origin>
|
| 137 |
-
<country_id>US</country_id>
|
| 138 |
-
<postcode>90034</postcode>
|
| 139 |
-
<region_id>12</region_id>
|
| 140 |
-
</origin>
|
| 141 |
-
</shipping>
|
| 142 |
-
<carriers>
|
| 143 |
-
<flatrate>
|
| 144 |
-
<active>1</active>
|
| 145 |
-
<sallowspecific>0</sallowspecific>
|
| 146 |
-
<model>shipping/carrier_flatrate</model>
|
| 147 |
-
<name>Fixed</name>
|
| 148 |
-
<price>5.00</price>
|
| 149 |
-
<title>Flat Rate</title>
|
| 150 |
-
<type>I</type>
|
| 151 |
-
<specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg>
|
| 152 |
-
<handling_type>F</handling_type>
|
| 153 |
-
</flatrate>
|
| 154 |
-
<freeshipping>
|
| 155 |
-
<active>0</active>
|
| 156 |
-
<sallowspecific>0</sallowspecific>
|
| 157 |
-
<cutoff_cost>50</cutoff_cost>
|
| 158 |
-
<model>shipping/carrier_freeshipping</model>
|
| 159 |
-
<name>Free</name>
|
| 160 |
-
<title>Free Shipping</title>
|
| 161 |
-
<specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg>
|
| 162 |
-
</freeshipping>
|
| 163 |
-
<tablerate>
|
| 164 |
-
<active>0</active>
|
| 165 |
-
<sallowspecific>0</sallowspecific>
|
| 166 |
-
<condition_name>package_weight</condition_name>
|
| 167 |
-
<include_virtual_price>1</include_virtual_price>
|
| 168 |
-
<model>shipping/carrier_tablerate</model>
|
| 169 |
-
<name>Table Rate</name>
|
| 170 |
-
<title>Best Way</title>
|
| 171 |
-
<specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg>
|
| 172 |
-
<handling_type>F</handling_type>
|
| 173 |
-
</tablerate>
|
| 174 |
-
</carriers>
|
| 175 |
-
</default>
|
| 176 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/etc/system.xml
DELETED
|
@@ -1,480 +0,0 @@
|
|
| 1 |
-
<?xml version="1.0"?>
|
| 2 |
-
<!--
|
| 3 |
-
/**
|
| 4 |
-
* Magento
|
| 5 |
-
*
|
| 6 |
-
* NOTICE OF LICENSE
|
| 7 |
-
*
|
| 8 |
-
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 9 |
-
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 10 |
-
* It is also available through the world-wide-web at this URL:
|
| 11 |
-
* http://opensource.org/licenses/afl-3.0.php
|
| 12 |
-
* If you did not receive a copy of the license and are unable to
|
| 13 |
-
* obtain it through the world-wide-web, please send an email
|
| 14 |
-
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 15 |
-
*
|
| 16 |
-
* DISCLAIMER
|
| 17 |
-
*
|
| 18 |
-
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
| 19 |
-
* versions in the future. If you wish to customize Magento for your
|
| 20 |
-
* needs please refer to http://www.magentocommerce.com for more information.
|
| 21 |
-
*
|
| 22 |
-
* @category Mage
|
| 23 |
-
* @package Mage_Shipping
|
| 24 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 25 |
-
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 26 |
-
*/
|
| 27 |
-
-->
|
| 28 |
-
<config>
|
| 29 |
-
<sections>
|
| 30 |
-
<shipping translate="label" module="shipping">
|
| 31 |
-
<label>Shipping Settings</label>
|
| 32 |
-
<tab>sales</tab>
|
| 33 |
-
<frontend_type>text</frontend_type>
|
| 34 |
-
<sort_order>310</sort_order>
|
| 35 |
-
<show_in_default>1</show_in_default>
|
| 36 |
-
<show_in_website>1</show_in_website>
|
| 37 |
-
<show_in_store>0</show_in_store>
|
| 38 |
-
<groups>
|
| 39 |
-
<option translate="label">
|
| 40 |
-
<label>Options</label>
|
| 41 |
-
<frontend_type>text</frontend_type>
|
| 42 |
-
<sort_order>2</sort_order>
|
| 43 |
-
<show_in_default>1</show_in_default>
|
| 44 |
-
<show_in_website>1</show_in_website>
|
| 45 |
-
<show_in_store>0</show_in_store>
|
| 46 |
-
<fields>
|
| 47 |
-
<checkout_multiple translate="label">
|
| 48 |
-
<label>Allow Shipping to Multiple Addresses</label>
|
| 49 |
-
<frontend_type>select</frontend_type>
|
| 50 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 51 |
-
<sort_order>1</sort_order>
|
| 52 |
-
<show_in_default>1</show_in_default>
|
| 53 |
-
<show_in_website>1</show_in_website>
|
| 54 |
-
<show_in_store>0</show_in_store>
|
| 55 |
-
</checkout_multiple>
|
| 56 |
-
<checkout_multiple_maximum_qty translate="label">
|
| 57 |
-
<label>Maximum Qty Allowed for Shipping to Multiple Addresses</label>
|
| 58 |
-
<frontend_type>text</frontend_type>
|
| 59 |
-
<validate>validate-number</validate>
|
| 60 |
-
<sort_order>2</sort_order>
|
| 61 |
-
<show_in_default>1</show_in_default>
|
| 62 |
-
<show_in_website>1</show_in_website>
|
| 63 |
-
<show_in_store>0</show_in_store>
|
| 64 |
-
</checkout_multiple_maximum_qty>
|
| 65 |
-
</fields>
|
| 66 |
-
</option>
|
| 67 |
-
<origin translate="label">
|
| 68 |
-
<label>Origin</label>
|
| 69 |
-
<frontend_type>text</frontend_type>
|
| 70 |
-
<sort_order>1</sort_order>
|
| 71 |
-
<show_in_default>1</show_in_default>
|
| 72 |
-
<show_in_website>1</show_in_website>
|
| 73 |
-
<show_in_store>0</show_in_store>
|
| 74 |
-
<fields>
|
| 75 |
-
<country_id translate="label">
|
| 76 |
-
<label>Country</label>
|
| 77 |
-
<frontend_type>select</frontend_type>
|
| 78 |
-
<frontend_class>countries</frontend_class>
|
| 79 |
-
<source_model>adminhtml/system_config_source_country</source_model>
|
| 80 |
-
<sort_order>10</sort_order>
|
| 81 |
-
<show_in_default>1</show_in_default>
|
| 82 |
-
<show_in_website>1</show_in_website>
|
| 83 |
-
<show_in_store>0</show_in_store>
|
| 84 |
-
</country_id>
|
| 85 |
-
<region_id translate="label">
|
| 86 |
-
<label>Region/State</label>
|
| 87 |
-
<frontend_type>text</frontend_type>
|
| 88 |
-
<sort_order>20</sort_order>
|
| 89 |
-
<show_in_default>1</show_in_default>
|
| 90 |
-
<show_in_website>1</show_in_website>
|
| 91 |
-
<show_in_store>0</show_in_store>
|
| 92 |
-
</region_id>
|
| 93 |
-
<postcode translate="label">
|
| 94 |
-
<label>ZIP/Postal Code</label>
|
| 95 |
-
<frontend_type>text</frontend_type>
|
| 96 |
-
<sort_order>30</sort_order>
|
| 97 |
-
<show_in_default>1</show_in_default>
|
| 98 |
-
<show_in_website>1</show_in_website>
|
| 99 |
-
<show_in_store>0</show_in_store>
|
| 100 |
-
</postcode>
|
| 101 |
-
<city translate="label">
|
| 102 |
-
<label>City</label>
|
| 103 |
-
<frontend_type>text</frontend_type>
|
| 104 |
-
<sort_order>40</sort_order>
|
| 105 |
-
<show_in_default>1</show_in_default>
|
| 106 |
-
<show_in_website>1</show_in_website>
|
| 107 |
-
<show_in_store>0</show_in_store>
|
| 108 |
-
</city>
|
| 109 |
-
<street_line1 translate="label">
|
| 110 |
-
<label>Street Address</label>
|
| 111 |
-
<frontend_type>text</frontend_type>
|
| 112 |
-
<sort_order>50</sort_order>
|
| 113 |
-
<show_in_default>1</show_in_default>
|
| 114 |
-
<show_in_website>1</show_in_website>
|
| 115 |
-
<show_in_store>0</show_in_store>
|
| 116 |
-
</street_line1>
|
| 117 |
-
<street_line2 translate="label">
|
| 118 |
-
<label>Street Address Line 2</label>
|
| 119 |
-
<frontend_type>text</frontend_type>
|
| 120 |
-
<sort_order>60</sort_order>
|
| 121 |
-
<show_in_default>1</show_in_default>
|
| 122 |
-
<show_in_website>1</show_in_website>
|
| 123 |
-
<show_in_store>0</show_in_store>
|
| 124 |
-
</street_line2>
|
| 125 |
-
</fields>
|
| 126 |
-
</origin>
|
| 127 |
-
</groups>
|
| 128 |
-
</shipping>
|
| 129 |
-
<carriers translate="label" module="shipping">
|
| 130 |
-
<label>Shipping Methods</label>
|
| 131 |
-
<tab>sales</tab>
|
| 132 |
-
<frontend_type>text</frontend_type>
|
| 133 |
-
<sort_order>320</sort_order>
|
| 134 |
-
<show_in_default>1</show_in_default>
|
| 135 |
-
<show_in_website>1</show_in_website>
|
| 136 |
-
<show_in_store>1</show_in_store>
|
| 137 |
-
<groups>
|
| 138 |
-
<flatrate translate="label">
|
| 139 |
-
<label>Flat Rate</label>
|
| 140 |
-
<frontend_type>text</frontend_type>
|
| 141 |
-
<sort_order>2</sort_order>
|
| 142 |
-
<show_in_default>1</show_in_default>
|
| 143 |
-
<show_in_website>1</show_in_website>
|
| 144 |
-
<show_in_store>1</show_in_store>
|
| 145 |
-
<fields>
|
| 146 |
-
<active translate="label">
|
| 147 |
-
<label>Enabled</label>
|
| 148 |
-
<frontend_type>select</frontend_type>
|
| 149 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 150 |
-
<sort_order>1</sort_order>
|
| 151 |
-
<show_in_default>1</show_in_default>
|
| 152 |
-
<show_in_website>1</show_in_website>
|
| 153 |
-
<show_in_store>0</show_in_store>
|
| 154 |
-
</active>
|
| 155 |
-
<name translate="label">
|
| 156 |
-
<label>Method Name</label>
|
| 157 |
-
<frontend_type>text</frontend_type>
|
| 158 |
-
<sort_order>3</sort_order>
|
| 159 |
-
<show_in_default>1</show_in_default>
|
| 160 |
-
<show_in_website>1</show_in_website>
|
| 161 |
-
<show_in_store>1</show_in_store>
|
| 162 |
-
</name>
|
| 163 |
-
<price translate="label">
|
| 164 |
-
<label>Price</label>
|
| 165 |
-
<frontend_type>text</frontend_type>
|
| 166 |
-
<validate>validate-number validate-zero-or-greater</validate>
|
| 167 |
-
<sort_order>5</sort_order>
|
| 168 |
-
<show_in_default>1</show_in_default>
|
| 169 |
-
<show_in_website>1</show_in_website>
|
| 170 |
-
<show_in_store>0</show_in_store>
|
| 171 |
-
</price>
|
| 172 |
-
<handling_type translate="label">
|
| 173 |
-
<label>Calculate Handling Fee</label>
|
| 174 |
-
<frontend_type>select</frontend_type>
|
| 175 |
-
<source_model>shipping/source_handlingType</source_model>
|
| 176 |
-
<sort_order>7</sort_order>
|
| 177 |
-
<show_in_default>1</show_in_default>
|
| 178 |
-
<show_in_website>1</show_in_website>
|
| 179 |
-
<show_in_store>0</show_in_store>
|
| 180 |
-
</handling_type>
|
| 181 |
-
<handling_fee translate="label">
|
| 182 |
-
<label>Handling Fee</label>
|
| 183 |
-
<frontend_type>text</frontend_type>
|
| 184 |
-
<validate>validate-number validate-zero-or-greater</validate>
|
| 185 |
-
<sort_order>8</sort_order>
|
| 186 |
-
<show_in_default>1</show_in_default>
|
| 187 |
-
<show_in_website>1</show_in_website>
|
| 188 |
-
<show_in_store>0</show_in_store>
|
| 189 |
-
</handling_fee>
|
| 190 |
-
<sort_order translate="label">
|
| 191 |
-
<label>Sort Order</label>
|
| 192 |
-
<frontend_type>text</frontend_type>
|
| 193 |
-
<sort_order>100</sort_order>
|
| 194 |
-
<show_in_default>1</show_in_default>
|
| 195 |
-
<show_in_website>1</show_in_website>
|
| 196 |
-
<show_in_store>0</show_in_store>
|
| 197 |
-
</sort_order>
|
| 198 |
-
<title translate="label">
|
| 199 |
-
<label>Title</label>
|
| 200 |
-
<frontend_type>text</frontend_type>
|
| 201 |
-
<sort_order>2</sort_order>
|
| 202 |
-
<show_in_default>1</show_in_default>
|
| 203 |
-
<show_in_website>1</show_in_website>
|
| 204 |
-
<show_in_store>1</show_in_store>
|
| 205 |
-
</title>
|
| 206 |
-
<type translate="label">
|
| 207 |
-
<label>Type</label>
|
| 208 |
-
<frontend_type>select</frontend_type>
|
| 209 |
-
<source_model>adminhtml/system_config_source_shipping_flatrate</source_model>
|
| 210 |
-
<sort_order>4</sort_order>
|
| 211 |
-
<show_in_default>1</show_in_default>
|
| 212 |
-
<show_in_website>1</show_in_website>
|
| 213 |
-
<show_in_store>0</show_in_store>
|
| 214 |
-
</type>
|
| 215 |
-
<sallowspecific translate="label">
|
| 216 |
-
<label>Ship to Applicable Countries</label>
|
| 217 |
-
<frontend_type>select</frontend_type>
|
| 218 |
-
<sort_order>90</sort_order>
|
| 219 |
-
<frontend_class>shipping-applicable-country</frontend_class>
|
| 220 |
-
<source_model>adminhtml/system_config_source_shipping_allspecificcountries</source_model>
|
| 221 |
-
<show_in_default>1</show_in_default>
|
| 222 |
-
<show_in_website>1</show_in_website>
|
| 223 |
-
<show_in_store>0</show_in_store>
|
| 224 |
-
</sallowspecific>
|
| 225 |
-
<specificcountry translate="label">
|
| 226 |
-
<label>Ship to Specific Countries</label>
|
| 227 |
-
<frontend_type>multiselect</frontend_type>
|
| 228 |
-
<sort_order>91</sort_order>
|
| 229 |
-
<source_model>adminhtml/system_config_source_country</source_model>
|
| 230 |
-
<show_in_default>1</show_in_default>
|
| 231 |
-
<show_in_website>1</show_in_website>
|
| 232 |
-
<show_in_store>0</show_in_store>
|
| 233 |
-
<can_be_empty>1</can_be_empty>
|
| 234 |
-
</specificcountry>
|
| 235 |
-
<showmethod translate="label">
|
| 236 |
-
<label>Show Method if Not Applicable</label>
|
| 237 |
-
<frontend_type>select</frontend_type>
|
| 238 |
-
<sort_order>92</sort_order>
|
| 239 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 240 |
-
<show_in_default>1</show_in_default>
|
| 241 |
-
<show_in_website>1</show_in_website>
|
| 242 |
-
<show_in_store>0</show_in_store>
|
| 243 |
-
</showmethod>
|
| 244 |
-
<specificerrmsg translate="label">
|
| 245 |
-
<label>Displayed Error Message</label>
|
| 246 |
-
<frontend_type>textarea</frontend_type>
|
| 247 |
-
<sort_order>80</sort_order>
|
| 248 |
-
<show_in_default>1</show_in_default>
|
| 249 |
-
<show_in_website>1</show_in_website>
|
| 250 |
-
<show_in_store>1</show_in_store>
|
| 251 |
-
</specificerrmsg>
|
| 252 |
-
</fields>
|
| 253 |
-
</flatrate>
|
| 254 |
-
<freeshipping translate="label">
|
| 255 |
-
<label>Free Shipping</label>
|
| 256 |
-
<frontend_type>text</frontend_type>
|
| 257 |
-
<sort_order>2</sort_order>
|
| 258 |
-
<show_in_default>1</show_in_default>
|
| 259 |
-
<show_in_website>1</show_in_website>
|
| 260 |
-
<show_in_store>1</show_in_store>
|
| 261 |
-
<fields>
|
| 262 |
-
<active translate="label">
|
| 263 |
-
<label>Enabled</label>
|
| 264 |
-
<frontend_type>select</frontend_type>
|
| 265 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 266 |
-
<sort_order>1</sort_order>
|
| 267 |
-
<show_in_default>1</show_in_default>
|
| 268 |
-
<show_in_website>1</show_in_website>
|
| 269 |
-
<show_in_store>0</show_in_store>
|
| 270 |
-
</active>
|
| 271 |
-
<free_shipping_subtotal translate="label">
|
| 272 |
-
<label>Minimum Order Amount</label>
|
| 273 |
-
<frontend_type>text</frontend_type>
|
| 274 |
-
<validate>validate-number validate-zero-or-greater</validate>
|
| 275 |
-
<sort_order>4</sort_order>
|
| 276 |
-
<show_in_default>1</show_in_default>
|
| 277 |
-
<show_in_website>1</show_in_website>
|
| 278 |
-
<show_in_store>0</show_in_store>
|
| 279 |
-
</free_shipping_subtotal>
|
| 280 |
-
<name translate="label">
|
| 281 |
-
<label>Method Name</label>
|
| 282 |
-
<frontend_type>text</frontend_type>
|
| 283 |
-
<sort_order>3</sort_order>
|
| 284 |
-
<show_in_default>1</show_in_default>
|
| 285 |
-
<show_in_website>1</show_in_website>
|
| 286 |
-
<show_in_store>1</show_in_store>
|
| 287 |
-
</name>
|
| 288 |
-
<sort_order translate="label">
|
| 289 |
-
<label>Sort Order</label>
|
| 290 |
-
<frontend_type>text</frontend_type>
|
| 291 |
-
<sort_order>100</sort_order>
|
| 292 |
-
<show_in_default>1</show_in_default>
|
| 293 |
-
<show_in_website>1</show_in_website>
|
| 294 |
-
<show_in_store>0</show_in_store>
|
| 295 |
-
</sort_order>
|
| 296 |
-
<title translate="label">
|
| 297 |
-
<label>Title</label>
|
| 298 |
-
<frontend_type>text</frontend_type>
|
| 299 |
-
<sort_order>2</sort_order>
|
| 300 |
-
<show_in_default>1</show_in_default>
|
| 301 |
-
<show_in_website>1</show_in_website>
|
| 302 |
-
<show_in_store>1</show_in_store>
|
| 303 |
-
</title>
|
| 304 |
-
<sallowspecific translate="label">
|
| 305 |
-
<label>Ship to Applicable Countries</label>
|
| 306 |
-
<frontend_type>select</frontend_type>
|
| 307 |
-
<sort_order>90</sort_order>
|
| 308 |
-
<frontend_class>shipping-applicable-country</frontend_class>
|
| 309 |
-
<source_model>adminhtml/system_config_source_shipping_allspecificcountries</source_model>
|
| 310 |
-
<show_in_default>1</show_in_default>
|
| 311 |
-
<show_in_website>1</show_in_website>
|
| 312 |
-
<show_in_store>0</show_in_store>
|
| 313 |
-
</sallowspecific>
|
| 314 |
-
<specificcountry translate="label">
|
| 315 |
-
<label>Ship to Specific Countries</label>
|
| 316 |
-
<frontend_type>multiselect</frontend_type>
|
| 317 |
-
<sort_order>91</sort_order>
|
| 318 |
-
<source_model>adminhtml/system_config_source_country</source_model>
|
| 319 |
-
<show_in_default>1</show_in_default>
|
| 320 |
-
<show_in_website>1</show_in_website>
|
| 321 |
-
<show_in_store>0</show_in_store>
|
| 322 |
-
<can_be_empty>1</can_be_empty>
|
| 323 |
-
</specificcountry>
|
| 324 |
-
<showmethod translate="label">
|
| 325 |
-
<label>Show Method if Not Applicable</label>
|
| 326 |
-
<frontend_type>select</frontend_type>
|
| 327 |
-
<sort_order>92</sort_order>
|
| 328 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 329 |
-
<show_in_default>1</show_in_default>
|
| 330 |
-
<show_in_website>1</show_in_website>
|
| 331 |
-
<show_in_store>0</show_in_store>
|
| 332 |
-
</showmethod>
|
| 333 |
-
<specificerrmsg translate="label">
|
| 334 |
-
<label>Displayed Error Message</label>
|
| 335 |
-
<frontend_type>textarea</frontend_type>
|
| 336 |
-
<sort_order>80</sort_order>
|
| 337 |
-
<show_in_default>1</show_in_default>
|
| 338 |
-
<show_in_website>1</show_in_website>
|
| 339 |
-
<show_in_store>1</show_in_store>
|
| 340 |
-
</specificerrmsg>
|
| 341 |
-
</fields>
|
| 342 |
-
</freeshipping>
|
| 343 |
-
<tablerate translate="label">
|
| 344 |
-
<label>Table Rates</label>
|
| 345 |
-
<frontend_type>text</frontend_type>
|
| 346 |
-
<sort_order>2</sort_order>
|
| 347 |
-
<show_in_default>1</show_in_default>
|
| 348 |
-
<show_in_website>1</show_in_website>
|
| 349 |
-
<show_in_store>1</show_in_store>
|
| 350 |
-
<fields>
|
| 351 |
-
<handling_type translate="label">
|
| 352 |
-
<label>Calculate Handling Fee</label>
|
| 353 |
-
<frontend_type>select</frontend_type>
|
| 354 |
-
<source_model>shipping/source_handlingType</source_model>
|
| 355 |
-
<sort_order>7</sort_order>
|
| 356 |
-
<show_in_default>1</show_in_default>
|
| 357 |
-
<show_in_website>1</show_in_website>
|
| 358 |
-
<show_in_store>0</show_in_store>
|
| 359 |
-
</handling_type>
|
| 360 |
-
<handling_fee translate="label">
|
| 361 |
-
<label>Handling Fee</label>
|
| 362 |
-
<frontend_type>text</frontend_type>
|
| 363 |
-
<validate>validate-number validate-zero-or-greater</validate>
|
| 364 |
-
<sort_order>8</sort_order>
|
| 365 |
-
<show_in_default>1</show_in_default>
|
| 366 |
-
<show_in_website>1</show_in_website>
|
| 367 |
-
<show_in_store>0</show_in_store>
|
| 368 |
-
</handling_fee>
|
| 369 |
-
<active translate="label">
|
| 370 |
-
<label>Enabled</label>
|
| 371 |
-
<frontend_type>select</frontend_type>
|
| 372 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 373 |
-
<sort_order>1</sort_order>
|
| 374 |
-
<show_in_default>1</show_in_default>
|
| 375 |
-
<show_in_website>1</show_in_website>
|
| 376 |
-
<show_in_store>0</show_in_store>
|
| 377 |
-
</active>
|
| 378 |
-
<condition_name translate="label">
|
| 379 |
-
<label>Condition</label>
|
| 380 |
-
<frontend_type>select</frontend_type>
|
| 381 |
-
<source_model>adminhtml/system_config_source_shipping_tablerate</source_model>
|
| 382 |
-
<sort_order>4</sort_order>
|
| 383 |
-
<show_in_default>1</show_in_default>
|
| 384 |
-
<show_in_website>1</show_in_website>
|
| 385 |
-
<show_in_store>0</show_in_store>
|
| 386 |
-
</condition_name>
|
| 387 |
-
<include_virtual_price translate="label">
|
| 388 |
-
<label>Include Virtual Products in Price Calculation</label>
|
| 389 |
-
<frontend_type>select</frontend_type>
|
| 390 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 391 |
-
<sort_order>5</sort_order>
|
| 392 |
-
<show_in_default>1</show_in_default>
|
| 393 |
-
<show_in_website>1</show_in_website>
|
| 394 |
-
<show_in_store>0</show_in_store>
|
| 395 |
-
</include_virtual_price>
|
| 396 |
-
<export translate="label">
|
| 397 |
-
<label>Export</label>
|
| 398 |
-
<frontend_type>export</frontend_type>
|
| 399 |
-
<sort_order>5</sort_order>
|
| 400 |
-
<show_in_default>0</show_in_default>
|
| 401 |
-
<show_in_website>1</show_in_website>
|
| 402 |
-
<show_in_store>0</show_in_store>
|
| 403 |
-
</export>
|
| 404 |
-
<import translate="label">
|
| 405 |
-
<label>Import</label>
|
| 406 |
-
<frontend_type>import</frontend_type>
|
| 407 |
-
<backend_model>adminhtml/system_config_backend_shipping_tablerate</backend_model>
|
| 408 |
-
<sort_order>6</sort_order>
|
| 409 |
-
<show_in_default>0</show_in_default>
|
| 410 |
-
<show_in_website>1</show_in_website>
|
| 411 |
-
<show_in_store>0</show_in_store>
|
| 412 |
-
</import>
|
| 413 |
-
<name translate="label">
|
| 414 |
-
<label>Method Name</label>
|
| 415 |
-
<frontend_type>text</frontend_type>
|
| 416 |
-
<sort_order>3</sort_order>
|
| 417 |
-
<show_in_default>1</show_in_default>
|
| 418 |
-
<show_in_website>1</show_in_website>
|
| 419 |
-
<show_in_store>1</show_in_store>
|
| 420 |
-
</name>
|
| 421 |
-
<sort_order translate="label">
|
| 422 |
-
<label>Sort Order</label>
|
| 423 |
-
<frontend_type>text</frontend_type>
|
| 424 |
-
<sort_order>100</sort_order>
|
| 425 |
-
<show_in_default>1</show_in_default>
|
| 426 |
-
<show_in_website>1</show_in_website>
|
| 427 |
-
<show_in_store>0</show_in_store>
|
| 428 |
-
</sort_order>
|
| 429 |
-
<title translate="label">
|
| 430 |
-
<label>Title</label>
|
| 431 |
-
<frontend_type>text</frontend_type>
|
| 432 |
-
<sort_order>2</sort_order>
|
| 433 |
-
<show_in_default>1</show_in_default>
|
| 434 |
-
<show_in_website>1</show_in_website>
|
| 435 |
-
<show_in_store>1</show_in_store>
|
| 436 |
-
</title>
|
| 437 |
-
<sallowspecific translate="label">
|
| 438 |
-
<label>Ship to Applicable Countries</label>
|
| 439 |
-
<frontend_type>select</frontend_type>
|
| 440 |
-
<sort_order>90</sort_order>
|
| 441 |
-
<frontend_class>shipping-applicable-country</frontend_class>
|
| 442 |
-
<source_model>adminhtml/system_config_source_shipping_allspecificcountries</source_model>
|
| 443 |
-
<show_in_default>1</show_in_default>
|
| 444 |
-
<show_in_website>1</show_in_website>
|
| 445 |
-
<show_in_store>0</show_in_store>
|
| 446 |
-
</sallowspecific>
|
| 447 |
-
<specificcountry translate="label">
|
| 448 |
-
<label>Ship to Specific Countries</label>
|
| 449 |
-
<frontend_type>multiselect</frontend_type>
|
| 450 |
-
<sort_order>91</sort_order>
|
| 451 |
-
<source_model>adminhtml/system_config_source_country</source_model>
|
| 452 |
-
<show_in_default>1</show_in_default>
|
| 453 |
-
<show_in_website>1</show_in_website>
|
| 454 |
-
<show_in_store>0</show_in_store>
|
| 455 |
-
<can_be_empty>1</can_be_empty>
|
| 456 |
-
</specificcountry>
|
| 457 |
-
<showmethod translate="label">
|
| 458 |
-
<label>Show Method if Not Applicable</label>
|
| 459 |
-
<frontend_type>select</frontend_type>
|
| 460 |
-
<sort_order>92</sort_order>
|
| 461 |
-
<frontend_class>shipping-skip-hide</frontend_class>
|
| 462 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 463 |
-
<show_in_default>1</show_in_default>
|
| 464 |
-
<show_in_website>1</show_in_website>
|
| 465 |
-
<show_in_store>0</show_in_store>
|
| 466 |
-
</showmethod>
|
| 467 |
-
<specificerrmsg translate="label">
|
| 468 |
-
<label>Displayed Error Message</label>
|
| 469 |
-
<frontend_type>textarea</frontend_type>
|
| 470 |
-
<sort_order>80</sort_order>
|
| 471 |
-
<show_in_default>1</show_in_default>
|
| 472 |
-
<show_in_website>1</show_in_website>
|
| 473 |
-
<show_in_store>1</show_in_store>
|
| 474 |
-
</specificerrmsg>
|
| 475 |
-
</fields>
|
| 476 |
-
</tablerate>
|
| 477 |
-
</groups>
|
| 478 |
-
</carriers>
|
| 479 |
-
</sections>
|
| 480 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/sql/shipping_setup/install-1.6.0.0.php
DELETED
|
@@ -1,79 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
$installer = $this;
|
| 28 |
-
/** @var $installer Mage_Core_Model_Resource_Setup */
|
| 29 |
-
|
| 30 |
-
$installer->startSetup();
|
| 31 |
-
|
| 32 |
-
/**
|
| 33 |
-
* Create table 'shipping/tablerate'
|
| 34 |
-
*/
|
| 35 |
-
$table = $installer->getConnection()
|
| 36 |
-
->newTable($installer->getTable('shipping/tablerate'))
|
| 37 |
-
->addColumn('pk', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
|
| 38 |
-
'identity' => true,
|
| 39 |
-
'unsigned' => true,
|
| 40 |
-
'nullable' => false,
|
| 41 |
-
'primary' => true,
|
| 42 |
-
), 'Primary key')
|
| 43 |
-
->addColumn('website_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
|
| 44 |
-
'nullable' => false,
|
| 45 |
-
'default' => '0',
|
| 46 |
-
), 'Website Id')
|
| 47 |
-
->addColumn('dest_country_id', Varien_Db_Ddl_Table::TYPE_TEXT, 4, array(
|
| 48 |
-
'nullable' => false,
|
| 49 |
-
'default' => '0',
|
| 50 |
-
), 'Destination coutry ISO/2 or ISO/3 code')
|
| 51 |
-
->addColumn('dest_region_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array(
|
| 52 |
-
'nullable' => false,
|
| 53 |
-
'default' => '0',
|
| 54 |
-
), 'Destination Region Id')
|
| 55 |
-
->addColumn('dest_zip', Varien_Db_Ddl_Table::TYPE_TEXT, 10, array(
|
| 56 |
-
'nullable' => false,
|
| 57 |
-
'default' => '*',
|
| 58 |
-
), 'Destination Post Code (Zip)')
|
| 59 |
-
->addColumn('condition_name', Varien_Db_Ddl_Table::TYPE_TEXT, 20, array(
|
| 60 |
-
'nullable' => false,
|
| 61 |
-
), 'Rate Condition name')
|
| 62 |
-
->addColumn('condition_value', Varien_Db_Ddl_Table::TYPE_DECIMAL, '12,4', array(
|
| 63 |
-
'nullable' => false,
|
| 64 |
-
'default' => '0.0000',
|
| 65 |
-
), 'Rate condition value')
|
| 66 |
-
->addColumn('price', Varien_Db_Ddl_Table::TYPE_DECIMAL, '12,4', array(
|
| 67 |
-
'nullable' => false,
|
| 68 |
-
'default' => '0.0000',
|
| 69 |
-
), 'Price')
|
| 70 |
-
->addColumn('cost', Varien_Db_Ddl_Table::TYPE_DECIMAL, '12,4', array(
|
| 71 |
-
'nullable' => false,
|
| 72 |
-
'default' => '0.0000',
|
| 73 |
-
), 'Cost')
|
| 74 |
-
->addIndex($installer->getIdxName('shipping/tablerate', array('website_id', 'dest_country_id', 'dest_region_id', 'dest_zip', 'condition_name', 'condition_value'), Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE),
|
| 75 |
-
array('website_id', 'dest_country_id', 'dest_region_id', 'dest_zip', 'condition_name', 'condition_value'), array('type' => Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE))
|
| 76 |
-
->setComment('Shipping Tablerate');
|
| 77 |
-
$installer->getConnection()->createTable($table);
|
| 78 |
-
|
| 79 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/sql/shipping_setup/mysql4-install-0.7.0.php
DELETED
|
@@ -1,51 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
$installer = $this;
|
| 28 |
-
/* @var $installer Mage_Core_Model_Resource_Setup */
|
| 29 |
-
|
| 30 |
-
$installer->startSetup();
|
| 31 |
-
|
| 32 |
-
$installer->run("
|
| 33 |
-
|
| 34 |
-
-- DROP TABLE IF EXISTS {$this->getTable('shipping_tablerate')};
|
| 35 |
-
CREATE TABLE {$this->getTable('shipping_tablerate')} (
|
| 36 |
-
`pk` int(10) unsigned NOT NULL auto_increment,
|
| 37 |
-
`website_id` int(11) NOT NULL default '0',
|
| 38 |
-
`dest_country_id` varchar(4) NOT NULL default '0',
|
| 39 |
-
`dest_region_id` int(10) NOT NULL default '0',
|
| 40 |
-
`dest_zip` varchar(10) NOT NULL default '',
|
| 41 |
-
`condition_name` varchar(20) NOT NULL default '',
|
| 42 |
-
`condition_value` decimal(12,4) NOT NULL default '0.0000',
|
| 43 |
-
`price` decimal(12,4) NOT NULL default '0.0000',
|
| 44 |
-
`cost` decimal(12,4) NOT NULL default '0.0000',
|
| 45 |
-
PRIMARY KEY (`pk`),
|
| 46 |
-
UNIQUE KEY `dest_country` (`website_id`,`dest_country_id`,`dest_region_id`,`dest_zip`,`condition_name`,`condition_value`)
|
| 47 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
| 48 |
-
|
| 49 |
-
");
|
| 50 |
-
|
| 51 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/Mage/Shipping/sql/shipping_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php
DELETED
|
@@ -1,132 +0,0 @@
|
|
| 1 |
-
<?php
|
| 2 |
-
/**
|
| 3 |
-
* Magento
|
| 4 |
-
*
|
| 5 |
-
* NOTICE OF LICENSE
|
| 6 |
-
*
|
| 7 |
-
* This source file is subject to the Open Software License (OSL 3.0)
|
| 8 |
-
* that is bundled with this package in the file LICENSE.txt.
|
| 9 |
-
* It is also available through the world-wide-web at this URL:
|
| 10 |
-
* http://opensource.org/licenses/osl-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 Mage
|
| 22 |
-
* @package Mage_Shipping
|
| 23 |
-
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
-
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 25 |
-
*/
|
| 26 |
-
|
| 27 |
-
/* @var $installer Mage_Core_Model_Resource_Setup */
|
| 28 |
-
$installer = $this;
|
| 29 |
-
$installer->startSetup();
|
| 30 |
-
|
| 31 |
-
/**
|
| 32 |
-
* Drop indexes
|
| 33 |
-
*/
|
| 34 |
-
$installer->getConnection()->dropIndex(
|
| 35 |
-
$installer->getTable('shipping/tablerate'),
|
| 36 |
-
'DEST_COUNTRY'
|
| 37 |
-
);
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
/**
|
| 41 |
-
* Change columns
|
| 42 |
-
*/
|
| 43 |
-
$tables = array(
|
| 44 |
-
$installer->getTable('shipping/tablerate') => array(
|
| 45 |
-
'columns' => array(
|
| 46 |
-
'pk' => array(
|
| 47 |
-
'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
|
| 48 |
-
'identity' => true,
|
| 49 |
-
'unsigned' => true,
|
| 50 |
-
'nullable' => false,
|
| 51 |
-
'primary' => true,
|
| 52 |
-
'comment' => 'Primary key'
|
| 53 |
-
),
|
| 54 |
-
'website_id' => array(
|
| 55 |
-
'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
|
| 56 |
-
'nullable' => false,
|
| 57 |
-
'default' => '0',
|
| 58 |
-
'comment' => 'Website Id'
|
| 59 |
-
),
|
| 60 |
-
'dest_country_id' => array(
|
| 61 |
-
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
| 62 |
-
'length' => 4,
|
| 63 |
-
'nullable' => false,
|
| 64 |
-
'default' => '0',
|
| 65 |
-
'comment' => 'Destination coutry ISO/2 or ISO/3 code'
|
| 66 |
-
),
|
| 67 |
-
'dest_region_id' => array(
|
| 68 |
-
'type' => Varien_Db_Ddl_Table::TYPE_INTEGER,
|
| 69 |
-
'nullable' => false,
|
| 70 |
-
'default' => '0',
|
| 71 |
-
'comment' => 'Destination Region Id'
|
| 72 |
-
),
|
| 73 |
-
'dest_zip' => array(
|
| 74 |
-
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
| 75 |
-
'length' => 10,
|
| 76 |
-
'nullable' => false,
|
| 77 |
-
'default' => '*',
|
| 78 |
-
'comment' => 'Destination Post Code (Zip)'
|
| 79 |
-
),
|
| 80 |
-
'condition_name' => array(
|
| 81 |
-
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
| 82 |
-
'length' => 20,
|
| 83 |
-
'nullable' => false,
|
| 84 |
-
'comment' => 'Rate Condition name'
|
| 85 |
-
),
|
| 86 |
-
'condition_value' => array(
|
| 87 |
-
'type' => Varien_Db_Ddl_Table::TYPE_DECIMAL,
|
| 88 |
-
'scale' => 4,
|
| 89 |
-
'precision' => 12,
|
| 90 |
-
'nullable' => false,
|
| 91 |
-
'default' => '0.0000',
|
| 92 |
-
'comment' => 'Rate condition value'
|
| 93 |
-
),
|
| 94 |
-
'price' => array(
|
| 95 |
-
'type' => Varien_Db_Ddl_Table::TYPE_DECIMAL,
|
| 96 |
-
'scale' => 4,
|
| 97 |
-
'precision' => 12,
|
| 98 |
-
'nullable' => false,
|
| 99 |
-
'default' => '0.0000',
|
| 100 |
-
'comment' => 'Price'
|
| 101 |
-
),
|
| 102 |
-
'cost' => array(
|
| 103 |
-
'type' => Varien_Db_Ddl_Table::TYPE_DECIMAL,
|
| 104 |
-
'scale' => 4,
|
| 105 |
-
'precision' => 12,
|
| 106 |
-
'nullable' => false,
|
| 107 |
-
'default' => '0.0000',
|
| 108 |
-
'comment' => 'Cost'
|
| 109 |
-
)
|
| 110 |
-
),
|
| 111 |
-
'comment' => 'Shipping Tablerate'
|
| 112 |
-
)
|
| 113 |
-
);
|
| 114 |
-
|
| 115 |
-
$installer->getConnection()->modifyTables($tables);
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
/**
|
| 119 |
-
* Add indexes
|
| 120 |
-
*/
|
| 121 |
-
$installer->getConnection()->addIndex(
|
| 122 |
-
$installer->getTable('shipping/tablerate'),
|
| 123 |
-
$installer->getIdxName(
|
| 124 |
-
'shipping/tablerate',
|
| 125 |
-
array('website_id', 'dest_country_id', 'dest_region_id', 'dest_zip', 'condition_name', 'condition_value'),
|
| 126 |
-
Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE
|
| 127 |
-
),
|
| 128 |
-
array('website_id', 'dest_country_id', 'dest_region_id', 'dest_zip', 'condition_name', 'condition_value'),
|
| 129 |
-
Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE
|
| 130 |
-
);
|
| 131 |
-
|
| 132 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>FreightCenter_Freight_Shipping</name>
|
| 4 |
-
<version>1.0.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>OSL</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -11,8 +11,8 @@
|
|
| 11 |
<notes>Stable</notes>
|
| 12 |
<authors><author><name>Freight</name><user>Freight</user><email>FreightCenter@gmail.com</email></author></authors>
|
| 13 |
<date>2014-12-09</date>
|
| 14 |
-
<time>
|
| 15 |
-
<contents><target name="magelocal"><dir name="Freightcenter"><dir name="CustomWare"><dir name="Block"><dir name="Adminhtml"><dir name="Collect"><dir name="Edit"><file name="Form.php" hash="1f5cd94d5876f73a376e461da5f19129"/></dir><file name="Edit.php" hash="821407aafded062336a8ca6c5b2b82f3"/><file name="Grid.php" hash="3901d4cef56c27a80c40e190b7ce3838"/></dir><file name="Collect.php" hash="68598d9fe865379005f7b9145907fe28"/></dir></dir><dir name="Helper"><file name="Data.php" hash="f0950fe007293dc58885895c7b6596d4"/></dir><dir name="Model"><file name="Collect.php" hash="d8bdf18cc842826056a6e19bb8af4783"/><dir name="Mysql4"><dir name="Collect"><file name="Collection.php" hash="7c6a70a92c38c7061101b662880aeee7"/></dir><file name="Collect.php" hash="aaa52bb7cd5f396ac64a484e556a478f"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="CollectController.php" hash="b485ebb0959e3f387879aafe579ac0d4"/><file name="CollectController.php@1Aug" hash="1e9d5c9d78e0ffbe1698d2ef807e620b"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="d022d665af8caffcba312be0ac62e629"/><file name="config.xml" hash="6c6a5204bbfc7fb2ed37e913c988c7cf"/></dir><dir name="sql"><dir name="freightcenter_customware_setup"><file name="mysql4-install-1.0.0.php" hash="c2a5df0325a856fa0cc2131a0fde094f"/></dir></dir></dir><dir name="Frieghtadmin"><dir name="Block"><dir name="Adminhtml"><dir name="Order"><dir name="View"><dir name="Tab"><file name="Frieghtadmin.php" hash="7292bcc896016b2b14216932a447aeb5"/></dir></dir></dir><dir name="Sales"><dir name="Order"><dir name="View"><file name="Frieghtadmin.php" hash="3d2ca460cf27264a4eb85dfd45a4d0ad"/><dir name="Tab"><file name="Frieghtadmin.php" hash="10defb482fa03ac45bfb65ec9dd915ca"/></dir></dir></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="4c23d69b7142b164f759ccca44db387c"/></dir><dir name="sql"><dir name="freightcenters_freight_setup"><file name="mysql4-install-1.0.0.php" hash="0a8582eb8068d36325779339053e457a"/></dir></dir></dir><dir name="Ship"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Cdisplay.php" hash="f41d7a1fe73c3f982449c7fb8ffd6151"/><file name="Destloctype.php" hash="ac35e3f4ca5989e58960d34ecf2ffb5d"/><file name="Positions.php" hash="fc9b75c01e6ab03e6e03d13cb3d4628a"/></dir></dir></dir><file name="Ship.php" hash="0ee698ddc3d4e09ab29d60f785264b05"/></dir><dir name="Helper"><file name="Data.php" hash="6c7b8a73ec7e06cb99392e578e464edb"/></dir><dir name="Model"><dir name="Carrier"><file name="Flatrate.php" hash="d76be5ff840af1dd15e2ad57ce4eba69"/><file name="Freightcenter.php" hash="8154c5064a7026622ffd614f851fd380"/></dir><file name="CarrierDisplay.php" hash="0da26481a773411082b897a6631d8e65"/><file name="Carriers.php" hash="6eeff436f6f22764c8beead2a8c76151"/><file name="Carriers_23rdMay.php" hash="15b7084fb9fa9c546f6a368b9b46ce2d"/><file name="Discount.php" hash="4d29371a6228b41ef4e3a3631a2c584e"/><file name="Flatrate.php__" hash="487d3ddfc60b6fa417df47588ad91725"/><file name="Loctypes.php" hash="497cffb6cd5fca57842dfc5cf37addca"/><file name="Mark.php" hash="f653d74c0fe72777f6ac3a436366f245"/><file name="Mode.php" hash="2bcd9a3b06831cd986f42d99f82d9ccf"/><file name="Sand.php" hash="68de8ef045fd1b1baff929b982ed9afc"/><file name="Types.php" hash="f838559834c2c0e4e66d337a97abf87d"/></dir><dir name="controllers"><file name="CartController.php" hash="d3fd5f35edfb1dac104ccb0012dbfb8a"/><file name="IndexController.php" hash="86ad8c2f64722f3b875feb7671b6f93b"/><dir name="System"><file name="ConfigController.php" hash="103017049b83a1094681b03ad85bc56b"/><file name="ConfigController.php@1Aug" hash="bab3110a9eafec3c16d1e29b47cf3901"/><file name="ConfigController.php@26June" hash="e336317fcd0d05a0e68cabdef921778f"/><file name="ConfigController_org23rdMay.php" hash="e38979f206d80b47b6cfdee0cde45ea0"/></dir></dir><dir name="etc"><file name="config.xml" hash="2bec8dfb6ead7e89b9d71f944f0a828c"/><file name="config.xml@new" hash="2157ee2ba41974d10c73255f332842c9"/><file name="config.xml@old" hash="8290865c69bcaae0285f8986d40a2dcc"/><file name="system.xml" hash="dcb7daafb59f19a309e18dd38b68acb8"/><file name="system.xml@18July" hash="3620f6d52fdfcbc9e7352bf005653b5d"/><file name="system.xml@1Aug" hash="ba8e6614e53efbb2712e3cd5a0de4654"/><file name="system.xml@24July" hash="c7f8f2e77f1c376ac390b5cce3fe46a4"/><file name="system.xml@30July" hash="8feb46afbf6fec8a9eadaf49e6b50b7b"/></dir></dir></dir><dir name="Freightcenters"><dir name="Freight"><dir name="controllers"><file name="CartController.php" hash="d3fd5f35edfb1dac104ccb0012dbfb8a"/><file name="IndexController.php" hash="bc80267f709d28987c5437772381f2d9"/><file name="IndexController.php@14Aug" hash="1694065a1c91d52057d0bcbf1402e66f"/><file name="IndexController.php@20June" hash="63609e2311afde441bdf5e3faabfe1f2"/><file name="IndexController_18thJune.php" hash="63609e2311afde441bdf5e3faabfe1f2"/></dir><dir name="etc"><file name="config.xml" hash="d44b60cea796763e7248af7f9cc072d5"/><file name="config.xml@23June" hash="f8f0053727821e619d0fc40a6b8c38ec"/></dir><dir name="sql"><dir name="freightcenters_freight_setup"><file name="mysql4-install-1.0.0.php" hash="9b2ff45cb11077b19d779e8ad01da298"/></dir></dir></dir></dir><dir name="Excellence"><dir name="Fee"><dir name="Block"><dir name="Sales"><dir name="Order"><file name="Total.php" hash="0bdae64ba133737cb8dcd57bb949e6ff"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="7378a57b43609117bc149afb7d32b339"/></dir><dir name="Model"><file name="Fee.php" hash="5f6297538c255c085e5367575e136ce2"/><file name="Observer.php" hash="808c88b893e7bb41051c27311d1140c8"/><dir name="Sales"><dir name="Order"><dir name="Total"><dir name="Creditmemo"><file name="Fee.php" hash="4a0fd96c8d32644a5229e4bb8121b6cd"/></dir><dir name="Invoice"><file name="Fee.php" hash="7de8f9faf794c64852eb742e0dbfcb27"/></dir></dir></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Fee.php" hash="838b4c38dd6b89ab20fa0cc8e7a7e81f"/></dir></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="62763cfc06c5529fa7b3ad128257c167"/></dir><dir name="sql"><dir name="fee_setup"><file name="mysql4-install-0.1.0.php" hash="f508931a7a4eed80560bb87889fc9b59"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="683617f1cf9d393ccd6459aa0976c6af"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="e3904443f5aa3d891ff66c1085d87ce9"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="ab135913c99bd5afd1d8d37eb192c33a"/><file name="mysql4-upgrade-0.1.3-0.1.4.php" hash="e024f48acdc691c388f409c5bc33eed3"/></dir></dir></dir></dir><dir name="Mage"><dir name="Shipping"><dir name="Block"><dir name="Tracking"><file name="Ajax.php" hash="7686ab1d93520de9ebcaff5cda30791c"/><file name="Popup.php" hash="1e9babea1817ec28faa24657fb5d2f30"/></dir></dir><file name="Exception.php" hash="882248ea959efbf84a8996902772c645"/><dir name="Helper"><file name="Data.php" hash="9953784509cb1a9e62ef4103585a5847"/></dir><dir name="Model"><dir name="Carrier"><file name="Abstract.php" hash="5be2be60a5722a298d7dd17b6546e287"/><file name="Flatrate.php" hash="0afd66e29241f790a93ac85a70f1d8d0"/><file name="Flatrate_org21stJune.php" hash="4b431236510b4c72c5d7e7a4c34d3afb"/><file name="Freeshipping.php" hash="b4b77452ce4fd8c6174db2a3653e93a2"/><file name="Interface.php" hash="5fddefab850ca206ab6476c3868ea4f2"/><file name="Pickup.php" hash="42feda041aea6740362ba0e586a8c302"/><file name="Tablerate.php" hash="b72fa439096e2764c6d39941f94628df"/></dir><file name="Config.php" hash="5a5ed8afb5173825c8aa4f011a0392b1"/><file name="Info.php" hash="f44e7d42de59aeb4a194007b88df934e"/><dir name="Mysql4"><dir name="Carrier"><dir name="Tablerate"><file name="Collection.php" hash="70b33de2b6e2e03c539377bba090e82c"/></dir><file name="Tablerate.php" hash="c3e01a959796939cc7dac5eabb09c50e"/></dir></dir><dir name="Rate"><file name="Abstract.php" hash="63f7997d6298ebf86bcd917ade4d1f05"/><file name="Request.php" hash="450b67408f83d366154fd8085efb065a"/><dir name="Result"><file name="Abstract.php" hash="cd0ac38285c399ed9b57ae3644e3dd61"/><file name="Error.php" hash="cc1eff5ec956a04ba58c075e6f17cd55"/><file name="Method.php" hash="15f368a4d9da153b19d5e44395643f4e"/></dir><file name="Result.php" hash="493c2d3668e061211725cc4c1e33ea4d"/></dir><dir name="Resource"><dir name="Carrier"><dir name="Tablerate"><file name="Collection.php" hash="61ddddf6df1f42c359873f9d89204f7a"/></dir><file name="Tablerate.php" hash="ac12086fb986977fc9ddd1837de6ec7e"/></dir></dir><dir name="Shipment"><file name="Request.php" hash="d5391620172a22ed066af8181b4aa41d"/><file name="Return.php" hash="a29c9504d833cc119cdfdf7a12eb8e0e"/></dir><file name="Shipping.php" hash="2422229e12ac153e6eeea005dbd7e4d9"/><dir name="Source"><file name="HandlingAction.php" hash="71ae2035678e31890e4e4d0f3fd3a8d2"/><file name="HandlingType.php" hash="c30d5ff2c2be67b64d718fd27d6080dd"/></dir><dir name="Tracking"><dir name="Result"><file name="Abstract.php" hash="e0e0791dddac62fdf1539ee45cbaa8be"/><file name="Error.php" hash="eb5005dd4a6568cb7d598223dde7c9a0"/><file name="Status.php" hash="405a1d9a445dfdafa225dfeb1d9a4b75"/></dir><file name="Result.php" hash="dbd9ba830967809f7af471409e2e33df"/></dir></dir><dir name="controllers"><file name="ShippingController.php" hash="949df82f1838565f8a1fb8af951397aa"/><file name="TrackingController.php" hash="b6e0d0be429af3d5b787d3aafabfb14b"/></dir><dir name="etc"><file name="adminhtml.xml" hash="db2375486ac500b756e59752ec256980"/><file name="config.xml" hash="0050f0736ab73f63b64a196a4d7c183f"/><file name="system.xml" hash="948f18c4e2f472f185becf448912ea8a"/></dir><dir name="sql"><dir name="shipping_setup"><file name="install-1.6.0.0.php" hash="28185965bfedc83ef2bf66857f64f31a"/><file name="mysql4-install-0.7.0.php" hash="a631f8b5a43af90b847cc123319b4d32"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="66f67b304d3174f075886bbb432758cd"/></dir></dir></dir></dir><dir name="Exercise"><dir name="CustomSales"><dir name="Block"><dir name="Sales"><dir name="Order"><dir name="View"><dir name="Items"><dir name="Renderer"><file name="Default.php" hash="d2ec946af2485eb6e28bc8a9105d4a34"/></dir></dir><file name="Items.php" hash="0a0e46efd5c4947709974fc2d2ec6d1d"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="ffc5a9270ed9c91c9e8891a2a810917c"/></dir></dir></dir></target><target name="mageweb"><dir name="."><file name="api_cancel.php" hash="7a7fec5a11b0e547ad754021791495aa"/><file name="api_check.php" hash="23d05af0b8adda7d2554c21ac11b6d72"/><file name="api_check_new.php" hash="88d93c0a286eab80594e4eb4f79b2ced"/><file name="BOLCheck.php" hash="a124c4a522603481c1fa393d0f288951"/><file name="loctype_api.php" hash="dbd3a9d97746075c56159d4bf6816c5c"/><file name="loctype_api_one.php" hash="3a1e4179362f7d201fb46973348ea4c6"/><file name="RemoveFreight.php" hash="df3df7b3861ee939abf22b5ed5aac81e"/></dir></target><target name="mageetc"><dir name="modules"><file name="Excellence_Fee.xml" hash="f1607b7ccb6d3dfd97e0c6a72cb04404"/><file name="Freightcenter_CustomWare.xml" hash="fffbefcb3f923b0987a8b9b4dd78c850"/><file name="Freightcenter_Ship.xml" hash="1b584f7abcee8ac8ba138e28bbcc927b"/><file name="Freightcenters_Freight.xml" hash="9abe2712cbec32f5cc4964e63bde8ce5"/><file name="Freightcenter_Frieghtadmin.xml" hash="d3cd0f9f9b1d0de731b7651ffaf7e262"/><file name="Exercise_CustomSales.xml" hash="e54a7773247684e6d35fd52e725e3f9a"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="fee.xml" hash="96955d111e2a9014d5dc3d18201ddddf"/><file name="freightcenter_frieghtadmin.xml" hash="a9f0bf1f7d2449cc33ed9724b305c1fb"/><file name="frieghtadmin.xml" hash="2f993ba231d0576728ab222743c90dd1"/><dir name="freightcenter"><file name="customware.xml" hash="f278cb4c03c833b2c8f93eefbf2d5456"/></dir><file name="exercise_customsales.xml" hash="fc2fc4f2fd0142c886d3f23a2de1a97f"/></dir><dir name="template"><dir name="fee"><dir name="sales"><dir name="order"><file name="refunded.phtml" hash="f4239d313366d75907a34b3342b35eb1"/><file name="total.phtml" hash="bbb080fb20415086d72719c1f1f613d4"/></dir></dir></dir><dir name="freightcenter"><dir name="frieghtadmin"><dir name="order"><dir name="view"><dir name="tab"><file name="frieghtadmin.phtml" hash="59b2e3ffdf1d63fcd678cb3a3285f4ab"/></dir></dir></dir></dir></dir><dir name="freightcenter_ship"><dir name="system"><dir name="config"><file name="cdisplay.phtml" hash="eee8123c7dd0d256d17b0c38bb5a2eb3"/><file name="destloctype.phtml" hash="6269924aff886a841c9cba4b42b59ea1"/><file name="positions.phtml" hash="5cc5cd8b04ad69100566145ab126a2a5"/></dir></dir></dir><dir name="exercise"><dir name="customsales"><dir name="sales"><dir name="order"><dir name="view"><file name="items.phtml" hash="911226e17a6bd828a5b11ca98c4fd5d8"/><dir name="items"><dir name="renderer"><file name="default.phtml" hash="9d8bf7e1d288ec2fe8de7ccdf8eafa0c"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="fee.xml" hash="97d67fc83755f625dfe305748fca65b1"/></dir></dir></dir><dir name="default"><dir name="default"><dir name="template"><dir name="checkout"><dir name="cart"><file name="shipping.phtml" hash="4baf50212ac6c291cd8acb495fb7b8c6"/></dir><dir name="onepage"><dir name="payment"><file name="info.phtml" hash="e3d23f5d3e0b135ca38ec7ab5b41f851"/><file name="methods.phtml" hash="b88d2e4a2f375b5fb4a3983539b2e81e"/></dir><dir name="progress"><file name="billing.phtml" hash="e0c20674a6831364b055424dac493acb"/><file name="payment.phtml" hash="2c5af1d7ea230faa3963781f85e9f610"/><file name="shipping.phtml" hash="b26f2b46e5c12cda8de4ecb37f98c355"/><file name="shipping_method.phtml" hash="59e5c45f7f5c023b97aa6b3b2042ba17"/></dir><dir name="review"><file name="button.phtml" hash="d7a54917e7d0ceec6875760a3910452f"/><file name="info.phtml" hash="d6faa974823cb6a1c4e423262e14c72c"/><file name="item.phtml" hash="012d4b6887dd25ff362156b69fc8f825"/><file name="totals.phtml" hash="0acb66397e2d390de49dbdfca15d9804"/></dir><dir name="shipping_method"><file name="additional.phtml" hash="7f8751c51089c14316694e2aa6c5357d"/><file name="available.phtml" hash="78e087c719447383fd2560bbd9b6dff7"/></dir><file name="agreements.phtml" hash="a8f762dd61914b2d9eab9fe9ada1945a"/><file name="billing.phtml" hash="493ea449ce0655dc3aaee8986c7f0ba5"/><file name="failure.phtml" hash="0b95128399f2521bf12837aceaa31836"/><file name="link.phtml" hash="323dcf7f1acb91a186595b618592be86"/><file name="login.phtml" hash="923c114caf3bcaeea2adc266faa7de23"/><file name="payment.phtml" hash="0f2094bb3da954aa9405c1af7b66ae2a"/><file name="progress.phtml" hash="3eab47ed120f6efd05f85294da825544"/><file name="review.phtml" hash="5ffdd3cc23815519462e3dcb1fc6b81a"/><file name="shipping.phtml" hash="ddec0377a5672289f6df2cce615afe12"/><file name="shipping_method.phtml" hash="51e5d90335a974a0d4c0a2af9364ceca"/></dir></dir><dir name="fee"><file name="fee.phtml" hash="d1ae3b16e9473cf366d6338e158295e6"/></dir><dir name="page"><dir name="html"><file name="head.phtml" hash="cb61183d8aa8ad92a965fe2bff4ecb0b"/></dir></dir><dir name="sales"><dir name="order"><file name="info.phtml" hash="599564a467e899a75b39f30b0188be07"/><file name="print.phtml" hash="d92d718ccebb09dd9d8b2877563d7506"/></dir></dir><dir name="tax"><dir name="checkout"><file name="discount.phtml" hash="c3232e4e0e91d1e3d58fd5ccb0286d15"/><file name="grandtotal.phtml" hash="e5335ffe8c8020e39a0fbde4b076fbfb"/><file name="shipping.phtml" hash="7213e1850d846c0261ac48a8c6c7fc7e"/><file name="subtotal.phtml" hash="538f9fc386a8979136c2f8dc90412de2"/><file name="tax.phtml" hash="b2e0cbdd1eee49d85e507f52d372e67c"/></dir><dir name="order"><file name="tax.phtml" hash="c551e5681ccc3d95d37640f91431362d"/></dir></dir></dir></dir></dir></dir></target></contents>
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.0.0</min><max>5.6.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.7</min><max>1.8.0.1</max></package></required></dependencies>
|
| 18 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>FreightCenter_Freight_Shipping</name>
|
| 4 |
+
<version>1.0.12</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license>OSL</license>
|
| 7 |
<channel>community</channel>
|
| 11 |
<notes>Stable</notes>
|
| 12 |
<authors><author><name>Freight</name><user>Freight</user><email>FreightCenter@gmail.com</email></author></authors>
|
| 13 |
<date>2014-12-09</date>
|
| 14 |
+
<time>10:56:12</time>
|
| 15 |
+
<contents><target name="magelocal"><dir name="Freightcenter"><dir name="CustomWare"><dir name="Block"><dir name="Adminhtml"><dir name="Collect"><dir name="Edit"><file name="Form.php" hash="1f5cd94d5876f73a376e461da5f19129"/></dir><file name="Edit.php" hash="821407aafded062336a8ca6c5b2b82f3"/><file name="Grid.php" hash="3901d4cef56c27a80c40e190b7ce3838"/></dir><file name="Collect.php" hash="68598d9fe865379005f7b9145907fe28"/></dir></dir><dir name="Helper"><file name="Data.php" hash="f0950fe007293dc58885895c7b6596d4"/></dir><dir name="Model"><file name="Collect.php" hash="d8bdf18cc842826056a6e19bb8af4783"/><dir name="Mysql4"><dir name="Collect"><file name="Collection.php" hash="7c6a70a92c38c7061101b662880aeee7"/></dir><file name="Collect.php" hash="aaa52bb7cd5f396ac64a484e556a478f"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="CollectController.php" hash="b485ebb0959e3f387879aafe579ac0d4"/><file name="CollectController.php@1Aug" hash="1e9d5c9d78e0ffbe1698d2ef807e620b"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="d022d665af8caffcba312be0ac62e629"/><file name="config.xml" hash="6c6a5204bbfc7fb2ed37e913c988c7cf"/></dir><dir name="sql"><dir name="freightcenter_customware_setup"><file name="mysql4-install-1.0.0.php" hash="c2a5df0325a856fa0cc2131a0fde094f"/></dir></dir></dir><dir name="Frieghtadmin"><dir name="Block"><dir name="Adminhtml"><dir name="Order"><dir name="View"><dir name="Tab"><file name="Frieghtadmin.php" hash="7292bcc896016b2b14216932a447aeb5"/></dir></dir></dir><dir name="Sales"><dir name="Order"><dir name="View"><file name="Frieghtadmin.php" hash="3d2ca460cf27264a4eb85dfd45a4d0ad"/><dir name="Tab"><file name="Frieghtadmin.php" hash="10defb482fa03ac45bfb65ec9dd915ca"/></dir></dir></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="4c23d69b7142b164f759ccca44db387c"/></dir><dir name="sql"><dir name="freightcenters_freight_setup"><file name="mysql4-install-1.0.0.php" hash="0a8582eb8068d36325779339053e457a"/></dir></dir></dir><dir name="Ship"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Cdisplay.php" hash="f41d7a1fe73c3f982449c7fb8ffd6151"/><file name="Destloctype.php" hash="ac35e3f4ca5989e58960d34ecf2ffb5d"/><file name="Positions.php" hash="fc9b75c01e6ab03e6e03d13cb3d4628a"/></dir></dir></dir><file name="Ship.php" hash="0ee698ddc3d4e09ab29d60f785264b05"/></dir><dir name="Helper"><file name="Data.php" hash="6c7b8a73ec7e06cb99392e578e464edb"/></dir><dir name="Model"><dir name="Carrier"><file name="Flatrate.php" hash="d76be5ff840af1dd15e2ad57ce4eba69"/><file name="Freightcenter.php" hash="8154c5064a7026622ffd614f851fd380"/></dir><file name="CarrierDisplay.php" hash="0da26481a773411082b897a6631d8e65"/><file name="Carriers.php" hash="6eeff436f6f22764c8beead2a8c76151"/><file name="Carriers_23rdMay.php" hash="15b7084fb9fa9c546f6a368b9b46ce2d"/><file name="Discount.php" hash="4d29371a6228b41ef4e3a3631a2c584e"/><file name="Flatrate.php__" hash="487d3ddfc60b6fa417df47588ad91725"/><file name="Loctypes.php" hash="497cffb6cd5fca57842dfc5cf37addca"/><file name="Mark.php" hash="f653d74c0fe72777f6ac3a436366f245"/><file name="Mode.php" hash="2bcd9a3b06831cd986f42d99f82d9ccf"/><file name="Sand.php" hash="68de8ef045fd1b1baff929b982ed9afc"/><file name="Types.php" hash="f838559834c2c0e4e66d337a97abf87d"/></dir><dir name="controllers"><file name="CartController.php" hash="d3fd5f35edfb1dac104ccb0012dbfb8a"/><file name="IndexController.php" hash="86ad8c2f64722f3b875feb7671b6f93b"/><dir name="System"><file name="ConfigController.php" hash="103017049b83a1094681b03ad85bc56b"/><file name="ConfigController.php@1Aug" hash="bab3110a9eafec3c16d1e29b47cf3901"/><file name="ConfigController.php@26June" hash="e336317fcd0d05a0e68cabdef921778f"/><file name="ConfigController_org23rdMay.php" hash="e38979f206d80b47b6cfdee0cde45ea0"/></dir></dir><dir name="etc"><file name="config.xml" hash="2bec8dfb6ead7e89b9d71f944f0a828c"/><file name="config.xml@new" hash="2157ee2ba41974d10c73255f332842c9"/><file name="config.xml@old" hash="8290865c69bcaae0285f8986d40a2dcc"/><file name="system.xml" hash="dcb7daafb59f19a309e18dd38b68acb8"/><file name="system.xml@18July" hash="3620f6d52fdfcbc9e7352bf005653b5d"/><file name="system.xml@1Aug" hash="ba8e6614e53efbb2712e3cd5a0de4654"/><file name="system.xml@24July" hash="c7f8f2e77f1c376ac390b5cce3fe46a4"/><file name="system.xml@30July" hash="8feb46afbf6fec8a9eadaf49e6b50b7b"/></dir></dir></dir><dir name="Freightcenters"><dir name="Freight"><dir name="controllers"><file name="CartController.php" hash="d3fd5f35edfb1dac104ccb0012dbfb8a"/><file name="IndexController.php" hash="bc80267f709d28987c5437772381f2d9"/><file name="IndexController.php@14Aug" hash="1694065a1c91d52057d0bcbf1402e66f"/><file name="IndexController.php@20June" hash="63609e2311afde441bdf5e3faabfe1f2"/><file name="IndexController_18thJune.php" hash="63609e2311afde441bdf5e3faabfe1f2"/></dir><dir name="etc"><file name="config.xml" hash="d44b60cea796763e7248af7f9cc072d5"/><file name="config.xml@23June" hash="f8f0053727821e619d0fc40a6b8c38ec"/></dir><dir name="sql"><dir name="freightcenters_freight_setup"><file name="mysql4-install-1.0.0.php" hash="9b2ff45cb11077b19d779e8ad01da298"/></dir></dir></dir></dir><dir name="Excellence"><dir name="Fee"><dir name="Block"><dir name="Sales"><dir name="Order"><file name="Total.php" hash="0bdae64ba133737cb8dcd57bb949e6ff"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="7378a57b43609117bc149afb7d32b339"/></dir><dir name="Model"><dir name="Carrier"><file name="Flatrate.php" hash="d26b38ffc2439420a9bc9b18a1fe397e"/></dir><file name="Fee.php" hash="5f6297538c255c085e5367575e136ce2"/><file name="Observer.php" hash="808c88b893e7bb41051c27311d1140c8"/><dir name="Sales"><dir name="Order"><dir name="Total"><dir name="Creditmemo"><file name="Fee.php" hash="4a0fd96c8d32644a5229e4bb8121b6cd"/></dir><dir name="Invoice"><file name="Fee.php" hash="7de8f9faf794c64852eb742e0dbfcb27"/></dir></dir></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Fee.php" hash="838b4c38dd6b89ab20fa0cc8e7a7e81f"/></dir></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="d7edceefdea50c8600236103c64e26a7"/></dir><dir name="sql"><dir name="fee_setup"><file name="mysql4-install-0.1.0.php" hash="f508931a7a4eed80560bb87889fc9b59"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="683617f1cf9d393ccd6459aa0976c6af"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="e3904443f5aa3d891ff66c1085d87ce9"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="ab135913c99bd5afd1d8d37eb192c33a"/><file name="mysql4-upgrade-0.1.3-0.1.4.php" hash="e024f48acdc691c388f409c5bc33eed3"/></dir></dir></dir></dir><dir name="Exercise"><dir name="CustomSales"><dir name="Block"><dir name="Sales"><dir name="Order"><dir name="View"><dir name="Items"><dir name="Renderer"><file name="Default.php" hash="d2ec946af2485eb6e28bc8a9105d4a34"/></dir></dir><file name="Items.php" hash="0a0e46efd5c4947709974fc2d2ec6d1d"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="ffc5a9270ed9c91c9e8891a2a810917c"/></dir></dir></dir></target><target name="mageweb"><dir name="."><file name="api_cancel.php" hash="7a7fec5a11b0e547ad754021791495aa"/><file name="api_check.php" hash="23d05af0b8adda7d2554c21ac11b6d72"/><file name="api_check_new.php" hash="88d93c0a286eab80594e4eb4f79b2ced"/><file name="BOLCheck.php" hash="a124c4a522603481c1fa393d0f288951"/><file name="loctype_api.php" hash="dbd3a9d97746075c56159d4bf6816c5c"/><file name="loctype_api_one.php" hash="3a1e4179362f7d201fb46973348ea4c6"/><file name="RemoveFreight.php" hash="df3df7b3861ee939abf22b5ed5aac81e"/></dir></target><target name="mageetc"><dir name="modules"><file name="Excellence_Fee.xml" hash="f1607b7ccb6d3dfd97e0c6a72cb04404"/><file name="Freightcenter_CustomWare.xml" hash="fffbefcb3f923b0987a8b9b4dd78c850"/><file name="Freightcenter_Ship.xml" hash="1b584f7abcee8ac8ba138e28bbcc927b"/><file name="Freightcenters_Freight.xml" hash="9abe2712cbec32f5cc4964e63bde8ce5"/><file name="Freightcenter_Frieghtadmin.xml" hash="d3cd0f9f9b1d0de731b7651ffaf7e262"/><file name="Exercise_CustomSales.xml" hash="e54a7773247684e6d35fd52e725e3f9a"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="fee.xml" hash="96955d111e2a9014d5dc3d18201ddddf"/><file name="freightcenter_frieghtadmin.xml" hash="a9f0bf1f7d2449cc33ed9724b305c1fb"/><file name="frieghtadmin.xml" hash="2f993ba231d0576728ab222743c90dd1"/><dir name="freightcenter"><file name="customware.xml" hash="f278cb4c03c833b2c8f93eefbf2d5456"/></dir><file name="exercise_customsales.xml" hash="fc2fc4f2fd0142c886d3f23a2de1a97f"/></dir><dir name="template"><dir name="fee"><dir name="sales"><dir name="order"><file name="refunded.phtml" hash="f4239d313366d75907a34b3342b35eb1"/><file name="total.phtml" hash="bbb080fb20415086d72719c1f1f613d4"/></dir></dir></dir><dir name="freightcenter"><dir name="frieghtadmin"><dir name="order"><dir name="view"><dir name="tab"><file name="frieghtadmin.phtml" hash="59b2e3ffdf1d63fcd678cb3a3285f4ab"/></dir></dir></dir></dir></dir><dir name="freightcenter_ship"><dir name="system"><dir name="config"><file name="cdisplay.phtml" hash="eee8123c7dd0d256d17b0c38bb5a2eb3"/><file name="destloctype.phtml" hash="6269924aff886a841c9cba4b42b59ea1"/><file name="positions.phtml" hash="5cc5cd8b04ad69100566145ab126a2a5"/></dir></dir></dir><dir name="exercise"><dir name="customsales"><dir name="sales"><dir name="order"><dir name="view"><file name="items.phtml" hash="911226e17a6bd828a5b11ca98c4fd5d8"/><dir name="items"><dir name="renderer"><file name="default.phtml" hash="9d8bf7e1d288ec2fe8de7ccdf8eafa0c"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="fee.xml" hash="97d67fc83755f625dfe305748fca65b1"/></dir></dir></dir><dir name="default"><dir name="default"><dir name="template"><dir name="checkout"><dir name="cart"><file name="shipping.phtml" hash="4baf50212ac6c291cd8acb495fb7b8c6"/></dir><dir name="onepage"><dir name="payment"><file name="info.phtml" hash="e3d23f5d3e0b135ca38ec7ab5b41f851"/><file name="methods.phtml" hash="b88d2e4a2f375b5fb4a3983539b2e81e"/></dir><dir name="progress"><file name="billing.phtml" hash="e0c20674a6831364b055424dac493acb"/><file name="payment.phtml" hash="2c5af1d7ea230faa3963781f85e9f610"/><file name="shipping.phtml" hash="b26f2b46e5c12cda8de4ecb37f98c355"/><file name="shipping_method.phtml" hash="59e5c45f7f5c023b97aa6b3b2042ba17"/></dir><dir name="review"><file name="button.phtml" hash="d7a54917e7d0ceec6875760a3910452f"/><file name="info.phtml" hash="d6faa974823cb6a1c4e423262e14c72c"/><file name="item.phtml" hash="012d4b6887dd25ff362156b69fc8f825"/><file name="totals.phtml" hash="0acb66397e2d390de49dbdfca15d9804"/></dir><dir name="shipping_method"><file name="additional.phtml" hash="7f8751c51089c14316694e2aa6c5357d"/><file name="available.phtml" hash="78e087c719447383fd2560bbd9b6dff7"/></dir><file name="agreements.phtml" hash="a8f762dd61914b2d9eab9fe9ada1945a"/><file name="billing.phtml" hash="493ea449ce0655dc3aaee8986c7f0ba5"/><file name="failure.phtml" hash="0b95128399f2521bf12837aceaa31836"/><file name="link.phtml" hash="323dcf7f1acb91a186595b618592be86"/><file name="login.phtml" hash="923c114caf3bcaeea2adc266faa7de23"/><file name="payment.phtml" hash="0f2094bb3da954aa9405c1af7b66ae2a"/><file name="progress.phtml" hash="3eab47ed120f6efd05f85294da825544"/><file name="review.phtml" hash="5ffdd3cc23815519462e3dcb1fc6b81a"/><file name="shipping.phtml" hash="ddec0377a5672289f6df2cce615afe12"/><file name="shipping_method.phtml" hash="51e5d90335a974a0d4c0a2af9364ceca"/></dir></dir><dir name="fee"><file name="fee.phtml" hash="d1ae3b16e9473cf366d6338e158295e6"/></dir><dir name="page"><dir name="html"><file name="head.phtml" hash="cb61183d8aa8ad92a965fe2bff4ecb0b"/></dir></dir><dir name="sales"><dir name="order"><file name="info.phtml" hash="599564a467e899a75b39f30b0188be07"/><file name="print.phtml" hash="d92d718ccebb09dd9d8b2877563d7506"/></dir></dir><dir name="tax"><dir name="checkout"><file name="discount.phtml" hash="c3232e4e0e91d1e3d58fd5ccb0286d15"/><file name="grandtotal.phtml" hash="e5335ffe8c8020e39a0fbde4b076fbfb"/><file name="shipping.phtml" hash="7213e1850d846c0261ac48a8c6c7fc7e"/><file name="subtotal.phtml" hash="538f9fc386a8979136c2f8dc90412de2"/><file name="tax.phtml" hash="b2e0cbdd1eee49d85e507f52d372e67c"/></dir><dir name="order"><file name="tax.phtml" hash="c551e5681ccc3d95d37640f91431362d"/></dir></dir></dir></dir></dir></dir></target></contents>
|
| 16 |
<compatible/>
|
| 17 |
<dependencies><required><php><min>5.0.0</min><max>5.6.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.7</min><max>1.8.0.1</max></package></required></dependencies>
|
| 18 |
</package>
|
