Version Notes
1.8.1.0
Download this release
Release Info
Developer | Magento Core Team |
Extension | Mage_Core_Modules |
Version | 1.8.1.0 |
Comparing to | |
See all releases |
Code changes from version 1.8.0.0 to 1.8.1.0
- app/Mage.php +2 -1
- app/code/core/Mage/Api/Model/Server/Adapter/Soap.php +4 -2
- app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle.php +59 -8
- app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php +12 -10
- app/code/core/Mage/Bundle/Model/Product/Price.php +133 -68
- app/code/core/Mage/Catalog/Block/Product/Abstract.php +23 -7
- app/code/core/Mage/Catalog/Block/Product/Price.php +42 -1
- app/code/core/Mage/Catalog/Block/Product/View.php +9 -2
- app/code/core/Mage/Catalog/Helper/Product/Compare.php +2 -1
- app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Source.php +2 -1
- app/code/core/Mage/Catalog/Model/Resource/Product/Option/Value.php +3 -3
- app/code/core/Mage/Catalog/Model/Resource/Product/Status.php +6 -10
- app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable.php +1 -1
- app/code/core/Mage/Catalog/controllers/Product/CompareController.php +5 -0
- app/code/core/Mage/Catalog/etc/wsi.xml +2 -2
- app/code/core/Mage/CatalogInventory/Model/Observer.php +18 -8
- app/code/core/Mage/CatalogRule/Model/Resource/Rule.php +1 -1
- app/code/core/Mage/CatalogRule/Model/Rule/Condition/Product.php +3 -1
- app/code/core/Mage/CatalogSearch/Helper/Data.php +19 -2
- app/code/core/Mage/Checkout/Block/Cart/Item/Renderer.php +4 -1
- app/code/core/Mage/Checkout/Helper/Data.php +55 -29
- app/code/core/Mage/Checkout/Model/Cart/Product/Api.php +11 -12
- app/code/core/Mage/Checkout/controllers/CartController.php +5 -0
- app/code/core/Mage/Checkout/controllers/MultishippingController.php +30 -6
- app/code/core/Mage/Cms/Model/Resource/Page.php +3 -0
- app/code/core/Mage/Cms/Model/Resource/Page/Service.php +3 -2
- app/code/core/Mage/{GoogleCheckout/Block/Form.php → Cms/data/cms_setup/data-upgrade-1.6.0.0.1-1.6.0.0.2.php} +13 -20
- app/code/core/Mage/Cms/etc/config.xml +1 -1
- app/code/core/Mage/Core/Block/Abstract.php +65 -32
- app/code/core/Mage/Core/Helper/Cookie.php +15 -0
- app/code/core/Mage/Core/Model/Design/Package.php +3 -0
- app/code/core/Mage/Core/Model/Locale.php +23 -4
- app/code/core/Mage/Core/Model/Resource/Design.php +20 -30
- app/code/core/Mage/Core/Model/Store.php +57 -5
- app/code/core/Mage/Core/etc/config.xml +1 -1
- app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.7.3-0.7.4.php +1 -1
- app/code/core/Mage/{GoogleCheckout/sql/googlecheckout_setup/mysql4-upgrade-1.6.0.0-1.6.0.1.php → Core/sql/core_setup/upgrade-1.6.0.3-1.6.0.4.php} +12 -7
- app/code/core/Mage/Customer/Helper/Address.php +1 -1
- app/code/core/Mage/Customer/Model/Address/Abstract.php +58 -10
- app/code/core/Mage/Customer/controllers/AccountController.php +6 -2
- app/code/core/Mage/{GoogleCheckout/sql/googlecheckout_setup/mysql4-upgrade-0.7.3-0.7.4.php → Customer/data/customer_setup/data-upgrade-1.6.2.0.2-1.6.2.0.3.php} +12 -9
- app/code/core/Mage/Customer/etc/config.xml +1 -1
- app/code/core/Mage/Customer/etc/wsdl.xml +6 -0
- app/code/core/Mage/Customer/etc/wsi.xml +6 -0
- app/code/core/Mage/Customer/sql/customer_setup/upgrade-1.6.2.0.1-1.6.2.0.2.php +82 -0
- app/code/core/Mage/Directory/Model/Currency.php +72 -23
- app/code/core/Mage/Directory/Model/Resource/Region/Collection.php +1 -1
- app/code/core/Mage/{GoogleCheckout/sql/googlecheckout_setup/mysql4-install-0.7.0.php → Directory/sql/directory_setup/mysql4-upgrade-1.6.0.1-1.6.0.2.php} +27 -14
- app/code/core/Mage/{GoogleCheckout/Model/Resource/Api/Debug.php → Eav/Model/Attribute/Data/Datetime.php} +29 -7
- app/code/core/Mage/Eav/Model/Entity/Attribute/Backend/Time/Created.php +29 -2
- app/code/core/Mage/Eav/Model/Resource/Entity/Attribute.php +2 -2
- app/code/core/Mage/Eav/Model/Resource/Entity/Attribute/Option.php +2 -2
- app/code/core/Mage/Eav/etc/config.xml +1 -1
- app/code/core/Mage/{GoogleCheckout/sql/googlecheckout_setup/mysql4-upgrade-0.7.2-0.7.3.php → Eav/sql/eav_setup/upgrade-1.6.0.0-1.6.0.1.php} +7 -5
- app/code/core/Mage/GoogleAnalytics/Block/Ga.php +14 -1
- app/code/core/Mage/GoogleAnalytics/Helper/Data.php +14 -2
- app/code/core/Mage/GoogleAnalytics/Model/Observer.php +0 -39
- app/code/core/Mage/GoogleAnalytics/etc/config.xml +0 -8
- app/code/core/Mage/GoogleAnalytics/etc/system.xml +9 -0
- app/code/core/Mage/GoogleCheckout/Block/Adminhtml/Shipping/Applicable/Countries.php +0 -65
- app/code/core/Mage/GoogleCheckout/Block/Adminhtml/Shipping/Merchant.php +0 -181
- app/code/core/Mage/GoogleCheckout/Block/Link.php +0 -108
- app/code/core/Mage/GoogleCheckout/Exception.php +0 -30
- app/code/core/Mage/GoogleCheckout/Helper/Data.php +0 -192
- app/code/core/Mage/GoogleCheckout/Model/Api.php +0 -233
- app/code/core/Mage/GoogleCheckout/Model/Api/Debug.php +0 -52
- app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Abstract.php +0 -245
- app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Callback.php +0 -1107
- app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Checkout.php +0 -1143
- app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Order.php +0 -181
- app/code/core/Mage/GoogleCheckout/Model/Mysql4/Api/Debug.php +0 -37
- app/code/core/Mage/GoogleCheckout/Model/Mysql4/Api/Debug/Collection.php +0 -38
- app/code/core/Mage/GoogleCheckout/Model/Mysql4/Notification.php +0 -37
- app/code/core/Mage/GoogleCheckout/Model/Mysql4/Setup.php +0 -37
- app/code/core/Mage/GoogleCheckout/Model/Mysql4/Tax.php +0 -37
- app/code/core/Mage/GoogleCheckout/Model/Notification.php +0 -129
- app/code/core/Mage/GoogleCheckout/Model/Observer.php +0 -105
- app/code/core/Mage/GoogleCheckout/Model/Payment.php +31 -85
- app/code/core/Mage/GoogleCheckout/Model/Resource/Notification.php +0 -109
- app/code/core/Mage/GoogleCheckout/Model/Resource/Setup.php +0 -37
- app/code/core/Mage/GoogleCheckout/Model/Resource/Tax.php +0 -76
- app/code/core/Mage/GoogleCheckout/Model/Shipping.php +0 -76
- app/code/core/Mage/GoogleCheckout/Model/Source/Checkout/Image.php +0 -55
- app/code/core/Mage/GoogleCheckout/Model/Source/Locale.php +0 -37
- app/code/core/Mage/GoogleCheckout/Model/Source/Shipping/Carrier.php +0 -59
- app/code/core/Mage/GoogleCheckout/Model/Source/Shipping/Category.php +0 -37
- app/code/core/Mage/GoogleCheckout/Model/Source/Shipping/Units.php +0 -36
- app/code/core/Mage/GoogleCheckout/Model/Source/Shipping/Virtual/Method.php +0 -38
- app/code/core/Mage/GoogleCheckout/controllers/ApiController.php +0 -44
- app/code/core/Mage/GoogleCheckout/controllers/RedirectController.php +0 -181
- app/code/core/Mage/GoogleCheckout/etc/adminhtml.xml +0 -48
- app/code/core/Mage/GoogleCheckout/etc/config.xml +0 -136
- app/code/core/Mage/GoogleCheckout/etc/system.xml +0 -483
- app/code/core/Mage/GoogleCheckout/etc/wsdl.xml +0 -15
- app/code/core/Mage/GoogleCheckout/etc/wsi.xml +0 -18
- app/code/core/Mage/GoogleCheckout/sql/googlecheckout_setup/install-1.6.0.0.php +0 -83
- app/code/core/Mage/GoogleCheckout/sql/googlecheckout_setup/mysql4-upgrade-0.7.0-0.7.1.php +0 -64
- app/code/core/Mage/GoogleCheckout/sql/googlecheckout_setup/mysql4-upgrade-0.7.1-0.7.2.php +0 -46
- app/code/core/Mage/GoogleCheckout/sql/googlecheckout_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php +0 -62
- app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php +0 -1
- app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php +155 -6
- app/code/core/Mage/ImportExport/Model/Import/Entity/Product/Type/Abstract.php +19 -13
- app/code/core/Mage/ImportExport/Model/Import/Proxy/Product.php +10 -0
- app/code/core/Mage/Oauth/Model/Server.php +0 -2
- app/code/core/Mage/Page/Block/Html/Breadcrumbs.php +27 -2
- app/code/core/Mage/{GoogleCheckout/Block/Redirect.php → Page/Block/Html/CookieNotice.php} +17 -17
- app/code/core/Mage/Page/Block/Template/Links.php +19 -2
- app/code/core/Mage/Payment/Model/Method/Abstract.php +11 -0
- app/code/core/Mage/Payment/Model/Observer.php +50 -1
- app/code/core/Mage/Payment/etc/config.xml +10 -2
- app/code/core/Mage/Paypal/Model/Api/Nvp.php +43 -2
- app/code/core/Mage/Paypal/Model/Cart.php +15 -0
- app/code/core/Mage/Paypal/Model/Method/Agreement.php +4 -2
- app/code/core/Mage/Paypal/controllers/IpnController.php +1 -0
- app/code/core/Mage/{GoogleCheckout/Model/Resource/Api/Debug/Collection.php → PaypalUk/Model/Api/Express/Nvp.php} +13 -12
- app/code/core/Mage/PaypalUk/Model/Api/Nvp.php +53 -1
- app/code/core/Mage/PaypalUk/Model/Express.php +3 -2
- app/code/core/Mage/PaypalUk/Model/Express/Checkout.php +1 -1
- app/code/core/Mage/{GoogleCheckout/Model/Api/Xml/Calculate.php → PaypalUk/Model/Express/Pro.php} +9 -7
- app/code/core/Mage/Persistent/Model/Observer.php +2 -4
- app/code/core/Mage/Persistent/controllers/IndexController.php +1 -1
- app/code/core/Mage/Persistent/etc/config.xml +0 -8
- app/code/core/Mage/ProductAlert/Block/Email/Abstract.php +15 -0
- app/code/core/Mage/Reports/Model/Resource/Report/Abstract.php +33 -3
- app/code/core/Mage/Review/controllers/ProductController.php +6 -0
- app/code/core/Mage/Sales/Block/Guest/Links.php +2 -2
- app/code/core/Mage/Sales/Helper/Guest.php +4 -4
- app/code/core/Mage/Sales/Model/Order.php +26 -17
- app/code/core/Mage/Sales/Model/Order/Config.php +34 -3
- app/code/core/Mage/Sales/Model/Order/Creditmemo.php +15 -0
- app/code/core/Mage/Sales/Model/Order/Creditmemo/Total/Discount.php +3 -3
- app/code/core/Mage/Sales/Model/Order/Creditmemo/Total/Subtotal.php +2 -1
- app/code/core/Mage/Sales/Model/Order/Creditmemo/Total/Tax.php +19 -8
- app/code/core/Mage/Sales/Model/Order/Invoice/Total/Discount.php +12 -2
- app/code/core/Mage/Sales/Model/Order/Invoice/Total/Subtotal.php +7 -2
- app/code/core/Mage/Sales/Model/Order/Item.php +40 -0
- app/code/core/Mage/Sales/Model/Order/Payment.php +9 -2
- app/code/core/Mage/Sales/Model/Order/Shipment.php +2 -1
- app/code/core/Mage/Sales/Model/Order/Shipment/Track.php +10 -1
- app/code/core/Mage/Sales/Model/Quote/Item.php +41 -37
- app/code/core/Mage/Sales/Model/Quote/Item/Abstract.php +21 -5
- app/code/core/Mage/Sales/Model/Resource/Order/Status/Collection.php +14 -0
- app/code/core/Mage/Sales/etc/config.xml +0 -7
- app/code/core/Mage/Sales/etc/widget.xml +5 -0
- app/code/core/Mage/SalesRule/Model/Validator.php +138 -65
- app/code/core/Mage/Shipping/Model/Carrier/Tablerate.php +70 -16
- app/code/core/Mage/Tax/Block/Adminhtml/Notifications.php +36 -0
- app/code/core/Mage/Tax/Block/Checkout/Tax.php +6 -3
- app/code/core/Mage/Tax/Block/Sales/Order/Tax.php +13 -4
- app/code/core/Mage/Tax/Helper/Data.php +164 -66
- app/code/core/Mage/Tax/Model/Calculation.php +178 -33
- app/code/core/Mage/Tax/Model/Calculation/Rate.php +33 -2
- app/code/core/Mage/Tax/Model/Calculation/Rule.php +70 -1
- app/code/core/Mage/Tax/Model/Config.php +28 -19
- app/code/core/Mage/Tax/Model/Resource/Calculation/Rule.php +26 -0
- app/code/core/Mage/Tax/Model/Sales/Total/Quote/Shipping.php +24 -14
- app/code/core/Mage/Tax/Model/Sales/Total/Quote/Subtotal.php +337 -245
- app/code/core/Mage/Tax/Model/Sales/Total/Quote/Tax.php +796 -420
- app/code/core/Mage/Tax/Model/System/Config/Source/Tax/Region.php +26 -6
- app/code/core/Mage/Tax/etc/config.xml +1 -1
- app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl.php +0 -4
- app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International.php +0 -8
- app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf/Page.php +2 -2
- app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf/PageBuilder.php +6 -6
- app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php +8 -2
- app/code/core/Mage/Usa/Model/Shipping/Carrier/Usps.php +7 -7
- app/code/core/Mage/Weee/Block/Renderer/Weee/Tax.php +105 -20
- app/code/core/Mage/Weee/Helper/Data.php +292 -17
- app/code/core/Mage/{GoogleCheckout/Model/Source/Shipping/Virtual/Schedule.php → Weee/Model/Config/Source/Fpt/Tax.php} +24 -6
- app/code/core/Mage/Weee/Model/Observer.php +68 -25
- app/code/core/Mage/Weee/Model/Tax.php +75 -7
- app/code/core/Mage/Weee/Model/Total/Creditmemo/Weee.php +33 -8
- app/code/core/Mage/Weee/Model/Total/Invoice/Weee.php +13 -0
- app/code/core/Mage/Weee/Model/Total/Quote/Weee.php +135 -43
- app/code/core/Mage/Weee/etc/config.xml +18 -3
- app/code/core/Mage/Weee/etc/system.xml +2 -2
- app/code/core/Mage/Wishlist/Controller/Abstract.php +17 -4
- app/code/core/Mage/Wishlist/Helper/Data.php +1 -1
- cron.php +3 -0
- errors/design.xml +5 -5
- package.xml +2 -5
app/Mage.php
CHANGED
@@ -39,6 +39,7 @@ if (defined('COMPILER_INCLUDE_PATH')) {
|
|
39 |
/**
|
40 |
* Set include path
|
41 |
*/
|
|
|
42 |
$paths[] = BP . DS . 'app' . DS . 'code' . DS . 'local';
|
43 |
$paths[] = BP . DS . 'app' . DS . 'code' . DS . 'community';
|
44 |
$paths[] = BP . DS . 'app' . DS . 'code' . DS . 'core';
|
@@ -169,7 +170,7 @@ final class Mage
|
|
169 |
return array(
|
170 |
'major' => '1',
|
171 |
'minor' => '8',
|
172 |
-
'revision' => '
|
173 |
'patch' => '0',
|
174 |
'stability' => '',
|
175 |
'number' => '',
|
39 |
/**
|
40 |
* Set include path
|
41 |
*/
|
42 |
+
$paths = array();
|
43 |
$paths[] = BP . DS . 'app' . DS . 'code' . DS . 'local';
|
44 |
$paths[] = BP . DS . 'app' . DS . 'code' . DS . 'community';
|
45 |
$paths[] = BP . DS . 'app' . DS . 'code' . DS . 'core';
|
170 |
return array(
|
171 |
'major' => '1',
|
172 |
'minor' => '8',
|
173 |
+
'revision' => '1',
|
174 |
'patch' => '0',
|
175 |
'stability' => '',
|
176 |
'number' => '',
|
app/code/core/Mage/Api/Model/Server/Adapter/Soap.php
CHANGED
@@ -208,12 +208,14 @@ class Mage_Api_Model_Server_Adapter_Soap
|
|
208 |
? $urlModel->getUrl('*/*/*', array('_current' => true, '_query' => $params))
|
209 |
: $urlModel->getUrl('*/*/*');
|
210 |
|
211 |
-
if( $withAuth ) {
|
212 |
$phpAuthUser = $this->getController()->getRequest()->getServer('PHP_AUTH_USER', false);
|
213 |
$phpAuthPw = $this->getController()->getRequest()->getServer('PHP_AUTH_PW', false);
|
|
|
214 |
|
215 |
if ($phpAuthUser && $phpAuthPw) {
|
216 |
-
$wsdlUrl = sprintf("
|
|
|
217 |
}
|
218 |
}
|
219 |
|
208 |
? $urlModel->getUrl('*/*/*', array('_current' => true, '_query' => $params))
|
209 |
: $urlModel->getUrl('*/*/*');
|
210 |
|
211 |
+
if ( $withAuth ) {
|
212 |
$phpAuthUser = $this->getController()->getRequest()->getServer('PHP_AUTH_USER', false);
|
213 |
$phpAuthPw = $this->getController()->getRequest()->getServer('PHP_AUTH_PW', false);
|
214 |
+
$scheme = $this->getController()->getRequest()->getScheme();
|
215 |
|
216 |
if ($phpAuthUser && $phpAuthPw) {
|
217 |
+
$wsdlUrl = sprintf("%s://%s:%s@%s", $scheme, $phpAuthUser, $phpAuthPw,
|
218 |
+
str_replace($scheme . '://', '', $wsdlUrl));
|
219 |
}
|
220 |
}
|
221 |
|
app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle.php
CHANGED
@@ -34,7 +34,18 @@
|
|
34 |
*/
|
35 |
class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle extends Mage_Catalog_Block_Product_View_Abstract
|
36 |
{
|
|
|
|
|
|
|
|
|
|
|
37 |
protected $_optionRenderers = array();
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
protected $_options = null;
|
39 |
|
40 |
/**
|
@@ -44,6 +55,18 @@ class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle extends Mage_Catalog_Bl
|
|
44 |
*/
|
45 |
protected $_mapRenderer = 'msrp_item';
|
46 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
public function getOptions()
|
48 |
{
|
49 |
if (!$this->_options) {
|
@@ -66,6 +89,11 @@ class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle extends Mage_Catalog_Bl
|
|
66 |
return $this->_options;
|
67 |
}
|
68 |
|
|
|
|
|
|
|
|
|
|
|
69 |
public function hasOptions()
|
70 |
{
|
71 |
$this->getOptions();
|
@@ -92,7 +120,8 @@ class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle extends Mage_Catalog_Bl
|
|
92 |
/* @var $bundlePriceModel Mage_Bundle_Model_Product_Price */
|
93 |
$bundlePriceModel = Mage::getModel('bundle/product_price');
|
94 |
|
95 |
-
|
|
|
96 |
$preConfiguredValues = $currentProduct->getPreconfiguredValues();
|
97 |
$defaultValues = array();
|
98 |
}
|
@@ -122,9 +151,15 @@ class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle extends Mage_Catalog_Bl
|
|
122 |
// recalculate currency
|
123 |
$tierPrices = $_selection->getTierPrice();
|
124 |
foreach ($tierPrices as &$tierPriceInfo) {
|
|
|
|
|
|
|
|
|
125 |
$tierPriceInfo['price'] = $coreHelper->currency($tierPriceInfo['price'], false, false);
|
126 |
-
$tierPriceInfo['priceInclTax'] = $taxHelper->getPrice($_selection, $tierPriceInfo['price'], true
|
127 |
-
|
|
|
|
|
128 |
}
|
129 |
unset($tierPriceInfo); // break the reference with the last element
|
130 |
|
@@ -137,12 +172,16 @@ class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle extends Mage_Catalog_Bl
|
|
137 |
/* @var $taxHelper Mage_Tax_Helper_Data */
|
138 |
$taxHelper = Mage::helper('tax');
|
139 |
|
140 |
-
$_priceInclTax = $taxHelper->getPrice($_selection, $itemPrice, true
|
141 |
-
|
|
|
|
|
142 |
|
143 |
if ($currentProduct->getPriceType() == Mage_Bundle_Model_Product_Price::PRICE_TYPE_FIXED) {
|
144 |
-
$_priceInclTax = $taxHelper->getPrice($currentProduct, $itemPrice, true
|
145 |
-
|
|
|
|
|
146 |
}
|
147 |
|
148 |
$selection = array (
|
@@ -158,7 +197,7 @@ class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle extends Mage_Catalog_Bl
|
|
158 |
'plusDisposition' => 0,
|
159 |
'minusDisposition' => 0,
|
160 |
'canApplyMAP' => $canApplyMAP,
|
161 |
-
'tierPriceHtml' => $this->getTierPriceHtml($_selection),
|
162 |
);
|
163 |
|
164 |
$responseObject = new Varien_Object();
|
@@ -208,11 +247,23 @@ class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle extends Mage_Catalog_Bl
|
|
208 |
return $coreHelper->jsonEncode($config);
|
209 |
}
|
210 |
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
public function addRenderer($type, $block)
|
212 |
{
|
213 |
$this->_optionRenderers[$type] = $block;
|
214 |
}
|
215 |
|
|
|
|
|
|
|
|
|
|
|
|
|
216 |
public function getOptionHtml($option)
|
217 |
{
|
218 |
if (!isset($this->_optionRenderers[$option->getType()])) {
|
34 |
*/
|
35 |
class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle extends Mage_Catalog_Block_Product_View_Abstract
|
36 |
{
|
37 |
+
/**
|
38 |
+
* Renderers for bundle product options
|
39 |
+
*
|
40 |
+
* @var array
|
41 |
+
*/
|
42 |
protected $_optionRenderers = array();
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Bundle product options
|
46 |
+
*
|
47 |
+
* @var array
|
48 |
+
*/
|
49 |
protected $_options = null;
|
50 |
|
51 |
/**
|
55 |
*/
|
56 |
protected $_mapRenderer = 'msrp_item';
|
57 |
|
58 |
+
/**
|
59 |
+
* Tier price template
|
60 |
+
*
|
61 |
+
* @var string
|
62 |
+
*/
|
63 |
+
protected $_tierPriceDefaultTemplate = 'bundle/catalog/product/view/option_tierprices.phtml';
|
64 |
+
|
65 |
+
/**
|
66 |
+
* Return an array of bundle product options
|
67 |
+
*
|
68 |
+
* @return array
|
69 |
+
*/
|
70 |
public function getOptions()
|
71 |
{
|
72 |
if (!$this->_options) {
|
89 |
return $this->_options;
|
90 |
}
|
91 |
|
92 |
+
/**
|
93 |
+
* Whether the bundle product has any option
|
94 |
+
*
|
95 |
+
* @return boolean
|
96 |
+
*/
|
97 |
public function hasOptions()
|
98 |
{
|
99 |
$this->getOptions();
|
120 |
/* @var $bundlePriceModel Mage_Bundle_Model_Product_Price */
|
121 |
$bundlePriceModel = Mage::getModel('bundle/product_price');
|
122 |
|
123 |
+
$preConfiguredFlag = $currentProduct->hasPreconfiguredValues();
|
124 |
+
if ($preConfiguredFlag) {
|
125 |
$preConfiguredValues = $currentProduct->getPreconfiguredValues();
|
126 |
$defaultValues = array();
|
127 |
}
|
151 |
// recalculate currency
|
152 |
$tierPrices = $_selection->getTierPrice();
|
153 |
foreach ($tierPrices as &$tierPriceInfo) {
|
154 |
+
$tierPriceInfo['price'] =
|
155 |
+
$bundlePriceModel->getLowestPrice($currentProduct, $tierPriceInfo['price']);
|
156 |
+
$tierPriceInfo['website_price'] =
|
157 |
+
$bundlePriceModel->getLowestPrice($currentProduct, $tierPriceInfo['website_price']);
|
158 |
$tierPriceInfo['price'] = $coreHelper->currency($tierPriceInfo['price'], false, false);
|
159 |
+
$tierPriceInfo['priceInclTax'] = $taxHelper->getPrice($_selection, $tierPriceInfo['price'], true,
|
160 |
+
null, null, null, null, null, false);
|
161 |
+
$tierPriceInfo['priceExclTax'] = $taxHelper->getPrice($_selection, $tierPriceInfo['price'], false,
|
162 |
+
null, null, null, null, null, false);
|
163 |
}
|
164 |
unset($tierPriceInfo); // break the reference with the last element
|
165 |
|
172 |
/* @var $taxHelper Mage_Tax_Helper_Data */
|
173 |
$taxHelper = Mage::helper('tax');
|
174 |
|
175 |
+
$_priceInclTax = $taxHelper->getPrice($_selection, $itemPrice, true,
|
176 |
+
null, null, null, null, null, false);
|
177 |
+
$_priceExclTax = $taxHelper->getPrice($_selection, $itemPrice, false,
|
178 |
+
null, null, null, null, null, false);
|
179 |
|
180 |
if ($currentProduct->getPriceType() == Mage_Bundle_Model_Product_Price::PRICE_TYPE_FIXED) {
|
181 |
+
$_priceInclTax = $taxHelper->getPrice($currentProduct, $itemPrice, true,
|
182 |
+
null, null, null, null, null, false);
|
183 |
+
$_priceExclTax = $taxHelper->getPrice($currentProduct, $itemPrice, false,
|
184 |
+
null, null, null, null, null, false);
|
185 |
}
|
186 |
|
187 |
$selection = array (
|
197 |
'plusDisposition' => 0,
|
198 |
'minusDisposition' => 0,
|
199 |
'canApplyMAP' => $canApplyMAP,
|
200 |
+
'tierPriceHtml' => $this->getTierPriceHtml($_selection, $currentProduct),
|
201 |
);
|
202 |
|
203 |
$responseObject = new Varien_Object();
|
247 |
return $coreHelper->jsonEncode($config);
|
248 |
}
|
249 |
|
250 |
+
/**
|
251 |
+
* Add renderer for an option type, e.g., select, radio button, etc.
|
252 |
+
*
|
253 |
+
* @param string $type
|
254 |
+
* @param string $block
|
255 |
+
*/
|
256 |
public function addRenderer($type, $block)
|
257 |
{
|
258 |
$this->_optionRenderers[$type] = $block;
|
259 |
}
|
260 |
|
261 |
+
/**
|
262 |
+
* Get option html
|
263 |
+
*
|
264 |
+
* @param Mage_Catalog_Model_Product_Option $option
|
265 |
+
* @return string
|
266 |
+
*/
|
267 |
public function getOptionHtml($option)
|
268 |
{
|
269 |
if (!isset($this->_optionRenderers[$option->getType()])) {
|
app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php
CHANGED
@@ -81,17 +81,17 @@ class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option extends Mage_Bun
|
|
81 |
->getData('bundle_option_qty/' . $_option->getId());
|
82 |
|
83 |
if (empty($selectedOptions) && $_default) {
|
84 |
-
$_defaultQty = $_default->getSelectionQty()*1;
|
85 |
$_canChangeQty = $_default->getSelectionCanChangeQty();
|
86 |
} elseif (!$inPreConfigured && $selectedOptions && is_numeric($selectedOptions)) {
|
87 |
$selectedSelection = $_option->getSelectionById($selectedOptions);
|
88 |
-
$_defaultQty = $selectedSelection->getSelectionQty()*1;
|
89 |
$_canChangeQty = $selectedSelection->getSelectionCanChangeQty();
|
90 |
} elseif (!$this->_showSingle() || $inPreConfigured) {
|
91 |
$_defaultQty = $this->_getSelectedQty();
|
92 |
$_canChangeQty = (bool)$_defaultQty;
|
93 |
} else {
|
94 |
-
$_defaultQty = $_selections[0]->getSelectionQty()*1;
|
95 |
$_canChangeQty = $_selections[0]->getSelectionCanChangeQty();
|
96 |
}
|
97 |
|
@@ -176,17 +176,24 @@ class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option extends Mage_Bun
|
|
176 |
return $this->getData('product');
|
177 |
}
|
178 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
public function getSelectionQtyTitlePrice($_selection, $includeContainer = true)
|
180 |
{
|
181 |
$price = $this->getProduct()->getPriceModel()->getSelectionPreFinalPrice($this->getProduct(), $_selection);
|
182 |
$this->setFormatProduct($_selection);
|
183 |
-
$priceTitle = $_selection->getSelectionQty()*1 . ' x ' . $this->escapeHtml($_selection->getName());
|
184 |
|
185 |
$priceTitle .= ' ' . ($includeContainer ? '<span class="price-notice">' : '')
|
186 |
. '+' . $this->formatPriceString($price, $includeContainer)
|
187 |
. ($includeContainer ? '</span>' : '');
|
188 |
|
189 |
-
return
|
190 |
}
|
191 |
|
192 |
/**
|
@@ -218,11 +225,6 @@ class Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option extends Mage_Bun
|
|
218 |
public function getSelectionTitlePrice($_selection, $includeContainer = true)
|
219 |
{
|
220 |
$price = $this->getProduct()->getPriceModel()->getSelectionPreFinalPrice($this->getProduct(), $_selection, 1);
|
221 |
-
$tierPrice = $_selection->getTierPrice();
|
222 |
-
if (!empty($tierPrice)) {
|
223 |
-
$qty = $_selection->getSelectionQty();
|
224 |
-
$price = $qty * (float) $_selection->getPriceModel()->getTierPrice($qty, $_selection);
|
225 |
-
}
|
226 |
$this->setFormatProduct($_selection);
|
227 |
$priceTitle = $this->escapeHtml($_selection->getName());
|
228 |
$priceTitle .= ' ' . ($includeContainer ? '<span class="price-notice">' : '')
|
81 |
->getData('bundle_option_qty/' . $_option->getId());
|
82 |
|
83 |
if (empty($selectedOptions) && $_default) {
|
84 |
+
$_defaultQty = $_default->getSelectionQty() * 1;
|
85 |
$_canChangeQty = $_default->getSelectionCanChangeQty();
|
86 |
} elseif (!$inPreConfigured && $selectedOptions && is_numeric($selectedOptions)) {
|
87 |
$selectedSelection = $_option->getSelectionById($selectedOptions);
|
88 |
+
$_defaultQty = $selectedSelection->getSelectionQty() * 1;
|
89 |
$_canChangeQty = $selectedSelection->getSelectionCanChangeQty();
|
90 |
} elseif (!$this->_showSingle() || $inPreConfigured) {
|
91 |
$_defaultQty = $this->_getSelectedQty();
|
92 |
$_canChangeQty = (bool)$_defaultQty;
|
93 |
} else {
|
94 |
+
$_defaultQty = $_selections[0]->getSelectionQty() * 1;
|
95 |
$_canChangeQty = $_selections[0]->getSelectionCanChangeQty();
|
96 |
}
|
97 |
|
176 |
return $this->getData('product');
|
177 |
}
|
178 |
|
179 |
+
/**
|
180 |
+
* Returns the formatted string for the quantity chosen for the given selection
|
181 |
+
*
|
182 |
+
* @param Mage_Catalog_Model_Proudct $_selection
|
183 |
+
* @param bool $includeContainer
|
184 |
+
* @return string
|
185 |
+
*/
|
186 |
public function getSelectionQtyTitlePrice($_selection, $includeContainer = true)
|
187 |
{
|
188 |
$price = $this->getProduct()->getPriceModel()->getSelectionPreFinalPrice($this->getProduct(), $_selection);
|
189 |
$this->setFormatProduct($_selection);
|
190 |
+
$priceTitle = $_selection->getSelectionQty() * 1 . ' x ' . $this->escapeHtml($_selection->getName());
|
191 |
|
192 |
$priceTitle .= ' ' . ($includeContainer ? '<span class="price-notice">' : '')
|
193 |
. '+' . $this->formatPriceString($price, $includeContainer)
|
194 |
. ($includeContainer ? '</span>' : '');
|
195 |
|
196 |
+
return $priceTitle;
|
197 |
}
|
198 |
|
199 |
/**
|
225 |
public function getSelectionTitlePrice($_selection, $includeContainer = true)
|
226 |
{
|
227 |
$price = $this->getProduct()->getPriceModel()->getSelectionPreFinalPrice($this->getProduct(), $_selection, 1);
|
|
|
|
|
|
|
|
|
|
|
228 |
$this->setFormatProduct($_selection);
|
229 |
$priceTitle = $this->escapeHtml($_selection->getName());
|
230 |
$priceTitle .= ' ' . ($includeContainer ? '<span class="price-notice">' : '')
|
app/code/core/Mage/Bundle/Model/Product/Price.php
CHANGED
@@ -36,12 +36,12 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
36 |
/**
|
37 |
* Fixed price type
|
38 |
*/
|
39 |
-
const PRICE_TYPE_FIXED
|
40 |
|
41 |
/**
|
42 |
* Dynamic price type
|
43 |
*/
|
44 |
-
const PRICE_TYPE_DYNAMIC
|
45 |
|
46 |
/**
|
47 |
* Flag which indicates - is min/max prices have been calculated by index
|
@@ -112,7 +112,7 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
112 |
/**
|
113 |
* Get product final price
|
114 |
*
|
115 |
-
* @param double
|
116 |
* @param Mage_Catalog_Model_Product $product
|
117 |
* @return double
|
118 |
*/
|
@@ -138,9 +138,9 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
138 |
* Returns final price of a child product
|
139 |
*
|
140 |
* @param Mage_Catalog_Model_Product $product
|
141 |
-
* @param float
|
142 |
* @param Mage_Catalog_Model_Product $childProduct
|
143 |
-
* @param float
|
144 |
* @return decimal
|
145 |
*/
|
146 |
public function getChildFinalPrice($product, $productQty, $childProduct, $childProductQty)
|
@@ -155,7 +155,7 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
155 |
* @see Mage_Bundle_Model_Product_Price::getTotalPrices()
|
156 |
*
|
157 |
* @param Mage_Catalog_Model_Product $product
|
158 |
-
* @param string
|
159 |
* @return decimal|array
|
160 |
*/
|
161 |
public function getPrices($product, $which = null)
|
@@ -170,8 +170,8 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
170 |
* @see Mage_Bundle_Model_Product_Price::getTotalPrices()
|
171 |
*
|
172 |
* @param Mage_Catalog_Model_Product $product
|
173 |
-
* @param string
|
174 |
-
* @param bool|null
|
175 |
* @return decimal|array
|
176 |
*/
|
177 |
public function getPricesDependingOnTax($product, $which = null, $includeTax = null)
|
@@ -183,9 +183,9 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
183 |
* Retrieve Price considering tier price
|
184 |
*
|
185 |
* @param Mage_Catalog_Model_Product $product
|
186 |
-
* @param string|null
|
187 |
-
* @param bool|null
|
188 |
-
* @param bool
|
189 |
* @return decimal|array
|
190 |
*/
|
191 |
public function getTotalPrices($product, $which = null, $includeTax = null, $takeTierPrice = true)
|
@@ -195,15 +195,18 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
195 |
$taxHelper = $this->_getHelperData('tax');
|
196 |
|
197 |
if ($this->_isPricesCalculatedByIndex && !$includeTax) {
|
198 |
-
$minimalPrice = $taxHelper->getPrice($product, $product->getData('min_price'), $includeTax
|
199 |
-
|
|
|
|
|
200 |
} else {
|
201 |
/**
|
202 |
* Check if product price is fixed
|
203 |
*/
|
204 |
$finalPrice = $product->getFinalPrice();
|
205 |
if ($isPriceFixedType) {
|
206 |
-
$minimalPrice = $maximalPrice = $taxHelper->getPrice($product, $finalPrice, $includeTax
|
|
|
207 |
} else { // PRICE_TYPE_DYNAMIC
|
208 |
$minimalPrice = $maximalPrice = 0;
|
209 |
}
|
@@ -227,6 +230,9 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
227 |
}
|
228 |
}
|
229 |
|
|
|
|
|
|
|
230 |
if ('max' == $which) {
|
231 |
return $maximalPrice;
|
232 |
} elseif ('min' == $which) {
|
@@ -248,8 +254,10 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
248 |
{
|
249 |
$options = $this->getOptions($product);
|
250 |
$minimalPrice = 0;
|
|
|
251 |
$hasRequiredOptions = $this->_hasRequiredOptions($product);
|
252 |
$selectionMinimalPrices = array();
|
|
|
253 |
|
254 |
if (!$options) {
|
255 |
return $minimalPrice;
|
@@ -257,20 +265,41 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
257 |
|
258 |
foreach ($options as $option) {
|
259 |
/* @var $option Mage_Bundle_Model_Option */
|
260 |
-
|
|
|
261 |
|
262 |
if (count($selectionPrices)) {
|
263 |
-
$selectionMinPrice = min($selectionPrices);
|
|
|
|
|
264 |
if ($option->getRequired()) {
|
265 |
$minimalPrice += $selectionMinPrice;
|
|
|
266 |
} elseif (!$hasRequiredOptions) {
|
267 |
$selectionMinimalPrices[] = $selectionMinPrice;
|
|
|
268 |
}
|
269 |
}
|
270 |
}
|
271 |
// condition is TRUE when all product options are NOT required
|
272 |
if (!$hasRequiredOptions) {
|
273 |
$minimalPrice = min($selectionMinimalPrices);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
274 |
}
|
275 |
return $minimalPrice;
|
276 |
}
|
@@ -316,6 +345,7 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
316 |
{
|
317 |
$selectionPrices = array();
|
318 |
$taxHelper = $this->_getHelperData('tax');
|
|
|
319 |
$isPriceFixedType = ($product->getPriceType() == self::PRICE_TYPE_FIXED);
|
320 |
|
321 |
$selections = $option->getSelections();
|
@@ -334,11 +364,20 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
334 |
|
335 |
$item = $isPriceFixedType ? $product : $selection;
|
336 |
|
337 |
-
$
|
338 |
-
$
|
339 |
-
|
340 |
-
|
341 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
342 |
}
|
343 |
return $selectionPrices;
|
344 |
}
|
@@ -396,8 +435,8 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
396 |
*
|
397 |
* @param Mage_Catalog_Model_Product $bundleProduct
|
398 |
* @param Mage_Catalog_Model_Product $selectionProduct
|
399 |
-
* @param float|null
|
400 |
-
* @param null|bool
|
401 |
* @return float
|
402 |
*/
|
403 |
public function getSelectionPrice($bundleProduct, $selectionProduct, $selectionQty = null, $multiplyQty = true)
|
@@ -410,7 +449,7 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
410 |
*
|
411 |
* @param Mage_Catalog_Model_Product $bundleProduct
|
412 |
* @param Mage_Catalog_Model_Product $selectionProduct
|
413 |
-
* @param decimal
|
414 |
* @return decimal
|
415 |
*/
|
416 |
public function getSelectionPreFinalPrice($bundleProduct, $selectionProduct, $qty = null)
|
@@ -426,13 +465,13 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
426 |
*
|
427 |
* @param Mage_Catalog_Model_Product $bundleProduct
|
428 |
* @param Mage_Catalog_Model_Product $selectionProduct
|
429 |
-
* @param decimal
|
430 |
-
* @param decimal
|
431 |
-
* @param bool
|
432 |
* @return decimal
|
433 |
*/
|
434 |
public function getSelectionFinalPrice($bundleProduct, $selectionProduct, $bundleQty, $selectionQty = null,
|
435 |
-
|
436 |
{
|
437 |
return $this->getSelectionFinalTotalPrice($bundleProduct, $selectionProduct, $bundleQty, $selectionQty,
|
438 |
$multiplyQty);
|
@@ -444,14 +483,14 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
444 |
*
|
445 |
* @param Mage_Catalog_Model_Product $bundleProduct
|
446 |
* @param Mage_Catalog_Model_Product $selectionProduct
|
447 |
-
* @param
|
448 |
-
* @param
|
449 |
-
* @param bool
|
450 |
-
* @param bool
|
451 |
-
* @return
|
452 |
*/
|
453 |
public function getSelectionFinalTotalPrice($bundleProduct, $selectionProduct, $bundleQty, $selectionQty,
|
454 |
-
|
455 |
{
|
456 |
if (is_null($selectionQty)) {
|
457 |
$selectionQty = $selectionProduct->getSelectionQty();
|
@@ -474,11 +513,7 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
474 |
}
|
475 |
}
|
476 |
|
477 |
-
$price =
|
478 |
-
$this->_applyGroupPrice($bundleProduct, $price),
|
479 |
-
$this->_applyTierPrice($bundleProduct, $bundleQty, $price),
|
480 |
-
$this->_applySpecialPrice($bundleProduct, $price)
|
481 |
-
);
|
482 |
|
483 |
if ($multiplyQty) {
|
484 |
$price *= $selectionQty;
|
@@ -487,6 +522,24 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
487 |
return $price;
|
488 |
}
|
489 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
490 |
/**
|
491 |
* Apply group price for bundle product
|
492 |
*
|
@@ -501,6 +554,7 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
501 |
|
502 |
if (is_numeric($groupPrice)) {
|
503 |
$groupPrice = $finalPrice - ($finalPrice * ($groupPrice / 100));
|
|
|
504 |
$result = min($finalPrice, $groupPrice);
|
505 |
}
|
506 |
|
@@ -547,8 +601,8 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
547 |
* Apply tier price for bundle
|
548 |
*
|
549 |
* @param Mage_Catalog_Model_Product $product
|
550 |
-
* @param decimal
|
551 |
-
* @param decimal
|
552 |
* @return decimal
|
553 |
*/
|
554 |
protected function _applyTierPrice($product, $qty, $finalPrice)
|
@@ -557,10 +611,11 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
557 |
return $finalPrice;
|
558 |
}
|
559 |
|
560 |
-
$tierPrice
|
561 |
|
562 |
if (is_numeric($tierPrice)) {
|
563 |
$tierPrice = $finalPrice - ($finalPrice * ($tierPrice / 100));
|
|
|
564 |
$finalPrice = min($finalPrice, $tierPrice);
|
565 |
}
|
566 |
|
@@ -570,7 +625,7 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
570 |
/**
|
571 |
* Get product tier price by qty
|
572 |
*
|
573 |
-
* @param decimal
|
574 |
* @param Mage_Catalog_Model_Product $product
|
575 |
* @return decimal
|
576 |
*/
|
@@ -589,13 +644,13 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
589 |
|
590 |
if (is_null($prices) || !is_array($prices)) {
|
591 |
if (!is_null($qty)) {
|
592 |
-
return
|
593 |
}
|
594 |
return array(array(
|
595 |
-
'price'
|
596 |
-
'website_price' =>
|
597 |
-
'price_qty'
|
598 |
-
'cust_group'
|
599 |
));
|
600 |
}
|
601 |
|
@@ -624,9 +679,9 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
624 |
}
|
625 |
|
626 |
if ($price['website_price'] > $prevPrice) {
|
627 |
-
$prevPrice
|
628 |
-
$prevQty
|
629 |
-
$prevGroup
|
630 |
}
|
631 |
}
|
632 |
|
@@ -656,18 +711,18 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
656 |
/**
|
657 |
* Calculate product price based on special price data and price rules
|
658 |
*
|
659 |
-
* @param float
|
660 |
-
* @param float
|
661 |
-
* @param string
|
662 |
-
* @param string
|
663 |
* @param float|null|false $rulePrice
|
664 |
-
* @param mixed
|
665 |
-
* @param mixed
|
666 |
-
* @param null|int
|
667 |
* @return float
|
668 |
*/
|
669 |
public static function calculatePrice($basePrice, $specialPrice, $specialPriceFrom, $specialPriceTo,
|
670 |
-
|
671 |
{
|
672 |
$resource = Mage::getResourceSingleton('bundle/bundle');
|
673 |
$selectionResource = Mage::getResourceSingleton('bundle/selection');
|
@@ -717,7 +772,7 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
717 |
$result['final_price'] = $selectionResource->getPriceFromIndex($result['product_id'], $qty, $store,
|
718 |
$gId);
|
719 |
|
720 |
-
$selectionPrice = $result['final_price']
|
721 |
|
722 |
if (isset($options[$result['option_id']])) {
|
723 |
$options[$result['option_id']] = min($options[$result['option_id']], $selectionPrice);
|
@@ -732,7 +787,7 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
732 |
continue;
|
733 |
}
|
734 |
if ($result['selection_price_type']) {
|
735 |
-
$selectionPrice = $basePrice
|
736 |
} else {
|
737 |
$selectionPrice = $result['selection_price_value'];
|
738 |
}
|
@@ -745,7 +800,7 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
745 |
$qty = $result['selection_qty'];
|
746 |
}
|
747 |
|
748 |
-
$selectionPrice = $selectionPrice
|
749 |
|
750 |
if (isset($options[$result['option_id']])) {
|
751 |
$options[$result['option_id']] = min($options[$result['option_id']], $selectionPrice);
|
@@ -801,20 +856,20 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
801 |
/**
|
802 |
* Calculate and apply special price
|
803 |
*
|
804 |
-
* @param float
|
805 |
-
* @param float
|
806 |
* @param string $specialPriceFrom
|
807 |
* @param string $specialPriceTo
|
808 |
-
* @param mixed
|
809 |
* @return float
|
810 |
*/
|
811 |
public static function calculateSpecialPrice($finalPrice, $specialPrice, $specialPriceFrom, $specialPriceTo,
|
812 |
-
|
813 |
{
|
814 |
if (!is_null($specialPrice) && $specialPrice != false) {
|
815 |
if (Mage::app()->getLocale()->isStoreDateInInterval($store, $specialPriceFrom, $specialPriceTo)) {
|
816 |
-
$specialPrice
|
817 |
-
$finalPrice
|
818 |
}
|
819 |
}
|
820 |
|
@@ -842,6 +897,16 @@ class Mage_Bundle_Model_Product_Price extends Mage_Catalog_Model_Product_Type_Pr
|
|
842 |
return Mage::helper($name);
|
843 |
}
|
844 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
845 |
/**
|
846 |
* Check if product has required options
|
847 |
*
|
36 |
/**
|
37 |
* Fixed price type
|
38 |
*/
|
39 |
+
const PRICE_TYPE_FIXED = 1;
|
40 |
|
41 |
/**
|
42 |
* Dynamic price type
|
43 |
*/
|
44 |
+
const PRICE_TYPE_DYNAMIC = 0;
|
45 |
|
46 |
/**
|
47 |
* Flag which indicates - is min/max prices have been calculated by index
|
112 |
/**
|
113 |
* Get product final price
|
114 |
*
|
115 |
+
* @param double $qty
|
116 |
* @param Mage_Catalog_Model_Product $product
|
117 |
* @return double
|
118 |
*/
|
138 |
* Returns final price of a child product
|
139 |
*
|
140 |
* @param Mage_Catalog_Model_Product $product
|
141 |
+
* @param float $productQty
|
142 |
* @param Mage_Catalog_Model_Product $childProduct
|
143 |
+
* @param float $childProductQty
|
144 |
* @return decimal
|
145 |
*/
|
146 |
public function getChildFinalPrice($product, $productQty, $childProduct, $childProductQty)
|
155 |
* @see Mage_Bundle_Model_Product_Price::getTotalPrices()
|
156 |
*
|
157 |
* @param Mage_Catalog_Model_Product $product
|
158 |
+
* @param string $which
|
159 |
* @return decimal|array
|
160 |
*/
|
161 |
public function getPrices($product, $which = null)
|
170 |
* @see Mage_Bundle_Model_Product_Price::getTotalPrices()
|
171 |
*
|
172 |
* @param Mage_Catalog_Model_Product $product
|
173 |
+
* @param string $which
|
174 |
+
* @param bool|null $includeTax
|
175 |
* @return decimal|array
|
176 |
*/
|
177 |
public function getPricesDependingOnTax($product, $which = null, $includeTax = null)
|
183 |
* Retrieve Price considering tier price
|
184 |
*
|
185 |
* @param Mage_Catalog_Model_Product $product
|
186 |
+
* @param string|null $which
|
187 |
+
* @param bool|null $includeTax
|
188 |
+
* @param bool $takeTierPrice
|
189 |
* @return decimal|array
|
190 |
*/
|
191 |
public function getTotalPrices($product, $which = null, $includeTax = null, $takeTierPrice = true)
|
195 |
$taxHelper = $this->_getHelperData('tax');
|
196 |
|
197 |
if ($this->_isPricesCalculatedByIndex && !$includeTax) {
|
198 |
+
$minimalPrice = $taxHelper->getPrice($product, $product->getData('min_price'), $includeTax,
|
199 |
+
null, null, null, null, null, false);
|
200 |
+
$maximalPrice = $taxHelper->getPrice($product, $product->getData('max_price'), $includeTax,
|
201 |
+
null, null, null, null, null, false);
|
202 |
} else {
|
203 |
/**
|
204 |
* Check if product price is fixed
|
205 |
*/
|
206 |
$finalPrice = $product->getFinalPrice();
|
207 |
if ($isPriceFixedType) {
|
208 |
+
$minimalPrice = $maximalPrice = $taxHelper->getPrice($product, $finalPrice, $includeTax,
|
209 |
+
null, null, null, null, null, false);
|
210 |
} else { // PRICE_TYPE_DYNAMIC
|
211 |
$minimalPrice = $maximalPrice = 0;
|
212 |
}
|
230 |
}
|
231 |
}
|
232 |
|
233 |
+
$minimalPrice = $product->getStore()->roundPrice($minimalPrice);
|
234 |
+
$maximalPrice = $product->getStore()->roundPrice($maximalPrice);
|
235 |
+
|
236 |
if ('max' == $which) {
|
237 |
return $maximalPrice;
|
238 |
} elseif ('min' == $which) {
|
254 |
{
|
255 |
$options = $this->getOptions($product);
|
256 |
$minimalPrice = 0;
|
257 |
+
$minimalPriceWithTax = 0;
|
258 |
$hasRequiredOptions = $this->_hasRequiredOptions($product);
|
259 |
$selectionMinimalPrices = array();
|
260 |
+
$selectionMinimalPricesWithTax = array();
|
261 |
|
262 |
if (!$options) {
|
263 |
return $minimalPrice;
|
265 |
|
266 |
foreach ($options as $option) {
|
267 |
/* @var $option Mage_Bundle_Model_Option */
|
268 |
+
$selectionPrices = $this->_getSelectionPrices($product, $option, $takeTierPrice, $includeTax);
|
269 |
+
$selectionPricesWithTax = $this->_getSelectionPrices($product, $option, $takeTierPrice, true);
|
270 |
|
271 |
if (count($selectionPrices)) {
|
272 |
+
$selectionMinPrice = is_array($selectionPrices) ? min($selectionPrices) : $selectionPrices;
|
273 |
+
$selectMinPriceWithTax = is_array($selectionPricesWithTax) ?
|
274 |
+
min($selectionPricesWithTax) : $selectionPricesWithTax;
|
275 |
if ($option->getRequired()) {
|
276 |
$minimalPrice += $selectionMinPrice;
|
277 |
+
$minimalPriceWithTax += $selectMinPriceWithTax;
|
278 |
} elseif (!$hasRequiredOptions) {
|
279 |
$selectionMinimalPrices[] = $selectionMinPrice;
|
280 |
+
$selectionMinimalPricesWithTax[] = $selectMinPriceWithTax;
|
281 |
}
|
282 |
}
|
283 |
}
|
284 |
// condition is TRUE when all product options are NOT required
|
285 |
if (!$hasRequiredOptions) {
|
286 |
$minimalPrice = min($selectionMinimalPrices);
|
287 |
+
$minimalPriceWithTax = min($selectionMinimalPricesWithTax);
|
288 |
+
}
|
289 |
+
|
290 |
+
$taxConfig = $this->_getHelperData('tax')->getConfig();
|
291 |
+
|
292 |
+
//In the case of total base calculation we round the tax first and
|
293 |
+
//deduct the tax from the price including tax
|
294 |
+
if ($taxConfig->priceIncludesTax($product->getStore())
|
295 |
+
&& Mage_Tax_Model_Calculation::CALC_TOTAL_BASE ==
|
296 |
+
$taxConfig->getAlgorithm($product->getStore())
|
297 |
+
&& ($minimalPriceWithTax > $minimalPrice)
|
298 |
+
) {
|
299 |
+
//We convert the value to string to maintain the precision
|
300 |
+
$tax = (String)($minimalPriceWithTax - $minimalPrice);
|
301 |
+
$roundedTax = $this->_getApp()->getStore()->roundPrice($tax);
|
302 |
+
$minimalPrice = $minimalPriceWithTax - $roundedTax;
|
303 |
}
|
304 |
return $minimalPrice;
|
305 |
}
|
345 |
{
|
346 |
$selectionPrices = array();
|
347 |
$taxHelper = $this->_getHelperData('tax');
|
348 |
+
$taxCalcMethod = $taxHelper->getConfig()->getAlgorithm($product->getStore());
|
349 |
$isPriceFixedType = ($product->getPriceType() == self::PRICE_TYPE_FIXED);
|
350 |
|
351 |
$selections = $option->getSelections();
|
364 |
|
365 |
$item = $isPriceFixedType ? $product : $selection;
|
366 |
|
367 |
+
$selectionUnitPrice = $this->getSelectionFinalTotalPrice(
|
368 |
+
$product, $selection, 1, null, false, $takeTierPrice);
|
369 |
+
$selectionQty = $selection->getSelectionQty();
|
370 |
+
if ($isPriceFixedType || $taxCalcMethod == Mage_Tax_Model_Calculation::CALC_TOTAL_BASE) {
|
371 |
+
$selectionPrice = $selectionQty * $taxHelper->getPrice($item, $selectionUnitPrice, $includeTax,
|
372 |
+
null, null, null, null, null, false);
|
373 |
+
$selectionPrices[] = $selectionPrice;
|
374 |
+
} else if ($taxCalcMethod == Mage_Tax_Model_Calculation::CALC_ROW_BASE) {
|
375 |
+
$selectionPrice = $taxHelper->getPrice($item, $selectionUnitPrice * $selectionQty, $includeTax);
|
376 |
+
$selectionPrices[] = $selectionPrice;
|
377 |
+
} else { //dynamic price and Mage_Tax_Model_Calculation::CALC_UNIT_BASE
|
378 |
+
$selectionPrice = $taxHelper->getPrice($item, $selectionUnitPrice, $includeTax) * $selectionQty;
|
379 |
+
$selectionPrices[] = $selectionPrice;
|
380 |
+
}
|
381 |
}
|
382 |
return $selectionPrices;
|
383 |
}
|
435 |
*
|
436 |
* @param Mage_Catalog_Model_Product $bundleProduct
|
437 |
* @param Mage_Catalog_Model_Product $selectionProduct
|
438 |
+
* @param float|null $selectionQty
|
439 |
+
* @param null|bool $multiplyQty Whether to multiply selection's price by its quantity
|
440 |
* @return float
|
441 |
*/
|
442 |
public function getSelectionPrice($bundleProduct, $selectionProduct, $selectionQty = null, $multiplyQty = true)
|
449 |
*
|
450 |
* @param Mage_Catalog_Model_Product $bundleProduct
|
451 |
* @param Mage_Catalog_Model_Product $selectionProduct
|
452 |
+
* @param decimal $qty
|
453 |
* @return decimal
|
454 |
*/
|
455 |
public function getSelectionPreFinalPrice($bundleProduct, $selectionProduct, $qty = null)
|
465 |
*
|
466 |
* @param Mage_Catalog_Model_Product $bundleProduct
|
467 |
* @param Mage_Catalog_Model_Product $selectionProduct
|
468 |
+
* @param decimal $bundleQty
|
469 |
+
* @param decimal $selectionQty
|
470 |
+
* @param bool $multiplyQty
|
471 |
* @return decimal
|
472 |
*/
|
473 |
public function getSelectionFinalPrice($bundleProduct, $selectionProduct, $bundleQty, $selectionQty = null,
|
474 |
+
$multiplyQty = true)
|
475 |
{
|
476 |
return $this->getSelectionFinalTotalPrice($bundleProduct, $selectionProduct, $bundleQty, $selectionQty,
|
477 |
$multiplyQty);
|
483 |
*
|
484 |
* @param Mage_Catalog_Model_Product $bundleProduct
|
485 |
* @param Mage_Catalog_Model_Product $selectionProduct
|
486 |
+
* @param float $bundleQty
|
487 |
+
* @param float $selectionQty
|
488 |
+
* @param bool $multiplyQty
|
489 |
+
* @param bool $takeTierPrice
|
490 |
+
* @return float
|
491 |
*/
|
492 |
public function getSelectionFinalTotalPrice($bundleProduct, $selectionProduct, $bundleQty, $selectionQty,
|
493 |
+
$multiplyQty = true, $takeTierPrice = true)
|
494 |
{
|
495 |
if (is_null($selectionQty)) {
|
496 |
$selectionQty = $selectionProduct->getSelectionQty();
|
513 |
}
|
514 |
}
|
515 |
|
516 |
+
$price = $this->getLowestPrice($bundleProduct, $price, $bundleQty);
|
|
|
|
|
|
|
|
|
517 |
|
518 |
if ($multiplyQty) {
|
519 |
$price *= $selectionQty;
|
522 |
return $price;
|
523 |
}
|
524 |
|
525 |
+
/**
|
526 |
+
* Returns the lowest price after applying any applicable bundle discounts
|
527 |
+
*
|
528 |
+
* @param Mage_Catalog_Model_Product $bundleProduct
|
529 |
+
* @param float|string $price
|
530 |
+
* @param int $bundleQty
|
531 |
+
* @return float
|
532 |
+
*/
|
533 |
+
public function getLowestPrice($bundleProduct, $price, $bundleQty = 1)
|
534 |
+
{
|
535 |
+
$price *= 1;
|
536 |
+
return min($this->_getApp()->getStore()->roundPrice($price),
|
537 |
+
$this->_applyGroupPrice($bundleProduct, $price),
|
538 |
+
$this->_applyTierPrice($bundleProduct, $bundleQty, $price),
|
539 |
+
$this->_applySpecialPrice($bundleProduct, $price)
|
540 |
+
);
|
541 |
+
}
|
542 |
+
|
543 |
/**
|
544 |
* Apply group price for bundle product
|
545 |
*
|
554 |
|
555 |
if (is_numeric($groupPrice)) {
|
556 |
$groupPrice = $finalPrice - ($finalPrice * ($groupPrice / 100));
|
557 |
+
$groupPrice = $this->_getApp()->getStore()->roundPrice($groupPrice);
|
558 |
$result = min($finalPrice, $groupPrice);
|
559 |
}
|
560 |
|
601 |
* Apply tier price for bundle
|
602 |
*
|
603 |
* @param Mage_Catalog_Model_Product $product
|
604 |
+
* @param decimal $qty
|
605 |
+
* @param decimal $finalPrice
|
606 |
* @return decimal
|
607 |
*/
|
608 |
protected function _applyTierPrice($product, $qty, $finalPrice)
|
611 |
return $finalPrice;
|
612 |
}
|
613 |
|
614 |
+
$tierPrice = $product->getTierPrice($qty);
|
615 |
|
616 |
if (is_numeric($tierPrice)) {
|
617 |
$tierPrice = $finalPrice - ($finalPrice * ($tierPrice / 100));
|
618 |
+
$tierPrice = $this->_getApp()->getStore()->roundPrice($tierPrice);
|
619 |
$finalPrice = min($finalPrice, $tierPrice);
|
620 |
}
|
621 |
|
625 |
/**
|
626 |
* Get product tier price by qty
|
627 |
*
|
628 |
+
* @param decimal $qty
|
629 |
* @param Mage_Catalog_Model_Product $product
|
630 |
* @return decimal
|
631 |
*/
|
644 |
|
645 |
if (is_null($prices) || !is_array($prices)) {
|
646 |
if (!is_null($qty)) {
|
647 |
+
return 0;
|
648 |
}
|
649 |
return array(array(
|
650 |
+
'price' => 0,
|
651 |
+
'website_price' => 0,
|
652 |
+
'price_qty' => 1,
|
653 |
+
'cust_group' => $allGroups
|
654 |
));
|
655 |
}
|
656 |
|
679 |
}
|
680 |
|
681 |
if ($price['website_price'] > $prevPrice) {
|
682 |
+
$prevPrice = $price['website_price'];
|
683 |
+
$prevQty = $price['price_qty'];
|
684 |
+
$prevGroup = $price['cust_group'];
|
685 |
}
|
686 |
}
|
687 |
|
711 |
/**
|
712 |
* Calculate product price based on special price data and price rules
|
713 |
*
|
714 |
+
* @param float $basePrice
|
715 |
+
* @param float $specialPrice
|
716 |
+
* @param string $specialPriceFrom
|
717 |
+
* @param string $specialPriceTo
|
718 |
* @param float|null|false $rulePrice
|
719 |
+
* @param mixed $wId
|
720 |
+
* @param mixed $gId
|
721 |
+
* @param null|int $productId
|
722 |
* @return float
|
723 |
*/
|
724 |
public static function calculatePrice($basePrice, $specialPrice, $specialPriceFrom, $specialPriceTo,
|
725 |
+
$rulePrice = false, $wId = null, $gId = null, $productId = null)
|
726 |
{
|
727 |
$resource = Mage::getResourceSingleton('bundle/bundle');
|
728 |
$selectionResource = Mage::getResourceSingleton('bundle/selection');
|
772 |
$result['final_price'] = $selectionResource->getPriceFromIndex($result['product_id'], $qty, $store,
|
773 |
$gId);
|
774 |
|
775 |
+
$selectionPrice = $result['final_price'] * $qty;
|
776 |
|
777 |
if (isset($options[$result['option_id']])) {
|
778 |
$options[$result['option_id']] = min($options[$result['option_id']], $selectionPrice);
|
787 |
continue;
|
788 |
}
|
789 |
if ($result['selection_price_type']) {
|
790 |
+
$selectionPrice = $basePrice * $result['selection_price_value'] / 100;
|
791 |
} else {
|
792 |
$selectionPrice = $result['selection_price_value'];
|
793 |
}
|
800 |
$qty = $result['selection_qty'];
|
801 |
}
|
802 |
|
803 |
+
$selectionPrice = $selectionPrice * $qty;
|
804 |
|
805 |
if (isset($options[$result['option_id']])) {
|
806 |
$options[$result['option_id']] = min($options[$result['option_id']], $selectionPrice);
|
856 |
/**
|
857 |
* Calculate and apply special price
|
858 |
*
|
859 |
+
* @param float $finalPrice
|
860 |
+
* @param float $specialPrice
|
861 |
* @param string $specialPriceFrom
|
862 |
* @param string $specialPriceTo
|
863 |
+
* @param mixed $store
|
864 |
* @return float
|
865 |
*/
|
866 |
public static function calculateSpecialPrice($finalPrice, $specialPrice, $specialPriceFrom, $specialPriceTo,
|
867 |
+
$store = null)
|
868 |
{
|
869 |
if (!is_null($specialPrice) && $specialPrice != false) {
|
870 |
if (Mage::app()->getLocale()->isStoreDateInInterval($store, $specialPriceFrom, $specialPriceTo)) {
|
871 |
+
$specialPrice = Mage::app()->getStore()->roundPrice($finalPrice * $specialPrice / 100);
|
872 |
+
$finalPrice = min($finalPrice, $specialPrice);
|
873 |
}
|
874 |
}
|
875 |
|
897 |
return Mage::helper($name);
|
898 |
}
|
899 |
|
900 |
+
/**
|
901 |
+
* Get Magento App instance
|
902 |
+
*
|
903 |
+
* @return Mage_Core_Model_App
|
904 |
+
*/
|
905 |
+
protected function _getApp()
|
906 |
+
{
|
907 |
+
return Mage::app();
|
908 |
+
}
|
909 |
+
|
910 |
/**
|
911 |
* Check if product has required options
|
912 |
*
|
app/code/core/Mage/Catalog/Block/Product/Abstract.php
CHANGED
@@ -60,7 +60,7 @@ abstract class Mage_Catalog_Block_Product_Abstract extends Mage_Core_Block_Templ
|
|
60 |
*
|
61 |
* @var string
|
62 |
*/
|
63 |
-
protected $_tierPriceDefaultTemplate
|
64 |
|
65 |
/**
|
66 |
* Price types
|
@@ -198,7 +198,7 @@ abstract class Mage_Catalog_Block_Product_Abstract extends Mage_Core_Block_Templ
|
|
198 |
$stockItem = $product->getStockItem();
|
199 |
if ($stockItem) {
|
200 |
return ($stockItem->getMinSaleQty()
|
201 |
-
|
202 |
}
|
203 |
return null;
|
204 |
}
|
@@ -377,13 +377,15 @@ abstract class Mage_Catalog_Block_Product_Abstract extends Mage_Core_Block_Templ
|
|
377 |
|
378 |
return $this->getData('tier_price_template');
|
379 |
}
|
|
|
380 |
/**
|
381 |
* Returns product tier price block html
|
382 |
*
|
383 |
-
* @param Mage_Catalog_Model_Product $product
|
|
|
384 |
* @return string
|
385 |
*/
|
386 |
-
public function getTierPriceHtml($product = null)
|
387 |
{
|
388 |
if (is_null($product)) {
|
389 |
$product = $this->getProduct();
|
@@ -391,8 +393,22 @@ abstract class Mage_Catalog_Block_Product_Abstract extends Mage_Core_Block_Templ
|
|
391 |
return $this->_getPriceBlock($product->getTypeId())
|
392 |
->setTemplate($this->getTierPriceTemplate())
|
393 |
->setProduct($product)
|
394 |
-
->setInGrouped($
|
395 |
-
->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
396 |
}
|
397 |
|
398 |
/**
|
@@ -406,7 +422,7 @@ abstract class Mage_Catalog_Block_Product_Abstract extends Mage_Core_Block_Templ
|
|
406 |
if (is_null($product)) {
|
407 |
$product = $this->getProduct();
|
408 |
}
|
409 |
-
$prices
|
410 |
|
411 |
$res = array();
|
412 |
if (is_array($prices)) {
|
60 |
*
|
61 |
* @var string
|
62 |
*/
|
63 |
+
protected $_tierPriceDefaultTemplate = 'catalog/product/view/tierprices.phtml';
|
64 |
|
65 |
/**
|
66 |
* Price types
|
198 |
$stockItem = $product->getStockItem();
|
199 |
if ($stockItem) {
|
200 |
return ($stockItem->getMinSaleQty()
|
201 |
+
&& $stockItem->getMinSaleQty() > 0 ? $stockItem->getMinSaleQty() * 1 : null);
|
202 |
}
|
203 |
return null;
|
204 |
}
|
377 |
|
378 |
return $this->getData('tier_price_template');
|
379 |
}
|
380 |
+
|
381 |
/**
|
382 |
* Returns product tier price block html
|
383 |
*
|
384 |
+
* @param null|Mage_Catalog_Model_Product $product
|
385 |
+
* @param null|Mage_Catalog_Model_Product $parent
|
386 |
* @return string
|
387 |
*/
|
388 |
+
public function getTierPriceHtml($product = null, $parent = null)
|
389 |
{
|
390 |
if (is_null($product)) {
|
391 |
$product = $this->getProduct();
|
393 |
return $this->_getPriceBlock($product->getTypeId())
|
394 |
->setTemplate($this->getTierPriceTemplate())
|
395 |
->setProduct($product)
|
396 |
+
->setInGrouped($product->isGrouped())
|
397 |
+
->setParent($parent)
|
398 |
+
->callParentToHtml();
|
399 |
+
}
|
400 |
+
|
401 |
+
/*
|
402 |
+
* Calls the object's to Html method.
|
403 |
+
* This method exists to make the code more testable.
|
404 |
+
* By having a protected wrapper for the final method toHtml, we can 'mock' out this method
|
405 |
+
* when unit testing
|
406 |
+
*
|
407 |
+
* @return string
|
408 |
+
*/
|
409 |
+
protected function callParentToHtml()
|
410 |
+
{
|
411 |
+
return $this->toHtml();
|
412 |
}
|
413 |
|
414 |
/**
|
422 |
if (is_null($product)) {
|
423 |
$product = $this->getProduct();
|
424 |
}
|
425 |
+
$prices = $product->getFormatedTierPrice();
|
426 |
|
427 |
$res = array();
|
428 |
if (is_array($prices)) {
|
app/code/core/Mage/Catalog/Block/Product/Price.php
CHANGED
@@ -33,7 +33,18 @@
|
|
33 |
*/
|
34 |
class Mage_Catalog_Block_Product_Price extends Mage_Catalog_Block_Product_Abstract
|
35 |
{
|
|
|
|
|
|
|
|
|
|
|
36 |
protected $_priceDisplayType = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
protected $_idSuffix = '';
|
38 |
|
39 |
/**
|
@@ -50,17 +61,33 @@ class Mage_Catalog_Block_Product_Price extends Mage_Catalog_Block_Product_Abstra
|
|
50 |
return $product;
|
51 |
}
|
52 |
|
|
|
|
|
|
|
|
|
|
|
53 |
public function getDisplayMinimalPrice()
|
54 |
{
|
55 |
return $this->_getData('display_minimal_price');
|
56 |
}
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
public function setIdSuffix($idSuffix)
|
59 |
{
|
60 |
$this->_idSuffix = $idSuffix;
|
61 |
return $this;
|
62 |
}
|
63 |
|
|
|
|
|
|
|
|
|
|
|
64 |
public function getIdSuffix()
|
65 |
{
|
66 |
return $this->_idSuffix;
|
@@ -70,15 +97,22 @@ class Mage_Catalog_Block_Product_Price extends Mage_Catalog_Block_Product_Abstra
|
|
70 |
* Get tier prices (formatted)
|
71 |
*
|
72 |
* @param Mage_Catalog_Model_Product $product
|
|
|
73 |
* @return array
|
74 |
*/
|
75 |
-
public function getTierPrices($product = null)
|
76 |
{
|
77 |
if (is_null($product)) {
|
78 |
$product = $this->getProduct();
|
79 |
}
|
80 |
$prices = $product->getFormatedTierPrice();
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
$res = array();
|
83 |
if (is_array($prices)) {
|
84 |
foreach ($prices as $price) {
|
@@ -96,8 +130,15 @@ class Mage_Catalog_Block_Product_Price extends Mage_Catalog_Block_Product_Abstra
|
|
96 |
}
|
97 |
|
98 |
if ($price['price'] < $productPrice) {
|
|
|
99 |
$price['savePercent'] = ceil(100 - ((100 / $productPrice) * $price['price']));
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
$tierPrice = Mage::app()->getStore()->convertPrice(
|
102 |
Mage::helper('tax')->getPrice($product, $price['website_price'])
|
103 |
);
|
33 |
*/
|
34 |
class Mage_Catalog_Block_Product_Price extends Mage_Catalog_Block_Product_Abstract
|
35 |
{
|
36 |
+
/**
|
37 |
+
* Price display type
|
38 |
+
*
|
39 |
+
* @var int
|
40 |
+
*/
|
41 |
protected $_priceDisplayType = null;
|
42 |
+
|
43 |
+
/**
|
44 |
+
* The id suffix
|
45 |
+
*
|
46 |
+
* @var string
|
47 |
+
*/
|
48 |
protected $_idSuffix = '';
|
49 |
|
50 |
/**
|
61 |
return $product;
|
62 |
}
|
63 |
|
64 |
+
/**
|
65 |
+
* Returns the product's minimal price
|
66 |
+
*
|
67 |
+
* @return float
|
68 |
+
*/
|
69 |
public function getDisplayMinimalPrice()
|
70 |
{
|
71 |
return $this->_getData('display_minimal_price');
|
72 |
}
|
73 |
|
74 |
+
/**
|
75 |
+
* Sets the id suffix
|
76 |
+
*
|
77 |
+
* @param string $idSuffix
|
78 |
+
* @return Mage_Catalog_Block_Product_Price
|
79 |
+
*/
|
80 |
public function setIdSuffix($idSuffix)
|
81 |
{
|
82 |
$this->_idSuffix = $idSuffix;
|
83 |
return $this;
|
84 |
}
|
85 |
|
86 |
+
/**
|
87 |
+
* Returns the id suffix
|
88 |
+
*
|
89 |
+
* @return string
|
90 |
+
*/
|
91 |
public function getIdSuffix()
|
92 |
{
|
93 |
return $this->_idSuffix;
|
97 |
* Get tier prices (formatted)
|
98 |
*
|
99 |
* @param Mage_Catalog_Model_Product $product
|
100 |
+
* @param Mage_Catalog_Model_Product $parent
|
101 |
* @return array
|
102 |
*/
|
103 |
+
public function getTierPrices($product = null, $parent = null)
|
104 |
{
|
105 |
if (is_null($product)) {
|
106 |
$product = $this->getProduct();
|
107 |
}
|
108 |
$prices = $product->getFormatedTierPrice();
|
109 |
|
110 |
+
// if our parent is a bundle, then we need to further adjust our tier prices
|
111 |
+
if (isset($parent) && $parent->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_BUNDLE) {
|
112 |
+
/* @var $bundlePriceModel Mage_Bundle_Model_Product_Price */
|
113 |
+
$bundlePriceModel = Mage::getModel('bundle/product_price');
|
114 |
+
}
|
115 |
+
|
116 |
$res = array();
|
117 |
if (is_array($prices)) {
|
118 |
foreach ($prices as $price) {
|
130 |
}
|
131 |
|
132 |
if ($price['price'] < $productPrice) {
|
133 |
+
// use the original prices to determine the percent savings
|
134 |
$price['savePercent'] = ceil(100 - ((100 / $productPrice) * $price['price']));
|
135 |
|
136 |
+
// if applicable, adjust the tier prices
|
137 |
+
if (isset($bundlePriceModel)) {
|
138 |
+
$price['price'] = $bundlePriceModel->getLowestPrice($parent, $price['price']);
|
139 |
+
$price['website_price'] = $bundlePriceModel->getLowestPrice($parent, $price['website_price']);
|
140 |
+
}
|
141 |
+
|
142 |
$tierPrice = Mage::app()->getStore()->convertPrice(
|
143 |
Mage::helper('tax')->getPrice($product, $price['website_price'])
|
144 |
);
|
app/code/core/Mage/Catalog/Block/Product/View.php
CHANGED
@@ -153,8 +153,15 @@ class Mage_Catalog_Block_Product_View extends Mage_Catalog_Block_Product_Abstrac
|
|
153 |
|
154 |
$_regularPrice = $product->getPrice();
|
155 |
$_finalPrice = $product->getFinalPrice();
|
156 |
-
|
157 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
$_tierPrices = array();
|
159 |
$_tierPricesInclTax = array();
|
160 |
foreach ($product->getTierPrice() as $tierPrice) {
|
153 |
|
154 |
$_regularPrice = $product->getPrice();
|
155 |
$_finalPrice = $product->getFinalPrice();
|
156 |
+
if ($product->getTypeId() == Mage_Catalog_Model_Product_Type::TYPE_BUNDLE) {
|
157 |
+
$_priceInclTax = Mage::helper('tax')->getPrice($product, $_finalPrice, true,
|
158 |
+
null, null, null, null, null, false);
|
159 |
+
$_priceExclTax = Mage::helper('tax')->getPrice($product, $_finalPrice, false,
|
160 |
+
null, null, null, null, null, false);
|
161 |
+
} else {
|
162 |
+
$_priceInclTax = Mage::helper('tax')->getPrice($product, $_finalPrice, true);
|
163 |
+
$_priceExclTax = Mage::helper('tax')->getPrice($product, $_finalPrice);
|
164 |
+
}
|
165 |
$_tierPrices = array();
|
166 |
$_tierPricesInclTax = array();
|
167 |
foreach ($product->getTierPrice() as $tierPrice) {
|
app/code/core/Mage/Catalog/Helper/Product/Compare.php
CHANGED
@@ -102,7 +102,8 @@ class Mage_Catalog_Helper_Product_Compare extends Mage_Core_Helper_Url
|
|
102 |
{
|
103 |
return array(
|
104 |
'product' => $product->getId(),
|
105 |
-
Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED => $this->getEncodedUrl()
|
|
|
106 |
);
|
107 |
}
|
108 |
|
102 |
{
|
103 |
return array(
|
104 |
'product' => $product->getId(),
|
105 |
+
Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED => $this->getEncodedUrl(),
|
106 |
+
Mage_Core_Model_Url::FORM_KEY => $this->_getSingletonModel('core/session')->getFormKey()
|
107 |
);
|
108 |
}
|
109 |
|
app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Source.php
CHANGED
@@ -211,7 +211,8 @@ class Mage_Catalog_Model_Resource_Product_Indexer_Eav_Source
|
|
211 |
'pvs.entity_id = pvd.entity_id AND pvs.attribute_id = pvd.attribute_id'
|
212 |
. ' AND pvs.store_id=cs.store_id',
|
213 |
array('value' => $productValueExpression))
|
214 |
-
->where('pvd.store_id=?',
|
|
|
215 |
->where('cs.store_id!=?', Mage_Catalog_Model_Abstract::DEFAULT_STORE_ID)
|
216 |
->where('pvd.attribute_id IN(?)', $attrIds);
|
217 |
|
211 |
'pvs.entity_id = pvd.entity_id AND pvs.attribute_id = pvd.attribute_id'
|
212 |
. ' AND pvs.store_id=cs.store_id',
|
213 |
array('value' => $productValueExpression))
|
214 |
+
->where('pvd.store_id=?',
|
215 |
+
$adapter->getIfNullSql('pvs.store_id', Mage_Catalog_Model_Abstract::DEFAULT_STORE_ID))
|
216 |
->where('cs.store_id!=?', Mage_Catalog_Model_Abstract::DEFAULT_STORE_ID)
|
217 |
->where('pvd.attribute_id IN(?)', $attrIds);
|
218 |
|
app/code/core/Mage/Catalog/Model/Resource/Product/Option/Value.php
CHANGED
@@ -227,7 +227,7 @@ class Mage_Catalog_Model_Resource_Product_Option_Value extends Mage_Core_Model_R
|
|
227 |
}
|
228 |
} else if ($object->getData('scope', 'title')) {
|
229 |
$where = array(
|
230 |
-
'option_type_id = ?' => (int)$
|
231 |
'store_id = ?' => (int)$object->getStoreId()
|
232 |
);
|
233 |
$this->_getWriteAdapter()->delete($titleTable, $where);
|
@@ -317,7 +317,7 @@ class Mage_Catalog_Model_Resource_Product_Option_Value extends Mage_Core_Model_R
|
|
317 |
foreach ($valueCond as $oldTypeId => $newTypeId) {
|
318 |
// price
|
319 |
$priceTable = $this->getTable('catalog/product_option_type_price');
|
320 |
-
$columns= array(
|
321 |
new Zend_Db_Expr($newTypeId),
|
322 |
'store_id', 'price', 'price_type'
|
323 |
);
|
@@ -332,7 +332,7 @@ class Mage_Catalog_Model_Resource_Product_Option_Value extends Mage_Core_Model_R
|
|
332 |
|
333 |
// title
|
334 |
$titleTable = $this->getTable('catalog/product_option_type_title');
|
335 |
-
$columns= array(
|
336 |
new Zend_Db_Expr($newTypeId),
|
337 |
'store_id', 'title'
|
338 |
);
|
227 |
}
|
228 |
} else if ($object->getData('scope', 'title')) {
|
229 |
$where = array(
|
230 |
+
'option_type_id = ?' => (int)$object->getId(),
|
231 |
'store_id = ?' => (int)$object->getStoreId()
|
232 |
);
|
233 |
$this->_getWriteAdapter()->delete($titleTable, $where);
|
317 |
foreach ($valueCond as $oldTypeId => $newTypeId) {
|
318 |
// price
|
319 |
$priceTable = $this->getTable('catalog/product_option_type_price');
|
320 |
+
$columns = array(
|
321 |
new Zend_Db_Expr($newTypeId),
|
322 |
'store_id', 'price', 'price_type'
|
323 |
);
|
332 |
|
333 |
// title
|
334 |
$titleTable = $this->getTable('catalog/product_option_type_title');
|
335 |
+
$columns = array(
|
336 |
new Zend_Db_Expr($newTypeId),
|
337 |
'store_id', 'title'
|
338 |
);
|
app/code/core/Mage/Catalog/Model/Resource/Product/Status.php
CHANGED
@@ -70,7 +70,8 @@ class Mage_Catalog_Model_Resource_Product_Status extends Mage_Core_Model_Resourc
|
|
70 |
protected function _getProductAttribute($attribute)
|
71 |
{
|
72 |
if (empty($this->_productAttributes[$attribute])) {
|
73 |
-
$this->_productAttributes[$attribute] =
|
|
|
74 |
}
|
75 |
return $this->_productAttributes[$attribute];
|
76 |
}
|
@@ -129,12 +130,6 @@ class Mage_Catalog_Model_Resource_Product_Status extends Mage_Core_Model_Resourc
|
|
129 |
->where('store_id = :store_id')
|
130 |
->where('entity_id = :product_id');
|
131 |
|
132 |
-
$binds = array(
|
133 |
-
'attribute_id' => $statusAttributeId,
|
134 |
-
'store_id' => $storeId,
|
135 |
-
'product_id' => $productId
|
136 |
-
);
|
137 |
-
|
138 |
$row = $adapter->fetchRow($select);
|
139 |
|
140 |
if ($row) {
|
@@ -189,11 +184,12 @@ class Mage_Catalog_Model_Resource_Product_Status extends Mage_Core_Model_Resourc
|
|
189 |
$select = $adapter->select()
|
190 |
->from(
|
191 |
array('t1' => $attributeTable),
|
192 |
-
array('value' => $valueCheckSql))
|
193 |
->joinLeft(
|
194 |
array('t2' => $attributeTable),
|
195 |
-
't1.entity_id = t2.entity_id AND t1.attribute_id = t2.attribute_id AND t2.store_id = '
|
196 |
-
|
|
|
197 |
)
|
198 |
->where('t1.store_id = ?', Mage_Core_Model_App::ADMIN_STORE_ID)
|
199 |
->where('t1.attribute_id = ?', $attribute->getAttributeId())
|
70 |
protected function _getProductAttribute($attribute)
|
71 |
{
|
72 |
if (empty($this->_productAttributes[$attribute])) {
|
73 |
+
$this->_productAttributes[$attribute] =
|
74 |
+
Mage::getSingleton('catalog/product')->getResource()->getAttribute($attribute);
|
75 |
}
|
76 |
return $this->_productAttributes[$attribute];
|
77 |
}
|
130 |
->where('store_id = :store_id')
|
131 |
->where('entity_id = :product_id');
|
132 |
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
$row = $adapter->fetchRow($select);
|
134 |
|
135 |
if ($row) {
|
184 |
$select = $adapter->select()
|
185 |
->from(
|
186 |
array('t1' => $attributeTable),
|
187 |
+
array('entity_id' => 't1.entity_id', 'value' => $valueCheckSql))
|
188 |
->joinLeft(
|
189 |
array('t2' => $attributeTable),
|
190 |
+
't1.entity_id = t2.entity_id AND t1.attribute_id = t2.attribute_id AND t2.store_id = '
|
191 |
+
. (int)$storeId,
|
192 |
+
array('')
|
193 |
)
|
194 |
->where('t1.store_id = ?', Mage_Core_Model_App::ADMIN_STORE_ID)
|
195 |
->where('t1.attribute_id = ?', $attribute->getAttributeId())
|
app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable.php
CHANGED
@@ -220,7 +220,7 @@ class Mage_Catalog_Model_Resource_Product_Type_Configurable extends Mage_Core_Mo
|
|
220 |
array()
|
221 |
)->where('super_attribute.product_id = ?', $product->getId());
|
222 |
|
223 |
-
$attributesOptionsData[$superAttribute->getAttributeId()] = $this->_getReadAdapter()->
|
224 |
}
|
225 |
return $attributesOptionsData;
|
226 |
}
|
220 |
array()
|
221 |
)->where('super_attribute.product_id = ?', $product->getId());
|
222 |
|
223 |
+
$attributesOptionsData[$superAttribute->getAttributeId()] = $this->_getReadAdapter()->fetchAll($select);
|
224 |
}
|
225 |
return $attributesOptionsData;
|
226 |
}
|
app/code/core/Mage/Catalog/controllers/Product/CompareController.php
CHANGED
@@ -74,6 +74,11 @@ class Mage_Catalog_Product_CompareController extends Mage_Core_Controller_Front_
|
|
74 |
*/
|
75 |
public function addAction()
|
76 |
{
|
|
|
|
|
|
|
|
|
|
|
77 |
$productId = (int) $this->getRequest()->getParam('product');
|
78 |
if ($productId
|
79 |
&& (Mage::getSingleton('log/visitor')->getId() || Mage::getSingleton('customer/session')->isLoggedIn())
|
74 |
*/
|
75 |
public function addAction()
|
76 |
{
|
77 |
+
if (!$this->_validateFormKey()) {
|
78 |
+
$this->_redirectReferer();
|
79 |
+
return;
|
80 |
+
}
|
81 |
+
|
82 |
$productId = (int) $this->getRequest()->getParam('product');
|
83 |
if ($productId
|
84 |
&& (Mage::getSingleton('log/visitor')->getId() || Mage::getSingleton('customer/session')->isLoggedIn())
|
app/code/core/Mage/Catalog/etc/wsi.xml
CHANGED
@@ -347,8 +347,8 @@
|
|
347 |
</xsd:complexType>
|
348 |
<xsd:complexType name="catalogProductAttributeFrontendLabelEntity">
|
349 |
<xsd:sequence>
|
350 |
-
<element name="store_id" type="xsd:string"
|
351 |
-
<element name="label" type="xsd:string"
|
352 |
</xsd:sequence>
|
353 |
</xsd:complexType>
|
354 |
<xsd:complexType name="catalogProductAttributeFrontendLabelArray">
|
347 |
</xsd:complexType>
|
348 |
<xsd:complexType name="catalogProductAttributeFrontendLabelEntity">
|
349 |
<xsd:sequence>
|
350 |
+
<xsd:element name="store_id" type="xsd:string"/>
|
351 |
+
<xsd:element name="label" type="xsd:string"/>
|
352 |
</xsd:sequence>
|
353 |
</xsd:complexType>
|
354 |
<xsd:complexType name="catalogProductAttributeFrontendLabelArray">
|
app/code/core/Mage/CatalogInventory/Model/Observer.php
CHANGED
@@ -50,6 +50,11 @@ class Mage_CatalogInventory_Model_Observer
|
|
50 |
*/
|
51 |
protected $_checkedQuoteItems = array();
|
52 |
|
|
|
|
|
|
|
|
|
|
|
53 |
protected $_itemsForReindex = array();
|
54 |
|
55 |
/**
|
@@ -174,9 +179,10 @@ class Mage_CatalogInventory_Model_Observer
|
|
174 |
'use_config_min_sale_qty' => 1,
|
175 |
'use_config_max_sale_qty' => 1,
|
176 |
'use_config_backorders' => 1,
|
177 |
-
'use_config_notify_stock_qty'=> 1
|
178 |
);
|
179 |
-
|
|
|
180 |
$stockData += array(
|
181 |
'use_config_enable_qty_inc' => $currentStockItem->getData('use_config_enable_qty_inc'),
|
182 |
'enable_qty_increments' => $currentStockItem->getData('enable_qty_increments'),
|
@@ -339,7 +345,8 @@ class Mage_CatalogInventory_Model_Observer
|
|
339 |
/**
|
340 |
* Check item for options
|
341 |
*/
|
342 |
-
|
|
|
343 |
$qty = $quoteItem->getProduct()->getTypeInstance(true)->prepareQuoteItemQty($qty, $quoteItem->getProduct());
|
344 |
$quoteItem->setData('qty', $qty);
|
345 |
|
@@ -367,6 +374,7 @@ class Mage_CatalogInventory_Model_Observer
|
|
367 |
}
|
368 |
}
|
369 |
|
|
|
370 |
foreach ($options as $option) {
|
371 |
$optionValue = $option->getValue();
|
372 |
/* @var $option Mage_Sales_Model_Quote_Item_Option */
|
@@ -426,6 +434,7 @@ class Mage_CatalogInventory_Model_Observer
|
|
426 |
|
427 |
if ($result->getHasError()) {
|
428 |
$option->setHasError(true);
|
|
|
429 |
|
430 |
$quoteItem->addErrorInfo(
|
431 |
'cataloginventory',
|
@@ -439,7 +448,7 @@ class Mage_CatalogInventory_Model_Observer
|
|
439 |
Mage_CatalogInventory_Helper_Data::ERROR_QTY,
|
440 |
$result->getQuoteMessage()
|
441 |
);
|
442 |
-
}
|
443 |
// Delete error from item and its quote, if it was set due to qty lack
|
444 |
$this->_removeErrorsFromQuoteAndItem($quoteItem, Mage_CatalogInventory_Helper_Data::ERROR_QTY);
|
445 |
}
|
@@ -727,7 +736,7 @@ class Mage_CatalogInventory_Model_Observer
|
|
727 |
}
|
728 |
}
|
729 |
|
730 |
-
if(
|
731 |
Mage::getResourceSingleton('cataloginventory/indexer_stock')->reindexProducts($productIds);
|
732 |
}
|
733 |
|
@@ -773,8 +782,8 @@ class Mage_CatalogInventory_Model_Observer
|
|
773 |
$items[$item->getProductId()]['qty'] += $qty;
|
774 |
} else {
|
775 |
$items[$item->getProductId()] = array(
|
776 |
-
'qty'
|
777 |
-
'item'=> null,
|
778 |
);
|
779 |
}
|
780 |
}
|
@@ -795,7 +804,8 @@ class Mage_CatalogInventory_Model_Observer
|
|
795 |
$children = $item->getChildrenItems();
|
796 |
$qty = $item->getQtyOrdered() - max($item->getQtyShipped(), $item->getQtyInvoiced()) - $item->getQtyCanceled();
|
797 |
|
798 |
-
|
|
|
799 |
Mage::getSingleton('cataloginventory/stock')->backItemQty($productId, $qty);
|
800 |
}
|
801 |
|
50 |
*/
|
51 |
protected $_checkedQuoteItems = array();
|
52 |
|
53 |
+
/**
|
54 |
+
* Array of items that need to be reindexed
|
55 |
+
*
|
56 |
+
* @var array
|
57 |
+
*/
|
58 |
protected $_itemsForReindex = array();
|
59 |
|
60 |
/**
|
179 |
'use_config_min_sale_qty' => 1,
|
180 |
'use_config_max_sale_qty' => 1,
|
181 |
'use_config_backorders' => 1,
|
182 |
+
'use_config_notify_stock_qty' => 1
|
183 |
);
|
184 |
+
$currentStockItem = $currentProduct->getStockItem();
|
185 |
+
if ($currentStockItem) {
|
186 |
$stockData += array(
|
187 |
'use_config_enable_qty_inc' => $currentStockItem->getData('use_config_enable_qty_inc'),
|
188 |
'enable_qty_increments' => $currentStockItem->getData('enable_qty_increments'),
|
345 |
/**
|
346 |
* Check item for options
|
347 |
*/
|
348 |
+
$options = $quoteItem->getQtyOptions();
|
349 |
+
if ($options && $qty > 0) {
|
350 |
$qty = $quoteItem->getProduct()->getTypeInstance(true)->prepareQuoteItemQty($qty, $quoteItem->getProduct());
|
351 |
$quoteItem->setData('qty', $qty);
|
352 |
|
374 |
}
|
375 |
}
|
376 |
|
377 |
+
$quoteItemHasErrors = false;
|
378 |
foreach ($options as $option) {
|
379 |
$optionValue = $option->getValue();
|
380 |
/* @var $option Mage_Sales_Model_Quote_Item_Option */
|
434 |
|
435 |
if ($result->getHasError()) {
|
436 |
$option->setHasError(true);
|
437 |
+
$quoteItemHasErrors = true;
|
438 |
|
439 |
$quoteItem->addErrorInfo(
|
440 |
'cataloginventory',
|
448 |
Mage_CatalogInventory_Helper_Data::ERROR_QTY,
|
449 |
$result->getQuoteMessage()
|
450 |
);
|
451 |
+
} elseif (!$quoteItemHasErrors) {
|
452 |
// Delete error from item and its quote, if it was set due to qty lack
|
453 |
$this->_removeErrorsFromQuoteAndItem($quoteItem, Mage_CatalogInventory_Helper_Data::ERROR_QTY);
|
454 |
}
|
736 |
}
|
737 |
}
|
738 |
|
739 |
+
if (count($productIds)) {
|
740 |
Mage::getResourceSingleton('cataloginventory/indexer_stock')->reindexProducts($productIds);
|
741 |
}
|
742 |
|
782 |
$items[$item->getProductId()]['qty'] += $qty;
|
783 |
} else {
|
784 |
$items[$item->getProductId()] = array(
|
785 |
+
'qty' => $qty,
|
786 |
+
'item' => null,
|
787 |
);
|
788 |
}
|
789 |
}
|
804 |
$children = $item->getChildrenItems();
|
805 |
$qty = $item->getQtyOrdered() - max($item->getQtyShipped(), $item->getQtyInvoiced()) - $item->getQtyCanceled();
|
806 |
|
807 |
+
$productId = $item->getProductId();
|
808 |
+
if ($item->getId() && $productId && empty($children) && $qty) {
|
809 |
Mage::getSingleton('cataloginventory/stock')->backItemQty($productId, $qty);
|
810 |
}
|
811 |
|
app/code/core/Mage/CatalogRule/Model/Resource/Rule.php
CHANGED
@@ -246,7 +246,7 @@ class Mage_CatalogRule_Model_Resource_Rule extends Mage_Rule_Model_Resource_Abst
|
|
246 |
));
|
247 |
|
248 |
if (count($productIds) > 0) {
|
249 |
-
$selectByStore->where('p.entity_id IN (?)', $productIds);
|
250 |
}
|
251 |
|
252 |
$selects = $write->selectsByRange('entity_id', $selectByStore, self::RANGE_PRODUCT_STEP);
|
246 |
));
|
247 |
|
248 |
if (count($productIds) > 0) {
|
249 |
+
$selectByStore->where('p.entity_id IN (?)', array_keys($productIds));
|
250 |
}
|
251 |
|
252 |
$selects = $write->selectsByRange('entity_id', $selectByStore, self::RANGE_PRODUCT_STEP);
|
app/code/core/Mage/CatalogRule/Model/Rule/Condition/Product.php
CHANGED
@@ -89,11 +89,13 @@ class Mage_CatalogRule_Model_Rule_Condition_Product extends Mage_Rule_Model_Cond
|
|
89 |
*/
|
90 |
protected function _getAttributeValue($object)
|
91 |
{
|
|
|
92 |
$storeId = $object->getStoreId();
|
93 |
$defaultStoreId = Mage_Core_Model_App::ADMIN_STORE_ID;
|
94 |
$productValues = isset($this->_entityAttributeValues[$object->getId()])
|
95 |
? $this->_entityAttributeValues[$object->getId()] : array();
|
96 |
-
$defaultValue = isset($productValues[$defaultStoreId])
|
|
|
97 |
$value = isset($productValues[$storeId]) ? $productValues[$storeId] : $defaultValue;
|
98 |
|
99 |
$value = $this->_prepareDatetimeValue($value, $object);
|
89 |
*/
|
90 |
protected function _getAttributeValue($object)
|
91 |
{
|
92 |
+
$attrCode = $this->getAttribute();
|
93 |
$storeId = $object->getStoreId();
|
94 |
$defaultStoreId = Mage_Core_Model_App::ADMIN_STORE_ID;
|
95 |
$productValues = isset($this->_entityAttributeValues[$object->getId()])
|
96 |
? $this->_entityAttributeValues[$object->getId()] : array();
|
97 |
+
$defaultValue = isset($productValues[$defaultStoreId])
|
98 |
+
? $productValues[$defaultStoreId] : $object->getData($attrCode);
|
99 |
$value = isset($productValues[$storeId]) ? $productValues[$storeId] : $defaultValue;
|
100 |
|
101 |
$value = $this->_prepareDatetimeValue($value, $object);
|
app/code/core/Mage/CatalogSearch/Helper/Data.php
CHANGED
@@ -31,7 +31,14 @@
|
|
31 |
*/
|
32 |
class Mage_CatalogSearch_Helper_Data extends Mage_Core_Helper_Abstract
|
33 |
{
|
|
|
|
|
|
|
34 |
const QUERY_VAR_NAME = 'q';
|
|
|
|
|
|
|
|
|
35 |
const MAX_QUERY_LEN = 200;
|
36 |
|
37 |
/**
|
@@ -166,7 +173,7 @@ class Mage_CatalogSearch_Helper_Data extends Mage_Core_Helper_Abstract
|
|
166 |
{
|
167 |
return $this->_getUrl('catalogsearch/result', array(
|
168 |
'_query' => array(self::QUERY_VAR_NAME => $query),
|
169 |
-
'_secure' =>
|
170 |
));
|
171 |
}
|
172 |
|
@@ -178,10 +185,20 @@ class Mage_CatalogSearch_Helper_Data extends Mage_Core_Helper_Abstract
|
|
178 |
public function getSuggestUrl()
|
179 |
{
|
180 |
return $this->_getUrl('catalogsearch/ajax/suggest', array(
|
181 |
-
'_secure' =>
|
182 |
));
|
183 |
}
|
184 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
185 |
/**
|
186 |
* Retrieve search term url
|
187 |
*
|
31 |
*/
|
32 |
class Mage_CatalogSearch_Helper_Data extends Mage_Core_Helper_Abstract
|
33 |
{
|
34 |
+
/**
|
35 |
+
* Query variable name
|
36 |
+
*/
|
37 |
const QUERY_VAR_NAME = 'q';
|
38 |
+
|
39 |
+
/*
|
40 |
+
* Maximum query length
|
41 |
+
*/
|
42 |
const MAX_QUERY_LEN = 200;
|
43 |
|
44 |
/**
|
173 |
{
|
174 |
return $this->_getUrl('catalogsearch/result', array(
|
175 |
'_query' => array(self::QUERY_VAR_NAME => $query),
|
176 |
+
'_secure' => $this->_getApp()->getFrontController()->getRequest()->isSecure()
|
177 |
));
|
178 |
}
|
179 |
|
185 |
public function getSuggestUrl()
|
186 |
{
|
187 |
return $this->_getUrl('catalogsearch/ajax/suggest', array(
|
188 |
+
'_secure' => $this->_getApp()->getStore()->isCurrentlySecure()
|
189 |
));
|
190 |
}
|
191 |
|
192 |
+
/**
|
193 |
+
* Get App
|
194 |
+
*
|
195 |
+
* @return Mage_Core_Model_App
|
196 |
+
*/
|
197 |
+
protected function _getApp()
|
198 |
+
{
|
199 |
+
return Mage::app();
|
200 |
+
}
|
201 |
+
|
202 |
/**
|
203 |
* Retrieve search term url
|
204 |
*
|
app/code/core/Mage/Checkout/Block/Cart/Item/Renderer.php
CHANGED
@@ -442,6 +442,9 @@ class Mage_Checkout_Block_Cart_Item_Renderer extends Mage_Core_Block_Template
|
|
442 |
*/
|
443 |
public function getCacheTags()
|
444 |
{
|
445 |
-
|
|
|
|
|
|
|
446 |
}
|
447 |
}
|
442 |
*/
|
443 |
public function getCacheTags()
|
444 |
{
|
445 |
+
$tags = $this->getProduct()->getCacheIdTags();
|
446 |
+
$tags = is_array($tags) ? $tags : array();
|
447 |
+
|
448 |
+
return array_merge(parent::getCacheTags(), $tags);
|
449 |
}
|
450 |
}
|
app/code/core/Mage/Checkout/Helper/Data.php
CHANGED
@@ -93,6 +93,7 @@ class Mage_Checkout_Helper_Data extends Mage_Core_Helper_Abstract
|
|
93 |
|
94 |
/**
|
95 |
* Get sales item (quote item, order item etc) price including tax based on row total and tax amount
|
|
|
96 |
*
|
97 |
* @param Varien_Object $item
|
98 |
* @return float
|
@@ -103,9 +104,9 @@ class Mage_Checkout_Helper_Data extends Mage_Core_Helper_Abstract
|
|
103 |
return $item->getPriceInclTax();
|
104 |
}
|
105 |
$qty = ($item->getQty() ? $item->getQty() : ($item->getQtyOrdered() ? $item->getQtyOrdered() : 1));
|
106 |
-
|
107 |
-
|
108 |
-
return
|
109 |
}
|
110 |
|
111 |
/**
|
@@ -119,21 +120,46 @@ class Mage_Checkout_Helper_Data extends Mage_Core_Helper_Abstract
|
|
119 |
if ($item->getRowTotalInclTax()) {
|
120 |
return $item->getRowTotalInclTax();
|
121 |
}
|
122 |
-
|
|
|
|
|
|
|
123 |
return $item->getRowTotal() + $tax;
|
124 |
}
|
125 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
public function getBasePriceInclTax($item)
|
127 |
{
|
128 |
$qty = ($item->getQty() ? $item->getQty() : ($item->getQtyOrdered() ? $item->getQtyOrdered() : 1));
|
129 |
-
|
130 |
-
|
131 |
-
return Mage::app()->getStore()->roundPrice($price);
|
132 |
}
|
133 |
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
public function getBaseSubtotalInclTax($item)
|
135 |
{
|
136 |
-
$tax = $item->getBaseTaxAmount() + $item->getBaseDiscountTaxCompensation()
|
|
|
137 |
return $item->getBaseRowTotal()+$tax;
|
138 |
}
|
139 |
|
@@ -193,32 +219,32 @@ class Mage_Checkout_Helper_Data extends Mage_Core_Helper_Abstract
|
|
193 |
foreach ($checkout->getAllVisibleItems() as $_item) {
|
194 |
/* @var $_item Mage_Sales_Model_Quote_Item */
|
195 |
$items .= $_item->getProduct()->getName() . ' x '. $_item->getQty() . ' '
|
196 |
-
|
197 |
-
|
198 |
}
|
199 |
$total = $checkout->getStoreCurrencyCode() . ' ' . $checkout->getGrandTotal();
|
200 |
|
201 |
foreach ($sendTo as $recipient) {
|
202 |
$mailTemplate->setDesignConfig(array('area'=>'frontend', 'store'=>$checkout->getStoreId()))
|
203 |
->sendTransactional(
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
}
|
223 |
|
224 |
$translate->setTranslateInline(true);
|
@@ -255,7 +281,7 @@ class Mage_Checkout_Helper_Data extends Mage_Core_Helper_Abstract
|
|
255 |
&& (($quote->getItemsSummaryQty() - $quote->getItemVirtualQty()) > 0)
|
256 |
&& ($quote->getItemsSummaryQty() <= $maximunQty)
|
257 |
&& !$quote->hasNominalItems()
|
258 |
-
|
259 |
}
|
260 |
|
261 |
/**
|
93 |
|
94 |
/**
|
95 |
* Get sales item (quote item, order item etc) price including tax based on row total and tax amount
|
96 |
+
* excluding weee tax
|
97 |
*
|
98 |
* @param Varien_Object $item
|
99 |
* @return float
|
104 |
return $item->getPriceInclTax();
|
105 |
}
|
106 |
$qty = ($item->getQty() ? $item->getQty() : ($item->getQtyOrdered() ? $item->getQtyOrdered() : 1));
|
107 |
+
|
108 |
+
//Unit price is rowtotal/qty
|
109 |
+
return $qty > 0 ? $this->getSubtotalInclTax($item)/$qty :0;
|
110 |
}
|
111 |
|
112 |
/**
|
120 |
if ($item->getRowTotalInclTax()) {
|
121 |
return $item->getRowTotalInclTax();
|
122 |
}
|
123 |
+
//Since tax amount contains weee tax
|
124 |
+
$tax = $item->getTaxAmount() + $item->getDiscountTaxCompensation()
|
125 |
+
- $this->_getWeeeHelper()->getTotalRowTaxAppliedForWeeeTax($item);;
|
126 |
+
|
127 |
return $item->getRowTotal() + $tax;
|
128 |
}
|
129 |
|
130 |
+
/**
|
131 |
+
* Returns the helper for weee
|
132 |
+
*
|
133 |
+
* @return Mage_Weee_Helper_Data
|
134 |
+
*/
|
135 |
+
protected function _getWeeeHelper()
|
136 |
+
{
|
137 |
+
return Mage::helper('weee');
|
138 |
+
}
|
139 |
+
|
140 |
+
/**
|
141 |
+
* Get the base price of the item including tax , excluding weee
|
142 |
+
*
|
143 |
+
* @param Varien_Object $item
|
144 |
+
* @return float
|
145 |
+
*/
|
146 |
public function getBasePriceInclTax($item)
|
147 |
{
|
148 |
$qty = ($item->getQty() ? $item->getQty() : ($item->getQtyOrdered() ? $item->getQtyOrdered() : 1));
|
149 |
+
|
150 |
+
return $qty > 0 ? $this->getBaseSubtotalInclTax($item) / $qty : 0;
|
|
|
151 |
}
|
152 |
|
153 |
+
/**
|
154 |
+
* Get sales item (quote item, order item etc) row total price including tax excluding wee
|
155 |
+
*
|
156 |
+
* @param Varien_Object $item
|
157 |
+
* @return float
|
158 |
+
*/
|
159 |
public function getBaseSubtotalInclTax($item)
|
160 |
{
|
161 |
+
$tax = $item->getBaseTaxAmount() + $item->getBaseDiscountTaxCompensation()
|
162 |
+
- $this->_getWeeeHelper()->getBaseTotalRowTaxAppliedForWeeeTax($item);
|
163 |
return $item->getBaseRowTotal()+$tax;
|
164 |
}
|
165 |
|
219 |
foreach ($checkout->getAllVisibleItems() as $_item) {
|
220 |
/* @var $_item Mage_Sales_Model_Quote_Item */
|
221 |
$items .= $_item->getProduct()->getName() . ' x '. $_item->getQty() . ' '
|
222 |
+
. $checkout->getStoreCurrencyCode() . ' '
|
223 |
+
. $_item->getProduct()->getFinalPrice($_item->getQty()) . "\n";
|
224 |
}
|
225 |
$total = $checkout->getStoreCurrencyCode() . ' ' . $checkout->getGrandTotal();
|
226 |
|
227 |
foreach ($sendTo as $recipient) {
|
228 |
$mailTemplate->setDesignConfig(array('area'=>'frontend', 'store'=>$checkout->getStoreId()))
|
229 |
->sendTransactional(
|
230 |
+
$template,
|
231 |
+
Mage::getStoreConfig('checkout/payment_failed/identity', $checkout->getStoreId()),
|
232 |
+
$recipient['email'],
|
233 |
+
$recipient['name'],
|
234 |
+
array(
|
235 |
+
'reason' => $message,
|
236 |
+
'checkoutType' => $checkoutType,
|
237 |
+
'dateAndTime' => Mage::app()->getLocale()->date(),
|
238 |
+
'customer' => $checkout->getCustomerFirstname() . ' ' . $checkout->getCustomerLastname(),
|
239 |
+
'customerEmail' => $checkout->getCustomerEmail(),
|
240 |
+
'billingAddress' => $checkout->getBillingAddress(),
|
241 |
+
'shippingAddress' => $checkout->getShippingAddress(),
|
242 |
+
'shippingMethod' => Mage::getStoreConfig('carriers/'.$shippingMethod.'/title'),
|
243 |
+
'paymentMethod' => Mage::getStoreConfig('payment/'.$paymentMethod.'/title'),
|
244 |
+
'items' => nl2br($items),
|
245 |
+
'total' => $total
|
246 |
+
)
|
247 |
+
);
|
248 |
}
|
249 |
|
250 |
$translate->setTranslateInline(true);
|
281 |
&& (($quote->getItemsSummaryQty() - $quote->getItemVirtualQty()) > 0)
|
282 |
&& ($quote->getItemsSummaryQty() <= $maximunQty)
|
283 |
&& !$quote->hasNominalItems()
|
284 |
+
;
|
285 |
}
|
286 |
|
287 |
/**
|
app/code/core/Mage/Checkout/Model/Cart/Product/Api.php
CHANGED
@@ -31,7 +31,6 @@
|
|
31 |
* @package Mage_Checkout
|
32 |
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
*/
|
34 |
-
|
35 |
class Mage_Checkout_Model_Cart_Product_Api extends Mage_Checkout_Model_Api_Resource_Product
|
36 |
{
|
37 |
/**
|
@@ -51,7 +50,7 @@ class Mage_Checkout_Model_Cart_Product_Api extends Mage_Checkout_Model_Api_Resou
|
|
51 |
* @param $store
|
52 |
* @return bool
|
53 |
*/
|
54 |
-
public function add($quoteId, $productsData, $store=null)
|
55 |
{
|
56 |
$quote = $this->_getQuote($quoteId, $store);
|
57 |
if (empty($store)) {
|
@@ -91,7 +90,7 @@ class Mage_Checkout_Model_Cart_Product_Api extends Mage_Checkout_Model_Api_Resou
|
|
91 |
|
92 |
try {
|
93 |
$quote->collectTotals()->save();
|
94 |
-
} catch(Exception $e) {
|
95 |
$this->_fault("add_product_quote_save_fault", $e->getMessage());
|
96 |
}
|
97 |
|
@@ -104,7 +103,7 @@ class Mage_Checkout_Model_Cart_Product_Api extends Mage_Checkout_Model_Api_Resou
|
|
104 |
* @param $store
|
105 |
* @return bool
|
106 |
*/
|
107 |
-
public function update($quoteId, $productsData, $store=null)
|
108 |
{
|
109 |
$quote = $this->_getQuote($quoteId, $store);
|
110 |
if (empty($store)) {
|
@@ -145,8 +144,8 @@ class Mage_Checkout_Model_Cart_Product_Api extends Mage_Checkout_Model_Api_Resou
|
|
145 |
}
|
146 |
|
147 |
try {
|
148 |
-
$quote->save();
|
149 |
-
} catch(Exception $e) {
|
150 |
$this->_fault("update_product_quote_save_fault", $e->getMessage());
|
151 |
}
|
152 |
|
@@ -159,7 +158,7 @@ class Mage_Checkout_Model_Cart_Product_Api extends Mage_Checkout_Model_Api_Resou
|
|
159 |
* @param $store
|
160 |
* @return bool
|
161 |
*/
|
162 |
-
public function remove($quoteId, $productsData, $store=null)
|
163 |
{
|
164 |
$quote = $this->_getQuote($quoteId, $store);
|
165 |
if (empty($store)) {
|
@@ -201,8 +200,8 @@ class Mage_Checkout_Model_Cart_Product_Api extends Mage_Checkout_Model_Api_Resou
|
|
201 |
}
|
202 |
|
203 |
try {
|
204 |
-
$quote->save();
|
205 |
-
} catch(Exception $e) {
|
206 |
$this->_fault("remove_product_quote_save_fault", $e->getMessage());
|
207 |
}
|
208 |
|
@@ -249,7 +248,7 @@ class Mage_Checkout_Model_Cart_Product_Api extends Mage_Checkout_Model_Api_Resou
|
|
249 |
* @param $store
|
250 |
* @return bool
|
251 |
*/
|
252 |
-
public function moveToCustomerQuote($quoteId, $productsData, $store=null)
|
253 |
{
|
254 |
$quote = $this->_getQuote($quoteId, $store);
|
255 |
|
@@ -281,7 +280,7 @@ class Mage_Checkout_Model_Cart_Product_Api extends Mage_Checkout_Model_Api_Resou
|
|
281 |
}
|
282 |
|
283 |
$errors = array();
|
284 |
-
foreach($productsData as $key => $productItem){
|
285 |
if (isset($productItem['product_id'])) {
|
286 |
$productByItem = $this->_getProduct($productItem['product_id'], $store, "id");
|
287 |
} else if (isset($productItem['sku'])) {
|
@@ -295,7 +294,7 @@ class Mage_Checkout_Model_Cart_Product_Api extends Mage_Checkout_Model_Api_Resou
|
|
295 |
/** @var $quoteItem Mage_Sales_Model_Quote_Item */
|
296 |
$quoteItem = $this->_getQuoteItemByProduct($quote, $productByItem,
|
297 |
$this->_getProductRequest($productItem));
|
298 |
-
if($quoteItem && $quoteItem->getId()){
|
299 |
$newQuoteItem = clone $quoteItem;
|
300 |
$newQuoteItem->setId(null);
|
301 |
$customerQuote->addItem($newQuoteItem);
|
31 |
* @package Mage_Checkout
|
32 |
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
*/
|
|
|
34 |
class Mage_Checkout_Model_Cart_Product_Api extends Mage_Checkout_Model_Api_Resource_Product
|
35 |
{
|
36 |
/**
|
50 |
* @param $store
|
51 |
* @return bool
|
52 |
*/
|
53 |
+
public function add($quoteId, $productsData, $store = null)
|
54 |
{
|
55 |
$quote = $this->_getQuote($quoteId, $store);
|
56 |
if (empty($store)) {
|
90 |
|
91 |
try {
|
92 |
$quote->collectTotals()->save();
|
93 |
+
} catch (Exception $e) {
|
94 |
$this->_fault("add_product_quote_save_fault", $e->getMessage());
|
95 |
}
|
96 |
|
103 |
* @param $store
|
104 |
* @return bool
|
105 |
*/
|
106 |
+
public function update($quoteId, $productsData, $store = null)
|
107 |
{
|
108 |
$quote = $this->_getQuote($quoteId, $store);
|
109 |
if (empty($store)) {
|
144 |
}
|
145 |
|
146 |
try {
|
147 |
+
$quote->collectTotals()->save();
|
148 |
+
} catch (Exception $e) {
|
149 |
$this->_fault("update_product_quote_save_fault", $e->getMessage());
|
150 |
}
|
151 |
|
158 |
* @param $store
|
159 |
* @return bool
|
160 |
*/
|
161 |
+
public function remove($quoteId, $productsData, $store = null)
|
162 |
{
|
163 |
$quote = $this->_getQuote($quoteId, $store);
|
164 |
if (empty($store)) {
|
200 |
}
|
201 |
|
202 |
try {
|
203 |
+
$quote->collectTotals()->save();
|
204 |
+
} catch (Exception $e) {
|
205 |
$this->_fault("remove_product_quote_save_fault", $e->getMessage());
|
206 |
}
|
207 |
|
248 |
* @param $store
|
249 |
* @return bool
|
250 |
*/
|
251 |
+
public function moveToCustomerQuote($quoteId, $productsData, $store = null)
|
252 |
{
|
253 |
$quote = $this->_getQuote($quoteId, $store);
|
254 |
|
280 |
}
|
281 |
|
282 |
$errors = array();
|
283 |
+
foreach ($productsData as $key => $productItem) {
|
284 |
if (isset($productItem['product_id'])) {
|
285 |
$productByItem = $this->_getProduct($productItem['product_id'], $store, "id");
|
286 |
} else if (isset($productItem['sku'])) {
|
294 |
/** @var $quoteItem Mage_Sales_Model_Quote_Item */
|
295 |
$quoteItem = $this->_getQuoteItemByProduct($quote, $productByItem,
|
296 |
$this->_getProductRequest($productItem));
|
297 |
+
if ($quoteItem && $quoteItem->getId()) {
|
298 |
$newQuoteItem = clone $quoteItem;
|
299 |
$newQuoteItem->setId(null);
|
300 |
$customerQuote->addItem($newQuoteItem);
|
app/code/core/Mage/Checkout/controllers/CartController.php
CHANGED
@@ -397,6 +397,11 @@ class Mage_Checkout_CartController extends Mage_Core_Controller_Front_Action
|
|
397 |
*/
|
398 |
public function updatePostAction()
|
399 |
{
|
|
|
|
|
|
|
|
|
|
|
400 |
$updateAction = (string)$this->getRequest()->getParam('update_cart_action');
|
401 |
|
402 |
switch ($updateAction) {
|
397 |
*/
|
398 |
public function updatePostAction()
|
399 |
{
|
400 |
+
if (!$this->_validateFormKey()) {
|
401 |
+
$this->_redirect('*/*/');
|
402 |
+
return;
|
403 |
+
}
|
404 |
+
|
405 |
$updateAction = (string)$this->getRequest()->getParam('update_cart_action');
|
406 |
|
407 |
switch ($updateAction) {
|
app/code/core/Mage/Checkout/controllers/MultishippingController.php
CHANGED
@@ -267,6 +267,9 @@ class Mage_Checkout_MultishippingController extends Mage_Checkout_Controller_Act
|
|
267 |
}
|
268 |
}
|
269 |
|
|
|
|
|
|
|
270 |
public function backToAddressesAction()
|
271 |
{
|
272 |
$this->_getState()->setActiveStep(
|
@@ -292,6 +295,11 @@ class Mage_Checkout_MultishippingController extends Mage_Checkout_Controller_Act
|
|
292 |
$this->_redirect('*/*/addresses');
|
293 |
}
|
294 |
|
|
|
|
|
|
|
|
|
|
|
295 |
protected function _validateMinimumAmount()
|
296 |
{
|
297 |
if (!$this->_getCheckout()->validateMinimumAmount()) {
|
@@ -326,6 +334,9 @@ class Mage_Checkout_MultishippingController extends Mage_Checkout_Controller_Act
|
|
326 |
$this->renderLayout();
|
327 |
}
|
328 |
|
|
|
|
|
|
|
329 |
public function backToShippingAction()
|
330 |
{
|
331 |
$this->_getState()->setActiveStep(
|
@@ -337,6 +348,9 @@ class Mage_Checkout_MultishippingController extends Mage_Checkout_Controller_Act
|
|
337 |
$this->_redirect('*/*/shipping');
|
338 |
}
|
339 |
|
|
|
|
|
|
|
340 |
public function shippingPostAction()
|
341 |
{
|
342 |
$shippingMethods = $this->getRequest()->getPost('shipping_method');
|
@@ -354,7 +368,7 @@ class Mage_Checkout_MultishippingController extends Mage_Checkout_Controller_Act
|
|
354 |
);
|
355 |
$this->_redirect('*/*/billing');
|
356 |
}
|
357 |
-
catch (Exception $e){
|
358 |
$this->_getCheckoutSession()->addError($e->getMessage());
|
359 |
$this->_redirect('*/*/shipping');
|
360 |
}
|
@@ -402,6 +416,9 @@ class Mage_Checkout_MultishippingController extends Mage_Checkout_Controller_Act
|
|
402 |
return true;
|
403 |
}
|
404 |
|
|
|
|
|
|
|
405 |
public function backToBillingAction()
|
406 |
{
|
407 |
$this->_getState()->setActiveStep(
|
@@ -453,8 +470,16 @@ class Mage_Checkout_MultishippingController extends Mage_Checkout_Controller_Act
|
|
453 |
}
|
454 |
}
|
455 |
|
|
|
|
|
|
|
456 |
public function overviewPostAction()
|
457 |
{
|
|
|
|
|
|
|
|
|
|
|
458 |
if (!$this->_validateMinimumAmount()) {
|
459 |
return;
|
460 |
}
|
@@ -489,7 +514,7 @@ class Mage_Checkout_MultishippingController extends Mage_Checkout_Controller_Act
|
|
489 |
$this->_redirect('*/*/success');
|
490 |
} catch (Mage_Payment_Model_Info_Exception $e) {
|
491 |
$message = $e->getMessage();
|
492 |
-
if( !empty($message) ) {
|
493 |
$this->_getCheckoutSession()->addError($message);
|
494 |
}
|
495 |
$this->_redirect('*/*/billing');
|
@@ -500,12 +525,12 @@ class Mage_Checkout_MultishippingController extends Mage_Checkout_Controller_Act
|
|
500 |
$this->_getCheckoutSession()->addError($e->getMessage());
|
501 |
$this->_redirect('*/cart');
|
502 |
}
|
503 |
-
catch (Mage_Core_Exception $e){
|
504 |
Mage::helper('checkout')
|
505 |
->sendPaymentFailedEmail($this->_getCheckout()->getQuote(), $e->getMessage(), 'multi-shipping');
|
506 |
$this->_getCheckoutSession()->addError($e->getMessage());
|
507 |
$this->_redirect('*/*/billing');
|
508 |
-
} catch (Exception $e){
|
509 |
Mage::logException($e);
|
510 |
Mage::helper('checkout')
|
511 |
->sendPaymentFailedEmail($this->_getCheckout()->getQuote(), $e->getMessage(), 'multi-shipping');
|
@@ -515,7 +540,7 @@ class Mage_Checkout_MultishippingController extends Mage_Checkout_Controller_Act
|
|
515 |
}
|
516 |
|
517 |
/**
|
518 |
-
* Multishipping checkout
|
519 |
*/
|
520 |
public function successAction()
|
521 |
{
|
@@ -533,7 +558,6 @@ class Mage_Checkout_MultishippingController extends Mage_Checkout_Controller_Act
|
|
533 |
|
534 |
/**
|
535 |
* Redirect to login page
|
536 |
-
*
|
537 |
*/
|
538 |
public function redirectLogin()
|
539 |
{
|
267 |
}
|
268 |
}
|
269 |
|
270 |
+
/**
|
271 |
+
* Multishipping checkout action to go back to addresses page
|
272 |
+
*/
|
273 |
public function backToAddressesAction()
|
274 |
{
|
275 |
$this->_getState()->setActiveStep(
|
295 |
$this->_redirect('*/*/addresses');
|
296 |
}
|
297 |
|
298 |
+
/**
|
299 |
+
* Returns whether the minimum amount has been reached
|
300 |
+
*
|
301 |
+
* @return bool
|
302 |
+
*/
|
303 |
protected function _validateMinimumAmount()
|
304 |
{
|
305 |
if (!$this->_getCheckout()->validateMinimumAmount()) {
|
334 |
$this->renderLayout();
|
335 |
}
|
336 |
|
337 |
+
/**
|
338 |
+
* Multishipping checkout action to go back to shipping
|
339 |
+
*/
|
340 |
public function backToShippingAction()
|
341 |
{
|
342 |
$this->_getState()->setActiveStep(
|
348 |
$this->_redirect('*/*/shipping');
|
349 |
}
|
350 |
|
351 |
+
/**
|
352 |
+
* Multishipping checkout after the shipping page
|
353 |
+
*/
|
354 |
public function shippingPostAction()
|
355 |
{
|
356 |
$shippingMethods = $this->getRequest()->getPost('shipping_method');
|
368 |
);
|
369 |
$this->_redirect('*/*/billing');
|
370 |
}
|
371 |
+
catch (Exception $e) {
|
372 |
$this->_getCheckoutSession()->addError($e->getMessage());
|
373 |
$this->_redirect('*/*/shipping');
|
374 |
}
|
416 |
return true;
|
417 |
}
|
418 |
|
419 |
+
/**
|
420 |
+
* Multishipping checkout action to go back to billing
|
421 |
+
*/
|
422 |
public function backToBillingAction()
|
423 |
{
|
424 |
$this->_getState()->setActiveStep(
|
470 |
}
|
471 |
}
|
472 |
|
473 |
+
/**
|
474 |
+
* Multishipping checkout after the overview page
|
475 |
+
*/
|
476 |
public function overviewPostAction()
|
477 |
{
|
478 |
+
if (!$this->_validateFormKey()) {
|
479 |
+
$this->_forward('backToAddresses');
|
480 |
+
return;
|
481 |
+
}
|
482 |
+
|
483 |
if (!$this->_validateMinimumAmount()) {
|
484 |
return;
|
485 |
}
|
514 |
$this->_redirect('*/*/success');
|
515 |
} catch (Mage_Payment_Model_Info_Exception $e) {
|
516 |
$message = $e->getMessage();
|
517 |
+
if ( !empty($message) ) {
|
518 |
$this->_getCheckoutSession()->addError($message);
|
519 |
}
|
520 |
$this->_redirect('*/*/billing');
|
525 |
$this->_getCheckoutSession()->addError($e->getMessage());
|
526 |
$this->_redirect('*/cart');
|
527 |
}
|
528 |
+
catch (Mage_Core_Exception $e) {
|
529 |
Mage::helper('checkout')
|
530 |
->sendPaymentFailedEmail($this->_getCheckout()->getQuote(), $e->getMessage(), 'multi-shipping');
|
531 |
$this->_getCheckoutSession()->addError($e->getMessage());
|
532 |
$this->_redirect('*/*/billing');
|
533 |
+
} catch (Exception $e) {
|
534 |
Mage::logException($e);
|
535 |
Mage::helper('checkout')
|
536 |
->sendPaymentFailedEmail($this->_getCheckout()->getQuote(), $e->getMessage(), 'multi-shipping');
|
540 |
}
|
541 |
|
542 |
/**
|
543 |
+
* Multishipping checkout success page
|
544 |
*/
|
545 |
public function successAction()
|
546 |
{
|
558 |
|
559 |
/**
|
560 |
* Redirect to login page
|
|
|
561 |
*/
|
562 |
public function redirectLogin()
|
563 |
{
|
app/code/core/Mage/Cms/Model/Resource/Page.php
CHANGED
@@ -147,6 +147,9 @@ class Mage_Cms_Model_Resource_Page extends Mage_Core_Model_Resource_Db_Abstract
|
|
147 |
$this->_getWriteAdapter()->insertMultiple($table, $data);
|
148 |
}
|
149 |
|
|
|
|
|
|
|
150 |
return parent::_afterSave($object);
|
151 |
}
|
152 |
|
147 |
$this->_getWriteAdapter()->insertMultiple($table, $data);
|
148 |
}
|
149 |
|
150 |
+
//Mark layout cache as invalidated
|
151 |
+
Mage::app()->getCacheInstance()->invalidateType('layout');
|
152 |
+
|
153 |
return parent::_afterSave($object);
|
154 |
}
|
155 |
|
app/code/core/Mage/Cms/Model/Resource/Page/Service.php
CHANGED
@@ -43,7 +43,7 @@ class Mage_Cms_Model_Resource_Page_Service extends Mage_Core_Model_Resource_Db_A
|
|
43 |
/**
|
44 |
* Unlinks from $fromStoreId store pages that have same identifiers as pages in $byStoreId
|
45 |
*
|
46 |
-
* Routine is
|
47 |
* to prevent duplication of url keys
|
48 |
*
|
49 |
* Resolved $byLinkTable can be provided when restoring links from some backup table
|
@@ -81,6 +81,7 @@ class Mage_Cms_Model_Resource_Page_Service extends Mage_Core_Model_Resource_Db_A
|
|
81 |
$readAdapter->quoteInto('by_link.page_id = by_entity.page_id AND by_link.store_id = ?', $byStoreId),
|
82 |
array()
|
83 |
);
|
|
|
84 |
$pageIds = $readAdapter->fetchCol($select);
|
85 |
|
86 |
// Unlink found pages
|
@@ -88,7 +89,7 @@ class Mage_Cms_Model_Resource_Page_Service extends Mage_Core_Model_Resource_Db_A
|
|
88 |
$writeAdapter = $this->_getWriteAdapter();
|
89 |
$where = array(
|
90 |
'page_id IN (?)' => $pageIds,
|
91 |
-
'
|
92 |
);
|
93 |
$writeAdapter->delete($linkTable, $where);
|
94 |
}
|
43 |
/**
|
44 |
* Unlinks from $fromStoreId store pages that have same identifiers as pages in $byStoreId
|
45 |
*
|
46 |
+
* Routine is intended to be used before linking pages of some store ($byStoreId) to other store ($fromStoreId)
|
47 |
* to prevent duplication of url keys
|
48 |
*
|
49 |
* Resolved $byLinkTable can be provided when restoring links from some backup table
|
81 |
$readAdapter->quoteInto('by_link.page_id = by_entity.page_id AND by_link.store_id = ?', $byStoreId),
|
82 |
array()
|
83 |
);
|
84 |
+
|
85 |
$pageIds = $readAdapter->fetchCol($select);
|
86 |
|
87 |
// Unlink found pages
|
89 |
$writeAdapter = $this->_getWriteAdapter();
|
90 |
$where = array(
|
91 |
'page_id IN (?)' => $pageIds,
|
92 |
+
'store_id = ?' => $fromStoreId
|
93 |
);
|
94 |
$writeAdapter->delete($linkTable, $where);
|
95 |
}
|
app/code/core/Mage/{GoogleCheckout/Block/Form.php → Cms/data/cms_setup/data-upgrade-1.6.0.0.1-1.6.0.0.2.php}
RENAMED
@@ -19,28 +19,21 @@
|
|
19 |
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
*
|
21 |
* @category Mage
|
22 |
-
* @package
|
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 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
class Mage_GoogleCheckout_Block_Form extends Mage_Payment_Block_Form
|
35 |
-
{
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Varien constructor
|
39 |
-
*/
|
40 |
-
protected function _construct()
|
41 |
-
{
|
42 |
-
$this->setTemplate('googlecheckout/form.phtml');
|
43 |
-
parent::_construct();
|
44 |
-
}
|
45 |
|
46 |
-
|
19 |
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
*
|
21 |
* @category Mage
|
22 |
+
* @package Mage_Cms
|
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 |
+
$content = "<p>This website requires cookies to provide all of its features. For more " .
|
27 |
+
"information on what data is contained in the cookies, please see our " .
|
28 |
+
"<a href=\"{{store direct_url=\"privacy-policy-cookie-restriction-mode\"}}\">Privacy Policy page</a>. " .
|
29 |
+
"To accept cookies from this site, please click the Allow button below.</p>";
|
30 |
|
31 |
+
$cmsBlock = array(
|
32 |
+
'title' => 'Cookie restriction notice',
|
33 |
+
'identifier' => 'cookie_restriction_notice_block',
|
34 |
+
'content' => $content,
|
35 |
+
'is_active' => 1,
|
36 |
+
'stores' => 0
|
37 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
+
Mage::getModel('cms/block')->setData($cmsBlock)->save();
|
app/code/core/Mage/Cms/etc/config.xml
CHANGED
@@ -28,7 +28,7 @@
|
|
28 |
<config>
|
29 |
<modules>
|
30 |
<Mage_Cms>
|
31 |
-
<version>1.6.0.0.
|
32 |
</Mage_Cms>
|
33 |
</modules>
|
34 |
<frontend>
|
28 |
<config>
|
29 |
<modules>
|
30 |
<Mage_Cms>
|
31 |
+
<version>1.6.0.0.2</version>
|
32 |
</Mage_Cms>
|
33 |
</modules>
|
34 |
<frontend>
|
app/code/core/Mage/Core/Block/Abstract.php
CHANGED
@@ -86,28 +86,28 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object
|
|
86 |
*
|
87 |
* @var array
|
88 |
*/
|
89 |
-
protected $_children
|
90 |
|
91 |
/**
|
92 |
* Sorted children list
|
93 |
*
|
94 |
* @var array
|
95 |
*/
|
96 |
-
protected $_sortedChildren
|
97 |
|
98 |
/**
|
99 |
* Children blocks HTML cache array
|
100 |
*
|
101 |
* @var array
|
102 |
*/
|
103 |
-
protected $_childrenHtmlCache
|
104 |
|
105 |
/**
|
106 |
* Arbitrary groups of child blocks
|
107 |
*
|
108 |
* @var array
|
109 |
*/
|
110 |
-
protected $_childGroups
|
111 |
|
112 |
/**
|
113 |
* Request object
|
@@ -121,14 +121,14 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object
|
|
121 |
*
|
122 |
* @var Mage_Core_Block_Messages
|
123 |
*/
|
124 |
-
protected $_messagesBlock
|
125 |
|
126 |
/**
|
127 |
* Whether this block was not explicitly named
|
128 |
*
|
129 |
* @var boolean
|
130 |
*/
|
131 |
-
protected $_isAnonymous
|
132 |
|
133 |
/**
|
134 |
* Parent block
|
@@ -175,6 +175,13 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object
|
|
175 |
*/
|
176 |
protected $_factory;
|
177 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
/**
|
179 |
* Initialize factory instance
|
180 |
*
|
@@ -182,7 +189,12 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object
|
|
182 |
*/
|
183 |
public function __construct(array $args = array())
|
184 |
{
|
185 |
-
|
|
|
|
|
|
|
|
|
|
|
186 |
parent::__construct($args);
|
187 |
}
|
188 |
|
@@ -199,6 +211,26 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object
|
|
199 |
*/
|
200 |
}
|
201 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
202 |
/**
|
203 |
* Retrieve request object
|
204 |
*
|
@@ -207,7 +239,7 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object
|
|
207 |
*/
|
208 |
public function getRequest()
|
209 |
{
|
210 |
-
$controller =
|
211 |
if ($controller) {
|
212 |
$this->_request = $controller->getRequest();
|
213 |
} else {
|
@@ -245,7 +277,7 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object
|
|
245 |
*/
|
246 |
public function getAction()
|
247 |
{
|
248 |
-
return
|
249 |
}
|
250 |
|
251 |
/**
|
@@ -478,10 +510,10 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object
|
|
478 |
{
|
479 |
$child = $this->getChild($alias);
|
480 |
if ($child) {
|
481 |
-
$args
|
482 |
-
$alias
|
483 |
$callback = array_shift($args);
|
484 |
-
$result
|
485 |
if (!is_array($params)) {
|
486 |
$params = $args;
|
487 |
}
|
@@ -500,7 +532,7 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object
|
|
500 |
*/
|
501 |
public function unsetChildren()
|
502 |
{
|
503 |
-
$this->_children
|
504 |
$this->_sortedChildren = array();
|
505 |
return $this;
|
506 |
}
|
@@ -655,7 +687,8 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object
|
|
655 |
* if we don't have block - don't throw exception because
|
656 |
* block can simply removed using layout method remove
|
657 |
*/
|
658 |
-
//Mage::throwException(Mage::helper('core')
|
|
|
659 |
return $this;
|
660 |
}
|
661 |
if ($block->getIsAnonymous()) {
|
@@ -711,7 +744,7 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object
|
|
711 |
}
|
712 |
$this->_sortInstructions[$name][2] = true;
|
713 |
|
714 |
-
$index
|
715 |
$siblingKey = array_search($siblingName, $this->_sortedChildren);
|
716 |
|
717 |
if ($index === false || $siblingKey === false) {
|
@@ -896,7 +929,7 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object
|
|
896 |
* Check framing options
|
897 |
*/
|
898 |
if ($this->_frameOpenTag) {
|
899 |
-
$html = '<'
|
900 |
}
|
901 |
|
902 |
/**
|
@@ -907,7 +940,7 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object
|
|
907 |
}
|
908 |
self::$_transportObject->setHtml($html);
|
909 |
Mage::dispatchEvent('core_block_abstract_to_html_after',
|
910 |
-
|
911 |
$html = self::$_transportObject->getHtml();
|
912 |
|
913 |
return $html;
|
@@ -1060,7 +1093,7 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object
|
|
1060 |
* @param bool $showTime
|
1061 |
* @return string
|
1062 |
*/
|
1063 |
-
public function formatDate($date = null, $format =
|
1064 |
{
|
1065 |
return $this->helper('core')->formatDate($date, $format, $showTime);
|
1066 |
}
|
@@ -1073,7 +1106,7 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object
|
|
1073 |
* @param bool $showDate
|
1074 |
* @return string
|
1075 |
*/
|
1076 |
-
public function formatTime($time = null, $format =
|
1077 |
{
|
1078 |
return $this->helper('core')->formatTime($time, $format, $showDate);
|
1079 |
}
|
@@ -1104,7 +1137,7 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object
|
|
1104 |
$args = func_get_args();
|
1105 |
$expr = new Mage_Core_Model_Translate_Expr(array_shift($args), $this->getModuleName());
|
1106 |
array_unshift($args, $expr);
|
1107 |
-
return
|
1108 |
}
|
1109 |
|
1110 |
/**
|
@@ -1212,8 +1245,8 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object
|
|
1212 |
*/
|
1213 |
protected function _beforeCacheUrl()
|
1214 |
{
|
1215 |
-
if (
|
1216 |
-
|
1217 |
}
|
1218 |
return $this;
|
1219 |
}
|
@@ -1226,8 +1259,8 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object
|
|
1226 |
*/
|
1227 |
protected function _afterCacheUrl($html)
|
1228 |
{
|
1229 |
-
if (
|
1230 |
-
|
1231 |
Varien_Profiler::start('CACHE_URL');
|
1232 |
$html = Mage::getSingleton($this->_getUrlModelClass())->sessionUrlVar($html);
|
1233 |
Varien_Profiler::stop('CACHE_URL');
|
@@ -1264,7 +1297,7 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object
|
|
1264 |
*/
|
1265 |
$key = $this->getCacheKeyInfo();
|
1266 |
//ksort($key); // ignore order
|
1267 |
-
$key = array_values($key);
|
1268 |
$key = implode('|', $key);
|
1269 |
$key = sha1($key);
|
1270 |
return $key;
|
@@ -1277,7 +1310,7 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object
|
|
1277 |
*/
|
1278 |
public function getCacheTags()
|
1279 |
{
|
1280 |
-
$tagsCache =
|
1281 |
if ($tagsCache) {
|
1282 |
$tags = json_decode($tagsCache);
|
1283 |
}
|
@@ -1341,13 +1374,13 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object
|
|
1341 |
*/
|
1342 |
protected function _loadCache()
|
1343 |
{
|
1344 |
-
if (is_null($this->getCacheLifetime()) ||
|
1345 |
return false;
|
1346 |
}
|
1347 |
$cacheKey = $this->getCacheKey();
|
1348 |
/** @var $session Mage_Core_Model_Session */
|
1349 |
$session = Mage::getSingleton('core/session');
|
1350 |
-
$cacheData =
|
1351 |
if ($cacheData) {
|
1352 |
$cacheData = str_replace(
|
1353 |
$this->_getSidPlaceholder($cacheKey),
|
@@ -1366,7 +1399,7 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object
|
|
1366 |
*/
|
1367 |
protected function _saveCache($data)
|
1368 |
{
|
1369 |
-
if (is_null($this->getCacheLifetime()) ||
|
1370 |
return false;
|
1371 |
}
|
1372 |
$cacheKey = $this->getCacheKey();
|
@@ -1380,8 +1413,8 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object
|
|
1380 |
|
1381 |
$tags = $this->getCacheTags();
|
1382 |
|
1383 |
-
|
1384 |
-
|
1385 |
json_encode($tags),
|
1386 |
$this->_getTagsCacheKey($cacheKey),
|
1387 |
$tags,
|
@@ -1429,7 +1462,7 @@ abstract class Mage_Core_Block_Abstract extends Varien_Object
|
|
1429 |
{
|
1430 |
$tags = array();
|
1431 |
/** @var $item Mage_Core_Model_Abstract */
|
1432 |
-
foreach($items as $item) {
|
1433 |
$itemTags = $item->getCacheIdTags();
|
1434 |
if (false === $itemTags) {
|
1435 |
continue;
|
86 |
*
|
87 |
* @var array
|
88 |
*/
|
89 |
+
protected $_children = array();
|
90 |
|
91 |
/**
|
92 |
* Sorted children list
|
93 |
*
|
94 |
* @var array
|
95 |
*/
|
96 |
+
protected $_sortedChildren = array();
|
97 |
|
98 |
/**
|
99 |
* Children blocks HTML cache array
|
100 |
*
|
101 |
* @var array
|
102 |
*/
|
103 |
+
protected $_childrenHtmlCache = array();
|
104 |
|
105 |
/**
|
106 |
* Arbitrary groups of child blocks
|
107 |
*
|
108 |
* @var array
|
109 |
*/
|
110 |
+
protected $_childGroups = array();
|
111 |
|
112 |
/**
|
113 |
* Request object
|
121 |
*
|
122 |
* @var Mage_Core_Block_Messages
|
123 |
*/
|
124 |
+
protected $_messagesBlock = null;
|
125 |
|
126 |
/**
|
127 |
* Whether this block was not explicitly named
|
128 |
*
|
129 |
* @var boolean
|
130 |
*/
|
131 |
+
protected $_isAnonymous = false;
|
132 |
|
133 |
/**
|
134 |
* Parent block
|
175 |
*/
|
176 |
protected $_factory;
|
177 |
|
178 |
+
/**
|
179 |
+
* Application instance
|
180 |
+
*
|
181 |
+
* @var Mage_Core_Model_App
|
182 |
+
*/
|
183 |
+
protected $_app;
|
184 |
+
|
185 |
/**
|
186 |
* Initialize factory instance
|
187 |
*
|
189 |
*/
|
190 |
public function __construct(array $args = array())
|
191 |
{
|
192 |
+
if (!empty($args['core_factory']) && ($args['core_factory'] instanceof Mage_Core_Model_Factory)) {
|
193 |
+
$this->_factory = $args['core_factory'];
|
194 |
+
}
|
195 |
+
if (!empty($args['app']) && ($args['app'] instanceof Mage_Core_Model_App)) {
|
196 |
+
$this->_app = $args['app'];
|
197 |
+
}
|
198 |
parent::__construct($args);
|
199 |
}
|
200 |
|
211 |
*/
|
212 |
}
|
213 |
|
214 |
+
/**
|
215 |
+
* Retrieve factory instance
|
216 |
+
*
|
217 |
+
* @return Mage_Core_Model_Factory
|
218 |
+
*/
|
219 |
+
protected function _getFactory()
|
220 |
+
{
|
221 |
+
return is_null($this->_factory) ? Mage::getSingleton('core/factory') : $this->_factory;
|
222 |
+
}
|
223 |
+
|
224 |
+
/**
|
225 |
+
* Retrieve application instance
|
226 |
+
*
|
227 |
+
* @return Mage_Core_Model_App
|
228 |
+
*/
|
229 |
+
protected function _getApp()
|
230 |
+
{
|
231 |
+
return is_null($this->_app) ? Mage::app() : $this->_app;
|
232 |
+
}
|
233 |
+
|
234 |
/**
|
235 |
* Retrieve request object
|
236 |
*
|
239 |
*/
|
240 |
public function getRequest()
|
241 |
{
|
242 |
+
$controller = $this->_getApp()->getFrontController();
|
243 |
if ($controller) {
|
244 |
$this->_request = $controller->getRequest();
|
245 |
} else {
|
277 |
*/
|
278 |
public function getAction()
|
279 |
{
|
280 |
+
return $this->_getApp()->getFrontController()->getAction();
|
281 |
}
|
282 |
|
283 |
/**
|
510 |
{
|
511 |
$child = $this->getChild($alias);
|
512 |
if ($child) {
|
513 |
+
$args = func_get_args();
|
514 |
+
$alias = array_shift($args);
|
515 |
$callback = array_shift($args);
|
516 |
+
$result = (string)array_shift($args);
|
517 |
if (!is_array($params)) {
|
518 |
$params = $args;
|
519 |
}
|
532 |
*/
|
533 |
public function unsetChildren()
|
534 |
{
|
535 |
+
$this->_children = array();
|
536 |
$this->_sortedChildren = array();
|
537 |
return $this;
|
538 |
}
|
687 |
* if we don't have block - don't throw exception because
|
688 |
* block can simply removed using layout method remove
|
689 |
*/
|
690 |
+
//Mage::throwException(Mage::helper('core')
|
691 |
+
// ->__('Invalid block name to set child %s: %s', $alias, $block));
|
692 |
return $this;
|
693 |
}
|
694 |
if ($block->getIsAnonymous()) {
|
744 |
}
|
745 |
$this->_sortInstructions[$name][2] = true;
|
746 |
|
747 |
+
$index = array_search($name, $this->_sortedChildren);
|
748 |
$siblingKey = array_search($siblingName, $this->_sortedChildren);
|
749 |
|
750 |
if ($index === false || $siblingKey === false) {
|
929 |
* Check framing options
|
930 |
*/
|
931 |
if ($this->_frameOpenTag) {
|
932 |
+
$html = '<' . $this->_frameOpenTag . '>' . $html . '<' . $this->_frameCloseTag . '>';
|
933 |
}
|
934 |
|
935 |
/**
|
940 |
}
|
941 |
self::$_transportObject->setHtml($html);
|
942 |
Mage::dispatchEvent('core_block_abstract_to_html_after',
|
943 |
+
array('block' => $this, 'transport' => self::$_transportObject));
|
944 |
$html = self::$_transportObject->getHtml();
|
945 |
|
946 |
return $html;
|
1093 |
* @param bool $showTime
|
1094 |
* @return string
|
1095 |
*/
|
1096 |
+
public function formatDate($date = null, $format = Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, $showTime = false)
|
1097 |
{
|
1098 |
return $this->helper('core')->formatDate($date, $format, $showTime);
|
1099 |
}
|
1106 |
* @param bool $showDate
|
1107 |
* @return string
|
1108 |
*/
|
1109 |
+
public function formatTime($time = null, $format = Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, $showDate = false)
|
1110 |
{
|
1111 |
return $this->helper('core')->formatTime($time, $format, $showDate);
|
1112 |
}
|
1137 |
$args = func_get_args();
|
1138 |
$expr = new Mage_Core_Model_Translate_Expr(array_shift($args), $this->getModuleName());
|
1139 |
array_unshift($args, $expr);
|
1140 |
+
return $this->_getApp()->getTranslator()->translate($args);
|
1141 |
}
|
1142 |
|
1143 |
/**
|
1245 |
*/
|
1246 |
protected function _beforeCacheUrl()
|
1247 |
{
|
1248 |
+
if ($this->_getApp()->useCache(self::CACHE_GROUP)) {
|
1249 |
+
$this->_getApp()->setUseSessionVar(true);
|
1250 |
}
|
1251 |
return $this;
|
1252 |
}
|
1259 |
*/
|
1260 |
protected function _afterCacheUrl($html)
|
1261 |
{
|
1262 |
+
if ($this->_getApp()->useCache(self::CACHE_GROUP)) {
|
1263 |
+
$this->_getApp()->setUseSessionVar(false);
|
1264 |
Varien_Profiler::start('CACHE_URL');
|
1265 |
$html = Mage::getSingleton($this->_getUrlModelClass())->sessionUrlVar($html);
|
1266 |
Varien_Profiler::stop('CACHE_URL');
|
1297 |
*/
|
1298 |
$key = $this->getCacheKeyInfo();
|
1299 |
//ksort($key); // ignore order
|
1300 |
+
$key = array_values($key); // ignore array keys
|
1301 |
$key = implode('|', $key);
|
1302 |
$key = sha1($key);
|
1303 |
return $key;
|
1310 |
*/
|
1311 |
public function getCacheTags()
|
1312 |
{
|
1313 |
+
$tagsCache = $this->_getApp()->loadCache($this->_getTagsCacheKey());
|
1314 |
if ($tagsCache) {
|
1315 |
$tags = json_decode($tagsCache);
|
1316 |
}
|
1374 |
*/
|
1375 |
protected function _loadCache()
|
1376 |
{
|
1377 |
+
if (is_null($this->getCacheLifetime()) || !$this->_getApp()->useCache(self::CACHE_GROUP)) {
|
1378 |
return false;
|
1379 |
}
|
1380 |
$cacheKey = $this->getCacheKey();
|
1381 |
/** @var $session Mage_Core_Model_Session */
|
1382 |
$session = Mage::getSingleton('core/session');
|
1383 |
+
$cacheData = $this->_getApp()->loadCache($cacheKey);
|
1384 |
if ($cacheData) {
|
1385 |
$cacheData = str_replace(
|
1386 |
$this->_getSidPlaceholder($cacheKey),
|
1399 |
*/
|
1400 |
protected function _saveCache($data)
|
1401 |
{
|
1402 |
+
if (is_null($this->getCacheLifetime()) || !$this->_getApp()->useCache(self::CACHE_GROUP)) {
|
1403 |
return false;
|
1404 |
}
|
1405 |
$cacheKey = $this->getCacheKey();
|
1413 |
|
1414 |
$tags = $this->getCacheTags();
|
1415 |
|
1416 |
+
$this->_getApp()->saveCache($data, $cacheKey, $tags, $this->getCacheLifetime());
|
1417 |
+
$this->_getApp()->saveCache(
|
1418 |
json_encode($tags),
|
1419 |
$this->_getTagsCacheKey($cacheKey),
|
1420 |
$tags,
|
1462 |
{
|
1463 |
$tags = array();
|
1464 |
/** @var $item Mage_Core_Model_Abstract */
|
1465 |
+
foreach ($items as $item) {
|
1466 |
$itemTags = $item->getCacheIdTags();
|
1467 |
if (false === $itemTags) {
|
1468 |
continue;
|
app/code/core/Mage/Core/Helper/Cookie.php
CHANGED
@@ -48,6 +48,11 @@ class Mage_Core_Helper_Cookie extends Mage_Core_Helper_Abstract
|
|
48 |
*/
|
49 |
const XML_PATH_COOKIE_RESTRICTION_LIFETIME = 'web/cookie/cookie_restriction_lifetime';
|
50 |
|
|
|
|
|
|
|
|
|
|
|
51 |
/**
|
52 |
* Store instance
|
53 |
*
|
@@ -142,4 +147,14 @@ class Mage_Core_Helper_Cookie extends Mage_Core_Helper_Abstract
|
|
142 |
{
|
143 |
return (int)$this->_currentStore->getConfig(self::XML_PATH_COOKIE_RESTRICTION_LIFETIME);
|
144 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
}
|
48 |
*/
|
49 |
const XML_PATH_COOKIE_RESTRICTION_LIFETIME = 'web/cookie/cookie_restriction_lifetime';
|
50 |
|
51 |
+
/**
|
52 |
+
* Cookie restriction notice cms block identifier
|
53 |
+
*/
|
54 |
+
const COOKIE_RESTRICTION_NOTICE_CMS_BLOCK_IDENTIFIER = 'cookie_restriction_notice_block';
|
55 |
+
|
56 |
/**
|
57 |
* Store instance
|
58 |
*
|
147 |
{
|
148 |
return (int)$this->_currentStore->getConfig(self::XML_PATH_COOKIE_RESTRICTION_LIFETIME);
|
149 |
}
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Get cookie restriction notice cms block identifier
|
153 |
+
*
|
154 |
+
* @return string
|
155 |
+
*/
|
156 |
+
public function getCookieRestrictionNoticeCmsBlockIdentifier()
|
157 |
+
{
|
158 |
+
return self::COOKIE_RESTRICTION_NOTICE_CMS_BLOCK_IDENTIFIER;
|
159 |
+
}
|
160 |
}
|
app/code/core/Mage/Core/Model/Design/Package.php
CHANGED
@@ -819,6 +819,9 @@ class Mage_Core_Model_Design_Package
|
|
819 |
$pathParts = explode(DS, $uri);
|
820 |
$fileDirParts = explode(DS, $this->_callbackFileDir);
|
821 |
$store = $this->getStore();
|
|
|
|
|
|
|
822 |
if ($store->isAdmin()) {
|
823 |
$secure = $store->isAdminUrlSecure();
|
824 |
} else {
|
819 |
$pathParts = explode(DS, $uri);
|
820 |
$fileDirParts = explode(DS, $this->_callbackFileDir);
|
821 |
$store = $this->getStore();
|
822 |
+
if (is_int($store)) {
|
823 |
+
$store = Mage::app()->getStore($store);
|
824 |
+
}
|
825 |
if ($store->isAdmin()) {
|
826 |
$secure = $store->isAdminUrlSecure();
|
827 |
} else {
|
app/code/core/Mage/Core/Model/Locale.php
CHANGED
@@ -411,13 +411,14 @@ class Mage_Core_Model_Locale
|
|
411 |
|
412 |
/**
|
413 |
* Retrieve ISO date format
|
|
|
414 |
*
|
415 |
* @param string $type
|
416 |
* @return string
|
417 |
*/
|
418 |
public function getDateFormat($type=null)
|
419 |
{
|
420 |
-
return $this->getTranslation($type, 'date');
|
421 |
}
|
422 |
|
423 |
/**
|
@@ -431,7 +432,6 @@ class Mage_Core_Model_Locale
|
|
431 |
$this->getTranslation(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, 'date'));
|
432 |
}
|
433 |
|
434 |
-
|
435 |
/**
|
436 |
* Retrieve ISO time format
|
437 |
*
|
@@ -576,7 +576,15 @@ class Mage_Core_Model_Locale
|
|
576 |
try {
|
577 |
$currencyObject = new Zend_Currency($currency, $this->getLocale());
|
578 |
} catch (Exception $e) {
|
579 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
580 |
$options['name'] = $currency;
|
581 |
$options['currency'] = $currency;
|
582 |
$options['symbol'] = $currency;
|
@@ -753,7 +761,18 @@ class Mage_Core_Model_Locale
|
|
753 |
return $this->getLocale()->getTranslation($value, $path, $this->getLocale());
|
754 |
}
|
755 |
|
756 |
-
/**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
757 |
* Returns the localized country name
|
758 |
*
|
759 |
* @param string $value Name to get detailed information about
|
411 |
|
412 |
/**
|
413 |
* Retrieve ISO date format
|
414 |
+
* and filter for 2 digit year format, it must be 4 digits
|
415 |
*
|
416 |
* @param string $type
|
417 |
* @return string
|
418 |
*/
|
419 |
public function getDateFormat($type=null)
|
420 |
{
|
421 |
+
return preg_replace('/(?<!y)yy(?!y)/', 'yyyy', $this->getTranslation($type, 'date'));
|
422 |
}
|
423 |
|
424 |
/**
|
432 |
$this->getTranslation(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT, 'date'));
|
433 |
}
|
434 |
|
|
|
435 |
/**
|
436 |
* Retrieve ISO time format
|
437 |
*
|
576 |
try {
|
577 |
$currencyObject = new Zend_Currency($currency, $this->getLocale());
|
578 |
} catch (Exception $e) {
|
579 |
+
/**
|
580 |
+
* catch specific exceptions like "Currency 'USD' not found"
|
581 |
+
* - back end falls with specific locals as Malaysia and etc.
|
582 |
+
*
|
583 |
+
* as we can see from Zend framework ticket
|
584 |
+
* http://framework.zend.com/issues/browse/ZF-10038
|
585 |
+
* zend team is not going to change it behaviour in the near time
|
586 |
+
*/
|
587 |
+
$currencyObject = new Zend_Currency($currency);
|
588 |
$options['name'] = $currency;
|
589 |
$options['currency'] = $currency;
|
590 |
$options['symbol'] = $currency;
|
761 |
return $this->getLocale()->getTranslation($value, $path, $this->getLocale());
|
762 |
}
|
763 |
|
764 |
+
/**
|
765 |
+
* Replace all yy date format to yyyy
|
766 |
+
*
|
767 |
+
* @param $currentFormat
|
768 |
+
* @return mixed
|
769 |
+
*/
|
770 |
+
protected function _convertYearTwoDigitTo4($currentFormat)
|
771 |
+
{
|
772 |
+
return preg_replace('/(\byy\b)/', 'yyyy', $currentFormat);
|
773 |
+
}
|
774 |
+
|
775 |
+
/**
|
776 |
* Returns the localized country name
|
777 |
*
|
778 |
* @param string $value Name to get detailed information about
|
app/code/core/Mage/Core/Model/Resource/Design.php
CHANGED
@@ -52,27 +52,22 @@ class Mage_Core_Model_Resource_Design extends Mage_Core_Model_Resource_Db_Abstra
|
|
52 |
*/
|
53 |
public function _beforeSave(Mage_Core_Model_Abstract $object)
|
54 |
{
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
$
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
}
|
66 |
-
|
67 |
-
if (!is_null($object->getDateFrom()) && !is_null($object->getDateTo())
|
68 |
-
&& Varien_Date::toTimestamp($object->getDateFrom()) > Varien_Date::toTimestamp($object->getDateTo())) {
|
69 |
-
Mage::throwException(Mage::helper('core')->__('Start date cannot be greater than end date.'));
|
70 |
}
|
71 |
|
72 |
$check = $this->_checkIntersection(
|
73 |
$object->getStoreId(),
|
74 |
-
$
|
75 |
-
$
|
76 |
$object->getId()
|
77 |
);
|
78 |
|
@@ -81,11 +76,6 @@ class Mage_Core_Model_Resource_Design extends Mage_Core_Model_Resource_Db_Abstra
|
|
81 |
Mage::helper('core')->__('Your design change for the specified store intersects with another one, please specify another date range.'));
|
82 |
}
|
83 |
|
84 |
-
if ($object->getDateFrom() === null)
|
85 |
-
$object->setDateFrom(new Zend_Db_Expr('null'));
|
86 |
-
if ($object->getDateTo() === null)
|
87 |
-
$object->setDateTo(new Zend_Db_Expr('null'));
|
88 |
-
|
89 |
parent::_beforeSave($object);
|
90 |
}
|
91 |
|
@@ -109,7 +99,7 @@ class Mage_Core_Model_Resource_Design extends Mage_Core_Model_Resource_Db_Abstra
|
|
109 |
|
110 |
$dateConditions = array('date_to IS NULL AND date_from IS NULL');
|
111 |
|
112 |
-
if (!
|
113 |
$dateConditions[] = ':date_from BETWEEN date_from AND date_to';
|
114 |
$dateConditions[] = ':date_from >= date_from and date_to IS NULL';
|
115 |
$dateConditions[] = ':date_from <= date_to and date_from IS NULL';
|
@@ -117,7 +107,7 @@ class Mage_Core_Model_Resource_Design extends Mage_Core_Model_Resource_Db_Abstra
|
|
117 |
$dateConditions[] = 'date_from IS NULL';
|
118 |
}
|
119 |
|
120 |
-
if (!
|
121 |
$dateConditions[] = ':date_to BETWEEN date_from AND date_to';
|
122 |
$dateConditions[] = ':date_to >= date_from AND date_to IS NULL';
|
123 |
$dateConditions[] = ':date_to <= date_to AND date_from IS NULL';
|
@@ -125,18 +115,18 @@ class Mage_Core_Model_Resource_Design extends Mage_Core_Model_Resource_Db_Abstra
|
|
125 |
$dateConditions[] = 'date_to IS NULL';
|
126 |
}
|
127 |
|
128 |
-
if (
|
129 |
$dateConditions[] = 'date_to <= :date_to OR date_from <= :date_to';
|
130 |
}
|
131 |
|
132 |
-
if (!
|
133 |
$dateConditions[] = 'date_to >= :date_from OR date_from >= :date_from';
|
134 |
}
|
135 |
|
136 |
-
if (!
|
137 |
$dateConditions[] = 'date_from BETWEEN :date_from AND :date_to';
|
138 |
$dateConditions[] = 'date_to BETWEEN :date_from AND :date_to';
|
139 |
-
} elseif (
|
140 |
$dateConditions = array();
|
141 |
}
|
142 |
|
@@ -151,10 +141,10 @@ class Mage_Core_Model_Resource_Design extends Mage_Core_Model_Resource_Db_Abstra
|
|
151 |
'current_id' => (int)$currentId,
|
152 |
);
|
153 |
|
154 |
-
if (!
|
155 |
$bind['date_to'] = $dateTo;
|
156 |
}
|
157 |
-
if (!
|
158 |
$bind['date_from'] = $dateFrom;
|
159 |
}
|
160 |
|
52 |
*/
|
53 |
public function _beforeSave(Mage_Core_Model_Abstract $object)
|
54 |
{
|
55 |
+
$dateFrom = $object->getDateFrom();
|
56 |
+
$dateTo = $object->getDateTo();
|
57 |
+
if (!empty($dateFrom) && !empty($dateTo)) {
|
58 |
+
$validator = new Zend_Validate_Date();
|
59 |
+
if (!$validator->isValid($dateFrom) || !$validator->isValid($dateTo)) {
|
60 |
+
Mage::throwException(Mage::helper('core')->__('Invalid date'));
|
61 |
+
}
|
62 |
+
if (Varien_Date::toTimestamp($dateFrom) > Varien_Date::toTimestamp($dateTo)) {
|
63 |
+
Mage::throwException(Mage::helper('core')->__('Start date cannot be greater than end date.'));
|
64 |
+
}
|
|
|
|
|
|
|
|
|
|
|
65 |
}
|
66 |
|
67 |
$check = $this->_checkIntersection(
|
68 |
$object->getStoreId(),
|
69 |
+
$dateFrom,
|
70 |
+
$dateTo,
|
71 |
$object->getId()
|
72 |
);
|
73 |
|
76 |
Mage::helper('core')->__('Your design change for the specified store intersects with another one, please specify another date range.'));
|
77 |
}
|
78 |
|
|
|
|
|
|
|
|
|
|
|
79 |
parent::_beforeSave($object);
|
80 |
}
|
81 |
|
99 |
|
100 |
$dateConditions = array('date_to IS NULL AND date_from IS NULL');
|
101 |
|
102 |
+
if (!empty($dateFrom)) {
|
103 |
$dateConditions[] = ':date_from BETWEEN date_from AND date_to';
|
104 |
$dateConditions[] = ':date_from >= date_from and date_to IS NULL';
|
105 |
$dateConditions[] = ':date_from <= date_to and date_from IS NULL';
|
107 |
$dateConditions[] = 'date_from IS NULL';
|
108 |
}
|
109 |
|
110 |
+
if (!empty($dateTo)) {
|
111 |
$dateConditions[] = ':date_to BETWEEN date_from AND date_to';
|
112 |
$dateConditions[] = ':date_to >= date_from AND date_to IS NULL';
|
113 |
$dateConditions[] = ':date_to <= date_to AND date_from IS NULL';
|
115 |
$dateConditions[] = 'date_to IS NULL';
|
116 |
}
|
117 |
|
118 |
+
if (empty($dateFrom) && !empty($dateTo)) {
|
119 |
$dateConditions[] = 'date_to <= :date_to OR date_from <= :date_to';
|
120 |
}
|
121 |
|
122 |
+
if (!empty($dateFrom) && empty($dateTo)) {
|
123 |
$dateConditions[] = 'date_to >= :date_from OR date_from >= :date_from';
|
124 |
}
|
125 |
|
126 |
+
if (!empty($dateFrom) && !empty($dateTo)) {
|
127 |
$dateConditions[] = 'date_from BETWEEN :date_from AND :date_to';
|
128 |
$dateConditions[] = 'date_to BETWEEN :date_from AND :date_to';
|
129 |
+
} elseif (empty($dateFrom) && empty($dateTo)) {
|
130 |
$dateConditions = array();
|
131 |
}
|
132 |
|
141 |
'current_id' => (int)$currentId,
|
142 |
);
|
143 |
|
144 |
+
if (!empty($dateTo)) {
|
145 |
$bind['date_to'] = $dateTo;
|
146 |
}
|
147 |
+
if (!empty($dateFrom)) {
|
148 |
$bind['date_from'] = $dateFrom;
|
149 |
}
|
150 |
|
app/code/core/Mage/Core/Model/Store.php
CHANGED
@@ -52,38 +52,92 @@ class Mage_Core_Model_Store extends Mage_Core_Model_Abstract
|
|
52 |
* Configuration pathes
|
53 |
*/
|
54 |
const XML_PATH_STORE_STORE_NAME = 'general/store_information/name';
|
|
|
|
|
|
|
55 |
const XML_PATH_STORE_STORE_PHONE = 'general/store_information/phone';
|
|
|
|
|
|
|
56 |
const XML_PATH_STORE_IN_URL = 'web/url/use_store';
|
|
|
|
|
|
|
57 |
const XML_PATH_USE_REWRITES = 'web/seo/use_rewrites';
|
|
|
|
|
|
|
58 |
const XML_PATH_UNSECURE_BASE_URL = 'web/unsecure/base_url';
|
|
|
|
|
|
|
59 |
const XML_PATH_SECURE_BASE_URL = 'web/secure/base_url';
|
|
|
|
|
|
|
60 |
const XML_PATH_SECURE_IN_FRONTEND = 'web/secure/use_in_frontend';
|
|
|
|
|
|
|
61 |
const XML_PATH_SECURE_IN_ADMINHTML = 'web/secure/use_in_adminhtml';
|
|
|
|
|
|
|
62 |
const XML_PATH_SECURE_BASE_LINK_URL = 'web/secure/base_link_url';
|
|
|
|
|
|
|
63 |
const XML_PATH_UNSECURE_BASE_LINK_URL = 'web/unsecure/base_link_url';
|
|
|
|
|
|
|
64 |
const XML_PATH_OFFLOADER_HEADER = 'web/secure/offloader_header';
|
|
|
|
|
|
|
65 |
const XML_PATH_PRICE_SCOPE = 'catalog/price/scope';
|
66 |
|
67 |
/**
|
68 |
* Price scope constants
|
69 |
*/
|
70 |
const PRICE_SCOPE_GLOBAL = 0;
|
|
|
|
|
|
|
71 |
const PRICE_SCOPE_WEBSITE = 1;
|
72 |
|
73 |
/**
|
74 |
* Possible URL types
|
75 |
*/
|
76 |
const URL_TYPE_LINK = 'link';
|
|
|
|
|
|
|
77 |
const URL_TYPE_DIRECT_LINK = 'direct_link';
|
|
|
|
|
|
|
78 |
const URL_TYPE_WEB = 'web';
|
|
|
|
|
|
|
79 |
const URL_TYPE_SKIN = 'skin';
|
|
|
|
|
|
|
80 |
const URL_TYPE_JS = 'js';
|
|
|
|
|
|
|
81 |
const URL_TYPE_MEDIA = 'media';
|
82 |
|
83 |
/**
|
84 |
* Code constants
|
85 |
*/
|
86 |
const DEFAULT_CODE = 'default';
|
|
|
|
|
|
|
87 |
const ADMIN_CODE = 'admin';
|
88 |
|
89 |
/**
|
@@ -259,7 +313,7 @@ class Mage_Core_Model_Store extends Mage_Core_Model_Abstract
|
|
259 |
* @param string $field
|
260 |
* @return Mage_Core_Model_Store
|
261 |
*/
|
262 |
-
public function load($id, $field=null)
|
263 |
{
|
264 |
if (!is_numeric($id) && is_null($field)) {
|
265 |
$this->_getResource()->load($this, $id, 'code');
|
@@ -964,13 +1018,11 @@ class Mage_Core_Model_Store extends Mage_Core_Model_Abstract
|
|
964 |
$this->_priceFilter = $this->getCurrentCurrency()->getFilter();
|
965 |
$this->_priceFilter->setRate($this->getBaseCurrency()->getRate($this->getCurrentCurrency()));
|
966 |
}
|
967 |
-
elseif($this->getDefaultCurrency()) {
|
968 |
$this->_priceFilter = $this->getDefaultCurrency()->getFilter();
|
969 |
-
}
|
970 |
-
else {
|
971 |
$this->_priceFilter = new Varien_Filter_Sprintf('%s', 2);
|
972 |
}
|
973 |
-
}
|
974 |
return $this->_priceFilter;
|
975 |
}
|
976 |
|
52 |
* Configuration pathes
|
53 |
*/
|
54 |
const XML_PATH_STORE_STORE_NAME = 'general/store_information/name';
|
55 |
+
/**
|
56 |
+
*
|
57 |
+
*/
|
58 |
const XML_PATH_STORE_STORE_PHONE = 'general/store_information/phone';
|
59 |
+
/**
|
60 |
+
*
|
61 |
+
*/
|
62 |
const XML_PATH_STORE_IN_URL = 'web/url/use_store';
|
63 |
+
/**
|
64 |
+
*
|
65 |
+
*/
|
66 |
const XML_PATH_USE_REWRITES = 'web/seo/use_rewrites';
|
67 |
+
/**
|
68 |
+
*
|
69 |
+
*/
|
70 |
const XML_PATH_UNSECURE_BASE_URL = 'web/unsecure/base_url';
|
71 |
+
/**
|
72 |
+
*
|
73 |
+
*/
|
74 |
const XML_PATH_SECURE_BASE_URL = 'web/secure/base_url';
|
75 |
+
/**
|
76 |
+
*
|
77 |
+
*/
|
78 |
const XML_PATH_SECURE_IN_FRONTEND = 'web/secure/use_in_frontend';
|
79 |
+
/**
|
80 |
+
*
|
81 |
+
*/
|
82 |
const XML_PATH_SECURE_IN_ADMINHTML = 'web/secure/use_in_adminhtml';
|
83 |
+
/**
|
84 |
+
*
|
85 |
+
*/
|
86 |
const XML_PATH_SECURE_BASE_LINK_URL = 'web/secure/base_link_url';
|
87 |
+
/**
|
88 |
+
*
|
89 |
+
*/
|
90 |
const XML_PATH_UNSECURE_BASE_LINK_URL = 'web/unsecure/base_link_url';
|
91 |
+
/**
|
92 |
+
*
|
93 |
+
*/
|
94 |
const XML_PATH_OFFLOADER_HEADER = 'web/secure/offloader_header';
|
95 |
+
/**
|
96 |
+
*
|
97 |
+
*/
|
98 |
const XML_PATH_PRICE_SCOPE = 'catalog/price/scope';
|
99 |
|
100 |
/**
|
101 |
* Price scope constants
|
102 |
*/
|
103 |
const PRICE_SCOPE_GLOBAL = 0;
|
104 |
+
/**
|
105 |
+
*
|
106 |
+
*/
|
107 |
const PRICE_SCOPE_WEBSITE = 1;
|
108 |
|
109 |
/**
|
110 |
* Possible URL types
|
111 |
*/
|
112 |
const URL_TYPE_LINK = 'link';
|
113 |
+
/**
|
114 |
+
*
|
115 |
+
*/
|
116 |
const URL_TYPE_DIRECT_LINK = 'direct_link';
|
117 |
+
/**
|
118 |
+
*
|
119 |
+
*/
|
120 |
const URL_TYPE_WEB = 'web';
|
121 |
+
/**
|
122 |
+
*
|
123 |
+
*/
|
124 |
const URL_TYPE_SKIN = 'skin';
|
125 |
+
/**
|
126 |
+
*
|
127 |
+
*/
|
128 |
const URL_TYPE_JS = 'js';
|
129 |
+
/**
|
130 |
+
*
|
131 |
+
*/
|
132 |
const URL_TYPE_MEDIA = 'media';
|
133 |
|
134 |
/**
|
135 |
* Code constants
|
136 |
*/
|
137 |
const DEFAULT_CODE = 'default';
|
138 |
+
/**
|
139 |
+
*
|
140 |
+
*/
|
141 |
const ADMIN_CODE = 'admin';
|
142 |
|
143 |
/**
|
313 |
* @param string $field
|
314 |
* @return Mage_Core_Model_Store
|
315 |
*/
|
316 |
+
public function load($id, $field = null)
|
317 |
{
|
318 |
if (!is_numeric($id) && is_null($field)) {
|
319 |
$this->_getResource()->load($this, $id, 'code');
|
1018 |
$this->_priceFilter = $this->getCurrentCurrency()->getFilter();
|
1019 |
$this->_priceFilter->setRate($this->getBaseCurrency()->getRate($this->getCurrentCurrency()));
|
1020 |
}
|
1021 |
+
} elseif ($this->getDefaultCurrency()) {
|
1022 |
$this->_priceFilter = $this->getDefaultCurrency()->getFilter();
|
1023 |
+
} else {
|
|
|
1024 |
$this->_priceFilter = new Varien_Filter_Sprintf('%s', 2);
|
1025 |
}
|
|
|
1026 |
return $this->_priceFilter;
|
1027 |
}
|
1028 |
|
app/code/core/Mage/Core/etc/config.xml
CHANGED
@@ -28,7 +28,7 @@
|
|
28 |
<config>
|
29 |
<modules>
|
30 |
<Mage_Core>
|
31 |
-
<version>1.6.0.
|
32 |
</Mage_Core>
|
33 |
</modules>
|
34 |
<global>
|
28 |
<config>
|
29 |
<modules>
|
30 |
<Mage_Core>
|
31 |
+
<version>1.6.0.4</version>
|
32 |
</Mage_Core>
|
33 |
</modules>
|
34 |
<global>
|
app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.7.3-0.7.4.php
CHANGED
@@ -29,7 +29,7 @@ $installer = $this;
|
|
29 |
|
30 |
$installer->startSetup();
|
31 |
|
32 |
-
$rows = $installer->_conn->fetchAll("select * from {$this->getTable('core_config_data')} where path in ('
|
33 |
|
34 |
$hlp = Mage::helper('core');
|
35 |
foreach ($rows as $r) {
|
29 |
|
30 |
$installer->startSetup();
|
31 |
|
32 |
+
$rows = $installer->_conn->fetchAll("select * from {$this->getTable('core_config_data')} where path in ('paypal/wpp/api_password', 'paypal/wpp/api_signature', 'paypal/wpp/api_username', 'paypal/wps/business_account', 'paypal/wpuk/user', 'paypal/wpuk/pwd', 'carriers/dhl/id', 'carriers/dhl/password', 'carriers/dhl/shipping_key', 'carriers/dhl/shipping_intlkey', 'carriers/fedex/account', 'carriers/ups/account_license_number', 'carriers/ups/username', 'carriers/usps/userid', 'payment/authorizenet/login', 'payment/authorizenet/trans_key', 'payment/verisign/pwd', 'payment/verisign/user')");
|
33 |
|
34 |
$hlp = Mage::helper('core');
|
35 |
foreach ($rows as $r) {
|
app/code/core/Mage/{GoogleCheckout/sql/googlecheckout_setup/mysql4-upgrade-1.6.0.0-1.6.0.1.php → Core/sql/core_setup/upgrade-1.6.0.3-1.6.0.4.php}
RENAMED
@@ -19,17 +19,22 @@
|
|
19 |
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
*
|
21 |
* @category Mage
|
22 |
-
* @package
|
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
|
28 |
$installer = $this;
|
29 |
|
30 |
-
$installer->
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
'
|
|
|
|
|
|
|
35 |
);
|
|
|
|
19 |
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
*
|
21 |
* @category Mage
|
22 |
+
* @package Mage_Core
|
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 |
|
30 |
+
$installer->startSetup();
|
31 |
+
$connection = $installer->getConnection();
|
32 |
+
|
33 |
+
$connection->delete(
|
34 |
+
$this->getTable('core_config_data'),
|
35 |
+
$connection->prepareSqlCondition('path', array(
|
36 |
+
'like' => 'google/checkout%'
|
37 |
+
))
|
38 |
);
|
39 |
+
|
40 |
+
$installer->endSetup();
|
app/code/core/Mage/Customer/Helper/Address.php
CHANGED
@@ -126,7 +126,7 @@ class Mage_Customer_Helper_Address extends Mage_Core_Helper_Abstract
|
|
126 |
if($lines <= 0) {
|
127 |
$lines = 2;
|
128 |
}
|
129 |
-
$this->_streetLines[$websiteId] = min(
|
130 |
}
|
131 |
|
132 |
return $this->_streetLines[$websiteId];
|
126 |
if($lines <= 0) {
|
127 |
$lines = 2;
|
128 |
}
|
129 |
+
$this->_streetLines[$websiteId] = min(20, $lines);
|
130 |
}
|
131 |
|
132 |
return $this->_streetLines[$websiteId];
|
app/code/core/Mage/Customer/Model/Address/Abstract.php
CHANGED
@@ -53,6 +53,13 @@ class Mage_Customer_Model_Address_Abstract extends Mage_Core_Model_Abstract
|
|
53 |
*/
|
54 |
protected $_eventObject = 'customer_address';
|
55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
/**
|
57 |
* Directory country models
|
58 |
*
|
@@ -350,53 +357,94 @@ class Mage_Customer_Model_Address_Abstract extends Mage_Core_Model_Abstract
|
|
350 |
/**
|
351 |
* Validate address attribute values
|
352 |
*
|
353 |
-
* @return bool
|
354 |
*/
|
355 |
public function validate()
|
356 |
{
|
357 |
-
$
|
|
|
358 |
$this->implodeStreetAddress();
|
|
|
359 |
if (!Zend_Validate::is($this->getFirstname(), 'NotEmpty')) {
|
360 |
-
$
|
361 |
}
|
362 |
|
363 |
if (!Zend_Validate::is($this->getLastname(), 'NotEmpty')) {
|
364 |
-
$
|
365 |
}
|
366 |
|
367 |
if (!Zend_Validate::is($this->getStreet(1), 'NotEmpty')) {
|
368 |
-
$
|
369 |
}
|
370 |
|
371 |
if (!Zend_Validate::is($this->getCity(), 'NotEmpty')) {
|
372 |
-
$
|
373 |
}
|
374 |
|
375 |
if (!Zend_Validate::is($this->getTelephone(), 'NotEmpty')) {
|
376 |
-
$
|
377 |
}
|
378 |
|
379 |
$_havingOptionalZip = Mage::helper('directory')->getCountriesWithOptionalZip();
|
380 |
if (!in_array($this->getCountryId(), $_havingOptionalZip)
|
381 |
&& !Zend_Validate::is($this->getPostcode(), 'NotEmpty')
|
382 |
) {
|
383 |
-
$
|
384 |
}
|
385 |
|
386 |
if (!Zend_Validate::is($this->getCountryId(), 'NotEmpty')) {
|
387 |
-
$
|
388 |
}
|
389 |
|
390 |
if ($this->getCountryModel()->getRegionCollection()->getSize()
|
391 |
&& !Zend_Validate::is($this->getRegionId(), 'NotEmpty')
|
392 |
&& Mage::helper('directory')->isRegionRequired($this->getCountryId())
|
393 |
) {
|
394 |
-
$
|
395 |
}
|
396 |
|
|
|
|
|
|
|
|
|
|
|
|
|
397 |
if (empty($errors) || $this->getShouldIgnoreValidation()) {
|
398 |
return true;
|
399 |
}
|
400 |
return $errors;
|
401 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
402 |
}
|
53 |
*/
|
54 |
protected $_eventObject = 'customer_address';
|
55 |
|
56 |
+
/**
|
57 |
+
* List of errors
|
58 |
+
*
|
59 |
+
* @var array
|
60 |
+
*/
|
61 |
+
protected $_errors = array();
|
62 |
+
|
63 |
/**
|
64 |
* Directory country models
|
65 |
*
|
357 |
/**
|
358 |
* Validate address attribute values
|
359 |
*
|
360 |
+
* @return array | bool
|
361 |
*/
|
362 |
public function validate()
|
363 |
{
|
364 |
+
$this->_resetErrors();
|
365 |
+
|
366 |
$this->implodeStreetAddress();
|
367 |
+
|
368 |
if (!Zend_Validate::is($this->getFirstname(), 'NotEmpty')) {
|
369 |
+
$this->addError(Mage::helper('customer')->__('Please enter the first name.'));
|
370 |
}
|
371 |
|
372 |
if (!Zend_Validate::is($this->getLastname(), 'NotEmpty')) {
|
373 |
+
$this->addError(Mage::helper('customer')->__('Please enter the last name.'));
|
374 |
}
|
375 |
|
376 |
if (!Zend_Validate::is($this->getStreet(1), 'NotEmpty')) {
|
377 |
+
$this->addError(Mage::helper('customer')->__('Please enter the street.'));
|
378 |
}
|
379 |
|
380 |
if (!Zend_Validate::is($this->getCity(), 'NotEmpty')) {
|
381 |
+
$this->addError(Mage::helper('customer')->__('Please enter the city.'));
|
382 |
}
|
383 |
|
384 |
if (!Zend_Validate::is($this->getTelephone(), 'NotEmpty')) {
|
385 |
+
$this->addError(Mage::helper('customer')->__('Please enter the telephone number.'));
|
386 |
}
|
387 |
|
388 |
$_havingOptionalZip = Mage::helper('directory')->getCountriesWithOptionalZip();
|
389 |
if (!in_array($this->getCountryId(), $_havingOptionalZip)
|
390 |
&& !Zend_Validate::is($this->getPostcode(), 'NotEmpty')
|
391 |
) {
|
392 |
+
$this->addError(Mage::helper('customer')->__('Please enter the zip/postal code.'));
|
393 |
}
|
394 |
|
395 |
if (!Zend_Validate::is($this->getCountryId(), 'NotEmpty')) {
|
396 |
+
$this->addError(Mage::helper('customer')->__('Please enter the country.'));
|
397 |
}
|
398 |
|
399 |
if ($this->getCountryModel()->getRegionCollection()->getSize()
|
400 |
&& !Zend_Validate::is($this->getRegionId(), 'NotEmpty')
|
401 |
&& Mage::helper('directory')->isRegionRequired($this->getCountryId())
|
402 |
) {
|
403 |
+
$this->addError(Mage::helper('customer')->__('Please enter the state/province.'));
|
404 |
}
|
405 |
|
406 |
+
Mage::dispatchEvent('customer_address_validation_after', array('address' => $this));
|
407 |
+
|
408 |
+
$errors = $this->_getErrors();
|
409 |
+
|
410 |
+
$this->_resetErrors();
|
411 |
+
|
412 |
if (empty($errors) || $this->getShouldIgnoreValidation()) {
|
413 |
return true;
|
414 |
}
|
415 |
return $errors;
|
416 |
}
|
417 |
+
|
418 |
+
/**
|
419 |
+
* Add error
|
420 |
+
*
|
421 |
+
* @param $error
|
422 |
+
* @return Mage_Customer_Model_Address_Abstract
|
423 |
+
*/
|
424 |
+
public function addError($error)
|
425 |
+
{
|
426 |
+
$this->_errors[] = $error;
|
427 |
+
return $this;
|
428 |
+
}
|
429 |
+
|
430 |
+
/**
|
431 |
+
* Retreive errors
|
432 |
+
*
|
433 |
+
* @return array
|
434 |
+
*/
|
435 |
+
protected function _getErrors()
|
436 |
+
{
|
437 |
+
return $this->_errors;
|
438 |
+
}
|
439 |
+
|
440 |
+
/**
|
441 |
+
* Reset errors array
|
442 |
+
*
|
443 |
+
* @return Mage_Customer_Model_Address_Abstract
|
444 |
+
*/
|
445 |
+
protected function _resetErrors()
|
446 |
+
{
|
447 |
+
$this->_errors = array();
|
448 |
+
return $this;
|
449 |
+
}
|
450 |
}
|
app/code/core/Mage/Customer/controllers/AccountController.php
CHANGED
@@ -136,6 +136,11 @@ class Mage_Customer_AccountController extends Mage_Core_Controller_Front_Action
|
|
136 |
*/
|
137 |
public function loginPostAction()
|
138 |
{
|
|
|
|
|
|
|
|
|
|
|
139 |
if ($this->_getSession()->isLoggedIn()) {
|
140 |
$this->_redirect('*/*/');
|
141 |
return;
|
@@ -559,8 +564,7 @@ class Mage_Customer_AccountController extends Mage_Core_Controller_Front_Action
|
|
559 |
{
|
560 |
$session = $this->_getSession();
|
561 |
if ($session->isLoggedIn()) {
|
562 |
-
$this->
|
563 |
-
return;
|
564 |
}
|
565 |
try {
|
566 |
$id = $this->getRequest()->getParam('id', false);
|
136 |
*/
|
137 |
public function loginPostAction()
|
138 |
{
|
139 |
+
if (!$this->_validateFormKey()) {
|
140 |
+
$this->_redirect('*/*/');
|
141 |
+
return;
|
142 |
+
}
|
143 |
+
|
144 |
if ($this->_getSession()->isLoggedIn()) {
|
145 |
$this->_redirect('*/*/');
|
146 |
return;
|
564 |
{
|
565 |
$session = $this->_getSession();
|
566 |
if ($session->isLoggedIn()) {
|
567 |
+
$this->_getSession()->logout()->regenerateSessionId();
|
|
|
568 |
}
|
569 |
try {
|
570 |
$id = $this->getRequest()->getParam('id', false);
|
app/code/core/Mage/{GoogleCheckout/sql/googlecheckout_setup/mysql4-upgrade-0.7.3-0.7.4.php → Customer/data/customer_setup/data-upgrade-1.6.2.0.2-1.6.2.0.3.php}
RENAMED
@@ -19,20 +19,23 @@
|
|
19 |
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
*
|
21 |
* @category Mage
|
22 |
-
* @package
|
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 |
-
|
|
|
|
|
29 |
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
PRIMARY KEY (`serial_number`)
|
36 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8;"
|
37 |
);
|
38 |
|
|
|
|
19 |
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
*
|
21 |
* @category Mage
|
22 |
+
* @package Mage_Customer
|
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_Customer_Model_Entity_Setup */
|
28 |
$installer = $this;
|
29 |
+
$datetimeType = 'datetime';
|
30 |
+
// implementation new type for static date attributes
|
31 |
+
$installer->updateAttribute('customer', 'created_at', 'frontend_input', $datetimeType);
|
32 |
|
33 |
+
// implement new input filter for datetime type attribute
|
34 |
+
$attribute = $installer->getAttribute('customer', 'created_at');
|
35 |
+
|
36 |
+
$attributeBind = array(
|
37 |
+
'input_filter' => $datetimeType,
|
|
|
|
|
38 |
);
|
39 |
|
40 |
+
$attributeWhere = $installer->getConnection()->quoteInto('attribute_id=?', $attribute['attribute_id']);
|
41 |
+
$installer->getConnection()->update($installer->getTable('customer/eav_attribute'), $attributeBind, $attributeWhere);
|
app/code/core/Mage/Customer/etc/config.xml
CHANGED
@@ -28,7 +28,7 @@
|
|
28 |
<config>
|
29 |
<modules>
|
30 |
<Mage_Customer>
|
31 |
-
<version>1.6.2.0.
|
32 |
</Mage_Customer>
|
33 |
</modules>
|
34 |
<admin>
|
28 |
<config>
|
29 |
<modules>
|
30 |
<Mage_Customer>
|
31 |
+
<version>1.6.2.0.3</version>
|
32 |
</Mage_Customer>
|
33 |
</modules>
|
34 |
<admin>
|
app/code/core/Mage/Customer/etc/wsdl.xml
CHANGED
@@ -11,10 +11,16 @@
|
|
11 |
<element name="email" type="xsd:string" minOccurs="0" />
|
12 |
<element name="firstname" type="xsd:string" minOccurs="0" />
|
13 |
<element name="lastname" type="xsd:string" minOccurs="0" />
|
|
|
14 |
<element name="password" type="xsd:string" minOccurs="0" />
|
15 |
<element name="website_id" type="xsd:int" minOccurs="0" />
|
16 |
<element name="store_id" type="xsd:int" minOccurs="0" />
|
17 |
<element name="group_id" type="xsd:int" minOccurs="0" />
|
|
|
|
|
|
|
|
|
|
|
18 |
</all>
|
19 |
</complexType>
|
20 |
<complexType name="customerCustomerEntity">
|
11 |
<element name="email" type="xsd:string" minOccurs="0" />
|
12 |
<element name="firstname" type="xsd:string" minOccurs="0" />
|
13 |
<element name="lastname" type="xsd:string" minOccurs="0" />
|
14 |
+
<element name="middlename" type="xsd:string" minOccurs="0" />
|
15 |
<element name="password" type="xsd:string" minOccurs="0" />
|
16 |
<element name="website_id" type="xsd:int" minOccurs="0" />
|
17 |
<element name="store_id" type="xsd:int" minOccurs="0" />
|
18 |
<element name="group_id" type="xsd:int" minOccurs="0" />
|
19 |
+
<element name="prefix" type="xsd:string" minOccurs="0" />
|
20 |
+
<element name="suffix" type="xsd:string" minOccurs="0" />
|
21 |
+
<element name="dob" type="xsd:string" minOccurs="0" />
|
22 |
+
<element name="taxvat" type="xsd:string" minOccurs="0" />
|
23 |
+
<element name="gender" type="xsd:int" minOccurs="0" />
|
24 |
</all>
|
25 |
</complexType>
|
26 |
<complexType name="customerCustomerEntity">
|
app/code/core/Mage/Customer/etc/wsi.xml
CHANGED
@@ -14,10 +14,16 @@
|
|
14 |
<xsd:element name="email" type="xsd:string" minOccurs="0" />
|
15 |
<xsd:element name="firstname" type="xsd:string" minOccurs="0" />
|
16 |
<xsd:element name="lastname" type="xsd:string" minOccurs="0" />
|
|
|
17 |
<xsd:element name="password" type="xsd:string" minOccurs="0" />
|
18 |
<xsd:element name="website_id" type="xsd:int" minOccurs="0" />
|
19 |
<xsd:element name="store_id" type="xsd:int" minOccurs="0" />
|
20 |
<xsd:element name="group_id" type="xsd:int" minOccurs="0" />
|
|
|
|
|
|
|
|
|
|
|
21 |
</xsd:sequence>
|
22 |
</xsd:complexType>
|
23 |
<xsd:complexType name="customerCustomerEntity">
|
14 |
<xsd:element name="email" type="xsd:string" minOccurs="0" />
|
15 |
<xsd:element name="firstname" type="xsd:string" minOccurs="0" />
|
16 |
<xsd:element name="lastname" type="xsd:string" minOccurs="0" />
|
17 |
+
<xsd:element name="middlename" type="xsd:string" minOccurs="0" />
|
18 |
<xsd:element name="password" type="xsd:string" minOccurs="0" />
|
19 |
<xsd:element name="website_id" type="xsd:int" minOccurs="0" />
|
20 |
<xsd:element name="store_id" type="xsd:int" minOccurs="0" />
|
21 |
<xsd:element name="group_id" type="xsd:int" minOccurs="0" />
|
22 |
+
<xsd:element name="prefix" type="xsd:string" minOccurs="0" />
|
23 |
+
<xsd:element name="suffix" type="xsd:string" minOccurs="0" />
|
24 |
+
<xsd:element name="dob" type="xsd:string" minOccurs="0" />
|
25 |
+
<xsd:element name="taxvat" type="xsd:string" minOccurs="0" />
|
26 |
+
<xsd:element name="gender" type="xsd:int" minOccurs="0" />
|
27 |
</xsd:sequence>
|
28 |
</xsd:complexType>
|
29 |
<xsd:complexType name="customerCustomerEntity">
|
app/code/core/Mage/Customer/sql/customer_setup/upgrade-1.6.2.0.1-1.6.2.0.2.php
ADDED
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_Customer
|
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 |
+
* @var $this Mage_Catalog_Model_Resource_Setup
|
29 |
+
* @var $conn Varien_Db_Adapter_Interface
|
30 |
+
*/
|
31 |
+
$conn = $this->getConnection();
|
32 |
+
|
33 |
+
//get all duplicated emails
|
34 |
+
$select = $conn->select()
|
35 |
+
->from($this->getTable('customer/entity'), array('email', 'website_id', 'cnt' => 'COUNT(*)'))
|
36 |
+
->group('email')
|
37 |
+
->group('website_id')
|
38 |
+
->having('cnt > 1');
|
39 |
+
$emails = $conn->fetchAll($select);
|
40 |
+
|
41 |
+
foreach ($emails as $data) {
|
42 |
+
$email = $data['email'];
|
43 |
+
$websiteId = $data['website_id'];
|
44 |
+
|
45 |
+
$select = $conn->select()
|
46 |
+
->from($this->getTable('customer/entity'), array('entity_id'))
|
47 |
+
->where('email = ?', $email)
|
48 |
+
->where('website_id = ?', $websiteId);
|
49 |
+
$activeId = $conn->fetchOne($select);
|
50 |
+
|
51 |
+
//receive all other duplicated customer ids
|
52 |
+
$select = $conn->select()
|
53 |
+
->from($this->getTable('customer/entity'), array('entity_id', 'email'))
|
54 |
+
->where('email = ?', $email)
|
55 |
+
->where('website_id = ?', $websiteId)
|
56 |
+
->where('entity_id <> ?', $activeId);
|
57 |
+
$result = $conn->fetchAll($select);
|
58 |
+
|
59 |
+
//change email to unique value
|
60 |
+
foreach ($result as $row) {
|
61 |
+
$changedEmail = $conn->getConcatSql(array('"(duplicate"', $row['entity_id'], '")"', '"' . $row['email'] . '"'));
|
62 |
+
$conn->update(
|
63 |
+
$this->getTable('customer/entity'),
|
64 |
+
array('email' => $changedEmail),
|
65 |
+
array('entity_id =?' => $row['entity_id'])
|
66 |
+
);
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
/**
|
71 |
+
* Add unique index for customer_entity table
|
72 |
+
*/
|
73 |
+
$conn->addIndex(
|
74 |
+
$this->getTable('customer/entity'),
|
75 |
+
$this->getIdxName(
|
76 |
+
'customer/entity',
|
77 |
+
array('email', 'website_id'),
|
78 |
+
Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE
|
79 |
+
),
|
80 |
+
array('email', 'website_id'),
|
81 |
+
Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE
|
82 |
+
);
|
app/code/core/Mage/Directory/Model/Currency.php
CHANGED
@@ -34,12 +34,21 @@
|
|
34 |
class Mage_Directory_Model_Currency extends Mage_Core_Model_Abstract
|
35 |
{
|
36 |
/**
|
37 |
-
* CONFIG path
|
38 |
*/
|
39 |
const XML_PATH_CURRENCY_ALLOW = 'currency/options/allow';
|
|
|
|
|
|
|
40 |
const XML_PATH_CURRENCY_DEFAULT = 'currency/options/default';
|
|
|
|
|
|
|
41 |
const XML_PATH_CURRENCY_BASE = 'currency/options/base';
|
42 |
|
|
|
|
|
|
|
43 |
protected $_filter;
|
44 |
|
45 |
/**
|
@@ -50,6 +59,9 @@ class Mage_Directory_Model_Currency extends Mage_Core_Model_Abstract
|
|
50 |
protected $_rates;
|
51 |
|
52 |
|
|
|
|
|
|
|
53 |
protected function _construct()
|
54 |
{
|
55 |
$this->_init('directory/currency');
|
@@ -65,6 +77,11 @@ class Mage_Directory_Model_Currency extends Mage_Core_Model_Abstract
|
|
65 |
return $this->_getData('currency_code');
|
66 |
}
|
67 |
|
|
|
|
|
|
|
|
|
|
|
68 |
public function getCurrencyCode()
|
69 |
{
|
70 |
return $this->_getData('currency_code');
|
@@ -99,7 +116,7 @@ class Mage_Directory_Model_Currency extends Mage_Core_Model_Abstract
|
|
99 |
* @param string $field
|
100 |
* @return Mage_Directory_Model_Currency
|
101 |
*/
|
102 |
-
public function load($id, $field=null)
|
103 |
{
|
104 |
$this->unsRate();
|
105 |
$this->setData('currency_code', $id);
|
@@ -109,8 +126,9 @@ class Mage_Directory_Model_Currency extends Mage_Core_Model_Abstract
|
|
109 |
/**
|
110 |
* Get currency rate (only base=>allowed)
|
111 |
*
|
112 |
-
* @param
|
113 |
-
* @return
|
|
|
114 |
*/
|
115 |
public function getRate($toCurrency)
|
116 |
{
|
@@ -132,8 +150,9 @@ class Mage_Directory_Model_Currency extends Mage_Core_Model_Abstract
|
|
132 |
/**
|
133 |
* Get currency rate (base=>allowed or allowed=>base)
|
134 |
*
|
135 |
-
* @param
|
136 |
-
* @return
|
|
|
137 |
*/
|
138 |
public function getAnyRate($toCurrency)
|
139 |
{
|
@@ -155,20 +174,24 @@ class Mage_Directory_Model_Currency extends Mage_Core_Model_Abstract
|
|
155 |
/**
|
156 |
* Convert price to currency format
|
157 |
*
|
158 |
-
* @param
|
159 |
-
* @param
|
160 |
-
* @return
|
|
|
161 |
*/
|
162 |
-
public function convert($price, $toCurrency=null)
|
163 |
{
|
164 |
if (is_null($toCurrency)) {
|
165 |
return $price;
|
166 |
-
}
|
167 |
-
|
168 |
-
|
|
|
|
|
169 |
}
|
170 |
|
171 |
-
throw new Exception(Mage::helper('directory')->__('Undefined rate from "%s-%s".', $this->getCode(),
|
|
|
172 |
}
|
173 |
|
174 |
/**
|
@@ -188,11 +211,13 @@ class Mage_Directory_Model_Currency extends Mage_Core_Model_Abstract
|
|
188 |
/**
|
189 |
* Format price to currency format
|
190 |
*
|
191 |
-
* @param
|
192 |
-
* @param
|
193 |
-
* @
|
|
|
|
|
194 |
*/
|
195 |
-
public function format($price, $options=array(), $includeContainer = true, $addBrackets = false)
|
196 |
{
|
197 |
return $this->formatPrecision($price, 2, $options, $includeContainer, $addBrackets);
|
198 |
}
|
@@ -207,18 +232,27 @@ class Mage_Directory_Model_Currency extends Mage_Core_Model_Abstract
|
|
207 |
* @param bool $addBrackets
|
208 |
* @return string
|
209 |
*/
|
210 |
-
public function formatPrecision($price, $precision, $options=array(), $includeContainer = true,
|
|
|
211 |
{
|
212 |
if (!isset($options['precision'])) {
|
213 |
$options['precision'] = $precision;
|
214 |
}
|
215 |
if ($includeContainer) {
|
216 |
-
return '<span class="price">' . ($addBrackets ? '[' : '') . $this->formatTxt($price, $options) .
|
|
|
217 |
}
|
218 |
return $this->formatTxt($price, $options);
|
219 |
}
|
220 |
|
221 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
{
|
223 |
if (!is_numeric($price)) {
|
224 |
$price = Mage::app()->getLocale()->getNumber($price);
|
@@ -230,19 +264,28 @@ class Mage_Directory_Model_Currency extends Mage_Core_Model_Abstract
|
|
230 |
* %F - the argument is treated as a float, and presented as a floating-point number (non-locale aware).
|
231 |
*/
|
232 |
$price = sprintf("%F", $price);
|
|
|
|
|
|
|
233 |
return Mage::app()->getLocale()->currency($this->getCode())->toCurrency($price, $options);
|
234 |
}
|
235 |
|
|
|
|
|
|
|
|
|
|
|
236 |
public function getOutputFormat()
|
237 |
{
|
238 |
$formated = $this->formatTxt(0);
|
239 |
-
$number = $this->formatTxt(0, array('display'=>Zend_Currency::NO_SYMBOL));
|
240 |
return str_replace($number, '%s', $formated);
|
241 |
}
|
242 |
|
243 |
/**
|
244 |
* Retrieve allowed currencies according to config
|
245 |
*
|
|
|
246 |
*/
|
247 |
public function getConfigAllowCurrencies()
|
248 |
{
|
@@ -264,6 +307,7 @@ class Mage_Directory_Model_Currency extends Mage_Core_Model_Abstract
|
|
264 |
/**
|
265 |
* Retrieve default currencies according to config
|
266 |
*
|
|
|
267 |
*/
|
268 |
public function getConfigDefaultCurrencies()
|
269 |
{
|
@@ -272,6 +316,11 @@ class Mage_Directory_Model_Currency extends Mage_Core_Model_Abstract
|
|
272 |
}
|
273 |
|
274 |
|
|
|
|
|
|
|
|
|
|
|
275 |
public function getConfigBaseCurrencies()
|
276 |
{
|
277 |
$defaultCurrencies = $this->_getResource()->getConfigCurrencies($this, self::XML_PATH_CURRENCY_BASE);
|
@@ -285,7 +334,7 @@ class Mage_Directory_Model_Currency extends Mage_Core_Model_Abstract
|
|
285 |
* @param array $toCurrencies
|
286 |
* @return array
|
287 |
*/
|
288 |
-
public function getCurrencyRates($currency, $toCurrencies=null)
|
289 |
{
|
290 |
if ($currency instanceof Mage_Directory_Model_Currency) {
|
291 |
$currency = $currency->getCode();
|
34 |
class Mage_Directory_Model_Currency extends Mage_Core_Model_Abstract
|
35 |
{
|
36 |
/**
|
37 |
+
* CONFIG path constant: ALLOW
|
38 |
*/
|
39 |
const XML_PATH_CURRENCY_ALLOW = 'currency/options/allow';
|
40 |
+
/**
|
41 |
+
* CONFIG path constant: DEFAULT
|
42 |
+
*/
|
43 |
const XML_PATH_CURRENCY_DEFAULT = 'currency/options/default';
|
44 |
+
/**
|
45 |
+
* CONFIG path constant: BASE
|
46 |
+
*/
|
47 |
const XML_PATH_CURRENCY_BASE = 'currency/options/base';
|
48 |
|
49 |
+
/**
|
50 |
+
* @var Mage_Directory_Model_Currency_Filter - currency filter
|
51 |
+
*/
|
52 |
protected $_filter;
|
53 |
|
54 |
/**
|
59 |
protected $_rates;
|
60 |
|
61 |
|
62 |
+
/**
|
63 |
+
* Class constructor
|
64 |
+
*/
|
65 |
protected function _construct()
|
66 |
{
|
67 |
$this->_init('directory/currency');
|
77 |
return $this->_getData('currency_code');
|
78 |
}
|
79 |
|
80 |
+
/**
|
81 |
+
* Get currency code
|
82 |
+
*
|
83 |
+
* @return string
|
84 |
+
*/
|
85 |
public function getCurrencyCode()
|
86 |
{
|
87 |
return $this->_getData('currency_code');
|
116 |
* @param string $field
|
117 |
* @return Mage_Directory_Model_Currency
|
118 |
*/
|
119 |
+
public function load($id, $field = null)
|
120 |
{
|
121 |
$this->unsRate();
|
122 |
$this->setData('currency_code', $id);
|
126 |
/**
|
127 |
* Get currency rate (only base=>allowed)
|
128 |
*
|
129 |
+
* @param string|Mage_Directory_Model_Currency $toCurrency
|
130 |
+
* @return string
|
131 |
+
* @throws Mage_Core_Exception
|
132 |
*/
|
133 |
public function getRate($toCurrency)
|
134 |
{
|
150 |
/**
|
151 |
* Get currency rate (base=>allowed or allowed=>base)
|
152 |
*
|
153 |
+
* @param string|Mage_Directory_Model_Currency $toCurrency
|
154 |
+
* @return string
|
155 |
+
* @throws Mage_Core_Exception
|
156 |
*/
|
157 |
public function getAnyRate($toCurrency)
|
158 |
{
|
174 |
/**
|
175 |
* Convert price to currency format
|
176 |
*
|
177 |
+
* @param float $price
|
178 |
+
* @param null|string|Mage_Directory_Model_Currency $toCurrency
|
179 |
+
* @return float
|
180 |
+
* @throws Exception
|
181 |
*/
|
182 |
+
public function convert($price, $toCurrency = null)
|
183 |
{
|
184 |
if (is_null($toCurrency)) {
|
185 |
return $price;
|
186 |
+
} else {
|
187 |
+
$rate = $this->getRate($toCurrency);
|
188 |
+
if ($rate) {
|
189 |
+
return $price * $rate;
|
190 |
+
}
|
191 |
}
|
192 |
|
193 |
+
throw new Exception(Mage::helper('directory')->__('Undefined rate from "%s-%s".', $this->getCode(),
|
194 |
+
$toCurrency->getCode()));
|
195 |
}
|
196 |
|
197 |
/**
|
211 |
/**
|
212 |
* Format price to currency format
|
213 |
*
|
214 |
+
* @param float $price
|
215 |
+
* @param array $options
|
216 |
+
* @param bool $includeContainer
|
217 |
+
* @param bool $addBrackets
|
218 |
+
* @return string
|
219 |
*/
|
220 |
+
public function format($price, $options = array(), $includeContainer = true, $addBrackets = false)
|
221 |
{
|
222 |
return $this->formatPrecision($price, 2, $options, $includeContainer, $addBrackets);
|
223 |
}
|
232 |
* @param bool $addBrackets
|
233 |
* @return string
|
234 |
*/
|
235 |
+
public function formatPrecision($price, $precision, $options = array(), $includeContainer = true,
|
236 |
+
$addBrackets = false)
|
237 |
{
|
238 |
if (!isset($options['precision'])) {
|
239 |
$options['precision'] = $precision;
|
240 |
}
|
241 |
if ($includeContainer) {
|
242 |
+
return '<span class="price">' . ($addBrackets ? '[' : '') . $this->formatTxt($price, $options) .
|
243 |
+
($addBrackets ? ']' : '') . '</span>';
|
244 |
}
|
245 |
return $this->formatTxt($price, $options);
|
246 |
}
|
247 |
|
248 |
+
/**
|
249 |
+
* Returns the formatted price
|
250 |
+
*
|
251 |
+
* @param float $price
|
252 |
+
* @param null|array $options
|
253 |
+
* @return string
|
254 |
+
*/
|
255 |
+
public function formatTxt($price, $options = array())
|
256 |
{
|
257 |
if (!is_numeric($price)) {
|
258 |
$price = Mage::app()->getLocale()->getNumber($price);
|
264 |
* %F - the argument is treated as a float, and presented as a floating-point number (non-locale aware).
|
265 |
*/
|
266 |
$price = sprintf("%F", $price);
|
267 |
+
if ($price == -0) {
|
268 |
+
$price = 0;
|
269 |
+
}
|
270 |
return Mage::app()->getLocale()->currency($this->getCode())->toCurrency($price, $options);
|
271 |
}
|
272 |
|
273 |
+
/**
|
274 |
+
* Returns the formatting template for numbers
|
275 |
+
*
|
276 |
+
* @return string
|
277 |
+
*/
|
278 |
public function getOutputFormat()
|
279 |
{
|
280 |
$formated = $this->formatTxt(0);
|
281 |
+
$number = $this->formatTxt(0, array('display' => Zend_Currency::NO_SYMBOL));
|
282 |
return str_replace($number, '%s', $formated);
|
283 |
}
|
284 |
|
285 |
/**
|
286 |
* Retrieve allowed currencies according to config
|
287 |
*
|
288 |
+
* @return array
|
289 |
*/
|
290 |
public function getConfigAllowCurrencies()
|
291 |
{
|
307 |
/**
|
308 |
* Retrieve default currencies according to config
|
309 |
*
|
310 |
+
* @return array
|
311 |
*/
|
312 |
public function getConfigDefaultCurrencies()
|
313 |
{
|
316 |
}
|
317 |
|
318 |
|
319 |
+
/**
|
320 |
+
* Retrieve base currencies according to config
|
321 |
+
*
|
322 |
+
* @return array
|
323 |
+
*/
|
324 |
public function getConfigBaseCurrencies()
|
325 |
{
|
326 |
$defaultCurrencies = $this->_getResource()->getConfigCurrencies($this, self::XML_PATH_CURRENCY_BASE);
|
334 |
* @param array $toCurrencies
|
335 |
* @return array
|
336 |
*/
|
337 |
+
public function getCurrencyRates($currency, $toCurrencies = null)
|
338 |
{
|
339 |
if ($currency instanceof Mage_Directory_Model_Currency) {
|
340 |
$currency = $currency->getCode();
|
app/code/core/Mage/Directory/Model/Resource/Region/Collection.php
CHANGED
@@ -180,7 +180,7 @@ class Mage_Directory_Model_Resource_Region_Collection extends Mage_Core_Model_Re
|
|
180 |
if (count($options) > 0) {
|
181 |
array_unshift($options, array(
|
182 |
'title '=> null,
|
183 |
-
'value' =>
|
184 |
'label' => Mage::helper('directory')->__('-- Please select --')
|
185 |
));
|
186 |
}
|
180 |
if (count($options) > 0) {
|
181 |
array_unshift($options, array(
|
182 |
'title '=> null,
|
183 |
+
'value' => "",
|
184 |
'label' => Mage::helper('directory')->__('-- Please select --')
|
185 |
));
|
186 |
}
|
app/code/core/Mage/{GoogleCheckout/sql/googlecheckout_setup/mysql4-install-0.7.0.php → Directory/sql/directory_setup/mysql4-upgrade-1.6.0.1-1.6.0.2.php}
RENAMED
@@ -19,28 +19,41 @@
|
|
19 |
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
*
|
21 |
* @category Mage
|
22 |
-
* @package
|
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_GoogleCheckout_Model_Mysql4_Setup */
|
29 |
-
|
30 |
$installer->startSetup();
|
31 |
|
32 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
-
-- drop table if exists {$this->getTable('googlecheckout_api_debug')};
|
35 |
-
CREATE TABLE {$this->getTable('googlecheckout_api_debug')} (
|
36 |
-
`debug_id` int(10) unsigned NOT NULL auto_increment,
|
37 |
-
`dir` enum('in', 'out'),
|
38 |
-
`url` varchar(255),
|
39 |
-
`request_body` text,
|
40 |
-
`response_body` text,
|
41 |
-
PRIMARY KEY (`debug_id`)
|
42 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
43 |
|
44 |
-
");
|
45 |
|
46 |
$installer->endSetup();
|
19 |
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
*
|
21 |
* @category Mage
|
22 |
+
* @package Mage_Directory
|
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 |
+
/* @var $connection Varien_Db_Adapter_Pdo_Mysql */
|
32 |
+
$connection = $installer->getConnection();
|
33 |
+
|
34 |
+
$regionTable = $installer->getTable('directory/country_region');
|
35 |
+
|
36 |
+
/* Armed Forces changes based on USPS */
|
37 |
+
|
38 |
+
/* Armed Forces Middle East (AM) is now served by Armed Forces Europe (AE) */
|
39 |
+
$bind = array('code' => 'AE');
|
40 |
+
$where = array('code = ?' => 'AM');
|
41 |
+
|
42 |
+
$connection->update($regionTable, $bind, $where);
|
43 |
+
|
44 |
+
/* Armed Forces Canada (AC) is now served by Armed Forces Europe (AE) */
|
45 |
+
$bind = array('code' => 'AE');
|
46 |
+
$where = array('code = ?' => 'AC');
|
47 |
+
|
48 |
+
$connection->update($regionTable, $bind, $where);
|
49 |
+
|
50 |
+
|
51 |
+
/* Armed Forces Africa (AF) is now served by Armed Forces Europe (AE) */
|
52 |
+
$bind = array('code' => 'AE');
|
53 |
+
$where = array('code = ?' => 'AF');
|
54 |
+
|
55 |
+
$connection->update($regionTable, $bind, $where);
|
56 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
|
|
58 |
|
59 |
$installer->endSetup();
|
app/code/core/Mage/{GoogleCheckout/Model/Resource/Api/Debug.php → Eav/Model/Attribute/Data/Datetime.php}
RENAMED
@@ -19,27 +19,49 @@
|
|
19 |
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
*
|
21 |
* @category Mage
|
22 |
-
* @package
|
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 |
-
*
|
30 |
*
|
31 |
* @category Mage
|
32 |
-
* @package
|
33 |
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
*/
|
35 |
-
class
|
36 |
{
|
37 |
/**
|
38 |
-
*
|
39 |
*
|
|
|
40 |
*/
|
41 |
-
protected function
|
42 |
{
|
43 |
-
$this->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
}
|
45 |
}
|
19 |
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
*
|
21 |
* @category Mage
|
22 |
+
* @package Mage_Eav
|
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 |
+
* EAV Entity Attribute Date time Data Model
|
30 |
*
|
31 |
* @category Mage
|
32 |
+
* @package Mage_Eav
|
33 |
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
*/
|
35 |
+
class Mage_Eav_Model_Attribute_Data_Datetime extends Mage_Eav_Model_Attribute_Data_Date
|
36 |
{
|
37 |
/**
|
38 |
+
* Return Data Form Input/Output Filter
|
39 |
*
|
40 |
+
* @return Varien_Data_Form_Filter_Interface|false
|
41 |
*/
|
42 |
+
protected function _getFormFilter()
|
43 |
{
|
44 |
+
$filterCode = $this->getAttribute()->getInputFilter();
|
45 |
+
if ($filterCode) {
|
46 |
+
$filterClass = 'Varien_Data_Form_Filter_' . ucfirst($filterCode);
|
47 |
+
if ($filterCode == 'datetime') {
|
48 |
+
$filter = new $filterClass(
|
49 |
+
$this->_getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT),
|
50 |
+
$this->_getLocale()->getLocale());
|
51 |
+
} else {
|
52 |
+
$filter = new $filterClass();
|
53 |
+
}
|
54 |
+
return $filter;
|
55 |
+
}
|
56 |
+
return false;
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Get Locale
|
61 |
+
*
|
62 |
+
* @return Mage_Core_Model_Locale
|
63 |
+
*/
|
64 |
+
protected function _getLocale(){
|
65 |
+
return Mage::app()->getLocale();
|
66 |
}
|
67 |
}
|
app/code/core/Mage/Eav/Model/Entity/Attribute/Backend/Time/Created.php
CHANGED
@@ -35,6 +35,7 @@ class Mage_Eav_Model_Entity_Attribute_Backend_Time_Created extends Mage_Eav_Mode
|
|
35 |
{
|
36 |
/**
|
37 |
* Set created date
|
|
|
38 |
*
|
39 |
* @param Mage_Core_Model_Object $object
|
40 |
* @return Mage_Eav_Model_Entity_Attribute_Backend_Time_Created
|
@@ -42,10 +43,36 @@ class Mage_Eav_Model_Entity_Attribute_Backend_Time_Created extends Mage_Eav_Mode
|
|
42 |
public function beforeSave($object)
|
43 |
{
|
44 |
$attributeCode = $this->getAttribute()->getAttributeCode();
|
45 |
-
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
}
|
48 |
|
49 |
return $this;
|
50 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
}
|
35 |
{
|
36 |
/**
|
37 |
* Set created date
|
38 |
+
* Set created date in UTC time zone
|
39 |
*
|
40 |
* @param Mage_Core_Model_Object $object
|
41 |
* @return Mage_Eav_Model_Entity_Attribute_Backend_Time_Created
|
43 |
public function beforeSave($object)
|
44 |
{
|
45 |
$attributeCode = $this->getAttribute()->getAttributeCode();
|
46 |
+
$date = $object->getData($attributeCode);
|
47 |
+
if (is_null($date)) {
|
48 |
+
if ($object->isObjectNew()) {
|
49 |
+
$object->setData($attributeCode, Varien_Date::now());
|
50 |
+
}
|
51 |
+
} else {
|
52 |
+
// convert to UTC
|
53 |
+
$zendDate = Mage::app()->getLocale()->utcDate(null, $date, true);
|
54 |
+
$object->setData($attributeCode, $zendDate->getIso());
|
55 |
}
|
56 |
|
57 |
return $this;
|
58 |
}
|
59 |
+
|
60 |
+
/**
|
61 |
+
* Convert create date from UTC to current store time zone
|
62 |
+
*
|
63 |
+
* @param Varien_Object $object
|
64 |
+
* @return Mage_Eav_Model_Entity_Attribute_Backend_Time_Created
|
65 |
+
*/
|
66 |
+
public function afterLoad($object)
|
67 |
+
{
|
68 |
+
$attributeCode = $this->getAttribute()->getAttributeCode();
|
69 |
+
$date = $object->getData($attributeCode);
|
70 |
+
|
71 |
+
$zendDate = Mage::app()->getLocale()->storeDate(null, $date, true);
|
72 |
+
$object->setData($attributeCode, $zendDate->getIso());
|
73 |
+
|
74 |
+
parent::afterLoad($object);
|
75 |
+
|
76 |
+
return $this;
|
77 |
+
}
|
78 |
}
|
app/code/core/Mage/Eav/Model/Resource/Entity/Attribute.php
CHANGED
@@ -431,7 +431,7 @@ class Mage_Eav_Model_Resource_Entity_Attribute extends Mage_Core_Model_Resource_
|
|
431 |
public function getFlatUpdateSelect(Mage_Eav_Model_Entity_Attribute_Abstract $attribute, $storeId)
|
432 |
{
|
433 |
$adapter = $this->_getReadAdapter();
|
434 |
-
$joinConditionTemplate = "%s.entity_id
|
435 |
." AND %s.entity_type_id = ".$attribute->getEntityTypeId()
|
436 |
." AND %s.attribute_id = ".$attribute->getId()
|
437 |
." AND %s.store_id = %d";
|
@@ -452,7 +452,7 @@ class Mage_Eav_Model_Resource_Entity_Attribute extends Mage_Core_Model_Resource_
|
|
452 |
array())
|
453 |
->joinLeft(
|
454 |
array('t2' => $attribute->getBackend()->getTable()),
|
455 |
-
sprintf($joinConditionTemplate, '
|
456 |
array($attribute->getAttributeCode() => $valueExpr));
|
457 |
if ($attribute->getFlatAddChildData()) {
|
458 |
$select->where("e.is_child = ?", 0);
|
431 |
public function getFlatUpdateSelect(Mage_Eav_Model_Entity_Attribute_Abstract $attribute, $storeId)
|
432 |
{
|
433 |
$adapter = $this->_getReadAdapter();
|
434 |
+
$joinConditionTemplate = "%s.entity_id = %s.entity_id"
|
435 |
." AND %s.entity_type_id = ".$attribute->getEntityTypeId()
|
436 |
." AND %s.attribute_id = ".$attribute->getId()
|
437 |
." AND %s.store_id = %d";
|
452 |
array())
|
453 |
->joinLeft(
|
454 |
array('t2' => $attribute->getBackend()->getTable()),
|
455 |
+
sprintf($joinConditionTemplate, 'e', 't2', 't2', 't2', 't2', $storeId),
|
456 |
array($attribute->getAttributeCode() => $valueExpr));
|
457 |
if ($attribute->getFlatAddChildData()) {
|
458 |
$select->where("e.is_child = ?", 0);
|
app/code/core/Mage/Eav/Model/Resource/Entity/Attribute/Option.php
CHANGED
@@ -108,7 +108,7 @@ class Mage_Eav_Model_Resource_Entity_Attribute_Option extends Mage_Core_Model_Re
|
|
108 |
$select = $adapter->select()
|
109 |
->joinLeft(array('t1' => $attributeTable), $joinCondition, array())
|
110 |
->joinLeft(array('t2' => $attributeTable),
|
111 |
-
sprintf($joinConditionTemplate, '
|
112 |
array($attributeCode => $valueExpr));
|
113 |
|
114 |
if (($attribute->getFrontend()->getInputType() != 'multiselect') && $hasValueField) {
|
@@ -122,7 +122,7 @@ class Mage_Eav_Model_Resource_Entity_Attribute_Option extends Mage_Core_Model_Re
|
|
122 |
}
|
123 |
|
124 |
if ($attribute->getFlatAddChildData()) {
|
125 |
-
$select->where(
|
126 |
}
|
127 |
|
128 |
return $select;
|
108 |
$select = $adapter->select()
|
109 |
->joinLeft(array('t1' => $attributeTable), $joinCondition, array())
|
110 |
->joinLeft(array('t2' => $attributeTable),
|
111 |
+
sprintf($joinConditionTemplate, 'e', 't2', 't2', 't2', 't2', $store),
|
112 |
array($attributeCode => $valueExpr));
|
113 |
|
114 |
if (($attribute->getFrontend()->getInputType() != 'multiselect') && $hasValueField) {
|
122 |
}
|
123 |
|
124 |
if ($attribute->getFlatAddChildData()) {
|
125 |
+
$select->where("e.is_child = ?", 0);
|
126 |
}
|
127 |
|
128 |
return $select;
|
app/code/core/Mage/Eav/etc/config.xml
CHANGED
@@ -28,7 +28,7 @@
|
|
28 |
<config>
|
29 |
<modules>
|
30 |
<Mage_Eav>
|
31 |
-
<version>1.6.0.
|
32 |
</Mage_Eav>
|
33 |
</modules>
|
34 |
<global>
|
28 |
<config>
|
29 |
<modules>
|
30 |
<Mage_Eav>
|
31 |
+
<version>1.6.0.1</version>
|
32 |
</Mage_Eav>
|
33 |
</modules>
|
34 |
<global>
|
app/code/core/Mage/{GoogleCheckout/sql/googlecheckout_setup/mysql4-upgrade-0.7.2-0.7.3.php → Eav/sql/eav_setup/upgrade-1.6.0.0-1.6.0.1.php}
RENAMED
@@ -19,18 +19,20 @@
|
|
19 |
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
*
|
21 |
* @category Mage
|
22 |
-
* @package
|
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_GoogleCheckout_Model_Mysql4_Setup */
|
29 |
|
30 |
$installer->startSetup();
|
|
|
31 |
|
32 |
-
$
|
33 |
-
'
|
34 |
-
)
|
|
|
35 |
|
36 |
$installer->endSetup();
|
19 |
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
*
|
21 |
* @category Mage
|
22 |
+
* @package Mage_Eav
|
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 |
|
30 |
$installer->startSetup();
|
31 |
+
$connection = $installer->getConnection();
|
32 |
|
33 |
+
$connection->delete(
|
34 |
+
$this->getTable('eav/attribute'),
|
35 |
+
$connection->prepareSqlCondition('attribute_code', 'enable_googlecheckout')
|
36 |
+
);
|
37 |
|
38 |
$installer->endSetup();
|
app/code/core/Mage/GoogleAnalytics/Block/Ga.php
CHANGED
@@ -92,6 +92,7 @@ class Mage_GoogleAnalytics_Block_Ga extends Mage_Core_Block_Template
|
|
92 |
}
|
93 |
return "
|
94 |
_gaq.push(['_setAccount', '{$this->jsQuoteEscape($accountId)}']);
|
|
|
95 |
_gaq.push(['_trackPageview'{$optPageURL}]);
|
96 |
";
|
97 |
}
|
@@ -151,7 +152,19 @@ _gaq.push(['_trackPageview'{$optPageURL}]);
|
|
151 |
if (!Mage::helper('googleanalytics')->isGoogleAnalyticsAvailable()) {
|
152 |
return '';
|
153 |
}
|
154 |
-
|
155 |
return parent::_toHtml();
|
156 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
}
|
92 |
}
|
93 |
return "
|
94 |
_gaq.push(['_setAccount', '{$this->jsQuoteEscape($accountId)}']);
|
95 |
+
" . $this->_getAnonymizationCode() . "
|
96 |
_gaq.push(['_trackPageview'{$optPageURL}]);
|
97 |
";
|
98 |
}
|
152 |
if (!Mage::helper('googleanalytics')->isGoogleAnalyticsAvailable()) {
|
153 |
return '';
|
154 |
}
|
|
|
155 |
return parent::_toHtml();
|
156 |
}
|
157 |
+
|
158 |
+
/**
|
159 |
+
* Render IP anonymization code for page tracking javascript code
|
160 |
+
*
|
161 |
+
* @return string
|
162 |
+
*/
|
163 |
+
protected function _getAnonymizationCode()
|
164 |
+
{
|
165 |
+
if (!Mage::helper('googleanalytics')->isIpAnonymizationEnabled()) {
|
166 |
+
return '';
|
167 |
+
}
|
168 |
+
return "_gaq.push (['_gat._anonymizeIp']);";
|
169 |
+
}
|
170 |
}
|
app/code/core/Mage/GoogleAnalytics/Helper/Data.php
CHANGED
@@ -36,8 +36,9 @@ class Mage_GoogleAnalytics_Helper_Data extends Mage_Core_Helper_Abstract
|
|
36 |
/**
|
37 |
* Config paths for using throughout the code
|
38 |
*/
|
39 |
-
const XML_PATH_ACTIVE
|
40 |
-
const XML_PATH_ACCOUNT
|
|
|
41 |
|
42 |
/**
|
43 |
* Whether GA is ready to use
|
@@ -50,4 +51,15 @@ class Mage_GoogleAnalytics_Helper_Data extends Mage_Core_Helper_Abstract
|
|
50 |
$accountId = Mage::getStoreConfig(self::XML_PATH_ACCOUNT, $store);
|
51 |
return $accountId && Mage::getStoreConfigFlag(self::XML_PATH_ACTIVE, $store);
|
52 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
}
|
36 |
/**
|
37 |
* Config paths for using throughout the code
|
38 |
*/
|
39 |
+
const XML_PATH_ACTIVE = 'google/analytics/active';
|
40 |
+
const XML_PATH_ACCOUNT = 'google/analytics/account';
|
41 |
+
const XML_PATH_ANONYMIZATION = 'google/analytics/anonymization';
|
42 |
|
43 |
/**
|
44 |
* Whether GA is ready to use
|
51 |
$accountId = Mage::getStoreConfig(self::XML_PATH_ACCOUNT, $store);
|
52 |
return $accountId && Mage::getStoreConfigFlag(self::XML_PATH_ACTIVE, $store);
|
53 |
}
|
54 |
+
|
55 |
+
/**
|
56 |
+
* Whether GA IP Anonymization is enabled
|
57 |
+
*
|
58 |
+
* @param null $store
|
59 |
+
* @return bool
|
60 |
+
*/
|
61 |
+
public function isIpAnonymizationEnabled($store = null)
|
62 |
+
{
|
63 |
+
return Mage::getStoreConfigFlag(self::XML_PATH_ANONYMIZATION, $store);
|
64 |
+
}
|
65 |
}
|
app/code/core/Mage/GoogleAnalytics/Model/Observer.php
CHANGED
@@ -33,12 +33,6 @@
|
|
33 |
*/
|
34 |
class Mage_GoogleAnalytics_Model_Observer
|
35 |
{
|
36 |
-
/**
|
37 |
-
* Whether the google checkout inclusion link was rendered by this observer instance
|
38 |
-
* @var bool
|
39 |
-
*/
|
40 |
-
protected $_isGoogleCheckoutLinkAdded = false;
|
41 |
-
|
42 |
/**
|
43 |
* Create Google Analytics block for success page view
|
44 |
*
|
@@ -66,37 +60,4 @@ class Mage_GoogleAnalytics_Model_Observer
|
|
66 |
$block->setOrderIds($orderIds);
|
67 |
}
|
68 |
}
|
69 |
-
|
70 |
-
/**
|
71 |
-
* Add google analytics tracking to google checkout shortcuts
|
72 |
-
*
|
73 |
-
* If there is at least one GC button on the page, there should be the script for GA/GC integration included
|
74 |
-
* a each shortcut should track submits to GA
|
75 |
-
* There should be no tracking if there is no GA available
|
76 |
-
* This method assumes that the observer instance is run as a "singleton" (through Mage::getSingleton())
|
77 |
-
*
|
78 |
-
* @param Varien_Event_Observer $observer
|
79 |
-
*/
|
80 |
-
public function injectAnalyticsInGoogleCheckoutLink(Varien_Event_Observer $observer)
|
81 |
-
{
|
82 |
-
$block = $observer->getEvent()->getBlock();
|
83 |
-
if (!$block || !Mage::helper('googleanalytics')->isGoogleAnalyticsAvailable()) {
|
84 |
-
return;
|
85 |
-
}
|
86 |
-
|
87 |
-
// make sure to track google checkout "onsubmit"
|
88 |
-
$onsubmitJs = $block->getOnsubmitJs();
|
89 |
-
$block->setOnsubmitJs($onsubmitJs . ($onsubmitJs ? '; ' : '') . '_gaq.push(function() {var pageTracker = _gaq._getAsyncTracker(); setUrchinInputCode(pageTracker);});');
|
90 |
-
|
91 |
-
// add a link that includes google checkout/analytics script, to the first instance of the link block
|
92 |
-
if ($this->_isGoogleCheckoutLinkAdded) {
|
93 |
-
return;
|
94 |
-
}
|
95 |
-
$beforeHtml = $block->getBeforeHtml();
|
96 |
-
$protocol = Mage::app()->getStore()->isCurrentlySecure() ? 'https' : 'http';
|
97 |
-
$block->setBeforeHtml($beforeHtml . '<script src="' . $protocol
|
98 |
-
. '://checkout.google.com/files/digital/ga_post.js" type="text/javascript"></script>'
|
99 |
-
);
|
100 |
-
$this->_isGoogleCheckoutLinkAdded = true;
|
101 |
-
}
|
102 |
}
|
33 |
*/
|
34 |
class Mage_GoogleAnalytics_Model_Observer
|
35 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
/**
|
37 |
* Create Google Analytics block for success page view
|
38 |
*
|
60 |
$block->setOrderIds($orderIds);
|
61 |
}
|
62 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
}
|
app/code/core/Mage/GoogleAnalytics/etc/config.xml
CHANGED
@@ -75,14 +75,6 @@
|
|
75 |
</googleanalytics_order_success>
|
76 |
</observers>
|
77 |
</checkout_multishipping_controller_success_action>
|
78 |
-
<googlecheckout_block_link_html_before>
|
79 |
-
<observers>
|
80 |
-
<googleanalytics_googlecheckout_integration>
|
81 |
-
<class>googleanalytics/observer</class>
|
82 |
-
<method>injectAnalyticsInGoogleCheckoutLink</method>
|
83 |
-
</googleanalytics_googlecheckout_integration>
|
84 |
-
</observers>
|
85 |
-
</googlecheckout_block_link_html_before>
|
86 |
</events>
|
87 |
<layout>
|
88 |
<updates>
|
75 |
</googleanalytics_order_success>
|
76 |
</observers>
|
77 |
</checkout_multishipping_controller_success_action>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
</events>
|
79 |
<layout>
|
80 |
<updates>
|
app/code/core/Mage/GoogleAnalytics/etc/system.xml
CHANGED
@@ -61,6 +61,15 @@
|
|
61 |
<show_in_website>1</show_in_website>
|
62 |
<show_in_store>1</show_in_store>
|
63 |
</account>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
</fields>
|
65 |
</analytics>
|
66 |
</groups>
|
61 |
<show_in_website>1</show_in_website>
|
62 |
<show_in_store>1</show_in_store>
|
63 |
</account>
|
64 |
+
<anonymization translate="label">
|
65 |
+
<label>Enable IP anonymization</label>
|
66 |
+
<frontend_type>select</frontend_type>
|
67 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
68 |
+
<sort_order>30</sort_order>
|
69 |
+
<show_in_default>1</show_in_default>
|
70 |
+
<show_in_website>1</show_in_website>
|
71 |
+
<show_in_store>1</show_in_store>
|
72 |
+
</anonymization>
|
73 |
</fields>
|
74 |
</analytics>
|
75 |
</groups>
|
app/code/core/Mage/GoogleCheckout/Block/Adminhtml/Shipping/Applicable/Countries.php
DELETED
@@ -1,65 +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_GoogleCheckout
|
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_GoogleCheckout_Block_Adminhtml_Shipping_Applicable_Countries
|
28 |
-
extends Mage_Adminhtml_Block_System_Config_Form_Field
|
29 |
-
{
|
30 |
-
protected $_addRowButtonHtml = array();
|
31 |
-
protected $_removeRowButtonHtml = array();
|
32 |
-
|
33 |
-
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
34 |
-
{
|
35 |
-
$html = parent::_getElementHtml($element);
|
36 |
-
$html .= $this->_appendJs($element);
|
37 |
-
return $html;
|
38 |
-
}
|
39 |
-
|
40 |
-
protected function _appendJs($element)
|
41 |
-
{
|
42 |
-
$elId = $element->getHtmlId();
|
43 |
-
$childId = str_replace('sallowspecific', 'specificcountry', $elId);
|
44 |
-
$html = "<script type='text/javascript'>
|
45 |
-
var dwvie = function ()
|
46 |
-
{
|
47 |
-
var valueSelectId = '{$elId}';
|
48 |
-
var elementToDisableId = '{$childId}';
|
49 |
-
|
50 |
-
var source = $(valueSelectId);
|
51 |
-
var target = $(elementToDisableId);
|
52 |
-
|
53 |
-
if (source.options[source.selectedIndex].value == '0') {
|
54 |
-
target.disabled = true;
|
55 |
-
} else {
|
56 |
-
target.disabled = false;
|
57 |
-
}
|
58 |
-
}
|
59 |
-
|
60 |
-
Event.observe('{$elId}', 'change', dwvie);
|
61 |
-
Event.observe(window, 'load', dwvie);
|
62 |
-
</script>";
|
63 |
-
return $html;
|
64 |
-
}
|
65 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Block/Adminhtml/Shipping/Merchant.php
DELETED
@@ -1,181 +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_GoogleCheckout
|
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_GoogleCheckout_Block_Adminhtml_Shipping_Merchant
|
28 |
-
extends Mage_Adminhtml_Block_System_Config_Form_Field
|
29 |
-
{
|
30 |
-
protected $_addRowButtonHtml = array();
|
31 |
-
protected $_removeRowButtonHtml = array();
|
32 |
-
|
33 |
-
protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element)
|
34 |
-
{
|
35 |
-
$this->setElement($element);
|
36 |
-
|
37 |
-
$html = '<div id="merchant_allowed_methods_template" style="display:none">';
|
38 |
-
$html .= $this->_getRowTemplateHtml();
|
39 |
-
$html .= '</div>';
|
40 |
-
|
41 |
-
$html .= '<ul id="merchant_allowed_methods_container">';
|
42 |
-
if ($this->_getValue('method')) {
|
43 |
-
foreach ($this->_getValue('method') as $i => $f) {
|
44 |
-
if ($i) {
|
45 |
-
$html .= $this->_getRowTemplateHtml($i);
|
46 |
-
}
|
47 |
-
}
|
48 |
-
}
|
49 |
-
$html .= '</ul>';
|
50 |
-
$html .= $this->_getAddRowButtonHtml('merchant_allowed_methods_container',
|
51 |
-
'merchant_allowed_methods_template', $this->__('Add Shipping Method'));
|
52 |
-
|
53 |
-
return $html;
|
54 |
-
}
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Retrieve html template for shipping method row
|
58 |
-
*
|
59 |
-
* @param int $rowIndex
|
60 |
-
* @return string
|
61 |
-
*/
|
62 |
-
protected function _getRowTemplateHtml($rowIndex = 0)
|
63 |
-
{
|
64 |
-
$html = '<li>';
|
65 |
-
$html .= '<select name="' . $this->getElement()->getName() . '[method][]" ' . $this->_getDisabled() . '>';
|
66 |
-
$html .= '<option value="">' . $this->__('* Select shipping method') . '</option>';
|
67 |
-
|
68 |
-
foreach ($this->getShippingMethods() as $carrierCode => $carrier) {
|
69 |
-
$html .= '<optgroup label="' . $this->escapeHtml($carrier['title'])
|
70 |
-
. '" style="border-top:solid 1px black; margin-top:3px;">';
|
71 |
-
|
72 |
-
foreach ($carrier['methods'] as $methodCode => $method) {
|
73 |
-
$code = $carrierCode . '/' . $methodCode;
|
74 |
-
$html .= '<option value="' . $this->escapeHtml($code) . '" '
|
75 |
-
. $this->_getSelected('method/' . $rowIndex, $code)
|
76 |
-
. ' style="background:white;">' . $this->escapeHtml($method['title']) . '</option>';
|
77 |
-
}
|
78 |
-
$html .= '</optgroup>';
|
79 |
-
}
|
80 |
-
$html .= '</select>';
|
81 |
-
|
82 |
-
$html .= '<div style="margin:5px 0 10px;">';
|
83 |
-
$html .= '<label>' . $this->__('Default price:') . '</label> ';
|
84 |
-
$html .= '<input class="input-text" style="width:70px;" name="'
|
85 |
-
. $this->getElement()->getName() . '[price][]" value="'
|
86 |
-
. $this->_getValue('price/' . $rowIndex) . '" ' . $this->_getDisabled() . '/> ';
|
87 |
-
|
88 |
-
$html .= $this->_getRemoveRowButtonHtml();
|
89 |
-
$html .= '</div>';
|
90 |
-
$html .= '</li>';
|
91 |
-
|
92 |
-
return $html;
|
93 |
-
}
|
94 |
-
|
95 |
-
protected function getShippingMethods()
|
96 |
-
{
|
97 |
-
if (!$this->hasData('shipping_methods')) {
|
98 |
-
$website = $this->getRequest()->getParam('website');
|
99 |
-
$store = $this->getRequest()->getParam('store');
|
100 |
-
|
101 |
-
$storeId = null;
|
102 |
-
if (!is_null($website)) {
|
103 |
-
$storeId = Mage::getModel('core/website')
|
104 |
-
->load($website, 'code')
|
105 |
-
->getDefaultGroup()
|
106 |
-
->getDefaultStoreId();
|
107 |
-
} elseif (!is_null($store)) {
|
108 |
-
$storeId = Mage::getModel('core/store')
|
109 |
-
->load($store, 'code')
|
110 |
-
->getId();
|
111 |
-
}
|
112 |
-
|
113 |
-
$methods = array();
|
114 |
-
$carriers = Mage::getSingleton('shipping/config')->getActiveCarriers($storeId);
|
115 |
-
foreach ($carriers as $carrierCode=>$carrierModel) {
|
116 |
-
if (!$carrierModel->isActive()) {
|
117 |
-
continue;
|
118 |
-
}
|
119 |
-
$carrierMethods = $carrierModel->getAllowedMethods();
|
120 |
-
if (!$carrierMethods) {
|
121 |
-
continue;
|
122 |
-
}
|
123 |
-
$carrierTitle = Mage::getStoreConfig('carriers/' . $carrierCode . '/title', $storeId);
|
124 |
-
$methods[$carrierCode] = array(
|
125 |
-
'title' => $carrierTitle,
|
126 |
-
'methods' => array(),
|
127 |
-
);
|
128 |
-
foreach ($carrierMethods as $methodCode=>$methodTitle) {
|
129 |
-
$methods[$carrierCode]['methods'][$methodCode] = array(
|
130 |
-
'title' => '[' . $carrierCode . '] ' . $methodTitle,
|
131 |
-
);
|
132 |
-
}
|
133 |
-
}
|
134 |
-
$this->setData('shipping_methods', $methods);
|
135 |
-
}
|
136 |
-
return $this->getData('shipping_methods');
|
137 |
-
}
|
138 |
-
|
139 |
-
protected function _getDisabled()
|
140 |
-
{
|
141 |
-
return $this->getElement()->getDisabled() ? ' disabled' : '';
|
142 |
-
}
|
143 |
-
|
144 |
-
protected function _getValue($key)
|
145 |
-
{
|
146 |
-
return $this->getElement()->getData('value/' . $key);
|
147 |
-
}
|
148 |
-
|
149 |
-
protected function _getSelected($key, $value)
|
150 |
-
{
|
151 |
-
return $this->getElement()->getData('value/' . $key) == $value ? 'selected="selected"' : '';
|
152 |
-
}
|
153 |
-
|
154 |
-
protected function _getAddRowButtonHtml($container, $template, $title='Add')
|
155 |
-
{
|
156 |
-
if (!isset($this->_addRowButtonHtml[$container])) {
|
157 |
-
$this->_addRowButtonHtml[$container] = $this->getLayout()->createBlock('adminhtml/widget_button')
|
158 |
-
->setType('button')
|
159 |
-
->setClass('add ' . $this->_getDisabled())
|
160 |
-
->setLabel($this->__($title))
|
161 |
-
->setOnClick("Element.insert($('" . $container . "'), {bottom: $('" . $template . "').innerHTML})")
|
162 |
-
->setDisabled($this->_getDisabled())
|
163 |
-
->toHtml();
|
164 |
-
}
|
165 |
-
return $this->_addRowButtonHtml[$container];
|
166 |
-
}
|
167 |
-
|
168 |
-
protected function _getRemoveRowButtonHtml($selector = 'li', $title = 'Remove')
|
169 |
-
{
|
170 |
-
if (!$this->_removeRowButtonHtml) {
|
171 |
-
$this->_removeRowButtonHtml = $this->getLayout()->createBlock('adminhtml/widget_button')
|
172 |
-
->setType('button')
|
173 |
-
->setClass('delete v-middle ' . $this->_getDisabled())
|
174 |
-
->setLabel($this->__($title))
|
175 |
-
->setOnClick("Element.remove($(this).up('" . $selector . "'))")
|
176 |
-
->setDisabled($this->_getDisabled())
|
177 |
-
->toHtml();
|
178 |
-
}
|
179 |
-
return $this->_removeRowButtonHtml;
|
180 |
-
}
|
181 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Block/Link.php
DELETED
@@ -1,108 +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_GoogleCheckout
|
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 |
-
* Google Checkout shortcut link
|
29 |
-
*
|
30 |
-
* @category Mage
|
31 |
-
* @package Mage_GoogleCheckout
|
32 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
-
*/
|
34 |
-
class Mage_GoogleCheckout_Block_Link extends Mage_Core_Block_Template
|
35 |
-
{
|
36 |
-
public function getImageStyle()
|
37 |
-
{
|
38 |
-
$s = Mage::getStoreConfig('google/checkout/checkout_image');
|
39 |
-
if (!$s) {
|
40 |
-
$s = '180/46/trans';
|
41 |
-
}
|
42 |
-
return explode('/', $s);
|
43 |
-
}
|
44 |
-
|
45 |
-
public function getImageUrl()
|
46 |
-
{
|
47 |
-
$url = 'https://checkout.google.com/buttons/checkout.gif';
|
48 |
-
$url .= '?merchant_id='.Mage::getStoreConfig('google/checkout/merchant_id');
|
49 |
-
$v = $this->getImageStyle();
|
50 |
-
$url .= '&w='.$v[0].'&h='.$v[1].'&style='.$v[2];
|
51 |
-
$url .= '&variant='.($this->getIsDisabled() ? 'disabled' : 'text');
|
52 |
-
$url .= '&loc='.Mage::getStoreConfig('google/checkout/locale');
|
53 |
-
return $url;
|
54 |
-
}
|
55 |
-
|
56 |
-
public function getCheckoutUrl()
|
57 |
-
{
|
58 |
-
return $this->getUrl('googlecheckout/redirect/checkout');
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* @deprecated after 1.4.1.1
|
63 |
-
* @return bool
|
64 |
-
*/
|
65 |
-
public function getIsActiveAanalytics()
|
66 |
-
{
|
67 |
-
return false;
|
68 |
-
}
|
69 |
-
|
70 |
-
public function getImageWidth()
|
71 |
-
{
|
72 |
-
$v = $this->getImageStyle();
|
73 |
-
return $v[0];
|
74 |
-
}
|
75 |
-
|
76 |
-
public function getImageHeight()
|
77 |
-
{
|
78 |
-
$v = $this->getImageStyle();
|
79 |
-
return $v[1];
|
80 |
-
}
|
81 |
-
|
82 |
-
/**
|
83 |
-
* Check whether method is available and render HTML
|
84 |
-
* @return string
|
85 |
-
*/
|
86 |
-
public function _toHtml()
|
87 |
-
{
|
88 |
-
$quote = Mage::getSingleton('checkout/session')->getQuote();
|
89 |
-
if (Mage::getModel('googlecheckout/payment')->isAvailable($quote) && $quote->validateMinimumAmount()) {
|
90 |
-
Mage::dispatchEvent('googlecheckout_block_link_html_before', array('block' => $this));
|
91 |
-
return parent::_toHtml();
|
92 |
-
}
|
93 |
-
return '';
|
94 |
-
}
|
95 |
-
|
96 |
-
public function getIsDisabled()
|
97 |
-
{
|
98 |
-
$quote = Mage::getSingleton('checkout/session')->getQuote();
|
99 |
-
/* @var $quote Mage_Sales_Model_Quote */
|
100 |
-
foreach ($quote->getAllVisibleItems() as $item) {
|
101 |
-
/* @var $item Mage_Sales_Model_Quote_Item */
|
102 |
-
if (!$item->getProduct()->getEnableGooglecheckout()) {
|
103 |
-
return true;
|
104 |
-
}
|
105 |
-
}
|
106 |
-
return false;
|
107 |
-
}
|
108 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Exception.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_GoogleCheckout
|
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_GoogleCheckout_Exception extends Mage_Core_Exception
|
28 |
-
{
|
29 |
-
|
30 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Helper/Data.php
DELETED
@@ -1,192 +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_GoogleCheckout
|
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 |
-
* GoogleCheckout data helper
|
29 |
-
*/
|
30 |
-
class Mage_GoogleCheckout_Helper_Data extends Mage_Core_Helper_Abstract
|
31 |
-
{
|
32 |
-
/**
|
33 |
-
* Google Checkout settings
|
34 |
-
*/
|
35 |
-
const XML_PATH_REQUEST_PHONE = 'google/checkout/request_phone';
|
36 |
-
const XML_PATH_DISABLE_DEFAULT_TAX_TABLES = 'google/checkout/disable_default_tax_tables';
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Google Checkout Shipping - Digital Delivery settings
|
40 |
-
*/
|
41 |
-
const XML_PATH_SHIPPING_VIRTUAL_ACTIVE = 'google/checkout_shipping_virtual/active';
|
42 |
-
const XML_PATH_SHIPPING_VIRTUAL_SCHEDULE = 'google/checkout_shipping_virtual/schedule';
|
43 |
-
const XML_PATH_SHIPPING_VIRTUAL_METHOD = 'google/checkout_shipping_virtual/method';
|
44 |
-
|
45 |
-
/**
|
46 |
-
* Google Checkout Shipping - Carrier Calculated settings
|
47 |
-
*/
|
48 |
-
const XML_PATH_SHIPPING_CARRIER_ACTIVE = 'google/checkout_shipping_carrier/active';
|
49 |
-
const XML_PATH_SHIPPING_CARRIER_METHODS = 'google/checkout_shipping_carrier/methods';
|
50 |
-
const XML_PATH_SHIPPING_CARRIER_DEFAULT_PRICE = 'google/checkout_shipping_carrier/default_price';
|
51 |
-
const XML_PATH_SHIPPING_CARRIER_DEFAULT_WIDTH = 'google/checkout_shipping_carrier/default_width';
|
52 |
-
const XML_PATH_SHIPPING_CARRIER_DEFAULT_HEIGHT = 'google/checkout_shipping_carrier/default_height';
|
53 |
-
const XML_PATH_SHIPPING_CARRIER_DEFAULT_LENGTH = 'google/checkout_shipping_carrier/default_length';
|
54 |
-
const XML_PATH_SHIPPING_CARRIER_ADDRESS_CATEGORY = 'google/checkout_shipping_carrier/address_category';
|
55 |
-
|
56 |
-
/**
|
57 |
-
* Google Checkout Shipping - Flat Rate settings
|
58 |
-
*/
|
59 |
-
const XML_PATH_SHIPPING_FLATRATE_ACTIVE = 'google/checkout_shipping_flatrate/active';
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Google Checkout Shipping - Merchant Calculated settings
|
63 |
-
*/
|
64 |
-
const XML_PATH_SHIPPING_MERCHANT_ACTIVE = 'google/checkout_shipping_merchant/active';
|
65 |
-
const XML_PATH_SHIPPING_MERCHANT_ALLOWED_METHODS = 'google/checkout_shipping_merchant/allowed_methods';
|
66 |
-
|
67 |
-
/**
|
68 |
-
* Google Checkout Shipping - Pickup settings
|
69 |
-
*/
|
70 |
-
const XML_PATH_SHIPPING_PICKUP_ACTIVE = 'google/checkout_shipping_pickup/active';
|
71 |
-
const XML_PATH_SHIPPING_PICKUP_TITLE = 'google/checkout_shipping_pickup/title';
|
72 |
-
const XML_PATH_SHIPPING_PICKUP_PRICE = 'google/checkout_shipping_pickup/price';
|
73 |
-
|
74 |
-
/**
|
75 |
-
* Check if option googlecheckout shipping carrier is enabled
|
76 |
-
*
|
77 |
-
* @param $storeId
|
78 |
-
* @return bool
|
79 |
-
*/
|
80 |
-
public function isShippingCarrierActive($storeId)
|
81 |
-
{
|
82 |
-
return (true == Mage::getStoreConfig(self::XML_PATH_SHIPPING_CARRIER_ACTIVE, $storeId));
|
83 |
-
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Convert Magento zip range to array of Google Checkout zip-patterns
|
87 |
-
* (e.g., 12000-13999 -> [12*, 13*])
|
88 |
-
*
|
89 |
-
* @param string $zipRange
|
90 |
-
* @return array
|
91 |
-
*/
|
92 |
-
public function zipRangeToZipPattern($zipRange)
|
93 |
-
{
|
94 |
-
$zipLength = 5;
|
95 |
-
$zipPattern = array();
|
96 |
-
|
97 |
-
if (!preg_match("/^(.+)-(.+)$/", $zipRange, $zipParts)) {
|
98 |
-
return array($zipRange);
|
99 |
-
}
|
100 |
-
|
101 |
-
if ($zipParts[1] == $zipParts[2]) {
|
102 |
-
return array($zipParts[1]);
|
103 |
-
}
|
104 |
-
|
105 |
-
if ($zipParts[1] > $zipParts[2]) {
|
106 |
-
list($zipParts[2], $zipParts[1]) = array($zipParts[1], $zipParts[2]);
|
107 |
-
}
|
108 |
-
|
109 |
-
$from = str_split($zipParts[1]);
|
110 |
-
$to = str_split($zipParts[2]);
|
111 |
-
|
112 |
-
$startZip = '';
|
113 |
-
$diffPosition = null;
|
114 |
-
for ($pos = 0; $pos < $zipLength; $pos++) {
|
115 |
-
if ($from[$pos] == $to[$pos]) {
|
116 |
-
$startZip .= $from[$pos];
|
117 |
-
} else {
|
118 |
-
$diffPosition = $pos;
|
119 |
-
break;
|
120 |
-
}
|
121 |
-
}
|
122 |
-
|
123 |
-
/*
|
124 |
-
* calculate zip-patterns
|
125 |
-
*/
|
126 |
-
if (min(array_slice($to, $diffPosition)) == 9 && max(array_slice($from, $diffPosition)) == 0) {
|
127 |
-
// particular case like 11000-11999 -> 11*
|
128 |
-
return array($startZip . '*');
|
129 |
-
} else {
|
130 |
-
// calculate approximate zip-patterns
|
131 |
-
$start = $from[$diffPosition];
|
132 |
-
$finish = $to[$diffPosition];
|
133 |
-
if ($diffPosition < $zipLength - 1) {
|
134 |
-
$start++;
|
135 |
-
$finish--;
|
136 |
-
}
|
137 |
-
$end = $diffPosition < $zipLength - 1 ? '*' : '';
|
138 |
-
for ($digit = $start; $digit <= $finish; $digit++) {
|
139 |
-
$zipPattern[] = $startZip . $digit . $end;
|
140 |
-
}
|
141 |
-
}
|
142 |
-
|
143 |
-
if ($diffPosition == $zipLength - 1) {
|
144 |
-
return $zipPattern;
|
145 |
-
}
|
146 |
-
|
147 |
-
$nextAsteriskFrom = true;
|
148 |
-
$nextAsteriskTo = true;
|
149 |
-
for ($pos = $zipLength - 1; $pos > $diffPosition; $pos--) {
|
150 |
-
// calculate zip-patterns based on $from value
|
151 |
-
if ($from[$pos] == 0 && $nextAsteriskFrom) {
|
152 |
-
$nextAsteriskFrom = true;
|
153 |
-
} else {
|
154 |
-
$subZip = '';
|
155 |
-
for ($k = $diffPosition; $k < $pos; $k++) {
|
156 |
-
$subZip .= $from[$k];
|
157 |
-
}
|
158 |
-
$delta = $nextAsteriskFrom ? 0 : 1;
|
159 |
-
$end = $pos < $zipLength - 1 ? '*' : '';
|
160 |
-
for ($i = $from[$pos] + $delta; $i <= 9; $i++) {
|
161 |
-
$zipPattern[] = $startZip . $subZip . $i . $end;
|
162 |
-
}
|
163 |
-
$nextAsteriskFrom = false;
|
164 |
-
}
|
165 |
-
|
166 |
-
// calculate zip-patterns based on $to value
|
167 |
-
if ($to[$pos] == 9 && $nextAsteriskTo) {
|
168 |
-
$nextAsteriskTo = true;
|
169 |
-
} else {
|
170 |
-
$subZip = '';
|
171 |
-
for ($k = $diffPosition; $k < $pos; $k++) {
|
172 |
-
$subZip .= $to[$k];
|
173 |
-
}
|
174 |
-
$delta = $nextAsteriskTo ? 0 : 1;
|
175 |
-
$end = $pos < $zipLength - 1 ? '*' : '';
|
176 |
-
for ($i = 0; $i <= $to[$pos] - $delta; $i++) {
|
177 |
-
$zipPattern[] = $startZip . $subZip . $i . $end;
|
178 |
-
}
|
179 |
-
$nextAsteriskTo = false;
|
180 |
-
}
|
181 |
-
}
|
182 |
-
|
183 |
-
if ($nextAsteriskFrom) {
|
184 |
-
$zipPattern[] = $startZip . $from[$diffPosition] . '*';
|
185 |
-
}
|
186 |
-
if ($nextAsteriskTo) {
|
187 |
-
$zipPattern[] = $startZip . $to[$diffPosition] . '*';
|
188 |
-
}
|
189 |
-
|
190 |
-
return $zipPattern;
|
191 |
-
}
|
192 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Model/Api.php
DELETED
@@ -1,233 +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_GoogleCheckout
|
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_GoogleCheckout_Model_Api extends Varien_Object
|
28 |
-
{
|
29 |
-
/**
|
30 |
-
* Fields that should be replaced in debug with '***'
|
31 |
-
*
|
32 |
-
* @var array
|
33 |
-
*/
|
34 |
-
protected $_debugReplacePrivateDataKeys = array();
|
35 |
-
|
36 |
-
protected function _getApi($area)
|
37 |
-
{
|
38 |
-
$api = Mage::getModel('googlecheckout/api_xml_' . $area)->setStoreId($this->getStoreId());
|
39 |
-
$api->setApi($this);
|
40 |
-
return $api;
|
41 |
-
}
|
42 |
-
|
43 |
-
// CHECKOUT
|
44 |
-
public function checkout(Mage_Sales_Model_Quote $quote)
|
45 |
-
{
|
46 |
-
$api = $this->_getApi('checkout')
|
47 |
-
->setQuote($quote)
|
48 |
-
->checkout();
|
49 |
-
return $api;
|
50 |
-
}
|
51 |
-
|
52 |
-
// FINANCIAL COMMANDS
|
53 |
-
public function authorize($gOrderId)
|
54 |
-
{
|
55 |
-
$api = $this->_getApi('order')
|
56 |
-
->setGoogleOrderNumber($gOrderId)
|
57 |
-
->authorize();
|
58 |
-
return $api;
|
59 |
-
}
|
60 |
-
|
61 |
-
public function charge($gOrderId, $amount)
|
62 |
-
{
|
63 |
-
$api = $this->_getApi('order')
|
64 |
-
->setGoogleOrderNumber($gOrderId)
|
65 |
-
->charge($amount);
|
66 |
-
return $api;
|
67 |
-
}
|
68 |
-
|
69 |
-
public function refund($gOrderId, $amount, $reason, $comment = '')
|
70 |
-
{
|
71 |
-
$api = $this->_getApi('order')
|
72 |
-
->setGoogleOrderNumber($gOrderId)
|
73 |
-
->refund($amount, $reason, $comment);
|
74 |
-
return $api;
|
75 |
-
}
|
76 |
-
|
77 |
-
public function cancel($gOrderId, $reason, $comment = '')
|
78 |
-
{
|
79 |
-
$api = $this->_getApi('order')
|
80 |
-
->setGoogleOrderNumber($gOrderId)
|
81 |
-
->cancel($reason, $comment);
|
82 |
-
return $api;
|
83 |
-
}
|
84 |
-
|
85 |
-
// FULFILLMENT COMMANDS (ORDER BASED)
|
86 |
-
|
87 |
-
public function process($gOrderId)
|
88 |
-
{
|
89 |
-
$api = $this->_getApi('order')
|
90 |
-
->setGoogleOrderNumber($gOrderId)
|
91 |
-
->process();
|
92 |
-
return $api;
|
93 |
-
}
|
94 |
-
|
95 |
-
public function deliver($gOrderId, $carrier, $trackingNo, $sendMail = true)
|
96 |
-
{
|
97 |
-
$this->setCarriers(array('dhl' => 'DHL', 'fedex' => 'FedEx', 'ups' => 'UPS', 'usps' => 'USPS'));
|
98 |
-
Mage::dispatchEvent('googlecheckout_api_deliver_carriers_array', array('api' => $this));
|
99 |
-
$gCarriers = $this->getCarriers();
|
100 |
-
$carrier = strtolower($carrier);
|
101 |
-
$carrier = isset($gCarriers[$carrier]) ? $gCarriers[$carrier] : 'Other';
|
102 |
-
|
103 |
-
$api = $this->_getApi('order')
|
104 |
-
->setGoogleOrderNumber($gOrderId)
|
105 |
-
->deliver($carrier, $trackingNo, $sendMail);
|
106 |
-
return $api;
|
107 |
-
}
|
108 |
-
|
109 |
-
public function addTrackingData($gOrderId, $carrier, $trackingNo)
|
110 |
-
{
|
111 |
-
$api = $this->_getApi('order')
|
112 |
-
->setGoogleOrderNumber($gOrderId)
|
113 |
-
->addTrackingData($carrier, $trackingNo);
|
114 |
-
return $api;
|
115 |
-
}
|
116 |
-
|
117 |
-
// FULFILLMENT COMMANDS (ITEM BASED)
|
118 |
-
|
119 |
-
public function shipItems($gOrderId, array $items)
|
120 |
-
{
|
121 |
-
$api = $this->_getApi('order')
|
122 |
-
->setGoogleOrderNumber($gOrderId)
|
123 |
-
->shipItems($items);
|
124 |
-
return $api;
|
125 |
-
}
|
126 |
-
|
127 |
-
public function backorderItems()
|
128 |
-
{
|
129 |
-
$api = $this->_getApi('order')
|
130 |
-
->setOrder($order)
|
131 |
-
->setItems($items)
|
132 |
-
->shipItems();
|
133 |
-
return $api;
|
134 |
-
}
|
135 |
-
|
136 |
-
public function returnItems()
|
137 |
-
{
|
138 |
-
$api = $this->_getApi('order')
|
139 |
-
->setOrder($order)
|
140 |
-
->setItems($items)
|
141 |
-
->shipItems();
|
142 |
-
return $api;
|
143 |
-
}
|
144 |
-
|
145 |
-
public function cancelItems()
|
146 |
-
{
|
147 |
-
$api = $this->_getApi('order')
|
148 |
-
->setOrder($order)
|
149 |
-
->setItems($items)
|
150 |
-
->shipItems();
|
151 |
-
return $api;
|
152 |
-
}
|
153 |
-
|
154 |
-
public function resetItemsShippingInformation()
|
155 |
-
{
|
156 |
-
|
157 |
-
}
|
158 |
-
|
159 |
-
public function addMerchantOrderNumber()
|
160 |
-
{
|
161 |
-
|
162 |
-
}
|
163 |
-
|
164 |
-
public function sendBuyerMessage()
|
165 |
-
{
|
166 |
-
$api = $this->_getApi('order')
|
167 |
-
->setOrder($order)
|
168 |
-
->setItems($items)
|
169 |
-
->shipItems();
|
170 |
-
return $api;
|
171 |
-
}
|
172 |
-
|
173 |
-
// OTHER ORDER COMMANDS
|
174 |
-
|
175 |
-
public function archiveOrder()
|
176 |
-
{
|
177 |
-
$api = $this->_getApi('order')
|
178 |
-
->setOrder($order)
|
179 |
-
->setItems($items)
|
180 |
-
->shipItems();
|
181 |
-
return $api;
|
182 |
-
}
|
183 |
-
|
184 |
-
public function unarchiveOrder()
|
185 |
-
{
|
186 |
-
$api = $this->_getApi('order')
|
187 |
-
->setOrder($order)
|
188 |
-
->setItems($items)
|
189 |
-
->shipItems();
|
190 |
-
return $api;
|
191 |
-
}
|
192 |
-
|
193 |
-
// WEB SERVICE SERVER PROCEDURES
|
194 |
-
|
195 |
-
public function processCallback()
|
196 |
-
{
|
197 |
-
$api = $this->_getApi('callback')->process();
|
198 |
-
return $api;
|
199 |
-
}
|
200 |
-
|
201 |
-
/**
|
202 |
-
* @deprecated after 1.4.1.0
|
203 |
-
*
|
204 |
-
*/
|
205 |
-
public function processBeacon(){}
|
206 |
-
|
207 |
-
/**
|
208 |
-
* Log debug data to file
|
209 |
-
*
|
210 |
-
* @param mixed $debugData
|
211 |
-
*/
|
212 |
-
public function debugData($debugData)
|
213 |
-
{
|
214 |
-
if ($this->getDebugFlag()) {
|
215 |
-
Mage::getModel('core/log_adapter', 'payment_googlecheckout.log')
|
216 |
-
->setFilterDataKeys($this->_debugReplacePrivateDataKeys)
|
217 |
-
->log($debugData);
|
218 |
-
}
|
219 |
-
}
|
220 |
-
|
221 |
-
/**
|
222 |
-
* Define if debugging is enabled
|
223 |
-
*
|
224 |
-
* @return bool
|
225 |
-
*/
|
226 |
-
public function getDebugFlag()
|
227 |
-
{
|
228 |
-
if (!$this->hasData('debug_flag')) {
|
229 |
-
$this->setData('debug_flag', Mage::getStoreConfig('google/checkout/debug', $this->getStoreId()));
|
230 |
-
}
|
231 |
-
return $this->getData('debug_flag');
|
232 |
-
}
|
233 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Model/Api/Debug.php
DELETED
@@ -1,52 +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_GoogleCheckout
|
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 |
-
* Enter description here ...
|
30 |
-
*
|
31 |
-
* @method Mage_GoogleCheckout_Model_Resource_Api_Debug _getResource()
|
32 |
-
* @method Mage_GoogleCheckout_Model_Resource_Api_Debug getResource()
|
33 |
-
* @method string getDir()
|
34 |
-
* @method Mage_GoogleCheckout_Model_Api_Debug setDir(string $value)
|
35 |
-
* @method string getUrl()
|
36 |
-
* @method Mage_GoogleCheckout_Model_Api_Debug setUrl(string $value)
|
37 |
-
* @method string getRequestBody()
|
38 |
-
* @method Mage_GoogleCheckout_Model_Api_Debug setRequestBody(string $value)
|
39 |
-
* @method string getResponseBody()
|
40 |
-
* @method Mage_GoogleCheckout_Model_Api_Debug setResponseBody(string $value)
|
41 |
-
*
|
42 |
-
* @category Mage
|
43 |
-
* @package Mage_GoogleCheckout
|
44 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
45 |
-
*/
|
46 |
-
class Mage_GoogleCheckout_Model_Api_Debug extends Mage_Core_Model_Abstract
|
47 |
-
{
|
48 |
-
protected function _construct()
|
49 |
-
{
|
50 |
-
$this->_init('googlecheckout/api_debug');
|
51 |
-
}
|
52 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Abstract.php
DELETED
@@ -1,245 +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_GoogleCheckout
|
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 |
-
set_include_path(get_include_path().PS.Mage::getBaseDir('lib').DS.'googlecheckout');
|
28 |
-
|
29 |
-
require_once('googleresponse.php');
|
30 |
-
require_once('googlemerchantcalculations.php');
|
31 |
-
require_once('googleresult.php');
|
32 |
-
require_once('googlerequest.php');
|
33 |
-
|
34 |
-
abstract class Mage_GoogleCheckout_Model_Api_Xml_Abstract extends Varien_Object
|
35 |
-
{
|
36 |
-
public function log($text, $nl=true)
|
37 |
-
{
|
38 |
-
error_log(print_r($text, 1) . ($nl ? "\n" : ''), 3, Mage::getBaseDir('log') . DS . 'callback.log');
|
39 |
-
return $this;
|
40 |
-
}
|
41 |
-
|
42 |
-
public function __()
|
43 |
-
{
|
44 |
-
$args = func_get_args();
|
45 |
-
$expr = new Mage_Core_Model_Translate_Expr(array_shift($args), 'Mage_GoogleCheckout');
|
46 |
-
array_unshift($args, $expr);
|
47 |
-
return Mage::app()->getTranslator()->translate($args);
|
48 |
-
}
|
49 |
-
|
50 |
-
public function getMerchantId()
|
51 |
-
{
|
52 |
-
if (!$this->hasData('merchant_id')) {
|
53 |
-
$this->setData('merchant_id', Mage::getStoreConfig('google/checkout/merchant_id', $this->getStoreId()));
|
54 |
-
}
|
55 |
-
return $this->getData('merchant_id');
|
56 |
-
}
|
57 |
-
|
58 |
-
public function getMerchantKey()
|
59 |
-
{
|
60 |
-
if (!$this->hasData('merchant_key')) {
|
61 |
-
$this->setData('merchant_key', Mage::getStoreConfig('google/checkout/merchant_key', $this->getStoreId()));
|
62 |
-
}
|
63 |
-
return $this->getData('merchant_key');
|
64 |
-
}
|
65 |
-
|
66 |
-
public function getServerType()
|
67 |
-
{
|
68 |
-
if (!$this->hasData('server_type')) {
|
69 |
-
$this->setData(
|
70 |
-
'server_type',
|
71 |
-
Mage::getStoreConfig('google/checkout/sandbox', $this->getStoreId()) ? "sandbox" : ""
|
72 |
-
);
|
73 |
-
}
|
74 |
-
return $this->getData('server_type');
|
75 |
-
}
|
76 |
-
|
77 |
-
public function getLocale()
|
78 |
-
{
|
79 |
-
if (!$this->hasData('locale')) {
|
80 |
-
$this->setData('locale', Mage::getStoreConfig('google/checkout/locale', $this->getStoreId()));
|
81 |
-
}
|
82 |
-
return $this->getData('locale');
|
83 |
-
}
|
84 |
-
|
85 |
-
public function getCurrency()
|
86 |
-
{
|
87 |
-
if (!$this->hasData('currency')) {
|
88 |
-
$this->setData('currency', Mage::app()->getStore()->getBaseCurrencyCode());
|
89 |
-
//$this->setData('currency', $this->getLocale()=='en_US' ? 'USD' : 'GBP');
|
90 |
-
}
|
91 |
-
return $this->getData('currency');
|
92 |
-
}
|
93 |
-
|
94 |
-
/**
|
95 |
-
* Google Checkout Request instance
|
96 |
-
*
|
97 |
-
* @return GoogleRequest
|
98 |
-
*/
|
99 |
-
public function getGRequest()
|
100 |
-
{
|
101 |
-
if (!$this->hasData('g_request')) {
|
102 |
-
$this->setData('g_request', new GoogleRequest(
|
103 |
-
$this->getMerchantId(),
|
104 |
-
$this->getMerchantKey(),
|
105 |
-
$this->getServerType(),
|
106 |
-
$this->getCurrency()
|
107 |
-
));
|
108 |
-
|
109 |
-
//Setup the log file
|
110 |
-
$logDir = Mage::getBaseDir('log');
|
111 |
-
$this->getData('g_request')->SetLogFiles(
|
112 |
-
$logDir . DS . 'googleerror.log',
|
113 |
-
$logDir . DS . 'googlemessage.log',
|
114 |
-
L_ALL
|
115 |
-
);
|
116 |
-
}
|
117 |
-
return $this->getData('g_request');
|
118 |
-
}
|
119 |
-
|
120 |
-
/**
|
121 |
-
* Google Checkout Response instance
|
122 |
-
*
|
123 |
-
* @return GoogleResponse
|
124 |
-
*/
|
125 |
-
public function getGResponse()
|
126 |
-
{
|
127 |
-
$merchantId = $this->getMerchantId();
|
128 |
-
$merchantKey = $this->getMerchantKey();
|
129 |
-
if (empty($merchantId) || empty($merchantKey)) {
|
130 |
-
Mage::throwException(Mage::helper('googlecheckout')->__('GoogleCheckout is not configured'));
|
131 |
-
}
|
132 |
-
if (!$this->hasData('g_response')) {
|
133 |
-
$this->setData('g_response', new GoogleResponse(
|
134 |
-
$this->getMerchantId(),
|
135 |
-
$this->getMerchantKey()
|
136 |
-
));
|
137 |
-
|
138 |
-
//Setup the log file
|
139 |
-
$logDir = Mage::getBaseDir('log');
|
140 |
-
$this->getData('g_response')->SetLogFiles(
|
141 |
-
$logDir . DS . 'googleerror.log',
|
142 |
-
$logDir . DS . 'googlemessage.log',
|
143 |
-
L_ALL
|
144 |
-
);
|
145 |
-
}
|
146 |
-
return $this->getData('g_response');
|
147 |
-
}
|
148 |
-
|
149 |
-
protected function _getBaseApiUrl()
|
150 |
-
{
|
151 |
-
$url = 'https://';
|
152 |
-
if ($this->getServerType()=='sandbox') {
|
153 |
-
$url .= 'sandbox.google.com/checkout/api/checkout/v2/';
|
154 |
-
} else {
|
155 |
-
$url .= 'checkout.google.com/api/checkout/v2/';
|
156 |
-
}
|
157 |
-
return $url;
|
158 |
-
}
|
159 |
-
|
160 |
-
abstract protected function _getApiUrl();
|
161 |
-
|
162 |
-
public function _call($xml)
|
163 |
-
{
|
164 |
-
$auth = 'Basic ' . base64_encode($this->getMerchantId() . ':' . $this->getMerchantKey());
|
165 |
-
|
166 |
-
$headers = array(
|
167 |
-
'Authorization: ' . $auth,
|
168 |
-
'Content-Type: application/xml;charset=UTF-8',
|
169 |
-
'Accept: application/xml;charset=UTF-8',
|
170 |
-
);
|
171 |
-
|
172 |
-
$url = $this->_getApiUrl();
|
173 |
-
$xml = '<?xml version="1.0" encoding="UTF-8"?>' . "\r\n" . $xml;
|
174 |
-
|
175 |
-
$debugData = array('request' => $xml, 'dir' => 'out');
|
176 |
-
|
177 |
-
try {
|
178 |
-
$http = new Varien_Http_Adapter_Curl();
|
179 |
-
$http->write('POST', $url, '1.1', $headers, $xml);
|
180 |
-
$response = $http->read();
|
181 |
-
$response = preg_split('/^\r?$/m', $response, 2);
|
182 |
-
$response = trim($response[1]);
|
183 |
-
$debugData['result'] = $response;
|
184 |
-
$http->close();
|
185 |
-
}
|
186 |
-
catch (Exception $e) {
|
187 |
-
$debugData['result'] = array('error' => $e->getMessage(), 'code' => $e->getCode());
|
188 |
-
$this->getApi()->debugData($debugData);
|
189 |
-
throw $e;
|
190 |
-
}
|
191 |
-
|
192 |
-
$this->getApi()->debugData($debugData);
|
193 |
-
$result = @simplexml_load_string($response);
|
194 |
-
if (!$result) {
|
195 |
-
$result = simplexml_load_string(
|
196 |
-
'<error><error-message>Invalid response from Google Checkout server</error-message></error>'
|
197 |
-
);
|
198 |
-
}
|
199 |
-
if ($result->getName() == 'error') {
|
200 |
-
$this->setError($this->__('Google Checkout: %s', (string)$result->{'error-message'}));
|
201 |
-
$this->setWarnings((array)$result->{'warning-messages'});
|
202 |
-
} else {
|
203 |
-
$this->unsError()->unsWarnings();
|
204 |
-
}
|
205 |
-
|
206 |
-
$this->setResult($result);
|
207 |
-
|
208 |
-
return $result;
|
209 |
-
}
|
210 |
-
|
211 |
-
protected function _getCallbackUrl()
|
212 |
-
{
|
213 |
-
return Mage::getUrl(
|
214 |
-
'googlecheckout/api',
|
215 |
-
array('_forced_secure'=>Mage::getStoreConfig('google/checkout/use_secure_callback_url',$this->getStoreId()))
|
216 |
-
);
|
217 |
-
}
|
218 |
-
|
219 |
-
/**
|
220 |
-
* Recalculate amount to store currency
|
221 |
-
*
|
222 |
-
* @param float $amount
|
223 |
-
* @param Mage_Sales_Model_Quote $quote
|
224 |
-
* @return float
|
225 |
-
*/
|
226 |
-
protected function _reCalculateToStoreCurrency($amount, $quote)
|
227 |
-
{
|
228 |
-
if ($quote->getQuoteCurrencyCode() != $quote->getBaseCurrencyCode()) {
|
229 |
-
$amount = $amount * $quote->getStoreToQuoteRate();
|
230 |
-
$amount = Mage::app()->getStore()->roundPrice($amount);
|
231 |
-
}
|
232 |
-
return $amount;
|
233 |
-
}
|
234 |
-
|
235 |
-
/**
|
236 |
-
* Get Tax Class for Shipping option
|
237 |
-
*
|
238 |
-
* @param Mage_Sales_Model_Quote $quote
|
239 |
-
* @return mixed
|
240 |
-
*/
|
241 |
-
protected function _getTaxClassForShipping($quote)
|
242 |
-
{
|
243 |
-
return Mage::getStoreConfig(Mage_Tax_Model_Config::CONFIG_XML_PATH_SHIPPING_TAX_CLASS, $quote->getStoreId());
|
244 |
-
}
|
245 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Callback.php
DELETED
@@ -1,1107 +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_GoogleCheckout
|
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_GoogleCheckout_Model_Api_Xml_Callback extends Mage_GoogleCheckout_Model_Api_Xml_Abstract
|
28 |
-
{
|
29 |
-
protected $_cachedShippingInfo = array(); // Cache of possible shipping carrier-methods combinations per storeId
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Process notification from google
|
33 |
-
* @return Mage_GoogleCheckout_Model_Api_Xml_Callback
|
34 |
-
*/
|
35 |
-
public function process()
|
36 |
-
{
|
37 |
-
// Retrieve the XML sent in the HTTP POST request to the ResponseHandler
|
38 |
-
$xmlResponse = isset($GLOBALS['HTTP_RAW_POST_DATA']) ?
|
39 |
-
$GLOBALS['HTTP_RAW_POST_DATA'] : file_get_contents("php://input");
|
40 |
-
if (get_magic_quotes_gpc()) {
|
41 |
-
$xmlResponse = stripslashes($xmlResponse);
|
42 |
-
}
|
43 |
-
|
44 |
-
$debugData = array('request' => $xmlResponse, 'dir' => 'in');
|
45 |
-
|
46 |
-
if (empty($xmlResponse)) {
|
47 |
-
$this->getApi()->debugData($debugData);
|
48 |
-
return false;
|
49 |
-
}
|
50 |
-
|
51 |
-
list($root, $data) = $this->getGResponse()->GetParsedXML($xmlResponse);
|
52 |
-
|
53 |
-
$this->getGResponse()->SetMerchantAuthentication($this->getMerchantId(), $this->getMerchantKey());
|
54 |
-
$status = $this->getGResponse()->HttpAuthentication();
|
55 |
-
|
56 |
-
if (!$status || empty($data[$root])) {
|
57 |
-
exit;
|
58 |
-
}
|
59 |
-
|
60 |
-
$this->setRootName($root)->setRoot($data[$root]);
|
61 |
-
$serialNumber = $this->getData('root/serial-number');
|
62 |
-
$this->getGResponse()->setSerialNumber($serialNumber);
|
63 |
-
|
64 |
-
/*
|
65 |
-
* Prevent multiple notification processing
|
66 |
-
*/
|
67 |
-
$notification = Mage::getModel('googlecheckout/notification')
|
68 |
-
->setSerialNumber($serialNumber)
|
69 |
-
->loadNotificationData();
|
70 |
-
|
71 |
-
if ($notification->getStartedAt()) {
|
72 |
-
if ($notification->isProcessed()) {
|
73 |
-
$this->getGResponse()->SendAck();
|
74 |
-
return;
|
75 |
-
}
|
76 |
-
if ($notification->isTimeout()) {
|
77 |
-
$notification->updateProcess();
|
78 |
-
} else {
|
79 |
-
$this->getGResponse()->SendServerErrorStatus();
|
80 |
-
return;
|
81 |
-
}
|
82 |
-
} else {
|
83 |
-
$notification->startProcess();
|
84 |
-
}
|
85 |
-
|
86 |
-
$method = '_response' . uc_words($root, '', '-');
|
87 |
-
if (method_exists($this, $method)) {
|
88 |
-
ob_start();
|
89 |
-
|
90 |
-
try {
|
91 |
-
$this->$method();
|
92 |
-
$notification->stopProcess();
|
93 |
-
} catch (Exception $e) {
|
94 |
-
$this->getGResponse()->log->logError($e->__toString());
|
95 |
-
}
|
96 |
-
|
97 |
-
$debugData['result'] = ob_get_flush();
|
98 |
-
$this->getApi()->debugData($debugData);
|
99 |
-
} else {
|
100 |
-
$this->getGResponse()->SendBadRequestStatus("Invalid or not supported Message");
|
101 |
-
}
|
102 |
-
|
103 |
-
return $this;
|
104 |
-
}
|
105 |
-
|
106 |
-
/**
|
107 |
-
* Load quote from request and make sure the proper payment method is set
|
108 |
-
*
|
109 |
-
* @return Mage_Sales_Model_Quote
|
110 |
-
*/
|
111 |
-
protected function _loadQuote()
|
112 |
-
{
|
113 |
-
$quoteId = $this->getData('root/shopping-cart/merchant-private-data/quote-id/VALUE');
|
114 |
-
$storeId = $this->getData('root/shopping-cart/merchant-private-data/store-id/VALUE');
|
115 |
-
$quote = Mage::getModel('sales/quote')
|
116 |
-
->setStoreId($storeId)
|
117 |
-
->load($quoteId);
|
118 |
-
if ($quote->isVirtual()) {
|
119 |
-
$quote->getBillingAddress()->setPaymentMethod('googlecheckout');
|
120 |
-
} else {
|
121 |
-
$quote->getShippingAddress()->setPaymentMethod('googlecheckout');
|
122 |
-
}
|
123 |
-
return $quote;
|
124 |
-
}
|
125 |
-
|
126 |
-
protected function _getApiUrl()
|
127 |
-
{
|
128 |
-
return null;
|
129 |
-
}
|
130 |
-
|
131 |
-
protected function getGoogleOrderNumber()
|
132 |
-
{
|
133 |
-
return $this->getData('root/google-order-number/VALUE');
|
134 |
-
}
|
135 |
-
|
136 |
-
protected function _responseRequestReceived()
|
137 |
-
{
|
138 |
-
|
139 |
-
}
|
140 |
-
|
141 |
-
protected function _responseError()
|
142 |
-
{
|
143 |
-
|
144 |
-
}
|
145 |
-
|
146 |
-
protected function _responseDiagnosis()
|
147 |
-
{
|
148 |
-
|
149 |
-
}
|
150 |
-
|
151 |
-
protected function _responseCheckoutRedirect()
|
152 |
-
{
|
153 |
-
|
154 |
-
}
|
155 |
-
|
156 |
-
/**
|
157 |
-
* Calculate available shipping amounts and taxes
|
158 |
-
*/
|
159 |
-
protected function _responseMerchantCalculationCallback()
|
160 |
-
{
|
161 |
-
$merchantCalculations = new GoogleMerchantCalculations($this->getCurrency());
|
162 |
-
|
163 |
-
$quote = $this->_loadQuote();
|
164 |
-
|
165 |
-
$billingAddress = $quote->getBillingAddress();
|
166 |
-
$address = $quote->getShippingAddress();
|
167 |
-
|
168 |
-
$googleAddress = $this->getData('root/calculate/addresses/anonymous-address');
|
169 |
-
|
170 |
-
$googleAddresses = array();
|
171 |
-
if ( isset( $googleAddress['id'] ) ) {
|
172 |
-
$googleAddresses[] = $googleAddress;
|
173 |
-
} else {
|
174 |
-
$googleAddresses = $googleAddress;
|
175 |
-
}
|
176 |
-
|
177 |
-
$methods = Mage::getStoreConfig('google/checkout_shipping_merchant/allowed_methods', $this->getStoreId());
|
178 |
-
$methods = unserialize($methods);
|
179 |
-
$limitCarrier = array();
|
180 |
-
foreach ($methods['method'] as $method) {
|
181 |
-
if ($method) {
|
182 |
-
list($carrierCode, $methodCode) = explode('/', $method);
|
183 |
-
$limitCarrier[$carrierCode] = $carrierCode;
|
184 |
-
}
|
185 |
-
}
|
186 |
-
$limitCarrier = array_values($limitCarrier);
|
187 |
-
|
188 |
-
foreach($googleAddresses as $googleAddress) {
|
189 |
-
$addressId = $googleAddress['id'];
|
190 |
-
$regionCode = $googleAddress['region']['VALUE'];
|
191 |
-
$countryCode = $googleAddress['country-code']['VALUE'];
|
192 |
-
$regionModel = Mage::getModel('directory/region')->loadByCode($regionCode, $countryCode);
|
193 |
-
$regionId = $regionModel->getId();
|
194 |
-
|
195 |
-
$address->setCountryId($countryCode)
|
196 |
-
->setRegion($regionCode)
|
197 |
-
->setRegionId($regionId)
|
198 |
-
->setCity($googleAddress['city']['VALUE'])
|
199 |
-
->setPostcode($googleAddress['postal-code']['VALUE'])
|
200 |
-
->setLimitCarrier($limitCarrier);
|
201 |
-
$billingAddress->setCountryId($countryCode)
|
202 |
-
->setRegion($regionCode)
|
203 |
-
->setRegionId($regionId)
|
204 |
-
->setCity($googleAddress['city']['VALUE'])
|
205 |
-
->setPostcode($googleAddress['postal-code']['VALUE'])
|
206 |
-
->setLimitCarrier($limitCarrier);
|
207 |
-
|
208 |
-
$billingAddress->collectTotals();
|
209 |
-
$shippingTaxClass = $this->_getTaxClassForShipping($quote);
|
210 |
-
|
211 |
-
$gRequestMethods = $this->getData('root/calculate/shipping/method');
|
212 |
-
if ($gRequestMethods) {
|
213 |
-
// Make stable format of $gRequestMethods for convenient usage
|
214 |
-
if (array_key_exists('VALUE', $gRequestMethods)) {
|
215 |
-
$gRequestMethods = array($gRequestMethods);
|
216 |
-
}
|
217 |
-
|
218 |
-
// Form list of mapping Google method names to applicable address rates
|
219 |
-
$rates = array();
|
220 |
-
$address->setCollectShippingRates(true)
|
221 |
-
->collectShippingRates();
|
222 |
-
foreach ($address->getAllShippingRates() as $rate) {
|
223 |
-
if ($rate instanceof Mage_Shipping_Model_Rate_Result_Error) {
|
224 |
-
continue;
|
225 |
-
}
|
226 |
-
$methodName = sprintf('%s - %s', $rate->getCarrierTitle(), $rate->getMethodTitle());
|
227 |
-
$rates[$methodName] = $rate;
|
228 |
-
}
|
229 |
-
|
230 |
-
foreach ($gRequestMethods as $method) {
|
231 |
-
$result = new GoogleResult($addressId);
|
232 |
-
$methodName = $method['name'];
|
233 |
-
|
234 |
-
if (isset($rates[$methodName])) {
|
235 |
-
$rate = $rates[$methodName];
|
236 |
-
|
237 |
-
$address->setShippingMethod($rate->getCode())
|
238 |
-
->setLimitCarrier($rate->getCarrier())
|
239 |
-
->setCollectShippingRates(true)
|
240 |
-
->collectTotals();
|
241 |
-
$shippingRate = $address->getBaseShippingAmount() - $address->getBaseShippingDiscountAmount();
|
242 |
-
$result->SetShippingDetails($methodName, $shippingRate, 'true');
|
243 |
-
|
244 |
-
if ($this->getData('root/calculate/tax/VALUE') == 'true') {
|
245 |
-
$taxAmount = $address->getBaseTaxAmount();
|
246 |
-
$taxAmount += $billingAddress->getBaseTaxAmount();
|
247 |
-
$result->setTaxDetails($taxAmount);
|
248 |
-
}
|
249 |
-
} else {
|
250 |
-
if ($shippingTaxClass &&
|
251 |
-
$this->getData('root/calculate/tax/VALUE') == 'true') {
|
252 |
-
$i = 1;
|
253 |
-
$price = Mage::getStoreConfig(
|
254 |
-
'google/checkout_shipping_flatrate/price_'.$i,
|
255 |
-
$quote->getStoreId()
|
256 |
-
);
|
257 |
-
$price = number_format($price, 2, '.','');
|
258 |
-
$price = (float) Mage::helper('tax')->getShippingPrice($price, false, false);
|
259 |
-
$address->setShippingMethod(null);
|
260 |
-
$address->setCollectShippingRates(true)->collectTotals();
|
261 |
-
$billingAddress->setCollectShippingRates(true)->collectTotals();
|
262 |
-
$address->setBaseShippingAmount($price);
|
263 |
-
$address->setShippingAmount(
|
264 |
-
$this->_reCalculateToStoreCurrency($price, $quote)
|
265 |
-
);
|
266 |
-
$this->_applyShippingTaxClass($address, $shippingTaxClass);
|
267 |
-
$taxAmount = $address->getBaseTaxAmount();
|
268 |
-
$taxAmount += $billingAddress->getBaseTaxAmount();
|
269 |
-
$result->SetShippingDetails(
|
270 |
-
$methodName,
|
271 |
-
$price - $address->getBaseShippingDiscountAmount(),
|
272 |
-
'true'
|
273 |
-
);
|
274 |
-
$result->setTaxDetails($taxAmount);
|
275 |
-
$i++;
|
276 |
-
} else {
|
277 |
-
$result->SetShippingDetails($methodName, 0, 'false');
|
278 |
-
}
|
279 |
-
}
|
280 |
-
$merchantCalculations->AddResult($result);
|
281 |
-
}
|
282 |
-
|
283 |
-
} else if ($this->getData('root/calculate/tax/VALUE') == 'true') {
|
284 |
-
$address->setShippingMethod(null);
|
285 |
-
$address->setCollectShippingRates(true)->collectTotals();
|
286 |
-
$billingAddress->setCollectShippingRates(true)->collectTotals();
|
287 |
-
if (!Mage::helper('googlecheckout')->isShippingCarrierActive($this->getStoreId())) {
|
288 |
-
$this->_applyShippingTaxClass($address, $shippingTaxClass);
|
289 |
-
}
|
290 |
-
|
291 |
-
$taxAmount = $address->getBaseTaxAmount();
|
292 |
-
$taxAmount += $billingAddress->getBaseTaxAmount();
|
293 |
-
|
294 |
-
$result = new GoogleResult($addressId);
|
295 |
-
$result->setTaxDetails($taxAmount);
|
296 |
-
$merchantCalculations->addResult($result);
|
297 |
-
}
|
298 |
-
}
|
299 |
-
|
300 |
-
$this->getGResponse()->ProcessMerchantCalculations($merchantCalculations);
|
301 |
-
}
|
302 |
-
|
303 |
-
/**
|
304 |
-
* Apply shipping tax class
|
305 |
-
*
|
306 |
-
* @param Varien_Object $qAddress
|
307 |
-
* @param mixed $shippingTaxClass
|
308 |
-
*/
|
309 |
-
protected function _applyShippingTaxClass($qAddress, $shippingTaxClass)
|
310 |
-
{
|
311 |
-
if (!$shippingTaxClass) {
|
312 |
-
return;
|
313 |
-
}
|
314 |
-
|
315 |
-
$quote = $qAddress->getQuote();
|
316 |
-
$taxCalculationModel = Mage::getSingleton('tax/calculation');
|
317 |
-
$request = $taxCalculationModel->getRateRequest($qAddress);
|
318 |
-
$rate = $taxCalculationModel->getRate($request->setProductClassId($shippingTaxClass));
|
319 |
-
|
320 |
-
if (!Mage::helper('tax')->shippingPriceIncludesTax()) {
|
321 |
-
$shippingTax = $qAddress->getShippingAmount() * $rate/100;
|
322 |
-
$shippingBaseTax= $qAddress->getBaseShippingAmount() * $rate/100;
|
323 |
-
} else {
|
324 |
-
$shippingTax = $qAddress->getShippingTaxAmount();
|
325 |
-
$shippingBaseTax= $qAddress->getBaseShippingTaxAmount();
|
326 |
-
}
|
327 |
-
|
328 |
-
$shippingTax = $quote->getStore()->roundPrice($shippingTax);
|
329 |
-
$shippingBaseTax= $quote->getStore()->roundPrice($shippingBaseTax);
|
330 |
-
|
331 |
-
$qAddress->setTaxAmount($qAddress->getTaxAmount() + $shippingTax);
|
332 |
-
$qAddress->setBaseTaxAmount($qAddress->getBaseTaxAmount() + $shippingBaseTax);
|
333 |
-
}
|
334 |
-
|
335 |
-
/**
|
336 |
-
* Process new order creation notification from google.
|
337 |
-
* Convert customer quote to order
|
338 |
-
*/
|
339 |
-
protected function _responseNewOrderNotification()
|
340 |
-
{
|
341 |
-
$this->getGResponse()->SendAck();
|
342 |
-
|
343 |
-
// LOOK FOR EXISTING ORDER TO AVOID DUPLICATES
|
344 |
-
$orders = Mage::getModel('sales/order')->getCollection()
|
345 |
-
->addAttributeToFilter('ext_order_id', $this->getGoogleOrderNumber());
|
346 |
-
if (count($orders)) {
|
347 |
-
return;
|
348 |
-
}
|
349 |
-
|
350 |
-
// IMPORT GOOGLE ORDER DATA INTO QUOTE
|
351 |
-
/* @var $quote Mage_Sales_Model_Quote */
|
352 |
-
$quote = $this->_loadQuote();
|
353 |
-
$quote->setIsActive(true)->reserveOrderId();
|
354 |
-
|
355 |
-
Mage::dispatchEvent('googlecheckout_create_order_before', array('quote' => $quote));
|
356 |
-
if ($quote->getErrorMessage()) {
|
357 |
-
$this->getGRequest()->SendCancelOrder($this->getGoogleOrderNumber(),
|
358 |
-
$this->__('Order creation error'),
|
359 |
-
$quote->getErrorMessage()
|
360 |
-
);
|
361 |
-
return;
|
362 |
-
}
|
363 |
-
|
364 |
-
$storeId = $quote->getStoreId();
|
365 |
-
|
366 |
-
Mage::app()->setCurrentStore(Mage::app()->getStore($storeId));
|
367 |
-
if ($quote->getQuoteCurrencyCode() != $quote->getBaseCurrencyCode()) {
|
368 |
-
Mage::app()->getStore()->setCurrentCurrencyCode($quote->getQuoteCurrencyCode());
|
369 |
-
}
|
370 |
-
|
371 |
-
$billing = $this->_importGoogleAddress($this->getData('root/buyer-billing-address'));
|
372 |
-
$quote->setBillingAddress($billing);
|
373 |
-
|
374 |
-
$shipping = $this->_importGoogleAddress($this->getData('root/buyer-shipping-address'));
|
375 |
-
|
376 |
-
$quote->setShippingAddress($shipping);
|
377 |
-
|
378 |
-
$this->_importGoogleTotals($quote->getShippingAddress());
|
379 |
-
|
380 |
-
$quote->getPayment()->importData(array('method'=>'googlecheckout'));
|
381 |
-
|
382 |
-
$taxMessage = $this->_applyCustomTax($quote->getShippingAddress());
|
383 |
-
|
384 |
-
// CONVERT QUOTE TO ORDER
|
385 |
-
$convertQuote = Mage::getSingleton('sales/convert_quote');
|
386 |
-
|
387 |
-
/* @var $order Mage_Sales_Model_Order */
|
388 |
-
$order = $convertQuote->toOrder($quote);
|
389 |
-
|
390 |
-
if ($quote->isVirtual()) {
|
391 |
-
$convertQuote->addressToOrder($quote->getBillingAddress(), $order);
|
392 |
-
} else {
|
393 |
-
$convertQuote->addressToOrder($quote->getShippingAddress(), $order);
|
394 |
-
}
|
395 |
-
|
396 |
-
$order->setExtOrderId($this->getGoogleOrderNumber());
|
397 |
-
$order->setExtCustomerId($this->getData('root/buyer-id/VALUE'));
|
398 |
-
|
399 |
-
if (!$order->getCustomerEmail()) {
|
400 |
-
$order->setCustomerEmail($billing->getEmail())
|
401 |
-
->setCustomerPrefix($billing->getPrefix())
|
402 |
-
->setCustomerFirstname($billing->getFirstname())
|
403 |
-
->setCustomerMiddlename($billing->getMiddlename())
|
404 |
-
->setCustomerLastname($billing->getLastname())
|
405 |
-
->setCustomerSuffix($billing->getSuffix());
|
406 |
-
}
|
407 |
-
|
408 |
-
$order->setBillingAddress($convertQuote->addressToOrderAddress($quote->getBillingAddress()));
|
409 |
-
|
410 |
-
if (!$quote->isVirtual()) {
|
411 |
-
$order->setShippingAddress($convertQuote->addressToOrderAddress($quote->getShippingAddress()));
|
412 |
-
}
|
413 |
-
#$order->setPayment($convertQuote->paymentToOrderPayment($quote->getPayment()));
|
414 |
-
|
415 |
-
foreach ($quote->getAllItems() as $item) {
|
416 |
-
$orderItem = $convertQuote->itemToOrderItem($item);
|
417 |
-
if ($item->getParentItem()) {
|
418 |
-
$orderItem->setParentItem($order->getItemByQuoteItemId($item->getParentItem()->getId()));
|
419 |
-
}
|
420 |
-
$order->addItem($orderItem);
|
421 |
-
}
|
422 |
-
|
423 |
-
/*
|
424 |
-
* Adding transaction for correct transaction information displaying on order view at back end.
|
425 |
-
* It has no influence on api interaction logic.
|
426 |
-
*/
|
427 |
-
$payment = Mage::getModel('sales/order_payment')
|
428 |
-
->setMethod('googlecheckout')
|
429 |
-
->setTransactionId($this->getGoogleOrderNumber())
|
430 |
-
->setIsTransactionClosed(false);
|
431 |
-
$order->setPayment($payment);
|
432 |
-
$payment->addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH);
|
433 |
-
$order->setCanShipPartiallyItem(false);
|
434 |
-
|
435 |
-
$emailAllowed = ($this->getData('root/buyer-marketing-preferences/email-allowed/VALUE') === 'true');
|
436 |
-
|
437 |
-
$emailStr = $emailAllowed ? $this->__('Yes') : $this->__('No');
|
438 |
-
$message = $this->__('Google Order Number: %s', '<strong>' . $this->getGoogleOrderNumber() . '</strong><br />')
|
439 |
-
. $this->__('Google Buyer ID: %s', '<strong>' . $this->getData('root/buyer-id/VALUE') . '</strong><br />')
|
440 |
-
. $this->__('Is Buyer Willing to Receive Marketing Emails: %s', '<strong>' . $emailStr . '</strong>');
|
441 |
-
if ($taxMessage) {
|
442 |
-
$message .= $this->__('<br />Warning: <strong>%s</strong><br />', $taxMessage);
|
443 |
-
}
|
444 |
-
|
445 |
-
$order->addStatusToHistory($order->getStatus(), $message);
|
446 |
-
$order->place();
|
447 |
-
$order->save();
|
448 |
-
$order->sendNewOrderEmail();
|
449 |
-
Mage::dispatchEvent('googlecheckout_save_order_after', array('order' => $order));
|
450 |
-
|
451 |
-
$quote->setIsActive(false)->save();
|
452 |
-
|
453 |
-
if ($emailAllowed) {
|
454 |
-
$customer = $quote->getCustomer();
|
455 |
-
if ($customer && $customer->getId()) {
|
456 |
-
$customer->setIsSubscribed(true);
|
457 |
-
Mage::getModel('newsletter/subscriber')->subscribeCustomer($customer);
|
458 |
-
} else {
|
459 |
-
Mage::getModel('newsletter/subscriber')->subscribe($order->getCustomerEmail());
|
460 |
-
}
|
461 |
-
}
|
462 |
-
|
463 |
-
Mage::dispatchEvent('checkout_submit_all_after', array('order' => $order, 'quote' => $quote));
|
464 |
-
|
465 |
-
$this->getGRequest()->SendMerchantOrderNumber($order->getExtOrderId(), $order->getIncrementId());
|
466 |
-
}
|
467 |
-
|
468 |
-
/**
|
469 |
-
* If tax value differs tax which is setted on magento,
|
470 |
-
* apply Google tax and recollect quote
|
471 |
-
*
|
472 |
-
* @param Varien_Object $qAddress
|
473 |
-
* @return string | false
|
474 |
-
*/
|
475 |
-
protected function _applyCustomTax($qAddress)
|
476 |
-
{
|
477 |
-
$quote = $qAddress->getQuote();
|
478 |
-
$qTaxAmount = $qAddress->getBaseTaxAmount();
|
479 |
-
$newTaxAmount = $this->getData('root/order-adjustment/total-tax/VALUE');
|
480 |
-
|
481 |
-
if ($qTaxAmount != $newTaxAmount) {
|
482 |
-
$taxQuotient = (int) $qTaxAmount ? $newTaxAmount/$qTaxAmount : $newTaxAmount;
|
483 |
-
|
484 |
-
$qAddress->setTaxAmount(
|
485 |
-
$this->_reCalculateToStoreCurrency($newTaxAmount, $quote)
|
486 |
-
);
|
487 |
-
$qAddress->setBaseTaxAmount($newTaxAmount);
|
488 |
-
|
489 |
-
$grandTotal = $qAddress->getBaseGrandTotal() - $qTaxAmount + $newTaxAmount;
|
490 |
-
$qAddress->setGrandTotal(
|
491 |
-
$this->_reCalculateToStoreCurrency($grandTotal, $quote)
|
492 |
-
);
|
493 |
-
$qAddress->setBaseGrandTotal($grandTotal);
|
494 |
-
|
495 |
-
$subtotalInclTax = $qAddress->getSubtotalInclTax() - $qTaxAmount + $newTaxAmount;
|
496 |
-
$qAddress->setSubtotalInclTax($subtotalInclTax);
|
497 |
-
|
498 |
-
foreach ($quote->getAllVisibleItems() as $item) {
|
499 |
-
if ($item->getParentItem()) {
|
500 |
-
continue;
|
501 |
-
}
|
502 |
-
if ($item->getTaxAmount()) {
|
503 |
-
$item->setTaxAmount($item->getTaxAmount()*$taxQuotient);
|
504 |
-
$item->setBaseTaxAmount($item->getBaseTaxAmount()*$taxQuotient);
|
505 |
-
$taxPercent = round(($item->getTaxAmount()/$item->getRowTotal())*100);
|
506 |
-
$item->setTaxPercent($taxPercent);
|
507 |
-
}
|
508 |
-
}
|
509 |
-
|
510 |
-
$grandTotal = $quote->getBaseGrandTotal() - $qTaxAmount + $newTaxAmount;
|
511 |
-
$quote->setGrandTotal(
|
512 |
-
$this->_reCalculateToStoreCurrency($grandTotal, $quote)
|
513 |
-
);
|
514 |
-
$quote->setBaseGrandTotal($grandTotal);
|
515 |
-
|
516 |
-
$message = $this->__('The tax amount has been applied based on the information received from Google Checkout, because tax amount received from Google Checkout is different from the calculated tax amount');
|
517 |
-
return $message;
|
518 |
-
}
|
519 |
-
|
520 |
-
return false;
|
521 |
-
}
|
522 |
-
|
523 |
-
/**
|
524 |
-
* Import address data from google request to address object
|
525 |
-
*
|
526 |
-
* @param array | Varien_Object $gAddress
|
527 |
-
* @param Varien_Object $qAddress
|
528 |
-
* @return Varien_Object
|
529 |
-
*/
|
530 |
-
protected function _importGoogleAddress($gAddress, Varien_Object $qAddress=null)
|
531 |
-
{
|
532 |
-
if (is_array($gAddress)) {
|
533 |
-
$gAddress = new Varien_Object($gAddress);
|
534 |
-
}
|
535 |
-
|
536 |
-
if (!$qAddress) {
|
537 |
-
$qAddress = Mage::getModel('sales/quote_address');
|
538 |
-
}
|
539 |
-
$nameArr = $gAddress->getData('structured-name');
|
540 |
-
if ($nameArr) {
|
541 |
-
$qAddress->setFirstname($nameArr['first-name']['VALUE'])
|
542 |
-
->setLastname($nameArr['last-name']['VALUE']);
|
543 |
-
} else {
|
544 |
-
$nameArr = explode(' ', $gAddress->getData('contact-name/VALUE'), 2);
|
545 |
-
$qAddress->setFirstname($nameArr[0]);
|
546 |
-
if (!empty($nameArr[1])) {
|
547 |
-
$qAddress->setLastname($nameArr[1]);
|
548 |
-
}
|
549 |
-
}
|
550 |
-
$region = Mage::getModel('directory/region')->loadByCode(
|
551 |
-
$gAddress->getData('region/VALUE'),
|
552 |
-
$gAddress->getData('country-code/VALUE')
|
553 |
-
);
|
554 |
-
|
555 |
-
$qAddress->setCompany($gAddress->getData('company-name/VALUE'))
|
556 |
-
->setEmail($gAddress->getData('email/VALUE'))
|
557 |
-
->setStreet(trim($gAddress->getData('address1/VALUE') . "\n" . $gAddress->getData('address2/VALUE')))
|
558 |
-
->setCity($gAddress->getData('city/VALUE'))
|
559 |
-
->setRegion($gAddress->getData('region/VALUE'))
|
560 |
-
->setRegionId($region->getId())
|
561 |
-
->setPostcode($gAddress->getData('postal-code/VALUE'))
|
562 |
-
->setCountryId($gAddress->getData('country-code/VALUE'))
|
563 |
-
->setTelephone($gAddress->getData('phone/VALUE'))
|
564 |
-
->setFax($gAddress->getData('fax/VALUE'));
|
565 |
-
|
566 |
-
return $qAddress;
|
567 |
-
}
|
568 |
-
|
569 |
-
/**
|
570 |
-
* Returns array of possible shipping methods combinations
|
571 |
-
* Includes internal GoogleCheckout shipping methods, that can be created
|
572 |
-
* after successful Google Checkout
|
573 |
-
*
|
574 |
-
* @return array
|
575 |
-
*/
|
576 |
-
protected function _getShippingInfos($storeId = null)
|
577 |
-
{
|
578 |
-
$cacheKey = ($storeId === null) ? 'nofilter' : $storeId;
|
579 |
-
if (!isset($this->_cachedShippingInfo[$cacheKey])) {
|
580 |
-
/* @var $shipping Mage_Shipping_Model_Shipping */
|
581 |
-
$shipping = Mage::getModel('shipping/shipping');
|
582 |
-
$carriers = Mage::getStoreConfig('carriers', $storeId);
|
583 |
-
$infos = array();
|
584 |
-
|
585 |
-
foreach (array_keys($carriers) as $carrierCode) {
|
586 |
-
$carrier = $shipping->getCarrierByCode($carrierCode);
|
587 |
-
if (!$carrier) {
|
588 |
-
continue;
|
589 |
-
}
|
590 |
-
|
591 |
-
if ($carrierCode == 'googlecheckout') {
|
592 |
-
// Add info about internal google checkout methods
|
593 |
-
$methods = array_merge($carrier->getAllowedMethods(), $carrier->getInternallyAllowedMethods());
|
594 |
-
$carrierName = 'Google Checkout';
|
595 |
-
} else {
|
596 |
-
$methods = $carrier->getAllowedMethods();
|
597 |
-
$carrierName = Mage::getStoreConfig('carriers/' . $carrierCode . '/title', $storeId);
|
598 |
-
}
|
599 |
-
|
600 |
-
foreach ($methods as $methodCode => $methodName) {
|
601 |
-
$code = $carrierCode . '_' . $methodCode;
|
602 |
-
$name = sprintf('%s - %s', $carrierName, $methodName);
|
603 |
-
$infos[$code] = array(
|
604 |
-
'code' => $code,
|
605 |
-
'name' => $name, // Internal name for google checkout api - to distinguish it in google requests
|
606 |
-
'carrier' => $carrierCode,
|
607 |
-
'carrier_title' => $carrierName,
|
608 |
-
'method' => $methodCode,
|
609 |
-
'method_title' => $methodName
|
610 |
-
);
|
611 |
-
}
|
612 |
-
}
|
613 |
-
$this->_cachedShippingInfo[$cacheKey] = $infos;
|
614 |
-
}
|
615 |
-
|
616 |
-
return $this->_cachedShippingInfo[$cacheKey];
|
617 |
-
}
|
618 |
-
|
619 |
-
/**
|
620 |
-
* Return shipping method code by shipping method name received from Google
|
621 |
-
*
|
622 |
-
* @param string $name
|
623 |
-
* @param int|string|Mage_Core_Model_Store $storeId
|
624 |
-
* @return string|false
|
625 |
-
*/
|
626 |
-
protected function _getShippingMethodByName($name, $storeId = null)
|
627 |
-
{
|
628 |
-
$code = false;
|
629 |
-
$infos = $this->_getShippingInfos($storeId);
|
630 |
-
foreach ($infos as $info) {
|
631 |
-
if ($info['name'] == $name) {
|
632 |
-
$code = $info['code'];
|
633 |
-
break;
|
634 |
-
}
|
635 |
-
}
|
636 |
-
return $code;
|
637 |
-
}
|
638 |
-
|
639 |
-
/**
|
640 |
-
* Creates rate by method code
|
641 |
-
* Sets shipping rate's accurate description, titles and so on,
|
642 |
-
* so it will get in order description properly
|
643 |
-
*
|
644 |
-
* @param string $code
|
645 |
-
* @return Mage_Sales_Model_Quote_Address_Rate
|
646 |
-
*/
|
647 |
-
protected function _createShippingRate($code, $storeId = null)
|
648 |
-
{
|
649 |
-
$rate = Mage::getModel('sales/quote_address_rate')
|
650 |
-
->setCode($code);
|
651 |
-
|
652 |
-
$infos = $this->_getShippingInfos($storeId);
|
653 |
-
if (isset($infos[$code])) {
|
654 |
-
$info = $infos[$code];
|
655 |
-
$rate->setCarrier($info['carrier'])
|
656 |
-
->setCarrierTitle($info['carrier_title'])
|
657 |
-
->setMethod($info['method'])
|
658 |
-
->setMethodTitle($info['method_title']);
|
659 |
-
}
|
660 |
-
|
661 |
-
return $rate;
|
662 |
-
}
|
663 |
-
|
664 |
-
/**
|
665 |
-
* Import totals information from google request to quote address
|
666 |
-
*
|
667 |
-
* @param Varien_Object $qAddress
|
668 |
-
*/
|
669 |
-
protected function _importGoogleTotals($qAddress)
|
670 |
-
{
|
671 |
-
$quote = $qAddress->getQuote();
|
672 |
-
$qAddress->setTaxAmount(
|
673 |
-
$this->_reCalculateToStoreCurrency($this->getData('root/order-adjustment/total-tax/VALUE'), $quote)
|
674 |
-
);
|
675 |
-
$qAddress->setBaseTaxAmount($this->getData('root/order-adjustment/total-tax/VALUE'));
|
676 |
-
|
677 |
-
$method = null;
|
678 |
-
$prefix = 'root/order-adjustment/shipping/';
|
679 |
-
if (null !== ($shipping = $this->getData($prefix . 'carrier-calculated-shipping-adjustment'))) {
|
680 |
-
$method = 'googlecheckout_carrier';
|
681 |
-
} else if (null !== ($shipping = $this->getData($prefix . 'merchant-calculated-shipping-adjustment'))) {
|
682 |
-
$method = 'googlecheckout_merchant';
|
683 |
-
} else if (null !== ($shipping = $this->getData($prefix . 'flat-rate-shipping-adjustment'))) {
|
684 |
-
$method = 'googlecheckout_flatrate';
|
685 |
-
} else if (null !== ($shipping = $this->getData($prefix . 'pickup-shipping-adjustment'))) {
|
686 |
-
$method = 'googlecheckout_pickup';
|
687 |
-
}
|
688 |
-
|
689 |
-
if ($method) {
|
690 |
-
Mage::getSingleton('tax/config')->setShippingPriceIncludeTax(false);
|
691 |
-
$rate = $this->_createShippingRate($method)
|
692 |
-
->setMethodTitle($shipping['shipping-name']['VALUE'])
|
693 |
-
->setPrice($shipping['shipping-cost']['VALUE']);
|
694 |
-
$qAddress->addShippingRate($rate)
|
695 |
-
->setShippingMethod($method)
|
696 |
-
->setShippingDescription($shipping['shipping-name']['VALUE']);
|
697 |
-
// We get from Google price with discounts applied via merchant calculations
|
698 |
-
$qAddress->setShippingAmountForDiscount(0);
|
699 |
-
|
700 |
-
/*if (!Mage::helper('tax')->shippingPriceIncludesTax($quote->getStore())) {
|
701 |
-
$includingTax = Mage::helper('tax')->getShippingPrice(
|
702 |
-
$excludingTax, true, $qAddress, $quote->getCustomerTaxClassId()
|
703 |
-
);
|
704 |
-
$shippingTax = $includingTax - $excludingTax;
|
705 |
-
$qAddress->setShippingTaxAmount($this->_reCalculateToStoreCurrency($shippingTax, $quote))
|
706 |
-
->setBaseShippingTaxAmount($shippingTax)
|
707 |
-
->setShippingInclTax($includingTax)
|
708 |
-
->setBaseShippingInclTax($this->_reCalculateToStoreCurrency($includingTax, $quote));
|
709 |
-
} else {
|
710 |
-
if ($method == 'googlecheckout_carrier') {
|
711 |
-
$qAddress->setShippingTaxAmount(0)
|
712 |
-
->setBaseShippingTaxAmount(0);
|
713 |
-
}
|
714 |
-
}*/
|
715 |
-
} else {
|
716 |
-
$qAddress->setShippingMethod(null);
|
717 |
-
}
|
718 |
-
|
719 |
-
|
720 |
-
$qAddress->setGrandTotal(
|
721 |
-
$this->_reCalculateToStoreCurrency($this->getData('root/order-total/VALUE'), $quote)
|
722 |
-
);
|
723 |
-
$qAddress->setBaseGrandTotal($this->getData('root/order-total/VALUE'));
|
724 |
-
}
|
725 |
-
|
726 |
-
/**
|
727 |
-
* Order getter
|
728 |
-
*
|
729 |
-
* @return Mage_Sales_Model_Order
|
730 |
-
*/
|
731 |
-
public function getOrder()
|
732 |
-
{
|
733 |
-
if (!$this->hasData('order')) {
|
734 |
-
$order = Mage::getModel('sales/order')
|
735 |
-
->loadByAttribute('ext_order_id', $this->getGoogleOrderNumber());
|
736 |
-
if (!$order->getId()) {
|
737 |
-
Mage::throwException('Invalid Order: ' . $this->getGoogleOrderNumber());
|
738 |
-
}
|
739 |
-
$this->setData('order', $order);
|
740 |
-
}
|
741 |
-
return $this->getData('order');
|
742 |
-
}
|
743 |
-
|
744 |
-
protected function _responseRiskInformationNotification()
|
745 |
-
{
|
746 |
-
$this->getGResponse()->SendAck();
|
747 |
-
|
748 |
-
$order = $this->getOrder();
|
749 |
-
$payment = $order->getPayment();
|
750 |
-
|
751 |
-
$order
|
752 |
-
->setRemoteIp($this->getData('root/risk-information/ip-address/VALUE'));
|
753 |
-
|
754 |
-
$payment
|
755 |
-
->setCcLast4($this->getData('root/risk-information/partial-cc-number/VALUE'))
|
756 |
-
->setCcAvsStatus($this->getData('root/risk-information/avs-response/VALUE'))
|
757 |
-
->setCcCidStatus($this->getData('root/risk-information/cvn-response/VALUE'));
|
758 |
-
|
759 |
-
$msg = $this->__('Google Risk Information:');
|
760 |
-
$msg .= '<br />' . $this->__('IP Address: %s', '<strong>' . $order->getRemoteIp() . '</strong>');
|
761 |
-
$msg .= '<br />' . $this->__('CC Partial: xxxx-%s', '<strong>' . $payment->getCcLast4() . '</strong>');
|
762 |
-
$msg .= '<br />' . $this->__('AVS Status: %s', '<strong>' . $payment->getCcAvsStatus() . '</strong>');
|
763 |
-
$msg .= '<br />' . $this->__('CID Status: %s', '<strong>' . $payment->getCcCidStatus() . '</strong>');
|
764 |
-
$msg .= '<br />' . $this->__('Eligible for Protection: %s', '<strong>' . ($this->getData('root/risk-information/eligible-for-protection/VALUE')=='true' ? 'Yes' : 'No') . '</strong>');
|
765 |
-
$msg .= '<br />' . $this->__('Buyer Account Age: %s days', '<strong>' . $this->getData('root/risk-information/buyer-account-age/VALUE') . '</strong>');
|
766 |
-
|
767 |
-
$order->addStatusToHistory($order->getStatus(), $msg);
|
768 |
-
$order->save();
|
769 |
-
}
|
770 |
-
|
771 |
-
/**
|
772 |
-
* Process authorization notification
|
773 |
-
*/
|
774 |
-
protected function _responseAuthorizationAmountNotification()
|
775 |
-
{
|
776 |
-
$this->getGResponse()->SendAck();
|
777 |
-
|
778 |
-
$order = $this->getOrder();
|
779 |
-
$payment = $order->getPayment();
|
780 |
-
|
781 |
-
$payment->setAmountAuthorized($this->getData('root/authorization-amount/VALUE'));
|
782 |
-
|
783 |
-
$expDate = $this->getData('root/authorization-expiration-date/VALUE');
|
784 |
-
$expDate = new Zend_Date($expDate);
|
785 |
-
$msg = $this->__('Google Authorization:');
|
786 |
-
$msg .= '<br />' . $this->__('Amount: %s', '<strong>' . $this->_formatAmount($payment->getAmountAuthorized()) . '</strong>');
|
787 |
-
$msg .= '<br />' . $this->__('Expiration: %s', '<strong>' . $expDate->toString() . '</strong>');
|
788 |
-
|
789 |
-
$order->addStatusToHistory($order->getStatus(), $msg);
|
790 |
-
|
791 |
-
$order->setPaymentAuthorizationAmount($payment->getAmountAuthorized());
|
792 |
-
$timestamp = Mage::getModel('core/date')->gmtTimestamp(
|
793 |
-
$this->getData('root/authorization-expiration-date/VALUE')
|
794 |
-
);
|
795 |
-
$order->setPaymentAuthorizationExpiration(
|
796 |
-
$timestamp ? $timestamp : Mage::getModel('core/date')->gmtTimestamp()
|
797 |
-
);
|
798 |
-
|
799 |
-
$order->save();
|
800 |
-
}
|
801 |
-
|
802 |
-
/**
|
803 |
-
* Process charge notification
|
804 |
-
*
|
805 |
-
*/
|
806 |
-
protected function _responseChargeAmountNotification()
|
807 |
-
{
|
808 |
-
$this->getGResponse()->SendAck();
|
809 |
-
|
810 |
-
$order = $this->getOrder();
|
811 |
-
$payment = $order->getPayment();
|
812 |
-
if ($payment->getMethod() !== 'googlecheckout') {
|
813 |
-
return;
|
814 |
-
}
|
815 |
-
|
816 |
-
$latestCharged = $this->getData('root/latest-charge-amount/VALUE');
|
817 |
-
$totalCharged = $this->getData('root/total-charge-amount/VALUE');
|
818 |
-
$payment->setAmountCharged($totalCharged);
|
819 |
-
$order->setIsInProcess(true);
|
820 |
-
|
821 |
-
$msg = $this->__('Google Charge:');
|
822 |
-
$msg .= '<br />' . $this->__('Latest Charge: %s', '<strong>' . $this->_formatAmount($latestCharged) . '</strong>');
|
823 |
-
$msg .= '<br />' . $this->__('Total Charged: %s', '<strong>' . $this->_formatAmount($totalCharged) . '</strong>');
|
824 |
-
|
825 |
-
if (!$order->hasInvoices() && abs($order->getBaseGrandTotal() - $latestCharged) < .0001) {
|
826 |
-
$invoice = $this->_createInvoice();
|
827 |
-
$msg .= '<br />' . $this->__('Invoice Auto-Created: %s', '<strong>' . $invoice->getIncrementId() . '</strong>');
|
828 |
-
}
|
829 |
-
|
830 |
-
$this->_addChildTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE);
|
831 |
-
|
832 |
-
$open = Mage_Sales_Model_Order_Invoice::STATE_OPEN;
|
833 |
-
foreach ($order->getInvoiceCollection() as $orderInvoice) {
|
834 |
-
if ($orderInvoice->getState() == $open && $orderInvoice->getBaseGrandTotal() == $latestCharged) {
|
835 |
-
$orderInvoice->setState(Mage_Sales_Model_Order_Invoice::STATE_PAID)
|
836 |
-
->setTransactionId($this->getGoogleOrderNumber())
|
837 |
-
->save();
|
838 |
-
break;
|
839 |
-
}
|
840 |
-
}
|
841 |
-
|
842 |
-
$order->addStatusToHistory($order->getStatus(), $msg);
|
843 |
-
$order->save();
|
844 |
-
}
|
845 |
-
|
846 |
-
protected function _createInvoice()
|
847 |
-
{
|
848 |
-
$order = $this->getOrder();
|
849 |
-
|
850 |
-
$invoice = $order->prepareInvoice()
|
851 |
-
->setTransactionId($this->getGoogleOrderNumber())
|
852 |
-
->addComment(Mage::helper('googlecheckout')->__('Auto-generated from GoogleCheckout Charge'))
|
853 |
-
->register()
|
854 |
-
->pay();
|
855 |
-
|
856 |
-
$transactionSave = Mage::getModel('core/resource_transaction')
|
857 |
-
->addObject($invoice)
|
858 |
-
->addObject($invoice->getOrder());
|
859 |
-
|
860 |
-
$transactionSave->save();
|
861 |
-
|
862 |
-
return $invoice;
|
863 |
-
}
|
864 |
-
|
865 |
-
protected function _createShipment()
|
866 |
-
{
|
867 |
-
$order = $this->getOrder();
|
868 |
-
$shipment = $order->prepareShipment();
|
869 |
-
if ($shipment) {
|
870 |
-
$shipment->register();
|
871 |
-
|
872 |
-
$order->setIsInProcess(true);
|
873 |
-
|
874 |
-
$transactionSave = Mage::getModel('core/resource_transaction')
|
875 |
-
->addObject($shipment)
|
876 |
-
->addObject($shipment->getOrder())
|
877 |
-
->save();
|
878 |
-
}
|
879 |
-
|
880 |
-
return $shipment;
|
881 |
-
}
|
882 |
-
|
883 |
-
/**
|
884 |
-
* Process chargeback notification
|
885 |
-
*/
|
886 |
-
protected function _responseChargebackAmountNotification()
|
887 |
-
{
|
888 |
-
$this->getGResponse()->SendAck();
|
889 |
-
|
890 |
-
$latestChargeback = $this->getData('root/latest-chargeback-amount/VALUE');
|
891 |
-
$totalChargeback = $this->getData('root/total-chargeback-amount/VALUE');
|
892 |
-
|
893 |
-
$order = $this->getOrder();
|
894 |
-
if ($order->getBaseGrandTotal() == $totalChargeback) {
|
895 |
-
$creditmemo = Mage::getModel('sales/service_order', $order)
|
896 |
-
->prepareCreditmemo()
|
897 |
-
->setPaymentRefundDisallowed(true)
|
898 |
-
->setAutomaticallyCreated(true)
|
899 |
-
->register();
|
900 |
-
|
901 |
-
$creditmemo->addComment($this->__('Credit memo has been created automatically'));
|
902 |
-
$creditmemo->save();
|
903 |
-
}
|
904 |
-
$msg = $this->__('Google Chargeback:');
|
905 |
-
$msg .= '<br />' . $this->__('Latest Chargeback: %s', '<strong>' . $this->_formatAmount($latestChargeback) . '</strong>');
|
906 |
-
$msg .= '<br />' . $this->__('Total Chargeback: %s', '<strong>' . $this->_formatAmount($totalChargeback) . '</strong>');
|
907 |
-
|
908 |
-
$this->_addChildTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_REFUND,
|
909 |
-
Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE);
|
910 |
-
|
911 |
-
$order->addStatusToHistory($order->getStatus(), $msg);
|
912 |
-
$order->save();
|
913 |
-
}
|
914 |
-
|
915 |
-
/**
|
916 |
-
* Process refund notification
|
917 |
-
*/
|
918 |
-
protected function _responseRefundAmountNotification()
|
919 |
-
{
|
920 |
-
$this->getGResponse()->SendAck();
|
921 |
-
|
922 |
-
$latestRefunded = $this->getData('root/latest-refund-amount/VALUE');
|
923 |
-
$totalRefunded = $this->getData('root/total-refund-amount/VALUE');
|
924 |
-
|
925 |
-
$order = $this->getOrder();
|
926 |
-
$amountRefundLeft = $order->getBaseGrandTotal() - $order->getBaseTotalRefunded()
|
927 |
-
- $order->getBaseAdjustmentNegative();
|
928 |
-
if (abs($amountRefundLeft) < .0001) {
|
929 |
-
return;
|
930 |
-
}
|
931 |
-
if ($amountRefundLeft < $latestRefunded) {
|
932 |
-
$latestRefunded = $amountRefundLeft;
|
933 |
-
$totalRefunded = $order->getBaseGrandTotal();
|
934 |
-
}
|
935 |
-
|
936 |
-
if ($order->getBaseTotalRefunded() > 0) {
|
937 |
-
$adjustment = array('adjustment_positive' => $latestRefunded);
|
938 |
-
} else {
|
939 |
-
$adjustment = array('adjustment_negative' => $order->getBaseGrandTotal() - $latestRefunded);
|
940 |
-
}
|
941 |
-
|
942 |
-
$creditmemo = Mage::getModel('sales/service_order', $order)
|
943 |
-
->prepareCreditmemo($adjustment)
|
944 |
-
->setPaymentRefundDisallowed(true)
|
945 |
-
->setAutomaticallyCreated(true)
|
946 |
-
->register()
|
947 |
-
->addComment($this->__('Credit memo has been created automatically'))
|
948 |
-
->save();
|
949 |
-
|
950 |
-
$msg = $this->__('Google Refund:');
|
951 |
-
$msg .= '<br />' . $this->__('Latest Refund: %s', '<strong>' . $this->_formatAmount($latestRefunded) . '</strong>');
|
952 |
-
$msg .= '<br />' . $this->__('Total Refunded: %s', '<strong>' . $this->_formatAmount($totalRefunded) . '</strong>');
|
953 |
-
|
954 |
-
$this->_addChildTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_REFUND,
|
955 |
-
Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE);
|
956 |
-
|
957 |
-
$order->addStatusToHistory($order->getStatus(), $msg);
|
958 |
-
$order->save();
|
959 |
-
}
|
960 |
-
|
961 |
-
protected function _responseOrderStateChangeNotification()
|
962 |
-
{
|
963 |
-
$this->getGResponse()->SendAck();
|
964 |
-
|
965 |
-
$prevFinancial = $this->getData('root/previous-financial-order-state/VALUE');
|
966 |
-
$newFinancial = $this->getData('root/new-financial-order-state/VALUE');
|
967 |
-
$prevFulfillment = $this->getData('root/previous-fulfillment-order-state/VALUE');
|
968 |
-
$newFulfillment = $this->getData('root/new-fulfillment-order-state/VALUE');
|
969 |
-
|
970 |
-
$msg = $this->__('Google Order Status Change:');
|
971 |
-
if ($prevFinancial!=$newFinancial) {
|
972 |
-
$msg .= "<br />" . $this->__('Financial: %s -> %s', '<strong>' . $prevFinancial . '</strong>', '<strong>' . $newFinancial . '</strong>');
|
973 |
-
}
|
974 |
-
if ($prevFulfillment!=$newFulfillment) {
|
975 |
-
$msg .= "<br />" . $this->__('Fulfillment: %s -> %s', '<strong>' . $prevFulfillment . '</strong>', '<strong>' . $newFulfillment . '</strong>');
|
976 |
-
}
|
977 |
-
$this->getOrder()
|
978 |
-
->addStatusToHistory($this->getOrder()->getStatus(), $msg)
|
979 |
-
->save();
|
980 |
-
|
981 |
-
$method = '_orderStateChangeFinancial' . uc_words(strtolower($newFinancial), '', '_');
|
982 |
-
if (method_exists($this, $method)) {
|
983 |
-
$this->$method();
|
984 |
-
}
|
985 |
-
|
986 |
-
$method = '_orderStateChangeFulfillment' . uc_words(strtolower($newFulfillment), '', '_');
|
987 |
-
if (method_exists($this, $method)) {
|
988 |
-
$this->$method();
|
989 |
-
}
|
990 |
-
}
|
991 |
-
|
992 |
-
/**
|
993 |
-
* Add transaction to payment with defined type
|
994 |
-
*
|
995 |
-
* @param string $typeTarget
|
996 |
-
* @param string $typeParent
|
997 |
-
* @return Mage_GoogleCheckout_Model_Api_Xml_Callback
|
998 |
-
*/
|
999 |
-
protected function _addChildTransaction(
|
1000 |
-
$typeTarget,
|
1001 |
-
$typeParent = Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH)
|
1002 |
-
{
|
1003 |
-
$payment = $this->getOrder()->getPayment();
|
1004 |
-
$googleOrderId = $this->getGoogleOrderNumber();
|
1005 |
-
$parentTransactionId = $googleOrderId;
|
1006 |
-
|
1007 |
-
if ($typeParent != Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH) {
|
1008 |
-
$parentTransactionId .= '-' . $typeParent;
|
1009 |
-
} else {
|
1010 |
-
$payment->setIsTransactionClosed(false);
|
1011 |
-
}
|
1012 |
-
|
1013 |
-
$parentTransaction = $payment->getTransaction($parentTransactionId);
|
1014 |
-
|
1015 |
-
if ($parentTransaction) {
|
1016 |
-
$payment->setParentTransactionId($parentTransactionId)
|
1017 |
-
->setTransactionId($googleOrderId . '-' . $typeTarget)
|
1018 |
-
->addTransaction($typeTarget);
|
1019 |
-
|
1020 |
-
if ($this->getOrder()->getTotalDue() < .0001) {
|
1021 |
-
$parentTransaction->setIsClosed(true)
|
1022 |
-
->save();
|
1023 |
-
}
|
1024 |
-
}
|
1025 |
-
|
1026 |
-
return $this;
|
1027 |
-
}
|
1028 |
-
|
1029 |
-
protected function _orderStateChangeFinancialReviewing()
|
1030 |
-
{
|
1031 |
-
|
1032 |
-
}
|
1033 |
-
|
1034 |
-
protected function _orderStateChangeFinancialChargeable()
|
1035 |
-
{
|
1036 |
-
#$this->getGRequest()->SendProcessOrder($this->getGoogleOrderNumber());
|
1037 |
-
#$this->getGRequest()->SendChargeOrder($this->getGoogleOrderNumber(), '');
|
1038 |
-
}
|
1039 |
-
|
1040 |
-
protected function _orderStateChangeFinancialCharging()
|
1041 |
-
{
|
1042 |
-
|
1043 |
-
}
|
1044 |
-
|
1045 |
-
protected function _orderStateChangeFinancialCharged()
|
1046 |
-
{
|
1047 |
-
|
1048 |
-
}
|
1049 |
-
|
1050 |
-
protected function _orderStateChangeFinancialPaymentDeclined()
|
1051 |
-
{
|
1052 |
-
|
1053 |
-
}
|
1054 |
-
|
1055 |
-
protected function _orderStateChangeFinancialCancelled()
|
1056 |
-
{
|
1057 |
-
$this->getOrder()->setBeingCanceledFromGoogleApi(true)->cancel()->save();
|
1058 |
-
}
|
1059 |
-
|
1060 |
-
protected function _orderStateChangeFinancialCancelledByGoogle()
|
1061 |
-
{
|
1062 |
-
$this
|
1063 |
-
->getOrder()
|
1064 |
-
->setBeingCanceledFromGoogleApi(true)
|
1065 |
-
->cancel()
|
1066 |
-
->save();
|
1067 |
-
|
1068 |
-
$this
|
1069 |
-
->getGRequest()
|
1070 |
-
->SendBuyerMessage($this->getGoogleOrderNumber(), "Sorry, your order is cancelled by Google", true);
|
1071 |
-
}
|
1072 |
-
|
1073 |
-
protected function _orderStateChangeFulfillmentNew()
|
1074 |
-
{
|
1075 |
-
|
1076 |
-
}
|
1077 |
-
|
1078 |
-
protected function _orderStateChangeFulfillmentProcessing()
|
1079 |
-
{
|
1080 |
-
|
1081 |
-
}
|
1082 |
-
|
1083 |
-
protected function _orderStateChangeFulfillmentDelivered()
|
1084 |
-
{
|
1085 |
-
$shipment = $this->_createShipment();
|
1086 |
-
if (!is_null($shipment))
|
1087 |
-
$shipment->save();
|
1088 |
-
}
|
1089 |
-
|
1090 |
-
protected function _orderStateChangeFulfillmentWillNotDeliver()
|
1091 |
-
{
|
1092 |
-
|
1093 |
-
}
|
1094 |
-
|
1095 |
-
/**
|
1096 |
-
* Format amount to be displayed
|
1097 |
-
*
|
1098 |
-
* @param mixed $amount
|
1099 |
-
* @return string
|
1100 |
-
*/
|
1101 |
-
protected function _formatAmount($amount)
|
1102 |
-
{
|
1103 |
-
// format currency in currency format, but don't enclose it into <span>
|
1104 |
-
return Mage::helper('core')->currency($amount, true, false);
|
1105 |
-
}
|
1106 |
-
|
1107 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Checkout.php
DELETED
@@ -1,1143 +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_GoogleCheckout
|
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 |
-
* Google Checkout XML API processing model
|
29 |
-
*
|
30 |
-
* @category Mage
|
31 |
-
* @package Mage_GoogleCheckout
|
32 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
-
*/
|
34 |
-
class Mage_GoogleCheckout_Model_Api_Xml_Checkout extends Mage_GoogleCheckout_Model_Api_Xml_Abstract
|
35 |
-
{
|
36 |
-
/**
|
37 |
-
* Representation value of item weight unit
|
38 |
-
*/
|
39 |
-
const ITEM_WEIGHT_UNIT = 'LB';
|
40 |
-
|
41 |
-
/**
|
42 |
-
* Representation value of item size unit
|
43 |
-
*/
|
44 |
-
const ITEM_SIZE_UNIT = 'IN';
|
45 |
-
|
46 |
-
/**
|
47 |
-
* Google checkout namespace URI
|
48 |
-
*/
|
49 |
-
const CHECKOUT_SHOPPING_CART_XMLNS = 'http://checkout.google.com/schema/2';
|
50 |
-
|
51 |
-
/**
|
52 |
-
* @deprecated after 0.8.16100
|
53 |
-
*
|
54 |
-
* @var string
|
55 |
-
*/
|
56 |
-
protected $_currency;
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Define if shipping rates already calculated
|
60 |
-
*
|
61 |
-
* @var boolean
|
62 |
-
*/
|
63 |
-
protected $_shippingCalculated = false;
|
64 |
-
|
65 |
-
/**
|
66 |
-
* API URL getter
|
67 |
-
*
|
68 |
-
* @return string
|
69 |
-
*/
|
70 |
-
protected function _getApiUrl()
|
71 |
-
{
|
72 |
-
$url = $this->_getBaseApiUrl();
|
73 |
-
$url .= 'merchantCheckout/Merchant/' . $this->getMerchantId();
|
74 |
-
return $url;
|
75 |
-
}
|
76 |
-
|
77 |
-
/**
|
78 |
-
* Send checkout data to google
|
79 |
-
*
|
80 |
-
* @return Mage_GoogleCheckout_Model_Api_Xml_Checkout
|
81 |
-
*/
|
82 |
-
public function checkout()
|
83 |
-
{
|
84 |
-
$quote = $this->getQuote();
|
85 |
-
if (!($quote instanceof Mage_Sales_Model_Quote)) {
|
86 |
-
Mage::throwException('Invalid quote');
|
87 |
-
}
|
88 |
-
|
89 |
-
$xmlns = self::CHECKOUT_SHOPPING_CART_XMLNS;
|
90 |
-
$xml = <<<EOT
|
91 |
-
<checkout-shopping-cart xmlns="{$xmlns}">
|
92 |
-
<shopping-cart>
|
93 |
-
{$this->_getItemsXml()}
|
94 |
-
{$this->_getMerchantPrivateDataXml()}
|
95 |
-
{$this->_getCartExpirationXml()}
|
96 |
-
</shopping-cart>
|
97 |
-
<checkout-flow-support>
|
98 |
-
{$this->_getMerchantCheckoutFlowSupportXml()}
|
99 |
-
</checkout-flow-support>
|
100 |
-
<order-processing-support>
|
101 |
-
{$this->_getRequestInitialAuthDetailsXml()}
|
102 |
-
</order-processing-support>
|
103 |
-
</checkout-shopping-cart>
|
104 |
-
EOT;
|
105 |
-
|
106 |
-
$result = $this->_call($xml);
|
107 |
-
$this->setRedirectUrl($result->{'redirect-url'});
|
108 |
-
|
109 |
-
return $this;
|
110 |
-
}
|
111 |
-
|
112 |
-
/**
|
113 |
-
* Retrieve quote items in XML format
|
114 |
-
*
|
115 |
-
* @return string
|
116 |
-
*/
|
117 |
-
protected function _getItemsXml()
|
118 |
-
{
|
119 |
-
$xml = <<<EOT
|
120 |
-
<items>
|
121 |
-
|
122 |
-
EOT;
|
123 |
-
|
124 |
-
foreach ($this->getQuote()->getAllItems() as $item) {
|
125 |
-
if ($item->getParentItem()) {
|
126 |
-
continue;
|
127 |
-
}
|
128 |
-
$taxClass = ($item->getTaxClassId() == 0) ? 'none' : $item->getTaxClassId();
|
129 |
-
$weight = (float) $item->getWeight();
|
130 |
-
$weightUnit = self::ITEM_WEIGHT_UNIT;
|
131 |
-
|
132 |
-
$unitPrice = $item->getBaseCalculationPrice();
|
133 |
-
if (Mage::helper('weee')->includeInSubtotal()) {
|
134 |
-
$unitPrice += $item->getBaseWeeeTaxAppliedAmount();
|
135 |
-
}
|
136 |
-
|
137 |
-
$xml .= <<<EOT
|
138 |
-
<item>
|
139 |
-
<merchant-item-id><![CDATA[{$item->getSku()}]]></merchant-item-id>
|
140 |
-
<item-name><![CDATA[{$item->getName()}]]></item-name>
|
141 |
-
<item-description><![CDATA[{$item->getDescription()}]]></item-description>
|
142 |
-
<unit-price currency="{$this->getCurrency()}">{$unitPrice}</unit-price>
|
143 |
-
<quantity>{$item->getQty()}</quantity>
|
144 |
-
<item-weight unit="{$weightUnit}" value="{$weight}" />
|
145 |
-
<tax-table-selector>{$taxClass}</tax-table-selector>
|
146 |
-
{$this->_getDigitalContentXml($item->getIsVirtual())}
|
147 |
-
{$this->_getMerchantPrivateItemDataXml($item)}
|
148 |
-
</item>
|
149 |
-
|
150 |
-
EOT;
|
151 |
-
}
|
152 |
-
|
153 |
-
$billingAddress = $this->getQuote()->getBillingAddress();
|
154 |
-
$shippingAddress = $this->getQuote()->getShippingAddress();
|
155 |
-
|
156 |
-
$shippingDiscount = (float)$shippingAddress->getBaseDiscountAmount();
|
157 |
-
$billingDiscount = (float)$billingAddress->getBaseDiscountAmount();
|
158 |
-
$discount = $billingDiscount + $shippingDiscount;
|
159 |
-
|
160 |
-
// Exclude shipping discount
|
161 |
-
// Discount is negative value
|
162 |
-
$discount += $shippingAddress->getBaseShippingDiscountAmount();
|
163 |
-
|
164 |
-
$discountItem = new Varien_Object(array(
|
165 |
-
'price' => $discount,
|
166 |
-
'name' => $this->__('Cart Discount'),
|
167 |
-
'description' => $this->__('A virtual item to reflect the discount total')
|
168 |
-
));
|
169 |
-
|
170 |
-
Mage::dispatchEvent('google_checkout_discount_item_price', array(
|
171 |
-
'quote' => $this->getQuote(),
|
172 |
-
'discount_item' => $discountItem
|
173 |
-
));
|
174 |
-
|
175 |
-
$discount = $discountItem->getPrice();
|
176 |
-
if ($discount) {
|
177 |
-
$xml .= <<<EOT
|
178 |
-
<item>
|
179 |
-
<merchant-item-id>_INTERNAL_DISCOUNT_</merchant-item-id>
|
180 |
-
<item-name>{$discountItem->getName()}</item-name>
|
181 |
-
<item-description>{$discountItem->getDescription()}</item-description>
|
182 |
-
<unit-price currency="{$this->getCurrency()}">{$discount}</unit-price>
|
183 |
-
<quantity>1</quantity>
|
184 |
-
<item-weight unit="{$weightUnit}" value="0.00" />
|
185 |
-
<tax-table-selector>none</tax-table-selector>
|
186 |
-
{$this->_getDigitalContentXml($this->getQuote()->isVirtual())}
|
187 |
-
</item>
|
188 |
-
|
189 |
-
EOT;
|
190 |
-
}
|
191 |
-
|
192 |
-
$hiddenTax = $shippingAddress->getBaseHiddenTaxAmount() + $billingAddress->getBaseHiddenTaxAmount();
|
193 |
-
if ($hiddenTax) {
|
194 |
-
$xml .= <<<EOT
|
195 |
-
<item>
|
196 |
-
<merchant-item-id>_INTERNAL_TAX_</merchant-item-id>
|
197 |
-
<item-name>{$this->__('Discount Tax')}</item-name>
|
198 |
-
<item-description>{$this->__('A virtual item to reflect the tax total')}</item-description>
|
199 |
-
<unit-price currency="{$this->getCurrency()}">{$hiddenTax}</unit-price>
|
200 |
-
<quantity>1</quantity>
|
201 |
-
<item-weight unit="{$weightUnit}" value="0.00" />
|
202 |
-
<tax-table-selector>none</tax-table-selector>
|
203 |
-
{$this->_getDigitalContentXml($this->getQuote()->isVirtual())}
|
204 |
-
</item>
|
205 |
-
EOT;
|
206 |
-
}
|
207 |
-
$xml .= <<<EOT
|
208 |
-
</items>
|
209 |
-
EOT;
|
210 |
-
|
211 |
-
return $xml;
|
212 |
-
}
|
213 |
-
|
214 |
-
/**
|
215 |
-
* Retrieve digital content XML
|
216 |
-
*
|
217 |
-
* @param boolean $isVirtual
|
218 |
-
* @return string
|
219 |
-
*/
|
220 |
-
protected function _getDigitalContentXml($isVirtual)
|
221 |
-
{
|
222 |
-
if (!$isVirtual) {
|
223 |
-
return '';
|
224 |
-
}
|
225 |
-
|
226 |
-
$storeId = $this->getQuote()->getStoreId();
|
227 |
-
$active = Mage::getStoreConfigFlag(Mage_GoogleCheckout_Helper_Data::XML_PATH_SHIPPING_VIRTUAL_ACTIVE, $storeId);
|
228 |
-
if (!$active) {
|
229 |
-
return '';
|
230 |
-
}
|
231 |
-
|
232 |
-
$schedule = Mage::getStoreConfig(Mage_GoogleCheckout_Helper_Data::XML_PATH_SHIPPING_VIRTUAL_SCHEDULE, $storeId);
|
233 |
-
$method = Mage::getStoreConfig(Mage_GoogleCheckout_Helper_Data::XML_PATH_SHIPPING_VIRTUAL_METHOD, $storeId);
|
234 |
-
|
235 |
-
$xml = "<display-disposition>{$schedule}</display-disposition>";
|
236 |
-
|
237 |
-
if ($method == 'email') {
|
238 |
-
$xml .= '<email-delivery>true</email-delivery>';
|
239 |
-
} elseif ($method == 'key_url') {
|
240 |
-
} elseif ($method == 'description_based') {
|
241 |
-
}
|
242 |
-
|
243 |
-
$xml = "<digital-content>{$xml}</digital-content>";
|
244 |
-
|
245 |
-
return $xml;
|
246 |
-
}
|
247 |
-
|
248 |
-
/**
|
249 |
-
* Convert quote item to private item XML
|
250 |
-
*
|
251 |
-
* @param Mage_Sales_Model_Quote_Item $item
|
252 |
-
* @return string
|
253 |
-
*/
|
254 |
-
protected function _getMerchantPrivateItemDataXml($item)
|
255 |
-
{
|
256 |
-
$xml = <<<EOT
|
257 |
-
<merchant-private-item-data>
|
258 |
-
<quote-item-id>{$item->getId()}</quote-item-id>
|
259 |
-
</merchant-private-item-data>
|
260 |
-
EOT;
|
261 |
-
return $xml;
|
262 |
-
}
|
263 |
-
|
264 |
-
/**
|
265 |
-
* Retrieve merchant private data XML
|
266 |
-
*
|
267 |
-
* @return string
|
268 |
-
*/
|
269 |
-
protected function _getMerchantPrivateDataXml()
|
270 |
-
{
|
271 |
-
$xml = <<<EOT
|
272 |
-
<merchant-private-data>
|
273 |
-
<quote-id><![CDATA[{$this->getQuote()->getId()}]]></quote-id>
|
274 |
-
<store-id><![CDATA[{$this->getQuote()->getStoreId()}]]></store-id>
|
275 |
-
</merchant-private-data>
|
276 |
-
EOT;
|
277 |
-
return $xml;
|
278 |
-
}
|
279 |
-
|
280 |
-
/**
|
281 |
-
* Retrieve quote expiration XML
|
282 |
-
*
|
283 |
-
* @return string
|
284 |
-
*/
|
285 |
-
protected function _getCartExpirationXml()
|
286 |
-
{
|
287 |
-
$xml = <<<EOT
|
288 |
-
EOT;
|
289 |
-
return $xml;
|
290 |
-
}
|
291 |
-
|
292 |
-
/**
|
293 |
-
* Retrieve merchant checkout flow support XML
|
294 |
-
*
|
295 |
-
* @return string
|
296 |
-
*/
|
297 |
-
protected function _getMerchantCheckoutFlowSupportXml()
|
298 |
-
{
|
299 |
-
$xml = <<<EOT
|
300 |
-
<merchant-checkout-flow-support>
|
301 |
-
<edit-cart-url><![CDATA[{$this->_getEditCartUrl()}]]></edit-cart-url>
|
302 |
-
<continue-shopping-url><![CDATA[{$this->_getContinueShoppingUrl()}]]></continue-shopping-url>
|
303 |
-
{$this->_getRequestBuyerPhoneNumberXml()}
|
304 |
-
{$this->_getMerchantCalculationsXml()}
|
305 |
-
{$this->_getShippingMethodsXml()}
|
306 |
-
{$this->_getAllTaxTablesXml()}
|
307 |
-
{$this->_getParameterizedUrlsXml()}
|
308 |
-
{$this->_getPlatformIdXml()}
|
309 |
-
{$this->_getAnalyticsDataXml()}
|
310 |
-
</merchant-checkout-flow-support>
|
311 |
-
EOT;
|
312 |
-
return $xml;
|
313 |
-
}
|
314 |
-
|
315 |
-
/**
|
316 |
-
* Retrieve request buyer phone number XML
|
317 |
-
*
|
318 |
-
* @return string
|
319 |
-
*/
|
320 |
-
protected function _getRequestBuyerPhoneNumberXml()
|
321 |
-
{
|
322 |
-
$requestPhone = Mage::getStoreConfig(
|
323 |
-
Mage_GoogleCheckout_Helper_Data::XML_PATH_REQUEST_PHONE,
|
324 |
-
$this->getQuote()->getStoreId()
|
325 |
-
);
|
326 |
-
$requestPhone = $requestPhone ? 'true' : 'false';
|
327 |
-
$xml = <<<EOT
|
328 |
-
<request-buyer-phone-number>{$requestPhone}</request-buyer-phone-number>
|
329 |
-
EOT;
|
330 |
-
return $xml;
|
331 |
-
}
|
332 |
-
|
333 |
-
/**
|
334 |
-
* Retrieve merchant calculations XML
|
335 |
-
*
|
336 |
-
* @return string
|
337 |
-
*/
|
338 |
-
protected function _getMerchantCalculationsXml()
|
339 |
-
{
|
340 |
-
$xml = <<<EOT
|
341 |
-
<merchant-calculations>
|
342 |
-
<merchant-calculations-url><![CDATA[{$this->_getCalculationsUrl()}]]></merchant-calculations-url>
|
343 |
-
</merchant-calculations>
|
344 |
-
EOT;
|
345 |
-
return $xml;
|
346 |
-
}
|
347 |
-
|
348 |
-
/**
|
349 |
-
* Retrieve free shipping rate XML
|
350 |
-
*
|
351 |
-
* @return string
|
352 |
-
*/
|
353 |
-
protected function _getVirtualOrderShippingXml()
|
354 |
-
{
|
355 |
-
$title = Mage::helper('googlecheckout')->__('Free Shipping');
|
356 |
-
|
357 |
-
$xml = <<<EOT
|
358 |
-
<shipping-methods>
|
359 |
-
<flat-rate-shipping name="{$title}">
|
360 |
-
<shipping-restrictions><allowed-areas><world-area /></allowed-areas></shipping-restrictions>
|
361 |
-
<price currency="{$this->getCurrency()}">0</price>
|
362 |
-
</flat-rate-shipping>
|
363 |
-
</shipping-methods>
|
364 |
-
EOT;
|
365 |
-
return $xml;
|
366 |
-
}
|
367 |
-
|
368 |
-
/**
|
369 |
-
* Retrieve shipping methods XML
|
370 |
-
*
|
371 |
-
* @return string
|
372 |
-
*/
|
373 |
-
protected function _getShippingMethodsXml()
|
374 |
-
{
|
375 |
-
if ($this->_isOrderVirtual()) {
|
376 |
-
return $this->_getVirtualOrderShippingXml();
|
377 |
-
}
|
378 |
-
|
379 |
-
$xml = <<<EOT
|
380 |
-
<shipping-methods>
|
381 |
-
{$this->_getCarrierCalculatedShippingXml()}
|
382 |
-
{$this->_getFlatRateShippingXml()}
|
383 |
-
{$this->_getMerchantCalculatedShippingXml()}
|
384 |
-
{$this->_getPickupXml()}
|
385 |
-
</shipping-methods>
|
386 |
-
EOT;
|
387 |
-
return $xml;
|
388 |
-
}
|
389 |
-
|
390 |
-
/**
|
391 |
-
* Generate XML of calculated shipping carriers rates
|
392 |
-
*
|
393 |
-
* @return string
|
394 |
-
*/
|
395 |
-
protected function _getCarrierCalculatedShippingXml()
|
396 |
-
{
|
397 |
-
/*
|
398 |
-
* Prevent sending more then one shipping option to Google
|
399 |
-
*/
|
400 |
-
if ($this->_shippingCalculated) {
|
401 |
-
return '';
|
402 |
-
}
|
403 |
-
|
404 |
-
$storeId = $this->getQuote()->getStoreId();
|
405 |
-
$active = Mage::getStoreConfigFlag(Mage_GoogleCheckout_Helper_Data::XML_PATH_SHIPPING_CARRIER_ACTIVE, $storeId);
|
406 |
-
$methods = Mage::getStoreConfig(Mage_GoogleCheckout_Helper_Data::XML_PATH_SHIPPING_CARRIER_METHODS, $storeId);
|
407 |
-
|
408 |
-
if (!$active || !$methods) {
|
409 |
-
return '';
|
410 |
-
}
|
411 |
-
|
412 |
-
$country = Mage::getStoreConfig(Mage_Shipping_Model_Config::XML_PATH_ORIGIN_COUNTRY_ID, $storeId);
|
413 |
-
$region = Mage::getStoreConfig(Mage_Shipping_Model_Config::XML_PATH_ORIGIN_REGION_ID, $storeId);
|
414 |
-
$postcode = Mage::getStoreConfig(Mage_Shipping_Model_Config::XML_PATH_ORIGIN_POSTCODE, $storeId);
|
415 |
-
$city = Mage::getStoreConfig(Mage_Shipping_Model_Config::XML_PATH_ORIGIN_CITY, $storeId);
|
416 |
-
|
417 |
-
$defPrice = (float)Mage::getStoreConfig(
|
418 |
-
Mage_GoogleCheckout_Helper_Data::XML_PATH_SHIPPING_CARRIER_DEFAULT_PRICE,
|
419 |
-
$storeId
|
420 |
-
);
|
421 |
-
$width = Mage::getStoreConfig(
|
422 |
-
Mage_GoogleCheckout_Helper_Data::XML_PATH_SHIPPING_CARRIER_DEFAULT_WIDTH,
|
423 |
-
$storeId
|
424 |
-
);
|
425 |
-
$height = Mage::getStoreConfig(
|
426 |
-
Mage_GoogleCheckout_Helper_Data::XML_PATH_SHIPPING_CARRIER_DEFAULT_HEIGHT,
|
427 |
-
$storeId
|
428 |
-
);
|
429 |
-
$length = Mage::getStoreConfig(
|
430 |
-
Mage_GoogleCheckout_Helper_Data::XML_PATH_SHIPPING_CARRIER_DEFAULT_LENGTH,
|
431 |
-
$storeId
|
432 |
-
);
|
433 |
-
$sizeUnit = self::ITEM_SIZE_UNIT;
|
434 |
-
|
435 |
-
$addressCategory = Mage::getStoreConfig(
|
436 |
-
Mage_GoogleCheckout_Helper_Data::XML_PATH_SHIPPING_CARRIER_ADDRESS_CATEGORY,
|
437 |
-
$storeId
|
438 |
-
);
|
439 |
-
$defPrice = (float) Mage::helper('tax')->getShippingPrice($defPrice, false, false);
|
440 |
-
|
441 |
-
$this->getQuote()->getShippingAddress()
|
442 |
-
->setCountryId($country)
|
443 |
-
->setCity($city)
|
444 |
-
->setPostcode($postcode)
|
445 |
-
->setRegionId($region)
|
446 |
-
->setCollectShippingRates(true);
|
447 |
-
|
448 |
-
$address = $this->getQuote()->getShippingAddress();
|
449 |
-
$address->collectShippingRates();
|
450 |
-
$shipments = $address->getGroupedAllShippingRates();
|
451 |
-
|
452 |
-
$shippingMethodsList = array();
|
453 |
-
foreach (explode(',', $methods) as $method) {
|
454 |
-
list($company, $type) = explode('/', $method);
|
455 |
-
$shippingMethodsList[$method] = array('company' => $company, 'type' => $type);
|
456 |
-
}
|
457 |
-
|
458 |
-
$freeMethodsList = array();
|
459 |
-
foreach ($this->_getGoogleCarriersMap() as $mageCode => $map) {
|
460 |
-
if (!isset($shipments[$mageCode])) {
|
461 |
-
continue;
|
462 |
-
}
|
463 |
-
$freeMethod = Mage::getStoreConfig('carriers/' . $mageCode . '/free_method', $storeId);
|
464 |
-
|
465 |
-
foreach ($shipments[$mageCode] as $rate) {
|
466 |
-
$mageRateCode = $rate->getMethod();
|
467 |
-
if ($mageRateCode != $freeMethod) {
|
468 |
-
continue;
|
469 |
-
}
|
470 |
-
|
471 |
-
$googleRateCode = isset($map['methods'][$mageRateCode]) ? $map['methods'][$mageRateCode] : false;
|
472 |
-
if (false == $googleRateCode || $rate->getPrice() != 0) {
|
473 |
-
continue;
|
474 |
-
}
|
475 |
-
|
476 |
-
$methodName = $map['googleCarrierCompany'] . '/'. $googleRateCode;
|
477 |
-
if (empty($shippingMethodsList[$methodName])) {
|
478 |
-
continue;
|
479 |
-
}
|
480 |
-
$freeMethodsList[$methodName] = array(
|
481 |
-
'company' => $map['googleCarrierCompany'],
|
482 |
-
'type' => $googleRateCode
|
483 |
-
);
|
484 |
-
unset($shippingMethodsList[$methodName]);
|
485 |
-
}
|
486 |
-
}
|
487 |
-
|
488 |
-
$xml = '';
|
489 |
-
$sendShipMethods = (bool)count($shippingMethodsList) > 0;
|
490 |
-
if ($sendShipMethods) {
|
491 |
-
$xml .= <<<EOT
|
492 |
-
<carrier-calculated-shipping>
|
493 |
-
<shipping-packages>
|
494 |
-
<shipping-package>
|
495 |
-
<ship-from id="Origin">
|
496 |
-
<city>{$city}</city>
|
497 |
-
<region>{$region}</region>
|
498 |
-
<postal-code>{$postcode}</postal-code>
|
499 |
-
<country-code>{$country}</country-code>
|
500 |
-
</ship-from>
|
501 |
-
<width unit="{$sizeUnit}" value="{$width}"/>
|
502 |
-
<height unit="{$sizeUnit}" value="{$height}"/>
|
503 |
-
<length unit="{$sizeUnit}" value="{$length}"/>
|
504 |
-
<delivery-address-category>{$addressCategory}</delivery-address-category>
|
505 |
-
</shipping-package>
|
506 |
-
</shipping-packages>
|
507 |
-
EOT;
|
508 |
-
$xml .= '<carrier-calculated-shipping-options>';
|
509 |
-
|
510 |
-
foreach ($shippingMethodsList as $method) {
|
511 |
-
$xml .= <<<EOT
|
512 |
-
<carrier-calculated-shipping-option>
|
513 |
-
<shipping-company>{$method['company']}</shipping-company>
|
514 |
-
<shipping-type>{$method['type']}</shipping-type>
|
515 |
-
<price currency="{$this->getCurrency()}">{$defPrice}</price>
|
516 |
-
</carrier-calculated-shipping-option>
|
517 |
-
EOT;
|
518 |
-
}
|
519 |
-
$xml .= '</carrier-calculated-shipping-options>';
|
520 |
-
$xml .= '</carrier-calculated-shipping>';
|
521 |
-
}
|
522 |
-
|
523 |
-
foreach ($freeMethodsList as $method) {
|
524 |
-
$xml .= <<<EOT
|
525 |
-
<flat-rate-shipping name="{$method['company']} {$method['type']}">
|
526 |
-
<price currency="{$this->getCurrency()}">0.00</price></flat-rate-shipping>
|
527 |
-
EOT;
|
528 |
-
}
|
529 |
-
|
530 |
-
$this->_shippingCalculated = true;
|
531 |
-
return $xml;
|
532 |
-
}
|
533 |
-
|
534 |
-
/**
|
535 |
-
* Generate flat rate shipping XML
|
536 |
-
*
|
537 |
-
* @return string
|
538 |
-
*/
|
539 |
-
protected function _getFlatRateShippingXml()
|
540 |
-
{
|
541 |
-
/*
|
542 |
-
* Prevent sending more then one shipping option to Google
|
543 |
-
*/
|
544 |
-
if ($this->_shippingCalculated) {
|
545 |
-
return '';
|
546 |
-
}
|
547 |
-
|
548 |
-
$storeId = $this->getQuote()->getStoreId();
|
549 |
-
if (!Mage::getStoreConfigFlag(Mage_GoogleCheckout_Helper_Data::XML_PATH_SHIPPING_FLATRATE_ACTIVE, $storeId)) {
|
550 |
-
return '';
|
551 |
-
}
|
552 |
-
|
553 |
-
// If is set Tax Class for Shipping - create ability to manage shipping rates in MerchantCalculationCallback
|
554 |
-
$nodeName = 'merchant-calculated-shipping';
|
555 |
-
if (!$this->_getTaxClassForShipping($this->getQuote())) {
|
556 |
-
$nodeName = 'flat-rate-shipping';
|
557 |
-
}
|
558 |
-
|
559 |
-
$xml = '';
|
560 |
-
for ($i = 1; $i <= 3; $i++) {
|
561 |
-
$title = Mage::getStoreConfig('google/checkout_shipping_flatrate/title_' . $i, $storeId);
|
562 |
-
$price = (float)Mage::getStoreConfig('google/checkout_shipping_flatrate/price_' . $i, $storeId);
|
563 |
-
$price = number_format($price, 2, '.', '');
|
564 |
-
$price = (float)Mage::helper('tax')->getShippingPrice($price, false, false);
|
565 |
-
$allowSpecific = Mage::getStoreConfigFlag(
|
566 |
-
'google/checkout_shipping_flatrate/sallowspecific_' . $i,
|
567 |
-
$storeId
|
568 |
-
);
|
569 |
-
$specificCountries = Mage::getStoreConfig(
|
570 |
-
'google/checkout_shipping_flatrate/specificcountry_' . $i,
|
571 |
-
$storeId
|
572 |
-
);
|
573 |
-
$allowedAreasXml = $this->_getAllowedCountries($allowSpecific, $specificCountries);
|
574 |
-
|
575 |
-
if (empty($title) || $price <= 0) {
|
576 |
-
continue;
|
577 |
-
}
|
578 |
-
|
579 |
-
$xml .= <<<EOT
|
580 |
-
<{$nodeName} name="{$title}">
|
581 |
-
<shipping-restrictions>
|
582 |
-
<allowed-areas>
|
583 |
-
{$allowedAreasXml}
|
584 |
-
</allowed-areas>
|
585 |
-
</shipping-restrictions>
|
586 |
-
<price currency="{$this->getCurrency()}">{$price}</price>
|
587 |
-
</{$nodeName}>
|
588 |
-
EOT;
|
589 |
-
}
|
590 |
-
|
591 |
-
$this->_shippingCalculated = true;
|
592 |
-
|
593 |
-
return $xml;
|
594 |
-
}
|
595 |
-
|
596 |
-
/**
|
597 |
-
* Generate shipping allowed countries XML
|
598 |
-
*
|
599 |
-
* @param boolean $allowSpecific
|
600 |
-
* @param string $specific
|
601 |
-
* @return string
|
602 |
-
*/
|
603 |
-
protected function _getAllowedCountries($allowSpecific, $specific)
|
604 |
-
{
|
605 |
-
$xml = '';
|
606 |
-
if ($allowSpecific == 1) {
|
607 |
-
if ($specific) {
|
608 |
-
foreach (explode(',', $specific) as $country) {
|
609 |
-
$xml .= "<postal-area><country-code>{$country}</country-code></postal-area>\n";
|
610 |
-
}
|
611 |
-
}
|
612 |
-
}
|
613 |
-
if ($xml) {
|
614 |
-
return $xml;
|
615 |
-
}
|
616 |
-
|
617 |
-
return '<world-area />';
|
618 |
-
}
|
619 |
-
|
620 |
-
/**
|
621 |
-
* Retrieve merchant calculated shipping carriers rates XML
|
622 |
-
*
|
623 |
-
* @return string
|
624 |
-
*/
|
625 |
-
protected function _getMerchantCalculatedShippingXml()
|
626 |
-
{
|
627 |
-
/*
|
628 |
-
* Prevent sending more then one shipping option to Google
|
629 |
-
*/
|
630 |
-
if ($this->_shippingCalculated) {
|
631 |
-
return '';
|
632 |
-
}
|
633 |
-
|
634 |
-
$storeId = $this->getQuote()->getStoreId();
|
635 |
-
$active = Mage::getStoreConfigFlag(
|
636 |
-
Mage_GoogleCheckout_Helper_Data::XML_PATH_SHIPPING_MERCHANT_ACTIVE,
|
637 |
-
$storeId
|
638 |
-
);
|
639 |
-
$methods = Mage::getStoreConfig(
|
640 |
-
Mage_GoogleCheckout_Helper_Data::XML_PATH_SHIPPING_MERCHANT_ALLOWED_METHODS,
|
641 |
-
$storeId
|
642 |
-
);
|
643 |
-
|
644 |
-
if (!$active || !$methods) {
|
645 |
-
return '';
|
646 |
-
}
|
647 |
-
|
648 |
-
$xml = '';
|
649 |
-
$methods = unserialize($methods);
|
650 |
-
$taxHelper = Mage::helper('tax');
|
651 |
-
$shippingModel = Mage::getModel('shipping/shipping');
|
652 |
-
|
653 |
-
foreach ($methods['method'] as $i => $method) {
|
654 |
-
if (!$i || !$method) {
|
655 |
-
continue;
|
656 |
-
}
|
657 |
-
list($carrierCode, $methodCode) = explode('/', $method);
|
658 |
-
if ($carrierCode) {
|
659 |
-
$carrier = $shippingModel->getCarrierByCode($carrierCode);
|
660 |
-
if ($carrier) {
|
661 |
-
$allowedMethods = $carrier->getAllowedMethods();
|
662 |
-
|
663 |
-
if (isset($allowedMethods[$methodCode])) {
|
664 |
-
$method = Mage::getStoreConfig('carriers/' . $carrierCode . '/title', $storeId);
|
665 |
-
$method .= ' - '.$allowedMethods[$methodCode];
|
666 |
-
}
|
667 |
-
|
668 |
-
$defaultPrice = (float) $methods['price'][$i];
|
669 |
-
$defaultPrice = $taxHelper->getShippingPrice($defaultPrice, false, false);
|
670 |
-
|
671 |
-
$allowedAreasXml = $this->_getAllowedCountries(
|
672 |
-
$carrier->getConfigData('sallowspecific'),
|
673 |
-
$carrier->getConfigData('specificcountry')
|
674 |
-
);
|
675 |
-
|
676 |
-
$xml .= <<<EOT
|
677 |
-
<merchant-calculated-shipping name="{$method}">
|
678 |
-
<address-filters>
|
679 |
-
<allowed-areas>
|
680 |
-
{$allowedAreasXml}
|
681 |
-
</allowed-areas>
|
682 |
-
</address-filters>
|
683 |
-
<price currency="{$this->getCurrency()}">{$defaultPrice}</price>
|
684 |
-
</merchant-calculated-shipping>
|
685 |
-
EOT;
|
686 |
-
}
|
687 |
-
}
|
688 |
-
}
|
689 |
-
$this->_shippingCalculated = true;
|
690 |
-
|
691 |
-
return $xml;
|
692 |
-
}
|
693 |
-
|
694 |
-
/**
|
695 |
-
* Retrieve pickup XML
|
696 |
-
*
|
697 |
-
* @return string
|
698 |
-
*/
|
699 |
-
protected function _getPickupXml()
|
700 |
-
{
|
701 |
-
$storeId = $this->getQuote()->getStoreId();
|
702 |
-
if (!Mage::getStoreConfig(Mage_GoogleCheckout_Helper_Data::XML_PATH_SHIPPING_PICKUP_ACTIVE, $storeId)) {
|
703 |
-
return '';
|
704 |
-
}
|
705 |
-
|
706 |
-
$title = Mage::getStoreConfig(Mage_GoogleCheckout_Helper_Data::XML_PATH_SHIPPING_PICKUP_TITLE, $storeId);
|
707 |
-
$price = Mage::getStoreConfig(Mage_GoogleCheckout_Helper_Data::XML_PATH_SHIPPING_PICKUP_PRICE, $storeId);
|
708 |
-
$price = (float) Mage::helper('tax')->getShippingPrice($price, false, false);
|
709 |
-
|
710 |
-
$xml = <<<EOT
|
711 |
-
<pickup name="{$title}">
|
712 |
-
<price currency="{$this->getCurrency()}">{$price}</price>
|
713 |
-
</pickup>
|
714 |
-
EOT;
|
715 |
-
|
716 |
-
return $xml;
|
717 |
-
}
|
718 |
-
|
719 |
-
/**
|
720 |
-
* Retrieve specific tax table XML
|
721 |
-
*
|
722 |
-
* @param array|float $rules
|
723 |
-
* @param string $type
|
724 |
-
* @return string
|
725 |
-
*/
|
726 |
-
protected function _getTaxTableXml($rules, $type)
|
727 |
-
{
|
728 |
-
$xml = '';
|
729 |
-
if (is_array($rules)) {
|
730 |
-
foreach ($rules as $group => $taxRates) {
|
731 |
-
if ($type != 'default') {
|
732 |
-
$nameAttribute = "name=\"{$group}\"";
|
733 |
-
$standaloneAttribute = "standalone=\"true\"";
|
734 |
-
$rulesTag = "{$type}-tax-rules";
|
735 |
-
$shippingTaxed = false;
|
736 |
-
} else {
|
737 |
-
$nameAttribute = '';
|
738 |
-
$standaloneAttribute = '';
|
739 |
-
$rulesTag = 'tax-rules';
|
740 |
-
$shippingTaxed = true;
|
741 |
-
}
|
742 |
-
|
743 |
-
$xml .= <<<EOT
|
744 |
-
<{$type}-tax-table {$nameAttribute} {$standaloneAttribute}>
|
745 |
-
<{$rulesTag}>
|
746 |
-
EOT;
|
747 |
-
if (is_array($taxRates)) {
|
748 |
-
foreach ($taxRates as $rate) {
|
749 |
-
$xml .= <<<EOT
|
750 |
-
<{$type}-tax-rule>
|
751 |
-
<tax-areas>
|
752 |
-
|
753 |
-
EOT;
|
754 |
-
if ($rate['country'] === Mage_Usa_Model_Shipping_Carrier_Abstract::USA_COUNTRY_ID) {
|
755 |
-
if (!empty($rate['postcode']) && $rate['postcode'] !== '*') {
|
756 |
-
$rate['postcode'] = Mage::helper('googlecheckout')
|
757 |
-
->zipRangeToZipPattern($rate['postcode']);
|
758 |
-
foreach ($rate['postcode'] as $postcode) {
|
759 |
-
$xml .= <<<EOT
|
760 |
-
<us-zip-area>
|
761 |
-
<zip-pattern>$postcode</zip-pattern>
|
762 |
-
</us-zip-area>
|
763 |
-
|
764 |
-
EOT;
|
765 |
-
}
|
766 |
-
} else if (!empty($rate['state'])) {
|
767 |
-
$xml .= <<<EOT
|
768 |
-
<us-state-area>
|
769 |
-
<state>{$rate['state']}</state>
|
770 |
-
</us-state-area>
|
771 |
-
|
772 |
-
EOT;
|
773 |
-
} else {
|
774 |
-
$xml .= <<<EOT
|
775 |
-
<us-zip-area>
|
776 |
-
<zip-pattern>*</zip-pattern>
|
777 |
-
</us-zip-area>
|
778 |
-
|
779 |
-
EOT;
|
780 |
-
}
|
781 |
-
} else {
|
782 |
-
if (!empty($rate['country'])) {
|
783 |
-
$xml .= <<<EOT
|
784 |
-
<postal-area>
|
785 |
-
<country-code>{$rate['country']}</country-code>
|
786 |
-
EOT;
|
787 |
-
if (!empty($rate['postcode']) && $rate['postcode'] !== '*') {
|
788 |
-
$xml .= <<<EOT
|
789 |
-
<postal-code-pattern>{$rate['postcode']}</postal-code-pattern>
|
790 |
-
|
791 |
-
EOT;
|
792 |
-
}
|
793 |
-
$xml .= <<<EOT
|
794 |
-
</postal-area>
|
795 |
-
|
796 |
-
EOT;
|
797 |
-
}
|
798 |
-
}
|
799 |
-
$xml .= <<<EOT
|
800 |
-
</tax-areas>
|
801 |
-
<rate>{$rate['value']}</rate>
|
802 |
-
EOT;
|
803 |
-
if ($shippingTaxed) {
|
804 |
-
$xml .= '<shipping-taxed>true</shipping-taxed>';
|
805 |
-
}
|
806 |
-
$xml .= "</{$type}-tax-rule>";
|
807 |
-
}
|
808 |
-
|
809 |
-
} else {
|
810 |
-
$taxRate = $taxRates/100;
|
811 |
-
$xml .= <<<EOT
|
812 |
-
<{$type}-tax-rule>
|
813 |
-
<tax-area>
|
814 |
-
<world-area/>
|
815 |
-
</tax-area>
|
816 |
-
<rate>{$taxRate}</rate>
|
817 |
-
EOT;
|
818 |
-
if ($shippingTaxed) {
|
819 |
-
$xml .= '<shipping-taxed>true</shipping-taxed>';
|
820 |
-
}
|
821 |
-
$xml .= "</{$type}-tax-rule>";
|
822 |
-
}
|
823 |
-
|
824 |
-
$xml .= <<<EOT
|
825 |
-
</$rulesTag>
|
826 |
-
</{$type}-tax-table>
|
827 |
-
EOT;
|
828 |
-
}
|
829 |
-
} else {
|
830 |
-
if (is_numeric($rules)) {
|
831 |
-
$taxRate = $rules / 100;
|
832 |
-
$xml .= <<<EOT
|
833 |
-
<{$type}-tax-table>
|
834 |
-
<tax-rules>
|
835 |
-
<{$type}-tax-rule>
|
836 |
-
<tax-area>
|
837 |
-
<world-area/>
|
838 |
-
</tax-area>
|
839 |
-
<rate>{$taxRate}</rate>
|
840 |
-
<shipping-taxed>true</shipping-taxed>
|
841 |
-
</{$type}-tax-rule>
|
842 |
-
</tax-rules>
|
843 |
-
</{$type}-tax-table>
|
844 |
-
EOT;
|
845 |
-
}
|
846 |
-
}
|
847 |
-
|
848 |
-
return $xml;
|
849 |
-
}
|
850 |
-
|
851 |
-
/**
|
852 |
-
* Generate all tax tables XML
|
853 |
-
*
|
854 |
-
* @return string
|
855 |
-
*/
|
856 |
-
protected function _getAllTaxTablesXml()
|
857 |
-
{
|
858 |
-
$isDefaultTaxTablesDisabled = Mage::getStoreConfigFlag(
|
859 |
-
Mage_GoogleCheckout_Helper_Data::XML_PATH_DISABLE_DEFAULT_TAX_TABLES,
|
860 |
-
$this->getQuote()->getStoreId()
|
861 |
-
);
|
862 |
-
if ($isDefaultTaxTablesDisabled) {
|
863 |
-
return '<tax-tables merchant-calculated="true" />';
|
864 |
-
}
|
865 |
-
|
866 |
-
$xml = <<<EOT
|
867 |
-
<tax-tables merchant-calculated="true">
|
868 |
-
{$this->_getTaxTableXml($this->_getShippingTaxRules(), 'default')}
|
869 |
-
|
870 |
-
<!-- default-tax-table>
|
871 |
-
<tax-rules>
|
872 |
-
<default-tax-rule>
|
873 |
-
</default-tax-rule>
|
874 |
-
</tax-rules>
|
875 |
-
</default-tax-table -->
|
876 |
-
|
877 |
-
<alternate-tax-tables>
|
878 |
-
<alternate-tax-table name="none" standalone="true">
|
879 |
-
<alternate-tax-rules>
|
880 |
-
<alternate-tax-rule>
|
881 |
-
<tax-area>
|
882 |
-
<world-area/>
|
883 |
-
</tax-area>
|
884 |
-
<rate>0</rate>
|
885 |
-
</alternate-tax-rule>
|
886 |
-
</alternate-tax-rules>
|
887 |
-
</alternate-tax-table>
|
888 |
-
{$this->_getTaxTableXml($this->_getTaxRules(), 'alternate')}
|
889 |
-
</alternate-tax-tables>
|
890 |
-
</tax-tables>
|
891 |
-
EOT;
|
892 |
-
return $xml;
|
893 |
-
}
|
894 |
-
|
895 |
-
/**
|
896 |
-
* Retrieve customer tax class id
|
897 |
-
*
|
898 |
-
* @return int
|
899 |
-
*/
|
900 |
-
protected function _getCustomerTaxClass()
|
901 |
-
{
|
902 |
-
$customerGroup = $this->getQuote()->getCustomerGroupId();
|
903 |
-
if (!$customerGroup) {
|
904 |
-
$customerGroup = Mage::helper('customer')->getDefaultCustomerGroupId($this->getQuote()->getStoreId());
|
905 |
-
}
|
906 |
-
return Mage::getModel('customer/group')->load($customerGroup)->getTaxClassId();
|
907 |
-
}
|
908 |
-
|
909 |
-
/**
|
910 |
-
* Retrieve shipping tax rules
|
911 |
-
*
|
912 |
-
* @return array
|
913 |
-
*/
|
914 |
-
protected function _getShippingTaxRules()
|
915 |
-
{
|
916 |
-
$customerTaxClass = $this->_getCustomerTaxClass();
|
917 |
-
$shippingTaxClass = Mage::getStoreConfig(
|
918 |
-
Mage_Tax_Model_Config::CONFIG_XML_PATH_SHIPPING_TAX_CLASS,
|
919 |
-
$this->getQuote()->getStoreId()
|
920 |
-
);
|
921 |
-
$taxCalculationModel = Mage::getSingleton('tax/calculation');
|
922 |
-
|
923 |
-
if ($shippingTaxClass) {
|
924 |
-
if (Mage::helper('tax')->getTaxBasedOn() == 'origin') {
|
925 |
-
$request = $taxCalculationModel->getRateRequest();
|
926 |
-
$request
|
927 |
-
->setCustomerClassId($customerTaxClass)
|
928 |
-
->setProductClassId($shippingTaxClass);
|
929 |
-
|
930 |
-
return $taxCalculationModel->getRate($request);
|
931 |
-
}
|
932 |
-
$customerRules = $taxCalculationModel->getRatesByCustomerAndProductTaxClasses(
|
933 |
-
$customerTaxClass,
|
934 |
-
$shippingTaxClass
|
935 |
-
);
|
936 |
-
$rules = array();
|
937 |
-
foreach ($customerRules as $rule) {
|
938 |
-
$rules[$rule['product_class']][] = $rule;
|
939 |
-
}
|
940 |
-
|
941 |
-
return $rules;
|
942 |
-
}
|
943 |
-
|
944 |
-
return array();
|
945 |
-
}
|
946 |
-
|
947 |
-
/**
|
948 |
-
* Retrieve tax rules
|
949 |
-
*
|
950 |
-
* @return array
|
951 |
-
*/
|
952 |
-
protected function _getTaxRules()
|
953 |
-
{
|
954 |
-
$customerTaxClass = $this->_getCustomerTaxClass();
|
955 |
-
$taxCalculationModel = Mage::getSingleton('tax/calculation');
|
956 |
-
|
957 |
-
if (Mage::helper('tax')->getTaxBasedOn() == 'origin') {
|
958 |
-
$request = $taxCalculationModel->getRateRequest()->setCustomerClassId($customerTaxClass);
|
959 |
-
return $taxCalculationModel->getRatesForAllProductTaxClasses($request);
|
960 |
-
}
|
961 |
-
|
962 |
-
$customerRules = $taxCalculationModel->getRatesByCustomerTaxClass($customerTaxClass);
|
963 |
-
$rules = array();
|
964 |
-
foreach ($customerRules as $rule) {
|
965 |
-
$rules[$rule['product_class']][] = $rule;
|
966 |
-
}
|
967 |
-
|
968 |
-
return $rules;
|
969 |
-
}
|
970 |
-
|
971 |
-
/**
|
972 |
-
* Getter for request initial auth details flag XML
|
973 |
-
*
|
974 |
-
* @return string
|
975 |
-
*/
|
976 |
-
protected function _getRequestInitialAuthDetailsXml()
|
977 |
-
{
|
978 |
-
$xml = <<<EOT
|
979 |
-
<request-initial-auth-details>true</request-initial-auth-details>
|
980 |
-
EOT;
|
981 |
-
return $xml;
|
982 |
-
}
|
983 |
-
|
984 |
-
/**
|
985 |
-
* Getter for parametrized url XML
|
986 |
-
*
|
987 |
-
* @return string
|
988 |
-
*/
|
989 |
-
protected function _getParameterizedUrlsXml()
|
990 |
-
{
|
991 |
-
return '';
|
992 |
-
$xml = <<<EOT
|
993 |
-
<parameterized-urls>
|
994 |
-
<parameterized-url url="{$this->_getParameterizedUrl()}" />
|
995 |
-
</parameterized-urls>
|
996 |
-
EOT;
|
997 |
-
return $xml;
|
998 |
-
}
|
999 |
-
|
1000 |
-
/**
|
1001 |
-
* Getter for platform Id XML
|
1002 |
-
*
|
1003 |
-
* @return string
|
1004 |
-
*/
|
1005 |
-
protected function _getPlatformIdXml()
|
1006 |
-
{
|
1007 |
-
$xml = <<<EOT
|
1008 |
-
<platform-id>473325629220583</platform-id>
|
1009 |
-
EOT;
|
1010 |
-
return $xml;
|
1011 |
-
}
|
1012 |
-
|
1013 |
-
/**
|
1014 |
-
* Retrieve analytics data XML
|
1015 |
-
*
|
1016 |
-
* @return string
|
1017 |
-
*/
|
1018 |
-
protected function _getAnalyticsDataXml()
|
1019 |
-
{
|
1020 |
-
if (!($analytics = $this->getApi()->getAnalyticsData())) {
|
1021 |
-
return '';
|
1022 |
-
}
|
1023 |
-
$xml = <<<EOT
|
1024 |
-
<analytics-data><![CDATA[{$analytics}]]></analytics-data>
|
1025 |
-
EOT;
|
1026 |
-
return $xml;
|
1027 |
-
}
|
1028 |
-
|
1029 |
-
/**
|
1030 |
-
* Getter for cart edit url
|
1031 |
-
*
|
1032 |
-
* @return string
|
1033 |
-
*/
|
1034 |
-
protected function _getEditCartUrl()
|
1035 |
-
{
|
1036 |
-
return Mage::getUrl('googlecheckout/redirect/cart');
|
1037 |
-
}
|
1038 |
-
|
1039 |
-
/**
|
1040 |
-
* Getter for continue shopping url
|
1041 |
-
*
|
1042 |
-
* @return string
|
1043 |
-
*/
|
1044 |
-
protected function _getContinueShoppingUrl()
|
1045 |
-
{
|
1046 |
-
return Mage::getUrl('googlecheckout/redirect/continue');
|
1047 |
-
}
|
1048 |
-
|
1049 |
-
/**
|
1050 |
-
* Getter for notifications url
|
1051 |
-
*
|
1052 |
-
* @return string
|
1053 |
-
*/
|
1054 |
-
protected function _getNotificationsUrl()
|
1055 |
-
{
|
1056 |
-
return $this->_getCallbackUrl();
|
1057 |
-
}
|
1058 |
-
|
1059 |
-
/**
|
1060 |
-
* Getter for calculations url
|
1061 |
-
*
|
1062 |
-
* @return string
|
1063 |
-
*/
|
1064 |
-
protected function _getCalculationsUrl()
|
1065 |
-
{
|
1066 |
-
return $this->_getCallbackUrl();
|
1067 |
-
}
|
1068 |
-
|
1069 |
-
/**
|
1070 |
-
* Getter for parametrized url
|
1071 |
-
*
|
1072 |
-
* @return string
|
1073 |
-
*/
|
1074 |
-
protected function _getParameterizedUrl()
|
1075 |
-
{
|
1076 |
-
return Mage::getUrl('googlecheckout/api/beacon');
|
1077 |
-
}
|
1078 |
-
|
1079 |
-
/**
|
1080 |
-
* Define if current quote is virtual
|
1081 |
-
*
|
1082 |
-
* @return bool
|
1083 |
-
*/
|
1084 |
-
protected function _isOrderVirtual()
|
1085 |
-
{
|
1086 |
-
foreach ($this->getQuote()->getAllItems() as $item) {
|
1087 |
-
if (!$item->getIsVirtual()) {
|
1088 |
-
return false;
|
1089 |
-
}
|
1090 |
-
}
|
1091 |
-
return true;
|
1092 |
-
}
|
1093 |
-
|
1094 |
-
/**
|
1095 |
-
* Retrieve native carriers to Google carriers map
|
1096 |
-
*
|
1097 |
-
* @return array
|
1098 |
-
*/
|
1099 |
-
protected function _getGoogleCarriersMap() {
|
1100 |
-
return array(
|
1101 |
-
'ups' => array(
|
1102 |
-
'googleCarrierCompany' => 'UPS',
|
1103 |
-
'methods' => array(
|
1104 |
-
'GND' => Mage::helper('usa')->__('Ground'),
|
1105 |
-
'1DA' => Mage::helper('usa')->__('Next Day Air'),
|
1106 |
-
'1DM' => Mage::helper('usa')->__('Next Day Air Early AM'),
|
1107 |
-
'1DP' => Mage::helper('usa')->__('Next Day Air Saver'),
|
1108 |
-
'2DA' => Mage::helper('usa')->__('2nd Day Air'),
|
1109 |
-
'2DM' => Mage::helper('usa')->__('2nd Day Air AM'),
|
1110 |
-
'3DS' => Mage::helper('usa')->__('3 Day Select'),
|
1111 |
-
'03' => Mage::helper('usa')->__('Ground'),
|
1112 |
-
'01' => Mage::helper('usa')->__('Next Day Air'),
|
1113 |
-
'14' => Mage::helper('usa')->__('Next Day Air Early AM'),
|
1114 |
-
'13' => Mage::helper('usa')->__('Next Day Air Saver'),
|
1115 |
-
'02' => Mage::helper('usa')->__('2nd Day Air'),
|
1116 |
-
'59' => Mage::helper('usa')->__('2nd Day Air AM'),
|
1117 |
-
'12' => Mage::helper('usa')->__('3 Day Select')
|
1118 |
-
)
|
1119 |
-
),
|
1120 |
-
'usps' => array(
|
1121 |
-
'googleCarrierCompany' => 'USPS',
|
1122 |
-
'methods' => array(
|
1123 |
-
'Express Mail' => Mage::helper('usa')->__('Express Mail'),
|
1124 |
-
'Priority Mail' => Mage::helper('usa')->__('Priority Mail'),
|
1125 |
-
'Parcel Post' => Mage::helper('usa')->__('Parcel Post'),
|
1126 |
-
'Media Mail' => Mage::helper('usa')->__('Media Mail')
|
1127 |
-
)
|
1128 |
-
),
|
1129 |
-
'fedex' => array(
|
1130 |
-
'googleCarrierCompany' => 'FedEx',
|
1131 |
-
'methods' => array(
|
1132 |
-
'FEDEX_GROUND' => Mage::helper('usa')->__('Ground'),
|
1133 |
-
'GROUND_HOME_DELIVERY' => Mage::helper('usa')->__('Home Delivery'),
|
1134 |
-
'FEDEX_EXPRESS_SAVER' => Mage::helper('usa')->__('Express Saver'),
|
1135 |
-
'FIRST_OVERNIGHT' => Mage::helper('usa')->__('First Overnight'),
|
1136 |
-
'PRIORITY_OVERNIGHT' => Mage::helper('usa')->__('Priority Overnight'),
|
1137 |
-
'STANDARD_OVERNIGHT' => Mage::helper('usa')->__('Standard Overnight'),
|
1138 |
-
'FEDEX_2_DAY' => Mage::helper('usa')->__('2Day')
|
1139 |
-
)
|
1140 |
-
)
|
1141 |
-
);
|
1142 |
-
}
|
1143 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Order.php
DELETED
@@ -1,181 +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_GoogleCheckout
|
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_GoogleCheckout_Model_Api_Xml_Order extends Mage_GoogleCheckout_Model_Api_Xml_Abstract
|
28 |
-
{
|
29 |
-
protected function _getApiUrl()
|
30 |
-
{
|
31 |
-
$url = $this->_getBaseApiUrl();
|
32 |
-
$url .= 'request/Merchant/'.Mage::getStoreConfig('google/checkout/merchant_id', $this->getStoreId());
|
33 |
-
return $url;
|
34 |
-
}
|
35 |
-
|
36 |
-
protected function _processGResponse($response)
|
37 |
-
{
|
38 |
-
if ($response[0]===200) {
|
39 |
-
return true;
|
40 |
-
} else {
|
41 |
-
$xml = simplexml_load_string(html_entity_decode($response[1]));
|
42 |
-
if (!$xml || !$xml->{'error-message'}) {
|
43 |
-
return false;
|
44 |
-
}
|
45 |
-
Mage::throwException($this->__('Google Checkout: %s', (string)$xml->{'error-message'}));
|
46 |
-
}
|
47 |
-
}
|
48 |
-
|
49 |
-
// FINANCIAL
|
50 |
-
|
51 |
-
public function authorize()
|
52 |
-
{
|
53 |
-
$GRequest = $this->getGRequest();
|
54 |
-
|
55 |
-
$postargs = '<?xml version="1.0" encoding="UTF-8"?>
|
56 |
-
<authorize-order xmlns="'
|
57 |
-
. $GRequest->schema_url
|
58 |
-
. '" google-order-number="'
|
59 |
-
. $this->getGoogleOrderNumber()
|
60 |
-
. '"/>';
|
61 |
-
|
62 |
-
$response = $GRequest->SendReq($GRequest->request_url,
|
63 |
-
$GRequest->GetAuthenticationHeaders(), $postargs);
|
64 |
-
return $this->_processGResponse($response);
|
65 |
-
}
|
66 |
-
|
67 |
-
public function charge($amount)
|
68 |
-
{
|
69 |
-
$response = $this->getGRequest()
|
70 |
-
->SendChargeOrder($this->getGoogleOrderNumber(), $amount);
|
71 |
-
return $this->_processGResponse($response);
|
72 |
-
}
|
73 |
-
|
74 |
-
public function refund($amount, $reason, $comment = '')
|
75 |
-
{
|
76 |
-
$response = $this->getGRequest()
|
77 |
-
->SendRefundOrder($this->getGoogleOrderNumber(), $amount, $reason, $comment);
|
78 |
-
return $this->_processGResponse($response);
|
79 |
-
}
|
80 |
-
|
81 |
-
public function cancel($reason, $comment = '')
|
82 |
-
{
|
83 |
-
$response = $this->getGRequest()
|
84 |
-
->SendCancelOrder($this->getGoogleOrderNumber(), $reason, $comment);
|
85 |
-
return $this->_processGResponse($response);
|
86 |
-
}
|
87 |
-
|
88 |
-
// FULFILLMENT
|
89 |
-
|
90 |
-
public function process()
|
91 |
-
{
|
92 |
-
$response = $this->getGRequest()
|
93 |
-
->SendProcessOrder($this->getGoogleOrderNumber());
|
94 |
-
return $this->_processGResponse($response);
|
95 |
-
}
|
96 |
-
|
97 |
-
public function deliver($carrier, $trackingNo, $sendMail = true)
|
98 |
-
{
|
99 |
-
$response = $this->getGRequest()
|
100 |
-
->SendDeliverOrder($this->getGoogleOrderNumber(), $carrier, $trackingNo, $sendMail ? 'true' : 'false');
|
101 |
-
return $this->_processGResponse($response);
|
102 |
-
}
|
103 |
-
|
104 |
-
public function addTrackingData($carrier, $trackingNo)
|
105 |
-
{
|
106 |
-
$response = $this->getGRequest()
|
107 |
-
->SendTrackingData($this->getGoogleOrderNumber(), $carrier, $trackingNo);
|
108 |
-
return $this->_processGResponse($response);
|
109 |
-
}
|
110 |
-
|
111 |
-
public function shipItems($items, $sendMail = true)
|
112 |
-
{
|
113 |
-
$googleShipItems = array();
|
114 |
-
foreach ($items as $item) {
|
115 |
-
$googleShipItems[] = new GoogleShipItem($item);
|
116 |
-
}
|
117 |
-
|
118 |
-
$response = $this->getGRequest()
|
119 |
-
->SendShipItems($this->getGoogleOrderNumber(), $googleShipItems, $sendMail ? 'true' : 'false');
|
120 |
-
return $this->_processGResponse($response);
|
121 |
-
}
|
122 |
-
|
123 |
-
public function backorderItems($items, $sendMail = true)
|
124 |
-
{
|
125 |
-
$response = $this->getGRequest()
|
126 |
-
->SendBackorderItems($this->getGoogleOrderNumber(), $items, $sendMail ? 'true' : 'false');
|
127 |
-
return $this->_processGResponse($response);
|
128 |
-
}
|
129 |
-
|
130 |
-
public function cancelItems($items, $reason, $comment = '', $sendMail = true)
|
131 |
-
{
|
132 |
-
$response = $this->getGRequest()
|
133 |
-
->SendCancelItems($this->getGoogleOrderNumber(), $items, $reason, $comment, $sendMail ? 'true' : 'false');
|
134 |
-
return $this->_processGResponse($response);
|
135 |
-
}
|
136 |
-
|
137 |
-
public function returnItems($items, $sendMail = true)
|
138 |
-
{
|
139 |
-
$response = $this->getGRequest()
|
140 |
-
->SendReturnItems($this->getGoogleOrderNumber(), $items, $sendMail ? 'true' : 'false');
|
141 |
-
return $this->_processGResponse($response);
|
142 |
-
}
|
143 |
-
|
144 |
-
public function resetItems($items, $sendMail = true)
|
145 |
-
{
|
146 |
-
$response = $this->getGRequest()
|
147 |
-
->SendRResetItemsShippingInformation($this->getGoogleOrderNumber(), $items, $sendMail ? 'true' : 'false');
|
148 |
-
return $this->_processGResponse($response);
|
149 |
-
}
|
150 |
-
|
151 |
-
// MISC
|
152 |
-
|
153 |
-
public function archive()
|
154 |
-
{
|
155 |
-
$response = $this->getGRequest()
|
156 |
-
->SendArchiveOrder($this->getGoogleOrderNumber());
|
157 |
-
return $this->_processGResponse($response);
|
158 |
-
}
|
159 |
-
|
160 |
-
public function unarchive()
|
161 |
-
{
|
162 |
-
$response = $this->getGRequest()
|
163 |
-
->SendUnarchiveOrder($this->getGoogleOrderNumber());
|
164 |
-
return $this->_processGResponse($response);
|
165 |
-
}
|
166 |
-
|
167 |
-
public function addOrderNumber($merchantOrder)
|
168 |
-
{
|
169 |
-
$response = $this->getGRequest()
|
170 |
-
->SendMerchantOrderNumber($this->getGoogleOrderNumber(), $merchantOrder);
|
171 |
-
return $this->_processGResponse($response);
|
172 |
-
}
|
173 |
-
|
174 |
-
|
175 |
-
public function addBuyerMessage($message, $sendMail = true)
|
176 |
-
{
|
177 |
-
$response = $this->getGRequest()
|
178 |
-
->SendBuyerMessage($this->getGoogleOrderNumber(), $message, $sendMail ? 'true' : 'false');
|
179 |
-
return $this->_processGResponse($response);
|
180 |
-
}
|
181 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Model/Mysql4/Api/Debug.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_GoogleCheckout
|
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 |
-
* Enter description here ...
|
30 |
-
*
|
31 |
-
* @category Mage
|
32 |
-
* @package Mage_GoogleCheckout
|
33 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
-
*/
|
35 |
-
class Mage_GoogleCheckout_Model_Mysql4_Api_Debug extends Mage_GoogleCheckout_Model_Resource_Api_Debug
|
36 |
-
{
|
37 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Model/Mysql4/Api/Debug/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_GoogleCheckout
|
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 |
-
* Enter description here ...
|
30 |
-
*
|
31 |
-
* @category Mage
|
32 |
-
* @package Mage_GoogleCheckout
|
33 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
-
*/
|
35 |
-
class Mage_GoogleCheckout_Model_Mysql4_Api_Debug_Collection
|
36 |
-
extends Mage_GoogleCheckout_Model_Resource_Api_Debug_Collection
|
37 |
-
{
|
38 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Model/Mysql4/Notification.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_GoogleCheckout
|
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 |
-
* Google Checkout resource notification model
|
30 |
-
*
|
31 |
-
* @category Mage
|
32 |
-
* @package Mage_GoogleCheckout
|
33 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
-
*/
|
35 |
-
class Mage_GoogleCheckout_Model_Mysql4_Notification extends Mage_GoogleCheckout_Model_Resource_Notification
|
36 |
-
{
|
37 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Model/Mysql4/Setup.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_GoogleCheckout
|
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 |
-
* Enter description here ...
|
30 |
-
*
|
31 |
-
* @category Mage
|
32 |
-
* @package Mage_GoogleCheckout
|
33 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
-
*/
|
35 |
-
class Mage_GoogleCheckout_Model_Mysql4_Setup extends Mage_GoogleCheckout_Model_Resource_Setup
|
36 |
-
{
|
37 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Model/Mysql4/Tax.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_GoogleCheckout
|
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 |
-
* Enter description here ...
|
30 |
-
*
|
31 |
-
* @category Mage
|
32 |
-
* @package Mage_GoogleCheckout
|
33 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
-
*/
|
35 |
-
class Mage_GoogleCheckout_Model_Mysql4_Tax extends Mage_GoogleCheckout_Model_Resource_Tax
|
36 |
-
{
|
37 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Model/Notification.php
DELETED
@@ -1,129 +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_GoogleCheckout
|
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 |
-
* Google Checkout notification model
|
29 |
-
*
|
30 |
-
* @method Mage_GoogleCheckout_Model_Resource_Notification _getResource()
|
31 |
-
* @method Mage_GoogleCheckout_Model_Resource_Notification getResource()
|
32 |
-
* @method string getSerialNumber()
|
33 |
-
* @method Mage_GoogleCheckout_Model_Notification setSerialNumber(string $value)
|
34 |
-
* @method string getStartedAt()
|
35 |
-
* @method Mage_GoogleCheckout_Model_Notification setStartedAt(string $value)
|
36 |
-
* @method int getStatus()
|
37 |
-
* @method Mage_GoogleCheckout_Model_Notification setStatus(int $value)
|
38 |
-
*
|
39 |
-
* @category Mage
|
40 |
-
* @package Mage_GoogleCheckout
|
41 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
42 |
-
*/
|
43 |
-
class Mage_GoogleCheckout_Model_Notification extends Mage_Core_Model_Abstract
|
44 |
-
{
|
45 |
-
const TIMEOUT_LIMIT = 3600;
|
46 |
-
const STATUS_INPROCESS = 0;
|
47 |
-
const STATUS_PROCESSED = 1;
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Intialize model
|
51 |
-
*/
|
52 |
-
function _construct()
|
53 |
-
{
|
54 |
-
$this->_init('googlecheckout/notification');
|
55 |
-
}
|
56 |
-
|
57 |
-
/**
|
58 |
-
* Assign previously saved notification data to model
|
59 |
-
*
|
60 |
-
* @return Mage_GoogleCheckout_Model_Notification
|
61 |
-
*/
|
62 |
-
public function loadNotificationData()
|
63 |
-
{
|
64 |
-
$data = $this->getResource()->getNotificationData($this->getSerialNumber());
|
65 |
-
if (is_array($data)) {
|
66 |
-
$this->addData($data);
|
67 |
-
}
|
68 |
-
return $this;
|
69 |
-
}
|
70 |
-
|
71 |
-
/**
|
72 |
-
* Check if current notification is already processed
|
73 |
-
*
|
74 |
-
* @return bool
|
75 |
-
*/
|
76 |
-
public function isProcessed()
|
77 |
-
{
|
78 |
-
return $this->getStatus() == self::STATUS_PROCESSED;
|
79 |
-
}
|
80 |
-
|
81 |
-
/**
|
82 |
-
* Check if current notification is time out
|
83 |
-
*
|
84 |
-
* @return bool
|
85 |
-
*/
|
86 |
-
public function isTimeout()
|
87 |
-
{
|
88 |
-
$startedTime = strtotime($this->getStartedAt());
|
89 |
-
$currentTime = time();
|
90 |
-
|
91 |
-
if ($currentTime - $startedTime > self::TIMEOUT_LIMIT) {
|
92 |
-
return true;
|
93 |
-
}
|
94 |
-
return false;
|
95 |
-
}
|
96 |
-
|
97 |
-
/**
|
98 |
-
* Start process of current notification
|
99 |
-
*
|
100 |
-
* @return Mage_GoogleCheckout_Model_Notification
|
101 |
-
*/
|
102 |
-
public function startProcess()
|
103 |
-
{
|
104 |
-
$this->getResource()->startProcess($this->getSerialNumber());
|
105 |
-
return $this;
|
106 |
-
}
|
107 |
-
|
108 |
-
/**
|
109 |
-
* Update process of current notification
|
110 |
-
*
|
111 |
-
* @return Mage_GoogleCheckout_Model_Notification
|
112 |
-
*/
|
113 |
-
public function updateProcess()
|
114 |
-
{
|
115 |
-
$this->getResource()->updateProcess($this->getSerialNumber());
|
116 |
-
return $this;
|
117 |
-
}
|
118 |
-
|
119 |
-
/**
|
120 |
-
* Stop process of current notification
|
121 |
-
*
|
122 |
-
* @return Mage_GoogleCheckout_Model_Notification
|
123 |
-
*/
|
124 |
-
public function stopProcess()
|
125 |
-
{
|
126 |
-
$this->getResource()->stopProcess($this->getSerialNumber());
|
127 |
-
return $this;
|
128 |
-
}
|
129 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Model/Observer.php
DELETED
@@ -1,105 +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_GoogleCheckout
|
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 |
-
* Google Checkout Event Observer
|
30 |
-
*
|
31 |
-
* @category Mage
|
32 |
-
* @package Mage_GoogleCheckout
|
33 |
-
*/
|
34 |
-
class Mage_GoogleCheckout_Model_Observer
|
35 |
-
{
|
36 |
-
public function salesOrderShipmentTrackSaveAfter(Varien_Event_Observer $observer)
|
37 |
-
{
|
38 |
-
$track = $observer->getEvent()->getTrack();
|
39 |
-
|
40 |
-
$order = $track->getShipment()->getOrder();
|
41 |
-
$shippingMethod = $order->getShippingMethod(); // String in format of 'carrier_method'
|
42 |
-
if (!$shippingMethod) {
|
43 |
-
return;
|
44 |
-
}
|
45 |
-
|
46 |
-
// Process only Google Checkout internal methods
|
47 |
-
/* @var $gcCarrier Mage_GoogleCheckout_Model_Shipping */
|
48 |
-
$gcCarrier = Mage::getModel('googlecheckout/shipping');
|
49 |
-
list($carrierCode, $methodCode) = explode('_', $shippingMethod);
|
50 |
-
if ($gcCarrier->getCarrierCode() != $carrierCode) {
|
51 |
-
return;
|
52 |
-
}
|
53 |
-
$internalMethods = $gcCarrier->getInternallyAllowedMethods();
|
54 |
-
if (!isset($internalMethods[$methodCode])) {
|
55 |
-
return;
|
56 |
-
}
|
57 |
-
|
58 |
-
Mage::getModel('googlecheckout/api')
|
59 |
-
->setStoreId($order->getStoreId())
|
60 |
-
->deliver($order->getExtOrderId(), $track->getCarrierCode(), $track->getNumber());
|
61 |
-
}
|
62 |
-
|
63 |
-
/*
|
64 |
-
* Performs specifical actions on Google Checkout internal shipments saving
|
65 |
-
*
|
66 |
-
* @param Varien_Event_Observer $observer
|
67 |
-
* @return void
|
68 |
-
*/
|
69 |
-
public function salesOrderShipmentSaveAfter(Varien_Event_Observer $observer)
|
70 |
-
{
|
71 |
-
$shipment = $observer->getEvent()->getShipment();
|
72 |
-
$order = $shipment->getOrder();
|
73 |
-
$shippingMethod = $order->getShippingMethod(); // String in format of 'carrier_method'
|
74 |
-
if (!$shippingMethod) {
|
75 |
-
return;
|
76 |
-
}
|
77 |
-
|
78 |
-
// Process only Google Checkout internal methods
|
79 |
-
/* @var $gcCarrier Mage_GoogleCheckout_Model_Shipping */
|
80 |
-
$gcCarrier = Mage::getModel('googlecheckout/shipping');
|
81 |
-
list($carrierCode, $methodCode) = explode('_', $shippingMethod);
|
82 |
-
if ($gcCarrier->getCarrierCode() != $carrierCode) {
|
83 |
-
return;
|
84 |
-
}
|
85 |
-
$internalMethods = $gcCarrier->getInternallyAllowedMethods();
|
86 |
-
if (!isset($internalMethods[$methodCode])) {
|
87 |
-
return;
|
88 |
-
}
|
89 |
-
|
90 |
-
// Process this saving
|
91 |
-
$items = array();
|
92 |
-
foreach ($shipment->getAllItems() as $item) {
|
93 |
-
if ($item->getOrderItem()->getParentItemId()) {
|
94 |
-
continue;
|
95 |
-
}
|
96 |
-
$items[] = $item->getSku();
|
97 |
-
}
|
98 |
-
|
99 |
-
if ($items) {
|
100 |
-
Mage::getModel('googlecheckout/api')
|
101 |
-
->setStoreId($order->getStoreId())
|
102 |
-
->shipItems($order->getExtOrderId(), $items);
|
103 |
-
}
|
104 |
-
}
|
105 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Model/Payment.php
CHANGED
@@ -24,27 +24,15 @@
|
|
24 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
*/
|
26 |
|
|
|
|
|
|
|
27 |
class Mage_GoogleCheckout_Model_Payment extends Mage_Payment_Model_Method_Abstract
|
28 |
{
|
29 |
-
const ACTION_AUTHORIZE = 0;
|
30 |
-
const ACTION_AUTHORIZE_CAPTURE = 1;
|
31 |
-
|
32 |
-
protected $_code = 'googlecheckout';
|
33 |
-
protected $_formBlockType = 'googlecheckout/form';
|
34 |
-
|
35 |
/**
|
36 |
-
*
|
37 |
*/
|
38 |
-
protected $
|
39 |
-
protected $_canAuthorize = true;
|
40 |
-
protected $_canCapture = true;
|
41 |
-
protected $_canCapturePartial = true;
|
42 |
-
protected $_canRefund = true;
|
43 |
-
protected $_canRefundInvoicePartial = true;
|
44 |
-
protected $_canVoid = true;
|
45 |
-
protected $_canUseInternal = false;
|
46 |
-
protected $_canUseCheckout = false;
|
47 |
-
protected $_canUseForMultishipping = false;
|
48 |
|
49 |
/**
|
50 |
* Can be edit order (renew order)
|
@@ -59,56 +47,36 @@ class Mage_GoogleCheckout_Model_Payment extends Mage_Payment_Model_Method_Abstra
|
|
59 |
/**
|
60 |
* Return Order Place Redirect URL
|
61 |
*
|
62 |
-
* @return string
|
63 |
*/
|
64 |
public function getOrderPlaceRedirectUrl()
|
65 |
{
|
66 |
-
return
|
67 |
}
|
68 |
|
69 |
/**
|
70 |
* Authorize
|
71 |
*
|
72 |
-
* @param
|
73 |
-
* @
|
|
|
74 |
*/
|
75 |
public function authorize(Varien_Object $payment, $amount)
|
76 |
{
|
77 |
-
|
78 |
-
$api->authorize($payment->getOrder()->getExtOrderId());
|
79 |
-
|
80 |
-
return $this;
|
81 |
}
|
82 |
|
83 |
/**
|
84 |
* Capture payment
|
85 |
*
|
86 |
-
* @param
|
87 |
-
* @
|
|
|
|
|
88 |
*/
|
89 |
public function capture(Varien_Object $payment, $amount)
|
90 |
{
|
91 |
-
|
92 |
-
try {
|
93 |
-
$this->authorize($payment, $amount);
|
94 |
-
} catch (Exception $e) {
|
95 |
-
// authorization is not expired yet
|
96 |
-
}
|
97 |
-
*/
|
98 |
-
|
99 |
-
if ($payment->getOrder()->getPaymentAuthorizationExpiration() < Mage::getModel('core/date')->gmtTimestamp()) {
|
100 |
-
try {
|
101 |
-
$this->authorize($payment, $amount);
|
102 |
-
} catch (Exception $e) {
|
103 |
-
// authorization is not expired yet
|
104 |
-
}
|
105 |
-
}
|
106 |
-
|
107 |
-
$api = Mage::getModel('googlecheckout/api')->setStoreId($payment->getOrder()->getStoreId());
|
108 |
-
$api->charge($payment->getOrder()->getExtOrderId(), $amount);
|
109 |
-
$payment->setForcedState(Mage_Sales_Model_Order_Invoice::STATE_OPEN);
|
110 |
-
|
111 |
-
return $this;
|
112 |
}
|
113 |
|
114 |
/**
|
@@ -116,45 +84,34 @@ class Mage_GoogleCheckout_Model_Payment extends Mage_Payment_Model_Method_Abstra
|
|
116 |
*
|
117 |
* @param Varien_Object $payment
|
118 |
* @param float $amount
|
119 |
-
*
|
120 |
-
* @return
|
121 |
*/
|
122 |
public function refund(Varien_Object $payment, $amount)
|
123 |
{
|
124 |
-
|
125 |
-
$comment = $this->getComment() ? $this->getComment() : Mage::helper('googlecheckout')->__('No Comment');
|
126 |
-
|
127 |
-
$api = Mage::getModel('googlecheckout/api')->setStoreId($payment->getOrder()->getStoreId());
|
128 |
-
$api->refund($payment->getOrder()->getExtOrderId(), $amount, $reason, $comment);
|
129 |
-
|
130 |
-
return $this;
|
131 |
}
|
132 |
|
|
|
|
|
|
|
|
|
|
|
133 |
public function void(Varien_Object $payment)
|
134 |
{
|
135 |
-
|
136 |
-
|
137 |
-
return $this;
|
138 |
}
|
139 |
|
140 |
/**
|
141 |
* Void payment
|
142 |
*
|
143 |
* @param Varien_Object $payment
|
144 |
-
*
|
145 |
-
* @return
|
146 |
*/
|
147 |
public function cancel(Varien_Object $payment)
|
148 |
{
|
149 |
-
|
150 |
-
$reason = $this->getReason() ? $this->getReason() : Mage::helper('googlecheckout')->__('Unknown Reason');
|
151 |
-
$comment = $this->getComment() ? $this->getComment() : Mage::helper('googlecheckout')->__('No Comment');
|
152 |
-
|
153 |
-
$api = Mage::getModel('googlecheckout/api')->setStoreId($payment->getOrder()->getStoreId());
|
154 |
-
$api->cancel($payment->getOrder()->getExtOrderId(), $reason, $comment);
|
155 |
-
}
|
156 |
-
|
157 |
-
return $this;
|
158 |
}
|
159 |
|
160 |
/**
|
@@ -163,16 +120,11 @@ class Mage_GoogleCheckout_Model_Payment extends Mage_Payment_Model_Method_Abstra
|
|
163 |
* @param string $field
|
164 |
* @param int|string|null|Mage_Core_Model_Store $storeId
|
165 |
*
|
166 |
-
* @return
|
167 |
*/
|
168 |
public function getConfigData($field, $storeId = null)
|
169 |
{
|
170 |
-
|
171 |
-
$storeId = $this->getStore();
|
172 |
-
}
|
173 |
-
$path = 'google/checkout/' . $field;
|
174 |
-
|
175 |
-
return Mage::getStoreConfig($path, $storeId);
|
176 |
}
|
177 |
|
178 |
/**
|
@@ -183,12 +135,6 @@ class Mage_GoogleCheckout_Model_Payment extends Mage_Payment_Model_Method_Abstra
|
|
183 |
*/
|
184 |
public function canVoid(Varien_Object $payment)
|
185 |
{
|
186 |
-
|
187 |
-
|| $payment instanceof Mage_Sales_Model_Order_Creditmemo
|
188 |
-
) {
|
189 |
-
return false;
|
190 |
-
}
|
191 |
-
|
192 |
-
return $this->_canVoid;
|
193 |
}
|
194 |
}
|
24 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
*/
|
26 |
|
27 |
+
/**
|
28 |
+
* @deprecated after 1.13.1.0
|
29 |
+
*/
|
30 |
class Mage_GoogleCheckout_Model_Payment extends Mage_Payment_Model_Method_Abstract
|
31 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
/**
|
33 |
+
* @var string
|
34 |
*/
|
35 |
+
protected $_code = 'googlecheckout';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
/**
|
38 |
* Can be edit order (renew order)
|
47 |
/**
|
48 |
* Return Order Place Redirect URL
|
49 |
*
|
50 |
+
* @return string
|
51 |
*/
|
52 |
public function getOrderPlaceRedirectUrl()
|
53 |
{
|
54 |
+
return '';
|
55 |
}
|
56 |
|
57 |
/**
|
58 |
* Authorize
|
59 |
*
|
60 |
+
* @param Varien_Object $payment
|
61 |
+
* @param float $amount
|
62 |
+
* @return Mage_GoogleCheckout_Model_Payment
|
63 |
*/
|
64 |
public function authorize(Varien_Object $payment, $amount)
|
65 |
{
|
66 |
+
Mage::throwException(Mage::helper('payment')->__('Google Checkout has been deprecated.'));
|
|
|
|
|
|
|
67 |
}
|
68 |
|
69 |
/**
|
70 |
* Capture payment
|
71 |
*
|
72 |
+
* @param Varien_Object $payment
|
73 |
+
* @param float $amount
|
74 |
+
* @throws Exception
|
75 |
+
* @return void
|
76 |
*/
|
77 |
public function capture(Varien_Object $payment, $amount)
|
78 |
{
|
79 |
+
Mage::throwException(Mage::helper('payment')->__('Google Checkout has been deprecated.'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
}
|
81 |
|
82 |
/**
|
84 |
*
|
85 |
* @param Varien_Object $payment
|
86 |
* @param float $amount
|
87 |
+
* @throws Exception
|
88 |
+
* @return void
|
89 |
*/
|
90 |
public function refund(Varien_Object $payment, $amount)
|
91 |
{
|
92 |
+
Mage::throwException(Mage::helper('payment')->__('Google Checkout has been deprecated.'));
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
}
|
94 |
|
95 |
+
/**
|
96 |
+
* @param Varien_Object $payment
|
97 |
+
* @throws Exception
|
98 |
+
* @return void
|
99 |
+
*/
|
100 |
public function void(Varien_Object $payment)
|
101 |
{
|
102 |
+
Mage::throwException(Mage::helper('payment')->__('Google Checkout has been deprecated.'));
|
|
|
|
|
103 |
}
|
104 |
|
105 |
/**
|
106 |
* Void payment
|
107 |
*
|
108 |
* @param Varien_Object $payment
|
109 |
+
* @throws Exception
|
110 |
+
* @return void
|
111 |
*/
|
112 |
public function cancel(Varien_Object $payment)
|
113 |
{
|
114 |
+
Mage::throwException(Mage::helper('payment')->__('Google Checkout has been deprecated.'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
}
|
116 |
|
117 |
/**
|
120 |
* @param string $field
|
121 |
* @param int|string|null|Mage_Core_Model_Store $storeId
|
122 |
*
|
123 |
+
* @return null
|
124 |
*/
|
125 |
public function getConfigData($field, $storeId = null)
|
126 |
{
|
127 |
+
return null;
|
|
|
|
|
|
|
|
|
|
|
128 |
}
|
129 |
|
130 |
/**
|
135 |
*/
|
136 |
public function canVoid(Varien_Object $payment)
|
137 |
{
|
138 |
+
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
}
|
140 |
}
|
app/code/core/Mage/GoogleCheckout/Model/Resource/Notification.php
DELETED
@@ -1,109 +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_GoogleCheckout
|
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 |
-
* Google Checkout resource notification model
|
30 |
-
*
|
31 |
-
* @category Mage
|
32 |
-
* @package Mage_GoogleCheckout
|
33 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
-
*/
|
35 |
-
class Mage_GoogleCheckout_Model_Resource_Notification extends Mage_Core_Model_Resource_Db_Abstract
|
36 |
-
{
|
37 |
-
/**
|
38 |
-
* Intialize resource model.
|
39 |
-
* Set main entity table name and primary key field name.
|
40 |
-
*
|
41 |
-
*/
|
42 |
-
protected function _construct()
|
43 |
-
{
|
44 |
-
$this->_init('googlecheckout/notification', 'serial_number');
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Return notification data by serial number
|
49 |
-
*
|
50 |
-
* @param string $serialNumber
|
51 |
-
* @return array
|
52 |
-
*/
|
53 |
-
public function getNotificationData($serialNumber)
|
54 |
-
{
|
55 |
-
$select = $this->_getReadAdapter()->select()
|
56 |
-
->from($this->getMainTable(), array('*'))
|
57 |
-
->where('serial_number = ?', $serialNumber);
|
58 |
-
|
59 |
-
return $this->_getReadAdapter()->fetchRow($select);
|
60 |
-
}
|
61 |
-
|
62 |
-
/**
|
63 |
-
* Start notification processing
|
64 |
-
*
|
65 |
-
* @param string $serialNumber
|
66 |
-
* @return Mage_GoogleCheckout_Model_Resource_Notification
|
67 |
-
*/
|
68 |
-
public function startProcess($serialNumber)
|
69 |
-
{
|
70 |
-
$data = array(
|
71 |
-
'serial_number' => $serialNumber,
|
72 |
-
'started_at' => Varien_Date::now(),
|
73 |
-
'status' => Mage_GoogleCheckout_Model_Notification::STATUS_INPROCESS
|
74 |
-
);
|
75 |
-
$this->_getWriteAdapter()->insert($this->getMainTable(), $data);
|
76 |
-
return $this;
|
77 |
-
}
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Stop notification processing
|
81 |
-
*
|
82 |
-
* @param string $serialNumber
|
83 |
-
* @return Mage_GoogleCheckout_Model_Resource_Notification
|
84 |
-
*/
|
85 |
-
public function stopProcess($serialNumber)
|
86 |
-
{
|
87 |
-
$this->_getWriteAdapter()->update($this->getMainTable(),
|
88 |
-
array('status' => Mage_GoogleCheckout_Model_Notification::STATUS_PROCESSED),
|
89 |
-
array('serial_number = ?' => $serialNumber)
|
90 |
-
);
|
91 |
-
return $this;
|
92 |
-
}
|
93 |
-
|
94 |
-
/**
|
95 |
-
* Update notification processing
|
96 |
-
*
|
97 |
-
* @param string $serialNumber
|
98 |
-
* @return Mage_GoogleCheckout_Model_Resource_Notification
|
99 |
-
*/
|
100 |
-
public function updateProcess($serialNumber)
|
101 |
-
{
|
102 |
-
$this->_getWriteAdapter()->update($this->getMainTable(),
|
103 |
-
array('started_at' => Varien_Date::now()),
|
104 |
-
array('serial_number = ?' => $serialNumber)
|
105 |
-
);
|
106 |
-
|
107 |
-
return $this;
|
108 |
-
}
|
109 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Model/Resource/Setup.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_GoogleCheckout
|
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 |
-
* Setup resource model
|
30 |
-
*
|
31 |
-
* @category Mage
|
32 |
-
* @package Mage_GoogleCheckout
|
33 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
-
*/
|
35 |
-
class Mage_GoogleCheckout_Model_Resource_Setup extends Mage_Catalog_Model_Resource_Setup
|
36 |
-
{
|
37 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Model/Resource/Tax.php
DELETED
@@ -1,76 +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_GoogleCheckout
|
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 |
-
* Tax resource model
|
30 |
-
*
|
31 |
-
* @category Mage
|
32 |
-
* @package Mage_GoogleCheckout
|
33 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
-
*/
|
35 |
-
class Mage_GoogleCheckout_Model_Resource_Tax extends Mage_Core_Model_Resource_Db_Abstract
|
36 |
-
{
|
37 |
-
/**
|
38 |
-
* Resource model initialization
|
39 |
-
* Set main entity table name and primary key field name.
|
40 |
-
*
|
41 |
-
*/
|
42 |
-
protected function _construct()
|
43 |
-
{
|
44 |
-
$this->_init('tax/tax_rule', 'rule_id');
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Retrieve array of rule rates for customers tax class
|
49 |
-
*
|
50 |
-
* @param int $customerTaxClass
|
51 |
-
* @return array
|
52 |
-
*/
|
53 |
-
public function fetchRuleRatesForCustomerTaxClass($customerTaxClass)
|
54 |
-
{
|
55 |
-
$read = $this->_getReadAdapter();
|
56 |
-
$select = $read->select()
|
57 |
-
->from(array('rule' => $this->getMainTable()))
|
58 |
-
->join(
|
59 |
-
array('rd' => $this->getTable('tax/tax_rate_data')),
|
60 |
-
'rd.rate_type_id = rule.tax_rate_type_id',
|
61 |
-
array('value' => new Zend_Db_Expr('rate_value/100')))
|
62 |
-
->join(
|
63 |
-
array('r' => $this->getTable('tax/tax_rate')),
|
64 |
-
'r.tax_rate_id = rd.tax_rate_id',
|
65 |
-
array('country' => 'tax_country_id', 'postcode' => 'tax_postcode'))
|
66 |
-
->joinLeft(
|
67 |
-
array('reg' => $this->getTable('directory/country_region')),
|
68 |
-
'reg.region_id = r.tax_region_id',
|
69 |
-
array('state' => 'code'))
|
70 |
-
->where('rule.tax_customer_class_id = ?', (int)$customerTaxClass);
|
71 |
-
|
72 |
-
$rows = $read->fetchAll($select);
|
73 |
-
|
74 |
-
return $rows;
|
75 |
-
}
|
76 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Model/Shipping.php
DELETED
@@ -1,76 +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_GoogleCheckout
|
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 |
-
* Google Checkout shipping model
|
30 |
-
*
|
31 |
-
* @category Mage
|
32 |
-
* @package Mage_GoogleCheckout
|
33 |
-
*/
|
34 |
-
class Mage_GoogleCheckout_Model_Shipping extends Mage_Shipping_Model_Carrier_Abstract
|
35 |
-
{
|
36 |
-
protected $_code = 'googlecheckout';
|
37 |
-
|
38 |
-
/**
|
39 |
-
* Collects rates for user request
|
40 |
-
*
|
41 |
-
* @param Mage_Shipping_Model_Rate_Request $data
|
42 |
-
* @return Mage_Shipping_Model_Rate_Result
|
43 |
-
*/
|
44 |
-
public function collectRates(Mage_Shipping_Model_Rate_Request $request)
|
45 |
-
{
|
46 |
-
// dummy placeholder
|
47 |
-
return $this;
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Returns array(methodCode => methodName) of possible methods for this carrier
|
52 |
-
* Used to automatically show it in config and so on
|
53 |
-
*
|
54 |
-
* @return array
|
55 |
-
*/
|
56 |
-
public function getAllowedMethods()
|
57 |
-
{
|
58 |
-
return array();
|
59 |
-
}
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Returns array(methodCode => methodName) of internally used methods.
|
63 |
-
* They are possible only as result of completing Google Checkout.
|
64 |
-
*
|
65 |
-
* @return array
|
66 |
-
*/
|
67 |
-
public function getInternallyAllowedMethods()
|
68 |
-
{
|
69 |
-
return array(
|
70 |
-
'carrier' => 'Carrier',
|
71 |
-
'merchant' => 'Merchant',
|
72 |
-
'flatrate' => 'Flat Rate',
|
73 |
-
'pickup' => 'Pickup'
|
74 |
-
);
|
75 |
-
}
|
76 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Model/Source/Checkout/Image.php
DELETED
@@ -1,55 +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_GoogleCheckout
|
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_GoogleCheckout_Model_Source_Checkout_Image
|
29 |
-
{
|
30 |
-
public function toOptionArray()
|
31 |
-
{
|
32 |
-
$sizes = array(
|
33 |
-
'180/46' => Mage::helper('googlecheckout')->__('Large - %s', '180x46'),
|
34 |
-
'168/44' => Mage::helper('googlecheckout')->__('Medium - %s', '168x44'),
|
35 |
-
'160/43' => Mage::helper('googlecheckout')->__('Small - %s', '160x43'),
|
36 |
-
);
|
37 |
-
|
38 |
-
$styles = array(
|
39 |
-
'trans' => Mage::helper('googlecheckout')->__('Transparent'),
|
40 |
-
'white' => Mage::helper('googlecheckout')->__('White Background'),
|
41 |
-
);
|
42 |
-
|
43 |
-
$options = array();
|
44 |
-
foreach ($sizes as $size => $sizeLabel) {
|
45 |
-
foreach ($styles as $style => $styleLabel) {
|
46 |
-
$options[] = array(
|
47 |
-
'value' => $size . '/' . $style,
|
48 |
-
'label' => $sizeLabel . ' (' . $styleLabel . ')'
|
49 |
-
);
|
50 |
-
}
|
51 |
-
}
|
52 |
-
|
53 |
-
return $options;
|
54 |
-
}
|
55 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Model/Source/Locale.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_GoogleCheckout
|
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_GoogleCheckout_Model_Source_Locale
|
29 |
-
{
|
30 |
-
public function toOptionArray()
|
31 |
-
{
|
32 |
-
return array(
|
33 |
-
array('value' => 'en_US', 'label'=>Mage::helper('googlecheckout')->__('United States')),
|
34 |
-
array('value' => 'en_GB', 'label'=>Mage::helper('googlecheckout')->__('United Kingdom')),
|
35 |
-
);
|
36 |
-
}
|
37 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Model/Source/Shipping/Carrier.php
DELETED
@@ -1,59 +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_GoogleCheckout
|
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_GoogleCheckout_Model_Source_Shipping_Carrier
|
29 |
-
{
|
30 |
-
public function toOptionArray()
|
31 |
-
{
|
32 |
-
return array(
|
33 |
-
array('label' => Mage::helper('googlecheckout')->__('FedEx'), 'value' => array(
|
34 |
-
array('label' => Mage::helper('googlecheckout')->__('Ground'), 'value' => 'FedEx/Ground'),
|
35 |
-
array('label' => Mage::helper('googlecheckout')->__('Home Delivery'), 'value' => 'FedEx/Home Delivery'),
|
36 |
-
array('label' => Mage::helper('googlecheckout')->__('Express Saver'), 'value' => 'FedEx/Express Saver'),
|
37 |
-
array('label' => Mage::helper('googlecheckout')->__('First Overnight'), 'value' => 'FedEx/First Overnight'),
|
38 |
-
array('label' => Mage::helper('googlecheckout')->__('Priority Overnight'), 'value' => 'FedEx/Priority Overnight'),
|
39 |
-
array('label' => Mage::helper('googlecheckout')->__('Standard Overnight'), 'value' => 'FedEx/Standard Overnight'),
|
40 |
-
array('label' => Mage::helper('googlecheckout')->__('2Day'), 'value' => 'FedEx/2Day'),
|
41 |
-
)),
|
42 |
-
array('label' => Mage::helper('googlecheckout')->__('UPS'), 'value' => array(
|
43 |
-
array('label' => Mage::helper('googlecheckout')->__('Next Day Air'), 'value' => 'UPS/Next Day Air'),
|
44 |
-
array('label' => Mage::helper('googlecheckout')->__('Next Day Air Early AM'), 'value' => 'UPS/Next Day Air Early AM'),
|
45 |
-
array('label' => Mage::helper('googlecheckout')->__('Next Day Air Saver'), 'value' => 'UPS/Next Day Air Saver'),
|
46 |
-
array('label' => Mage::helper('googlecheckout')->__('2nd Day Air'), 'value' => 'UPS/2nd Day Air'),
|
47 |
-
array('label' => Mage::helper('googlecheckout')->__('2nd Day Air AM'), 'value' => 'UPS/2nd Day Air AM'),
|
48 |
-
array('label' => Mage::helper('googlecheckout')->__('3 Day Select'), 'value' => 'UPS/3 Day Select'),
|
49 |
-
array('label' => Mage::helper('googlecheckout')->__('Ground'), 'value' => 'UPS/Ground'),
|
50 |
-
)),
|
51 |
-
array('label' => Mage::helper('googlecheckout')->__('USPS'), 'value' => array(
|
52 |
-
array('label' => Mage::helper('googlecheckout')->__('Express Mail'), 'value' => 'USPS/Express Mail'),
|
53 |
-
array('label' => Mage::helper('googlecheckout')->__('Priority Mail'), 'value' => 'USPS/Priority Mail'),
|
54 |
-
array('label' => Mage::helper('googlecheckout')->__('Parcel Post'), 'value' => 'USPS/Parcel Post'),
|
55 |
-
array('label' => Mage::helper('googlecheckout')->__('Media Mail'), 'value' => 'USPS/Media Mail'),
|
56 |
-
)),
|
57 |
-
);
|
58 |
-
}
|
59 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Model/Source/Shipping/Category.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_GoogleCheckout
|
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_GoogleCheckout_Model_Source_Shipping_Category
|
29 |
-
{
|
30 |
-
public function toOptionArray()
|
31 |
-
{
|
32 |
-
return array(
|
33 |
-
array('value' => 'COMMERCIAL', 'label' => Mage::helper('googlecheckout')->__('Commercial')),
|
34 |
-
array('value' => 'RESIDENTIAL', 'label' => Mage::helper('googlecheckout')->__('Residential')),
|
35 |
-
);
|
36 |
-
}
|
37 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Model/Source/Shipping/Units.php
DELETED
@@ -1,36 +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_GoogleCheckout
|
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_GoogleCheckout_Model_Source_Shipping_Units
|
29 |
-
{
|
30 |
-
public function toOptionArray()
|
31 |
-
{
|
32 |
-
return array(
|
33 |
-
array('value' => 'IN', 'label' => Mage::helper('googlecheckout')->__('Inches')),
|
34 |
-
);
|
35 |
-
}
|
36 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/Model/Source/Shipping/Virtual/Method.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_GoogleCheckout
|
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_GoogleCheckout_Model_Source_Shipping_Virtual_Method
|
29 |
-
{
|
30 |
-
public function toOptionArray()
|
31 |
-
{
|
32 |
-
return array(
|
33 |
-
array('value' => 'email', 'label' => Mage::helper('googlecheckout')->__('Email delivery')),
|
34 |
-
// array('value'=>'key_url', 'label'=> Mage::helper('googlecheckout')->__('Key/URL delivery')),
|
35 |
-
// array('value'=>'description_based', 'label'=> Mage::helper('googlecheckout')->__('Description-based delivery'))
|
36 |
-
);
|
37 |
-
}
|
38 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/controllers/ApiController.php
DELETED
@@ -1,44 +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_GoogleCheckout
|
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_GoogleCheckout_ApiController extends Mage_Core_Controller_Front_Action
|
28 |
-
{
|
29 |
-
public function indexAction()
|
30 |
-
{
|
31 |
-
$res = Mage::getModel('googlecheckout/api')->processCallback();
|
32 |
-
if ($res === false) {
|
33 |
-
$this->_forward('noRoute');
|
34 |
-
}
|
35 |
-
else {
|
36 |
-
exit;
|
37 |
-
}
|
38 |
-
}
|
39 |
-
|
40 |
-
public function beaconAction()
|
41 |
-
{
|
42 |
-
Mage::getModel('googlecheckout/api')->debugData(array('request' => $_SERVER['QUERY_STRING'], 'dir' => 'in'));
|
43 |
-
}
|
44 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/controllers/RedirectController.php
DELETED
@@ -1,181 +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_GoogleCheckout
|
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 |
-
* @category Mage
|
29 |
-
* @package Mage_GoogleCheckout
|
30 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
31 |
-
*/
|
32 |
-
class Mage_GoogleCheckout_RedirectController extends Mage_Core_Controller_Front_Action
|
33 |
-
{
|
34 |
-
/**
|
35 |
-
* Send request to Google Checkout and return Response Api
|
36 |
-
*
|
37 |
-
* @return Mage_GoogleCheckout_Model_Api_Xml_Checkout
|
38 |
-
*/
|
39 |
-
protected function _getApi ()
|
40 |
-
{
|
41 |
-
$session = Mage::getSingleton('checkout/session');
|
42 |
-
$api = Mage::getModel('googlecheckout/api');
|
43 |
-
/* @var $quote Mage_Sales_Model_Quote */
|
44 |
-
$quote = $session->getQuote();
|
45 |
-
|
46 |
-
if (!$quote->hasItems()) {
|
47 |
-
$this->getResponse()->setRedirect(Mage::getUrl('checkout/cart'));
|
48 |
-
$api->setError(true);
|
49 |
-
}
|
50 |
-
|
51 |
-
$storeQuote = Mage::getModel('sales/quote')->setStoreId(Mage::app()->getStore()->getId());
|
52 |
-
$storeQuote->merge($quote);
|
53 |
-
$storeQuote
|
54 |
-
->setItemsCount($quote->getItemsCount())
|
55 |
-
->setItemsQty($quote->getItemsQty())
|
56 |
-
->setChangedFlag(false);
|
57 |
-
$storeQuote->save();
|
58 |
-
|
59 |
-
$baseCurrency = $quote->getBaseCurrencyCode();
|
60 |
-
$currency = Mage::app()->getStore($quote->getStoreId())->getBaseCurrency();
|
61 |
-
|
62 |
-
|
63 |
-
/*
|
64 |
-
* Set payment method to google checkout, so all price rules will work out this case
|
65 |
-
* and will use right sales rules
|
66 |
-
*/
|
67 |
-
if ($quote->isVirtual()) {
|
68 |
-
$quote->getBillingAddress()->setPaymentMethod('googlecheckout');
|
69 |
-
} else {
|
70 |
-
$quote->getShippingAddress()->setPaymentMethod('googlecheckout');
|
71 |
-
}
|
72 |
-
|
73 |
-
$quote->collectTotals()->save();
|
74 |
-
|
75 |
-
if (!$api->getError()) {
|
76 |
-
$api = $api->setAnalyticsData($this->getRequest()->getPost('analyticsdata'))
|
77 |
-
->checkout($quote);
|
78 |
-
|
79 |
-
$response = $api->getResponse();
|
80 |
-
if ($api->getError()) {
|
81 |
-
Mage::getSingleton('checkout/session')->addError($api->getError());
|
82 |
-
} else {
|
83 |
-
$quote->setIsActive(false)->save();
|
84 |
-
$session->replaceQuote($storeQuote);
|
85 |
-
Mage::getModel('checkout/cart')->init()->save();
|
86 |
-
if (Mage::getStoreConfigFlag('google/checkout/hide_cart_contents')) {
|
87 |
-
$session->setGoogleCheckoutQuoteId($session->getQuoteId());
|
88 |
-
$session->setQuoteId(null);
|
89 |
-
}
|
90 |
-
}
|
91 |
-
}
|
92 |
-
return $api;
|
93 |
-
}
|
94 |
-
|
95 |
-
public function checkoutAction()
|
96 |
-
{
|
97 |
-
$session = Mage::getSingleton('checkout/session');
|
98 |
-
Mage::dispatchEvent('googlecheckout_checkout_before', array('quote' => $session->getQuote()));
|
99 |
-
$api = $this->_getApi();
|
100 |
-
|
101 |
-
if ($api->getError()) {
|
102 |
-
$url = Mage::getUrl('checkout/cart');
|
103 |
-
} else {
|
104 |
-
$url = $api->getRedirectUrl();
|
105 |
-
}
|
106 |
-
$this->getResponse()->setRedirect($url);
|
107 |
-
}
|
108 |
-
|
109 |
-
/**
|
110 |
-
* When a customer chooses Google Checkout on Checkout/Payment page
|
111 |
-
*
|
112 |
-
*/
|
113 |
-
public function redirectAction()
|
114 |
-
{
|
115 |
-
$api = $this->_getApi();
|
116 |
-
|
117 |
-
if ($api->getError()) {
|
118 |
-
$this->getResponse()->setRedirect(Mage::getUrl('checkout/cart'));
|
119 |
-
return;
|
120 |
-
} else {
|
121 |
-
$url = $api->getRedirectUrl();
|
122 |
-
$this->loadLayout();
|
123 |
-
$this->getLayout()->getBlock('googlecheckout_redirect')->setRedirectUrl($url);
|
124 |
-
$this->renderLayout();
|
125 |
-
}
|
126 |
-
}
|
127 |
-
|
128 |
-
public function cartAction()
|
129 |
-
{
|
130 |
-
if (Mage::getStoreConfigFlag('google/checkout/hide_cart_contents')) {
|
131 |
-
$session = Mage::getSingleton('checkout/session');
|
132 |
-
if ($session->getQuoteId()) {
|
133 |
-
$session->getQuote()->delete();
|
134 |
-
}
|
135 |
-
$session->setQuoteId($session->getGoogleCheckoutQuoteId());
|
136 |
-
$session->setGoogleCheckoutQuoteId(null);
|
137 |
-
}
|
138 |
-
|
139 |
-
$this->_redirect('checkout/cart');
|
140 |
-
}
|
141 |
-
|
142 |
-
public function continueAction()
|
143 |
-
{
|
144 |
-
$session = Mage::getSingleton('checkout/session');
|
145 |
-
|
146 |
-
if ($quoteId = $session->getGoogleCheckoutQuoteId()) {
|
147 |
-
$quote = Mage::getModel('sales/quote')->load($quoteId)
|
148 |
-
->setIsActive(false)->save();
|
149 |
-
}
|
150 |
-
$session->clear();
|
151 |
-
|
152 |
-
if (Mage::getStoreConfigFlag('google/checkout/hide_cart_contents')) {
|
153 |
-
$session->setGoogleCheckoutQuoteId(null);
|
154 |
-
}
|
155 |
-
|
156 |
-
$url = Mage::getStoreConfig('google/checkout/continue_shopping_url');
|
157 |
-
if (empty($url)) {
|
158 |
-
$this->_redirect('');
|
159 |
-
} elseif (substr($url, 0, 4) === 'http') {
|
160 |
-
$this->getResponse()->setRedirect($url);
|
161 |
-
} else {
|
162 |
-
$this->_redirect($url);
|
163 |
-
}
|
164 |
-
}
|
165 |
-
|
166 |
-
/**
|
167 |
-
* Redirect to login page
|
168 |
-
*
|
169 |
-
*/
|
170 |
-
public function redirectLogin()
|
171 |
-
{
|
172 |
-
$this->setFlag('', 'no-dispatch', true);
|
173 |
-
$this->getResponse()->setRedirect(
|
174 |
-
Mage::helper('core/url')->addRequestParam(
|
175 |
-
Mage::helper('customer')->getLoginUrl(),
|
176 |
-
array('context' => 'checkout')
|
177 |
-
)
|
178 |
-
);
|
179 |
-
}
|
180 |
-
|
181 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/etc/adminhtml.xml
DELETED
@@ -1,48 +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_GoogleCheckout
|
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 |
-
<google translate="title" module="googlecheckout">
|
38 |
-
<title>Google API</title>
|
39 |
-
</google>
|
40 |
-
</children>
|
41 |
-
</config>
|
42 |
-
</children>
|
43 |
-
</system>
|
44 |
-
</children>
|
45 |
-
</admin>
|
46 |
-
</resources>
|
47 |
-
</acl>
|
48 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/etc/config.xml
CHANGED
@@ -32,154 +32,18 @@
|
|
32 |
</Mage_GoogleCheckout>
|
33 |
</modules>
|
34 |
<global>
|
35 |
-
<sales>
|
36 |
-
<quote>
|
37 |
-
<item>
|
38 |
-
<product_attributes>
|
39 |
-
<enable_googlecheckout/>
|
40 |
-
</product_attributes>
|
41 |
-
</item>
|
42 |
-
</quote>
|
43 |
-
</sales>
|
44 |
<models>
|
45 |
<googlecheckout>
|
46 |
<class>Mage_GoogleCheckout_Model</class>
|
47 |
-
<resourceModel>googlecheckout_resource</resourceModel>
|
48 |
</googlecheckout>
|
49 |
-
<googlecheckout_resource>
|
50 |
-
<class>Mage_GoogleCheckout_Model_Resource</class>
|
51 |
-
<deprecatedNode>googlecheckout_mysql4</deprecatedNode>
|
52 |
-
<entities>
|
53 |
-
<api_debug>
|
54 |
-
<table>googlecheckout_api_debug</table>
|
55 |
-
</api_debug>
|
56 |
-
<notification>
|
57 |
-
<table>googlecheckout_notification</table>
|
58 |
-
</notification>
|
59 |
-
</entities>
|
60 |
-
</googlecheckout_resource>
|
61 |
</models>
|
62 |
-
<helpers>
|
63 |
-
<googlecheckout>
|
64 |
-
<class>Mage_GoogleCheckout_Helper</class>
|
65 |
-
</googlecheckout>
|
66 |
-
</helpers>
|
67 |
-
<resources>
|
68 |
-
<googlecheckout_setup>
|
69 |
-
<setup>
|
70 |
-
<module>Mage_GoogleCheckout</module>
|
71 |
-
<class>Mage_GoogleCheckout_Model_Resource_Setup</class>
|
72 |
-
</setup>
|
73 |
-
</googlecheckout_setup>
|
74 |
-
</resources>
|
75 |
-
<blocks>
|
76 |
-
<googlecheckout>
|
77 |
-
<class>Mage_GoogleCheckout_Block</class>
|
78 |
-
</googlecheckout>
|
79 |
-
</blocks>
|
80 |
</global>
|
81 |
-
<frontend>
|
82 |
-
<secure_url>
|
83 |
-
<googlecheckout_redirect>/googlecheckout/redirect/</googlecheckout_redirect>
|
84 |
-
<googlecheckout_beacon>/googlecheckout/api/beacon/</googlecheckout_beacon>
|
85 |
-
<googlecheckout_api>/googlecheckout/api/</googlecheckout_api>
|
86 |
-
</secure_url>
|
87 |
-
<translate>
|
88 |
-
<modules>
|
89 |
-
<Mage_GoogleCheckout>
|
90 |
-
<files>
|
91 |
-
<default>Mage_GoogleCheckout.csv</default>
|
92 |
-
</files>
|
93 |
-
</Mage_GoogleCheckout>
|
94 |
-
</modules>
|
95 |
-
</translate>
|
96 |
-
<routers>
|
97 |
-
<googlecheckout>
|
98 |
-
<use>standard</use>
|
99 |
-
<args>
|
100 |
-
<module>Mage_GoogleCheckout</module>
|
101 |
-
<frontName>googlecheckout</frontName>
|
102 |
-
</args>
|
103 |
-
</googlecheckout>
|
104 |
-
</routers>
|
105 |
-
<layout>
|
106 |
-
<updates>
|
107 |
-
<googlecheckout>
|
108 |
-
<file>googlecheckout.xml</file>
|
109 |
-
</googlecheckout>
|
110 |
-
</updates>
|
111 |
-
</layout>
|
112 |
-
</frontend>
|
113 |
-
<adminhtml>
|
114 |
-
<translate>
|
115 |
-
<modules>
|
116 |
-
<Mage_GoogleCheckout>
|
117 |
-
<files>
|
118 |
-
<default>Mage_GoogleCheckout.csv</default>
|
119 |
-
</files>
|
120 |
-
</Mage_GoogleCheckout>
|
121 |
-
</modules>
|
122 |
-
</translate>
|
123 |
-
<events>
|
124 |
-
<sales_order_shipment_track_save_after>
|
125 |
-
<observers>
|
126 |
-
<googlecheckout>
|
127 |
-
<type>model</type>
|
128 |
-
<class>googlecheckout/observer</class>
|
129 |
-
<method>salesOrderShipmentTrackSaveAfter</method>
|
130 |
-
</googlecheckout>
|
131 |
-
</observers>
|
132 |
-
</sales_order_shipment_track_save_after>
|
133 |
-
<sales_order_shipment_save_after>
|
134 |
-
<observers>
|
135 |
-
<googlecheckout>
|
136 |
-
<type>model</type>
|
137 |
-
<class>googlecheckout/observer</class>
|
138 |
-
<method>salesOrderShipmentSaveAfter</method>
|
139 |
-
</googlecheckout>
|
140 |
-
</observers>
|
141 |
-
</sales_order_shipment_save_after>
|
142 |
-
</events>
|
143 |
-
</adminhtml>
|
144 |
<default>
|
145 |
-
<carriers>
|
146 |
-
<googlecheckout>
|
147 |
-
<active>1</active>
|
148 |
-
<model>googlecheckout/shipping</model>
|
149 |
-
</googlecheckout>
|
150 |
-
</carriers>
|
151 |
<payment>
|
152 |
<googlecheckout>
|
153 |
<active>1</active>
|
154 |
<model>googlecheckout/payment</model>
|
155 |
</googlecheckout>
|
156 |
</payment>
|
157 |
-
<google>
|
158 |
-
<checkout>
|
159 |
-
<merchant_id backend_model="adminhtml/system_config_backend_encrypted"/>
|
160 |
-
<merchant_key backend_model="adminhtml/system_config_backend_encrypted"/>
|
161 |
-
<use_secure_callback_url>0</use_secure_callback_url>
|
162 |
-
<disable_default_tax_tables>0</disable_default_tax_tables>
|
163 |
-
<hide_cart_contents>1</hide_cart_contents>
|
164 |
-
<title>Google Checkout</title>
|
165 |
-
</checkout>
|
166 |
-
<checkout_shipping_carrier>
|
167 |
-
<address_category>COMMERCIAL</address_category>
|
168 |
-
<default_price>0</default_price>
|
169 |
-
<default_height>10</default_height>
|
170 |
-
<default_length>10</default_length>
|
171 |
-
<default_width>10</default_width>
|
172 |
-
</checkout_shipping_carrier>
|
173 |
-
<checkout_shipping_flatrate>
|
174 |
-
<sallowspecific_1>0</sallowspecific_1>
|
175 |
-
<sallowspecific_2>0</sallowspecific_2>
|
176 |
-
<sallowspecific_3>0</sallowspecific_3>
|
177 |
-
</checkout_shipping_flatrate>
|
178 |
-
<checkout_shipping_virtual>
|
179 |
-
<active>1</active>
|
180 |
-
<schedule>OPTIMISTIC</schedule>
|
181 |
-
<method>email</method>
|
182 |
-
</checkout_shipping_virtual>
|
183 |
-
</google>
|
184 |
</default>
|
185 |
</config>
|
32 |
</Mage_GoogleCheckout>
|
33 |
</modules>
|
34 |
<global>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
<models>
|
36 |
<googlecheckout>
|
37 |
<class>Mage_GoogleCheckout_Model</class>
|
|
|
38 |
</googlecheckout>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
</models>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
</global>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
<default>
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
<payment>
|
43 |
<googlecheckout>
|
44 |
<active>1</active>
|
45 |
<model>googlecheckout/payment</model>
|
46 |
</googlecheckout>
|
47 |
</payment>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
</default>
|
49 |
</config>
|
app/code/core/Mage/GoogleCheckout/etc/system.xml
DELETED
@@ -1,483 +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_GoogleCheckout
|
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 |
-
<google translate="label" module="googlecheckout">
|
31 |
-
<label>Google API</label>
|
32 |
-
<tab>general</tab>
|
33 |
-
<frontend_type>text</frontend_type>
|
34 |
-
<sort_order>340</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 |
-
<checkout translate="label">
|
40 |
-
<label>Google Checkout</label>
|
41 |
-
<frontend_type>text</frontend_type>
|
42 |
-
<comment><![CDATA[<a href="http://www.magentocommerce.com/redirect/google-checkout/" target="_blank">Signup for Google Checkout</a>]]></comment>
|
43 |
-
<sort_order>20</sort_order>
|
44 |
-
<show_in_default>1</show_in_default>
|
45 |
-
<show_in_website>1</show_in_website>
|
46 |
-
<show_in_store>1</show_in_store>
|
47 |
-
<fields>
|
48 |
-
<active translate="label">
|
49 |
-
<label>Enable</label>
|
50 |
-
<frontend_type>select</frontend_type>
|
51 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
52 |
-
<sort_order>10</sort_order>
|
53 |
-
<show_in_default>1</show_in_default>
|
54 |
-
<show_in_website>1</show_in_website>
|
55 |
-
<show_in_store>0</show_in_store>
|
56 |
-
</active>
|
57 |
-
<title translate="label">
|
58 |
-
<label>Title</label>
|
59 |
-
<frontend_type>text</frontend_type>
|
60 |
-
<sort_order>11</sort_order>
|
61 |
-
<show_in_default>1</show_in_default>
|
62 |
-
<show_in_website>1</show_in_website>
|
63 |
-
<show_in_store>1</show_in_store>
|
64 |
-
</title>
|
65 |
-
<sandbox translate="label">
|
66 |
-
<label>Sandbox</label>
|
67 |
-
<frontend_type>select</frontend_type>
|
68 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
69 |
-
<sort_order>12</sort_order>
|
70 |
-
<show_in_default>1</show_in_default>
|
71 |
-
<show_in_website>1</show_in_website>
|
72 |
-
<show_in_store>0</show_in_store>
|
73 |
-
</sandbox>
|
74 |
-
<use_secure_callback_url translate="label comment">
|
75 |
-
<label>Secure Callback URL</label>
|
76 |
-
<frontend_type>select</frontend_type>
|
77 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
78 |
-
<sort_order>13</sort_order>
|
79 |
-
<show_in_default>1</show_in_default>
|
80 |
-
<show_in_website>1</show_in_website>
|
81 |
-
<show_in_store>0</show_in_store>
|
82 |
-
<comment>Required for live Google Checkout transactions. Make sure that this option corresponds to Use Secure URLs in Frontend ("Web" > "Secure").</comment>
|
83 |
-
</use_secure_callback_url>
|
84 |
-
<debug translate="label">
|
85 |
-
<label>Debug</label>
|
86 |
-
<frontend_type>select</frontend_type>
|
87 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
88 |
-
<sort_order>14</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 |
-
</debug>
|
93 |
-
<merchant_id translate="label">
|
94 |
-
<label>Merchant ID</label>
|
95 |
-
<frontend_type>obscure</frontend_type>
|
96 |
-
<backend_model>adminhtml/system_config_backend_encrypted</backend_model>
|
97 |
-
<sort_order>20</sort_order>
|
98 |
-
<show_in_default>1</show_in_default>
|
99 |
-
<show_in_website>1</show_in_website>
|
100 |
-
<show_in_store>0</show_in_store>
|
101 |
-
</merchant_id>
|
102 |
-
<merchant_key translate="label">
|
103 |
-
<label>Merchant Key</label>
|
104 |
-
<frontend_type>obscure</frontend_type>
|
105 |
-
<backend_model>adminhtml/system_config_backend_encrypted</backend_model>
|
106 |
-
<sort_order>30</sort_order>
|
107 |
-
<show_in_default>1</show_in_default>
|
108 |
-
<show_in_website>1</show_in_website>
|
109 |
-
<show_in_store>0</show_in_store>
|
110 |
-
</merchant_key>
|
111 |
-
<checkout_image translate="label">
|
112 |
-
<label>Checkout Image Style</label>
|
113 |
-
<frontend_type>select</frontend_type>
|
114 |
-
<source_model>googlecheckout/source_checkout_image</source_model>
|
115 |
-
<sort_order>40</sort_order>
|
116 |
-
<show_in_default>1</show_in_default>
|
117 |
-
<show_in_website>1</show_in_website>
|
118 |
-
<show_in_store>0</show_in_store>
|
119 |
-
</checkout_image>
|
120 |
-
<locale translate="label">
|
121 |
-
<label>Location</label>
|
122 |
-
<frontend_type>select</frontend_type>
|
123 |
-
<source_model>googlecheckout/source_locale</source_model>
|
124 |
-
<sort_order>50</sort_order>
|
125 |
-
<show_in_default>1</show_in_default>
|
126 |
-
<show_in_website>1</show_in_website>
|
127 |
-
<show_in_store>0</show_in_store>
|
128 |
-
</locale>
|
129 |
-
<order_status translate="label">
|
130 |
-
<label>New Order Status</label>
|
131 |
-
<frontend_type>select</frontend_type>
|
132 |
-
<source_model>adminhtml/system_config_source_order_status_new</source_model>
|
133 |
-
<sort_order>60</sort_order>
|
134 |
-
<show_in_default>1</show_in_default>
|
135 |
-
<show_in_website>1</show_in_website>
|
136 |
-
<show_in_store>0</show_in_store>
|
137 |
-
</order_status>
|
138 |
-
<continue_shopping_url translate="label comment">
|
139 |
-
<label>Continue Shopping URL</label>
|
140 |
-
<comment>Optional, leave empty for home page.</comment>
|
141 |
-
<sort_order>80</sort_order>
|
142 |
-
<show_in_default>1</show_in_default>
|
143 |
-
<show_in_website>1</show_in_website>
|
144 |
-
<show_in_store>0</show_in_store>
|
145 |
-
</continue_shopping_url>
|
146 |
-
<hide_cart_contents translate="label comment">
|
147 |
-
<label>Hide Cart Contents</label>
|
148 |
-
<comment>If enabled, cart contents will be hidden after clicking on the Google Checkout button in the shopping cart, and restored if "Edit Cart" link was activated.</comment>
|
149 |
-
<frontend_type>select</frontend_type>
|
150 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
151 |
-
<sort_order>90</sort_order>
|
152 |
-
<show_in_default>1</show_in_default>
|
153 |
-
<show_in_website>1</show_in_website>
|
154 |
-
<show_in_store>0</show_in_store>
|
155 |
-
</hide_cart_contents>
|
156 |
-
<disable_default_tax_tables translate="label comment">
|
157 |
-
<label>Disable Default Tax Tables</label>
|
158 |
-
<comment>Enable this if your checkout request is too big and being cut off.</comment>
|
159 |
-
<frontend_type>select</frontend_type>
|
160 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
161 |
-
<sort_order>100</sort_order>
|
162 |
-
<show_in_default>1</show_in_default>
|
163 |
-
<show_in_website>1</show_in_website>
|
164 |
-
<show_in_store>0</show_in_store>
|
165 |
-
</disable_default_tax_tables>
|
166 |
-
</fields>
|
167 |
-
</checkout>
|
168 |
-
|
169 |
-
<checkout_shipping_merchant translate="label">
|
170 |
-
<label>Google Checkout Shipping - Merchant Calculated</label>
|
171 |
-
<frontend_type>text</frontend_type>
|
172 |
-
<sort_order>30</sort_order>
|
173 |
-
<show_in_default>1</show_in_default>
|
174 |
-
<show_in_website>1</show_in_website>
|
175 |
-
<show_in_store>0</show_in_store>
|
176 |
-
<fields>
|
177 |
-
<active translate="label">
|
178 |
-
<label>Enable Merchant Calculated</label>
|
179 |
-
<frontend_type>select</frontend_type>
|
180 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
181 |
-
<sort_order>10</sort_order>
|
182 |
-
<show_in_default>1</show_in_default>
|
183 |
-
<show_in_website>1</show_in_website>
|
184 |
-
<show_in_store>0</show_in_store>
|
185 |
-
</active>
|
186 |
-
<allowed_methods translate="label">
|
187 |
-
<label>Allowed Methods</label>
|
188 |
-
<frontend_type>select</frontend_type>
|
189 |
-
<frontend_model>googlecheckout/adminhtml_shipping_merchant</frontend_model>
|
190 |
-
<backend_model>adminhtml/system_config_backend_serialized</backend_model>
|
191 |
-
<sort_order>20</sort_order>
|
192 |
-
<show_in_default>1</show_in_default>
|
193 |
-
<show_in_website>1</show_in_website>
|
194 |
-
<show_in_store>0</show_in_store>
|
195 |
-
</allowed_methods>
|
196 |
-
</fields>
|
197 |
-
</checkout_shipping_merchant>
|
198 |
-
|
199 |
-
<checkout_shipping_carrier translate="label">
|
200 |
-
<label>Google Checkout Shipping - Carrier Calculated</label>
|
201 |
-
<frontend_type>text</frontend_type>
|
202 |
-
<sort_order>32</sort_order>
|
203 |
-
<show_in_default>1</show_in_default>
|
204 |
-
<show_in_website>1</show_in_website>
|
205 |
-
<show_in_store>0</show_in_store>
|
206 |
-
<fields>
|
207 |
-
<active translate="label comment">
|
208 |
-
<label>Enable Carrier Calculated</label>
|
209 |
-
<comment><![CDATA[<strong style="color:red">Warning!</strong> This option disables the merchant calculated shipping. With this option, Google API ignores any attempt to affect shipping prices.]]></comment>
|
210 |
-
<frontend_type>select</frontend_type>
|
211 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
212 |
-
<sort_order>10</sort_order>
|
213 |
-
<show_in_default>1</show_in_default>
|
214 |
-
<show_in_website>1</show_in_website>
|
215 |
-
<show_in_store>0</show_in_store>
|
216 |
-
</active>
|
217 |
-
<methods translate="label">
|
218 |
-
<label>Carrier Calculated Methods</label>
|
219 |
-
<frontend_type>multiselect</frontend_type>
|
220 |
-
<source_model>googlecheckout/source_shipping_carrier</source_model>
|
221 |
-
<sort_order>15</sort_order>
|
222 |
-
<show_in_default>1</show_in_default>
|
223 |
-
<show_in_website>1</show_in_website>
|
224 |
-
<show_in_store>0</show_in_store>
|
225 |
-
<can_be_empty>1</can_be_empty>
|
226 |
-
</methods>
|
227 |
-
<address_category translate="label">
|
228 |
-
<label>Delivery Address Category</label>
|
229 |
-
<frontend_type>select</frontend_type>
|
230 |
-
<source_model>googlecheckout/source_shipping_category</source_model>
|
231 |
-
<sort_order>20</sort_order>
|
232 |
-
<show_in_default>1</show_in_default>
|
233 |
-
<show_in_website>1</show_in_website>
|
234 |
-
<show_in_store>0</show_in_store>
|
235 |
-
</address_category>
|
236 |
-
<default_price translate="label">
|
237 |
-
<label>Default Price for Methods</label>
|
238 |
-
<frontend_type>text</frontend_type>
|
239 |
-
<sort_order>30</sort_order>
|
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 |
-
</default_price>
|
244 |
-
<default_width translate="label">
|
245 |
-
<label>Default Package Width (in)</label>
|
246 |
-
<frontend_type>text</frontend_type>
|
247 |
-
<sort_order>40</sort_order>
|
248 |
-
<show_in_default>1</show_in_default>
|
249 |
-
<show_in_website>1</show_in_website>
|
250 |
-
<show_in_store>0</show_in_store>
|
251 |
-
</default_width>
|
252 |
-
<default_height translate="label">
|
253 |
-
<label>Default Package Height (in)</label>
|
254 |
-
<frontend_type>text</frontend_type>
|
255 |
-
<sort_order>50</sort_order>
|
256 |
-
<show_in_default>1</show_in_default>
|
257 |
-
<show_in_website>1</show_in_website>
|
258 |
-
<show_in_store>0</show_in_store>
|
259 |
-
</default_height>
|
260 |
-
<default_length translate="label">
|
261 |
-
<label>Default Package Length (in)</label>
|
262 |
-
<frontend_type>text</frontend_type>
|
263 |
-
<sort_order>60</sort_order>
|
264 |
-
<show_in_default>1</show_in_default>
|
265 |
-
<show_in_website>1</show_in_website>
|
266 |
-
<show_in_store>0</show_in_store>
|
267 |
-
</default_length>
|
268 |
-
</fields>
|
269 |
-
</checkout_shipping_carrier>
|
270 |
-
<!--
|
271 |
-
<checkout_shipping_pickup translate="label">
|
272 |
-
<label>Google Checkout Shipping - Pickup</label>
|
273 |
-
<frontend_type>text</frontend_type>
|
274 |
-
<sort_order>34</sort_order>
|
275 |
-
<show_in_default>1</show_in_default>
|
276 |
-
<show_in_website>1</show_in_website>
|
277 |
-
<show_in_store>0</show_in_store>
|
278 |
-
<fields>
|
279 |
-
<active>
|
280 |
-
<label>Enable Pickup</label>
|
281 |
-
<frontend_type>select</frontend_type>
|
282 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
283 |
-
<sort_order>10</sort_order>
|
284 |
-
<show_in_default>1</show_in_default>
|
285 |
-
<show_in_website>1</show_in_website>
|
286 |
-
<show_in_store>0</show_in_store>
|
287 |
-
</active>
|
288 |
-
<title>
|
289 |
-
<label>Pickup Title</label>
|
290 |
-
<frontend_type>text</frontend_type>
|
291 |
-
<sort_order>20</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 |
-
</title>
|
296 |
-
<price>
|
297 |
-
<label>Pickup Price</label>
|
298 |
-
<frontend_type>text</frontend_type>
|
299 |
-
<sort_order>30</sort_order>
|
300 |
-
<show_in_default>1</show_in_default>
|
301 |
-
<show_in_website>1</show_in_website>
|
302 |
-
<show_in_store>0</show_in_store>
|
303 |
-
</price>
|
304 |
-
</fields>
|
305 |
-
</checkout_shipping_pickup>
|
306 |
-
-->
|
307 |
-
<checkout_shipping_flatrate translate="label">
|
308 |
-
<label>Google Checkout Shipping - Flat Rate</label>
|
309 |
-
<frontend_type>text</frontend_type>
|
310 |
-
<sort_order>36</sort_order>
|
311 |
-
<show_in_default>1</show_in_default>
|
312 |
-
<show_in_website>1</show_in_website>
|
313 |
-
<show_in_store>0</show_in_store>
|
314 |
-
<fields>
|
315 |
-
<active translate="label">
|
316 |
-
<label>Enable Flat Rate</label>
|
317 |
-
<frontend_type>select</frontend_type>
|
318 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
319 |
-
<sort_order>10</sort_order>
|
320 |
-
<show_in_default>1</show_in_default>
|
321 |
-
<show_in_website>1</show_in_website>
|
322 |
-
<show_in_store>0</show_in_store>
|
323 |
-
</active>
|
324 |
-
<title_1 translate="label">
|
325 |
-
<label>Rate 1 Title</label>
|
326 |
-
<frontend_type>text</frontend_type>
|
327 |
-
<sort_order>20</sort_order>
|
328 |
-
<show_in_default>1</show_in_default>
|
329 |
-
<show_in_website>1</show_in_website>
|
330 |
-
<show_in_store>0</show_in_store>
|
331 |
-
</title_1>
|
332 |
-
<price_1 translate="label">
|
333 |
-
<label>Rate 1 Amount</label>
|
334 |
-
<frontend_type>text</frontend_type>
|
335 |
-
<sort_order>22</sort_order>
|
336 |
-
<show_in_default>1</show_in_default>
|
337 |
-
<show_in_website>1</show_in_website>
|
338 |
-
<show_in_store>0</show_in_store>
|
339 |
-
</price_1>
|
340 |
-
|
341 |
-
<sallowspecific_1 translate="label">
|
342 |
-
<label>Rate 1 Ship To Applicable Countries</label>
|
343 |
-
<frontend_type>select</frontend_type>
|
344 |
-
<sort_order>24</sort_order>
|
345 |
-
<source_model>adminhtml/system_config_source_shipping_allspecificcountries</source_model>
|
346 |
-
<frontend_model>googlecheckout/adminhtml_shipping_applicable_countries</frontend_model>
|
347 |
-
<show_in_default>1</show_in_default>
|
348 |
-
<show_in_website>1</show_in_website>
|
349 |
-
<show_in_store>0</show_in_store>
|
350 |
-
<can_be_empty>1</can_be_empty>
|
351 |
-
</sallowspecific_1>
|
352 |
-
<specificcountry_1 translate="label">
|
353 |
-
<label>Rate 1 Ship to Specific Countries</label>
|
354 |
-
<frontend_type>multiselect</frontend_type>
|
355 |
-
<sort_order>26</sort_order>
|
356 |
-
<source_model>adminhtml/system_config_source_country</source_model>
|
357 |
-
<show_in_default>1</show_in_default>
|
358 |
-
<show_in_website>1</show_in_website>
|
359 |
-
<show_in_store>0</show_in_store>
|
360 |
-
<can_be_empty>1</can_be_empty>
|
361 |
-
</specificcountry_1>
|
362 |
-
|
363 |
-
|
364 |
-
<title_2 translate="label">
|
365 |
-
<label>Rate 2 Title</label>
|
366 |
-
<frontend_type>text</frontend_type>
|
367 |
-
<sort_order>30</sort_order>
|
368 |
-
<show_in_default>1</show_in_default>
|
369 |
-
<show_in_website>1</show_in_website>
|
370 |
-
<show_in_store>0</show_in_store>
|
371 |
-
</title_2>
|
372 |
-
<price_2 translate="label">
|
373 |
-
<label>Rate 2 Amount</label>
|
374 |
-
<frontend_type>text</frontend_type>
|
375 |
-
<sort_order>32</sort_order>
|
376 |
-
<show_in_default>1</show_in_default>
|
377 |
-
<show_in_website>1</show_in_website>
|
378 |
-
<show_in_store>0</show_in_store>
|
379 |
-
</price_2>
|
380 |
-
|
381 |
-
<sallowspecific_2 translate="label">
|
382 |
-
<label>Rate 2 Ship To Applicable Countries</label>
|
383 |
-
<frontend_type>select</frontend_type>
|
384 |
-
<sort_order>34</sort_order>
|
385 |
-
<source_model>adminhtml/system_config_source_shipping_allspecificcountries</source_model>
|
386 |
-
<frontend_model>googlecheckout/adminhtml_shipping_applicable_countries</frontend_model>
|
387 |
-
<show_in_default>1</show_in_default>
|
388 |
-
<show_in_website>1</show_in_website>
|
389 |
-
<show_in_store>0</show_in_store>
|
390 |
-
<can_be_empty>1</can_be_empty>
|
391 |
-
</sallowspecific_2>
|
392 |
-
<specificcountry_2 translate="label">
|
393 |
-
<label>Rate 2 Ship to Specific Countries</label>
|
394 |
-
<frontend_type>multiselect</frontend_type>
|
395 |
-
<sort_order>36</sort_order>
|
396 |
-
<source_model>adminhtml/system_config_source_country</source_model>
|
397 |
-
<show_in_default>1</show_in_default>
|
398 |
-
<show_in_website>1</show_in_website>
|
399 |
-
<show_in_store>0</show_in_store>
|
400 |
-
<can_be_empty>1</can_be_empty>
|
401 |
-
</specificcountry_2>
|
402 |
-
|
403 |
-
|
404 |
-
<title_3 translate="label">
|
405 |
-
<label>Rate 3 Title</label>
|
406 |
-
<frontend_type>text</frontend_type>
|
407 |
-
<sort_order>40</sort_order>
|
408 |
-
<show_in_default>1</show_in_default>
|
409 |
-
<show_in_website>1</show_in_website>
|
410 |
-
<show_in_store>0</show_in_store>
|
411 |
-
</title_3>
|
412 |
-
<price_3 translate="label">
|
413 |
-
<label>Rate 3 Amount</label>
|
414 |
-
<frontend_type>text</frontend_type>
|
415 |
-
<sort_order>42</sort_order>
|
416 |
-
<show_in_default>1</show_in_default>
|
417 |
-
<show_in_website>1</show_in_website>
|
418 |
-
<show_in_store>0</show_in_store>
|
419 |
-
</price_3>
|
420 |
-
<sallowspecific_3 translate="label">
|
421 |
-
<label>Rate 3 Ship To Applicable Countries</label>
|
422 |
-
<frontend_type>select</frontend_type>
|
423 |
-
<sort_order>44</sort_order>
|
424 |
-
<source_model>adminhtml/system_config_source_shipping_allspecificcountries</source_model>
|
425 |
-
<frontend_model>googlecheckout/adminhtml_shipping_applicable_countries</frontend_model>
|
426 |
-
<show_in_default>1</show_in_default>
|
427 |
-
<show_in_website>1</show_in_website>
|
428 |
-
<show_in_store>0</show_in_store>
|
429 |
-
<can_be_empty>1</can_be_empty>
|
430 |
-
</sallowspecific_3>
|
431 |
-
<specificcountry_3 translate="label">
|
432 |
-
<label>Rate 3 Ship to Specific Countries</label>
|
433 |
-
<frontend_type>multiselect</frontend_type>
|
434 |
-
<sort_order>46</sort_order>
|
435 |
-
<source_model>adminhtml/system_config_source_country</source_model>
|
436 |
-
<show_in_default>1</show_in_default>
|
437 |
-
<show_in_website>1</show_in_website>
|
438 |
-
<show_in_store>0</show_in_store>
|
439 |
-
<can_be_empty>1</can_be_empty>
|
440 |
-
</specificcountry_3>
|
441 |
-
</fields>
|
442 |
-
</checkout_shipping_flatrate>
|
443 |
-
<checkout_shipping_virtual translate="label">
|
444 |
-
<label>Google Checkout Shipping - Digital Delivery</label>
|
445 |
-
<frontend_type>text</frontend_type>
|
446 |
-
<sort_order>200</sort_order>
|
447 |
-
<show_in_default>1</show_in_default>
|
448 |
-
<show_in_website>1</show_in_website>
|
449 |
-
<show_in_store>0</show_in_store>
|
450 |
-
<fields>
|
451 |
-
<active translate="label">
|
452 |
-
<label>Enable Digital Delivery</label>
|
453 |
-
<frontend_type>select</frontend_type>
|
454 |
-
<source_model>adminhtml/system_config_source_yesno</source_model>
|
455 |
-
<sort_order>1</sort_order>
|
456 |
-
<show_in_default>1</show_in_default>
|
457 |
-
<show_in_website>1</show_in_website>
|
458 |
-
<show_in_store>0</show_in_store>
|
459 |
-
</active>
|
460 |
-
<schedule translate="label">
|
461 |
-
<label>Delivery Schedule</label>
|
462 |
-
<frontend_type>select</frontend_type>
|
463 |
-
<source_model>googlecheckout/source_shipping_virtual_schedule</source_model>
|
464 |
-
<sort_order>2</sort_order>
|
465 |
-
<show_in_default>1</show_in_default>
|
466 |
-
<show_in_website>1</show_in_website>
|
467 |
-
<show_in_store>0</show_in_store>
|
468 |
-
</schedule>
|
469 |
-
<method translate="label">
|
470 |
-
<label>Method</label>
|
471 |
-
<frontend_type>select</frontend_type>
|
472 |
-
<source_model>googlecheckout/source_shipping_virtual_method</source_model>
|
473 |
-
<sort_order>3</sort_order>
|
474 |
-
<show_in_default>1</show_in_default>
|
475 |
-
<show_in_website>1</show_in_website>
|
476 |
-
<show_in_store>0</show_in_store>
|
477 |
-
</method>
|
478 |
-
</fields>
|
479 |
-
</checkout_shipping_virtual>
|
480 |
-
</groups>
|
481 |
-
</google>
|
482 |
-
</sections>
|
483 |
-
</config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/etc/wsdl.xml
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<definitions xmlns:typens="urn:{{var wsdl.name}}" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
3 |
-
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/"
|
4 |
-
name="{{var wsdl.name}}" targetNamespace="urn:{{var wsdl.name}}">
|
5 |
-
<types>
|
6 |
-
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:Magento">
|
7 |
-
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" schemaLocation="http://schemas.xmlsoap.org/soap/encoding/" />
|
8 |
-
<complexType name="catalogProductReturnEntity">
|
9 |
-
<all>
|
10 |
-
<element name="enable_googlecheckout" type="xsd:string" minOccurs="0" />
|
11 |
-
</all>
|
12 |
-
</complexType>
|
13 |
-
</schema>
|
14 |
-
</types>
|
15 |
-
</definitions>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/etc/wsi.xml
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
-
<wsdl:definitions xmlns:typens="urn:{{var wsdl.name}}"
|
3 |
-
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
4 |
-
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
5 |
-
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
|
6 |
-
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
|
7 |
-
name="{{var wsdl.name}}"
|
8 |
-
targetNamespace="urn:{{var wsdl.name}}">
|
9 |
-
<wsdl:types>
|
10 |
-
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:{{var wsdl.name}}">
|
11 |
-
<xsd:complexType name="catalogProductReturnEntity">
|
12 |
-
<xsd:sequence>
|
13 |
-
<xsd:element name="enable_googlecheckout" type="xsd:string" minOccurs="0" />
|
14 |
-
</xsd:sequence>
|
15 |
-
</xsd:complexType>
|
16 |
-
</xsd:schema>
|
17 |
-
</wsdl:types>
|
18 |
-
</wsdl:definitions>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/sql/googlecheckout_setup/install-1.6.0.0.php
DELETED
@@ -1,83 +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_GoogleCheckout
|
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_GoogleCheckout_Model_Resource_Setup */
|
28 |
-
$installer = $this;
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Prepare database for tables setup
|
32 |
-
*/
|
33 |
-
$installer->startSetup();
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Create table 'googlecheckout/notification'
|
37 |
-
*/
|
38 |
-
$table = $installer->getConnection()
|
39 |
-
->newTable($installer->getTable('googlecheckout/notification'))
|
40 |
-
->addColumn('serial_number', Varien_Db_Ddl_Table::TYPE_TEXT, 64, array(
|
41 |
-
'nullable' => false,
|
42 |
-
'primary' => true,
|
43 |
-
), 'Serial Number')
|
44 |
-
->addColumn('started_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(
|
45 |
-
), 'Started At')
|
46 |
-
->addColumn('status', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array(
|
47 |
-
'unsigned' => true,
|
48 |
-
'nullable' => false,
|
49 |
-
'default' => '0',
|
50 |
-
), 'Status')
|
51 |
-
->setComment('Google Checkout Notification Table');
|
52 |
-
$installer->getConnection()->createTable($table);
|
53 |
-
|
54 |
-
/**
|
55 |
-
* Add 'disable_googlecheckout' attribute to the 'eav/attribute' table
|
56 |
-
*/
|
57 |
-
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'enable_googlecheckout', array(
|
58 |
-
'group' => 'Prices',
|
59 |
-
'type' => 'int',
|
60 |
-
'backend' => '',
|
61 |
-
'frontend' => '',
|
62 |
-
'label' => 'Is Product Available for Purchase with Google Checkout',
|
63 |
-
'input' => 'select',
|
64 |
-
'class' => '',
|
65 |
-
'source' => 'eav/entity_attribute_source_boolean',
|
66 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
|
67 |
-
'visible' => true,
|
68 |
-
'required' => false,
|
69 |
-
'user_defined' => false,
|
70 |
-
'default' => '1',
|
71 |
-
'searchable' => false,
|
72 |
-
'filterable' => false,
|
73 |
-
'comparable' => false,
|
74 |
-
'visible_on_front' => false,
|
75 |
-
'unique' => false,
|
76 |
-
'apply_to' => '',
|
77 |
-
'is_configurable' => false
|
78 |
-
));
|
79 |
-
|
80 |
-
/**
|
81 |
-
* Prepare database after tables setup
|
82 |
-
*/
|
83 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/sql/googlecheckout_setup/mysql4-upgrade-0.7.0-0.7.1.php
DELETED
@@ -1,64 +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_GoogleCheckout
|
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_GoogleCheckout_Model_Mysql4_Setup */
|
29 |
-
|
30 |
-
$installer->startSetup();
|
31 |
-
|
32 |
-
$installer->addAttribute('catalog_product', 'disable_googlecheckout', array(
|
33 |
-
'type' => 'int',
|
34 |
-
'backend' => '',
|
35 |
-
'frontend' => '',
|
36 |
-
'label' => 'Not available for purchase with Google Checkout',
|
37 |
-
'input' => 'select',
|
38 |
-
'class' => '',
|
39 |
-
'source' => 'eav/entity_attribute_source_boolean',
|
40 |
-
'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL,
|
41 |
-
'visible' => true,
|
42 |
-
'required' => false,
|
43 |
-
'user_defined' => false,
|
44 |
-
'default' => '0',
|
45 |
-
'searchable' => false,
|
46 |
-
'filterable' => false,
|
47 |
-
'comparable' => false,
|
48 |
-
'visible_on_front' => false,
|
49 |
-
'unique' => false,
|
50 |
-
'apply_to' => '',
|
51 |
-
'is_configurable' => false
|
52 |
-
));
|
53 |
-
|
54 |
-
$attributeId = $installer->getAttributeId('catalog_product', 'disable_googlecheckout');
|
55 |
-
|
56 |
-
foreach ($installer->getAllAttributeSetIds('catalog_product') as $attributeSetId) {
|
57 |
-
try {
|
58 |
-
$attributeGroupId = $installer->getAttributeGroupId('catalog_product', $attributeSetId, 'Prices');
|
59 |
-
} catch (Exception $e) {
|
60 |
-
$attributeGroupId = $installer->getDefaultAttributeGroupId('catalog_product', $attributeSetId);
|
61 |
-
}
|
62 |
-
$installer->addAttributeToSet('catalog_product', $attributeSetId, $attributeGroupId, $attributeId);
|
63 |
-
}
|
64 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/sql/googlecheckout_setup/mysql4-upgrade-0.7.1-0.7.2.php
DELETED
@@ -1,46 +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_GoogleCheckout
|
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_GoogleCheckout_Model_Mysql4_Setup */
|
29 |
-
|
30 |
-
$installer->startSetup();
|
31 |
-
|
32 |
-
$installer->updateAttribute('catalog_product', 'disable_googlecheckout', array(
|
33 |
-
'attribute_code' => 'enable_googlecheckout',
|
34 |
-
'frontend_label' => 'Is Product Available for Purchase with Google Checkout',
|
35 |
-
));
|
36 |
-
|
37 |
-
$attribute = $installer->getAttribute('catalog_product', 'enable_googlecheckout');
|
38 |
-
if (!empty($attribute['attribute_id'])) {
|
39 |
-
$installer->run("
|
40 |
-
UPDATE `{$installer->getAttributeTable('catalog_product', 'enable_googlecheckout')}`
|
41 |
-
SET `value` = ! `value`
|
42 |
-
WHERE `attribute_id` = {$attribute['attribute_id']}
|
43 |
-
");
|
44 |
-
}
|
45 |
-
|
46 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/GoogleCheckout/sql/googlecheckout_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php
DELETED
@@ -1,62 +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_GoogleCheckout
|
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_GoogleCheckout_Model_Resource_Setup */
|
28 |
-
$installer = $this;
|
29 |
-
$installer->startSetup();
|
30 |
-
|
31 |
-
/**
|
32 |
-
* Change columns
|
33 |
-
*/
|
34 |
-
$tables = array(
|
35 |
-
$installer->getTable('googlecheckout/notification') => array(
|
36 |
-
'columns' => array(
|
37 |
-
'serial_number' => array(
|
38 |
-
'type' => Varien_Db_Ddl_Table::TYPE_TEXT,
|
39 |
-
'length' => 64,
|
40 |
-
'nullable' => false,
|
41 |
-
'primary' => true,
|
42 |
-
'comment' => 'Serial Number'
|
43 |
-
),
|
44 |
-
'started_at' => array(
|
45 |
-
'type' => Varien_Db_Ddl_Table::TYPE_TIMESTAMP,
|
46 |
-
'comment' => 'Started At'
|
47 |
-
),
|
48 |
-
'status' => array(
|
49 |
-
'type' => Varien_Db_Ddl_Table::TYPE_SMALLINT,
|
50 |
-
'unsigned' => true,
|
51 |
-
'nullable' => false,
|
52 |
-
'default' => '0',
|
53 |
-
'comment' => 'Status'
|
54 |
-
)
|
55 |
-
),
|
56 |
-
'comment' => 'Google Checkout Notification Table'
|
57 |
-
)
|
58 |
-
);
|
59 |
-
|
60 |
-
$installer->getConnection()->modifyTables($tables);
|
61 |
-
|
62 |
-
$installer->endSetup();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/core/Mage/ImportExport/Model/Export/Entity/Product.php
CHANGED
@@ -83,7 +83,6 @@ class Mage_ImportExport_Model_Export_Entity_Product extends Mage_ImportExport_Mo
|
|
83 |
'status',
|
84 |
'tax_class_id',
|
85 |
'visibility',
|
86 |
-
'enable_googlecheckout',
|
87 |
'gift_message_available',
|
88 |
'custom_design'
|
89 |
);
|
83 |
'status',
|
84 |
'tax_class_id',
|
85 |
'visibility',
|
|
|
86 |
'gift_message_available',
|
87 |
'custom_design'
|
88 |
);
|
app/code/core/Mage/ImportExport/Model/Import/Entity/Product.php
CHANGED
@@ -48,12 +48,24 @@ class Mage_ImportExport_Model_Import_Entity_Product extends Mage_ImportExport_Mo
|
|
48 |
*/
|
49 |
const VALUE_ALL = 'all';
|
50 |
|
51 |
-
|
52 |
-
*
|
53 |
*/
|
54 |
const SCOPE_DEFAULT = 1;
|
|
|
|
|
|
|
|
|
55 |
const SCOPE_WEBSITE = 2;
|
|
|
|
|
|
|
|
|
56 |
const SCOPE_STORE = 0;
|
|
|
|
|
|
|
|
|
57 |
const SCOPE_NULL = -1;
|
58 |
/**#@-*/
|
59 |
|
@@ -64,10 +76,30 @@ class Mage_ImportExport_Model_Import_Entity_Product extends Mage_ImportExport_Mo
|
|
64 |
* to avoid interference with same attribute name.
|
65 |
*/
|
66 |
const COL_STORE = '_store';
|
|
|
|
|
|
|
|
|
67 |
const COL_ATTR_SET = '_attribute_set';
|
|
|
|
|
|
|
|
|
68 |
const COL_TYPE = '_type';
|
|
|
|
|
|
|
|
|
69 |
const COL_CATEGORY = '_category';
|
|
|
|
|
|
|
|
|
70 |
const COL_ROOT_CATEGORY = '_root_category';
|
|
|
|
|
|
|
|
|
71 |
const COL_SKU = 'sku';
|
72 |
/**#@-*/
|
73 |
|
@@ -75,29 +107,125 @@ class Mage_ImportExport_Model_Import_Entity_Product extends Mage_ImportExport_Mo
|
|
75 |
* Error codes.
|
76 |
*/
|
77 |
const ERROR_INVALID_SCOPE = 'invalidScope';
|
|
|
|
|
|
|
|
|
78 |
const ERROR_INVALID_WEBSITE = 'invalidWebsite';
|
|
|
|
|
|
|
|
|
79 |
const ERROR_INVALID_STORE = 'invalidStore';
|
|
|
|
|
|
|
|
|
80 |
const ERROR_INVALID_ATTR_SET = 'invalidAttrSet';
|
|
|
|
|
|
|
|
|
81 |
const ERROR_INVALID_TYPE = 'invalidType';
|
|
|
|
|
|
|
|
|
82 |
const ERROR_INVALID_CATEGORY = 'invalidCategory';
|
|
|
|
|
|
|
|
|
83 |
const ERROR_VALUE_IS_REQUIRED = 'isRequired';
|
|
|
|
|
|
|
|
|
84 |
const ERROR_TYPE_CHANGED = 'typeChanged';
|
|
|
|
|
|
|
|
|
85 |
const ERROR_SKU_IS_EMPTY = 'skuEmpty';
|
|
|
|
|
|
|
|
|
86 |
const ERROR_NO_DEFAULT_ROW = 'noDefaultRow';
|
|
|
|
|
|
|
|
|
87 |
const ERROR_CHANGE_TYPE = 'changeProductType';
|
|
|
|
|
|
|
|
|
88 |
const ERROR_DUPLICATE_SCOPE = 'duplicateScope';
|
|
|
|
|
|
|
|
|
89 |
const ERROR_DUPLICATE_SKU = 'duplicateSKU';
|
|
|
|
|
|
|
|
|
90 |
const ERROR_CHANGE_ATTR_SET = 'changeAttrSet';
|
|
|
|
|
|
|
|
|
91 |
const ERROR_TYPE_UNSUPPORTED = 'productTypeUnsupported';
|
|
|
|
|
|
|
|
|
92 |
const ERROR_ROW_IS_ORPHAN = 'rowIsOrphan';
|
|
|
|
|
|
|
|
|
93 |
const ERROR_INVALID_TIER_PRICE_QTY = 'invalidTierPriceOrQty';
|
|
|
|
|
|
|
|
|
94 |
const ERROR_INVALID_TIER_PRICE_SITE = 'tierPriceWebsiteInvalid';
|
|
|
|
|
|
|
|
|
95 |
const ERROR_INVALID_TIER_PRICE_GROUP = 'tierPriceGroupInvalid';
|
|
|
|
|
|
|
|
|
96 |
const ERROR_TIER_DATA_INCOMPLETE = 'tierPriceDataIsIncomplete';
|
|
|
|
|
|
|
|
|
97 |
const ERROR_INVALID_GROUP_PRICE_SITE = 'groupPriceWebsiteInvalid';
|
|
|
|
|
|
|
|
|
98 |
const ERROR_INVALID_GROUP_PRICE_GROUP = 'groupPriceGroupInvalid';
|
|
|
|
|
|
|
|
|
99 |
const ERROR_GROUP_PRICE_DATA_INCOMPLETE = 'groupPriceDataIsIncomplete';
|
|
|
|
|
|
|
|
|
100 |
const ERROR_SKU_NOT_FOUND_FOR_DELETE = 'skuNotFoundToDelete';
|
|
|
|
|
|
|
|
|
101 |
const ERROR_SUPER_PRODUCTS_SKU_NOT_FOUND = 'superProductsSkuNotFound';
|
102 |
/**#@-*/
|
103 |
|
@@ -145,7 +273,6 @@ class Mage_ImportExport_Model_Import_Entity_Product extends Mage_ImportExport_Mo
|
|
145 |
'status',
|
146 |
'tax_class_id',
|
147 |
'visibility',
|
148 |
-
'enable_googlecheckout',
|
149 |
'gift_message_available',
|
150 |
'custom_design'
|
151 |
);
|
@@ -933,7 +1060,7 @@ class Mage_ImportExport_Model_Import_Entity_Product extends Mage_ImportExport_Mo
|
|
933 |
$resource = Mage::getResourceModel('catalog/product_link');
|
934 |
$mainTable = $resource->getMainTable();
|
935 |
$positionAttrId = array();
|
936 |
-
$
|
937 |
$adapter = $this->_connection;
|
938 |
|
939 |
// pre-load 'position' attributes ID for each link type once
|
@@ -950,6 +1077,7 @@ class Mage_ImportExport_Model_Import_Entity_Product extends Mage_ImportExport_Mo
|
|
950 |
);
|
951 |
$positionAttrId[$linkId] = $adapter->fetchOne($select, $bind);
|
952 |
}
|
|
|
953 |
while ($bunch = $this->_dataSourceModel->getNextBunch()) {
|
954 |
$productIds = array();
|
955 |
$linkRows = array();
|
@@ -1010,6 +1138,7 @@ class Mage_ImportExport_Model_Import_Entity_Product extends Mage_ImportExport_Mo
|
|
1010 |
$linkRows,
|
1011 |
array('link_id')
|
1012 |
);
|
|
|
1013 |
}
|
1014 |
if ($positionRows) { // process linked product positions
|
1015 |
$adapter->insertOnDuplicate(
|
@@ -1046,6 +1175,20 @@ class Mage_ImportExport_Model_Import_Entity_Product extends Mage_ImportExport_Mo
|
|
1046 |
'value' => $storeValue
|
1047 |
);
|
1048 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1049 |
}
|
1050 |
}
|
1051 |
$this->_connection->insertOnDuplicate($tableName, $tableData, array('value'));
|
@@ -1274,6 +1417,7 @@ class Mage_ImportExport_Model_Import_Entity_Product extends Mage_ImportExport_Mo
|
|
1274 |
continue;
|
1275 |
}
|
1276 |
}
|
|
|
1277 |
$this->_saveProductEntity($entityRowsIn, $entityRowsUp)
|
1278 |
->_saveProductWebsites($websites)
|
1279 |
->_saveProductCategories($categories)
|
@@ -1341,6 +1485,10 @@ class Mage_ImportExport_Model_Import_Entity_Product extends Mage_ImportExport_Mo
|
|
1341 |
|
1342 |
if ('datetime' == $attribute->getBackendType() && strtotime($attrValue)) {
|
1343 |
$attrValue = gmstrftime($this->_getStrftimeFormat(), strtotime($attrValue));
|
|
|
|
|
|
|
|
|
1344 |
} elseif ($backModel) {
|
1345 |
$attribute->getBackend()->beforeSave($product);
|
1346 |
$attrValue = $product->getData($attribute->getAttributeCode());
|
@@ -1748,6 +1896,7 @@ class Mage_ImportExport_Model_Import_Entity_Product extends Mage_ImportExport_Mo
|
|
1748 |
protected function _filterRowData(&$rowData)
|
1749 |
{
|
1750 |
$rowData = array_filter($rowData, 'strlen');
|
|
|
1751 |
if (!isset($rowData[self::COL_SKU])) {
|
1752 |
$rowData[self::COL_SKU] = null;
|
1753 |
}
|
@@ -1930,8 +2079,8 @@ class Mage_ImportExport_Model_Import_Entity_Product extends Mage_ImportExport_Mo
|
|
1930 |
$rowAttributesValid = $this->_productTypeModels[$this->_newSku[$sku]['type_id']]->isRowValid(
|
1931 |
$rowData, $rowNum, !isset($this->_oldSku[$sku])
|
1932 |
);
|
1933 |
-
if (!$rowAttributesValid && self::SCOPE_DEFAULT == $rowScope
|
1934 |
-
$sku = false; // mark SCOPE_DEFAULT row as invalid for future child rows
|
1935 |
}
|
1936 |
}
|
1937 |
return !isset($this->_invalidRows[$rowNum]);
|
48 |
*/
|
49 |
const VALUE_ALL = 'all';
|
50 |
|
51 |
+
/**
|
52 |
+
* Default Scope
|
53 |
*/
|
54 |
const SCOPE_DEFAULT = 1;
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Website Scope
|
58 |
+
*/
|
59 |
const SCOPE_WEBSITE = 2;
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Store Scope
|
63 |
+
*/
|
64 |
const SCOPE_STORE = 0;
|
65 |
+
|
66 |
+
/**
|
67 |
+
* Null Scope
|
68 |
+
*/
|
69 |
const SCOPE_NULL = -1;
|
70 |
/**#@-*/
|
71 |
|
76 |
* to avoid interference with same attribute name.
|
77 |
*/
|
78 |
const COL_STORE = '_store';
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Col Attr Set
|
82 |
+
*/
|
83 |
const COL_ATTR_SET = '_attribute_set';
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Col Type
|
87 |
+
*/
|
88 |
const COL_TYPE = '_type';
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Col Category
|
92 |
+
*/
|
93 |
const COL_CATEGORY = '_category';
|
94 |
+
|
95 |
+
/**
|
96 |
+
* Col Root Category
|
97 |
+
*/
|
98 |
const COL_ROOT_CATEGORY = '_root_category';
|
99 |
+
|
100 |
+
/**
|
101 |
+
* Col Sku
|
102 |
+
*/
|
103 |
const COL_SKU = 'sku';
|
104 |
/**#@-*/
|
105 |
|
107 |
* Error codes.
|
108 |
*/
|
109 |
const ERROR_INVALID_SCOPE = 'invalidScope';
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Error - invalid website
|
113 |
+
*/
|
114 |
const ERROR_INVALID_WEBSITE = 'invalidWebsite';
|
115 |
+
|
116 |
+
/**
|
117 |
+
* Error - invalid store
|
118 |
+
*/
|
119 |
const ERROR_INVALID_STORE = 'invalidStore';
|
120 |
+
|
121 |
+
/**
|
122 |
+
* Error - invalid attr set
|
123 |
+
*/
|
124 |
const ERROR_INVALID_ATTR_SET = 'invalidAttrSet';
|
125 |
+
|
126 |
+
/**
|
127 |
+
* Error - invalid type
|
128 |
+
*/
|
129 |
const ERROR_INVALID_TYPE = 'invalidType';
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Error - invalid category
|
133 |
+
*/
|
134 |
const ERROR_INVALID_CATEGORY = 'invalidCategory';
|
135 |
+
|
136 |
+
/**
|
137 |
+
* Error - value is required
|
138 |
+
*/
|
139 |
const ERROR_VALUE_IS_REQUIRED = 'isRequired';
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Error - type changed
|
143 |
+
*/
|
144 |
const ERROR_TYPE_CHANGED = 'typeChanged';
|
145 |
+
|
146 |
+
/**
|
147 |
+
* Error - sku is empty
|
148 |
+
*/
|
149 |
const ERROR_SKU_IS_EMPTY = 'skuEmpty';
|
150 |
+
|
151 |
+
/**
|
152 |
+
* Error - no default row
|
153 |
+
*/
|
154 |
const ERROR_NO_DEFAULT_ROW = 'noDefaultRow';
|
155 |
+
|
156 |
+
/**
|
157 |
+
* Error - change type
|
158 |
+
*/
|
159 |
const ERROR_CHANGE_TYPE = 'changeProductType';
|
160 |
+
|
161 |
+
/**
|
162 |
+
* Error - duplicate scope
|
163 |
+
*/
|
164 |
const ERROR_DUPLICATE_SCOPE = 'duplicateScope';
|
165 |
+
|
166 |
+
/**
|
167 |
+
* Error - duplicate sku
|
168 |
+
*/
|
169 |
const ERROR_DUPLICATE_SKU = 'duplicateSKU';
|
170 |
+
|
171 |
+
/**
|
172 |
+
* Error - change attr set
|
173 |
+
*/
|
174 |
const ERROR_CHANGE_ATTR_SET = 'changeAttrSet';
|
175 |
+
|
176 |
+
/**
|
177 |
+
* Error - type unsupported
|
178 |
+
*/
|
179 |
const ERROR_TYPE_UNSUPPORTED = 'productTypeUnsupported';
|
180 |
+
|
181 |
+
/**
|
182 |
+
* Error - row is orphan
|
183 |
+
*/
|
184 |
const ERROR_ROW_IS_ORPHAN = 'rowIsOrphan';
|
185 |
+
|
186 |
+
/**
|
187 |
+
* Error - invalid tier price qty
|
188 |
+
*/
|
189 |
const ERROR_INVALID_TIER_PRICE_QTY = 'invalidTierPriceOrQty';
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Error - invalid tier price site
|
193 |
+
*/
|
194 |
const ERROR_INVALID_TIER_PRICE_SITE = 'tierPriceWebsiteInvalid';
|
195 |
+
|
196 |
+
/**
|
197 |
+
* Error - invalid tier price group
|
198 |
+
*/
|
199 |
const ERROR_INVALID_TIER_PRICE_GROUP = 'tierPriceGroupInvalid';
|
200 |
+
|
201 |
+
/**
|
202 |
+
* Error - tier data incomplete
|
203 |
+
*/
|
204 |
const ERROR_TIER_DATA_INCOMPLETE = 'tierPriceDataIsIncomplete';
|
205 |
+
|
206 |
+
/**
|
207 |
+
* Error - invalid group price site
|
208 |
+
*/
|
209 |
const ERROR_INVALID_GROUP_PRICE_SITE = 'groupPriceWebsiteInvalid';
|
210 |
+
|
211 |
+
/**
|
212 |
+
* Error - invalid group price group
|
213 |
+
*/
|
214 |
const ERROR_INVALID_GROUP_PRICE_GROUP = 'groupPriceGroupInvalid';
|
215 |
+
|
216 |
+
/**
|
217 |
+
* Error - group price data incompelte
|
218 |
+
*/
|
219 |
const ERROR_GROUP_PRICE_DATA_INCOMPLETE = 'groupPriceDataIsIncomplete';
|
220 |
+
|
221 |
+
/**
|
222 |
+
* Error - sku not found for delete
|
223 |
+
*/
|
224 |
const ERROR_SKU_NOT_FOUND_FOR_DELETE = 'skuNotFoundToDelete';
|
225 |
+
|
226 |
+
/**
|
227 |
+
* Error - super products sku not found
|
228 |
+
*/
|
229 |
const ERROR_SUPER_PRODUCTS_SKU_NOT_FOUND = 'superProductsSkuNotFound';
|
230 |
/**#@-*/
|
231 |
|
273 |
'status',
|
274 |
'tax_class_id',
|
275 |
'visibility',
|
|
|
276 |
'gift_message_available',
|
277 |
'custom_design'
|
278 |
);
|
1060 |
$resource = Mage::getResourceModel('catalog/product_link');
|
1061 |
$mainTable = $resource->getMainTable();
|
1062 |
$positionAttrId = array();
|
1063 |
+
/** @var Varien_Db_Adapter_Interface $adapter */
|
1064 |
$adapter = $this->_connection;
|
1065 |
|
1066 |
// pre-load 'position' attributes ID for each link type once
|
1077 |
);
|
1078 |
$positionAttrId[$linkId] = $adapter->fetchOne($select, $bind);
|
1079 |
}
|
1080 |
+
$nextLinkId = Mage::getResourceHelper('importexport')->getNextAutoincrement($mainTable);
|
1081 |
while ($bunch = $this->_dataSourceModel->getNextBunch()) {
|
1082 |
$productIds = array();
|
1083 |
$linkRows = array();
|
1138 |
$linkRows,
|
1139 |
array('link_id')
|
1140 |
);
|
1141 |
+
$adapter->changeTableAutoIncrement($mainTable, $nextLinkId);
|
1142 |
}
|
1143 |
if ($positionRows) { // process linked product positions
|
1144 |
$adapter->insertOnDuplicate(
|
1175 |
'value' => $storeValue
|
1176 |
);
|
1177 |
}
|
1178 |
+
|
1179 |
+
/*
|
1180 |
+
If the store based values are not provided for a particular store,
|
1181 |
+
we default to the default scope values.
|
1182 |
+
In this case, remove all the existing store based values stored in the table.
|
1183 |
+
*/
|
1184 |
+
$where = $this->_connection->quoteInto('store_id NOT IN (?)', array_keys($storeValues)) .
|
1185 |
+
$this->_connection->quoteInto(' AND attribute_id = ?', $attributeId) .
|
1186 |
+
$this->_connection->quoteInto(' AND entity_id = ?', $productId) .
|
1187 |
+
$this->_connection->quoteInto(' AND entity_type_id = ?', $this->_entityTypeId);
|
1188 |
+
|
1189 |
+
$this->_connection->delete(
|
1190 |
+
$tableName, $where
|
1191 |
+
);
|
1192 |
}
|
1193 |
}
|
1194 |
$this->_connection->insertOnDuplicate($tableName, $tableData, array('value'));
|
1417 |
continue;
|
1418 |
}
|
1419 |
}
|
1420 |
+
|
1421 |
$this->_saveProductEntity($entityRowsIn, $entityRowsUp)
|
1422 |
->_saveProductWebsites($websites)
|
1423 |
->_saveProductCategories($categories)
|
1485 |
|
1486 |
if ('datetime' == $attribute->getBackendType() && strtotime($attrValue)) {
|
1487 |
$attrValue = gmstrftime($this->_getStrftimeFormat(), strtotime($attrValue));
|
1488 |
+
} elseif ('url_key' == $attribute->getAttributeCode()) {
|
1489 |
+
if (empty($attrValue)) {
|
1490 |
+
$attrValue = $product->formatUrlKey($product->getName());
|
1491 |
+
}
|
1492 |
} elseif ($backModel) {
|
1493 |
$attribute->getBackend()->beforeSave($product);
|
1494 |
$attrValue = $product->getData($attribute->getAttributeCode());
|
1896 |
protected function _filterRowData(&$rowData)
|
1897 |
{
|
1898 |
$rowData = array_filter($rowData, 'strlen');
|
1899 |
+
// Exceptions - for sku - put them back in
|
1900 |
if (!isset($rowData[self::COL_SKU])) {
|
1901 |
$rowData[self::COL_SKU] = null;
|
1902 |
}
|
2079 |
$rowAttributesValid = $this->_productTypeModels[$this->_newSku[$sku]['type_id']]->isRowValid(
|
2080 |
$rowData, $rowNum, !isset($this->_oldSku[$sku])
|
2081 |
);
|
2082 |
+
if (!$rowAttributesValid && self::SCOPE_DEFAULT == $rowScope) {
|
2083 |
+
$sku = false; // mark SCOPE_DEFAULT row as invalid for future child rows
|
2084 |
}
|
2085 |
}
|
2086 |
return !isset($this->_invalidRows[$rowNum]);
|
app/code/core/Mage/ImportExport/Model/Import/Entity/Product/Type/Abstract.php
CHANGED
@@ -111,7 +111,12 @@ abstract class Mage_ImportExport_Model_Import_Entity_Product_Type_Abstract
|
|
111 |
foreach ($this->_messageTemplates as $errorCode => $message) {
|
112 |
$this->_entityModel->addMessageTemplate($errorCode, $message);
|
113 |
}
|
114 |
-
|
|
|
|
|
|
|
|
|
|
|
115 |
}
|
116 |
}
|
117 |
|
@@ -238,10 +243,10 @@ abstract class Mage_ImportExport_Model_Import_Entity_Product_Type_Abstract
|
|
238 |
*
|
239 |
* @param array $rowData
|
240 |
* @param int $rowNum
|
241 |
-
* @param boolean $
|
242 |
* @return boolean
|
243 |
*/
|
244 |
-
public function isRowValid(array $rowData, $rowNum, $
|
245 |
{
|
246 |
$error = false;
|
247 |
$rowScope = $this->_entityModel->getRowScope($rowData);
|
@@ -253,14 +258,17 @@ abstract class Mage_ImportExport_Model_Import_Entity_Product_Type_Abstract
|
|
253 |
$error |= !$this->_entityModel->isAttributeValid($attrCode, $attrParams, $rowData, $rowNum);
|
254 |
} elseif (
|
255 |
$this->_isAttributeRequiredCheckNeeded($attrCode)
|
256 |
-
&& $
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
|
|
|
|
|
|
264 |
}
|
265 |
}
|
266 |
}
|
@@ -297,8 +305,6 @@ abstract class Mage_ImportExport_Model_Import_Entity_Product_Type_Abstract
|
|
297 |
('select' == $attrParams['type'] || 'multiselect' == $attrParams['type'])
|
298 |
? $attrParams['options'][strtolower($rowData[$attrCode])]
|
299 |
: $rowData[$attrCode];
|
300 |
-
} elseif (array_key_exists($attrCode, $rowData)) {
|
301 |
-
$resultAttrs[$attrCode] = $rowData[$attrCode];
|
302 |
} elseif ($withDefaultValue && null !== $attrParams['default_value']) {
|
303 |
$resultAttrs[$attrCode] = $attrParams['default_value'];
|
304 |
}
|
111 |
foreach ($this->_messageTemplates as $errorCode => $message) {
|
112 |
$this->_entityModel->addMessageTemplate($errorCode, $message);
|
113 |
}
|
114 |
+
|
115 |
+
if (isset($params['attributes'])) {
|
116 |
+
$this->_attributes = $params['attributes'];
|
117 |
+
} else {
|
118 |
+
$this->_initAttributes();
|
119 |
+
}
|
120 |
}
|
121 |
}
|
122 |
|
243 |
*
|
244 |
* @param array $rowData
|
245 |
* @param int $rowNum
|
246 |
+
* @param boolean $isNewProduct OPTIONAL.
|
247 |
* @return boolean
|
248 |
*/
|
249 |
+
public function isRowValid(array $rowData, $rowNum, $isNewProduct = true)
|
250 |
{
|
251 |
$error = false;
|
252 |
$rowScope = $this->_entityModel->getRowScope($rowData);
|
258 |
$error |= !$this->_entityModel->isAttributeValid($attrCode, $attrParams, $rowData, $rowNum);
|
259 |
} elseif (
|
260 |
$this->_isAttributeRequiredCheckNeeded($attrCode)
|
261 |
+
&& $attrParams['is_required']) {
|
262 |
+
// For the default scope - if this is a new product or
|
263 |
+
// for an old product, if the imported doc has the column present for the attrCode
|
264 |
+
if (Mage_ImportExport_Model_Import_Entity_Product::SCOPE_DEFAULT == $rowScope &&
|
265 |
+
($isNewProduct || array_key_exists($attrCode, $rowData))) {
|
266 |
+
$this->_entityModel->addRowError(
|
267 |
+
Mage_ImportExport_Model_Import_Entity_Product::ERROR_VALUE_IS_REQUIRED,
|
268 |
+
$rowNum, $attrCode
|
269 |
+
);
|
270 |
+
$error = true;
|
271 |
+
}
|
272 |
}
|
273 |
}
|
274 |
}
|
305 |
('select' == $attrParams['type'] || 'multiselect' == $attrParams['type'])
|
306 |
? $attrParams['options'][strtolower($rowData[$attrCode])]
|
307 |
: $rowData[$attrCode];
|
|
|
|
|
308 |
} elseif ($withDefaultValue && null !== $attrParams['default_value']) {
|
309 |
$resultAttrs[$attrCode] = $attrParams['default_value'];
|
310 |
}
|
app/code/core/Mage/ImportExport/Model/Import/Proxy/Product.php
CHANGED
@@ -41,4 +41,14 @@ class Mage_ImportExport_Model_Import_Proxy_Product extends Mage_Catalog_Model_Pr
|
|
41 |
protected function _construct()
|
42 |
{
|
43 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
}
|
41 |
protected function _construct()
|
42 |
{
|
43 |
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Retrieve object id
|
47 |
+
*
|
48 |
+
* @return int
|
49 |
+
*/
|
50 |
+
public function getId()
|
51 |
+
{
|
52 |
+
return $this->_getData('id');
|
53 |
+
}
|
54 |
}
|
app/code/core/Mage/Oauth/Model/Server.php
CHANGED
@@ -690,8 +690,6 @@ class Mage_Oauth_Model_Server
|
|
690 |
}
|
691 |
if (self::ERR_PARAMETER_ABSENT == $eCode) {
|
692 |
$errorMsg .= '&oauth_parameters_absent=' . $eMsg;
|
693 |
-
} elseif (self::ERR_SIGNATURE_INVALID == $eCode) {
|
694 |
-
$errorMsg .= '&debug_sbs=' . $eMsg;
|
695 |
} elseif ($eMsg) {
|
696 |
$errorMsg .= '&message=' . $eMsg;
|
697 |
}
|
690 |
}
|
691 |
if (self::ERR_PARAMETER_ABSENT == $eCode) {
|
692 |
$errorMsg .= '&oauth_parameters_absent=' . $eMsg;
|
|
|
|
|
693 |
} elseif ($eMsg) {
|
694 |
$errorMsg .= '&message=' . $eMsg;
|
695 |
}
|
app/code/core/Mage/Page/Block/Html/Breadcrumbs.php
CHANGED
@@ -50,13 +50,20 @@ class Mage_Page_Block_Html_Breadcrumbs extends Mage_Core_Block_Template
|
|
50 |
*/
|
51 |
protected $_crumbs = null;
|
52 |
|
53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
{
|
55 |
parent::__construct();
|
56 |
$this->setTemplate('page/html/breadcrumbs.phtml');
|
57 |
}
|
58 |
|
59 |
-
function addCrumb($crumbName, $crumbInfo, $after = false)
|
60 |
{
|
61 |
$this->_prepareArray($crumbInfo, array('label', 'title', 'link', 'first', 'last', 'readonly'));
|
62 |
if ((!isset($this->_crumbs[$crumbName])) || (!$this->_crumbs[$crumbName]['readonly'])) {
|
@@ -65,6 +72,24 @@ class Mage_Page_Block_Html_Breadcrumbs extends Mage_Core_Block_Template
|
|
65 |
return $this;
|
66 |
}
|
67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
protected function _toHtml()
|
69 |
{
|
70 |
if (is_array($this->_crumbs)) {
|
50 |
*/
|
51 |
protected $_crumbs = null;
|
52 |
|
53 |
+
/**
|
54 |
+
* Cache key info
|
55 |
+
*
|
56 |
+
* @var null|array
|
57 |
+
*/
|
58 |
+
protected $_cacheKeyInfo = null;
|
59 |
+
|
60 |
+
public function __construct()
|
61 |
{
|
62 |
parent::__construct();
|
63 |
$this->setTemplate('page/html/breadcrumbs.phtml');
|
64 |
}
|
65 |
|
66 |
+
public function addCrumb($crumbName, $crumbInfo, $after = false)
|
67 |
{
|
68 |
$this->_prepareArray($crumbInfo, array('label', 'title', 'link', 'first', 'last', 'readonly'));
|
69 |
if ((!isset($this->_crumbs[$crumbName])) || (!$this->_crumbs[$crumbName]['readonly'])) {
|
72 |
return $this;
|
73 |
}
|
74 |
|
75 |
+
/**
|
76 |
+
* Get cache key informative items
|
77 |
+
*
|
78 |
+
* @return array
|
79 |
+
*/
|
80 |
+
public function getCacheKeyInfo()
|
81 |
+
{
|
82 |
+
if (null === $this->_cacheKeyInfo) {
|
83 |
+
$this->_cacheKeyInfo = parent::getCacheKeyInfo() + array(
|
84 |
+
'crumbs' => base64_encode(serialize($this->_crumbs)),
|
85 |
+
'name' => $this->getNameInLayout(),
|
86 |
+
);
|
87 |
+
}
|
88 |
+
|
89 |
+
return $this->_cacheKeyInfo;
|
90 |
+
}
|
91 |
+
|
92 |
+
|
93 |
protected function _toHtml()
|
94 |
{
|
95 |
if (is_array($this->_crumbs)) {
|
app/code/core/Mage/{GoogleCheckout/Block/Redirect.php → Page/Block/Html/CookieNotice.php}
RENAMED
@@ -19,38 +19,38 @@
|
|
19 |
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
*
|
21 |
* @category Mage
|
22 |
-
* @package
|
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 |
*
|
30 |
* @category Mage
|
31 |
-
* @package
|
32 |
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
*/
|
34 |
-
class
|
35 |
{
|
36 |
/**
|
37 |
-
*
|
38 |
*
|
39 |
-
*
|
40 |
*/
|
41 |
-
public function
|
42 |
{
|
43 |
-
|
44 |
-
|
45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
|
47 |
-
|
48 |
-
{
|
49 |
-
return 'GET';
|
50 |
-
}
|
51 |
-
|
52 |
-
public function getMessage ()
|
53 |
-
{
|
54 |
-
return $this->__('You will be redirected to GoogleCheckout in a few seconds.');
|
55 |
}
|
56 |
}
|
19 |
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
*
|
21 |
* @category Mage
|
22 |
+
* @package Mage_Page
|
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 |
+
* Html notices block
|
29 |
*
|
30 |
* @category Mage
|
31 |
+
* @package Mage_Page
|
32 |
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
*/
|
34 |
+
class Mage_Page_Block_Html_CookieNotice extends Mage_Core_Block_Template
|
35 |
{
|
36 |
/**
|
37 |
+
* Get content for cookie restriction block
|
38 |
*
|
39 |
+
* @return string
|
40 |
*/
|
41 |
+
public function getCookieRestrictionBlockContent()
|
42 |
{
|
43 |
+
$blockIdentifier = Mage::helper('core/cookie')->getCookieRestrictionNoticeCmsBlockIdentifier();
|
44 |
+
$block = Mage::getModel('cms/block')->load($blockIdentifier, 'identifier');
|
45 |
|
46 |
+
$html = '';
|
47 |
+
if ($block->getIsActive()) {
|
48 |
+
/* @var $helper Mage_Cms_Helper_Data */
|
49 |
+
$helper = Mage::helper('cms');
|
50 |
+
$processor = $helper->getBlockTemplateProcessor();
|
51 |
+
$html = $processor->filter($block->getContent());
|
52 |
+
}
|
53 |
|
54 |
+
return $html;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
}
|
56 |
}
|
app/code/core/Mage/Page/Block/Template/Links.php
CHANGED
@@ -98,9 +98,24 @@ class Mage_Page_Block_Template_Links extends Mage_Core_Block_Template
|
|
98 |
'after_text' => $afterText,
|
99 |
));
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
$this->_links[$this->_getNewPosition($position)] = $link;
|
|
|
102 |
if (intval($position) > 0) {
|
103 |
-
|
104 |
}
|
105 |
|
106 |
return $this;
|
@@ -116,7 +131,8 @@ class Mage_Page_Block_Template_Links extends Mage_Core_Block_Template
|
|
116 |
{
|
117 |
$block = $this->getLayout()->getBlock($blockName);
|
118 |
if ($block) {
|
119 |
-
$
|
|
|
120 |
}
|
121 |
return $this;
|
122 |
}
|
@@ -252,3 +268,4 @@ class Mage_Page_Block_Template_Links extends Mage_Core_Block_Template
|
|
252 |
return parent::getCacheTags();
|
253 |
}
|
254 |
}
|
|
98 |
'after_text' => $afterText,
|
99 |
));
|
100 |
|
101 |
+
$this->_addIntoPosition($link, $position);
|
102 |
+
|
103 |
+
return $this;
|
104 |
+
}
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Add link into collection
|
108 |
+
*
|
109 |
+
* @param Varien_Object $link
|
110 |
+
* @param int $position
|
111 |
+
* @return Mage_Page_Block_Template_Links
|
112 |
+
*/
|
113 |
+
protected function _addIntoPosition($link, $position)
|
114 |
+
{
|
115 |
$this->_links[$this->_getNewPosition($position)] = $link;
|
116 |
+
|
117 |
if (intval($position) > 0) {
|
118 |
+
ksort($this->_links);
|
119 |
}
|
120 |
|
121 |
return $this;
|
131 |
{
|
132 |
$block = $this->getLayout()->getBlock($blockName);
|
133 |
if ($block) {
|
134 |
+
$position = (int)$block->getPosition();
|
135 |
+
$this->_addIntoPosition($block, $position);
|
136 |
}
|
137 |
return $this;
|
138 |
}
|
268 |
return parent::getCacheTags();
|
269 |
}
|
270 |
}
|
271 |
+
|
app/code/core/Mage/Payment/Model/Method/Abstract.php
CHANGED
@@ -68,6 +68,7 @@ abstract class Mage_Payment_Model_Method_Abstract extends Varien_Object
|
|
68 |
protected $_canAuthorize = false;
|
69 |
protected $_canCapture = false;
|
70 |
protected $_canCapturePartial = false;
|
|
|
71 |
protected $_canRefund = false;
|
72 |
protected $_canRefundInvoicePartial = false;
|
73 |
protected $_canVoid = false;
|
@@ -138,6 +139,16 @@ abstract class Mage_Payment_Model_Method_Abstract extends Varien_Object
|
|
138 |
return $this->_canCapturePartial;
|
139 |
}
|
140 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
/**
|
142 |
* Check refund availability
|
143 |
*
|
68 |
protected $_canAuthorize = false;
|
69 |
protected $_canCapture = false;
|
70 |
protected $_canCapturePartial = false;
|
71 |
+
protected $_canCaptureOnce = false;
|
72 |
protected $_canRefund = false;
|
73 |
protected $_canRefundInvoicePartial = false;
|
74 |
protected $_canVoid = false;
|
139 |
return $this->_canCapturePartial;
|
140 |
}
|
141 |
|
142 |
+
/**
|
143 |
+
* Check whether capture can be performed once and no further capture possible
|
144 |
+
*
|
145 |
+
* @return bool
|
146 |
+
*/
|
147 |
+
public function canCaptureOnce()
|
148 |
+
{
|
149 |
+
return $this->_canCaptureOnce;
|
150 |
+
}
|
151 |
+
|
152 |
/**
|
153 |
* Check refund availability
|
154 |
*
|
app/code/core/Mage/Payment/Model/Observer.php
CHANGED
@@ -118,9 +118,58 @@ class Mage_Payment_Model_Observer
|
|
118 |
{
|
119 |
/** @var Mage_Sales_Model_Order_Payment $payment */
|
120 |
$payment = $observer->getEvent()->getPayment();
|
121 |
-
if($payment->getMethod() === Mage_Payment_Model_Method_Banktransfer::PAYMENT_METHOD_BANKTRANSFER_CODE) {
|
122 |
$payment->setAdditionalInformation('instructions',
|
123 |
$payment->getMethodInstance()->getInstructions());
|
124 |
}
|
125 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
}
|
118 |
{
|
119 |
/** @var Mage_Sales_Model_Order_Payment $payment */
|
120 |
$payment = $observer->getEvent()->getPayment();
|
121 |
+
if ($payment->getMethod() === Mage_Payment_Model_Method_Banktransfer::PAYMENT_METHOD_BANKTRANSFER_CODE) {
|
122 |
$payment->setAdditionalInformation('instructions',
|
123 |
$payment->getMethodInstance()->getInstructions());
|
124 |
}
|
125 |
}
|
126 |
+
|
127 |
+
/**
|
128 |
+
* Will veto the unassignment of the order status if it is currently configured in any of the payment method
|
129 |
+
* configurations.
|
130 |
+
*
|
131 |
+
* @param Varien_Event_Observer $observer
|
132 |
+
* @throws Mage_Core_Exception
|
133 |
+
*/
|
134 |
+
public function beforeSalesOrderStatusUnassign($observer)
|
135 |
+
{
|
136 |
+
$state = $observer->getEvent()->getState();
|
137 |
+
if ($state == Mage_Sales_Model_Order::STATE_NEW) {
|
138 |
+
$statusModel = $observer->getEvent()->getStatus();
|
139 |
+
$status = $statusModel->getStatus();
|
140 |
+
$used = 0;
|
141 |
+
$titles = array();
|
142 |
+
foreach (Mage::app()->getWebsites(true) as $website) {
|
143 |
+
$store = current($website->getStores()); // just need one store from each website
|
144 |
+
if (!$store) {
|
145 |
+
continue; // no store is associated with the website
|
146 |
+
}
|
147 |
+
foreach (Mage::helper('payment')->getPaymentMethods($store) as $value) {
|
148 |
+
if (isset($value['order_status']) && $value['order_status'] == $status && $value['active']) {
|
149 |
+
++$used;
|
150 |
+
|
151 |
+
// Remember the payment's information
|
152 |
+
$title = $value['title'];
|
153 |
+
$websiteName = $website->getName();
|
154 |
+
if (array_key_exists($title, $titles)) {
|
155 |
+
$titles[$title][] = $websiteName;
|
156 |
+
} else {
|
157 |
+
$titles[$title] = array($websiteName);
|
158 |
+
}
|
159 |
+
}
|
160 |
+
}
|
161 |
+
}
|
162 |
+
if ($used > 0) {
|
163 |
+
// build the error message, and throw it
|
164 |
+
$methods = '';
|
165 |
+
$spacer = '';
|
166 |
+
foreach ($titles as $key => $values) {
|
167 |
+
$methods = $methods . $spacer . $key . ' [' . join(', ', $values) . ']';
|
168 |
+
$spacer = ', ';
|
169 |
+
}
|
170 |
+
throw new Mage_Core_Exception(Mage::helper('sales')->__('Status "%s" cannot be unassigned. It is in used in %d payment method configuration(s): %s',
|
171 |
+
$statusModel->getLabel(), $used, $methods));
|
172 |
+
}
|
173 |
+
}
|
174 |
+
}
|
175 |
}
|
app/code/core/Mage/Payment/etc/config.xml
CHANGED
@@ -115,6 +115,14 @@
|
|
115 |
</payment_before_save>
|
116 |
</observers>
|
117 |
</sales_order_payment_save_before>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
</events>
|
119 |
</global>
|
120 |
<frontend>
|
@@ -128,14 +136,14 @@
|
|
128 |
</modules>
|
129 |
</translate>
|
130 |
<events>
|
131 |
-
<
|
132 |
<observers>
|
133 |
<payment_recurring_profile_prepare_options>
|
134 |
<class>payment/observer</class>
|
135 |
<method>prepareProductRecurringProfileOptions</method>
|
136 |
</payment_recurring_profile_prepare_options>
|
137 |
</observers>
|
138 |
-
</
|
139 |
</events>
|
140 |
<layout>
|
141 |
<updates>
|
115 |
</payment_before_save>
|
116 |
</observers>
|
117 |
</sales_order_payment_save_before>
|
118 |
+
<sales_order_status_unassign_before>
|
119 |
+
<observers>
|
120 |
+
<payment_order_status_unassign_before>
|
121 |
+
<class>payment/observer</class>
|
122 |
+
<method>beforeSalesOrderStatusUnassign</method>
|
123 |
+
</payment_order_status_unassign_before>
|
124 |
+
</observers>
|
125 |
+
</sales_order_status_unassign_before>
|
126 |
</events>
|
127 |
</global>
|
128 |
<frontend>
|
136 |
</modules>
|
137 |
</translate>
|
138 |
<events>
|
139 |
+
<catalog_product_type_prepare_full_options>
|
140 |
<observers>
|
141 |
<payment_recurring_profile_prepare_options>
|
142 |
<class>payment/observer</class>
|
143 |
<method>prepareProductRecurringProfileOptions</method>
|
144 |
</payment_recurring_profile_prepare_options>
|
145 |
</observers>
|
146 |
+
</catalog_product_type_prepare_full_options>
|
147 |
</events>
|
148 |
<layout>
|
149 |
<updates>
|
app/code/core/Mage/Paypal/Model/Api/Nvp.php
CHANGED
@@ -489,7 +489,7 @@ class Mage_Paypal_Model_Api_Nvp extends Mage_Paypal_Model_Api_Abstract
|
|
489 |
* @var array
|
490 |
*/
|
491 |
protected $_doReferenceTransactionRequest = array('REFERENCEID', 'PAYMENTACTION', 'AMT', 'ITEMAMT', 'SHIPPINGAMT',
|
492 |
-
'TAXAMT', 'INVNUM', 'NOTIFYURL'
|
493 |
);
|
494 |
|
495 |
protected $_doReferenceTransactionResponse = array('BILLINGAGREEMENTID', 'TRANSACTIONID');
|
@@ -542,6 +542,13 @@ class Mage_Paypal_Model_Api_Nvp extends Mage_Paypal_Model_Api_Abstract
|
|
542 |
*/
|
543 |
protected $_rawResponseNeeded = false;
|
544 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
545 |
/**
|
546 |
* API endpoint getter
|
547 |
*
|
@@ -952,7 +959,13 @@ class Mage_Paypal_Model_Api_Nvp extends Mage_Paypal_Model_Api_Abstract
|
|
952 |
$config['ssl_cert'] = $this->getApiCertificate();
|
953 |
}
|
954 |
$http->setConfig($config);
|
955 |
-
$http->write(
|
|
|
|
|
|
|
|
|
|
|
|
|
956 |
$response = $http->read();
|
957 |
} catch (Exception $e) {
|
958 |
$debugData['http_error'] = array('error' => $e->getMessage(), 'code' => $e->getCode());
|
@@ -966,6 +979,7 @@ class Mage_Paypal_Model_Api_Nvp extends Mage_Paypal_Model_Api_Abstract
|
|
966 |
|
967 |
$debugData['response'] = $response;
|
968 |
$this->_debug($debugData);
|
|
|
969 |
|
970 |
// handle transport error
|
971 |
if ($http->getErrno()) {
|
@@ -1462,4 +1476,31 @@ class Mage_Paypal_Model_Api_Nvp extends Mage_Paypal_Model_Api_Abstract
|
|
1462 |
}
|
1463 |
}
|
1464 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1465 |
}
|
489 |
* @var array
|
490 |
*/
|
491 |
protected $_doReferenceTransactionRequest = array('REFERENCEID', 'PAYMENTACTION', 'AMT', 'ITEMAMT', 'SHIPPINGAMT',
|
492 |
+
'TAXAMT', 'INVNUM', 'NOTIFYURL', 'CURRENCYCODE',
|
493 |
);
|
494 |
|
495 |
protected $_doReferenceTransactionResponse = array('BILLINGAGREEMENTID', 'TRANSACTIONID');
|
542 |
*/
|
543 |
protected $_rawResponseNeeded = false;
|
544 |
|
545 |
+
/**
|
546 |
+
* API call HTTP headers
|
547 |
+
*
|
548 |
+
* @var array
|
549 |
+
*/
|
550 |
+
protected $_headers = array();
|
551 |
+
|
552 |
/**
|
553 |
* API endpoint getter
|
554 |
*
|
959 |
$config['ssl_cert'] = $this->getApiCertificate();
|
960 |
}
|
961 |
$http->setConfig($config);
|
962 |
+
$http->write(
|
963 |
+
Zend_Http_Client::POST,
|
964 |
+
$this->getApiEndpoint(),
|
965 |
+
'1.1',
|
966 |
+
$this->_headers,
|
967 |
+
$this->_buildQuery($request)
|
968 |
+
);
|
969 |
$response = $http->read();
|
970 |
} catch (Exception $e) {
|
971 |
$debugData['http_error'] = array('error' => $e->getMessage(), 'code' => $e->getCode());
|
979 |
|
980 |
$debugData['response'] = $response;
|
981 |
$this->_debug($debugData);
|
982 |
+
$response = $this->_postProcessResponse($response);
|
983 |
|
984 |
// handle transport error
|
985 |
if ($http->getErrno()) {
|
1476 |
}
|
1477 |
}
|
1478 |
}
|
1479 |
+
|
1480 |
+
/**
|
1481 |
+
* Additional response processing.
|
1482 |
+
* Hack to cut off length from API type response params.
|
1483 |
+
*
|
1484 |
+
* @param array $response
|
1485 |
+
* @return array
|
1486 |
+
*/
|
1487 |
+
protected function _postProcessResponse($response)
|
1488 |
+
{
|
1489 |
+
foreach ($response as $key => $value) {
|
1490 |
+
$pos = strpos($key, '[');
|
1491 |
+
|
1492 |
+
if ($pos === false) {
|
1493 |
+
continue;
|
1494 |
+
}
|
1495 |
+
|
1496 |
+
unset($response[$key]);
|
1497 |
+
|
1498 |
+
if ($pos !== 0) {
|
1499 |
+
$modifiedKey = substr($key, 0, $pos);
|
1500 |
+
$response[$modifiedKey] = $value;
|
1501 |
+
}
|
1502 |
+
}
|
1503 |
+
|
1504 |
+
return $response;
|
1505 |
+
}
|
1506 |
}
|
app/code/core/Mage/Paypal/Model/Cart.php
CHANGED
@@ -505,4 +505,19 @@ class Mage_Paypal_Model_Cart
|
|
505 |
$this->_totals[self::TOTAL_TAX] += (float)$salesEntity->getBaseHiddenTaxAmount();
|
506 |
$this->_totals[self::TOTAL_TAX] += (float)$salesEntity->getBaseShippingHiddenTaxAmount();
|
507 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
508 |
}
|
505 |
$this->_totals[self::TOTAL_TAX] += (float)$salesEntity->getBaseHiddenTaxAmount();
|
506 |
$this->_totals[self::TOTAL_TAX] += (float)$salesEntity->getBaseShippingHiddenTaxAmount();
|
507 |
}
|
508 |
+
|
509 |
+
/**
|
510 |
+
* Check whether any item has negative amount
|
511 |
+
*
|
512 |
+
* @return bool
|
513 |
+
*/
|
514 |
+
public function hasNegativeItemAmount()
|
515 |
+
{
|
516 |
+
foreach ($this->_items as $item) {
|
517 |
+
if ($item->getAmount() < 0) {
|
518 |
+
return true;
|
519 |
+
}
|
520 |
+
}
|
521 |
+
return false;
|
522 |
+
}
|
523 |
}
|
app/code/core/Mage/Paypal/Model/Method/Agreement.php
CHANGED
@@ -300,13 +300,15 @@ class Mage_Paypal_Model_Method_Agreement extends Mage_Sales_Model_Payment_Method
|
|
300 |
)
|
301 |
);
|
302 |
|
|
|
303 |
$api = $this->_pro->getApi()
|
304 |
->setReferenceId($billingAgreement->getReferenceId())
|
305 |
-
->setPaymentAction($
|
306 |
->setAmount($amount)
|
|
|
307 |
->setNotifyUrl(Mage::getUrl('paypal/ipn/'))
|
308 |
->setPaypalCart(Mage::getModel('paypal/cart', array($order)))
|
309 |
-
->setIsLineItemsEnabled($
|
310 |
->setInvNum($order->getIncrementId())
|
311 |
;
|
312 |
|
300 |
)
|
301 |
);
|
302 |
|
303 |
+
$proConfig = $this->_pro->getConfig();
|
304 |
$api = $this->_pro->getApi()
|
305 |
->setReferenceId($billingAgreement->getReferenceId())
|
306 |
+
->setPaymentAction($proConfig->paymentAction)
|
307 |
->setAmount($amount)
|
308 |
+
->setCurrencyCode($payment->getOrder()->getBaseCurrencyCode())
|
309 |
->setNotifyUrl(Mage::getUrl('paypal/ipn/'))
|
310 |
->setPaypalCart(Mage::getModel('paypal/cart', array($order)))
|
311 |
+
->setIsLineItemsEnabled($proConfig->lineItemsEnabled)
|
312 |
->setInvNum($order->getIncrementId())
|
313 |
;
|
314 |
|
app/code/core/Mage/Paypal/controllers/IpnController.php
CHANGED
@@ -43,6 +43,7 @@ class Mage_Paypal_IpnController extends Mage_Core_Controller_Front_Action
|
|
43 |
Mage::getModel('paypal/ipn')->processIpnRequest($data, new Varien_Http_Adapter_Curl());
|
44 |
} catch (Exception $e) {
|
45 |
Mage::logException($e);
|
|
|
46 |
}
|
47 |
}
|
48 |
}
|
43 |
Mage::getModel('paypal/ipn')->processIpnRequest($data, new Varien_Http_Adapter_Curl());
|
44 |
} catch (Exception $e) {
|
45 |
Mage::logException($e);
|
46 |
+
$this->getResponse()->setHttpResponseCode(500);
|
47 |
}
|
48 |
}
|
49 |
}
|
app/code/core/Mage/{GoogleCheckout/Model/Resource/Api/Debug/Collection.php → PaypalUk/Model/Api/Express/Nvp.php}
RENAMED
@@ -19,27 +19,28 @@
|
|
19 |
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
*
|
21 |
* @category Mage
|
22 |
-
* @package
|
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 |
-
*
|
30 |
-
*
|
31 |
-
* @category Mage
|
32 |
-
* @package Mage_GoogleCheckout
|
33 |
-
* @author Magento Core Team <core@magentocommerce.com>
|
34 |
*/
|
35 |
-
class
|
36 |
{
|
37 |
/**
|
38 |
-
*
|
39 |
-
*
|
40 |
*/
|
41 |
-
protected function
|
42 |
{
|
43 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
}
|
45 |
}
|
19 |
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
*
|
21 |
* @category Mage
|
22 |
+
* @package Mage_PaypalUk
|
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 |
+
* Payflow Express NVP API wrappers model
|
|
|
|
|
|
|
|
|
29 |
*/
|
30 |
+
class Mage_PaypalUk_Model_Api_Express_Nvp extends Mage_PaypalUk_Model_Api_Nvp
|
31 |
{
|
32 |
/**
|
33 |
+
* Set specific data when negative line item case
|
|
|
34 |
*/
|
35 |
+
protected function _setSpecificForNegativeLineItems()
|
36 |
{
|
37 |
+
$paypalNvp = new Mage_Paypal_Model_Api_Nvp();
|
38 |
+
$this->_setExpressCheckoutResponse = $paypalNvp->_setExpressCheckoutResponse;
|
39 |
+
$index = array_search('PPREF', $this->_doExpressCheckoutPaymentResponse);
|
40 |
+
if (false !== $index) {
|
41 |
+
unset($this->_doExpressCheckoutPaymentResponse[$index]);
|
42 |
+
}
|
43 |
+
$this->_doExpressCheckoutPaymentResponse[] = 'PAYMENTINFO_0_TRANSACTIONID';
|
44 |
+
$this->_requiredResponseParams[self::DO_EXPRESS_CHECKOUT_PAYMENT][] = 'PAYMENTINFO_0_TRANSACTIONID';
|
45 |
}
|
46 |
}
|
app/code/core/Mage/PaypalUk/Model/Api/Nvp.php
CHANGED
@@ -110,6 +110,10 @@ class Mage_PaypalUk_Model_Api_Nvp extends Mage_Paypal_Model_Api_Nvp
|
|
110 |
|
111 |
// transaction info
|
112 |
'PPREF' => 'paypal_transaction_id', //We need to store paypal trx id for correct IPN working
|
|
|
|
|
|
|
|
|
113 |
'PNREF' => 'transaction_id',
|
114 |
'ORIGID' => 'authorization_id',
|
115 |
'CAPTURECOMPLETE' => 'complete_type',
|
@@ -119,6 +123,7 @@ class Mage_PaypalUk_Model_Api_Nvp extends Mage_Paypal_Model_Api_Nvp
|
|
119 |
|
120 |
// payment/billing info
|
121 |
'CURRENCY' => 'currency_code',
|
|
|
122 |
'PENDINGREASON' => 'pending_reason',
|
123 |
'PAYERID' => 'payer_id',
|
124 |
'PAYERSTATUS' => 'payer_status',
|
@@ -328,7 +333,7 @@ class Mage_PaypalUk_Model_Api_Nvp extends Mage_Paypal_Model_Api_Nvp
|
|
328 |
* @var array
|
329 |
*/
|
330 |
protected $_requiredResponseParams = array(
|
331 |
-
self::DO_DIRECT_PAYMENT => array('RESULT', 'PNREF'
|
332 |
);
|
333 |
|
334 |
/**
|
@@ -586,4 +591,51 @@ class Mage_PaypalUk_Model_Api_Nvp extends Mage_Paypal_Model_Api_Nvp
|
|
586 |
$request['SHIPTOSTATE'] = 'PR';
|
587 |
}
|
588 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
589 |
}
|
110 |
|
111 |
// transaction info
|
112 |
'PPREF' => 'paypal_transaction_id', //We need to store paypal trx id for correct IPN working
|
113 |
+
'PAYMENTINFO_0_TRANSACTIONID' => 'paypal_transaction_id',
|
114 |
+
'TRANSACTIONID' => 'paypal_transaction_id',
|
115 |
+
'REFUNDTRANSACTIONID' => 'paypal_transaction_id',
|
116 |
+
|
117 |
'PNREF' => 'transaction_id',
|
118 |
'ORIGID' => 'authorization_id',
|
119 |
'CAPTURECOMPLETE' => 'complete_type',
|
123 |
|
124 |
// payment/billing info
|
125 |
'CURRENCY' => 'currency_code',
|
126 |
+
'PAYMENTSTATUS' => 'payment_status',
|
127 |
'PENDINGREASON' => 'pending_reason',
|
128 |
'PAYERID' => 'payer_id',
|
129 |
'PAYERSTATUS' => 'payer_status',
|
333 |
* @var array
|
334 |
*/
|
335 |
protected $_requiredResponseParams = array(
|
336 |
+
self::DO_DIRECT_PAYMENT => array('RESULT', 'PNREF')
|
337 |
);
|
338 |
|
339 |
/**
|
591 |
$request['SHIPTOSTATE'] = 'PR';
|
592 |
}
|
593 |
}
|
594 |
+
|
595 |
+
/**
|
596 |
+
* Checking negative line items
|
597 |
+
*
|
598 |
+
* @param array $request
|
599 |
+
* @param int $i
|
600 |
+
* @return null|true
|
601 |
+
*/
|
602 |
+
protected function _exportLineItems(array &$request, $i = 0)
|
603 |
+
{
|
604 |
+
$requestBefore = $request;
|
605 |
+
$result = parent::_exportLineItems($request, $i);
|
606 |
+
if ($this->getIsLineItemsEnabled() && $this->_cart->hasNegativeItemAmount()) {
|
607 |
+
$this->_lineItemTotalExportMap = array(
|
608 |
+
Mage_Paypal_Model_Cart::TOTAL_TAX => 'TAXAMT',
|
609 |
+
Mage_Paypal_Model_Cart::TOTAL_SHIPPING => 'FREIGHTAMT',
|
610 |
+
'amount' => 'PAYMENTREQUEST_0_ITEMAMT',
|
611 |
+
);
|
612 |
+
$this->_lineItemExportItemsFormat = array(
|
613 |
+
'name' => 'L_PAYMENTREQUEST_0_NAME%d',
|
614 |
+
'qty' => 'L_PAYMENTREQUEST_0_QTY%d',
|
615 |
+
'amount' => 'L_PAYMENTREQUEST_0_AMT%d',
|
616 |
+
);
|
617 |
+
$request = $requestBefore;
|
618 |
+
$result = parent::_exportLineItems($request, $i);
|
619 |
+
$paypalNvp = new Mage_Paypal_Model_Api_Nvp();
|
620 |
+
$this->_doCaptureResponse = $paypalNvp->_doCaptureResponse;
|
621 |
+
$this->_refundTransactionResponse = $paypalNvp->_refundTransactionResponse;
|
622 |
+
$this->_getTransactionDetailsResponse = $paypalNvp->_getTransactionDetailsResponse;
|
623 |
+
$this->_paymentInformationResponse = $paypalNvp->_paymentInformationResponse;
|
624 |
+
$this->_headers[] = 'PAYPAL-NVP: Y';
|
625 |
+
$this->_setSpecificForNegativeLineItems();
|
626 |
+
}
|
627 |
+
return $result;
|
628 |
+
}
|
629 |
+
|
630 |
+
/**
|
631 |
+
* Set specific data when negative line item case
|
632 |
+
*/
|
633 |
+
protected function _setSpecificForNegativeLineItems()
|
634 |
+
{
|
635 |
+
$index = array_search('PPREF', $this->_doDirectPaymentResponse);
|
636 |
+
if (false !== $index) {
|
637 |
+
unset($this->_doDirectPaymentResponse[$index]);
|
638 |
+
}
|
639 |
+
$this->_doDirectPaymentResponse[] = 'TRANSACTIONID';
|
640 |
+
}
|
641 |
}
|
app/code/core/Mage/PaypalUk/Model/Express.php
CHANGED
@@ -39,7 +39,7 @@ class Mage_PaypalUk_Model_Express extends Mage_Paypal_Model_Express
|
|
39 |
*
|
40 |
* @var $_proType string
|
41 |
*/
|
42 |
-
protected $_proType = 'paypaluk/
|
43 |
|
44 |
/**
|
45 |
* Express Checkout payment method instance
|
@@ -60,7 +60,8 @@ class Mage_PaypalUk_Model_Express extends Mage_Paypal_Model_Express
|
|
60 |
return false;
|
61 |
}
|
62 |
if (!$this->_ecInstance) {
|
63 |
-
$this->_ecInstance = Mage::helper('payment')
|
|
|
64 |
}
|
65 |
if ($quote && $this->_ecInstance) {
|
66 |
$this->_ecInstance->setStore($quote->getStoreId());
|
39 |
*
|
40 |
* @var $_proType string
|
41 |
*/
|
42 |
+
protected $_proType = 'paypaluk/express_pro';
|
43 |
|
44 |
/**
|
45 |
* Express Checkout payment method instance
|
60 |
return false;
|
61 |
}
|
62 |
if (!$this->_ecInstance) {
|
63 |
+
$this->_ecInstance = Mage::helper('payment')
|
64 |
+
->getMethodInstance(Mage_Paypal_Model_Config::METHOD_WPP_EXPRESS);
|
65 |
}
|
66 |
if ($quote && $this->_ecInstance) {
|
67 |
$this->_ecInstance->setStore($quote->getStoreId());
|
app/code/core/Mage/PaypalUk/Model/Express/Checkout.php
CHANGED
@@ -35,7 +35,7 @@ class Mage_PaypalUk_Model_Express_Checkout extends Mage_Paypal_Model_Express_Che
|
|
35 |
*
|
36 |
* @var string
|
37 |
*/
|
38 |
-
protected $_apiType = 'paypaluk/
|
39 |
|
40 |
/**
|
41 |
* Payment method tpye
|
35 |
*
|
36 |
* @var string
|
37 |
*/
|
38 |
+
protected $_apiType = 'paypaluk/api_express_nvp';
|
39 |
|
40 |
/**
|
41 |
* Payment method tpye
|
app/code/core/Mage/{GoogleCheckout/Model/Api/Xml/Calculate.php → PaypalUk/Model/Express/Pro.php}
RENAMED
@@ -19,18 +19,20 @@
|
|
19 |
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
*
|
21 |
* @category Mage
|
22 |
-
* @package
|
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 |
/**
|
30 |
-
*
|
|
|
|
|
31 |
*/
|
32 |
-
protected
|
33 |
-
{
|
34 |
-
return null;
|
35 |
-
}
|
36 |
}
|
19 |
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
*
|
21 |
* @category Mage
|
22 |
+
* @package Mage_PaypalUk
|
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 |
+
* PayPal Express (Payflow Edition) implementation for payment method instances
|
29 |
+
*/
|
30 |
+
class Mage_PaypalUk_Model_Express_Pro extends Mage_PaypalUk_Model_Pro
|
31 |
{
|
32 |
/**
|
33 |
+
* Api model type
|
34 |
+
*
|
35 |
+
* @var string
|
36 |
*/
|
37 |
+
protected $_apiType = 'paypaluk/api_express_nvp';
|
|
|
|
|
|
|
38 |
}
|
app/code/core/Mage/Persistent/Model/Observer.php
CHANGED
@@ -331,7 +331,7 @@ class Mage_Persistent_Model_Observer
|
|
331 |
}
|
332 |
|
333 |
/**
|
334 |
-
* Prevent express checkout with
|
335 |
*
|
336 |
* @param Varien_Event_Observer $observer
|
337 |
*/
|
@@ -348,9 +348,7 @@ class Mage_Persistent_Model_Observer
|
|
348 |
Mage::helper('persistent')->__('To proceed to Checkout, please log in using your email address.')
|
349 |
);
|
350 |
$controllerAction->redirectLogin();
|
351 |
-
if ($controllerAction instanceof
|
352 |
-
|| $controllerAction instanceof Mage_Paypal_Controller_Express_Abstract
|
353 |
-
) {
|
354 |
Mage::getSingleton('customer/session')
|
355 |
->setBeforeAuthUrl(Mage::getUrl('persistent/index/expressCheckout'));
|
356 |
}
|
331 |
}
|
332 |
|
333 |
/**
|
334 |
+
* Prevent express checkout with PayPal Express checkout
|
335 |
*
|
336 |
* @param Varien_Event_Observer $observer
|
337 |
*/
|
348 |
Mage::helper('persistent')->__('To proceed to Checkout, please log in using your email address.')
|
349 |
);
|
350 |
$controllerAction->redirectLogin();
|
351 |
+
if ($controllerAction instanceof Mage_Paypal_Controller_Express_Abstract) {
|
|
|
|
|
352 |
Mage::getSingleton('customer/session')
|
353 |
->setBeforeAuthUrl(Mage::getUrl('persistent/index/expressCheckout'));
|
354 |
}
|
app/code/core/Mage/Persistent/controllers/IndexController.php
CHANGED
@@ -116,7 +116,7 @@ class Mage_Persistent_IndexController extends Mage_Core_Controller_Front_Action
|
|
116 |
|
117 |
/**
|
118 |
* Add appropriate session message and redirect to shopping cart
|
119 |
-
* used for
|
120 |
*/
|
121 |
public function expressCheckoutAction()
|
122 |
{
|
116 |
|
117 |
/**
|
118 |
* Add appropriate session message and redirect to shopping cart
|
119 |
+
* used for paypal express checkout
|
120 |
*/
|
121 |
public function expressCheckoutAction()
|
122 |
{
|
app/code/core/Mage/Persistent/etc/config.xml
CHANGED
@@ -239,14 +239,6 @@
|
|
239 |
</persistent>
|
240 |
</observers>
|
241 |
</controller_action_predispatch_paypaluk_express_start>
|
242 |
-
<controller_action_predispatch_googlecheckout_redirect_checkout>
|
243 |
-
<observers>
|
244 |
-
<persistent>
|
245 |
-
<class>persistent/observer</class>
|
246 |
-
<method>preventExpressCheckout</method>
|
247 |
-
</persistent>
|
248 |
-
</observers>
|
249 |
-
</controller_action_predispatch_googlecheckout_redirect_checkout>
|
250 |
<controller_action_predispatch_checkout_multishipping_index>
|
251 |
<observers>
|
252 |
<persistent>
|
239 |
</persistent>
|
240 |
</observers>
|
241 |
</controller_action_predispatch_paypaluk_express_start>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
<controller_action_predispatch_checkout_multishipping_index>
|
243 |
<observers>
|
244 |
<persistent>
|
app/code/core/Mage/ProductAlert/Block/Email/Abstract.php
CHANGED
@@ -135,4 +135,19 @@ abstract class Mage_ProductAlert_Block_Email_Abstract extends Mage_Core_Block_Te
|
|
135 |
'_store_to_url' => true
|
136 |
);
|
137 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
138 |
}
|
135 |
'_store_to_url' => true
|
136 |
);
|
137 |
}
|
138 |
+
|
139 |
+
/**
|
140 |
+
* Get filtered product short description to be inserted into mail
|
141 |
+
*
|
142 |
+
* @param Mage_Catalog_Model_Product $product
|
143 |
+
* @return string|null
|
144 |
+
*/
|
145 |
+
public function _getFilteredProductShortDescription(Mage_Catalog_Model_Product $product)
|
146 |
+
{
|
147 |
+
$shortDescription = $product->getShortDescription();
|
148 |
+
if ($shortDescription) {
|
149 |
+
$shortDescription = Mage::getSingleton('core/input_filter_maliciousCode')->filter($shortDescription);
|
150 |
+
}
|
151 |
+
return $shortDescription;
|
152 |
+
}
|
153 |
}
|
app/code/core/Mage/Reports/Model/Resource/Report/Abstract.php
CHANGED
@@ -408,10 +408,9 @@ abstract class Mage_Reports_Model_Resource_Report_Abstract extends Mage_Core_Mod
|
|
408 |
$dtz = new DateTimeZone($timezone);
|
409 |
$transitions = $dtz->getTransitions();
|
410 |
$dateTimeObject = new Zend_Date('c');
|
411 |
-
|
412 |
for ($i = count($transitions) - 1; $i >= 0; $i--) {
|
413 |
$tr = $transitions[$i];
|
414 |
-
if ($tr
|
415 |
continue;
|
416 |
}
|
417 |
|
@@ -426,12 +425,43 @@ abstract class Mage_Reports_Model_Resource_Report_Abstract extends Mage_Core_Mod
|
|
426 |
$nextPeriod = $tr['time'];
|
427 |
}
|
428 |
} catch (Exception $e) {
|
429 |
-
|
430 |
}
|
431 |
|
432 |
return $tzTransitions;
|
433 |
}
|
434 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
435 |
|
436 |
/**
|
437 |
* Retrieve store timezone offset from UTC in the form acceptable by SQL's CONVERT_TZ()
|
408 |
$dtz = new DateTimeZone($timezone);
|
409 |
$transitions = $dtz->getTransitions();
|
410 |
$dateTimeObject = new Zend_Date('c');
|
|
|
411 |
for ($i = count($transitions) - 1; $i >= 0; $i--) {
|
412 |
$tr = $transitions[$i];
|
413 |
+
if (!$this->_isValidTransition($tr, $to)) {
|
414 |
continue;
|
415 |
}
|
416 |
|
425 |
$nextPeriod = $tr['time'];
|
426 |
}
|
427 |
} catch (Exception $e) {
|
428 |
+
$this->_logException($e);
|
429 |
}
|
430 |
|
431 |
return $tzTransitions;
|
432 |
}
|
433 |
|
434 |
+
/**
|
435 |
+
* Logs the exceptions
|
436 |
+
*
|
437 |
+
* @param Exception $exception
|
438 |
+
*/
|
439 |
+
protected function _logException($exception)
|
440 |
+
{
|
441 |
+
Mage::logException($exception);
|
442 |
+
}
|
443 |
+
|
444 |
+
/**
|
445 |
+
* Verifies the transition and the "to" timestamp
|
446 |
+
*
|
447 |
+
* @param array $transition
|
448 |
+
* @param int|string $to
|
449 |
+
* @return bool
|
450 |
+
*/
|
451 |
+
protected function _isValidTransition($transition, $to)
|
452 |
+
{
|
453 |
+
$result = true;
|
454 |
+
$timeStamp = $transition['ts'];
|
455 |
+
$transitionYear = date('Y', $timeStamp);
|
456 |
+
|
457 |
+
if ($transitionYear > 10000 || $transitionYear < -10000) {
|
458 |
+
$result = false;
|
459 |
+
} else if ($timeStamp > $to) {
|
460 |
+
$result = false;
|
461 |
+
}
|
462 |
+
|
463 |
+
return $result;
|
464 |
+
}
|
465 |
|
466 |
/**
|
467 |
* Retrieve store timezone offset from UTC in the form acceptable by SQL's CONVERT_TZ()
|
app/code/core/Mage/Review/controllers/ProductController.php
CHANGED
@@ -155,6 +155,12 @@ class Mage_Review_ProductController extends Mage_Core_Controller_Front_Action
|
|
155 |
*/
|
156 |
public function postAction()
|
157 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
158 |
if ($data = Mage::getSingleton('review/session')->getFormData(true)) {
|
159 |
$rating = array();
|
160 |
if (isset($data['ratings']) && is_array($data['ratings'])) {
|
155 |
*/
|
156 |
public function postAction()
|
157 |
{
|
158 |
+
if (!$this->_validateFormKey()) {
|
159 |
+
// returns to the product item page
|
160 |
+
$this->_redirectReferer();
|
161 |
+
return;
|
162 |
+
}
|
163 |
+
|
164 |
if ($data = Mage::getSingleton('review/session')->getFormData(true)) {
|
165 |
$rating = array();
|
166 |
if (isset($data['ratings']) && is_array($data['ratings'])) {
|
app/code/core/Mage/Sales/Block/Guest/Links.php
CHANGED
@@ -40,11 +40,11 @@ class Mage_Sales_Block_Guest_Links extends Mage_Page_Block_Template_Links_Block
|
|
40 |
public function __construct()
|
41 |
{
|
42 |
if (!Mage::getSingleton('customer/session')->isLoggedIn()) {
|
|
|
|
|
43 |
$this->_label = $this->__('Orders and Returns');
|
44 |
$this->_title = $this->__('Orders and Returns');
|
45 |
$this->_url = $this->getUrl('sales/guest/form');
|
46 |
-
|
47 |
-
parent::__construct();
|
48 |
}
|
49 |
}
|
50 |
}
|
40 |
public function __construct()
|
41 |
{
|
42 |
if (!Mage::getSingleton('customer/session')->isLoggedIn()) {
|
43 |
+
parent::__construct();
|
44 |
+
|
45 |
$this->_label = $this->__('Orders and Returns');
|
46 |
$this->_title = $this->__('Orders and Returns');
|
47 |
$this->_url = $this->getUrl('sales/guest/form');
|
|
|
|
|
48 |
}
|
49 |
}
|
50 |
}
|
app/code/core/Mage/Sales/Helper/Guest.php
CHANGED
@@ -135,16 +135,16 @@ class Mage_Sales_Helper_Guest extends Mage_Core_Helper_Data
|
|
135 |
$breadcrumbs->addCrumb(
|
136 |
'home',
|
137 |
array(
|
138 |
-
'label' =>
|
139 |
-
'title' =>
|
140 |
'link' => Mage::getBaseUrl()
|
141 |
)
|
142 |
);
|
143 |
$breadcrumbs->addCrumb(
|
144 |
'cms_page',
|
145 |
array(
|
146 |
-
'label' => 'Order Information',
|
147 |
-
'title' => 'Order Information'
|
148 |
)
|
149 |
);
|
150 |
}
|
135 |
$breadcrumbs->addCrumb(
|
136 |
'home',
|
137 |
array(
|
138 |
+
'label' => $this->__('Home'),
|
139 |
+
'title' => $this->__('Go to Home Page'),
|
140 |
'link' => Mage::getBaseUrl()
|
141 |
)
|
142 |
);
|
143 |
$breadcrumbs->addCrumb(
|
144 |
'cms_page',
|
145 |
array(
|
146 |
+
'label' => $this->__('Order Information'),
|
147 |
+
'title' => $this->__('Order Information')
|
148 |
)
|
149 |
);
|
150 |
}
|
app/code/core/Mage/Sales/Model/Order.php
CHANGED
@@ -347,15 +347,16 @@ class Mage_Sales_Model_Order extends Mage_Sales_Model_Abstract
|
|
347 |
/**
|
348 |
* Order flags
|
349 |
*/
|
350 |
-
const ACTION_FLAG_CANCEL
|
351 |
-
const ACTION_FLAG_HOLD
|
352 |
-
const ACTION_FLAG_UNHOLD
|
353 |
-
const ACTION_FLAG_EDIT
|
354 |
-
const ACTION_FLAG_CREDITMEMO= 'creditmemo';
|
355 |
-
const ACTION_FLAG_INVOICE
|
356 |
-
const ACTION_FLAG_REORDER
|
357 |
-
const ACTION_FLAG_SHIP
|
358 |
-
const ACTION_FLAG_COMMENT
|
|
|
359 |
|
360 |
/**
|
361 |
* Report date types
|
@@ -789,6 +790,10 @@ class Mage_Sales_Model_Order extends Mage_Sales_Model_Abstract
|
|
789 |
return false;
|
790 |
}
|
791 |
|
|
|
|
|
|
|
|
|
792 |
$products = array();
|
793 |
foreach ($this->getItemsCollection() as $item) {
|
794 |
$products[] = $item->getProductId();
|
@@ -816,18 +821,14 @@ class Mage_Sales_Model_Order extends Mage_Sales_Model_Abstract
|
|
816 |
*/
|
817 |
|
818 |
foreach ($products as $productId) {
|
819 |
-
|
820 |
-
|
821 |
-
|
|
|
822 |
if (!$product->getId() || (!$ignoreSalable && !$product->isSalable())) {
|
823 |
return false;
|
824 |
}
|
825 |
}
|
826 |
-
}
|
827 |
-
|
828 |
-
if ($this->getActionFlag(self::ACTION_FLAG_REORDER) === false) {
|
829 |
-
return false;
|
830 |
-
}
|
831 |
|
832 |
return true;
|
833 |
}
|
@@ -1256,6 +1257,7 @@ class Mage_Sales_Model_Order extends Mage_Sales_Model_Abstract
|
|
1256 |
* Send email with order data
|
1257 |
*
|
1258 |
* @return Mage_Sales_Model_Order
|
|
|
1259 |
*/
|
1260 |
public function sendNewOrderEmail()
|
1261 |
{
|
@@ -1264,6 +1266,13 @@ class Mage_Sales_Model_Order extends Mage_Sales_Model_Abstract
|
|
1264 |
if (!Mage::helper('sales')->canSendNewOrderEmail($storeId)) {
|
1265 |
return $this;
|
1266 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1267 |
// Get the destination email addresses to send copies to
|
1268 |
$copyTo = $this->_getEmails(self::XML_PATH_EMAIL_COPY_TO);
|
1269 |
$copyMethod = Mage::getStoreConfig(self::XML_PATH_EMAIL_COPY_METHOD, $storeId);
|
347 |
/**
|
348 |
* Order flags
|
349 |
*/
|
350 |
+
const ACTION_FLAG_CANCEL = 'cancel';
|
351 |
+
const ACTION_FLAG_HOLD = 'hold';
|
352 |
+
const ACTION_FLAG_UNHOLD = 'unhold';
|
353 |
+
const ACTION_FLAG_EDIT = 'edit';
|
354 |
+
const ACTION_FLAG_CREDITMEMO = 'creditmemo';
|
355 |
+
const ACTION_FLAG_INVOICE = 'invoice';
|
356 |
+
const ACTION_FLAG_REORDER = 'reorder';
|
357 |
+
const ACTION_FLAG_SHIP = 'ship';
|
358 |
+
const ACTION_FLAG_COMMENT = 'comment';
|
359 |
+
const ACTION_FLAG_PRODUCTS_PERMISSION_DENIED= 'product_permission_denied';
|
360 |
|
361 |
/**
|
362 |
* Report date types
|
790 |
return false;
|
791 |
}
|
792 |
|
793 |
+
if ($this->getActionFlag(self::ACTION_FLAG_REORDER) === false) {
|
794 |
+
return false;
|
795 |
+
}
|
796 |
+
|
797 |
$products = array();
|
798 |
foreach ($this->getItemsCollection() as $item) {
|
799 |
$products[] = $item->getProductId();
|
821 |
*/
|
822 |
|
823 |
foreach ($products as $productId) {
|
824 |
+
$product = Mage::getModel('catalog/product')
|
825 |
+
->setStoreId($this->getStoreId())
|
826 |
+
->load($productId);
|
827 |
+
}
|
828 |
if (!$product->getId() || (!$ignoreSalable && !$product->isSalable())) {
|
829 |
return false;
|
830 |
}
|
831 |
}
|
|
|
|
|
|
|
|
|
|
|
832 |
|
833 |
return true;
|
834 |
}
|
1257 |
* Send email with order data
|
1258 |
*
|
1259 |
* @return Mage_Sales_Model_Order
|
1260 |
+
* @throws Exception
|
1261 |
*/
|
1262 |
public function sendNewOrderEmail()
|
1263 |
{
|
1266 |
if (!Mage::helper('sales')->canSendNewOrderEmail($storeId)) {
|
1267 |
return $this;
|
1268 |
}
|
1269 |
+
|
1270 |
+
$emailSentAttributeValue = $this->load($this->getId())->getData('email_sent');
|
1271 |
+
$this->setEmailSent((bool)$emailSentAttributeValue);
|
1272 |
+
if ($this->getEmailSent()) {
|
1273 |
+
return $this;
|
1274 |
+
}
|
1275 |
+
|
1276 |
// Get the destination email addresses to send copies to
|
1277 |
$copyTo = $this->_getEmails(self::XML_PATH_EMAIL_COPY_TO);
|
1278 |
$copyMethod = Mage::getStoreConfig(self::XML_PATH_EMAIL_COPY_METHOD, $storeId);
|
app/code/core/Mage/Sales/Model/Order/Config.php
CHANGED
@@ -40,8 +40,16 @@ class Mage_Sales_Model_Order_Config extends Mage_Core_Model_Config_Base
|
|
40 |
*/
|
41 |
protected $_stateStatuses;
|
42 |
|
|
|
|
|
|
|
|
|
|
|
43 |
private $_states;
|
44 |
|
|
|
|
|
|
|
45 |
public function __construct()
|
46 |
{
|
47 |
parent::__construct(Mage::getConfig()->getNode('global/sales/order'));
|
@@ -66,7 +74,8 @@ class Mage_Sales_Model_Order_Config extends Mage_Core_Model_Config_Base
|
|
66 |
public function getStateDefaultStatus($state)
|
67 |
{
|
68 |
$status = false;
|
69 |
-
|
|
|
70 |
$status = Mage::getModel('sales/order_status')
|
71 |
->loadDefaultByState($state);
|
72 |
$status = $status->getStatus();
|
@@ -95,7 +104,8 @@ class Mage_Sales_Model_Order_Config extends Mage_Core_Model_Config_Base
|
|
95 |
*/
|
96 |
public function getStateLabel($state)
|
97 |
{
|
98 |
-
|
|
|
99 |
$state = (string) $stateNode->label;
|
100 |
return Mage::helper('sales')->__($state);
|
101 |
}
|
@@ -155,7 +165,8 @@ class Mage_Sales_Model_Order_Config extends Mage_Core_Model_Config_Base
|
|
155 |
$state = array($state);
|
156 |
}
|
157 |
foreach ($state as $_state) {
|
158 |
-
|
|
|
159 |
$collection = Mage::getResourceModel('sales/order_status_collection')
|
160 |
->addStateFilter($_state)
|
161 |
->orderByLabel();
|
@@ -173,6 +184,23 @@ class Mage_Sales_Model_Order_Config extends Mage_Core_Model_Config_Base
|
|
173 |
return $statuses;
|
174 |
}
|
175 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
/**
|
177 |
* Retrieve states which are visible on front end
|
178 |
*
|
@@ -195,6 +223,9 @@ class Mage_Sales_Model_Order_Config extends Mage_Core_Model_Config_Base
|
|
195 |
return $this->_states['invisible'];
|
196 |
}
|
197 |
|
|
|
|
|
|
|
198 |
private function _getStates()
|
199 |
{
|
200 |
if (null === $this->_states) {
|
40 |
*/
|
41 |
protected $_stateStatuses;
|
42 |
|
43 |
+
/**
|
44 |
+
* States array
|
45 |
+
*
|
46 |
+
* @var array
|
47 |
+
*/
|
48 |
private $_states;
|
49 |
|
50 |
+
/**
|
51 |
+
* Constructor
|
52 |
+
*/
|
53 |
public function __construct()
|
54 |
{
|
55 |
parent::__construct(Mage::getConfig()->getNode('global/sales/order'));
|
74 |
public function getStateDefaultStatus($state)
|
75 |
{
|
76 |
$status = false;
|
77 |
+
$stateNode = $this->_getState($state);
|
78 |
+
if ($stateNode) {
|
79 |
$status = Mage::getModel('sales/order_status')
|
80 |
->loadDefaultByState($state);
|
81 |
$status = $status->getStatus();
|
104 |
*/
|
105 |
public function getStateLabel($state)
|
106 |
{
|
107 |
+
$stateNode = $this->_getState($state);
|
108 |
+
if ($stateNode) {
|
109 |
$state = (string) $stateNode->label;
|
110 |
return Mage::helper('sales')->__($state);
|
111 |
}
|
165 |
$state = array($state);
|
166 |
}
|
167 |
foreach ($state as $_state) {
|
168 |
+
$stateNode = $this->_getState($_state);
|
169 |
+
if ($stateNode) {
|
170 |
$collection = Mage::getResourceModel('sales/order_status_collection')
|
171 |
->addStateFilter($_state)
|
172 |
->orderByLabel();
|
184 |
return $statuses;
|
185 |
}
|
186 |
|
187 |
+
/**
|
188 |
+
* Retrieve state available for status
|
189 |
+
* Get all assigned states for specified status
|
190 |
+
*
|
191 |
+
* @param string $status
|
192 |
+
* @return array
|
193 |
+
*/
|
194 |
+
public function getStatusStates($status)
|
195 |
+
{
|
196 |
+
$states = array();
|
197 |
+
$collection = Mage::getResourceModel('sales/order_status_collection')->addStatusFilter($status);
|
198 |
+
foreach ($collection as $state) {
|
199 |
+
$states[] = $state;
|
200 |
+
}
|
201 |
+
return $states;
|
202 |
+
}
|
203 |
+
|
204 |
/**
|
205 |
* Retrieve states which are visible on front end
|
206 |
*
|
223 |
return $this->_states['invisible'];
|
224 |
}
|
225 |
|
226 |
+
/**
|
227 |
+
* If not yet initialized, loads the "_states" array object.
|
228 |
+
*/
|
229 |
private function _getStates()
|
230 |
{
|
231 |
if (null === $this->_states) {
|
app/code/core/Mage/Sales/Model/Order/Creditmemo.php
CHANGED
@@ -931,4 +931,19 @@ class Mage_Sales_Model_Order_Creditmemo extends Mage_Sales_Model_Abstract
|
|
931 |
{
|
932 |
return $this->getResourceCollection()->getFiltered($filter);
|
933 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
934 |
}
|
931 |
{
|
932 |
return $this->getResourceCollection()->getFiltered($filter);
|
933 |
}
|
934 |
+
|
935 |
+
/**
|
936 |
+
* Checking if the credit memo is last
|
937 |
+
*
|
938 |
+
* @return bool
|
939 |
+
*/
|
940 |
+
public function isLast()
|
941 |
+
{
|
942 |
+
foreach ($this->getAllItems() as $item) {
|
943 |
+
if (!$item->isLast()) {
|
944 |
+
return false;
|
945 |
+
}
|
946 |
+
}
|
947 |
+
return true;
|
948 |
+
}
|
949 |
}
|
app/code/core/Mage/Sales/Model/Order/Creditmemo/Total/Discount.php
CHANGED
@@ -74,11 +74,11 @@ class Mage_Sales_Model_Order_Creditmemo_Total_Discount extends Mage_Sales_Model_
|
|
74 |
);
|
75 |
}
|
76 |
|
|
|
|
|
|
|
77 |
$item->setDiscountAmount($discount);
|
78 |
$item->setBaseDiscountAmount($baseDiscount);
|
79 |
-
|
80 |
-
$totalDiscountAmount += $discount;
|
81 |
-
$baseTotalDiscountAmount+= $baseDiscount;
|
82 |
}
|
83 |
}
|
84 |
|
74 |
);
|
75 |
}
|
76 |
|
77 |
+
$totalDiscountAmount += $discount;
|
78 |
+
$baseTotalDiscountAmount += $baseDiscount;
|
79 |
+
|
80 |
$item->setDiscountAmount($discount);
|
81 |
$item->setBaseDiscountAmount($baseDiscount);
|
|
|
|
|
|
|
82 |
}
|
83 |
}
|
84 |
|
app/code/core/Mage/Sales/Model/Order/Creditmemo/Total/Subtotal.php
CHANGED
@@ -55,11 +55,12 @@ class Mage_Sales_Model_Order_Creditmemo_Total_Subtotal extends Mage_Sales_Model_
|
|
55 |
|
56 |
$creditmemo->setSubtotal($subtotal);
|
57 |
$creditmemo->setBaseSubtotal($baseSubtotal);
|
58 |
-
$creditmemo->setSubtotalInclTax($subtotalInclTax);
|
59 |
$creditmemo->setBaseSubtotalInclTax($baseSubtotalInclTax);
|
60 |
|
61 |
$creditmemo->setGrandTotal($creditmemo->getGrandTotal() + $subtotal);
|
62 |
$creditmemo->setBaseGrandTotal($creditmemo->getBaseGrandTotal() + $baseSubtotal);
|
|
|
63 |
return $this;
|
64 |
}
|
65 |
}
|
55 |
|
56 |
$creditmemo->setSubtotal($subtotal);
|
57 |
$creditmemo->setBaseSubtotal($baseSubtotal);
|
58 |
+
$creditmemo->setSubtotalInclTax($subtotalInclTax );
|
59 |
$creditmemo->setBaseSubtotalInclTax($baseSubtotalInclTax);
|
60 |
|
61 |
$creditmemo->setGrandTotal($creditmemo->getGrandTotal() + $subtotal);
|
62 |
$creditmemo->setBaseGrandTotal($creditmemo->getBaseGrandTotal() + $baseSubtotal);
|
63 |
+
|
64 |
return $this;
|
65 |
}
|
66 |
}
|
app/code/core/Mage/Sales/Model/Order/Creditmemo/Total/Tax.php
CHANGED
@@ -27,6 +27,12 @@
|
|
27 |
|
28 |
class Mage_Sales_Model_Order_Creditmemo_Total_Tax extends Mage_Sales_Model_Order_Creditmemo_Total_Abstract
|
29 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
public function collect(Mage_Sales_Model_Order_Creditmemo $creditmemo)
|
31 |
{
|
32 |
$shippingTaxAmount = 0;
|
@@ -35,6 +41,8 @@ class Mage_Sales_Model_Order_Creditmemo_Total_Tax extends Mage_Sales_Model_Order
|
|
35 |
$baseTotalTax = 0;
|
36 |
$totalHiddenTax = 0;
|
37 |
$baseTotalHiddenTax = 0;
|
|
|
|
|
38 |
|
39 |
$order = $creditmemo->getOrder();
|
40 |
|
@@ -77,7 +85,9 @@ class Mage_Sales_Model_Order_Creditmemo_Total_Tax extends Mage_Sales_Model_Order
|
|
77 |
}
|
78 |
}
|
79 |
|
80 |
-
|
|
|
|
|
81 |
//recalculate tax amounts in case if refund shipping value was changed
|
82 |
if ($order->getBaseShippingAmount() && $creditmemo->getBaseShippingAmount()) {
|
83 |
$taxFactor = $creditmemo->getBaseShippingAmount()/$order->getBaseShippingAmount();
|
@@ -137,21 +147,22 @@ class Mage_Sales_Model_Order_Creditmemo_Total_Tax extends Mage_Sales_Model_Order
|
|
137 |
$baseTotalHiddenTax += $baseShippingHiddenTaxAmount;
|
138 |
}
|
139 |
|
140 |
-
$allowedTax
|
141 |
$allowedBaseTax = $order->getBaseTaxAmount() - $order->getBaseTaxRefunded();
|
142 |
-
$allowedHiddenTax
|
143 |
- $order->getHiddenTaxRefunded() - $order->getShippingHiddenTaxRefunded();
|
144 |
$allowedBaseHiddenTax = $order->getBaseHiddenTaxAmount() + $order->getBaseShippingHiddenTaxAmount()
|
145 |
- $order->getBaseHiddenTaxRefunded() - $order->getBaseShippingHiddenTaxRefunded();
|
146 |
|
147 |
|
148 |
-
$totalTax
|
149 |
-
$baseTotalTax
|
150 |
-
$totalHiddenTax
|
151 |
$baseTotalHiddenTax = min($allowedBaseHiddenTax, $baseTotalHiddenTax);
|
152 |
|
153 |
-
|
154 |
-
$creditmemo->
|
|
|
155 |
$creditmemo->setHiddenTaxAmount($totalHiddenTax);
|
156 |
$creditmemo->setBaseHiddenTaxAmount($baseTotalHiddenTax);
|
157 |
|
27 |
|
28 |
class Mage_Sales_Model_Order_Creditmemo_Total_Tax extends Mage_Sales_Model_Order_Creditmemo_Total_Abstract
|
29 |
{
|
30 |
+
/**
|
31 |
+
* Collects the total tax for the credit memo
|
32 |
+
*
|
33 |
+
* @param Mage_Sales_Model_Order_Creditmemo $creditmemo
|
34 |
+
* @return Mage_Sales_Model_Order_Creditmemo_Total_Tax
|
35 |
+
*/
|
36 |
public function collect(Mage_Sales_Model_Order_Creditmemo $creditmemo)
|
37 |
{
|
38 |
$shippingTaxAmount = 0;
|
41 |
$baseTotalTax = 0;
|
42 |
$totalHiddenTax = 0;
|
43 |
$baseTotalHiddenTax = 0;
|
44 |
+
$weeeTaxAmount = 0;
|
45 |
+
$baseWeeeTaxAmount = 0;
|
46 |
|
47 |
$order = $creditmemo->getOrder();
|
48 |
|
85 |
}
|
86 |
}
|
87 |
|
88 |
+
$invoice = $creditmemo->getInvoice();
|
89 |
+
|
90 |
+
if ($invoice) {
|
91 |
//recalculate tax amounts in case if refund shipping value was changed
|
92 |
if ($order->getBaseShippingAmount() && $creditmemo->getBaseShippingAmount()) {
|
93 |
$taxFactor = $creditmemo->getBaseShippingAmount()/$order->getBaseShippingAmount();
|
147 |
$baseTotalHiddenTax += $baseShippingHiddenTaxAmount;
|
148 |
}
|
149 |
|
150 |
+
$allowedTax = $order->getTaxAmount() - $order->getTaxRefunded();
|
151 |
$allowedBaseTax = $order->getBaseTaxAmount() - $order->getBaseTaxRefunded();
|
152 |
+
$allowedHiddenTax = $order->getHiddenTaxAmount() + $order->getShippingHiddenTaxAmount()
|
153 |
- $order->getHiddenTaxRefunded() - $order->getShippingHiddenTaxRefunded();
|
154 |
$allowedBaseHiddenTax = $order->getBaseHiddenTaxAmount() + $order->getBaseShippingHiddenTaxAmount()
|
155 |
- $order->getBaseHiddenTaxRefunded() - $order->getBaseShippingHiddenTaxRefunded();
|
156 |
|
157 |
|
158 |
+
$totalTax = min($allowedTax, $totalTax);
|
159 |
+
$baseTotalTax = min($allowedBaseTax, $baseTotalTax);
|
160 |
+
$totalHiddenTax = min($allowedHiddenTax, $totalHiddenTax);
|
161 |
$baseTotalHiddenTax = min($allowedBaseHiddenTax, $baseTotalHiddenTax);
|
162 |
|
163 |
+
|
164 |
+
$creditmemo->setTaxAmount($creditmemo->getTaxAmount() + $totalTax);
|
165 |
+
$creditmemo->setBaseTaxAmount($creditmemo->getBaseTaxAmount() + $baseTotalTax);
|
166 |
$creditmemo->setHiddenTaxAmount($totalHiddenTax);
|
167 |
$creditmemo->setBaseHiddenTaxAmount($baseTotalHiddenTax);
|
168 |
|
app/code/core/Mage/Sales/Model/Order/Invoice/Total/Discount.php
CHANGED
@@ -64,11 +64,21 @@ class Mage_Sales_Model_Order_Invoice_Total_Discount extends Mage_Sales_Model_Ord
|
|
64 |
$orderItemQty = $orderItem->getQtyOrdered();
|
65 |
|
66 |
if ($orderItemDiscount && $orderItemQty) {
|
|
|
67 |
/**
|
68 |
* Resolve rounding problems
|
|
|
|
|
|
|
|
|
|
|
69 |
*/
|
70 |
-
|
71 |
-
$
|
|
|
|
|
|
|
|
|
72 |
if (!$item->isLast()) {
|
73 |
$activeQty = $orderItemQty - $orderItem->getQtyInvoiced();
|
74 |
$discount = $invoice->roundPrice($discount / $activeQty * $item->getQty(), 'regular', true);
|
64 |
$orderItemQty = $orderItem->getQtyOrdered();
|
65 |
|
66 |
if ($orderItemDiscount && $orderItemQty) {
|
67 |
+
|
68 |
/**
|
69 |
* Resolve rounding problems
|
70 |
+
*
|
71 |
+
* We dont want to include the weee discount amount as the right amount
|
72 |
+
* is added when calculating the taxes.
|
73 |
+
*
|
74 |
+
* Also the subtotal is without weee
|
75 |
*/
|
76 |
+
|
77 |
+
$discount = $orderItemDiscount - $orderItem->getDiscountInvoiced()
|
78 |
+
- $orderItem->getDiscountAppliedForWeeeTax();
|
79 |
+
$baseDiscount = $baseOrderItemDiscount - $orderItem->getBaseDiscountInvoiced()
|
80 |
+
- $orderItem->getBaseDiscountAppliedForWeeeTax();
|
81 |
+
|
82 |
if (!$item->isLast()) {
|
83 |
$activeQty = $orderItemQty - $orderItem->getQtyInvoiced();
|
84 |
$discount = $invoice->roundPrice($discount / $activeQty * $item->getQty(), 'regular', true);
|
app/code/core/Mage/Sales/Model/Order/Invoice/Total/Subtotal.php
CHANGED
@@ -40,6 +40,9 @@ class Mage_Sales_Model_Order_Invoice_Total_Subtotal extends Mage_Sales_Model_Ord
|
|
40 |
$subtotalInclTax= 0;
|
41 |
$baseSubtotalInclTax = 0;
|
42 |
|
|
|
|
|
|
|
43 |
$order = $invoice->getOrder();
|
44 |
|
45 |
foreach ($invoice->getAllItems() as $item) {
|
@@ -53,13 +56,15 @@ class Mage_Sales_Model_Order_Invoice_Total_Subtotal extends Mage_Sales_Model_Ord
|
|
53 |
$baseSubtotal += $item->getBaseRowTotal();
|
54 |
$subtotalInclTax+= $item->getRowTotalInclTax();
|
55 |
$baseSubtotalInclTax += $item->getBaseRowTotalInclTax();
|
|
|
|
|
56 |
}
|
57 |
|
58 |
$allowedSubtotal = $order->getSubtotal() - $order->getSubtotalInvoiced();
|
59 |
$baseAllowedSubtotal = $order->getBaseSubtotal() - $order->getBaseSubtotalInvoiced();
|
60 |
-
$allowedSubtotalInclTax = $allowedSubtotal + $order->getHiddenTaxAmount()
|
61 |
+ $order->getTaxAmount() - $order->getTaxInvoiced() - $order->getHiddenTaxInvoiced();
|
62 |
-
$baseAllowedSubtotalInclTax = $baseAllowedSubtotal + $order->getBaseHiddenTaxAmount()
|
63 |
+ $order->getBaseTaxAmount() - $order->getBaseTaxInvoiced() - $order->getBaseHiddenTaxInvoiced();
|
64 |
|
65 |
/**
|
40 |
$subtotalInclTax= 0;
|
41 |
$baseSubtotalInclTax = 0;
|
42 |
|
43 |
+
$totalWeeeDiscount = 0;
|
44 |
+
$totalBaseWeeeDiscount = 0;
|
45 |
+
|
46 |
$order = $invoice->getOrder();
|
47 |
|
48 |
foreach ($invoice->getAllItems() as $item) {
|
56 |
$baseSubtotal += $item->getBaseRowTotal();
|
57 |
$subtotalInclTax+= $item->getRowTotalInclTax();
|
58 |
$baseSubtotalInclTax += $item->getBaseRowTotalInclTax();
|
59 |
+
$totalWeeeDiscount += $item->getOrderItem()->getDiscountAppliedForWeeeTax();
|
60 |
+
$totalBaseWeeeDiscount += $item->getOrderItem()->getBaseDiscountAppliedForWeeeTax();
|
61 |
}
|
62 |
|
63 |
$allowedSubtotal = $order->getSubtotal() - $order->getSubtotalInvoiced();
|
64 |
$baseAllowedSubtotal = $order->getBaseSubtotal() - $order->getBaseSubtotalInvoiced();
|
65 |
+
$allowedSubtotalInclTax = $allowedSubtotal + $order->getHiddenTaxAmount() + $totalWeeeDiscount
|
66 |
+ $order->getTaxAmount() - $order->getTaxInvoiced() - $order->getHiddenTaxInvoiced();
|
67 |
+
$baseAllowedSubtotalInclTax = $baseAllowedSubtotal + $order->getBaseHiddenTaxAmount() + $totalBaseWeeeDiscount
|
68 |
+ $order->getBaseTaxAmount() - $order->getBaseTaxInvoiced() - $order->getBaseHiddenTaxInvoiced();
|
69 |
|
70 |
/**
|
app/code/core/Mage/Sales/Model/Order/Item.php
CHANGED
@@ -810,4 +810,44 @@ class Mage_Sales_Model_Order_Item extends Mage_Core_Model_Abstract
|
|
810 |
|
811 |
return $this->getData('product');
|
812 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
813 |
}
|
810 |
|
811 |
return $this->getData('product');
|
812 |
}
|
813 |
+
|
814 |
+
/**
|
815 |
+
* Get the discount amount applied on weee in base
|
816 |
+
*
|
817 |
+
* @return float
|
818 |
+
*/
|
819 |
+
public function getBaseDiscountAppliedForWeeeTax()
|
820 |
+
{
|
821 |
+
$weeeTaxAppliedAmounts = unserialize($this->getWeeeTaxApplied());
|
822 |
+
$totalDiscount = 0;
|
823 |
+
foreach ($weeeTaxAppliedAmounts as $weeeTaxAppliedAmount) {
|
824 |
+
if (isset($weeeTaxAppliedAmount['total_base_weee_discount'])) {
|
825 |
+
return $weeeTaxAppliedAmount['total_base_weee_discount'];
|
826 |
+
} else {
|
827 |
+
$totalDiscount += isset($weeeTaxAppliedAmount['base_weee_discount'])
|
828 |
+
? $weeeTaxAppliedAmount['base_weee_discount'] : 0;
|
829 |
+
}
|
830 |
+
}
|
831 |
+
return $totalDiscount;
|
832 |
+
}
|
833 |
+
|
834 |
+
/**
|
835 |
+
* Get the discount amount applied on Weee
|
836 |
+
*
|
837 |
+
* @return float
|
838 |
+
*/
|
839 |
+
public function getDiscountAppliedForWeeeTax()
|
840 |
+
{
|
841 |
+
$weeeTaxAppliedAmounts = unserialize($this->getWeeeTaxApplied());
|
842 |
+
$totalDiscount = 0;
|
843 |
+
foreach ($weeeTaxAppliedAmounts as $weeeTaxAppliedAmount) {
|
844 |
+
if (isset($weeeTaxAppliedAmount['total_weee_discount'])) {
|
845 |
+
return $weeeTaxAppliedAmount['total_weee_discount'];
|
846 |
+
} else {
|
847 |
+
$totalDiscount += isset($weeeTaxAppliedAmount['weee_discount'])
|
848 |
+
? $weeeTaxAppliedAmount['weee_discount'] : 0;
|
849 |
+
}
|
850 |
+
}
|
851 |
+
return $totalDiscount;
|
852 |
+
}
|
853 |
}
|
app/code/core/Mage/Sales/Model/Order/Payment.php
CHANGED
@@ -364,6 +364,12 @@ class Mage_Sales_Model_Order_Payment extends Mage_Payment_Model_Info
|
|
364 |
$orderStatus = $methodInstance->getConfigData('order_status');
|
365 |
if (!$orderStatus) {
|
366 |
$orderStatus = $order->getConfig()->getStateDefaultStatus($orderState);
|
|
|
|
|
|
|
|
|
|
|
|
|
367 |
}
|
368 |
}
|
369 |
$isCustomerNotified = (null !== $orderIsNotified) ? $orderIsNotified : $order->getCustomerNoteNotify();
|
@@ -761,7 +767,8 @@ class Mage_Sales_Model_Order_Payment extends Mage_Payment_Model_Info
|
|
761 |
}
|
762 |
|
763 |
if ($amount != $baseGrandTotal) {
|
764 |
-
$order->addStatusHistoryComment(Mage::helper('sales')->__('IPN "Refunded". Refund issued by merchant. Registered notification about refunded amount of %s. Transaction ID: "%s". Credit Memo has not been created. Please create offline Credit Memo.',
|
|
|
765 |
return $this;
|
766 |
}
|
767 |
|
@@ -977,7 +984,7 @@ class Mage_Sales_Model_Order_Payment extends Mage_Payment_Model_Info
|
|
977 |
|
978 |
// process payment in case of positive or negative result, or add a comment
|
979 |
if (-1 === $result) { // switch won't work with such $result!
|
980 |
-
if ($order->getState() != Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW) {
|
981 |
$status = $this->getIsFraudDetected() ? Mage_Sales_Model_Order::STATUS_FRAUD : false;
|
982 |
$order->setState(Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW, $status, $message);
|
983 |
if ($transactionId) {
|
364 |
$orderStatus = $methodInstance->getConfigData('order_status');
|
365 |
if (!$orderStatus) {
|
366 |
$orderStatus = $order->getConfig()->getStateDefaultStatus($orderState);
|
367 |
+
} else {
|
368 |
+
// check if $orderStatus has assigned a state
|
369 |
+
$states = $order->getConfig()->getStatusStates($orderStatus);
|
370 |
+
if (count($states) == 0) {
|
371 |
+
$orderStatus = $order->getConfig()->getStateDefaultStatus($orderState);
|
372 |
+
}
|
373 |
}
|
374 |
}
|
375 |
$isCustomerNotified = (null !== $orderIsNotified) ? $orderIsNotified : $order->getCustomerNoteNotify();
|
767 |
}
|
768 |
|
769 |
if ($amount != $baseGrandTotal) {
|
770 |
+
$order->addStatusHistoryComment(Mage::helper('sales')->__('IPN "Refunded". Refund issued by merchant. Registered notification about refunded amount of %s. Transaction ID: "%s". Credit Memo has not been created. Please create offline Credit Memo.',
|
771 |
+
$this->_formatPrice($notificationAmount), $this->getTransactionId()), false);
|
772 |
return $this;
|
773 |
}
|
774 |
|
984 |
|
985 |
// process payment in case of positive or negative result, or add a comment
|
986 |
if (-1 === $result) { // switch won't work with such $result!
|
987 |
+
if ($order -> getState() != Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW) {
|
988 |
$status = $this->getIsFraudDetected() ? Mage_Sales_Model_Order::STATUS_FRAUD : false;
|
989 |
$order->setState(Mage_Sales_Model_Order::STATE_PAYMENT_REVIEW, $status, $message);
|
990 |
if ($transactionId) {
|
app/code/core/Mage/Sales/Model/Order/Shipment.php
CHANGED
@@ -560,7 +560,8 @@ class Mage_Sales_Model_Order_Shipment extends Mage_Sales_Model_Abstract
|
|
560 |
$this->setOrderId($this->getOrder()->getId());
|
561 |
$this->setShippingAddressId($this->getOrder()->getShippingAddress()->getId());
|
562 |
}
|
563 |
-
|
|
|
564 |
$this->setPackages(serialize($this->getPackages()));
|
565 |
}
|
566 |
|
560 |
$this->setOrderId($this->getOrder()->getId());
|
561 |
$this->setShippingAddressId($this->getOrder()->getShippingAddress()->getId());
|
562 |
}
|
563 |
+
|
564 |
+
if ($this->getPackages() && !is_scalar($this->getPackages())) {
|
565 |
$this->setPackages(serialize($this->getPackages()));
|
566 |
}
|
567 |
|
app/code/core/Mage/Sales/Model/Order/Shipment/Track.php
CHANGED
@@ -37,7 +37,6 @@
|
|
37 |
* @method Mage_Sales_Model_Order_Shipment_Track setQty(float $value)
|
38 |
* @method int getOrderId()
|
39 |
* @method Mage_Sales_Model_Order_Shipment_Track setOrderId(int $value)
|
40 |
-
* @method string getNumber()
|
41 |
* @method Mage_Sales_Model_Order_Shipment_Track setNumber(string $value)
|
42 |
* @method string getDescription()
|
43 |
* @method Mage_Sales_Model_Order_Shipment_Track setDescription(string $value)
|
@@ -171,6 +170,16 @@ class Mage_Sales_Model_Order_Shipment_Track extends Mage_Sales_Model_Abstract
|
|
171 |
return Mage::app()->getStore();
|
172 |
}
|
173 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
/**
|
175 |
* Before object save
|
176 |
*
|
37 |
* @method Mage_Sales_Model_Order_Shipment_Track setQty(float $value)
|
38 |
* @method int getOrderId()
|
39 |
* @method Mage_Sales_Model_Order_Shipment_Track setOrderId(int $value)
|
|
|
40 |
* @method Mage_Sales_Model_Order_Shipment_Track setNumber(string $value)
|
41 |
* @method string getDescription()
|
42 |
* @method Mage_Sales_Model_Order_Shipment_Track setDescription(string $value)
|
170 |
return Mage::app()->getStore();
|
171 |
}
|
172 |
|
173 |
+
/**
|
174 |
+
* Get store id
|
175 |
+
*
|
176 |
+
* @return int
|
177 |
+
*/
|
178 |
+
public function getStoreId()
|
179 |
+
{
|
180 |
+
return $this->getStore()->getId();
|
181 |
+
}
|
182 |
+
|
183 |
/**
|
184 |
* Before object save
|
185 |
*
|
app/code/core/Mage/Sales/Model/Quote/Item.php
CHANGED
@@ -164,14 +164,14 @@ class Mage_Sales_Model_Quote_Item extends Mage_Sales_Model_Quote_Item_Abstract
|
|
164 |
*
|
165 |
* @var array
|
166 |
*/
|
167 |
-
protected $_options
|
168 |
|
169 |
/**
|
170 |
* Item options by code cache
|
171 |
*
|
172 |
* @var array
|
173 |
*/
|
174 |
-
protected $_optionsByCode
|
175 |
|
176 |
/**
|
177 |
* Not Represent options
|
@@ -266,6 +266,16 @@ class Mage_Sales_Model_Quote_Item extends Mage_Sales_Model_Quote_Item_Abstract
|
|
266 |
return $qty;
|
267 |
}
|
268 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
269 |
/**
|
270 |
* Adding quantity to quote item
|
271 |
*
|
@@ -283,7 +293,7 @@ class Mage_Sales_Model_Quote_Item extends Mage_Sales_Model_Quote_Item_Abstract
|
|
283 |
*/
|
284 |
if (!$this->getParentItem() || !$this->getId()) {
|
285 |
$this->setQtyToAdd($qty);
|
286 |
-
$this->setQty($oldQty
|
287 |
}
|
288 |
return $this;
|
289 |
}
|
@@ -296,11 +306,11 @@ class Mage_Sales_Model_Quote_Item extends Mage_Sales_Model_Quote_Item_Abstract
|
|
296 |
*/
|
297 |
public function setQty($qty)
|
298 |
{
|
299 |
-
$qty
|
300 |
$oldQty = $this->_getData('qty');
|
301 |
$this->setData('qty', $qty);
|
302 |
|
303 |
-
Mage::dispatchEvent('sales_quote_item_qty_set_after', array('item'
|
304 |
|
305 |
if ($this->getQuote() && $this->getQuote()->getIgnoreOldQty()) {
|
306 |
return $this;
|
@@ -380,8 +390,7 @@ class Mage_Sales_Model_Quote_Item extends Mage_Sales_Model_Quote_Item_Abstract
|
|
380 |
->setWeight($this->getProduct()->getWeight())
|
381 |
->setTaxClassId($product->getTaxClassId())
|
382 |
->setBaseCost($product->getCost())
|
383 |
-
->setIsRecurring($product->getIsRecurring())
|
384 |
-
;
|
385 |
|
386 |
if ($product->getStockItem()) {
|
387 |
$this->setIsQtyDecimal($product->getStockItem()->getIsQtyDecimal());
|
@@ -389,7 +398,7 @@ class Mage_Sales_Model_Quote_Item extends Mage_Sales_Model_Quote_Item_Abstract
|
|
389 |
|
390 |
Mage::dispatchEvent('sales_quote_item_set_product', array(
|
391 |
'product' => $product,
|
392 |
-
'quote_item'
|
393 |
));
|
394 |
|
395 |
|
@@ -426,13 +435,13 @@ class Mage_Sales_Model_Quote_Item extends Mage_Sales_Model_Quote_Item_Abstract
|
|
426 |
}
|
427 |
|
428 |
// Check options
|
429 |
-
$itemOptions
|
430 |
$productOptions = $product->getCustomOptions();
|
431 |
|
432 |
-
if(!$this->compareOptions($itemOptions, $productOptions)){
|
433 |
return false;
|
434 |
}
|
435 |
-
if(!$this->compareOptions($productOptions, $itemOptions)){
|
436 |
return false;
|
437 |
}
|
438 |
return true;
|
@@ -451,12 +460,13 @@ class Mage_Sales_Model_Quote_Item extends Mage_Sales_Model_Quote_Item_Abstract
|
|
451 |
{
|
452 |
foreach ($options1 as $option) {
|
453 |
$code = $option->getCode();
|
454 |
-
if (in_array($code, $this->_notRepresentOptions
|
455 |
continue;
|
456 |
}
|
457 |
-
if (
|
458 |
|| ($options2[$code]->getValue() === null)
|
459 |
-
|| $options2[$code]->getValue() != $option->getValue()
|
|
|
460 |
return false;
|
461 |
}
|
462 |
}
|
@@ -480,15 +490,15 @@ class Mage_Sales_Model_Quote_Item extends Mage_Sales_Model_Quote_Item_Abstract
|
|
480 |
}
|
481 |
if ($itemOption = $item->getOptionByCode($option->getCode())) {
|
482 |
$itemOptionValue = $itemOption->getValue();
|
483 |
-
$optionValue
|
484 |
|
485 |
// dispose of some options params, that can cramp comparing of arrays
|
486 |
if (is_string($itemOptionValue) && is_string($optionValue)) {
|
487 |
$_itemOptionValue = @unserialize($itemOptionValue);
|
488 |
-
$_optionValue
|
489 |
if (is_array($_itemOptionValue) && is_array($_optionValue)) {
|
490 |
$itemOptionValue = $_itemOptionValue;
|
491 |
-
$optionValue
|
492 |
// looks like it does not break bundle selection qty
|
493 |
unset($itemOptionValue['qty'], $itemOptionValue['uenc']);
|
494 |
unset($optionValue['qty'], $optionValue['uenc']);
|
@@ -498,8 +508,7 @@ class Mage_Sales_Model_Quote_Item extends Mage_Sales_Model_Quote_Item_Abstract
|
|
498 |
if ($itemOptionValue != $optionValue) {
|
499 |
return false;
|
500 |
}
|
501 |
-
}
|
502 |
-
else {
|
503 |
return false;
|
504 |
}
|
505 |
}
|
@@ -538,7 +547,7 @@ class Mage_Sales_Model_Quote_Item extends Mage_Sales_Model_Quote_Item_Abstract
|
|
538 |
* @param array $arrAttributes
|
539 |
* @return array
|
540 |
*/
|
541 |
-
public function toArray(array $arrAttributes=array())
|
542 |
{
|
543 |
$data = parent::toArray($arrAttributes);
|
544 |
|
@@ -593,23 +602,19 @@ class Mage_Sales_Model_Quote_Item extends Mage_Sales_Model_Quote_Item_Abstract
|
|
593 |
if (is_array($option)) {
|
594 |
$option = Mage::getModel('sales/quote_item_option')->setData($option)
|
595 |
->setItem($this);
|
596 |
-
}
|
597 |
-
elseif (($option instanceof Varien_Object) && !($option instanceof Mage_Sales_Model_Quote_Item_Option)) {
|
598 |
$option = Mage::getModel('sales/quote_item_option')->setData($option->getData())
|
599 |
-
|
600 |
-
|
601 |
-
}
|
602 |
-
elseif($option instanceof Mage_Sales_Model_Quote_Item_Option) {
|
603 |
$option->setItem($this);
|
604 |
-
}
|
605 |
-
else {
|
606 |
Mage::throwException(Mage::helper('sales')->__('Invalid item option format.'));
|
607 |
}
|
608 |
|
609 |
if ($exOption = $this->getOptionByCode($option->getCode())) {
|
610 |
$exOption->addData($option->getData());
|
611 |
-
}
|
612 |
-
else {
|
613 |
$this->_addOptionCode($option);
|
614 |
$this->_options[] = $option;
|
615 |
}
|
@@ -627,8 +632,8 @@ class Mage_Sales_Model_Quote_Item extends Mage_Sales_Model_Quote_Item_Abstract
|
|
627 |
*/
|
628 |
public function updateQtyOption(Varien_Object $option, $value)
|
629 |
{
|
630 |
-
$optionProduct
|
631 |
-
$options
|
632 |
|
633 |
if (isset($options[$optionProduct->getId()])) {
|
634 |
$options[$optionProduct->getId()]->setValue($value);
|
@@ -665,8 +670,7 @@ class Mage_Sales_Model_Quote_Item extends Mage_Sales_Model_Quote_Item_Abstract
|
|
665 |
{
|
666 |
if (!isset($this->_optionsByCode[$option->getCode()])) {
|
667 |
$this->_optionsByCode[$option->getCode()] = $option;
|
668 |
-
}
|
669 |
-
else {
|
670 |
Mage::throwException(Mage::helper('sales')->__('An item option with code %s already exists.', $option->getCode()));
|
671 |
}
|
672 |
return $this;
|
@@ -759,9 +763,9 @@ class Mage_Sales_Model_Quote_Item extends Mage_Sales_Model_Quote_Item_Abstract
|
|
759 |
{
|
760 |
parent::__clone();
|
761 |
$options = $this->getOptions();
|
762 |
-
$this->_quote
|
763 |
-
$this->_options
|
764 |
-
$this->_optionsByCode
|
765 |
foreach ($options as $option) {
|
766 |
$this->addOption(clone $option);
|
767 |
}
|
164 |
*
|
165 |
* @var array
|
166 |
*/
|
167 |
+
protected $_options = array();
|
168 |
|
169 |
/**
|
170 |
* Item options by code cache
|
171 |
*
|
172 |
* @var array
|
173 |
*/
|
174 |
+
protected $_optionsByCode = array();
|
175 |
|
176 |
/**
|
177 |
* Not Represent options
|
266 |
return $qty;
|
267 |
}
|
268 |
|
269 |
+
/**
|
270 |
+
* Get Magento App instance
|
271 |
+
*
|
272 |
+
* @return Mage_Core_Model_App
|
273 |
+
*/
|
274 |
+
protected function _getApp()
|
275 |
+
{
|
276 |
+
return Mage::app();
|
277 |
+
}
|
278 |
+
|
279 |
/**
|
280 |
* Adding quantity to quote item
|
281 |
*
|
293 |
*/
|
294 |
if (!$this->getParentItem() || !$this->getId()) {
|
295 |
$this->setQtyToAdd($qty);
|
296 |
+
$this->setQty($oldQty + $qty);
|
297 |
}
|
298 |
return $this;
|
299 |
}
|
306 |
*/
|
307 |
public function setQty($qty)
|
308 |
{
|
309 |
+
$qty = $this->_prepareQty($qty);
|
310 |
$oldQty = $this->_getData('qty');
|
311 |
$this->setData('qty', $qty);
|
312 |
|
313 |
+
Mage::dispatchEvent('sales_quote_item_qty_set_after', array('item' => $this));
|
314 |
|
315 |
if ($this->getQuote() && $this->getQuote()->getIgnoreOldQty()) {
|
316 |
return $this;
|
390 |
->setWeight($this->getProduct()->getWeight())
|
391 |
->setTaxClassId($product->getTaxClassId())
|
392 |
->setBaseCost($product->getCost())
|
393 |
+
->setIsRecurring($product->getIsRecurring());
|
|
|
394 |
|
395 |
if ($product->getStockItem()) {
|
396 |
$this->setIsQtyDecimal($product->getStockItem()->getIsQtyDecimal());
|
398 |
|
399 |
Mage::dispatchEvent('sales_quote_item_set_product', array(
|
400 |
'product' => $product,
|
401 |
+
'quote_item' => $this
|
402 |
));
|
403 |
|
404 |
|
435 |
}
|
436 |
|
437 |
// Check options
|
438 |
+
$itemOptions = $this->getOptionsByCode();
|
439 |
$productOptions = $product->getCustomOptions();
|
440 |
|
441 |
+
if (!$this->compareOptions($itemOptions, $productOptions)) {
|
442 |
return false;
|
443 |
}
|
444 |
+
if (!$this->compareOptions($productOptions, $itemOptions)) {
|
445 |
return false;
|
446 |
}
|
447 |
return true;
|
460 |
{
|
461 |
foreach ($options1 as $option) {
|
462 |
$code = $option->getCode();
|
463 |
+
if (in_array($code, $this->_notRepresentOptions)) {
|
464 |
continue;
|
465 |
}
|
466 |
+
if (!isset($options2[$code])
|
467 |
|| ($options2[$code]->getValue() === null)
|
468 |
+
|| $options2[$code]->getValue() != $option->getValue()
|
469 |
+
) {
|
470 |
return false;
|
471 |
}
|
472 |
}
|
490 |
}
|
491 |
if ($itemOption = $item->getOptionByCode($option->getCode())) {
|
492 |
$itemOptionValue = $itemOption->getValue();
|
493 |
+
$optionValue = $option->getValue();
|
494 |
|
495 |
// dispose of some options params, that can cramp comparing of arrays
|
496 |
if (is_string($itemOptionValue) && is_string($optionValue)) {
|
497 |
$_itemOptionValue = @unserialize($itemOptionValue);
|
498 |
+
$_optionValue = @unserialize($optionValue);
|
499 |
if (is_array($_itemOptionValue) && is_array($_optionValue)) {
|
500 |
$itemOptionValue = $_itemOptionValue;
|
501 |
+
$optionValue = $_optionValue;
|
502 |
// looks like it does not break bundle selection qty
|
503 |
unset($itemOptionValue['qty'], $itemOptionValue['uenc']);
|
504 |
unset($optionValue['qty'], $optionValue['uenc']);
|
508 |
if ($itemOptionValue != $optionValue) {
|
509 |
return false;
|
510 |
}
|
511 |
+
} else {
|
|
|
512 |
return false;
|
513 |
}
|
514 |
}
|
547 |
* @param array $arrAttributes
|
548 |
* @return array
|
549 |
*/
|
550 |
+
public function toArray(array $arrAttributes = array())
|
551 |
{
|
552 |
$data = parent::toArray($arrAttributes);
|
553 |
|
602 |
if (is_array($option)) {
|
603 |
$option = Mage::getModel('sales/quote_item_option')->setData($option)
|
604 |
->setItem($this);
|
605 |
+
} elseif (($option instanceof Varien_Object) && !($option instanceof Mage_Sales_Model_Quote_Item_Option)) {
|
|
|
606 |
$option = Mage::getModel('sales/quote_item_option')->setData($option->getData())
|
607 |
+
->setProduct($option->getProduct())
|
608 |
+
->setItem($this);
|
609 |
+
} elseif ($option instanceof Mage_Sales_Model_Quote_Item_Option) {
|
|
|
610 |
$option->setItem($this);
|
611 |
+
} else {
|
|
|
612 |
Mage::throwException(Mage::helper('sales')->__('Invalid item option format.'));
|
613 |
}
|
614 |
|
615 |
if ($exOption = $this->getOptionByCode($option->getCode())) {
|
616 |
$exOption->addData($option->getData());
|
617 |
+
} else {
|
|
|
618 |
$this->_addOptionCode($option);
|
619 |
$this->_options[] = $option;
|
620 |
}
|
632 |
*/
|
633 |
public function updateQtyOption(Varien_Object $option, $value)
|
634 |
{
|
635 |
+
$optionProduct = $option->getProduct();
|
636 |
+
$options = $this->getQtyOptions();
|
637 |
|
638 |
if (isset($options[$optionProduct->getId()])) {
|
639 |
$options[$optionProduct->getId()]->setValue($value);
|
670 |
{
|
671 |
if (!isset($this->_optionsByCode[$option->getCode()])) {
|
672 |
$this->_optionsByCode[$option->getCode()] = $option;
|
673 |
+
} else {
|
|
|
674 |
Mage::throwException(Mage::helper('sales')->__('An item option with code %s already exists.', $option->getCode()));
|
675 |
}
|
676 |
return $this;
|
763 |
{
|
764 |
parent::__clone();
|
765 |
$options = $this->getOptions();
|
766 |
+
$this->_quote = null;
|
767 |
+
$this->_options = array();
|
768 |
+
$this->_optionsByCode = array();
|
769 |
foreach ($options as $option) {
|
770 |
$this->addOption(clone $option);
|
771 |
}
|
app/code/core/Mage/Sales/Model/Quote/Item/Abstract.php
CHANGED
@@ -41,8 +41,24 @@
|
|
41 |
abstract class Mage_Sales_Model_Quote_Item_Abstract extends Mage_Core_Model_Abstract
|
42 |
implements Mage_Catalog_Model_Product_Configuration_Item_Interface
|
43 |
{
|
|
|
|
|
|
|
|
|
|
|
44 |
protected $_parentItem = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
protected $_children = array();
|
|
|
|
|
|
|
|
|
|
|
46 |
protected $_messages = array();
|
47 |
|
48 |
/**
|
@@ -250,10 +266,10 @@ abstract class Mage_Sales_Model_Quote_Item_Abstract extends Mage_Core_Model_Abst
|
|
250 |
|
251 |
try {
|
252 |
$this->setQty($qty);
|
253 |
-
} catch (Mage_Core_Exception $e){
|
254 |
$this->setHasError(true);
|
255 |
$this->setMessage($e->getMessage());
|
256 |
-
} catch (Exception $e){
|
257 |
$this->setHasError(true);
|
258 |
$this->setMessage(Mage::helper('sales')->__('Item qty declaration error.'));
|
259 |
}
|
@@ -323,7 +339,7 @@ abstract class Mage_Sales_Model_Quote_Item_Abstract extends Mage_Core_Model_Abst
|
|
323 |
$qty = $this->getTotalQty();
|
324 |
// Round unit price before multiplying to prevent losing 1 cent on subtotal
|
325 |
$total = $this->getStore()->roundPrice($this->getCalculationPriceOriginal()) * $qty;
|
326 |
-
$baseTotal = $this->getBaseCalculationPriceOriginal() * $qty;
|
327 |
|
328 |
$this->setRowTotal($this->getStore()->roundPrice($total));
|
329 |
$this->setBaseRowTotal($this->getStore()->roundPrice($baseTotal));
|
@@ -647,8 +663,8 @@ abstract class Mage_Sales_Model_Quote_Item_Abstract extends Mage_Core_Model_Abst
|
|
647 |
$totalTax = $this->getTaxAmount();
|
648 |
|
649 |
if ($totalTax && $totalBaseTax) {
|
650 |
-
$totalTax -= $this->getDiscountAmount()*($this->getTaxPercent()/100);
|
651 |
-
$totalBaseTax -= $this->getBaseDiscountAmount()*($this->getTaxPercent()/100);
|
652 |
|
653 |
$this->setBaseTaxAmount($store->roundPrice($totalBaseTax));
|
654 |
$this->setTaxAmount($store->roundPrice($totalTax));
|
41 |
abstract class Mage_Sales_Model_Quote_Item_Abstract extends Mage_Core_Model_Abstract
|
42 |
implements Mage_Catalog_Model_Product_Configuration_Item_Interface
|
43 |
{
|
44 |
+
/**
|
45 |
+
* Parent item for sub items for bundle product, configurable product, etc.
|
46 |
+
*
|
47 |
+
* @var Mage_Sales_Model_Quote_Item_Abstract
|
48 |
+
*/
|
49 |
protected $_parentItem = null;
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Children items in bundle product, configurable product, etc.
|
53 |
+
*
|
54 |
+
* @var array
|
55 |
+
*/
|
56 |
protected $_children = array();
|
57 |
+
|
58 |
+
/**
|
59 |
+
*
|
60 |
+
* @var array
|
61 |
+
*/
|
62 |
protected $_messages = array();
|
63 |
|
64 |
/**
|
266 |
|
267 |
try {
|
268 |
$this->setQty($qty);
|
269 |
+
} catch (Mage_Core_Exception $e) {
|
270 |
$this->setHasError(true);
|
271 |
$this->setMessage($e->getMessage());
|
272 |
+
} catch (Exception $e) {
|
273 |
$this->setHasError(true);
|
274 |
$this->setMessage(Mage::helper('sales')->__('Item qty declaration error.'));
|
275 |
}
|
339 |
$qty = $this->getTotalQty();
|
340 |
// Round unit price before multiplying to prevent losing 1 cent on subtotal
|
341 |
$total = $this->getStore()->roundPrice($this->getCalculationPriceOriginal()) * $qty;
|
342 |
+
$baseTotal = $this->getStore()->roundPrice($this->getBaseCalculationPriceOriginal()) * $qty;
|
343 |
|
344 |
$this->setRowTotal($this->getStore()->roundPrice($total));
|
345 |
$this->setBaseRowTotal($this->getStore()->roundPrice($baseTotal));
|
663 |
$totalTax = $this->getTaxAmount();
|
664 |
|
665 |
if ($totalTax && $totalBaseTax) {
|
666 |
+
$totalTax -= $this->getDiscountAmount() * ($this->getTaxPercent() / 100);
|
667 |
+
$totalBaseTax -= $this->getBaseDiscountAmount() * ($this->getTaxPercent() / 100);
|
668 |
|
669 |
$this->setBaseTaxAmount($store->roundPrice($totalBaseTax));
|
670 |
$this->setTaxAmount($store->roundPrice($totalTax));
|
app/code/core/Mage/Sales/Model/Resource/Order/Status/Collection.php
CHANGED
@@ -82,6 +82,7 @@ class Mage_Sales_Model_Resource_Order_Status_Collection extends Mage_Core_Model_
|
|
82 |
* add state code filter to collection
|
83 |
*
|
84 |
* @param string $state
|
|
|
85 |
*/
|
86 |
public function addStateFilter($state)
|
87 |
{
|
@@ -90,6 +91,19 @@ class Mage_Sales_Model_Resource_Order_Status_Collection extends Mage_Core_Model_
|
|
90 |
return $this;
|
91 |
}
|
92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
/**
|
94 |
* Define label order
|
95 |
*
|
82 |
* add state code filter to collection
|
83 |
*
|
84 |
* @param string $state
|
85 |
+
* @return Mage_Sales_Model_Resource_Order_Status_Collection
|
86 |
*/
|
87 |
public function addStateFilter($state)
|
88 |
{
|
91 |
return $this;
|
92 |
}
|
93 |
|
94 |
+
/**
|
95 |
+
* add status code filter to collection
|
96 |
+
*
|
97 |
+
* @param string $status
|
98 |
+
* @return Mage_Sales_Model_Resource_Order_Status_Collection
|
99 |
+
*/
|
100 |
+
public function addStatusFilter($status)
|
101 |
+
{
|
102 |
+
$this->joinStates();
|
103 |
+
$this->getSelect()->where('state_table.status=?', $status);
|
104 |
+
return $this;
|
105 |
+
}
|
106 |
+
|
107 |
/**
|
108 |
* Define label order
|
109 |
*
|
app/code/core/Mage/Sales/etc/config.xml
CHANGED
@@ -1636,13 +1636,6 @@
|
|
1636 |
</events>
|
1637 |
</adminhtml>
|
1638 |
<default>
|
1639 |
-
<payment>
|
1640 |
-
<googlecheckout>
|
1641 |
-
<active>1</active>
|
1642 |
-
<model>googlecheckout/payment</model>
|
1643 |
-
<title>Google Checkout</title>
|
1644 |
-
</googlecheckout>
|
1645 |
-
</payment>
|
1646 |
<sales>
|
1647 |
<totals_sort>
|
1648 |
<discount>20</discount>
|
1636 |
</events>
|
1637 |
</adminhtml>
|
1638 |
<default>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1639 |
<sales>
|
1640 |
<totals_sort>
|
1641 |
<discount>20</discount>
|
app/code/core/Mage/Sales/etc/widget.xml
CHANGED
@@ -37,6 +37,11 @@
|
|
37 |
<type>text</type>
|
38 |
</title>
|
39 |
<template>
|
|
|
|
|
|
|
|
|
|
|
40 |
<values>
|
41 |
<default_template translate="label">
|
42 |
<label>Default Template</label>
|
37 |
<type>text</type>
|
38 |
</title>
|
39 |
<template>
|
40 |
+
<required>1</required>
|
41 |
+
<visible>1</visible>
|
42 |
+
<label>Template</label>
|
43 |
+
<type>select</type>
|
44 |
+
<value>sales/widget/guest/form.phtml</value>
|
45 |
<values>
|
46 |
<default_template translate="label">
|
47 |
<label>Default Template</label>
|
app/code/core/Mage/SalesRule/Model/Validator.php
CHANGED
@@ -392,7 +392,7 @@ class Mage_SalesRule_Model_Validator extends Mage_Core_Model_Abstract
|
|
392 |
$baseDiscountAmount = min($baseItemPrice * $qty, $cartRules[$rule->getId()]);
|
393 |
} else {
|
394 |
$discountRate = $baseItemPrice * $qty /
|
395 |
-
|
396 |
$maximumItemDiscount = $rule->getDiscountAmount() * $discountRate;
|
397 |
$quoteAmount = $quote->getStore()->convertPrice($maximumItemDiscount);
|
398 |
|
@@ -461,15 +461,15 @@ class Mage_SalesRule_Model_Validator extends Mage_Core_Model_Abstract
|
|
461 |
if ($percentKey) {
|
462 |
$delta = isset($this->_roundingDeltas[$percentKey]) ? $this->_roundingDeltas[$percentKey] : 0;
|
463 |
$baseDelta = isset($this->_baseRoundingDeltas[$percentKey])
|
464 |
-
|
465 |
-
|
466 |
$discountAmount += $delta;
|
467 |
$baseDiscountAmount += $baseDelta;
|
468 |
|
469 |
$this->_roundingDeltas[$percentKey] = $discountAmount -
|
470 |
-
|
471 |
$this->_baseRoundingDeltas[$percentKey] = $baseDiscountAmount -
|
472 |
-
|
473 |
$discountAmount = $quote->getStore()->roundPrice($discountAmount);
|
474 |
$baseDiscountAmount = $quote->getStore()->roundPrice($baseDiscountAmount);
|
475 |
} else {
|
@@ -551,81 +551,154 @@ class Mage_SalesRule_Model_Validator extends Mage_Core_Model_Abstract
|
|
551 |
$rulePercent = max(0, 100 - $rule->getDiscountAmount());
|
552 |
case Mage_SalesRule_Model_Rule::BY_PERCENT_ACTION:
|
553 |
foreach ($items as $item) {
|
554 |
-
|
555 |
-
$
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
573 |
} else {
|
574 |
-
|
575 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
576 |
}
|
577 |
} else {
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
$weeeDiscount = ($weeeTaxAppliedRowAmount + $weeeTax) * $rulePercent / 100;
|
582 |
-
$baseWeeeDiscount = ($baseWeeeTaxAppliedRowAmount + $baseWeeeTax)
|
583 |
-
* $rulePercent / 100;
|
584 |
-
} else {
|
585 |
-
$weeeDiscount = $weeeTaxAppliedRowAmount * $rulePercent / 100;
|
586 |
-
$baseWeeeDiscount = $baseWeeeTaxAppliedRowAmount * $rulePercent / 100;
|
587 |
-
}
|
588 |
}
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
593 |
}
|
594 |
-
$item->setWeeeDiscount($weeeDiscount);
|
595 |
-
$item->setBaseWeeeDiscount($baseWeeeDiscount);
|
596 |
|
597 |
-
|
598 |
-
$applied = $this->_getHelper('weee')->getApplied($item);
|
599 |
-
$applied[0]['weee_discount'] = $weeeDiscount;
|
600 |
-
$this->_getHelper('weee')->setApplied($item, $applied);
|
601 |
|
602 |
-
$
|
603 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
604 |
if ($includeInSubtotal) {
|
605 |
-
$address->addTotalAmount('discount', -$
|
606 |
-
$address->addBaseTotalAmount('discount', -$
|
607 |
} else {
|
608 |
-
if ($applyTaxAfterDiscount
|
609 |
-
$address->setExtraTaxAmount($address->getExtraTaxAmount() - $
|
610 |
-
$address->setBaseExtraTaxAmount(
|
611 |
-
|
612 |
-
$address->
|
|
|
613 |
} else {
|
614 |
//tax has already been calculated, we need to remove weeeDiscount from total tax
|
615 |
-
$address->setExtraTaxAmount($address->getExtraTaxAmount() - $
|
616 |
-
$address->setBaseExtraTaxAmount(
|
617 |
-
|
618 |
-
$address->
|
619 |
-
$address->
|
620 |
-
$address->
|
|
|
621 |
}
|
622 |
}
|
|
|
|
|
623 |
}
|
624 |
-
break;
|
625 |
}
|
626 |
}
|
627 |
return $this;
|
628 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
629 |
/**
|
630 |
* Apply discounts to shipping amount
|
631 |
*
|
@@ -658,7 +731,7 @@ class Mage_SalesRule_Model_Validator extends Mage_Core_Model_Abstract
|
|
658 |
case Mage_SalesRule_Model_Rule::BY_PERCENT_ACTION:
|
659 |
$discountAmount = ($shippingAmount - $address->getShippingDiscountAmount()) * $rulePercent/100;
|
660 |
$baseDiscountAmount = ($baseShippingAmount -
|
661 |
-
|
662 |
$discountPercent = min(100, $address->getShippingDiscountPercent()+$rulePercent);
|
663 |
$address->setShippingDiscountPercent($discountPercent);
|
664 |
break;
|
@@ -734,7 +807,7 @@ class Mage_SalesRule_Model_Validator extends Mage_Core_Model_Abstract
|
|
734 |
}
|
735 |
$a = array_unique(array_merge($a1, $a2));
|
736 |
if ($asString) {
|
737 |
-
|
738 |
}
|
739 |
return $a;
|
740 |
}
|
@@ -959,7 +1032,7 @@ class Mage_SalesRule_Model_Validator extends Mage_Core_Model_Abstract
|
|
959 |
* wrap Mage::helper
|
960 |
*
|
961 |
* @param string $name
|
962 |
-
* @return
|
963 |
*/
|
964 |
protected function _getHelper($name) {
|
965 |
return Mage::helper($name);
|
392 |
$baseDiscountAmount = min($baseItemPrice * $qty, $cartRules[$rule->getId()]);
|
393 |
} else {
|
394 |
$discountRate = $baseItemPrice * $qty /
|
395 |
+
$this->_rulesItemTotals[$rule->getId()]['base_items_price'];
|
396 |
$maximumItemDiscount = $rule->getDiscountAmount() * $discountRate;
|
397 |
$quoteAmount = $quote->getStore()->convertPrice($maximumItemDiscount);
|
398 |
|
461 |
if ($percentKey) {
|
462 |
$delta = isset($this->_roundingDeltas[$percentKey]) ? $this->_roundingDeltas[$percentKey] : 0;
|
463 |
$baseDelta = isset($this->_baseRoundingDeltas[$percentKey])
|
464 |
+
? $this->_baseRoundingDeltas[$percentKey]
|
465 |
+
: 0;
|
466 |
$discountAmount += $delta;
|
467 |
$baseDiscountAmount += $baseDelta;
|
468 |
|
469 |
$this->_roundingDeltas[$percentKey] = $discountAmount -
|
470 |
+
$quote->getStore()->roundPrice($discountAmount);
|
471 |
$this->_baseRoundingDeltas[$percentKey] = $baseDiscountAmount -
|
472 |
+
$quote->getStore()->roundPrice($baseDiscountAmount);
|
473 |
$discountAmount = $quote->getStore()->roundPrice($discountAmount);
|
474 |
$baseDiscountAmount = $quote->getStore()->roundPrice($baseDiscountAmount);
|
475 |
} else {
|
551 |
$rulePercent = max(0, 100 - $rule->getDiscountAmount());
|
552 |
case Mage_SalesRule_Model_Rule::BY_PERCENT_ACTION:
|
553 |
foreach ($items as $item) {
|
554 |
+
|
555 |
+
$weeeTaxAppliedAmounts = $this->_getHelper('weee')->getApplied($item);
|
556 |
+
|
557 |
+
//Total weee discount for the item
|
558 |
+
$totalWeeeDiscount = 0;
|
559 |
+
$totalBaseWeeeDiscount = 0;
|
560 |
+
|
561 |
+
foreach ($weeeTaxAppliedAmounts as $weeeTaxAppliedAmount) {
|
562 |
+
|
563 |
+
/* we get the discount by row since we dont need to display the individual amounts */
|
564 |
+
$weeeTaxAppliedRowAmount = $weeeTaxAppliedAmount['row_amount'];
|
565 |
+
$baseWeeeTaxAppliedRowAmount = $weeeTaxAppliedAmount['base_row_amount'];
|
566 |
+
$request->setProductClassId($item->getProduct()->getTaxClassId());
|
567 |
+
$rate = $calculator->getRate($request);
|
568 |
+
|
569 |
+
/*
|
570 |
+
* calculate weee discount
|
571 |
+
*/
|
572 |
+
$weeeDiscount = 0;
|
573 |
+
$baseWeeeDiscount = 0;
|
574 |
+
|
575 |
+
if ($this->_getHelper('weee')->isTaxable()) {
|
576 |
+
if ($applyTaxAfterDiscount) {
|
577 |
+
if ($discountTax) {
|
578 |
+
$weeeTax = $weeeTaxAppliedRowAmount * $rate / 100;
|
579 |
+
$baseWeeeTax = $baseWeeeTaxAppliedRowAmount * $rate / 100;
|
580 |
+
$weeeDiscount = ($weeeTaxAppliedRowAmount + $weeeTax) * $rulePercent / 100;
|
581 |
+
$baseWeeeDiscount = ($baseWeeeTaxAppliedRowAmount + $baseWeeeTax)
|
582 |
+
* $rulePercent / 100;
|
583 |
+
} else {
|
584 |
+
$weeeDiscount = $weeeTaxAppliedRowAmount * $rulePercent / 100;
|
585 |
+
$baseWeeeDiscount = $baseWeeeTaxAppliedRowAmount * $rulePercent / 100;
|
586 |
+
}
|
587 |
} else {
|
588 |
+
if ($discountTax) {
|
589 |
+
$weeeTax = $weeeTaxAppliedRowAmount * $rate / 100;
|
590 |
+
$baseWeeeTax = $baseWeeeTaxAppliedRowAmount * $rate / 100;
|
591 |
+
$weeeDiscount = ($weeeTaxAppliedRowAmount + $weeeTax) * $rulePercent / 100;
|
592 |
+
$baseWeeeDiscount = ($baseWeeeTaxAppliedRowAmount + $baseWeeeTax)
|
593 |
+
* $rulePercent / 100;
|
594 |
+
} else {
|
595 |
+
$weeeDiscount = $weeeTaxAppliedRowAmount * $rulePercent / 100;
|
596 |
+
$baseWeeeDiscount = $baseWeeeTaxAppliedRowAmount * $rulePercent / 100;
|
597 |
+
}
|
598 |
}
|
599 |
} else {
|
600 |
+
// weee is not taxable
|
601 |
+
$weeeDiscount = $weeeTaxAppliedRowAmount * $rulePercent / 100;
|
602 |
+
$baseWeeeDiscount = $baseWeeeTaxAppliedRowAmount * $rulePercent / 100;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
603 |
}
|
604 |
+
|
605 |
+
if (!$includeInSubtotal) {
|
606 |
+
$this->_getHelper('weee')->setWeeeTaxesAppliedProperty(
|
607 |
+
$item, $weeeTaxAppliedAmount['title'], 'weee_discount', $weeeDiscount);
|
608 |
+
$this->_getHelper('weee')->setWeeeTaxesAppliedProperty(
|
609 |
+
$item, $weeeTaxAppliedAmount['title'], 'base_weee_discount', $baseWeeeDiscount);
|
610 |
+
}
|
611 |
+
|
612 |
+
//Record the total weee discount
|
613 |
+
$totalBaseWeeeDiscount += $baseWeeeDiscount;
|
614 |
+
$totalWeeeDiscount += $weeeDiscount;
|
615 |
}
|
|
|
|
|
616 |
|
617 |
+
$discountPercentage = $item->getDiscountPercent();
|
|
|
|
|
|
|
618 |
|
619 |
+
$totalWeeeDiscount = $this->_roundWithDeltas($discountPercentage,
|
620 |
+
$totalWeeeDiscount, $quote->getStore());
|
621 |
+
$totalBaseWeeeDiscount = $this->_roundWithDeltasForBase($discountPercentage,
|
622 |
+
$totalBaseWeeeDiscount, $quote->getStore());
|
623 |
+
|
624 |
+
$item->setWeeeDiscount($totalWeeeDiscount);
|
625 |
+
$item->setBaseWeeeDiscount($totalBaseWeeeDiscount);
|
626 |
+
|
627 |
+
//Set the total discount replicated on all weee attributes.
|
628 |
+
//we need to do this as the mage_sales_order_item does not store the weee discount
|
629 |
+
//We need to store this as we want to keep the rounded amounts
|
630 |
+
if (!$includeInSubtotal) {
|
631 |
+
$this->_getHelper('weee')->setWeeeTaxesAppliedProperty(
|
632 |
+
$item, null, 'total_base_weee_discount', $totalBaseWeeeDiscount);
|
633 |
+
$this->_getHelper('weee')->setWeeeTaxesAppliedProperty(
|
634 |
+
$item, null, 'total_weee_discount', $totalWeeeDiscount);
|
635 |
+
}
|
636 |
+
|
637 |
+
$item->setDiscountAmount($item->getDiscountAmount() + $totalWeeeDiscount);
|
638 |
+
$item->setBaseDiscountAmount($item->getBaseDiscountAmount() + $totalBaseWeeeDiscount);
|
639 |
if ($includeInSubtotal) {
|
640 |
+
$address->addTotalAmount('discount', -$totalWeeeDiscount);
|
641 |
+
$address->addBaseTotalAmount('discount', -$totalBaseWeeeDiscount);
|
642 |
} else {
|
643 |
+
if ($applyTaxAfterDiscount) {
|
644 |
+
$address->setExtraTaxAmount($address->getExtraTaxAmount() - $totalWeeeDiscount);
|
645 |
+
$address->setBaseExtraTaxAmount(
|
646 |
+
$address->getBaseExtraTaxAmount() - $totalBaseWeeeDiscount);
|
647 |
+
$address->setWeeeDiscount($address->getWeeeDiscount() + $totalWeeeDiscount);
|
648 |
+
$address->setBaseWeeeDiscount($address->getBaseWeeeDiscount() + $totalBaseWeeeDiscount);
|
649 |
} else {
|
650 |
//tax has already been calculated, we need to remove weeeDiscount from total tax
|
651 |
+
$address->setExtraTaxAmount($address->getExtraTaxAmount() - $totalWeeeDiscount);
|
652 |
+
$address->setBaseExtraTaxAmount(
|
653 |
+
$address->getBaseExtraTaxAmount() - $totalBaseWeeeDiscount);
|
654 |
+
$address->addTotalAmount('tax', -$totalWeeeDiscount);
|
655 |
+
$address->addBaseTotalAmount('tax', -$totalBaseWeeeDiscount);
|
656 |
+
$address->setWeeeDiscount($address->getWeeeDiscount() + $totalWeeeDiscount);
|
657 |
+
$address->setBaseWeeeDiscount($address->getBaseWeeeDiscount() + $totalBaseWeeeDiscount);
|
658 |
}
|
659 |
}
|
660 |
+
|
661 |
+
break;
|
662 |
}
|
|
|
663 |
}
|
664 |
}
|
665 |
return $this;
|
666 |
}
|
667 |
+
|
668 |
+
/**
|
669 |
+
* Round the amount with deltas collected
|
670 |
+
*
|
671 |
+
* @param string $key
|
672 |
+
* @param float $amount
|
673 |
+
* @param Mage_Core_Model_Store $store
|
674 |
+
* @return float
|
675 |
+
*/
|
676 |
+
protected function _roundWithDeltas($key, $amount, $store)
|
677 |
+
{
|
678 |
+
$delta = isset($this->_roundingDeltas[$key]) ?
|
679 |
+
$this->_roundingDeltas[$key] : 0;
|
680 |
+
$this->_roundingDeltas[$key] = $store->roundPrice($amount + $delta)
|
681 |
+
- $amount;
|
682 |
+
return $store->roundPrice($amount + $delta);
|
683 |
+
}
|
684 |
+
|
685 |
+
/**
|
686 |
+
* Round the amount with deltas collected
|
687 |
+
*
|
688 |
+
* @param string $key
|
689 |
+
* @param float $amount
|
690 |
+
* @param Mage_Core_Model_Store $store
|
691 |
+
* @return float
|
692 |
+
*/
|
693 |
+
protected function _roundWithDeltasForBase($key, $amount, $store)
|
694 |
+
{
|
695 |
+
$delta = isset($this->_baseRoundingDeltas[$key]) ?
|
696 |
+
$this->_roundingDeltas[$key] : 0;
|
697 |
+
$this->_baseRoundingDeltas[$key] = $store->roundPrice($amount + $delta)
|
698 |
+
- $amount;
|
699 |
+
return $store->roundPrice($amount + $delta);
|
700 |
+
}
|
701 |
+
|
702 |
/**
|
703 |
* Apply discounts to shipping amount
|
704 |
*
|
731 |
case Mage_SalesRule_Model_Rule::BY_PERCENT_ACTION:
|
732 |
$discountAmount = ($shippingAmount - $address->getShippingDiscountAmount()) * $rulePercent/100;
|
733 |
$baseDiscountAmount = ($baseShippingAmount -
|
734 |
+
$address->getBaseShippingDiscountAmount()) * $rulePercent/100;
|
735 |
$discountPercent = min(100, $address->getShippingDiscountPercent()+$rulePercent);
|
736 |
$address->setShippingDiscountPercent($discountPercent);
|
737 |
break;
|
807 |
}
|
808 |
$a = array_unique(array_merge($a1, $a2));
|
809 |
if ($asString) {
|
810 |
+
$a = implode(',', $a);
|
811 |
}
|
812 |
return $a;
|
813 |
}
|
1032 |
* wrap Mage::helper
|
1033 |
*
|
1034 |
* @param string $name
|
1035 |
+
* @return Mage_Weee_Helper_Data
|
1036 |
*/
|
1037 |
protected function _getHelper($name) {
|
1038 |
return Mage::helper($name);
|
app/code/core/Mage/Shipping/Model/Carrier/Tablerate.php
CHANGED
@@ -24,22 +24,49 @@
|
|
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 |
extends Mage_Shipping_Model_Carrier_Abstract
|
30 |
implements Mage_Shipping_Model_Carrier_Interface
|
31 |
{
|
32 |
|
|
|
|
|
|
|
|
|
|
|
33 |
protected $_code = 'tablerate';
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
protected $_isFixed = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
protected $_default_condition_name = 'package_weight';
|
36 |
|
|
|
|
|
|
|
|
|
|
|
37 |
protected $_conditionNames = array();
|
38 |
|
|
|
|
|
|
|
39 |
public function __construct()
|
40 |
{
|
41 |
parent::__construct();
|
42 |
-
foreach ($this->getCode('condition_name') as $k
|
43 |
$this->_conditionNames[] = $k;
|
44 |
}
|
45 |
}
|
@@ -108,21 +135,21 @@ class Mage_Shipping_Model_Carrier_Tablerate
|
|
108 |
$request->setConditionName($conditionName ? $conditionName : $this->_default_condition_name);
|
109 |
}
|
110 |
|
111 |
-
|
112 |
$oldWeight = $request->getPackageWeight();
|
113 |
$oldQty = $request->getPackageQty();
|
114 |
|
115 |
$request->setPackageWeight($request->getFreeMethodWeight());
|
116 |
$request->setPackageQty($oldQty - $freeQty);
|
117 |
|
118 |
-
$result =
|
119 |
$rate = $this->getRate($request);
|
120 |
|
121 |
$request->setPackageWeight($oldWeight);
|
122 |
$request->setPackageQty($oldQty);
|
123 |
|
124 |
if (!empty($rate) && $rate['price'] >= 0) {
|
125 |
-
$method =
|
126 |
|
127 |
$method->setCarrier('tablerate');
|
128 |
$method->setCarrierTitle($this->getConfigData('title'));
|
@@ -151,7 +178,7 @@ class Mage_Shipping_Model_Carrier_Tablerate
|
|
151 |
$request->setPackageQty($freeQty);
|
152 |
$rate = $this->getRate($request);
|
153 |
if (!empty($rate) && $rate['price'] >= 0) {
|
154 |
-
$method =
|
155 |
|
156 |
$method->setCarrier('tablerate');
|
157 |
$method->setCarrierTitle($this->getConfigData('title'));
|
@@ -165,7 +192,7 @@ class Mage_Shipping_Model_Carrier_Tablerate
|
|
165 |
$result->append($method);
|
166 |
}
|
167 |
} else {
|
168 |
-
$error =
|
169 |
$error->setCarrier('tablerate');
|
170 |
$error->setCarrierTitle($this->getConfigData('title'));
|
171 |
$error->setErrorMessage($this->getConfigData('specificerrmsg'));
|
@@ -175,25 +202,52 @@ class Mage_Shipping_Model_Carrier_Tablerate
|
|
175 |
return $result;
|
176 |
}
|
177 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
public function getRate(Mage_Shipping_Model_Rate_Request $request)
|
179 |
{
|
180 |
return Mage::getResourceModel('shipping/carrier_tablerate')->getRate($request);
|
181 |
}
|
182 |
|
183 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
184 |
{
|
185 |
$codes = array(
|
186 |
|
187 |
-
'condition_name'=>array(
|
188 |
'package_weight' => Mage::helper('shipping')->__('Weight vs. Destination'),
|
189 |
-
'package_value'
|
190 |
-
'package_qty'
|
191 |
),
|
192 |
|
193 |
-
'condition_name_short'=>array(
|
194 |
'package_weight' => Mage::helper('shipping')->__('Weight (and above)'),
|
195 |
-
'package_value'
|
196 |
-
'package_qty'
|
197 |
),
|
198 |
|
199 |
);
|
@@ -202,7 +256,7 @@ class Mage_Shipping_Model_Carrier_Tablerate
|
|
202 |
throw Mage::exception('Mage_Shipping', Mage::helper('shipping')->__('Invalid Table Rate code type: %s', $type));
|
203 |
}
|
204 |
|
205 |
-
if (''
|
206 |
return $codes[$type];
|
207 |
}
|
208 |
|
@@ -220,7 +274,7 @@ class Mage_Shipping_Model_Carrier_Tablerate
|
|
220 |
*/
|
221 |
public function getAllowedMethods()
|
222 |
{
|
223 |
-
return array('bestway'
|
224 |
}
|
225 |
|
226 |
}
|
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 |
}
|
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'));
|
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'));
|
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'));
|
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 |
);
|
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 |
|
274 |
*/
|
275 |
public function getAllowedMethods()
|
276 |
{
|
277 |
+
return array('bestway' => $this->getConfigData('name'));
|
278 |
}
|
279 |
|
280 |
}
|
app/code/core/Mage/Tax/Block/Adminhtml/Notifications.php
CHANGED
@@ -84,6 +84,41 @@ class Mage_Tax_Block_Adminhtml_Notifications extends Mage_Adminhtml_Block_Templa
|
|
84 |
return $storeNames;
|
85 |
}
|
86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
/**
|
88 |
* Check if tax calculation type and price display settings are compatible
|
89 |
*
|
@@ -163,3 +198,4 @@ class Mage_Tax_Block_Adminhtml_Notifications extends Mage_Adminhtml_Block_Templa
|
|
163 |
return '';
|
164 |
}
|
165 |
}
|
|
84 |
return $storeNames;
|
85 |
}
|
86 |
|
87 |
+
/**
|
88 |
+
* Return list of store names which have not compatible tax calculation type and price display settings.
|
89 |
+
* Return true if settings are wrong for default store.
|
90 |
+
*
|
91 |
+
* @return array
|
92 |
+
*/
|
93 |
+
public function getStoresWithConflictingFptTaxConfigurationSettings()
|
94 |
+
{
|
95 |
+
$weeeTaxHelper = $this->_factory->getHelper('weee');
|
96 |
+
|
97 |
+
$storeNames = array();
|
98 |
+
$stores = $this->_app->getStores();
|
99 |
+
foreach ($stores as $store) {
|
100 |
+
if ($weeeTaxHelper->validateCatalogPricesAndFptConfiguration($store)) {
|
101 |
+
$website = $store->getWebsite();
|
102 |
+
$storeNames[] = $website->getName() . '(' . $store->getName() . ')';
|
103 |
+
}
|
104 |
+
}
|
105 |
+
return $storeNames;
|
106 |
+
}
|
107 |
+
|
108 |
+
/**
|
109 |
+
* Return boolean determining if FPT/ Catalog Price settings is conflicting or not.
|
110 |
+
*
|
111 |
+
* @return boolean
|
112 |
+
*/
|
113 |
+
public function isDefaultStoreWithConflictingFptTaxConfigurationSettings()
|
114 |
+
{
|
115 |
+
$weeeTaxHelper = $this->_factory->getHelper('weee');
|
116 |
+
$defaultStoreId = Mage_Catalog_Model_Abstract::DEFAULT_STORE_ID;
|
117 |
+
|
118 |
+
//check default store first
|
119 |
+
return $weeeTaxHelper->validateCatalogPricesAndFptConfiguration($defaultStoreId);
|
120 |
+
}
|
121 |
+
|
122 |
/**
|
123 |
* Check if tax calculation type and price display settings are compatible
|
124 |
*
|
198 |
return '';
|
199 |
}
|
200 |
}
|
201 |
+
|
app/code/core/Mage/Tax/Block/Checkout/Tax.php
CHANGED
@@ -66,16 +66,19 @@ class Mage_Tax_Block_Checkout_Tax extends Mage_Checkout_Block_Total_Default
|
|
66 |
$allWeee = array();
|
67 |
$store = $this->getTotal()->getAddress()->getQuote()->getStore();
|
68 |
$helper = $this->_factory->getHelper('weee');
|
|
|
69 |
if (!$helper->includeInSubtotal($store)) {
|
70 |
foreach ($this->getTotal()->getAddress()->getCachedItemsAll() as $item) {
|
71 |
foreach ($helper->getApplied($item) as $tax) {
|
72 |
$weeeDiscount = isset($tax['weee_discount']) ? $tax['weee_discount'] : 0;
|
73 |
$title = $tax['title'];
|
74 |
-
$
|
|
|
|
|
75 |
if (array_key_exists($title, $allWeee)) {
|
76 |
-
$allWeee[$title] = $allWeee[$title] + $
|
77 |
} else {
|
78 |
-
$allWeee[$title] = $
|
79 |
}
|
80 |
}
|
81 |
}
|
66 |
$allWeee = array();
|
67 |
$store = $this->getTotal()->getAddress()->getQuote()->getStore();
|
68 |
$helper = $this->_factory->getHelper('weee');
|
69 |
+
|
70 |
if (!$helper->includeInSubtotal($store)) {
|
71 |
foreach ($this->getTotal()->getAddress()->getCachedItemsAll() as $item) {
|
72 |
foreach ($helper->getApplied($item) as $tax) {
|
73 |
$weeeDiscount = isset($tax['weee_discount']) ? $tax['weee_discount'] : 0;
|
74 |
$title = $tax['title'];
|
75 |
+
$rowAmount = isset($tax['row_amount']) ? $tax['row_amount'] : 0;
|
76 |
+
$rowAmountInclTax = isset($tax['row_amount_incl_tax']) ? $tax['row_amount_incl_tax'] : 0;
|
77 |
+
$amountDisplayed = ($helper->isTaxIncluded()) ? $rowAmountInclTax : $rowAmount;
|
78 |
if (array_key_exists($title, $allWeee)) {
|
79 |
+
$allWeee[$title] = $allWeee[$title] + $amountDisplayed - $weeeDiscount;
|
80 |
} else {
|
81 |
+
$allWeee[$title] = $amountDisplayed - $weeeDiscount;
|
82 |
}
|
83 |
}
|
84 |
}
|
app/code/core/Mage/Tax/Block/Sales/Order/Tax.php
CHANGED
@@ -132,14 +132,23 @@ class Mage_Tax_Block_Sales_Order_Tax extends Mage_Core_Block_Template
|
|
132 |
$subtotalIncl = (float) $this->_source->getSubtotalInclTax();
|
133 |
$baseSubtotalIncl= (float) $this->_source->getBaseSubtotalInclTax();
|
134 |
|
135 |
-
if (!$subtotalIncl) {
|
136 |
-
|
|
|
137 |
- $this->_source->getShippingTaxAmount();
|
138 |
-
}
|
139 |
-
if (!$baseSubtotalIncl) {
|
140 |
$baseSubtotalIncl = $baseSubtotal + $this->_source->getBaseTaxAmount()
|
141 |
- $this->_source->getBaseShippingTaxAmount();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
}
|
|
|
143 |
$subtotalIncl = max(0, $subtotalIncl);
|
144 |
$baseSubtotalIncl = max(0, $baseSubtotalIncl);
|
145 |
$totalExcl = new Varien_Object(array(
|
132 |
$subtotalIncl = (float) $this->_source->getSubtotalInclTax();
|
133 |
$baseSubtotalIncl= (float) $this->_source->getBaseSubtotalInclTax();
|
134 |
|
135 |
+
if (!$subtotalIncl || !$baseSubtotalIncl) {
|
136 |
+
//Calculate the subtotal if not set
|
137 |
+
$subtotalIncl = $subtotal + $this->_source->getTaxAmount()
|
138 |
- $this->_source->getShippingTaxAmount();
|
|
|
|
|
139 |
$baseSubtotalIncl = $baseSubtotal + $this->_source->getBaseTaxAmount()
|
140 |
- $this->_source->getBaseShippingTaxAmount();
|
141 |
+
|
142 |
+
if ($this->_source instanceof Mage_Sales_Model_Order) {
|
143 |
+
//Adjust the discount amounts for the base and well as the weee to display the right totals
|
144 |
+
foreach ($this->_source->getAllItems() as $item) {
|
145 |
+
$subtotalIncl += $item->getHiddenTaxAmount() + $item->getDiscountAppliedForWeeeTax();
|
146 |
+
$baseSubtotalIncl += $item->getBaseHiddenTaxAmount() +
|
147 |
+
$item->getBaseDiscountAppliedForWeeeTax();
|
148 |
+
}
|
149 |
+
}
|
150 |
}
|
151 |
+
|
152 |
$subtotalIncl = max(0, $subtotalIncl);
|
153 |
$baseSubtotalIncl = max(0, $baseSubtotalIncl);
|
154 |
$totalExcl = new Varien_Object(array(
|
app/code/core/Mage/Tax/Helper/Data.php
CHANGED
@@ -51,7 +51,7 @@ class Mage_Tax_Helper_Data extends Mage_Core_Helper_Abstract
|
|
51 |
*
|
52 |
* @var Mage_Tac_Model_Calculation
|
53 |
*/
|
54 |
-
protected $_calculator
|
55 |
|
56 |
/**
|
57 |
* Display tax column
|
@@ -481,13 +481,13 @@ class Mage_Tax_Helper_Data extends Mage_Core_Helper_Abstract
|
|
481 |
* @param null|Mage_Customer_Model_Address $shippingAddress
|
482 |
* @param null|Mage_Customer_Model_Address $billingAddress
|
483 |
* @param null|int $ctc customer tax class
|
484 |
-
* @param
|
485 |
* @param bool $priceIncludesTax flag what price parameter contain tax
|
486 |
* @return float
|
487 |
*/
|
488 |
public function getPrice($product, $price, $includingTax = null, $shippingAddress = null, $billingAddress = null,
|
489 |
-
|
490 |
-
|
491 |
if (!$price) {
|
492 |
return $price;
|
493 |
}
|
@@ -524,39 +524,35 @@ class Mage_Tax_Helper_Data extends Mage_Core_Helper_Abstract
|
|
524 |
}
|
525 |
|
526 |
$product->setTaxPercent($percent);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
527 |
|
528 |
if (!is_null($includingTax)) {
|
529 |
if ($priceIncludesTax) {
|
530 |
if ($includingTax) {
|
531 |
/**
|
532 |
-
* Recalculate price include tax in case of different rates
|
533 |
*/
|
534 |
if ($includingPercent != $percent) {
|
535 |
-
|
536 |
-
|
537 |
-
* Using regular rounding. Ex:
|
538 |
-
* price incl tax = 52.76
|
539 |
-
* store tax rate = 19.6%
|
540 |
-
* customer tax rate= 19%
|
541 |
-
*
|
542 |
-
* price excl tax = 52.76 / 1.196 = 44.11371237 ~ 44.11
|
543 |
-
* tax = 44.11371237 * 0.19 = 8.381605351 ~ 8.38
|
544 |
-
* price incl tax = 52.49531773 ~ 52.50 != 52.49
|
545 |
-
*
|
546 |
-
* that why we need round prices excluding tax before applying tax
|
547 |
-
* this calculation is used for showing prices on catalog pages
|
548 |
-
*/
|
549 |
-
if ($percent != 0) {
|
550 |
-
$price = $this->getCalculator()->round($price);
|
551 |
-
$price = $this->_calculatePrice($price, $percent, true);
|
552 |
-
}
|
553 |
}
|
554 |
} else {
|
555 |
$price = $this->_calculatePrice($price, $includingPercent, false);
|
556 |
}
|
557 |
} else {
|
558 |
if ($includingTax) {
|
559 |
-
$
|
|
|
|
|
|
|
|
|
|
|
560 |
}
|
561 |
}
|
562 |
} else {
|
@@ -565,10 +561,16 @@ class Mage_Tax_Helper_Data extends Mage_Core_Helper_Abstract
|
|
565 |
case Mage_Tax_Model_Config::DISPLAY_TYPE_EXCLUDING_TAX:
|
566 |
case Mage_Tax_Model_Config::DISPLAY_TYPE_BOTH:
|
567 |
if ($includingPercent != $percent) {
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
572 |
}
|
573 |
break;
|
574 |
|
@@ -580,7 +582,12 @@ class Mage_Tax_Helper_Data extends Mage_Core_Helper_Abstract
|
|
580 |
} else {
|
581 |
switch ($this->getPriceDisplayType($store)) {
|
582 |
case Mage_Tax_Model_Config::DISPLAY_TYPE_INCLUDING_TAX:
|
583 |
-
$
|
|
|
|
|
|
|
|
|
|
|
584 |
break;
|
585 |
|
586 |
case Mage_Tax_Model_Config::DISPLAY_TYPE_BOTH:
|
@@ -589,7 +596,29 @@ class Mage_Tax_Helper_Data extends Mage_Core_Helper_Abstract
|
|
589 |
}
|
590 |
}
|
591 |
}
|
592 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
593 |
}
|
594 |
|
595 |
/**
|
@@ -627,13 +656,13 @@ class Mage_Tax_Helper_Data extends Mage_Core_Helper_Abstract
|
|
627 |
*
|
628 |
* @param float $price
|
629 |
* @param float $percent
|
630 |
-
* @param bool $type true -
|
631 |
* @param bool $roundTaxFirst
|
632 |
* @return float
|
633 |
*/
|
634 |
protected function _calculatePrice($price, $percent, $type, $roundTaxFirst = false)
|
635 |
{
|
636 |
-
$calculator =
|
637 |
if ($type) {
|
638 |
$taxAmount = $calculator->calcTaxAmount($price, $percent, false, $roundTaxFirst);
|
639 |
return $price + $taxAmount;
|
@@ -643,6 +672,25 @@ class Mage_Tax_Helper_Data extends Mage_Core_Helper_Abstract
|
|
643 |
}
|
644 |
}
|
645 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
646 |
/**
|
647 |
* Returns the include / exclude tax label
|
648 |
*
|
@@ -794,7 +842,7 @@ class Mage_Tax_Helper_Data extends Mage_Core_Helper_Abstract
|
|
794 |
|
795 |
if ($this->priceIncludesTax()) {
|
796 |
if ($defaultTaxString) {
|
797 |
-
$result
|
798 |
}
|
799 |
if (!$this->displayPriceExcludingTax() && $currentTaxString) {
|
800 |
$result .= "+(({$priceField}{$result})*{$currentTaxString})";
|
@@ -820,12 +868,12 @@ class Mage_Tax_Helper_Data extends Mage_Core_Helper_Abstract
|
|
820 |
{
|
821 |
$taxClassAttribute = Mage::getModel('eav/entity_attribute')
|
822 |
->loadByCode(Mage_Catalog_Model_Product::ENTITY, 'tax_class_id');
|
823 |
-
$joinConditionD = implode(' AND ',array(
|
824 |
"tax_class_d.entity_id = {$priceTable}.entity_id",
|
825 |
$select->getAdapter()->quoteInto('tax_class_d.attribute_id = ?', (int)$taxClassAttribute->getId()),
|
826 |
'tax_class_d.store_id = 0'
|
827 |
));
|
828 |
-
$joinConditionC = implode(' AND ',array(
|
829 |
"tax_class_c.entity_id = {$priceTable}.entity_id",
|
830 |
$select->getAdapter()->quoteInto('tax_class_c.attribute_id = ?', (int)$taxClassAttribute->getId()),
|
831 |
$select->getAdapter()->quoteInto('tax_class_c.store_id = ?', (int)$storeId)
|
@@ -874,7 +922,7 @@ class Mage_Tax_Helper_Data extends Mage_Core_Helper_Abstract
|
|
874 |
*/
|
875 |
public function applyTaxOnCustomPrice($store = null)
|
876 |
{
|
877 |
-
return ((int)
|
878 |
}
|
879 |
|
880 |
/**
|
@@ -885,7 +933,7 @@ class Mage_Tax_Helper_Data extends Mage_Core_Helper_Abstract
|
|
885 |
*/
|
886 |
public function applyTaxOnOriginalPrice($store = null)
|
887 |
{
|
888 |
-
return ((int)
|
889 |
}
|
890 |
|
891 |
/**
|
@@ -946,58 +994,56 @@ class Mage_Tax_Helper_Data extends Mage_Core_Helper_Abstract
|
|
946 |
$rates = $this->_getTaxRateSubtotals($source);
|
947 |
foreach ($rates['items'] as $rate) {
|
948 |
$taxClassId = $rate['tax_id'];
|
949 |
-
$taxClassAmount[$taxClassId]['tax_amount']
|
950 |
$taxClassAmount[$taxClassId]['base_tax_amount'] = $rate['base_amount'];
|
951 |
-
$taxClassAmount[$taxClassId]['title']
|
952 |
-
$taxClassAmount[$taxClassId]['percent']
|
953 |
}
|
954 |
} else {
|
955 |
// regenerate tax subtotals
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
956 |
foreach ($current->getItemsCollection() as $item) {
|
957 |
$taxCollection = Mage::getResourceModel('tax/sales_order_tax_item')
|
958 |
->getTaxItemsByItemId(
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
$shippingAmount = $current->getShippingAmount();
|
963 |
-
$baseShippingAmount = $current->getBaseShippingAmount();
|
964 |
-
$shippingTaxAmount = $current->getShippingTaxAmount();
|
965 |
|
966 |
foreach ($taxCollection as $tax) {
|
967 |
$taxClassId = $tax['tax_id'];
|
968 |
-
$percent
|
969 |
|
970 |
-
$price
|
971 |
$basePrice = $item->getBaseRowTotal();
|
972 |
if ($this->applyTaxAfterDiscount($item->getStoreId())) {
|
973 |
-
$price
|
974 |
$basePrice = $basePrice - $item->getBaseDiscountAmount() + $item->getBaseHiddenTaxAmount();
|
975 |
}
|
976 |
-
$tax_amount
|
977 |
$base_tax_amount = $basePrice * $percent / 100;
|
978 |
|
979 |
-
if ($shippingTaxAmount) {
|
980 |
-
$tax_amount = $tax_amount + $shippingAmount * $percent / 100;
|
981 |
-
$base_tax_amount = $base_tax_amount + $baseShippingAmount * $percent /100;
|
982 |
-
}
|
983 |
-
|
984 |
if (isset($taxClassAmount[$taxClassId])) {
|
985 |
-
$taxClassAmount[$taxClassId]['tax_amount']
|
986 |
$taxClassAmount[$taxClassId]['base_tax_amount'] += $base_tax_amount;
|
987 |
} else {
|
988 |
-
$taxClassAmount[$taxClassId]['tax_amount']
|
989 |
$taxClassAmount[$taxClassId]['base_tax_amount'] = $base_tax_amount;
|
990 |
-
$taxClassAmount[$taxClassId]['title']
|
991 |
-
$taxClassAmount[$taxClassId]['percent']
|
992 |
}
|
993 |
}
|
994 |
}
|
995 |
}
|
996 |
|
997 |
foreach ($taxClassAmount as $key => $tax) {
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
}
|
1002 |
|
1003 |
$taxClassAmount = array_values($taxClassAmount);
|
@@ -1058,19 +1104,60 @@ class Mage_Tax_Helper_Data extends Mage_Core_Helper_Abstract
|
|
1058 |
$taxClassAmount = array();
|
1059 |
if ($current && $source) {
|
1060 |
if ($current->getShippingTaxAmount() != 0 && $current->getBaseShippingTaxAmount() != 0) {
|
1061 |
-
$taxClassAmount[0]['tax_amount']
|
1062 |
-
$taxClassAmount[0]['base_tax_amount']
|
1063 |
if ($current->getShippingHiddenTaxAmount() > 0) {
|
1064 |
$taxClassAmount[0]['hidden_tax_amount'] = $current->getShippingHiddenTaxAmount();
|
1065 |
}
|
1066 |
-
$taxClassAmount[0]['title']
|
1067 |
-
$taxClassAmount[0]['percent']
|
1068 |
}
|
1069 |
}
|
1070 |
|
1071 |
return $taxClassAmount;
|
1072 |
}
|
1073 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1074 |
/**
|
1075 |
* Check if do not show notification about wrong display settings
|
1076 |
*
|
@@ -1090,4 +1177,15 @@ class Mage_Tax_Helper_Data extends Mage_Core_Helper_Abstract
|
|
1090 |
{
|
1091 |
return (bool)$this->_app->getStore()->getConfig(Mage_Tax_Model_Config::XML_PATH_TAX_NOTIFICATION_DISCOUNT);
|
1092 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1093 |
}
|
51 |
*
|
52 |
* @var Mage_Tac_Model_Calculation
|
53 |
*/
|
54 |
+
protected $_calculator = null;
|
55 |
|
56 |
/**
|
57 |
* Display tax column
|
481 |
* @param null|Mage_Customer_Model_Address $shippingAddress
|
482 |
* @param null|Mage_Customer_Model_Address $billingAddress
|
483 |
* @param null|int $ctc customer tax class
|
484 |
+
* @param null|Mage_Core_Model_Store $store
|
485 |
* @param bool $priceIncludesTax flag what price parameter contain tax
|
486 |
* @return float
|
487 |
*/
|
488 |
public function getPrice($product, $price, $includingTax = null, $shippingAddress = null, $billingAddress = null,
|
489 |
+
$ctc = null, $store = null, $priceIncludesTax = null, $roundPrice = true)
|
490 |
+
{
|
491 |
if (!$price) {
|
492 |
return $price;
|
493 |
}
|
524 |
}
|
525 |
|
526 |
$product->setTaxPercent($percent);
|
527 |
+
if ($product->getAppliedRates() == null) {
|
528 |
+
$request = Mage::getSingleton('tax/calculation')
|
529 |
+
->getRateRequest($shippingAddress, $billingAddress, $ctc, $store);
|
530 |
+
$request->setProductClassId($taxClassId);
|
531 |
+
$appliedRates = Mage::getSingleton('tax/calculation')->getAppliedRates($request);
|
532 |
+
$product->setAppliedRates($appliedRates);
|
533 |
+
}
|
534 |
|
535 |
if (!is_null($includingTax)) {
|
536 |
if ($priceIncludesTax) {
|
537 |
if ($includingTax) {
|
538 |
/**
|
539 |
+
* Recalculate price include tax in case of different rates. Otherwise price remains the same.
|
540 |
*/
|
541 |
if ($includingPercent != $percent) {
|
542 |
+
// determine the customer's price that includes tax
|
543 |
+
$price = $this->_calculatePriceInclTax($price, $includingPercent, $percent, $store);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
544 |
}
|
545 |
} else {
|
546 |
$price = $this->_calculatePrice($price, $includingPercent, false);
|
547 |
}
|
548 |
} else {
|
549 |
if ($includingTax) {
|
550 |
+
$appliedRates = $product->getAppliedRates();
|
551 |
+
if (count($appliedRates) > 1) {
|
552 |
+
$price = $this->_calculatePriceInclTaxWithMultipleRates($price, $appliedRates);
|
553 |
+
} else {
|
554 |
+
$price = $this->_calculatePrice($price, $percent, true);
|
555 |
+
}
|
556 |
}
|
557 |
}
|
558 |
} else {
|
561 |
case Mage_Tax_Model_Config::DISPLAY_TYPE_EXCLUDING_TAX:
|
562 |
case Mage_Tax_Model_Config::DISPLAY_TYPE_BOTH:
|
563 |
if ($includingPercent != $percent) {
|
564 |
+
// determine the customer's price that includes tax
|
565 |
+
$taxablePrice = $this->_calculatePriceInclTax($price, $includingPercent, $percent, $store);
|
566 |
+
// determine the customer's tax amount,
|
567 |
+
// round tax unless $roundPrice is set explicitly to false
|
568 |
+
$tax = $this->getCalculator()->calcTaxAmount($taxablePrice, $percent, true, $roundPrice);
|
569 |
+
// determine the customer's price without taxes
|
570 |
+
$price = $taxablePrice - $tax;
|
571 |
+
} else {
|
572 |
+
//round tax first unless $roundPrice is set to false explicitly
|
573 |
+
$price = $this->_calculatePrice($price, $includingPercent, false, $roundPrice);
|
574 |
}
|
575 |
break;
|
576 |
|
582 |
} else {
|
583 |
switch ($this->getPriceDisplayType($store)) {
|
584 |
case Mage_Tax_Model_Config::DISPLAY_TYPE_INCLUDING_TAX:
|
585 |
+
$appliedRates = $product->getAppliedRates();
|
586 |
+
if (count($appliedRates) > 1) {
|
587 |
+
$price = $this->_calculatePriceInclTaxWithMultipleRates($price, $appliedRates);
|
588 |
+
} else {
|
589 |
+
$price = $this->_calculatePrice($price, $percent, true);
|
590 |
+
}
|
591 |
break;
|
592 |
|
593 |
case Mage_Tax_Model_Config::DISPLAY_TYPE_BOTH:
|
596 |
}
|
597 |
}
|
598 |
}
|
599 |
+
if ($roundPrice) {
|
600 |
+
return $store->roundPrice($price);
|
601 |
+
} else {
|
602 |
+
return $price;
|
603 |
+
}
|
604 |
+
}
|
605 |
+
|
606 |
+
/**
|
607 |
+
* Given a store price that includes tax at the store rate, this function will back out the store's tax, and add in
|
608 |
+
* the customer's tax. Returns this new price which is the customer's price including tax.
|
609 |
+
*
|
610 |
+
* @param float $storePriceInclTax
|
611 |
+
* @param float $storePercent
|
612 |
+
* @param float $customerPercent
|
613 |
+
* @param Mage_Core_Model_Store $store
|
614 |
+
* @return float
|
615 |
+
*/
|
616 |
+
protected function _calculatePriceInclTax($storePriceInclTax, $storePercent, $customerPercent, $store)
|
617 |
+
{
|
618 |
+
$priceExclTax = $this->_calculatePrice($storePriceInclTax, $storePercent, false, false);
|
619 |
+
$customerTax = $this->getCalculator()->calcTaxAmount($priceExclTax, $customerPercent, false, false);
|
620 |
+
$customerPriceInclTax = $store->roundPrice($priceExclTax + $customerTax);
|
621 |
+
return $customerPriceInclTax;
|
622 |
}
|
623 |
|
624 |
/**
|
656 |
*
|
657 |
* @param float $price
|
658 |
* @param float $percent
|
659 |
+
* @param bool $type true - to calculate the price including tax and false if calculating price to exclude tax
|
660 |
* @param bool $roundTaxFirst
|
661 |
* @return float
|
662 |
*/
|
663 |
protected function _calculatePrice($price, $percent, $type, $roundTaxFirst = false)
|
664 |
{
|
665 |
+
$calculator = $this->getCalculator();
|
666 |
if ($type) {
|
667 |
$taxAmount = $calculator->calcTaxAmount($price, $percent, false, $roundTaxFirst);
|
668 |
return $price + $taxAmount;
|
672 |
}
|
673 |
}
|
674 |
|
675 |
+
/**
|
676 |
+
* Calculate price including tax when multiple taxes is applied and rounded
|
677 |
+
* independently.
|
678 |
+
*
|
679 |
+
* @param foat $price
|
680 |
+
* @param array $appliedRates
|
681 |
+
* @return float
|
682 |
+
*/
|
683 |
+
protected function _calculatePriceInclTaxWithMultipleRates($price, $appliedRates)
|
684 |
+
{
|
685 |
+
$calculator = $this->getCalculator();
|
686 |
+
$tax = 0;
|
687 |
+
foreach ($appliedRates as $appliedRate) {
|
688 |
+
$taxRate = $appliedRate['percent'];
|
689 |
+
$tax += $calculator->round($price * $taxRate / 100);
|
690 |
+
}
|
691 |
+
return $tax + $price;
|
692 |
+
}
|
693 |
+
|
694 |
/**
|
695 |
* Returns the include / exclude tax label
|
696 |
*
|
842 |
|
843 |
if ($this->priceIncludesTax()) {
|
844 |
if ($defaultTaxString) {
|
845 |
+
$result = "-({$priceField}/(1+({$defaultTaxString}))*{$defaultTaxString})";
|
846 |
}
|
847 |
if (!$this->displayPriceExcludingTax() && $currentTaxString) {
|
848 |
$result .= "+(({$priceField}{$result})*{$currentTaxString})";
|
868 |
{
|
869 |
$taxClassAttribute = Mage::getModel('eav/entity_attribute')
|
870 |
->loadByCode(Mage_Catalog_Model_Product::ENTITY, 'tax_class_id');
|
871 |
+
$joinConditionD = implode(' AND ', array(
|
872 |
"tax_class_d.entity_id = {$priceTable}.entity_id",
|
873 |
$select->getAdapter()->quoteInto('tax_class_d.attribute_id = ?', (int)$taxClassAttribute->getId()),
|
874 |
'tax_class_d.store_id = 0'
|
875 |
));
|
876 |
+
$joinConditionC = implode(' AND ', array(
|
877 |
"tax_class_c.entity_id = {$priceTable}.entity_id",
|
878 |
$select->getAdapter()->quoteInto('tax_class_c.attribute_id = ?', (int)$taxClassAttribute->getId()),
|
879 |
$select->getAdapter()->quoteInto('tax_class_c.store_id = ?', (int)$storeId)
|
922 |
*/
|
923 |
public function applyTaxOnCustomPrice($store = null)
|
924 |
{
|
925 |
+
return ((int)Mage::getStoreConfig(Mage_Tax_Model_Config::CONFIG_XML_PATH_APPLY_ON, $store) == 0);
|
926 |
}
|
927 |
|
928 |
/**
|
933 |
*/
|
934 |
public function applyTaxOnOriginalPrice($store = null)
|
935 |
{
|
936 |
+
return ((int)Mage::getStoreConfig(Mage_Tax_Model_Config::CONFIG_XML_PATH_APPLY_ON, $store) == 1);
|
937 |
}
|
938 |
|
939 |
/**
|
994 |
$rates = $this->_getTaxRateSubtotals($source);
|
995 |
foreach ($rates['items'] as $rate) {
|
996 |
$taxClassId = $rate['tax_id'];
|
997 |
+
$taxClassAmount[$taxClassId]['tax_amount'] = $rate['amount'];
|
998 |
$taxClassAmount[$taxClassId]['base_tax_amount'] = $rate['base_amount'];
|
999 |
+
$taxClassAmount[$taxClassId]['title'] = $rate['title'];
|
1000 |
+
$taxClassAmount[$taxClassId]['percent'] = $rate['percent'];
|
1001 |
}
|
1002 |
} else {
|
1003 |
// regenerate tax subtotals
|
1004 |
+
// Calculate taxes for shipping
|
1005 |
+
$shippingTaxAmount = $current->getShippingTaxAmount();
|
1006 |
+
if ($shippingTaxAmount) {
|
1007 |
+
$shippingTax = Mage::helper('tax')->getShippingTax($current);
|
1008 |
+
$taxClassAmount = array_merge($taxClassAmount, $shippingTax);
|
1009 |
+
}
|
1010 |
+
|
1011 |
foreach ($current->getItemsCollection() as $item) {
|
1012 |
$taxCollection = Mage::getResourceModel('tax/sales_order_tax_item')
|
1013 |
->getTaxItemsByItemId(
|
1014 |
+
$item->getOrderItemId() ? $item->getOrderItemId() : $item->getItemId()
|
1015 |
+
);
|
|
|
|
|
|
|
|
|
1016 |
|
1017 |
foreach ($taxCollection as $tax) {
|
1018 |
$taxClassId = $tax['tax_id'];
|
1019 |
+
$percent = $tax['tax_percent'];
|
1020 |
|
1021 |
+
$price = $item->getRowTotal();
|
1022 |
$basePrice = $item->getBaseRowTotal();
|
1023 |
if ($this->applyTaxAfterDiscount($item->getStoreId())) {
|
1024 |
+
$price = $price - $item->getDiscountAmount() + $item->getHiddenTaxAmount();
|
1025 |
$basePrice = $basePrice - $item->getBaseDiscountAmount() + $item->getBaseHiddenTaxAmount();
|
1026 |
}
|
1027 |
+
$tax_amount = $price * $percent / 100;
|
1028 |
$base_tax_amount = $basePrice * $percent / 100;
|
1029 |
|
|
|
|
|
|
|
|
|
|
|
1030 |
if (isset($taxClassAmount[$taxClassId])) {
|
1031 |
+
$taxClassAmount[$taxClassId]['tax_amount'] += $tax_amount;
|
1032 |
$taxClassAmount[$taxClassId]['base_tax_amount'] += $base_tax_amount;
|
1033 |
} else {
|
1034 |
+
$taxClassAmount[$taxClassId]['tax_amount'] = $tax_amount;
|
1035 |
$taxClassAmount[$taxClassId]['base_tax_amount'] = $base_tax_amount;
|
1036 |
+
$taxClassAmount[$taxClassId]['title'] = $tax['title'];
|
1037 |
+
$taxClassAmount[$taxClassId]['percent'] = $tax['percent'];
|
1038 |
}
|
1039 |
}
|
1040 |
}
|
1041 |
}
|
1042 |
|
1043 |
foreach ($taxClassAmount as $key => $tax) {
|
1044 |
+
if ($tax['tax_amount'] == 0 && $tax['base_tax_amount'] == 0) {
|
1045 |
+
unset($taxClassAmount[$key]);
|
1046 |
+
}
|
1047 |
}
|
1048 |
|
1049 |
$taxClassAmount = array_values($taxClassAmount);
|
1104 |
$taxClassAmount = array();
|
1105 |
if ($current && $source) {
|
1106 |
if ($current->getShippingTaxAmount() != 0 && $current->getBaseShippingTaxAmount() != 0) {
|
1107 |
+
$taxClassAmount[0]['tax_amount'] = $current->getShippingTaxAmount();
|
1108 |
+
$taxClassAmount[0]['base_tax_amount'] = $current->getBaseShippingTaxAmount();
|
1109 |
if ($current->getShippingHiddenTaxAmount() > 0) {
|
1110 |
$taxClassAmount[0]['hidden_tax_amount'] = $current->getShippingHiddenTaxAmount();
|
1111 |
}
|
1112 |
+
$taxClassAmount[0]['title'] = $this->__('Shipping & Handling Tax');
|
1113 |
+
$taxClassAmount[0]['percent'] = NULL;
|
1114 |
}
|
1115 |
}
|
1116 |
|
1117 |
return $taxClassAmount;
|
1118 |
}
|
1119 |
|
1120 |
+
/**
|
1121 |
+
* Get all FPTs
|
1122 |
+
*
|
1123 |
+
* @return array
|
1124 |
+
*/
|
1125 |
+
public function getAllWeee($source = null)
|
1126 |
+
{
|
1127 |
+
$allWeee = array();
|
1128 |
+
$store = $this->_app->getStore();
|
1129 |
+
|
1130 |
+
if (Mage::registry('current_invoice')) {
|
1131 |
+
$source = Mage::registry('current_invoice');
|
1132 |
+
} elseif (Mage::registry('current_creditmemo')) {
|
1133 |
+
$source = Mage::registry('current_creditmemo');
|
1134 |
+
} elseif ($source == null) {
|
1135 |
+
$source = $this->_app->getOrder();
|
1136 |
+
}
|
1137 |
+
|
1138 |
+
$helper = Mage::helper('weee');
|
1139 |
+
if (!$helper->includeInSubtotal($store)) {
|
1140 |
+
foreach ($source->getAllItems() as $item) {
|
1141 |
+
foreach ($helper->getApplied($item) as $tax) {
|
1142 |
+
$weeeDiscount = isset($tax['weee_discount']) ? $tax['weee_discount'] : 0;
|
1143 |
+
$title = $tax['title'];
|
1144 |
+
|
1145 |
+
$rowAmount = isset($tax['row_amount']) ? $tax['row_amount'] : 0;
|
1146 |
+
$rowAmountInclTax = isset($tax['row_amount_incl_tax']) ? $tax['row_amount_incl_tax'] : 0;
|
1147 |
+
$amountDisplayed = ($helper->isTaxIncluded()) ? $rowAmountInclTax : $rowAmount;
|
1148 |
+
|
1149 |
+
if (array_key_exists($title, $allWeee)) {
|
1150 |
+
$allWeee[$title] = $allWeee[$title] + $amountDisplayed - $weeeDiscount;
|
1151 |
+
} else {
|
1152 |
+
$allWeee[$title] = $amountDisplayed - $weeeDiscount;
|
1153 |
+
}
|
1154 |
+
}
|
1155 |
+
}
|
1156 |
+
}
|
1157 |
+
|
1158 |
+
return $allWeee;
|
1159 |
+
}
|
1160 |
+
|
1161 |
/**
|
1162 |
* Check if do not show notification about wrong display settings
|
1163 |
*
|
1177 |
{
|
1178 |
return (bool)$this->_app->getStore()->getConfig(Mage_Tax_Model_Config::XML_PATH_TAX_NOTIFICATION_DISCOUNT);
|
1179 |
}
|
1180 |
+
|
1181 |
+
/**
|
1182 |
+
* Check if warning about conflicting FPT configuration should be shown
|
1183 |
+
*
|
1184 |
+
* @return bool
|
1185 |
+
*/
|
1186 |
+
public function isConflictingFptTaxConfigurationSettingsIgnored()
|
1187 |
+
{
|
1188 |
+
return (bool) $this->_app->getStore()
|
1189 |
+
->getConfig(Mage_Tax_Model_Config::XML_PATH_TAX_NOTIFICATION_FPT_CONFIGURATION);
|
1190 |
+
}
|
1191 |
}
|
app/code/core/Mage/Tax/Model/Calculation.php
CHANGED
@@ -31,25 +31,88 @@
|
|
31 |
*/
|
32 |
class Mage_Tax_Model_Calculation extends Mage_Core_Model_Abstract
|
33 |
{
|
|
|
|
|
|
|
34 |
const CALC_TAX_BEFORE_DISCOUNT_ON_EXCL = '0_0';
|
|
|
|
|
|
|
|
|
|
|
35 |
const CALC_TAX_BEFORE_DISCOUNT_ON_INCL = '0_1';
|
|
|
|
|
|
|
|
|
|
|
36 |
const CALC_TAX_AFTER_DISCOUNT_ON_EXCL = '1_0';
|
|
|
|
|
|
|
|
|
37 |
const CALC_TAX_AFTER_DISCOUNT_ON_INCL = '1_1';
|
38 |
|
39 |
-
const CALC_UNIT_BASE = 'UNIT_BASE_CALCULATION';
|
40 |
-
const CALC_ROW_BASE = 'ROW_BASE_CALCULATION';
|
41 |
-
const CALC_TOTAL_BASE = 'TOTAL_BASE_CALCULATION';
|
42 |
|
|
|
|
|
|
|
43 |
protected $_rates = array();
|
|
|
|
|
|
|
44 |
protected $_ctc = array();
|
|
|
|
|
|
|
45 |
protected $_ptc = array();
|
46 |
|
47 |
-
|
48 |
-
|
|
|
|
|
49 |
|
50 |
-
|
51 |
-
|
|
|
|
|
52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
protected function _construct()
|
54 |
{
|
55 |
$this->_init('tax/calculation');
|
@@ -67,6 +130,12 @@ class Mage_Tax_Model_Calculation extends Mage_Core_Model_Abstract
|
|
67 |
return $this;
|
68 |
}
|
69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
public function getDefaultCustomerTaxClass($store = null)
|
71 |
{
|
72 |
if ($this->_defaultCustomerTaxClass === null) {
|
@@ -161,7 +230,8 @@ class Mage_Tax_Model_Calculation extends Mage_Core_Model_Abstract
|
|
161 |
$value = $this->getRateValue();
|
162 |
$id = $this->getRateId();
|
163 |
|
164 |
-
$rate = array(
|
|
|
165 |
|
166 |
$process = array();
|
167 |
$process['percent'] = $value;
|
@@ -188,7 +258,8 @@ class Mage_Tax_Model_Calculation extends Mage_Core_Model_Abstract
|
|
188 |
$this->unsRateValue();
|
189 |
$this->unsCalculationProcess();
|
190 |
$this->unsEventModuleId();
|
191 |
-
Mage::dispatchEvent('tax_rate_data_fetch', array(
|
|
|
192 |
if (!$this->hasRateValue()) {
|
193 |
$rateInfo = $this->_getResource()->getRateInfo($request);
|
194 |
$this->setCalculationProcess($rateInfo['process']);
|
@@ -211,8 +282,8 @@ class Mage_Tax_Model_Calculation extends Mage_Core_Model_Abstract
|
|
211 |
protected function _getRequestCacheKey($request)
|
212 |
{
|
213 |
$key = $request->getStore() ? $request->getStore()->getId() . '|' : '';
|
214 |
-
$key.= $request->getProductClassId() . '|' . $request->getCustomerClassId() . '|'
|
215 |
-
. $request->getCountryId() . '|'. $request->getRegionId() . '|' . $request->getPostcode();
|
216 |
return $key;
|
217 |
}
|
218 |
|
@@ -224,13 +295,29 @@ class Mage_Tax_Model_Calculation extends Mage_Core_Model_Abstract
|
|
224 |
* @param Varien_Object $request
|
225 |
* @return float
|
226 |
*/
|
227 |
-
public function getStoreRate($request, $store=null)
|
228 |
{
|
229 |
$storeRequest = $this->getRateOriginRequest($store)
|
230 |
->setProductClassId($request->getProductClassId());
|
231 |
return $this->getRate($storeRequest);
|
232 |
}
|
233 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
/**
|
235 |
* Get request object for getting tax rate based on store shippig original address
|
236 |
*
|
@@ -272,19 +359,20 @@ class Mage_Tax_Model_Calculation extends Mage_Core_Model_Abstract
|
|
272 |
if ($shippingAddress === false && $billingAddress === false && $customerTaxClass === false) {
|
273 |
return $this->getRateOriginRequest($store);
|
274 |
}
|
275 |
-
$address
|
276 |
-
$customer
|
277 |
-
$basedOn
|
278 |
|
279 |
if (($shippingAddress === false && $basedOn == 'shipping')
|
280 |
-
|| ($billingAddress === false && $basedOn == 'billing')
|
|
|
281 |
$basedOn = 'default';
|
282 |
} else {
|
283 |
if ((($billingAddress === false || is_null($billingAddress) || !$billingAddress->getCountryId())
|
284 |
&& $basedOn == 'billing')
|
285 |
|| (($shippingAddress === false || is_null($shippingAddress) || !$shippingAddress->getCountryId())
|
286 |
-
|
287 |
-
){
|
288 |
if ($customer) {
|
289 |
$defBilling = $customer->getDefaultBillingAddress();
|
290 |
$defShipping = $customer->getDefaultShippingAddress();
|
@@ -315,19 +403,20 @@ class Mage_Tax_Model_Calculation extends Mage_Core_Model_Abstract
|
|
315 |
case 'default':
|
316 |
$address
|
317 |
->setCountryId(Mage::getStoreConfig(
|
318 |
-
|
319 |
-
|
320 |
->setRegionId(Mage::getStoreConfig(Mage_Tax_Model_Config::CONFIG_XML_PATH_DEFAULT_REGION, $store))
|
321 |
->setPostcode(Mage::getStoreConfig(
|
322 |
-
|
323 |
-
|
324 |
break;
|
325 |
}
|
326 |
|
327 |
if (is_null($customerTaxClass) && $customer) {
|
328 |
$customerTaxClass = $customer->getTaxClassId();
|
329 |
} elseif (($customerTaxClass === false) || !$customer) {
|
330 |
-
$customerTaxClass =
|
|
|
331 |
}
|
332 |
|
333 |
$request = new Varien_Object();
|
@@ -357,8 +446,8 @@ class Mage_Tax_Model_Calculation extends Mage_Core_Model_Abstract
|
|
357 |
$country = $first->getCountryId() == $second->getCountryId();
|
358 |
// "0" support for admin dropdown with --please select--
|
359 |
$region = (int)$first->getRegionId() == (int)$second->getRegionId();
|
360 |
-
$postcode= $first->getPostcode() == $second->getPostcode();
|
361 |
-
$taxClass= $first->getCustomerClassId() == $second->getCustomerClassId();
|
362 |
|
363 |
if ($country && $region && $postcode && $taxClass) {
|
364 |
return true;
|
@@ -401,6 +490,14 @@ class Mage_Tax_Model_Calculation extends Mage_Core_Model_Abstract
|
|
401 |
return $identical;
|
402 |
}
|
403 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
404 |
protected function _getRates($request, $fieldName, $type)
|
405 |
{
|
406 |
$result = array();
|
@@ -415,10 +512,23 @@ class Mage_Tax_Model_Calculation extends Mage_Core_Model_Abstract
|
|
415 |
return $result;
|
416 |
}
|
417 |
|
|
|
|
|
|
|
|
|
|
|
|
|
418 |
public function getRatesForAllProductTaxClasses($request)
|
419 |
{
|
420 |
return $this->_getRates($request, 'product_class_id', Mage_Tax_Model_Class::TAX_CLASS_TYPE_PRODUCT);
|
421 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
422 |
public function getRatesForAllCustomerTaxClasses($request)
|
423 |
{
|
424 |
return $this->_getRates($request, 'customer_class_id', Mage_Tax_Model_Class::TAX_CLASS_TYPE_CUSTOMER);
|
@@ -432,6 +542,10 @@ class Mage_Tax_Model_Calculation extends Mage_Core_Model_Abstract
|
|
432 |
*/
|
433 |
public function getAppliedRates($request)
|
434 |
{
|
|
|
|
|
|
|
|
|
435 |
$cacheKey = $this->_getRequestCacheKey($request);
|
436 |
if (!isset($this->_rateCalculationProcess[$cacheKey])) {
|
437 |
$this->_rateCalculationProcess[$cacheKey] = $this->_getResource()->getCalculationProcess($request);
|
@@ -439,16 +553,35 @@ class Mage_Tax_Model_Calculation extends Mage_Core_Model_Abstract
|
|
439 |
return $this->_rateCalculationProcess[$cacheKey];
|
440 |
}
|
441 |
|
|
|
|
|
|
|
|
|
|
|
|
|
442 |
public function reproduceProcess($rates)
|
443 |
{
|
444 |
return $this->getResource()->getCalculationProcess(null, $rates);
|
445 |
}
|
446 |
|
|
|
|
|
|
|
|
|
|
|
|
|
447 |
public function getRatesByCustomerTaxClass($customerTaxClass)
|
448 |
{
|
449 |
return $this->getResource()->getRatesByCustomerTaxClass($customerTaxClass);
|
450 |
}
|
451 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
452 |
public function getRatesByCustomerAndProductTaxClasses($customerTaxClass, $productTaxClass)
|
453 |
{
|
454 |
return $this->getResource()->getRatesByCustomerTaxClass($customerTaxClass, $productTaxClass);
|
@@ -461,16 +594,17 @@ class Mage_Tax_Model_Calculation extends Mage_Core_Model_Abstract
|
|
461 |
* @param float $price
|
462 |
* @param float $taxRate
|
463 |
* @param boolean $priceIncludeTax
|
|
|
464 |
* @return float
|
465 |
*/
|
466 |
-
public function calcTaxAmount($price, $taxRate, $priceIncludeTax=false, $round=true)
|
467 |
{
|
468 |
-
$taxRate = $taxRate/100;
|
469 |
|
470 |
if ($priceIncludeTax) {
|
471 |
-
$amount = $price*(1-1/(1
|
472 |
} else {
|
473 |
-
$amount = $price
|
474 |
}
|
475 |
|
476 |
if ($round) {
|
@@ -487,10 +621,10 @@ class Mage_Tax_Model_Calculation extends Mage_Core_Model_Abstract
|
|
487 |
* @param int $precision
|
488 |
* @return float
|
489 |
*/
|
490 |
-
public function truncate($price, $precision=4)
|
491 |
{
|
492 |
-
$exp = pow(10
|
493 |
-
$price = floor($price
|
494 |
return $price;
|
495 |
}
|
496 |
|
@@ -513,6 +647,17 @@ class Mage_Tax_Model_Calculation extends Mage_Core_Model_Abstract
|
|
513 |
*/
|
514 |
public function roundUp($price)
|
515 |
{
|
516 |
-
return ceil($price*100)/100;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
517 |
}
|
518 |
}
|
31 |
*/
|
32 |
class Mage_Tax_Model_Calculation extends Mage_Core_Model_Abstract
|
33 |
{
|
34 |
+
/*
|
35 |
+
* Identifier constant for Tax calculation before discount excluding TAX
|
36 |
+
*/
|
37 |
const CALC_TAX_BEFORE_DISCOUNT_ON_EXCL = '0_0';
|
38 |
+
/***/
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Identifier constant for Tax calculation before discount including TAX
|
42 |
+
*/
|
43 |
const CALC_TAX_BEFORE_DISCOUNT_ON_INCL = '0_1';
|
44 |
+
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Identifier constant for Tax calculation after discount excluding TAX
|
48 |
+
*/
|
49 |
const CALC_TAX_AFTER_DISCOUNT_ON_EXCL = '1_0';
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Identifier constant for Tax calculation after discount including TAX
|
53 |
+
*/
|
54 |
const CALC_TAX_AFTER_DISCOUNT_ON_INCL = '1_1';
|
55 |
|
|
|
|
|
|
|
56 |
|
57 |
+
/**
|
58 |
+
* Identifier constant for unit based calculation
|
59 |
+
*/
|
60 |
protected $_rates = array();
|
61 |
+
/**
|
62 |
+
* Identifier constant for row based calculation
|
63 |
+
*/
|
64 |
protected $_ctc = array();
|
65 |
+
/**
|
66 |
+
* Identifier constant for total based calculation
|
67 |
+
*/
|
68 |
protected $_ptc = array();
|
69 |
|
70 |
+
/**
|
71 |
+
* CALC_UNIT_BASE
|
72 |
+
*/
|
73 |
+
const CALC_UNIT_BASE = 'UNIT_BASE_CALCULATION';
|
74 |
|
75 |
+
/**
|
76 |
+
* CALC_ROW_BASE
|
77 |
+
*/
|
78 |
+
const CALC_ROW_BASE = 'ROW_BASE_CALCULATION';
|
79 |
|
80 |
+
/**
|
81 |
+
* CALC_TOTAL_BASE
|
82 |
+
*/
|
83 |
+
const CALC_TOTAL_BASE = 'TOTAL_BASE_CALCULATION';
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Cache to hold the rates
|
87 |
+
*
|
88 |
+
* @var array
|
89 |
+
*/
|
90 |
+
protected $_rateCache = array();
|
91 |
+
|
92 |
+
/**
|
93 |
+
* Store the rate calculation process
|
94 |
+
*
|
95 |
+
* @var array
|
96 |
+
*/
|
97 |
+
protected $_rateCalculationProcess = array();
|
98 |
+
|
99 |
+
/**
|
100 |
+
* Hold the customer
|
101 |
+
*
|
102 |
+
* @var Mage_Customer_Model_Customer
|
103 |
+
*/
|
104 |
+
protected $_customer = null;
|
105 |
+
|
106 |
+
/**
|
107 |
+
* Customer group
|
108 |
+
*
|
109 |
+
* @var string
|
110 |
+
*/
|
111 |
+
protected $_defaultCustomerTaxClass = null;
|
112 |
+
|
113 |
+
/**
|
114 |
+
* Constructor
|
115 |
+
*/
|
116 |
protected function _construct()
|
117 |
{
|
118 |
$this->_init('tax/calculation');
|
130 |
return $this;
|
131 |
}
|
132 |
|
133 |
+
/**
|
134 |
+
* Get the customer default customer class
|
135 |
+
*
|
136 |
+
* @param null|Mage_Core_Model_Store $store
|
137 |
+
* @return string
|
138 |
+
*/
|
139 |
public function getDefaultCustomerTaxClass($store = null)
|
140 |
{
|
141 |
if ($this->_defaultCustomerTaxClass === null) {
|
230 |
$value = $this->getRateValue();
|
231 |
$id = $this->getRateId();
|
232 |
|
233 |
+
$rate = array(
|
234 |
+
'code' => $title, 'title' => $title, 'percent' => $value, 'position' => 1, 'priority' => 1);
|
235 |
|
236 |
$process = array();
|
237 |
$process['percent'] = $value;
|
258 |
$this->unsRateValue();
|
259 |
$this->unsCalculationProcess();
|
260 |
$this->unsEventModuleId();
|
261 |
+
Mage::dispatchEvent('tax_rate_data_fetch', array(
|
262 |
+
'request' => $request));
|
263 |
if (!$this->hasRateValue()) {
|
264 |
$rateInfo = $this->_getResource()->getRateInfo($request);
|
265 |
$this->setCalculationProcess($rateInfo['process']);
|
282 |
protected function _getRequestCacheKey($request)
|
283 |
{
|
284 |
$key = $request->getStore() ? $request->getStore()->getId() . '|' : '';
|
285 |
+
$key .= $request->getProductClassId() . '|' . $request->getCustomerClassId() . '|'
|
286 |
+
. $request->getCountryId() . '|' . $request->getRegionId() . '|' . $request->getPostcode();
|
287 |
return $key;
|
288 |
}
|
289 |
|
295 |
* @param Varien_Object $request
|
296 |
* @return float
|
297 |
*/
|
298 |
+
public function getStoreRate($request, $store = null)
|
299 |
{
|
300 |
$storeRequest = $this->getRateOriginRequest($store)
|
301 |
->setProductClassId($request->getProductClassId());
|
302 |
return $this->getRate($storeRequest);
|
303 |
}
|
304 |
|
305 |
+
/**
|
306 |
+
* Get tax rate based on store shipping origin address settings
|
307 |
+
* This rate can be used for conversion store price including tax to
|
308 |
+
* store price excluding tax
|
309 |
+
*
|
310 |
+
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
311 |
+
* @param null|Mage_Core_Model_Store $store
|
312 |
+
* @return float
|
313 |
+
*/
|
314 |
+
public function getStoreRateForItem($item, $store = null)
|
315 |
+
{
|
316 |
+
$storeRequest = $this->getRateOriginRequest($store)
|
317 |
+
->setProductClassId($item->getProduct()->getTaxClassId());
|
318 |
+
return $this->getRate($storeRequest);
|
319 |
+
}
|
320 |
+
|
321 |
/**
|
322 |
* Get request object for getting tax rate based on store shippig original address
|
323 |
*
|
359 |
if ($shippingAddress === false && $billingAddress === false && $customerTaxClass === false) {
|
360 |
return $this->getRateOriginRequest($store);
|
361 |
}
|
362 |
+
$address = new Varien_Object();
|
363 |
+
$customer = $this->getCustomer();
|
364 |
+
$basedOn = Mage::getStoreConfig(Mage_Tax_Model_Config::CONFIG_XML_PATH_BASED_ON, $store);
|
365 |
|
366 |
if (($shippingAddress === false && $basedOn == 'shipping')
|
367 |
+
|| ($billingAddress === false && $basedOn == 'billing')
|
368 |
+
) {
|
369 |
$basedOn = 'default';
|
370 |
} else {
|
371 |
if ((($billingAddress === false || is_null($billingAddress) || !$billingAddress->getCountryId())
|
372 |
&& $basedOn == 'billing')
|
373 |
|| (($shippingAddress === false || is_null($shippingAddress) || !$shippingAddress->getCountryId())
|
374 |
+
&& $basedOn == 'shipping')
|
375 |
+
) {
|
376 |
if ($customer) {
|
377 |
$defBilling = $customer->getDefaultBillingAddress();
|
378 |
$defShipping = $customer->getDefaultShippingAddress();
|
403 |
case 'default':
|
404 |
$address
|
405 |
->setCountryId(Mage::getStoreConfig(
|
406 |
+
Mage_Tax_Model_Config::CONFIG_XML_PATH_DEFAULT_COUNTRY,
|
407 |
+
$store))
|
408 |
->setRegionId(Mage::getStoreConfig(Mage_Tax_Model_Config::CONFIG_XML_PATH_DEFAULT_REGION, $store))
|
409 |
->setPostcode(Mage::getStoreConfig(
|
410 |
+
Mage_Tax_Model_Config::CONFIG_XML_PATH_DEFAULT_POSTCODE,
|
411 |
+
$store));
|
412 |
break;
|
413 |
}
|
414 |
|
415 |
if (is_null($customerTaxClass) && $customer) {
|
416 |
$customerTaxClass = $customer->getTaxClassId();
|
417 |
} elseif (($customerTaxClass === false) || !$customer) {
|
418 |
+
$customerTaxClass = Mage::getModel('customer/group')
|
419 |
+
->getTaxClassId(Mage_Customer_Model_Group::NOT_LOGGED_IN_ID);
|
420 |
}
|
421 |
|
422 |
$request = new Varien_Object();
|
446 |
$country = $first->getCountryId() == $second->getCountryId();
|
447 |
// "0" support for admin dropdown with --please select--
|
448 |
$region = (int)$first->getRegionId() == (int)$second->getRegionId();
|
449 |
+
$postcode = $first-> getPostcode() == $second-> getPostcode();
|
450 |
+
$taxClass = $first-> getCustomerClassId() == $second-> getCustomerClassId();
|
451 |
|
452 |
if ($country && $region && $postcode && $taxClass) {
|
453 |
return true;
|
490 |
return $identical;
|
491 |
}
|
492 |
|
493 |
+
/**
|
494 |
+
* Gets the tax rates by type
|
495 |
+
*
|
496 |
+
* @param Varien_Object $request
|
497 |
+
* @param string $fieldName
|
498 |
+
* @param string $type
|
499 |
+
* @return array
|
500 |
+
*/
|
501 |
protected function _getRates($request, $fieldName, $type)
|
502 |
{
|
503 |
$result = array();
|
512 |
return $result;
|
513 |
}
|
514 |
|
515 |
+
/**
|
516 |
+
* Gets rates for all the product tax classes
|
517 |
+
*
|
518 |
+
* @param Varien_Object $request
|
519 |
+
* @return array
|
520 |
+
*/
|
521 |
public function getRatesForAllProductTaxClasses($request)
|
522 |
{
|
523 |
return $this->_getRates($request, 'product_class_id', Mage_Tax_Model_Class::TAX_CLASS_TYPE_PRODUCT);
|
524 |
}
|
525 |
+
|
526 |
+
/**
|
527 |
+
* Gets rates for all the customer tax classes
|
528 |
+
*
|
529 |
+
* @param Varien_Object $request
|
530 |
+
* @return array
|
531 |
+
*/
|
532 |
public function getRatesForAllCustomerTaxClasses($request)
|
533 |
{
|
534 |
return $this->_getRates($request, 'customer_class_id', Mage_Tax_Model_Class::TAX_CLASS_TYPE_CUSTOMER);
|
542 |
*/
|
543 |
public function getAppliedRates($request)
|
544 |
{
|
545 |
+
if (!$request->getCountryId() || !$request->getCustomerClassId() || !$request->getProductClassId()) {
|
546 |
+
return array();
|
547 |
+
}
|
548 |
+
|
549 |
$cacheKey = $this->_getRequestCacheKey($request);
|
550 |
if (!isset($this->_rateCalculationProcess[$cacheKey])) {
|
551 |
$this->_rateCalculationProcess[$cacheKey] = $this->_getResource()->getCalculationProcess($request);
|
553 |
return $this->_rateCalculationProcess[$cacheKey];
|
554 |
}
|
555 |
|
556 |
+
/**
|
557 |
+
* Get the calculation process
|
558 |
+
*
|
559 |
+
* @param array $rates
|
560 |
+
* @return mixed
|
561 |
+
*/
|
562 |
public function reproduceProcess($rates)
|
563 |
{
|
564 |
return $this->getResource()->getCalculationProcess(null, $rates);
|
565 |
}
|
566 |
|
567 |
+
/**
|
568 |
+
* Get rates by customer tax class
|
569 |
+
*
|
570 |
+
* @param int $customerTaxClass
|
571 |
+
* @return mixed
|
572 |
+
*/
|
573 |
public function getRatesByCustomerTaxClass($customerTaxClass)
|
574 |
{
|
575 |
return $this->getResource()->getRatesByCustomerTaxClass($customerTaxClass);
|
576 |
}
|
577 |
|
578 |
+
/**
|
579 |
+
* Get rates by customer and product classes
|
580 |
+
*
|
581 |
+
* @param int $customerTaxClass
|
582 |
+
* @param int $productTaxClass
|
583 |
+
* @return mixed
|
584 |
+
*/
|
585 |
public function getRatesByCustomerAndProductTaxClasses($customerTaxClass, $productTaxClass)
|
586 |
{
|
587 |
return $this->getResource()->getRatesByCustomerTaxClass($customerTaxClass, $productTaxClass);
|
594 |
* @param float $price
|
595 |
* @param float $taxRate
|
596 |
* @param boolean $priceIncludeTax
|
597 |
+
* @param boolean $round
|
598 |
* @return float
|
599 |
*/
|
600 |
+
public function calcTaxAmount($price, $taxRate, $priceIncludeTax = false, $round = true)
|
601 |
{
|
602 |
+
$taxRate = $taxRate / 100;
|
603 |
|
604 |
if ($priceIncludeTax) {
|
605 |
+
$amount = $price * (1 - 1 / (1 + $taxRate));
|
606 |
} else {
|
607 |
+
$amount = $price * $taxRate;
|
608 |
}
|
609 |
|
610 |
if ($round) {
|
621 |
* @param int $precision
|
622 |
* @return float
|
623 |
*/
|
624 |
+
public function truncate($price, $precision = 4)
|
625 |
{
|
626 |
+
$exp = pow(10, $precision);
|
627 |
+
$price = floor($price * $exp) / $exp;
|
628 |
return $price;
|
629 |
}
|
630 |
|
647 |
*/
|
648 |
public function roundUp($price)
|
649 |
{
|
650 |
+
return ceil($price * 100) / 100;
|
651 |
+
}
|
652 |
+
|
653 |
+
/**
|
654 |
+
* Round price down
|
655 |
+
*
|
656 |
+
* @param float $price
|
657 |
+
* @return float
|
658 |
+
*/
|
659 |
+
public function roundDown($price)
|
660 |
+
{
|
661 |
+
return floor($price * 100) / 100;
|
662 |
}
|
663 |
}
|
app/code/core/Mage/Tax/Model/Calculation/Rate.php
CHANGED
@@ -52,7 +52,18 @@
|
|
52 |
*/
|
53 |
class Mage_Tax_Model_Calculation_Rate extends Mage_Core_Model_Abstract
|
54 |
{
|
|
|
|
|
|
|
|
|
|
|
55 |
protected $_titles = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
56 |
protected $_titleModel = null;
|
57 |
|
58 |
/**
|
@@ -76,7 +87,7 @@ class Mage_Tax_Model_Calculation_Rate extends Mage_Core_Model_Abstract
|
|
76 |
Mage::throwException(Mage::helper('tax')->__('Please fill all required fields with valid information.'));
|
77 |
}
|
78 |
|
79 |
-
if (!is_numeric($this->getRate()) || $this->getRate()
|
80 |
Mage::throwException(Mage::helper('tax')->__('Rate Percent should be a positive number.'));
|
81 |
}
|
82 |
|
@@ -159,6 +170,11 @@ class Mage_Tax_Model_Calculation_Rate extends Mage_Core_Model_Abstract
|
|
159 |
return parent::_afterDelete();
|
160 |
}
|
161 |
|
|
|
|
|
|
|
|
|
|
|
162 |
public function saveTitles($titles = null)
|
163 |
{
|
164 |
if (is_null($titles)) {
|
@@ -167,7 +183,7 @@ class Mage_Tax_Model_Calculation_Rate extends Mage_Core_Model_Abstract
|
|
167 |
|
168 |
$this->getTitleModel()->deleteByRateId($this->getId());
|
169 |
if (is_array($titles) && $titles) {
|
170 |
-
foreach ($titles as $store
|
171 |
if ($title !== '') {
|
172 |
$this->getTitleModel()
|
173 |
->setId(null)
|
@@ -180,6 +196,11 @@ class Mage_Tax_Model_Calculation_Rate extends Mage_Core_Model_Abstract
|
|
180 |
}
|
181 |
}
|
182 |
|
|
|
|
|
|
|
|
|
|
|
183 |
public function getTitleModel()
|
184 |
{
|
185 |
if (is_null($this->_titleModel)) {
|
@@ -188,6 +209,11 @@ class Mage_Tax_Model_Calculation_Rate extends Mage_Core_Model_Abstract
|
|
188 |
return $this->_titleModel;
|
189 |
}
|
190 |
|
|
|
|
|
|
|
|
|
|
|
191 |
public function getTitles()
|
192 |
{
|
193 |
if (is_null($this->_titles)) {
|
@@ -196,6 +222,11 @@ class Mage_Tax_Model_Calculation_Rate extends Mage_Core_Model_Abstract
|
|
196 |
return $this->_titles;
|
197 |
}
|
198 |
|
|
|
|
|
|
|
|
|
|
|
199 |
public function deleteAllRates()
|
200 |
{
|
201 |
$this->_getResource()->deleteAllRates();
|
52 |
*/
|
53 |
class Mage_Tax_Model_Calculation_Rate extends Mage_Core_Model_Abstract
|
54 |
{
|
55 |
+
/**
|
56 |
+
* List of tax titles
|
57 |
+
*
|
58 |
+
* @var array
|
59 |
+
*/
|
60 |
protected $_titles = null;
|
61 |
+
|
62 |
+
/**
|
63 |
+
* The Mage_Tax_Model_Calculation_Rate_Title
|
64 |
+
*
|
65 |
+
* @var Mage_Tax_Model_Calculation_Rate_Title
|
66 |
+
*/
|
67 |
protected $_titleModel = null;
|
68 |
|
69 |
/**
|
87 |
Mage::throwException(Mage::helper('tax')->__('Please fill all required fields with valid information.'));
|
88 |
}
|
89 |
|
90 |
+
if (!is_numeric($this->getRate()) || $this->getRate() < 0) {
|
91 |
Mage::throwException(Mage::helper('tax')->__('Rate Percent should be a positive number.'));
|
92 |
}
|
93 |
|
170 |
return parent::_afterDelete();
|
171 |
}
|
172 |
|
173 |
+
/**
|
174 |
+
* Saves the tax titles
|
175 |
+
*
|
176 |
+
* @param array | null $titles
|
177 |
+
*/
|
178 |
public function saveTitles($titles = null)
|
179 |
{
|
180 |
if (is_null($titles)) {
|
183 |
|
184 |
$this->getTitleModel()->deleteByRateId($this->getId());
|
185 |
if (is_array($titles) && $titles) {
|
186 |
+
foreach ($titles as $store => $title) {
|
187 |
if ($title !== '') {
|
188 |
$this->getTitleModel()
|
189 |
->setId(null)
|
196 |
}
|
197 |
}
|
198 |
|
199 |
+
/**
|
200 |
+
* Returns the Mage_Tax_Model_Calculation_Rate_Title
|
201 |
+
*
|
202 |
+
* @return Mage_Tax_Model_Calculation_Rate_Title
|
203 |
+
*/
|
204 |
public function getTitleModel()
|
205 |
{
|
206 |
if (is_null($this->_titleModel)) {
|
209 |
return $this->_titleModel;
|
210 |
}
|
211 |
|
212 |
+
/**
|
213 |
+
* Returns the list of tax titles
|
214 |
+
*
|
215 |
+
* @return array
|
216 |
+
*/
|
217 |
public function getTitles()
|
218 |
{
|
219 |
if (is_null($this->_titles)) {
|
222 |
return $this->_titles;
|
223 |
}
|
224 |
|
225 |
+
/**
|
226 |
+
* Deletes all tax rates
|
227 |
+
*
|
228 |
+
* @return Mage_Tax_Model_Calculation_Rate
|
229 |
+
*/
|
230 |
public function deleteAllRates()
|
231 |
{
|
232 |
$this->_getResource()->deleteAllRates();
|
app/code/core/Mage/Tax/Model/Calculation/Rule.php
CHANGED
@@ -42,14 +42,53 @@
|
|
42 |
*/
|
43 |
class Mage_Tax_Model_Calculation_Rule extends Mage_Core_Model_Abstract
|
44 |
{
|
|
|
|
|
|
|
|
|
|
|
45 |
protected $_ctcs = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
protected $_ptcs = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
protected $_rates = null;
|
48 |
|
|
|
|
|
|
|
|
|
|
|
49 |
protected $_ctcModel = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
protected $_ptcModel = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
protected $_rateModel = null;
|
52 |
|
|
|
|
|
|
|
|
|
|
|
53 |
protected $_calculationModel = null;
|
54 |
|
55 |
/**
|
@@ -62,7 +101,7 @@ class Mage_Tax_Model_Calculation_Rule extends Mage_Core_Model_Abstract
|
|
62 |
|
63 |
/**
|
64 |
* After save rule
|
65 |
-
*
|
66 |
*
|
67 |
* @return Mage_Tax_Model_Calculation_Rule
|
68 |
*/
|
@@ -86,6 +125,9 @@ class Mage_Tax_Model_Calculation_Rule extends Mage_Core_Model_Abstract
|
|
86 |
return parent::_afterDelete();
|
87 |
}
|
88 |
|
|
|
|
|
|
|
89 |
public function saveCalculationData()
|
90 |
{
|
91 |
$ctc = $this->getData('tax_customer_class');
|
@@ -108,6 +150,9 @@ class Mage_Tax_Model_Calculation_Rule extends Mage_Core_Model_Abstract
|
|
108 |
}
|
109 |
}
|
110 |
|
|
|
|
|
|
|
111 |
public function getCalculationModel()
|
112 |
{
|
113 |
if (is_null($this->_calculationModel)) {
|
@@ -116,19 +161,43 @@ class Mage_Tax_Model_Calculation_Rule extends Mage_Core_Model_Abstract
|
|
116 |
return $this->_calculationModel;
|
117 |
}
|
118 |
|
|
|
|
|
|
|
119 |
public function getRates()
|
120 |
{
|
121 |
return $this->getCalculationModel()->getRates($this->getId());
|
122 |
}
|
123 |
|
|
|
|
|
|
|
124 |
public function getCustomerTaxClasses()
|
125 |
{
|
126 |
return $this->getCalculationModel()->getCustomerTaxClasses($this->getId());
|
127 |
}
|
128 |
|
|
|
|
|
|
|
129 |
public function getProductTaxClasses()
|
130 |
{
|
131 |
return $this->getCalculationModel()->getProductTaxClasses($this->getId());
|
132 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
}
|
134 |
|
42 |
*/
|
43 |
class Mage_Tax_Model_Calculation_Rule extends Mage_Core_Model_Abstract
|
44 |
{
|
45 |
+
/**
|
46 |
+
* No references found in the project. Variable kept for backward compatibility
|
47 |
+
*
|
48 |
+
* @var null
|
49 |
+
*/
|
50 |
protected $_ctcs = null;
|
51 |
+
|
52 |
+
/**
|
53 |
+
* No references found in the project. Variable kept for backward compatibility
|
54 |
+
*
|
55 |
+
* @var null
|
56 |
+
*/
|
57 |
protected $_ptcs = null;
|
58 |
+
|
59 |
+
/**
|
60 |
+
* No references found in the project. Variable kept for backward compatibility
|
61 |
+
*
|
62 |
+
* @var null
|
63 |
+
*/
|
64 |
protected $_rates = null;
|
65 |
|
66 |
+
/**
|
67 |
+
* No references found in the project. Variable kept for backward compatibility
|
68 |
+
*
|
69 |
+
* @var null
|
70 |
+
*/
|
71 |
protected $_ctcModel = null;
|
72 |
+
|
73 |
+
/**
|
74 |
+
* No references found in the project. Variable kept for backward compatibility
|
75 |
+
*
|
76 |
+
* @var null
|
77 |
+
*/
|
78 |
protected $_ptcModel = null;
|
79 |
+
|
80 |
+
/**
|
81 |
+
* No references found in the project. Variable kept for backward compatibility
|
82 |
+
*
|
83 |
+
* @var Mage_Tax_Model_Calculation_Rate
|
84 |
+
*/
|
85 |
protected $_rateModel = null;
|
86 |
|
87 |
+
/**
|
88 |
+
* Holds the tax Calculation model
|
89 |
+
*
|
90 |
+
* @var Mage_Tax_Model_Calculation
|
91 |
+
*/
|
92 |
protected $_calculationModel = null;
|
93 |
|
94 |
/**
|
101 |
|
102 |
/**
|
103 |
* After save rule
|
104 |
+
* Re - declared for populate rate calculations
|
105 |
*
|
106 |
* @return Mage_Tax_Model_Calculation_Rule
|
107 |
*/
|
125 |
return parent::_afterDelete();
|
126 |
}
|
127 |
|
128 |
+
/**
|
129 |
+
* Saves the Calculation Data
|
130 |
+
*/
|
131 |
public function saveCalculationData()
|
132 |
{
|
133 |
$ctc = $this->getData('tax_customer_class');
|
150 |
}
|
151 |
}
|
152 |
|
153 |
+
/**
|
154 |
+
* @return Mage_Core_Model_Abstract|Mage_Tax_Model_Calculation|null
|
155 |
+
*/
|
156 |
public function getCalculationModel()
|
157 |
{
|
158 |
if (is_null($this->_calculationModel)) {
|
161 |
return $this->_calculationModel;
|
162 |
}
|
163 |
|
164 |
+
/**
|
165 |
+
* @return mixed
|
166 |
+
*/
|
167 |
public function getRates()
|
168 |
{
|
169 |
return $this->getCalculationModel()->getRates($this->getId());
|
170 |
}
|
171 |
|
172 |
+
/**
|
173 |
+
* @return mixed
|
174 |
+
*/
|
175 |
public function getCustomerTaxClasses()
|
176 |
{
|
177 |
return $this->getCalculationModel()->getCustomerTaxClasses($this->getId());
|
178 |
}
|
179 |
|
180 |
+
/**
|
181 |
+
* @return mixed
|
182 |
+
*/
|
183 |
public function getProductTaxClasses()
|
184 |
{
|
185 |
return $this->getCalculationModel()->getProductTaxClasses($this->getId());
|
186 |
}
|
187 |
+
|
188 |
+
|
189 |
+
/**
|
190 |
+
* Fetches rules by rate, customer tax class and product tax class
|
191 |
+
* and product tax class combination
|
192 |
+
*
|
193 |
+
* @param array $rateId
|
194 |
+
* @param array $customerTaxClassId
|
195 |
+
* @param array $productTaxClassId
|
196 |
+
* @return array
|
197 |
+
*/
|
198 |
+
public function fetchRuleCodes($rateId, $customerTaxClassId, $productTaxClassId)
|
199 |
+
{
|
200 |
+
return $this->getResource()->fetchRuleCodes($rateId, $customerTaxClassId, $productTaxClassId);
|
201 |
+
}
|
202 |
}
|
203 |
|
app/code/core/Mage/Tax/Model/Config.php
CHANGED
@@ -38,6 +38,7 @@ class Mage_Tax_Model_Config
|
|
38 |
*/
|
39 |
const XML_PATH_TAX_NOTIFICATION_DISCOUNT = 'tax/ignore_notification/discount';
|
40 |
const XML_PATH_TAX_NOTIFICATION_PRICE_DISPLAY = 'tax/ignore_notification/price_display';
|
|
|
41 |
const XML_PATH_TAX_NOTIFICATION_URL = 'tax/notification/url';
|
42 |
/**#@-*/
|
43 |
|
@@ -69,32 +70,32 @@ class Mage_Tax_Model_Config
|
|
69 |
/**#@+
|
70 |
* Prices display settings
|
71 |
*/
|
72 |
-
const CONFIG_XML_PATH_PRICE_DISPLAY_TYPE
|
73 |
-
const CONFIG_XML_PATH_DISPLAY_SHIPPING
|
74 |
/**#@-*/
|
75 |
|
76 |
/**#@+
|
77 |
* Shopping cart display settings
|
78 |
*/
|
79 |
-
const XML_PATH_DISPLAY_CART_PRICE
|
80 |
-
const XML_PATH_DISPLAY_CART_SUBTOTAL
|
81 |
-
const XML_PATH_DISPLAY_CART_SHIPPING
|
82 |
-
const XML_PATH_DISPLAY_CART_DISCOUNT
|
83 |
-
const XML_PATH_DISPLAY_CART_GRANDTOTAL
|
84 |
const XML_PATH_DISPLAY_CART_FULL_SUMMARY = 'tax/cart_display/full_summary';
|
85 |
-
const XML_PATH_DISPLAY_CART_ZERO_TAX
|
86 |
/**#@-*/
|
87 |
|
88 |
/**#@+
|
89 |
* Shopping cart display settings
|
90 |
*/
|
91 |
-
const XML_PATH_DISPLAY_SALES_PRICE
|
92 |
-
const XML_PATH_DISPLAY_SALES_SUBTOTAL
|
93 |
-
const XML_PATH_DISPLAY_SALES_SHIPPING
|
94 |
-
const XML_PATH_DISPLAY_SALES_DISCOUNT
|
95 |
-
const XML_PATH_DISPLAY_SALES_GRANDTOTAL
|
96 |
const XML_PATH_DISPLAY_SALES_FULL_SUMMARY = 'tax/sales_display/full_summary';
|
97 |
-
const XML_PATH_DISPLAY_SALES_ZERO_TAX
|
98 |
/**#@-*/
|
99 |
|
100 |
/**
|
@@ -110,14 +111,22 @@ class Mage_Tax_Model_Config
|
|
110 |
const DISPLAY_TYPE_BOTH = 3;
|
111 |
/**#@-*/
|
112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
113 |
/**#@+
|
114 |
* @deprecated
|
115 |
*/
|
116 |
const CONFIG_XML_PATH_SHOW_IN_CATALOG = 'tax/display/show_in_catalog';
|
117 |
const CONFIG_XML_PATH_DEFAULT_PRODUCT_TAX_GROUP = 'catalog/product/default_tax_group';
|
118 |
-
const CONFIG_XML_PATH_DISPLAY_TAX_COLUMN
|
119 |
-
const CONFIG_XML_PATH_DISPLAY_FULL_SUMMARY
|
120 |
-
const CONFIG_XML_PATH_DISPLAY_ZERO_TAX
|
121 |
/**#@-*/
|
122 |
|
123 |
/**
|
@@ -735,13 +744,13 @@ class Mage_Tax_Model_Config
|
|
735 |
*
|
736 |
* Matrix for invalid discount settings is as follows:
|
737 |
* Before Discount / Excluding Tax
|
738 |
-
*
|
739 |
*
|
740 |
* @param mixed $store
|
741 |
* @return bool
|
742 |
*/
|
743 |
public function checkDiscountSettings($store = null)
|
744 |
{
|
745 |
-
return $this->applyTaxAfterDiscount($store)
|
746 |
}
|
747 |
}
|
38 |
*/
|
39 |
const XML_PATH_TAX_NOTIFICATION_DISCOUNT = 'tax/ignore_notification/discount';
|
40 |
const XML_PATH_TAX_NOTIFICATION_PRICE_DISPLAY = 'tax/ignore_notification/price_display';
|
41 |
+
const XML_PATH_TAX_NOTIFICATION_FPT_CONFIGURATION = 'tax/ignore_notification/fpt_configuration';
|
42 |
const XML_PATH_TAX_NOTIFICATION_URL = 'tax/notification/url';
|
43 |
/**#@-*/
|
44 |
|
70 |
/**#@+
|
71 |
* Prices display settings
|
72 |
*/
|
73 |
+
const CONFIG_XML_PATH_PRICE_DISPLAY_TYPE = 'tax/display/type';
|
74 |
+
const CONFIG_XML_PATH_DISPLAY_SHIPPING = 'tax/display/shipping';
|
75 |
/**#@-*/
|
76 |
|
77 |
/**#@+
|
78 |
* Shopping cart display settings
|
79 |
*/
|
80 |
+
const XML_PATH_DISPLAY_CART_PRICE = 'tax/cart_display/price';
|
81 |
+
const XML_PATH_DISPLAY_CART_SUBTOTAL = 'tax/cart_display/subtotal';
|
82 |
+
const XML_PATH_DISPLAY_CART_SHIPPING = 'tax/cart_display/shipping';
|
83 |
+
const XML_PATH_DISPLAY_CART_DISCOUNT = 'tax/cart_display/discount';
|
84 |
+
const XML_PATH_DISPLAY_CART_GRANDTOTAL = 'tax/cart_display/grandtotal';
|
85 |
const XML_PATH_DISPLAY_CART_FULL_SUMMARY = 'tax/cart_display/full_summary';
|
86 |
+
const XML_PATH_DISPLAY_CART_ZERO_TAX = 'tax/cart_display/zero_tax';
|
87 |
/**#@-*/
|
88 |
|
89 |
/**#@+
|
90 |
* Shopping cart display settings
|
91 |
*/
|
92 |
+
const XML_PATH_DISPLAY_SALES_PRICE = 'tax/sales_display/price';
|
93 |
+
const XML_PATH_DISPLAY_SALES_SUBTOTAL = 'tax/sales_display/subtotal';
|
94 |
+
const XML_PATH_DISPLAY_SALES_SHIPPING = 'tax/sales_display/shipping';
|
95 |
+
const XML_PATH_DISPLAY_SALES_DISCOUNT = 'tax/sales_display/discount';
|
96 |
+
const XML_PATH_DISPLAY_SALES_GRANDTOTAL = 'tax/sales_display/grandtotal';
|
97 |
const XML_PATH_DISPLAY_SALES_FULL_SUMMARY = 'tax/sales_display/full_summary';
|
98 |
+
const XML_PATH_DISPLAY_SALES_ZERO_TAX = 'tax/sales_display/zero_tax';
|
99 |
/**#@-*/
|
100 |
|
101 |
/**
|
111 |
const DISPLAY_TYPE_BOTH = 3;
|
112 |
/**#@-*/
|
113 |
|
114 |
+
/**#@+
|
115 |
+
* Indexes for FPT Configuration Types
|
116 |
+
*/
|
117 |
+
const FPT_NOT_TAXED = 0;
|
118 |
+
const FPT_TAXED = 1;
|
119 |
+
const FPT_LOADED_DISPLAY_WITH_TAX = 2;
|
120 |
+
/**#@-*/
|
121 |
+
|
122 |
/**#@+
|
123 |
* @deprecated
|
124 |
*/
|
125 |
const CONFIG_XML_PATH_SHOW_IN_CATALOG = 'tax/display/show_in_catalog';
|
126 |
const CONFIG_XML_PATH_DEFAULT_PRODUCT_TAX_GROUP = 'catalog/product/default_tax_group';
|
127 |
+
const CONFIG_XML_PATH_DISPLAY_TAX_COLUMN = 'tax/display/column_in_summary';
|
128 |
+
const CONFIG_XML_PATH_DISPLAY_FULL_SUMMARY = 'tax/display/full_summary';
|
129 |
+
const CONFIG_XML_PATH_DISPLAY_ZERO_TAX = 'tax/display/zero_tax';
|
130 |
/**#@-*/
|
131 |
|
132 |
/**
|
744 |
*
|
745 |
* Matrix for invalid discount settings is as follows:
|
746 |
* Before Discount / Excluding Tax
|
747 |
+
* Before Discount / Including Tax
|
748 |
*
|
749 |
* @param mixed $store
|
750 |
* @return bool
|
751 |
*/
|
752 |
public function checkDiscountSettings($store = null)
|
753 |
{
|
754 |
+
return $this->applyTaxAfterDiscount($store);
|
755 |
}
|
756 |
}
|
app/code/core/Mage/Tax/Model/Resource/Calculation/Rule.php
CHANGED
@@ -55,4 +55,30 @@ class Mage_Tax_Model_Resource_Calculation_Rule extends Mage_Core_Model_Resource_
|
|
55 |
));
|
56 |
return $this;
|
57 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
}
|
55 |
));
|
56 |
return $this;
|
57 |
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Fetches rules by rate, customer tax class and product tax class
|
61 |
+
* Returns array of rule codes
|
62 |
+
*
|
63 |
+
* @param array $rateId
|
64 |
+
* @param array $customerTaxClassId
|
65 |
+
* @param array $productTaxClassId
|
66 |
+
* @return array
|
67 |
+
*/
|
68 |
+
public function fetchRuleCodes($rateId, $customerTaxClassId, $productTaxClassId)
|
69 |
+
{
|
70 |
+
$adapter = $this->_getReadAdapter();
|
71 |
+
$select = $adapter->select()
|
72 |
+
->from(array('main' => $this->getTable('tax/tax_calculation')), null)
|
73 |
+
->joinLeft(
|
74 |
+
array('d' => $this->getTable('tax/tax_calculation_rule')),
|
75 |
+
'd.tax_calculation_rule_id = main.tax_calculation_rule_id',
|
76 |
+
array('d.code'))
|
77 |
+
->where('main.tax_calculation_rate_id in (?)', $rateId)
|
78 |
+
->where('main.customer_tax_class_id in (?)', $customerTaxClassId)
|
79 |
+
->where('main.product_tax_class_id in (?)', $productTaxClassId)
|
80 |
+
->distinct(true);
|
81 |
+
|
82 |
+
return $adapter->fetchCol($select);
|
83 |
+
}
|
84 |
}
|
app/code/core/Mage/Tax/Model/Sales/Total/Quote/Shipping.php
CHANGED
@@ -105,38 +105,48 @@ class Mage_Tax_Model_Sales_Total_Quote_Shipping extends Mage_Sales_Model_Quote_A
|
|
105 |
$rate = $calc->getRate($addressTaxRequest);
|
106 |
if ($priceIncludesTax) {
|
107 |
if ($this->_areTaxRequestsSimilar) {
|
108 |
-
$
|
109 |
-
$
|
|
|
110 |
$taxShipping = $shipping;
|
111 |
$baseTaxShipping = $baseShipping;
|
112 |
-
$
|
113 |
-
$
|
114 |
$taxable = $taxShipping;
|
115 |
$baseTaxable = $baseTaxShipping;
|
116 |
$isPriceInclTax = true;
|
117 |
-
$address->setTotalAmount('shipping', $
|
118 |
-
$address->setBaseTotalAmount('shipping', $
|
119 |
} else {
|
120 |
$storeRate = $calc->getStoreRate($addressTaxRequest, $store);
|
121 |
$storeTax = $calc->calcTaxAmount($shipping, $storeRate, true, false);
|
122 |
$baseStoreTax = $calc->calcTaxAmount($baseShipping, $storeRate, true, false);
|
123 |
$shipping = $calc->round($shipping - $storeTax);
|
124 |
$baseShipping = $calc->round($baseShipping - $baseStoreTax);
|
125 |
-
$tax = $this->_round($calc->calcTaxAmount($shipping, $rate, false, false), $rate,
|
126 |
$baseTax = $this->_round(
|
127 |
-
$calc->calcTaxAmount($baseShipping, $rate, false, false), $rate,
|
128 |
$taxShipping = $shipping + $tax;
|
129 |
$baseTaxShipping = $baseShipping + $baseTax;
|
130 |
-
$taxable = $
|
131 |
-
$baseTaxable = $
|
132 |
-
$isPriceInclTax =
|
133 |
$address->setTotalAmount('shipping', $shipping);
|
134 |
$address->setBaseTotalAmount('shipping', $baseShipping);
|
135 |
}
|
136 |
} else {
|
137 |
-
$
|
138 |
-
$
|
139 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
$taxShipping = $shipping + $tax;
|
141 |
$baseTaxShipping = $baseShipping + $baseTax;
|
142 |
$taxable = $shipping;
|
105 |
$rate = $calc->getRate($addressTaxRequest);
|
106 |
if ($priceIncludesTax) {
|
107 |
if ($this->_areTaxRequestsSimilar) {
|
108 |
+
$tax = $this->_round($calc->calcTaxAmount($shipping, $rate, true, false), $rate, true);
|
109 |
+
$baseTax = $this->_round(
|
110 |
+
$calc->calcTaxAmount($baseShipping, $rate, true, false), $rate, true, 'base');
|
111 |
$taxShipping = $shipping;
|
112 |
$baseTaxShipping = $baseShipping;
|
113 |
+
$shipping = $shipping - $tax;
|
114 |
+
$baseShipping = $baseShipping - $baseTax;
|
115 |
$taxable = $taxShipping;
|
116 |
$baseTaxable = $baseTaxShipping;
|
117 |
$isPriceInclTax = true;
|
118 |
+
$address->setTotalAmount('shipping', $shipping);
|
119 |
+
$address->setBaseTotalAmount('shipping', $baseShipping);
|
120 |
} else {
|
121 |
$storeRate = $calc->getStoreRate($addressTaxRequest, $store);
|
122 |
$storeTax = $calc->calcTaxAmount($shipping, $storeRate, true, false);
|
123 |
$baseStoreTax = $calc->calcTaxAmount($baseShipping, $storeRate, true, false);
|
124 |
$shipping = $calc->round($shipping - $storeTax);
|
125 |
$baseShipping = $calc->round($baseShipping - $baseStoreTax);
|
126 |
+
$tax = $this->_round($calc->calcTaxAmount($shipping, $rate, false, false), $rate, true);
|
127 |
$baseTax = $this->_round(
|
128 |
+
$calc->calcTaxAmount($baseShipping, $rate, false, false), $rate, true, 'base');
|
129 |
$taxShipping = $shipping + $tax;
|
130 |
$baseTaxShipping = $baseShipping + $baseTax;
|
131 |
+
$taxable = $taxShipping;
|
132 |
+
$baseTaxable = $baseTaxShipping;
|
133 |
+
$isPriceInclTax = true;
|
134 |
$address->setTotalAmount('shipping', $shipping);
|
135 |
$address->setBaseTotalAmount('shipping', $baseShipping);
|
136 |
}
|
137 |
} else {
|
138 |
+
$appliedRates = $calc->getAppliedRates($addressTaxRequest);
|
139 |
+
$taxes = array();
|
140 |
+
$baseTaxes = array();
|
141 |
+
foreach ($appliedRates as $appliedRate) {
|
142 |
+
$taxRate = $appliedRate['percent'];
|
143 |
+
$taxId = $appliedRate['id'];
|
144 |
+
$taxes[] = $this->_round($calc->calcTaxAmount($shipping, $taxRate, false, false), $taxId, false);
|
145 |
+
$baseTaxes[] = $this->_round(
|
146 |
+
$calc->calcTaxAmount($baseShipping, $taxRate, false, false), $taxId, false, 'base');
|
147 |
+
}
|
148 |
+
$tax = array_sum($taxes);
|
149 |
+
$baseTax = array_sum($baseTaxes);
|
150 |
$taxShipping = $shipping + $tax;
|
151 |
$baseTaxShipping = $baseShipping + $baseTax;
|
152 |
$taxable = $shipping;
|
app/code/core/Mage/Tax/Model/Sales/Total/Quote/Subtotal.php
CHANGED
@@ -113,9 +113,9 @@ class Mage_Tax_Model_Sales_Total_Quote_Subtotal extends Mage_Sales_Model_Quote_A
|
|
113 |
public function __construct()
|
114 |
{
|
115 |
$this->setCode('tax_subtotal');
|
116 |
-
$this->_helper
|
117 |
-
$this->_calculator
|
118 |
-
$this->_config
|
119 |
}
|
120 |
|
121 |
/**
|
@@ -124,18 +124,19 @@ class Mage_Tax_Model_Sales_Total_Quote_Subtotal extends Mage_Sales_Model_Quote_A
|
|
124 |
* Determine discount price if needed
|
125 |
*
|
126 |
* @param Mage_Sales_Model_Quote_Address $address
|
|
|
127 |
* @return Mage_Tax_Model_Sales_Total_Quote_Subtotal
|
128 |
*/
|
129 |
public function collect(Mage_Sales_Model_Quote_Address $address)
|
130 |
{
|
131 |
-
$this->_store
|
132 |
$this->_address = $address;
|
133 |
|
134 |
-
$this->_subtotalInclTax
|
135 |
$this->_baseSubtotalInclTax = 0;
|
136 |
-
$this->_subtotal
|
137 |
-
$this->_baseSubtotal
|
138 |
-
$this->_roundingDeltas
|
139 |
|
140 |
$address->setSubtotalInclTax(0);
|
141 |
$address->setBaseSubtotalInclTax(0);
|
@@ -148,7 +149,7 @@ class Mage_Tax_Model_Sales_Total_Quote_Subtotal extends Mage_Sales_Model_Quote_A
|
|
148 |
}
|
149 |
|
150 |
$addressRequest = $this->_getAddressTaxRequest($address);
|
151 |
-
$storeRequest
|
152 |
$this->_calculator->setCustomer($address->getQuote()->getCustomer());
|
153 |
if ($this->_config->priceIncludesTax($this->_store)) {
|
154 |
$classIds = array();
|
@@ -189,6 +190,7 @@ class Mage_Tax_Model_Sales_Total_Quote_Subtotal extends Mage_Sales_Model_Quote_A
|
|
189 |
*
|
190 |
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
191 |
* @param Varien_Object $taxRequest
|
|
|
192 |
* @return Mage_Tax_Model_Sales_Total_Quote_Subtotal
|
193 |
*/
|
194 |
protected function _processItem($item, $taxRequest)
|
@@ -214,85 +216,110 @@ class Mage_Tax_Model_Sales_Total_Quote_Subtotal extends Mage_Sales_Model_Quote_A
|
|
214 |
*
|
215 |
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
216 |
* @param Varien_Object $request
|
|
|
217 |
* @return Mage_Tax_Model_Sales_Total_Quote_Subtotal
|
218 |
*/
|
219 |
protected function _unitBaseCalculation($item, $request)
|
220 |
{
|
221 |
$request->setProductClassId($item->getProduct()->getTaxClassId());
|
222 |
-
$rate
|
223 |
-
$qty
|
224 |
|
225 |
-
$price
|
226 |
-
$basePrice
|
227 |
-
$subtotal
|
228 |
-
$baseSubtotal
|
|
|
|
|
229 |
$taxOnOrigPrice = !$this->_helper->applyTaxOnCustomPrice($this->_store) && $item->hasCustomPrice();
|
230 |
if ($taxOnOrigPrice) {
|
231 |
-
$origPrice
|
232 |
-
$baseOrigPrice
|
233 |
}
|
234 |
|
235 |
-
|
236 |
$item->setTaxPercent($rate);
|
237 |
if ($this->_config->priceIncludesTax($this->_store)) {
|
238 |
if ($this->_sameRateAsStore($request)) {
|
239 |
-
|
240 |
-
$baseTax = $this->_calculator->calcTaxAmount($basePrice, $rate, true);
|
241 |
-
$taxPrice = $price;
|
242 |
-
$baseTaxPrice = $basePrice;
|
243 |
-
$taxSubtotal = $subtotal;
|
244 |
-
$baseTaxSubtotal = $baseSubtotal;
|
245 |
-
$price = $price - $tax;
|
246 |
-
$basePrice = $basePrice - $baseTax;
|
247 |
-
$subtotal = $price * $qty;
|
248 |
-
$baseSubtotal = $basePrice * $qty;
|
249 |
if ($taxOnOrigPrice) {
|
250 |
$taxable = $origPrice;
|
251 |
$baseTaxable = $baseOrigPrice;
|
252 |
} else {
|
253 |
-
$taxable = $
|
254 |
-
$baseTaxable = $
|
255 |
}
|
256 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
257 |
} else {
|
258 |
$storeRate = $this->_calculator->getStoreRate($request, $this->_store);
|
259 |
-
$storeTax = $this->_calculator->calcTaxAmount($price, $storeRate, true, false);
|
260 |
-
$baseStoreTax = $this->_calculator->calcTaxAmount($basePrice, $storeRate, true, false);
|
261 |
-
$price = $this->_calculator->round($price - $storeTax);
|
262 |
-
$basePrice = $this->_calculator->round($basePrice - $baseStoreTax);
|
263 |
-
$subtotal = $price * $qty;
|
264 |
-
$baseSubtotal = $basePrice * $qty;
|
265 |
-
|
266 |
-
$tax = $this->_calculator->calcTaxAmount($price, $rate, false);
|
267 |
-
$baseTax = $this->_calculator->calcTaxAmount($basePrice, $rate, false);
|
268 |
-
$taxPrice = $price + $tax;
|
269 |
-
$baseTaxPrice = $basePrice + $baseTax;
|
270 |
-
$taxSubtotal = $taxPrice * $qty;
|
271 |
-
$baseTaxSubtotal = $baseTaxPrice * $qty;
|
272 |
if ($taxOnOrigPrice) {
|
273 |
-
|
274 |
-
$
|
|
|
|
|
|
|
|
|
275 |
} else {
|
276 |
-
|
277 |
-
$
|
|
|
|
|
|
|
|
|
278 |
}
|
279 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
280 |
}
|
281 |
} else {
|
282 |
-
|
283 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
$taxPrice = $price + $tax;
|
285 |
$baseTaxPrice = $basePrice + $baseTax;
|
286 |
$taxSubtotal = $taxPrice * $qty;
|
287 |
$baseTaxSubtotal = $baseTaxPrice * $qty;
|
288 |
-
|
289 |
-
$taxable = $origPrice;
|
290 |
-
$baseTaxable = $baseOrigPrice;
|
291 |
-
} else {
|
292 |
-
$taxable = $price;
|
293 |
-
$baseTaxable = $basePrice;
|
294 |
-
}
|
295 |
-
$isPriceInclTax = false;
|
296 |
}
|
297 |
|
298 |
if ($item->hasCustomPrice()) {
|
@@ -326,37 +353,31 @@ class Mage_Tax_Model_Sales_Total_Quote_Subtotal extends Mage_Sales_Model_Quote_A
|
|
326 |
*
|
327 |
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
328 |
* @param Varien_Object $request
|
|
|
329 |
* @return Mage_Tax_Model_Sales_Total_Quote_Subtotal
|
330 |
*/
|
331 |
protected function _rowBaseCalculation($item, $request)
|
332 |
{
|
333 |
$request->setProductClassId($item->getProduct()->getTaxClassId());
|
334 |
-
$rate
|
335 |
-
$qty
|
336 |
|
337 |
-
$price
|
338 |
-
$basePrice
|
339 |
-
$subtotal
|
340 |
-
$baseSubtotal
|
|
|
|
|
341 |
$taxOnOrigPrice = !$this->_helper->applyTaxOnCustomPrice($this->_store) && $item->hasCustomPrice();
|
342 |
if ($taxOnOrigPrice) {
|
343 |
-
$origSubtotal
|
344 |
-
$baseOrigSubtotal
|
345 |
}
|
346 |
|
347 |
$item->setTaxPercent($rate);
|
348 |
if ($this->_config->priceIncludesTax($this->_store)) {
|
349 |
if ($this->_sameRateAsStore($request)) {
|
350 |
-
|
351 |
-
$baseRowTax = $this->_calculator->calcTaxAmount($baseSubtotal, $rate, true, true);
|
352 |
-
$taxPrice = $price;
|
353 |
-
$baseTaxPrice = $basePrice;
|
354 |
-
$taxSubtotal = $subtotal;
|
355 |
-
$baseTaxSubtotal = $baseSubtotal;
|
356 |
-
$subtotal = $this->_calculator->round($subtotal - $rowTax);
|
357 |
-
$baseSubtotal = $this->_calculator->round($baseSubtotal - $baseRowTax);
|
358 |
-
$price = $this->_calculator->round($subtotal/$qty);
|
359 |
-
$basePrice = $this->_calculator->round($baseSubtotal/$qty);
|
360 |
if ($taxOnOrigPrice) {
|
361 |
$taxable = $origSubtotal;
|
362 |
$baseTaxable = $baseOrigSubtotal;
|
@@ -364,47 +385,82 @@ class Mage_Tax_Model_Sales_Total_Quote_Subtotal extends Mage_Sales_Model_Quote_A
|
|
364 |
$taxable = $taxSubtotal;
|
365 |
$baseTaxable = $baseTaxSubtotal;
|
366 |
}
|
367 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
368 |
} else {
|
369 |
$storeRate = $this->_calculator->getStoreRate($request, $this->_store);
|
370 |
-
$storeTax = $this->_calculator->calcTaxAmount($subtotal, $storeRate, true, false);
|
371 |
-
$baseStoreTax = $this->_calculator->calcTaxAmount($baseSubtotal, $storeRate, true, false);
|
372 |
-
$subtotal = $this->_calculator->round($subtotal - $storeTax);
|
373 |
-
$baseSubtotal = $this->_calculator->round($baseSubtotal - $baseStoreTax);
|
374 |
-
$price = $this->_calculator->round($subtotal/$qty);
|
375 |
-
$basePrice = $this->_calculator->round($baseSubtotal/$qty);
|
376 |
-
|
377 |
-
$rowTax = $this->_calculator->calcTaxAmount($subtotal, $rate, false, false);
|
378 |
-
$baseRowTax = $this->_calculator->calcTaxAmount($baseSubtotal, $rate, false, false);
|
379 |
-
$taxSubtotal = $subtotal + $rowTax;
|
380 |
-
$baseTaxSubtotal = $baseSubtotal + $baseRowTax;
|
381 |
-
$taxPrice = $this->_calculator->round($taxSubtotal/$qty);
|
382 |
-
$baseTaxPrice = $this->_calculator->round($baseTaxSubtotal/$qty);
|
383 |
if ($taxOnOrigPrice) {
|
384 |
-
|
385 |
-
$
|
|
|
|
|
|
|
|
|
386 |
} else {
|
387 |
-
|
388 |
-
$
|
|
|
|
|
|
|
|
|
389 |
}
|
390 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
391 |
}
|
392 |
} else {
|
393 |
-
|
394 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
395 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
396 |
$taxSubtotal = $subtotal + $rowTax;
|
397 |
$baseTaxSubtotal = $baseSubtotal + $baseRowTax;
|
398 |
$taxPrice = $this->_calculator->round($taxSubtotal/$qty);
|
399 |
$baseTaxPrice = $this->_calculator->round($baseTaxSubtotal/$qty);
|
400 |
-
|
401 |
-
$taxable = $origSubtotal;
|
402 |
-
$baseTaxable = $baseOrigSubtotal;
|
403 |
-
} else {
|
404 |
-
$taxable = $subtotal;
|
405 |
-
$baseTaxable = $baseSubtotal;
|
406 |
-
}
|
407 |
-
$isPriceInclTax = false;
|
408 |
}
|
409 |
|
410 |
if ($item->hasCustomPrice()) {
|
@@ -427,11 +483,11 @@ class Mage_Tax_Model_Sales_Total_Quote_Subtotal extends Mage_Sales_Model_Quote_A
|
|
427 |
$item->setBaseTaxableAmount($baseTaxable);
|
428 |
$item->setIsPriceInclTax($isPriceInclTax);
|
429 |
if ($this->_config->discountTax($this->_store)) {
|
430 |
-
$item->setDiscountCalculationPrice($taxSubtotal
|
431 |
-
$item->setBaseDiscountCalculationPrice($baseTaxSubtotal
|
432 |
} elseif ($isPriceInclTax) {
|
433 |
-
$item->setDiscountCalculationPrice($subtotal
|
434 |
-
$item->setBaseDiscountCalculationPrice($baseSubtotal
|
435 |
}
|
436 |
|
437 |
return $this;
|
@@ -442,125 +498,128 @@ class Mage_Tax_Model_Sales_Total_Quote_Subtotal extends Mage_Sales_Model_Quote_A
|
|
442 |
*
|
443 |
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
444 |
* @param Varien_Object $request
|
|
|
445 |
* @return Mage_Tax_Model_Sales_Total_Quote_Subtotal
|
446 |
*/
|
447 |
protected function _totalBaseCalculation($item, $request)
|
448 |
{
|
449 |
-
$calc
|
450 |
$request->setProductClassId($item->getProduct()->getTaxClassId());
|
451 |
-
$rate
|
452 |
-
$qty
|
453 |
-
|
454 |
-
$price = $taxPrice = $this->_calculator->round($item->getCalculationPriceOriginal());
|
455 |
-
$basePrice = $baseTaxPrice = $this->_calculator->round($item->getBaseCalculationPriceOriginal());
|
456 |
-
$subtotal = $taxSubtotal = $item->getRowTotal();
|
457 |
-
$baseSubtotal = $baseTaxSubtotal = $item->getBaseRowTotal();
|
458 |
|
459 |
-
$
|
|
|
|
|
|
|
460 |
|
|
|
461 |
$taxOnOrigPrice = !$this->_helper->applyTaxOnCustomPrice($this->_store) && $item->hasCustomPrice();
|
462 |
if ($taxOnOrigPrice) {
|
463 |
-
$origSubtotal
|
464 |
-
$baseOrigSubtotal
|
465 |
}
|
|
|
466 |
$item->setTaxPercent($rate);
|
467 |
if ($this->_config->priceIncludesTax($this->_store)) {
|
468 |
if ($this->_sameRateAsStore($request)) {
|
|
|
469 |
if ($taxOnOrigPrice) {
|
470 |
-
$
|
471 |
-
$
|
472 |
-
$baseRowTaxExact = $calc->calcTaxAmount($baseOrigSubtotal, $rate, true, false);
|
473 |
-
$baseRowTax = $this->_deltaRound($baseRowTaxExact, $rate, true, 'base');
|
474 |
-
|
475 |
-
$taxable = $origSubtotal;
|
476 |
-
$baseTaxable = $baseOrigSubtotal;
|
477 |
} else {
|
478 |
-
$
|
479 |
-
$
|
480 |
-
$baseRowTaxExact = $calc->calcTaxAmount($baseSubtotal, $rate, true, false);
|
481 |
-
$baseRowTax = $this->_deltaRound($baseRowTaxExact, $rate, true, 'base');
|
482 |
-
|
483 |
-
$taxable = $subtotal;
|
484 |
-
$baseTaxable = $baseSubtotal;
|
485 |
}
|
|
|
|
|
|
|
|
|
|
|
486 |
$taxPrice = $price;
|
487 |
$baseTaxPrice = $basePrice;
|
488 |
-
|
489 |
-
$taxSubtotal = $subtotal;
|
490 |
$baseTaxSubtotal = $baseSubtotal;
|
491 |
|
492 |
-
$
|
493 |
-
$
|
494 |
-
|
495 |
-
$
|
|
|
496 |
|
497 |
-
$
|
498 |
-
$basePrice = $calc->round($baseSubtotal/$qty);
|
499 |
|
500 |
-
|
|
|
|
|
501 |
|
502 |
-
$item->setRowTotalExact($subtotalExact);
|
503 |
-
$item->setBaseRowTotalExact($baseSubtotalExact);
|
504 |
} else {
|
505 |
-
$storeRate
|
506 |
if ($taxOnOrigPrice) {
|
507 |
-
|
508 |
-
$
|
|
|
|
|
|
|
|
|
509 |
} else {
|
510 |
-
|
511 |
-
$
|
|
|
|
|
|
|
|
|
512 |
}
|
513 |
-
|
514 |
-
$
|
515 |
-
|
516 |
-
|
517 |
-
$
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
$
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
$
|
527 |
-
|
528 |
-
|
529 |
-
$
|
530 |
-
$baseTaxPrice = $calc->round($baseTaxSubtotal/$qty);
|
531 |
-
|
532 |
-
$taxable = $taxSubtotal;
|
533 |
-
$baseTaxable = $baseTaxSubtotal;
|
534 |
-
|
535 |
$isPriceInclTax = true;
|
|
|
|
|
|
|
536 |
}
|
537 |
} else {
|
|
|
538 |
if ($taxOnOrigPrice) {
|
539 |
-
$
|
540 |
-
|
541 |
-
$baseRowTax =
|
542 |
-
$this->_deltaRound(
|
543 |
-
$calc->calcTaxAmount($baseOrigSubtotal, $rate, false, false), $rate, true, 'base'
|
544 |
-
);
|
545 |
-
|
546 |
-
$taxable = $origSubtotal;
|
547 |
-
$baseTaxable = $baseOrigSubtotal;
|
548 |
} else {
|
549 |
-
$
|
550 |
-
$
|
551 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
552 |
|
553 |
-
$taxable = $subtotal;
|
554 |
-
$baseTaxable = $baseSubtotal;
|
555 |
}
|
556 |
|
557 |
-
$taxSubtotal = $subtotal + $
|
558 |
-
$baseTaxSubtotal = $baseSubtotal + $
|
559 |
|
560 |
$taxPrice = $calc->round($taxSubtotal/$qty);
|
561 |
$baseTaxPrice = $calc->round($baseTaxSubtotal/$qty);
|
562 |
|
563 |
-
$isPriceInclTax
|
564 |
}
|
565 |
|
566 |
if ($item->hasCustomPrice()) {
|
@@ -585,21 +644,41 @@ class Mage_Tax_Model_Sales_Total_Quote_Subtotal extends Mage_Sales_Model_Quote_A
|
|
585 |
$item->setBaseTaxableAmount($baseTaxable);
|
586 |
$item->setIsPriceInclTax($isPriceInclTax);
|
587 |
if ($this->_config->discountTax($this->_store)) {
|
588 |
-
$item->setDiscountCalculationPrice($taxSubtotal
|
589 |
-
$item->setBaseDiscountCalculationPrice($baseTaxSubtotal
|
590 |
} elseif ($isPriceInclTax) {
|
591 |
-
$item->setDiscountCalculationPrice($subtotal
|
592 |
-
$item->setBaseDiscountCalculationPrice($baseSubtotal
|
593 |
}
|
594 |
return $this;
|
595 |
}
|
596 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
597 |
/**
|
598 |
* Checks whether request for an item has same rate as store one
|
599 |
* Used only after collect() started, as far as uses optimized $_areTaxRequestsSimilar property
|
600 |
* Used only in case of prices including tax
|
601 |
*
|
602 |
* @param Varien_Object $request
|
|
|
603 |
* @return bool
|
604 |
*/
|
605 |
protected function _sameRateAsStore($request)
|
@@ -622,14 +701,16 @@ class Mage_Tax_Model_Sales_Total_Quote_Subtotal extends Mage_Sales_Model_Quote_A
|
|
622 |
* @param string $rate
|
623 |
* @param bool $direction
|
624 |
* @param string $type
|
|
|
625 |
* @return float
|
626 |
*/
|
627 |
protected function _deltaRound($price, $rate, $direction, $type = 'regular')
|
628 |
{
|
629 |
if ($price) {
|
630 |
-
$rate
|
631 |
-
$type
|
632 |
-
|
|
|
633 |
$price += $delta;
|
634 |
$this->_roundingDeltas[$type][$rate] = $price - $this->_calculator->round($price);
|
635 |
$price = $this->_calculator->round($price);
|
@@ -641,39 +722,39 @@ class Mage_Tax_Model_Sales_Total_Quote_Subtotal extends Mage_Sales_Model_Quote_A
|
|
641 |
* Recalculate row information for item based on children calculation
|
642 |
*
|
643 |
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
|
|
644 |
* @return Mage_Tax_Model_Sales_Total_Quote_Subtotal
|
645 |
*/
|
646 |
protected function _recalculateParent(Mage_Sales_Model_Quote_Item_Abstract $item)
|
647 |
{
|
648 |
-
$price = 0;
|
649 |
-
$basePrice = 0;
|
650 |
$rowTotal = 0;
|
651 |
$baseRowTotal = 0;
|
652 |
-
$priceInclTax = 0;
|
653 |
-
$basePriceInclTax = 0;
|
654 |
$rowTotalInclTax = 0;
|
655 |
$baseRowTotalInclTax = 0;
|
|
|
|
|
656 |
$store = $item->getStore();
|
657 |
$qty = $item->getQty();
|
658 |
|
659 |
foreach ($item->getChildren() as $child) {
|
660 |
-
$price += $child->getRowTotal();
|
661 |
-
$basePrice += $child->getBaseRowTotal();
|
662 |
$rowTotal += $child->getRowTotal();
|
663 |
$baseRowTotal += $child->getBaseRowTotal();
|
664 |
-
$priceInclTax += $child->getRowTotalInclTax();
|
665 |
-
$basePriceInclTax += $child->getBaseRowTotalInclTax();
|
666 |
$rowTotalInclTax += $child->getRowTotalInclTax();
|
667 |
$baseRowTotalInclTax += $child->getBaseRowTotalInclTax();
|
|
|
|
|
668 |
}
|
669 |
-
|
670 |
-
$item->
|
|
|
671 |
$item->setRowTotal($rowTotal);
|
672 |
$item->setBaseRowTotal($baseRowTotal);
|
673 |
-
$item->setPriceInclTax($store->roundPrice($
|
674 |
-
$item->setBasePriceInclTax($store->roundPrice($
|
675 |
$item->setRowTotalInclTax($rowTotalInclTax);
|
676 |
$item->setBaseRowTotalInclTax($baseRowTotalInclTax);
|
|
|
|
|
677 |
return $this;
|
678 |
}
|
679 |
|
@@ -681,6 +762,7 @@ class Mage_Tax_Model_Sales_Total_Quote_Subtotal extends Mage_Sales_Model_Quote_A
|
|
681 |
* Get request for fetching store tax rate
|
682 |
*
|
683 |
* @param Mage_Sales_Model_Quote_Address $address
|
|
|
684 |
* @return Varien_Object
|
685 |
*/
|
686 |
protected function _getStoreTaxRequest($address)
|
@@ -695,6 +777,7 @@ class Mage_Tax_Model_Sales_Total_Quote_Subtotal extends Mage_Sales_Model_Quote_A
|
|
695 |
* Get request for fetching address tax rate
|
696 |
*
|
697 |
* @param Mage_Sales_Model_Quote_Address $address
|
|
|
698 |
* @return Varien_Object
|
699 |
*/
|
700 |
protected function _getAddressTaxRequest($address)
|
@@ -713,18 +796,17 @@ class Mage_Tax_Model_Sales_Total_Quote_Subtotal extends Mage_Sales_Model_Quote_A
|
|
713 |
*
|
714 |
* @param Mage_Sales_Model_Quote_Address $address
|
715 |
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
|
|
716 |
* @return Mage_Tax_Model_Sales_Total_Quote_Subtotal
|
717 |
*/
|
718 |
protected function _addSubtotalAmount(Mage_Sales_Model_Quote_Address $address, $item)
|
719 |
{
|
720 |
-
if ($
|
721 |
-
$
|
722 |
-
|
723 |
-
);
|
724 |
-
$address->setBaseTotalAmount('subtotal',
|
725 |
-
|
726 |
-
}
|
727 |
-
else {
|
728 |
$address->setTotalAmount('subtotal',
|
729 |
$address->getTotalAmount('subtotal') + $item->getRowTotal()
|
730 |
);
|
@@ -741,22 +823,26 @@ class Mage_Tax_Model_Sales_Total_Quote_Subtotal extends Mage_Sales_Model_Quote_A
|
|
741 |
* Operation is necessary for reset item state in case if configuration was changed
|
742 |
*
|
743 |
* @deprecated after 1.4.1
|
|
|
744 |
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
|
|
745 |
* @return Mage_Tax_Model_Sales_Total_Quote_Subtotal
|
746 |
*/
|
747 |
protected function _resetItemPriceInclTax(Mage_Sales_Model_Quote_Item_Abstract $item)
|
748 |
{
|
749 |
-
$item->setPriceInclTax(null);
|
750 |
-
$item->setBasePriceInclTax(null);
|
751 |
-
$item->setRowTotalInclTax(null);
|
752 |
-
$item->setBaseRowTotalInclTax(null);
|
753 |
return $this;
|
754 |
}
|
755 |
|
756 |
/**
|
757 |
*
|
758 |
* @deprecated after 1.4.0.1
|
|
|
759 |
* @param Mage_Sales_Model_Quote_Address $address
|
|
|
760 |
* @return Mage_Tax_Model_Sales_Total_Quote_Subtotal
|
761 |
*/
|
762 |
protected function _processShippingAmount($address)
|
@@ -769,22 +855,24 @@ class Mage_Tax_Model_Sales_Total_Quote_Subtotal extends Mage_Sales_Model_Quote_A
|
|
769 |
* Declare item price including tax attributes
|
770 |
*
|
771 |
* @deprecated after 1.4.1
|
|
|
772 |
* @param Mage_Sales_Model_Quote_Address $address
|
773 |
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
|
|
774 |
* @return Mage_Tax_Model_Sales_Total_Quote_Subtotal
|
775 |
*/
|
776 |
protected function _recollectItem($address, Mage_Sales_Model_Quote_Item_Abstract $item)
|
777 |
{
|
778 |
-
$store
|
779 |
$request = $this->_getStoreTaxRequest($address);
|
780 |
$request->setProductClassId($item->getProduct()->getTaxClassId());
|
781 |
-
$rate
|
782 |
-
$qty
|
783 |
|
784 |
-
$price
|
785 |
-
$basePrice
|
786 |
-
$subtotal
|
787 |
-
$baseSubtotal
|
788 |
|
789 |
if ($this->_config->discountTax($store)) {
|
790 |
$item->setDiscountCalculationPrice($price);
|
@@ -795,10 +883,10 @@ class Mage_Tax_Model_Sales_Total_Quote_Subtotal extends Mage_Sales_Model_Quote_A
|
|
795 |
* Use original price for tax calculation
|
796 |
*/
|
797 |
if ($item->hasCustomPrice() && !$this->_helper->applyTaxOnCustomPrice($store)) {
|
798 |
-
$taxPrice
|
799 |
-
$baseTaxPrice
|
800 |
-
$taxSubtotal
|
801 |
-
$baseTaxSubtotal
|
802 |
}
|
803 |
|
804 |
if ($this->_areTaxRequestsSimilar) {
|
@@ -813,23 +901,23 @@ class Mage_Tax_Model_Sales_Total_Quote_Subtotal extends Mage_Sales_Model_Quote_A
|
|
813 |
$item->setBaseTaxCalcRowTotal($baseTaxSubtotal);
|
814 |
}
|
815 |
|
816 |
-
$this->_subtotalInclTax
|
817 |
$this->_baseSubtotalInclTax += $baseSubtotal;
|
818 |
|
819 |
if ($this->_config->getAlgorithm($store) == Mage_Tax_Model_Calculation::CALC_UNIT_BASE) {
|
820 |
-
$taxAmount
|
821 |
-
$baseTaxAmount
|
822 |
-
$unitPrice
|
823 |
-
$baseUnitPrice
|
824 |
-
$subtotal
|
825 |
-
$baseSubtotal
|
826 |
} else {
|
827 |
-
$taxAmount
|
828 |
-
$baseTaxAmount
|
829 |
-
$unitPrice
|
830 |
-
$baseUnitPrice
|
831 |
-
$subtotal
|
832 |
-
$baseSubtotal
|
833 |
}
|
834 |
|
835 |
if ($item->hasCustomPrice()) {
|
@@ -848,7 +936,9 @@ class Mage_Tax_Model_Sales_Total_Quote_Subtotal extends Mage_Sales_Model_Quote_A
|
|
848 |
* Check if we need subtract store tax amount from item prices
|
849 |
*
|
850 |
* @deprecated after 1.4.1
|
|
|
851 |
* @param Mage_Sales_Model_Quote_Address $address
|
|
|
852 |
* @return bool
|
853 |
*/
|
854 |
protected function _needSubtractTax($address)
|
@@ -866,6 +956,7 @@ class Mage_Tax_Model_Sales_Total_Quote_Subtotal extends Mage_Sales_Model_Quote_A
|
|
866 |
* @deprecated after 1.4.0.1
|
867 |
*
|
868 |
* @param Mage_Sales_Model_Quote_Address $address
|
|
|
869 |
* @return bool
|
870 |
*/
|
871 |
protected function _needSubtractShippingTax($address)
|
@@ -877,3 +968,4 @@ class Mage_Tax_Model_Sales_Total_Quote_Subtotal extends Mage_Sales_Model_Quote_A
|
|
877 |
return false;
|
878 |
}
|
879 |
}
|
|
113 |
public function __construct()
|
114 |
{
|
115 |
$this->setCode('tax_subtotal');
|
116 |
+
$this->_helper = Mage::helper('tax');
|
117 |
+
$this->_calculator = Mage::getSingleton('tax/calculation');
|
118 |
+
$this->_config = Mage::getSingleton('tax/config');
|
119 |
}
|
120 |
|
121 |
/**
|
124 |
* Determine discount price if needed
|
125 |
*
|
126 |
* @param Mage_Sales_Model_Quote_Address $address
|
127 |
+
*
|
128 |
* @return Mage_Tax_Model_Sales_Total_Quote_Subtotal
|
129 |
*/
|
130 |
public function collect(Mage_Sales_Model_Quote_Address $address)
|
131 |
{
|
132 |
+
$this->_store = $address->getQuote()->getStore();
|
133 |
$this->_address = $address;
|
134 |
|
135 |
+
$this->_subtotalInclTax = 0;
|
136 |
$this->_baseSubtotalInclTax = 0;
|
137 |
+
$this->_subtotal = 0;
|
138 |
+
$this->_baseSubtotal = 0;
|
139 |
+
$this->_roundingDeltas = array();
|
140 |
|
141 |
$address->setSubtotalInclTax(0);
|
142 |
$address->setBaseSubtotalInclTax(0);
|
149 |
}
|
150 |
|
151 |
$addressRequest = $this->_getAddressTaxRequest($address);
|
152 |
+
$storeRequest = $this->_getStoreTaxRequest($address);
|
153 |
$this->_calculator->setCustomer($address->getQuote()->getCustomer());
|
154 |
if ($this->_config->priceIncludesTax($this->_store)) {
|
155 |
$classIds = array();
|
190 |
*
|
191 |
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
192 |
* @param Varien_Object $taxRequest
|
193 |
+
*
|
194 |
* @return Mage_Tax_Model_Sales_Total_Quote_Subtotal
|
195 |
*/
|
196 |
protected function _processItem($item, $taxRequest)
|
216 |
*
|
217 |
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
218 |
* @param Varien_Object $request
|
219 |
+
*
|
220 |
* @return Mage_Tax_Model_Sales_Total_Quote_Subtotal
|
221 |
*/
|
222 |
protected function _unitBaseCalculation($item, $request)
|
223 |
{
|
224 |
$request->setProductClassId($item->getProduct()->getTaxClassId());
|
225 |
+
$rate = $this->_calculator->getRate($request);
|
226 |
+
$qty = $item->getTotalQty();
|
227 |
|
228 |
+
$price = $taxPrice = $this->_calculator->round($item->getCalculationPriceOriginal());
|
229 |
+
$basePrice = $baseTaxPrice = $this->_calculator->round($item->getBaseCalculationPriceOriginal());
|
230 |
+
$subtotal = $taxSubtotal = $this->_calculator->round($item->getRowTotal());
|
231 |
+
$baseSubtotal = $baseTaxSubtotal = $this->_calculator->round($item->getBaseRowTotal());
|
232 |
+
|
233 |
+
// if we have a custom price, determine if tax should be based on the original price
|
234 |
$taxOnOrigPrice = !$this->_helper->applyTaxOnCustomPrice($this->_store) && $item->hasCustomPrice();
|
235 |
if ($taxOnOrigPrice) {
|
236 |
+
$origPrice = $item->getOriginalPrice();
|
237 |
+
$baseOrigPrice = $item->getBaseOriginalPrice();
|
238 |
}
|
239 |
|
|
|
240 |
$item->setTaxPercent($rate);
|
241 |
if ($this->_config->priceIncludesTax($this->_store)) {
|
242 |
if ($this->_sameRateAsStore($request)) {
|
243 |
+
// determine which price to use when we calculate the tax
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
if ($taxOnOrigPrice) {
|
245 |
$taxable = $origPrice;
|
246 |
$baseTaxable = $baseOrigPrice;
|
247 |
} else {
|
248 |
+
$taxable = $price;
|
249 |
+
$baseTaxable = $basePrice;
|
250 |
}
|
251 |
+
$tax = $this->_calculator->calcTaxAmount($taxable, $rate, true);
|
252 |
+
$baseTax = $this->_calculator->calcTaxAmount($baseTaxable, $rate, true);
|
253 |
+
$taxPrice = $price;
|
254 |
+
$baseTaxPrice = $basePrice;
|
255 |
+
$taxSubtotal = $subtotal;
|
256 |
+
$baseTaxSubtotal = $baseSubtotal;
|
257 |
+
$price = $price - $tax;
|
258 |
+
$basePrice = $basePrice - $baseTax;
|
259 |
+
$subtotal = $price * $qty;
|
260 |
+
$baseSubtotal = $basePrice * $qty;
|
261 |
+
$isPriceInclTax = true;
|
262 |
+
|
263 |
+
$item->setRowTax($tax * $qty);
|
264 |
+
$item->setBaseRowTax($baseTax * $qty);
|
265 |
+
|
266 |
} else {
|
267 |
$storeRate = $this->_calculator->getStoreRate($request, $this->_store);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
268 |
if ($taxOnOrigPrice) {
|
269 |
+
// the merchant already provided a customer's price that includes tax
|
270 |
+
$taxPrice = $price;
|
271 |
+
$baseTaxPrice = $basePrice;
|
272 |
+
// determine which price to use when we calculate the tax
|
273 |
+
$taxable = $this->_calculatePriceInclTax($origPrice, $storeRate, $rate);
|
274 |
+
$baseTaxable = $this->_calculatePriceInclTax($baseOrigPrice, $storeRate, $rate);
|
275 |
} else {
|
276 |
+
// determine the customer's price that includes tax
|
277 |
+
$taxPrice = $this->_calculatePriceInclTax($price, $storeRate, $rate);
|
278 |
+
$baseTaxPrice = $this->_calculatePriceInclTax($basePrice, $storeRate, $rate);
|
279 |
+
// determine which price to use when we calculate the tax
|
280 |
+
$taxable = $taxPrice;
|
281 |
+
$baseTaxable = $baseTaxPrice;
|
282 |
}
|
283 |
+
// determine the customer's tax amount
|
284 |
+
$tax = $this->_calculator->calcTaxAmount($taxable, $rate, true, true);
|
285 |
+
$baseTax = $this->_calculator->calcTaxAmount($baseTaxable, $rate, true, true);
|
286 |
+
// determine the customer's price without taxes
|
287 |
+
$price = $taxPrice - $tax;
|
288 |
+
$basePrice = $baseTaxPrice - $baseTax;
|
289 |
+
// determine subtotal amounts
|
290 |
+
$taxSubtotal = $taxPrice * $qty;
|
291 |
+
$baseTaxSubtotal = $baseTaxPrice * $qty;
|
292 |
+
$subtotal = $price * $qty;
|
293 |
+
$baseSubtotal = $basePrice * $qty;
|
294 |
+
$isPriceInclTax = true;
|
295 |
+
|
296 |
+
$item->setRowTax($tax * $qty);
|
297 |
+
$item->setBaseRowTax($baseTax * $qty);
|
298 |
}
|
299 |
} else {
|
300 |
+
// determine which price to use when we calculate the tax
|
301 |
+
if ($taxOnOrigPrice) {
|
302 |
+
$taxable = $origPrice;
|
303 |
+
$baseTaxable = $baseOrigPrice;
|
304 |
+
} else {
|
305 |
+
$taxable = $price;
|
306 |
+
$baseTaxable = $basePrice;
|
307 |
+
}
|
308 |
+
$appliedRates = $this->_calculator->getAppliedRates($request);
|
309 |
+
$taxes = array();
|
310 |
+
$baseTaxes = array();
|
311 |
+
foreach ($appliedRates as $appliedRate) {
|
312 |
+
$taxRate = $appliedRate['percent'];
|
313 |
+
$taxes[] = $this->_calculator->calcTaxAmount($taxable, $taxRate, false);
|
314 |
+
$baseTaxes[] = $this->_calculator->calcTaxAmount($baseTaxable, $taxRate, false);
|
315 |
+
}
|
316 |
+
$tax = array_sum($taxes);
|
317 |
+
$baseTax = array_sum($baseTaxes);
|
318 |
$taxPrice = $price + $tax;
|
319 |
$baseTaxPrice = $basePrice + $baseTax;
|
320 |
$taxSubtotal = $taxPrice * $qty;
|
321 |
$baseTaxSubtotal = $baseTaxPrice * $qty;
|
322 |
+
$isPriceInclTax = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
}
|
324 |
|
325 |
if ($item->hasCustomPrice()) {
|
353 |
*
|
354 |
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
355 |
* @param Varien_Object $request
|
356 |
+
*
|
357 |
* @return Mage_Tax_Model_Sales_Total_Quote_Subtotal
|
358 |
*/
|
359 |
protected function _rowBaseCalculation($item, $request)
|
360 |
{
|
361 |
$request->setProductClassId($item->getProduct()->getTaxClassId());
|
362 |
+
$rate = $this->_calculator->getRate($request);
|
363 |
+
$qty = $item->getTotalQty();
|
364 |
|
365 |
+
$price = $taxPrice = $this->_calculator->round($item->getCalculationPriceOriginal());
|
366 |
+
$basePrice = $baseTaxPrice = $this->_calculator->round($item->getBaseCalculationPriceOriginal());
|
367 |
+
$subtotal = $taxSubtotal = $this->_calculator->round($item->getRowTotal());
|
368 |
+
$baseSubtotal = $baseTaxSubtotal = $this->_calculator->round($item->getBaseRowTotal());
|
369 |
+
|
370 |
+
// if we have a custom price, determine if tax should be based on the original price
|
371 |
$taxOnOrigPrice = !$this->_helper->applyTaxOnCustomPrice($this->_store) && $item->hasCustomPrice();
|
372 |
if ($taxOnOrigPrice) {
|
373 |
+
$origSubtotal = $item->getOriginalPrice() * $qty;
|
374 |
+
$baseOrigSubtotal = $item->getBaseOriginalPrice() * $qty;
|
375 |
}
|
376 |
|
377 |
$item->setTaxPercent($rate);
|
378 |
if ($this->_config->priceIncludesTax($this->_store)) {
|
379 |
if ($this->_sameRateAsStore($request)) {
|
380 |
+
// determine which price to use when we calculate the tax
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
381 |
if ($taxOnOrigPrice) {
|
382 |
$taxable = $origSubtotal;
|
383 |
$baseTaxable = $baseOrigSubtotal;
|
385 |
$taxable = $taxSubtotal;
|
386 |
$baseTaxable = $baseTaxSubtotal;
|
387 |
}
|
388 |
+
$rowTax = $this->_calculator->calcTaxAmount($taxable, $rate, true, true);
|
389 |
+
$baseRowTax = $this->_calculator->calcTaxAmount($baseTaxable, $rate, true, true);
|
390 |
+
$taxPrice = $price;
|
391 |
+
$baseTaxPrice = $basePrice;
|
392 |
+
$taxSubtotal = $subtotal;
|
393 |
+
$baseTaxSubtotal = $baseSubtotal;
|
394 |
+
$subtotal = $this->_calculator->round($subtotal - $rowTax);
|
395 |
+
$baseSubtotal = $this->_calculator->round($baseSubtotal - $baseRowTax);
|
396 |
+
$price = $this->_calculator->round($subtotal / $qty);
|
397 |
+
$basePrice = $this->_calculator->round($baseSubtotal / $qty);
|
398 |
+
$isPriceInclTax = true;
|
399 |
+
|
400 |
+
$item->setRowTax($rowTax);
|
401 |
+
$item->setBaseRowTax($baseRowTax);
|
402 |
} else {
|
403 |
$storeRate = $this->_calculator->getStoreRate($request, $this->_store);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
404 |
if ($taxOnOrigPrice) {
|
405 |
+
// the merchant already provided a customer's price that includes tax
|
406 |
+
$taxPrice = $price;
|
407 |
+
$baseTaxPrice = $basePrice;
|
408 |
+
// determine which price to use when we calculate the tax
|
409 |
+
$taxable = $this->_calculatePriceInclTax($item->getOriginalPrice(), $storeRate, $rate);
|
410 |
+
$baseTaxable = $this->_calculatePriceInclTax($item->getBaseOriginalPrice(), $storeRate, $rate);
|
411 |
} else {
|
412 |
+
// determine the customer's price that includes tax
|
413 |
+
$taxPrice = $this->_calculatePriceInclTax($price, $storeRate, $rate);
|
414 |
+
$baseTaxPrice = $this->_calculatePriceInclTax($basePrice, $storeRate, $rate);
|
415 |
+
// determine which price to use when we calculate the tax
|
416 |
+
$taxable = $taxPrice;
|
417 |
+
$baseTaxable = $baseTaxPrice;
|
418 |
}
|
419 |
+
// determine the customer's tax amount
|
420 |
+
$tax = $this->_calculator->calcTaxAmount($taxable, $rate, true, true);
|
421 |
+
$baseTax = $this->_calculator->calcTaxAmount($baseTaxable, $rate, true, true);
|
422 |
+
// determine the customer's price without taxes
|
423 |
+
$price = $taxPrice - $tax;
|
424 |
+
$basePrice = $baseTaxPrice - $baseTax;
|
425 |
+
// determine subtotal amounts
|
426 |
+
$taxable *= $qty;
|
427 |
+
$baseTaxable *= $qty;
|
428 |
+
$taxSubtotal = $taxPrice * $qty;
|
429 |
+
$baseTaxSubtotal = $baseTaxPrice * $qty;
|
430 |
+
$rowTax = $this->_calculator->calcTaxAmount($taxable, $rate, true, true);
|
431 |
+
$baseRowTax = $this->_calculator->calcTaxAmount($baseTaxable, $rate, true, true);
|
432 |
+
$subtotal = $taxSubtotal - $rowTax;
|
433 |
+
$baseSubtotal = $baseTaxSubtotal - $baseRowTax;
|
434 |
+
$isPriceInclTax = true;
|
435 |
+
|
436 |
+
$item->setRowTax($rowTax);
|
437 |
+
$item->setBaseRowTax($baseRowTax);
|
438 |
}
|
439 |
} else {
|
440 |
+
// determine which price to use when we calculate the tax
|
441 |
+
if ($taxOnOrigPrice) {
|
442 |
+
$taxable = $origSubtotal;
|
443 |
+
$baseTaxable = $baseOrigSubtotal;
|
444 |
+
} else {
|
445 |
+
$taxable = $subtotal;
|
446 |
+
$baseTaxable = $baseSubtotal;
|
447 |
+
}
|
448 |
|
449 |
+
$appliedRates = $this->_calculator->getAppliedRates($request);
|
450 |
+
$rowTaxes = array();
|
451 |
+
$baseRowTaxes = array();
|
452 |
+
foreach ($appliedRates as $appliedRate) {
|
453 |
+
$taxRate = $appliedRate['percent'];
|
454 |
+
$rowTaxes[] = $this->_calculator->calcTaxAmount($taxable, $taxRate, false, true);
|
455 |
+
$baseRowTaxes[] = $this->_calculator->calcTaxAmount($baseTaxable, $taxRate, false, true);
|
456 |
+
}
|
457 |
+
$rowTax = array_sum($rowTaxes);
|
458 |
+
$baseRowTax = array_sum($baseRowTaxes);
|
459 |
$taxSubtotal = $subtotal + $rowTax;
|
460 |
$baseTaxSubtotal = $baseSubtotal + $baseRowTax;
|
461 |
$taxPrice = $this->_calculator->round($taxSubtotal/$qty);
|
462 |
$baseTaxPrice = $this->_calculator->round($baseTaxSubtotal/$qty);
|
463 |
+
$isPriceInclTax = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
464 |
}
|
465 |
|
466 |
if ($item->hasCustomPrice()) {
|
483 |
$item->setBaseTaxableAmount($baseTaxable);
|
484 |
$item->setIsPriceInclTax($isPriceInclTax);
|
485 |
if ($this->_config->discountTax($this->_store)) {
|
486 |
+
$item->setDiscountCalculationPrice($taxSubtotal / $qty);
|
487 |
+
$item->setBaseDiscountCalculationPrice($baseTaxSubtotal / $qty);
|
488 |
} elseif ($isPriceInclTax) {
|
489 |
+
$item->setDiscountCalculationPrice($subtotal / $qty);
|
490 |
+
$item->setBaseDiscountCalculationPrice($baseSubtotal / $qty);
|
491 |
}
|
492 |
|
493 |
return $this;
|
498 |
*
|
499 |
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
500 |
* @param Varien_Object $request
|
501 |
+
*
|
502 |
* @return Mage_Tax_Model_Sales_Total_Quote_Subtotal
|
503 |
*/
|
504 |
protected function _totalBaseCalculation($item, $request)
|
505 |
{
|
506 |
+
$calc = $this->_calculator;
|
507 |
$request->setProductClassId($item->getProduct()->getTaxClassId());
|
508 |
+
$rate = $calc->getRate($request);
|
509 |
+
$qty = $item->getTotalQty();
|
|
|
|
|
|
|
|
|
|
|
510 |
|
511 |
+
$price = $taxPrice = $this->_calculator->round($item->getCalculationPriceOriginal());
|
512 |
+
$basePrice = $baseTaxPrice = $this->_calculator->round($item->getBaseCalculationPriceOriginal());
|
513 |
+
$subtotal = $taxSubtotal = $this->_calculator->round($item->getRowTotal());
|
514 |
+
$baseSubtotal = $baseTaxSubtotal = $this->_calculator->round($item->getBaseRowTotal());
|
515 |
|
516 |
+
// if we have a custom price, determine if tax should be based on the original price
|
517 |
$taxOnOrigPrice = !$this->_helper->applyTaxOnCustomPrice($this->_store) && $item->hasCustomPrice();
|
518 |
if ($taxOnOrigPrice) {
|
519 |
+
$origSubtotal = $item->getOriginalPrice() * $qty;
|
520 |
+
$baseOrigSubtotal = $item->getBaseOriginalPrice() * $qty;
|
521 |
}
|
522 |
+
|
523 |
$item->setTaxPercent($rate);
|
524 |
if ($this->_config->priceIncludesTax($this->_store)) {
|
525 |
if ($this->_sameRateAsStore($request)) {
|
526 |
+
// determine which price to use when we calculate the tax
|
527 |
if ($taxOnOrigPrice) {
|
528 |
+
$taxable = $origSubtotal;
|
529 |
+
$baseTaxable = $baseOrigSubtotal;
|
|
|
|
|
|
|
|
|
|
|
530 |
} else {
|
531 |
+
$taxable = $subtotal;
|
532 |
+
$baseTaxable = $baseSubtotal;
|
|
|
|
|
|
|
|
|
|
|
533 |
}
|
534 |
+
$rowTaxExact = $calc->calcTaxAmount($taxable, $rate, true, false);
|
535 |
+
$rowTax = $this->_deltaRound($rowTaxExact, $rate, true);
|
536 |
+
$baseRowTaxExact = $calc->calcTaxAmount($baseTaxable, $rate, true, false);
|
537 |
+
$baseRowTax = $this->_deltaRound($baseRowTaxExact, $rate, true, 'base');
|
538 |
+
|
539 |
$taxPrice = $price;
|
540 |
$baseTaxPrice = $basePrice;
|
541 |
+
$taxSubtotal = $subtotal;
|
|
|
542 |
$baseTaxSubtotal = $baseSubtotal;
|
543 |
|
544 |
+
$subtotal = $subtotal - $rowTax;
|
545 |
+
$baseSubtotal = $baseSubtotal - $baseRowTax;
|
546 |
+
|
547 |
+
$price = $calc->round($subtotal / $qty);
|
548 |
+
$basePrice = $calc->round($baseSubtotal / $qty);
|
549 |
|
550 |
+
$isPriceInclTax = true;
|
|
|
551 |
|
552 |
+
//Save the tax calculated
|
553 |
+
$item->setRowTax($rowTax);
|
554 |
+
$item->setBaseRowTax($baseRowTax);
|
555 |
|
|
|
|
|
556 |
} else {
|
557 |
+
$storeRate = $calc->getStoreRate($request, $this->_store);
|
558 |
if ($taxOnOrigPrice) {
|
559 |
+
// the merchant already provided a customer's price that includes tax
|
560 |
+
$taxPrice = $price;
|
561 |
+
$baseTaxPrice = $basePrice;
|
562 |
+
// determine which price to use when we calculate the tax
|
563 |
+
$taxable = $this->_calculatePriceInclTax($item->getOriginalPrice(), $storeRate, $rate);
|
564 |
+
$baseTaxable = $this->_calculatePriceInclTax($item->getBaseOriginalPrice(), $storeRate, $rate);
|
565 |
} else {
|
566 |
+
// determine the customer's price that includes tax
|
567 |
+
$taxPrice = $this->_calculatePriceInclTax($price, $storeRate, $rate);
|
568 |
+
$baseTaxPrice = $this->_calculatePriceInclTax($basePrice, $storeRate, $rate);
|
569 |
+
// determine which price to use when we calculate the tax
|
570 |
+
$taxable = $taxPrice;
|
571 |
+
$baseTaxable = $baseTaxPrice;
|
572 |
}
|
573 |
+
// determine the customer's tax amount based on the taxable price
|
574 |
+
$tax = $this->_calculator->calcTaxAmount($taxable, $rate, true, true);
|
575 |
+
$baseTax = $this->_calculator->calcTaxAmount($baseTaxable, $rate, true, true);
|
576 |
+
// determine the customer's price without taxes
|
577 |
+
$price = $taxPrice - $tax;
|
578 |
+
$basePrice = $baseTaxPrice - $baseTax;
|
579 |
+
// determine subtotal amounts
|
580 |
+
$taxable *= $qty;
|
581 |
+
$baseTaxable *= $qty;
|
582 |
+
$taxSubtotal = $taxPrice * $qty;
|
583 |
+
$baseTaxSubtotal = $baseTaxPrice * $qty;
|
584 |
+
$rowTax =
|
585 |
+
$this->_deltaRound($calc->calcTaxAmount($taxable, $rate, true, false), $rate, true);
|
586 |
+
$baseRowTax =
|
587 |
+
$this->_deltaRound($calc->calcTaxAmount($baseTaxable, $rate, true, false), $rate, true, 'base');
|
588 |
+
$subtotal = $taxSubtotal - $rowTax;
|
589 |
+
$baseSubtotal = $baseTaxSubtotal - $baseRowTax;
|
|
|
|
|
|
|
|
|
|
|
590 |
$isPriceInclTax = true;
|
591 |
+
|
592 |
+
$item->setRowTax($rowTax);
|
593 |
+
$item->setBaseRowTax($baseRowTax);
|
594 |
}
|
595 |
} else {
|
596 |
+
// determine which price to use when we calculate the tax
|
597 |
if ($taxOnOrigPrice) {
|
598 |
+
$taxable = $origSubtotal;
|
599 |
+
$baseTaxable = $baseOrigSubtotal;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
600 |
} else {
|
601 |
+
$taxable = $subtotal;
|
602 |
+
$baseTaxable = $baseSubtotal;
|
603 |
+
}
|
604 |
+
$appliedRates = $this->_calculator->getAppliedRates($request);
|
605 |
+
$rowTaxes = array();
|
606 |
+
$baseRowTaxes = array();
|
607 |
+
foreach ($appliedRates as $appliedRate) {
|
608 |
+
$taxId = $appliedRate['id'];
|
609 |
+
$taxRate = $appliedRate['percent'];
|
610 |
+
$rowTaxes[] = $this->_deltaRound($calc->calcTaxAmount($taxable, $taxRate, false, false), $taxId, false);
|
611 |
+
$baseRowTaxes[] = $this->_deltaRound(
|
612 |
+
$calc->calcTaxAmount($baseTaxable, $taxRate, false, false), $taxId, false, 'base');
|
613 |
|
|
|
|
|
614 |
}
|
615 |
|
616 |
+
$taxSubtotal = $subtotal + array_sum($rowTaxes);
|
617 |
+
$baseTaxSubtotal = $baseSubtotal + array_sum($baseRowTaxes);
|
618 |
|
619 |
$taxPrice = $calc->round($taxSubtotal/$qty);
|
620 |
$baseTaxPrice = $calc->round($baseTaxSubtotal/$qty);
|
621 |
|
622 |
+
$isPriceInclTax = false;
|
623 |
}
|
624 |
|
625 |
if ($item->hasCustomPrice()) {
|
644 |
$item->setBaseTaxableAmount($baseTaxable);
|
645 |
$item->setIsPriceInclTax($isPriceInclTax);
|
646 |
if ($this->_config->discountTax($this->_store)) {
|
647 |
+
$item->setDiscountCalculationPrice($taxSubtotal / $qty);
|
648 |
+
$item->setBaseDiscountCalculationPrice($baseTaxSubtotal / $qty);
|
649 |
} elseif ($isPriceInclTax) {
|
650 |
+
$item->setDiscountCalculationPrice($subtotal / $qty);
|
651 |
+
$item->setBaseDiscountCalculationPrice($baseSubtotal / $qty);
|
652 |
}
|
653 |
return $this;
|
654 |
}
|
655 |
|
656 |
+
/**
|
657 |
+
* Given a store price that includes tax at the store rate, this function will back out the store's tax, and add in
|
658 |
+
* the customer's tax. Returns this new price which is the customer's price including tax.
|
659 |
+
*
|
660 |
+
* @param float $storePriceInclTax
|
661 |
+
* @param float $storeRate
|
662 |
+
* @param float $customerRate
|
663 |
+
*
|
664 |
+
* @return float
|
665 |
+
*/
|
666 |
+
protected function _calculatePriceInclTax($storePriceInclTax, $storeRate, $customerRate)
|
667 |
+
{
|
668 |
+
$storeTax = $this->_calculator->calcTaxAmount($storePriceInclTax, $storeRate, true, false);
|
669 |
+
$priceExclTax = $storePriceInclTax - $storeTax;
|
670 |
+
$customerTax = $this->_calculator->calcTaxAmount($priceExclTax, $customerRate, false, false);
|
671 |
+
$customerPriceInclTax = $this->_calculator->round($priceExclTax + $customerTax);
|
672 |
+
return $customerPriceInclTax;
|
673 |
+
}
|
674 |
+
|
675 |
/**
|
676 |
* Checks whether request for an item has same rate as store one
|
677 |
* Used only after collect() started, as far as uses optimized $_areTaxRequestsSimilar property
|
678 |
* Used only in case of prices including tax
|
679 |
*
|
680 |
* @param Varien_Object $request
|
681 |
+
*
|
682 |
* @return bool
|
683 |
*/
|
684 |
protected function _sameRateAsStore($request)
|
701 |
* @param string $rate
|
702 |
* @param bool $direction
|
703 |
* @param string $type
|
704 |
+
*
|
705 |
* @return float
|
706 |
*/
|
707 |
protected function _deltaRound($price, $rate, $direction, $type = 'regular')
|
708 |
{
|
709 |
if ($price) {
|
710 |
+
$rate = (string)$rate;
|
711 |
+
$type = $type . $direction;
|
712 |
+
// initialize the delta to a small number to avoid non-deterministic behavior with rounding of 0.5
|
713 |
+
$delta = isset($this->_roundingDeltas[$type][$rate]) ? $this->_roundingDeltas[$type][$rate] :0.000001;
|
714 |
$price += $delta;
|
715 |
$this->_roundingDeltas[$type][$rate] = $price - $this->_calculator->round($price);
|
716 |
$price = $this->_calculator->round($price);
|
722 |
* Recalculate row information for item based on children calculation
|
723 |
*
|
724 |
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
725 |
+
*
|
726 |
* @return Mage_Tax_Model_Sales_Total_Quote_Subtotal
|
727 |
*/
|
728 |
protected function _recalculateParent(Mage_Sales_Model_Quote_Item_Abstract $item)
|
729 |
{
|
|
|
|
|
730 |
$rowTotal = 0;
|
731 |
$baseRowTotal = 0;
|
|
|
|
|
732 |
$rowTotalInclTax = 0;
|
733 |
$baseRowTotalInclTax = 0;
|
734 |
+
$rowTax = 0;
|
735 |
+
$baseRowTax = 0;
|
736 |
$store = $item->getStore();
|
737 |
$qty = $item->getQty();
|
738 |
|
739 |
foreach ($item->getChildren() as $child) {
|
|
|
|
|
740 |
$rowTotal += $child->getRowTotal();
|
741 |
$baseRowTotal += $child->getBaseRowTotal();
|
|
|
|
|
742 |
$rowTotalInclTax += $child->getRowTotalInclTax();
|
743 |
$baseRowTotalInclTax += $child->getBaseRowTotalInclTax();
|
744 |
+
$rowTax += $child->getRowTax();
|
745 |
+
$baseRowTax += $child->getBaseRowTax();
|
746 |
}
|
747 |
+
|
748 |
+
$item->setConvertedPrice($store->roundPrice($rowTotal) / $qty);
|
749 |
+
$item->setPrice($store->roundPrice($baseRowTotal) / $qty);
|
750 |
$item->setRowTotal($rowTotal);
|
751 |
$item->setBaseRowTotal($baseRowTotal);
|
752 |
+
$item->setPriceInclTax($store->roundPrice($rowTotalInclTax) / $qty);
|
753 |
+
$item->setBasePriceInclTax($store->roundPrice($baseRowTotalInclTax) / $qty);
|
754 |
$item->setRowTotalInclTax($rowTotalInclTax);
|
755 |
$item->setBaseRowTotalInclTax($baseRowTotalInclTax);
|
756 |
+
$item->setRowTax($rowTax);
|
757 |
+
$item->setBaseRowTax($baseRowTax);
|
758 |
return $this;
|
759 |
}
|
760 |
|
762 |
* Get request for fetching store tax rate
|
763 |
*
|
764 |
* @param Mage_Sales_Model_Quote_Address $address
|
765 |
+
*
|
766 |
* @return Varien_Object
|
767 |
*/
|
768 |
protected function _getStoreTaxRequest($address)
|
777 |
* Get request for fetching address tax rate
|
778 |
*
|
779 |
* @param Mage_Sales_Model_Quote_Address $address
|
780 |
+
*
|
781 |
* @return Varien_Object
|
782 |
*/
|
783 |
protected function _getAddressTaxRequest($address)
|
796 |
*
|
797 |
* @param Mage_Sales_Model_Quote_Address $address
|
798 |
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
799 |
+
*
|
800 |
* @return Mage_Tax_Model_Sales_Total_Quote_Subtotal
|
801 |
*/
|
802 |
protected function _addSubtotalAmount(Mage_Sales_Model_Quote_Address $address, $item)
|
803 |
{
|
804 |
+
if ($this->_config->priceIncludesTax($this->_store)) {
|
805 |
+
$subTotal = $item->getRowTotalInclTax() - $item->getRowTax();
|
806 |
+
$baseSubTotal = $item->getBaseRowTotalInclTax() - $item->getBaseRowTax();
|
807 |
+
$address->setTotalAmount('subtotal', $address->getTotalAmount('subtotal') + $subTotal);
|
808 |
+
$address->setBaseTotalAmount('subtotal', $address->getBaseTotalAmount('subtotal') + $baseSubTotal);
|
809 |
+
} else {
|
|
|
|
|
810 |
$address->setTotalAmount('subtotal',
|
811 |
$address->getTotalAmount('subtotal') + $item->getRowTotal()
|
812 |
);
|
823 |
* Operation is necessary for reset item state in case if configuration was changed
|
824 |
*
|
825 |
* @deprecated after 1.4.1
|
826 |
+
*
|
827 |
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
828 |
+
*
|
829 |
* @return Mage_Tax_Model_Sales_Total_Quote_Subtotal
|
830 |
*/
|
831 |
protected function _resetItemPriceInclTax(Mage_Sales_Model_Quote_Item_Abstract $item)
|
832 |
{
|
833 |
+
// $item->setPriceInclTax(null);
|
834 |
+
// $item->setBasePriceInclTax(null);
|
835 |
+
// $item->setRowTotalInclTax(null);
|
836 |
+
// $item->setBaseRowTotalInclTax(null);
|
837 |
return $this;
|
838 |
}
|
839 |
|
840 |
/**
|
841 |
*
|
842 |
* @deprecated after 1.4.0.1
|
843 |
+
*
|
844 |
* @param Mage_Sales_Model_Quote_Address $address
|
845 |
+
*
|
846 |
* @return Mage_Tax_Model_Sales_Total_Quote_Subtotal
|
847 |
*/
|
848 |
protected function _processShippingAmount($address)
|
855 |
* Declare item price including tax attributes
|
856 |
*
|
857 |
* @deprecated after 1.4.1
|
858 |
+
*
|
859 |
* @param Mage_Sales_Model_Quote_Address $address
|
860 |
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
861 |
+
*
|
862 |
* @return Mage_Tax_Model_Sales_Total_Quote_Subtotal
|
863 |
*/
|
864 |
protected function _recollectItem($address, Mage_Sales_Model_Quote_Item_Abstract $item)
|
865 |
{
|
866 |
+
$store = $address->getQuote()->getStore();
|
867 |
$request = $this->_getStoreTaxRequest($address);
|
868 |
$request->setProductClassId($item->getProduct()->getTaxClassId());
|
869 |
+
$rate = $this->_calculator->getRate($request);
|
870 |
+
$qty = $item->getTotalQty();
|
871 |
|
872 |
+
$price = $taxPrice = $item->getCalculationPriceOriginal();
|
873 |
+
$basePrice = $baseTaxPrice = $item->getBaseCalculationPriceOriginal();
|
874 |
+
$subtotal = $taxSubtotal = $item->getRowTotal();
|
875 |
+
$baseSubtotal = $baseTaxSubtotal = $item->getBaseRowTotal();
|
876 |
|
877 |
if ($this->_config->discountTax($store)) {
|
878 |
$item->setDiscountCalculationPrice($price);
|
883 |
* Use original price for tax calculation
|
884 |
*/
|
885 |
if ($item->hasCustomPrice() && !$this->_helper->applyTaxOnCustomPrice($store)) {
|
886 |
+
$taxPrice = $item->getOriginalPrice();
|
887 |
+
$baseTaxPrice = $item->getBaseOriginalPrice();
|
888 |
+
$taxSubtotal = $taxPrice * $qty;
|
889 |
+
$baseTaxSubtotal = $baseTaxPrice * $qty;
|
890 |
}
|
891 |
|
892 |
if ($this->_areTaxRequestsSimilar) {
|
901 |
$item->setBaseTaxCalcRowTotal($baseTaxSubtotal);
|
902 |
}
|
903 |
|
904 |
+
$this->_subtotalInclTax += $subtotal;
|
905 |
$this->_baseSubtotalInclTax += $baseSubtotal;
|
906 |
|
907 |
if ($this->_config->getAlgorithm($store) == Mage_Tax_Model_Calculation::CALC_UNIT_BASE) {
|
908 |
+
$taxAmount = $this->_calculator->calcTaxAmount($taxPrice, $rate, true);
|
909 |
+
$baseTaxAmount = $this->_calculator->calcTaxAmount($baseTaxPrice, $rate, true);
|
910 |
+
$unitPrice = $this->_calculator->round($price - $taxAmount);
|
911 |
+
$baseUnitPrice = $this->_calculator->round($basePrice - $baseTaxAmount);
|
912 |
+
$subtotal = $this->_calculator->round($unitPrice * $qty);
|
913 |
+
$baseSubtotal = $this->_calculator->round($baseUnitPrice * $qty);
|
914 |
} else {
|
915 |
+
$taxAmount = $this->_calculator->calcTaxAmount($taxSubtotal, $rate, true, false);
|
916 |
+
$baseTaxAmount = $this->_calculator->calcTaxAmount($baseTaxSubtotal, $rate, true, false);
|
917 |
+
$unitPrice = ($subtotal - $taxAmount) / $qty;
|
918 |
+
$baseUnitPrice = ($baseSubtotal - $baseTaxAmount) / $qty;
|
919 |
+
$subtotal = $this->_calculator->round(($subtotal - $taxAmount));
|
920 |
+
$baseSubtotal = $this->_calculator->round(($baseSubtotal - $baseTaxAmount));
|
921 |
}
|
922 |
|
923 |
if ($item->hasCustomPrice()) {
|
936 |
* Check if we need subtract store tax amount from item prices
|
937 |
*
|
938 |
* @deprecated after 1.4.1
|
939 |
+
*
|
940 |
* @param Mage_Sales_Model_Quote_Address $address
|
941 |
+
*
|
942 |
* @return bool
|
943 |
*/
|
944 |
protected function _needSubtractTax($address)
|
956 |
* @deprecated after 1.4.0.1
|
957 |
*
|
958 |
* @param Mage_Sales_Model_Quote_Address $address
|
959 |
+
*
|
960 |
* @return bool
|
961 |
*/
|
962 |
protected function _needSubtractShippingTax($address)
|
968 |
return false;
|
969 |
}
|
970 |
}
|
971 |
+
|
app/code/core/Mage/Tax/Model/Sales/Total/Quote/Tax.php
CHANGED
@@ -84,15 +84,23 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
84 |
*/
|
85 |
protected $_hiddenTaxes = array();
|
86 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
/**
|
88 |
* Class constructor
|
89 |
*/
|
90 |
public function __construct()
|
91 |
{
|
92 |
$this->setCode('tax');
|
93 |
-
$this->_helper
|
94 |
-
$this->_calculator
|
95 |
-
$this->_config
|
96 |
$this->_weeeHelper = Mage::helper('weee');
|
97 |
}
|
98 |
|
@@ -149,9 +157,9 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
149 |
public function collect(Mage_Sales_Model_Quote_Address $address)
|
150 |
{
|
151 |
parent::collect($address);
|
152 |
-
$this->_roundingDeltas
|
153 |
-
$this->_baseRoundingDeltas
|
154 |
-
$this->_hiddenTaxes
|
155 |
$address->setShippingTaxAmount(0);
|
156 |
$address->setBaseShippingTaxAmount(0);
|
157 |
|
@@ -222,53 +230,34 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
222 |
foreach ($this->_hiddenTaxes as $taxInfoItem) {
|
223 |
if (isset($taxInfoItem['item'])) {
|
224 |
// Item hidden taxes
|
225 |
-
$item
|
226 |
-
$rateKey
|
227 |
-
$hiddenTax
|
228 |
-
$baseHiddenTax
|
229 |
-
$inclTax
|
230 |
-
$qty
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
$item->setBaseHiddenTaxAmount(max(0, $qty * $baseHiddenTax));
|
239 |
-
} else {
|
240 |
-
$hiddenTax = $this->_calculator->round($hiddenTax);
|
241 |
-
$baseHiddenTax = $this->_calculator->round($baseHiddenTax);
|
242 |
-
$item->setHiddenTaxAmount(max(0, $qty * $hiddenTax));
|
243 |
-
$item->setBaseHiddenTaxAmount(max(0, $qty * $baseHiddenTax));
|
244 |
-
$this->_getAddress()->addTotalAmount('hidden_tax', $item->getHiddenTaxAmount());
|
245 |
-
$this->_getAddress()->addBaseTotalAmount('hidden_tax', $item->getBaseHiddenTaxAmount());
|
246 |
-
}
|
247 |
} else {
|
248 |
// Shipping hidden taxes
|
249 |
-
$rateKey
|
250 |
-
$hiddenTax
|
251 |
-
$baseHiddenTax
|
252 |
-
$inclTax
|
253 |
|
254 |
-
|
255 |
-
|
256 |
-
$this->_getAddress()->addBaseTotalAmount('shipping_hidden_tax', $baseHiddenTax);
|
257 |
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
$this->_getAddress()->setShippingHiddenTaxAmount(max(0, $hiddenTax));
|
262 |
-
$this->_getAddress()->setBaseShippingHiddenTaxAmount(max(0, $baseHiddenTax));
|
263 |
-
} else {
|
264 |
-
$hiddenTax = $this->_deltaRound($hiddenTax, $rateKey, $inclTax);
|
265 |
-
$baseHiddenTax = $this->_deltaRound($baseHiddenTax, $rateKey, $inclTax, 'base');
|
266 |
|
267 |
-
|
268 |
-
|
269 |
-
$this->_getAddress()->addTotalAmount('shipping_hidden_tax', $hiddenTax);
|
270 |
-
$this->_getAddress()->addBaseTotalAmount('shipping_hidden_tax', $baseHiddenTax);
|
271 |
-
}
|
272 |
}
|
273 |
}
|
274 |
}
|
@@ -290,32 +279,31 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
290 |
}
|
291 |
|
292 |
/**
|
293 |
-
* Tax caclulation for shipping price
|
294 |
*
|
295 |
-
* @param
|
296 |
-
* @param
|
297 |
-
* @
|
|
|
298 |
*/
|
299 |
-
protected function
|
|
|
300 |
{
|
301 |
-
$
|
302 |
-
$
|
303 |
-
$
|
304 |
-
$
|
305 |
-
|
306 |
-
$
|
307 |
-
|
308 |
-
$hiddenTax = null;
|
309 |
-
$baseHiddenTax = null;
|
310 |
switch ($this->_helper->getCalculationSequence($this->_store)) {
|
311 |
case Mage_Tax_Model_Calculation::CALC_TAX_BEFORE_DISCOUNT_ON_EXCL:
|
312 |
case Mage_Tax_Model_Calculation::CALC_TAX_BEFORE_DISCOUNT_ON_INCL:
|
313 |
-
$tax
|
314 |
-
$baseTax
|
315 |
break;
|
316 |
case Mage_Tax_Model_Calculation::CALC_TAX_AFTER_DISCOUNT_ON_EXCL:
|
317 |
case Mage_Tax_Model_Calculation::CALC_TAX_AFTER_DISCOUNT_ON_INCL:
|
318 |
-
$discountAmount
|
319 |
$baseDiscountAmount = $address->getBaseShippingDiscountAmount();
|
320 |
$tax = $this->_calculator->calcTaxAmount(
|
321 |
$shipping - $discountAmount,
|
@@ -333,33 +321,81 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
333 |
}
|
334 |
|
335 |
if ($this->_config->getAlgorithm($this->_store) == Mage_Tax_Model_Calculation::CALC_TOTAL_BASE) {
|
|
|
|
|
336 |
$this->_addAmount(max(0, $tax));
|
337 |
$this->_addBaseAmount(max(0, $baseTax));
|
338 |
-
$tax = $this->_deltaRound($tax, $rate, $inclTax);
|
339 |
-
$baseTax = $this->_deltaRound($baseTax, $rate, $inclTax, 'base');
|
340 |
} else {
|
341 |
-
$tax
|
342 |
-
$baseTax
|
343 |
$this->_addAmount(max(0, $tax));
|
344 |
$this->_addBaseAmount(max(0, $baseTax));
|
345 |
}
|
346 |
|
347 |
if ($inclTax && !empty($discountAmount)) {
|
348 |
-
$
|
349 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
350 |
$this->_hiddenTaxes[] = array(
|
351 |
-
'rate_key'
|
352 |
-
'value'
|
353 |
'base_value' => $baseHiddenTax,
|
354 |
-
'incl_tax'
|
355 |
);
|
356 |
}
|
357 |
|
358 |
-
$address->setShippingTaxAmount(max(0, $tax));
|
359 |
-
$address->setBaseShippingTaxAmount(max(0, $baseTax));
|
360 |
-
$
|
361 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
362 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
363 |
return $this;
|
364 |
}
|
365 |
|
@@ -372,7 +408,9 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
372 |
protected function _unitBaseCalculation(Mage_Sales_Model_Quote_Address $address, $taxRateRequest)
|
373 |
{
|
374 |
$items = $this->_getAddressItems($address);
|
375 |
-
$itemTaxGroups
|
|
|
|
|
376 |
|
377 |
foreach ($items as $item) {
|
378 |
if ($item->getParentItem()) {
|
@@ -381,44 +419,13 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
381 |
|
382 |
if ($item->getHasChildren() && $item->isChildrenCalculated()) {
|
383 |
foreach ($item->getChildren() as $child) {
|
384 |
-
$
|
385 |
-
|
386 |
-
$this->_calcUnitTaxAmount($child, $rate);
|
387 |
-
$this->_addAmount($child->getTaxAmount());
|
388 |
-
$this->_addBaseAmount($child->getBaseTaxAmount());
|
389 |
-
$applied = $this->_calculator->getAppliedRates($taxRateRequest);
|
390 |
-
if ($rate > 0) {
|
391 |
-
$itemTaxGroups[$child->getId()] = $applied;
|
392 |
-
}
|
393 |
-
$this->_saveAppliedTaxes(
|
394 |
-
$address,
|
395 |
-
$applied,
|
396 |
-
$child->getTaxAmount(),
|
397 |
-
$child->getBaseTaxAmount(),
|
398 |
-
$rate
|
399 |
-
);
|
400 |
-
$child->setTaxRates($applied);
|
401 |
}
|
402 |
$this->_recalculateParent($item);
|
403 |
-
}
|
404 |
-
|
405 |
-
|
406 |
-
$rate = $this->_calculator->getRate($taxRateRequest);
|
407 |
-
$this->_calcUnitTaxAmount($item, $rate);
|
408 |
-
$this->_addAmount($item->getTaxAmount());
|
409 |
-
$this->_addBaseAmount($item->getBaseTaxAmount());
|
410 |
-
$applied = $this->_calculator->getAppliedRates($taxRateRequest);
|
411 |
-
if ($rate > 0) {
|
412 |
-
$itemTaxGroups[$item->getId()] = $applied;
|
413 |
-
}
|
414 |
-
$this->_saveAppliedTaxes(
|
415 |
-
$address,
|
416 |
-
$applied,
|
417 |
-
$item->getTaxAmount(),
|
418 |
-
$item->getBaseTaxAmount(),
|
419 |
-
$rate
|
420 |
-
);
|
421 |
-
$item->setTaxRates($applied);
|
422 |
}
|
423 |
}
|
424 |
if ($address->getQuote()->getTaxesForItems()) {
|
@@ -428,45 +435,121 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
428 |
return $this;
|
429 |
}
|
430 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
431 |
/**
|
432 |
* Calculate unit tax anount based on unit price
|
433 |
*
|
434 |
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
435 |
* @param float $rate
|
|
|
|
|
|
|
436 |
* @return Mage_Tax_Model_Sales_Total_Quote
|
437 |
*/
|
438 |
-
protected function _calcUnitTaxAmount(
|
|
|
|
|
439 |
{
|
440 |
-
$qty
|
441 |
-
$inclTax
|
442 |
-
$price
|
443 |
-
$basePrice
|
444 |
-
$rateKey
|
445 |
-
$item->setTaxPercent($rate);
|
446 |
|
447 |
$isWeeeEnabled = $this->_weeeHelper->isEnabled();
|
448 |
$isWeeeTaxable = $this->_weeeHelper->isTaxable();
|
449 |
|
450 |
-
$hiddenTax
|
451 |
-
$baseHiddenTax
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
452 |
switch ($this->_config->getCalculationSequence($this->_store)) {
|
453 |
case Mage_Tax_Model_Calculation::CALC_TAX_BEFORE_DISCOUNT_ON_EXCL:
|
454 |
case Mage_Tax_Model_Calculation::CALC_TAX_BEFORE_DISCOUNT_ON_INCL:
|
455 |
-
$
|
456 |
-
$
|
457 |
|
458 |
if ($isWeeeEnabled && $isWeeeTaxable) {
|
459 |
-
$
|
460 |
-
$
|
|
|
|
|
461 |
}
|
462 |
-
$unitTax = $this->_calculator->round($
|
463 |
-
$baseUnitTax = $this->_calculator->round($
|
464 |
break;
|
465 |
case Mage_Tax_Model_Calculation::CALC_TAX_AFTER_DISCOUNT_ON_EXCL:
|
466 |
case Mage_Tax_Model_Calculation::CALC_TAX_AFTER_DISCOUNT_ON_INCL:
|
467 |
-
$discountAmount
|
468 |
$baseDiscountAmount = $item->getBaseDiscountAmount() / $qty;
|
469 |
|
|
|
470 |
if ($isWeeeEnabled) {
|
471 |
$discountAmount = $discountAmount - $item->getWeeeDiscount() / $qty;
|
472 |
$baseDiscountAmount = $baseDiscountAmount - $item->getBaseWeeeDiscount() / $qty;
|
@@ -481,87 +564,84 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
481 |
$baseUnitTax = $this->_calculator->round(max($baseUnitTaxBeforeDiscount - $baseUnitTaxDiscount, 0));
|
482 |
|
483 |
if ($isWeeeEnabled && $this->_weeeHelper->isTaxable()) {
|
484 |
-
$weeeTax =
|
485 |
$weeeTax = $weeeTax / $qty;
|
486 |
$unitTax += $weeeTax;
|
487 |
-
$baseWeeeTax =
|
488 |
-
($item->getBaseWeeeTaxAppliedRowAmount() - $item->getBaseWeeeDiscount()) * $rate / 100;
|
489 |
$baseWeeeTax = $baseWeeeTax / $qty;
|
490 |
$baseUnitTax += $baseWeeeTax;
|
491 |
}
|
|
|
492 |
$unitTax = $this->_calculator->round($unitTax);
|
493 |
$baseUnitTax = $this->_calculator->round($baseUnitTax);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
494 |
if ($inclTax && $discountAmount > 0) {
|
495 |
-
$hiddenTax
|
496 |
-
$baseHiddenTax
|
497 |
$this->_hiddenTaxes[] = array(
|
498 |
-
'rate_key'
|
499 |
-
'qty'
|
500 |
-
'item'
|
501 |
-
'value'
|
502 |
'base_value' => $baseHiddenTax,
|
503 |
-
'incl_tax'
|
504 |
);
|
505 |
} elseif ($discountAmount > $price) { // case with 100% discount on price incl. tax
|
506 |
-
$hiddenTax
|
507 |
-
$baseHiddenTax
|
508 |
$this->_hiddenTaxes[] = array(
|
509 |
-
'rate_key'
|
510 |
-
'qty'
|
511 |
-
'item'
|
512 |
-
'value'
|
513 |
'base_value' => $baseHiddenTax,
|
514 |
-
'incl_tax'
|
515 |
);
|
516 |
}
|
517 |
// calculate discount compensation
|
|
|
|
|
518 |
if (!$item->getNoDiscount() && $item->getWeeeTaxApplied()) {
|
519 |
-
$
|
520 |
-
|
521 |
-
$rate,
|
522 |
-
$inclTax,
|
523 |
-
false
|
524 |
-
);
|
525 |
-
$baseUnitTaxBeforeDiscount = $this->_calculator->calcTaxAmount(
|
526 |
-
$price,
|
527 |
-
$rate,
|
528 |
-
$inclTax,
|
529 |
-
false
|
530 |
-
);
|
531 |
-
if ($isWeeeTaxable) {
|
532 |
-
$unitTaxBeforeDiscount += $item->getWeeeTaxAppliedAmount() * $rate / 100;
|
533 |
-
$baseUnitTaxBeforeDiscount += $item->getBaseWeeeTaxAppliedAmount() * $rate / 100;
|
534 |
-
}
|
535 |
-
$unitTaxBeforeDiscount = max(0, $this->_calculator->round($unitTaxBeforeDiscount));
|
536 |
-
$baseUnitTaxBeforeDiscount = max(0, $this->_calculator->round($baseUnitTaxBeforeDiscount));
|
537 |
-
$item->setDiscountTaxCompensation($unitTaxBeforeDiscount * $qty - max(0, $unitTax) * $qty);
|
538 |
-
$item->setBaseDiscountTaxCompensation(
|
539 |
-
$baseUnitTaxBeforeDiscount * $qty - max(0, $baseUnitTax) * $qty
|
540 |
-
);
|
541 |
}
|
542 |
break;
|
543 |
}
|
544 |
|
545 |
-
$
|
546 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
547 |
|
548 |
$rowTotalInclTax = $item->getRowTotalInclTax();
|
549 |
-
if (!isset($rowTotalInclTax)) {
|
550 |
if ($this->_config->priceIncludesTax($this->_store)) {
|
551 |
-
$
|
552 |
-
$
|
553 |
-
if ($isWeeeTaxable) {
|
554 |
-
$weeeTaxBeforeDiscount = $item->getWeeeTaxAppliedRowAmount() * $rate/100;
|
555 |
-
$baseWeeeTaxBeforeDiscount = $item->getBaseWeeeTaxAppliedRowAmount() * $rate/100;
|
556 |
-
}
|
557 |
-
$item->setRowTotalInclTax($price * $qty + $weeeTaxBeforeDiscount);
|
558 |
-
$item->setBaseRowTotalInclTax($basePrice * $qty + $baseWeeeTaxBeforeDiscount);
|
559 |
} else {
|
560 |
-
$
|
561 |
-
|
562 |
$item->setBaseRowTotalInclTax(
|
563 |
-
$
|
564 |
-
|
565 |
}
|
566 |
}
|
567 |
|
@@ -578,7 +658,9 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
578 |
protected function _rowBaseCalculation(Mage_Sales_Model_Quote_Address $address, $taxRateRequest)
|
579 |
{
|
580 |
$items = $this->_getAddressItems($address);
|
581 |
-
$itemTaxGroups
|
|
|
|
|
582 |
|
583 |
foreach ($items as $item) {
|
584 |
if ($item->getParentItem()) {
|
@@ -586,45 +668,13 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
586 |
}
|
587 |
if ($item->getHasChildren() && $item->isChildrenCalculated()) {
|
588 |
foreach ($item->getChildren() as $child) {
|
589 |
-
$
|
590 |
-
|
591 |
-
|
592 |
-
$this->_calcRowTaxAmount($child, $rate);
|
593 |
-
$this->_addAmount($child->getTaxAmount());
|
594 |
-
$this->_addBaseAmount($child->getBaseTaxAmount());
|
595 |
-
$applied = $this->_calculator->getAppliedRates($taxRateRequest);
|
596 |
-
if ($rate > 0) {
|
597 |
-
$itemTaxGroups[$child->getId()] = $applied;
|
598 |
-
}
|
599 |
-
$this->_saveAppliedTaxes(
|
600 |
-
$address,
|
601 |
-
$applied,
|
602 |
-
$child->getTaxAmount(),
|
603 |
-
$child->getBaseTaxAmount(),
|
604 |
-
$rate
|
605 |
-
);
|
606 |
-
$child->setTaxRates($applied);
|
607 |
}
|
608 |
$this->_recalculateParent($item);
|
609 |
-
}
|
610 |
-
|
611 |
-
|
612 |
-
$rate = $this->_calculator->getRate($taxRateRequest);
|
613 |
-
$this->_calcRowTaxAmount($item, $rate);
|
614 |
-
$this->_addAmount($item->getTaxAmount());
|
615 |
-
$this->_addBaseAmount($item->getBaseTaxAmount());
|
616 |
-
$applied = $this->_calculator->getAppliedRates($taxRateRequest);
|
617 |
-
if ($rate > 0) {
|
618 |
-
$itemTaxGroups[$item->getId()] = $applied;
|
619 |
-
}
|
620 |
-
$this->_saveAppliedTaxes(
|
621 |
-
$address,
|
622 |
-
$applied,
|
623 |
-
$item->getTaxAmount(),
|
624 |
-
$item->getBaseTaxAmount(),
|
625 |
-
$rate
|
626 |
-
);
|
627 |
-
$item->setTaxRates($applied);
|
628 |
}
|
629 |
}
|
630 |
|
@@ -635,38 +685,109 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
635 |
return $this;
|
636 |
}
|
637 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
638 |
/**
|
639 |
* Calculate item tax amount based on row total
|
640 |
*
|
641 |
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
642 |
* @param float $rate
|
|
|
|
|
|
|
643 |
* @return Mage_Tax_Model_Sales_Total_Quote
|
644 |
*/
|
645 |
-
protected function _calcRowTaxAmount(
|
|
|
|
|
646 |
{
|
647 |
-
$inclTax
|
648 |
-
$subtotal
|
649 |
-
$baseSubtotal
|
650 |
-
$rateKey
|
651 |
-
$item->setTaxPercent($rate);
|
652 |
|
653 |
$isWeeeEnabled = $this->_weeeHelper->isEnabled();
|
654 |
$isWeeeTaxable = $this->_weeeHelper->isTaxable();
|
655 |
|
656 |
-
$hiddenTax
|
657 |
-
$baseHiddenTax
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
658 |
switch ($this->_helper->getCalculationSequence($this->_store)) {
|
659 |
case Mage_Tax_Model_Calculation::CALC_TAX_BEFORE_DISCOUNT_ON_EXCL:
|
660 |
case Mage_Tax_Model_Calculation::CALC_TAX_BEFORE_DISCOUNT_ON_INCL:
|
661 |
-
$
|
662 |
-
$
|
663 |
|
664 |
if ($isWeeeEnabled && $isWeeeTaxable) {
|
665 |
-
$
|
666 |
-
$
|
|
|
|
|
667 |
}
|
668 |
-
$rowTax = $this->_calculator->round($
|
669 |
-
$baseRowTax = $this->_calculator->round($
|
670 |
break;
|
671 |
case Mage_Tax_Model_Calculation::CALC_TAX_AFTER_DISCOUNT_ON_EXCL:
|
672 |
case Mage_Tax_Model_Calculation::CALC_TAX_AFTER_DISCOUNT_ON_INCL:
|
@@ -690,86 +811,91 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
690 |
);
|
691 |
|
692 |
if ($isWeeeEnabled && $this->_weeeHelper->isTaxable()) {
|
693 |
-
$weeeTax =
|
694 |
$rowTax += $weeeTax;
|
695 |
-
$baseWeeeTax =
|
696 |
-
($item->getBaseWeeeTaxAppliedRowAmount() - $item->getBaseWeeeDiscount()) * $rate / 100;
|
697 |
$baseRowTax += $baseWeeeTax;
|
698 |
}
|
699 |
|
700 |
$rowTax = $this->_calculator->round($rowTax);
|
701 |
$baseRowTax = $this->_calculator->round($baseRowTax);
|
702 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
703 |
if ($inclTax && $discountAmount > 0) {
|
704 |
-
$hiddenTax
|
705 |
-
$baseHiddenTax
|
706 |
$this->_hiddenTaxes[] = array(
|
707 |
-
'rate_key'
|
708 |
-
'qty'
|
709 |
-
'item'
|
710 |
-
'value'
|
711 |
'base_value' => $baseHiddenTax,
|
712 |
-
'incl_tax'
|
713 |
);
|
714 |
} elseif ($discountAmount > $subtotal) { // case with 100% discount on price incl. tax
|
715 |
-
$hiddenTax
|
716 |
-
$baseHiddenTax
|
717 |
$this->_hiddenTaxes[] = array(
|
718 |
-
'rate_key'
|
719 |
-
'qty'
|
720 |
-
'item'
|
721 |
-
'value'
|
722 |
'base_value' => $baseHiddenTax,
|
723 |
-
'incl_tax'
|
724 |
);
|
725 |
}
|
726 |
// calculate discount compensation
|
727 |
if (!$item->getNoDiscount() && $item->getWeeeTaxApplied()) {
|
728 |
-
$
|
729 |
-
|
730 |
-
$rate,
|
731 |
-
$inclTax,
|
732 |
-
false
|
733 |
-
);
|
734 |
-
$baseRowTaxBeforeDiscount = $this->_calculator->calcTaxAmount(
|
735 |
-
$baseSubtotal,
|
736 |
-
$rate,
|
737 |
-
$inclTax,
|
738 |
-
false
|
739 |
-
);
|
740 |
-
if ($isWeeeTaxable) {
|
741 |
-
$rowTaxBeforeDiscount += $item->getWeeeTaxAppliedRowAmount() * $rate / 100;
|
742 |
-
$baseRowTaxBeforeDiscount += $item->getBaseWeeeTaxAppliedRowAmount() * $rate / 100;
|
743 |
-
}
|
744 |
-
$rowTaxBeforeDiscount = max(0, $this->_calculator->round($rowTaxBeforeDiscount));
|
745 |
-
$baseRowTaxBeforeDiscount = max(0, $this->_calculator->round($baseRowTaxBeforeDiscount));
|
746 |
-
$item->setDiscountTaxCompensation($rowTaxBeforeDiscount - max(0, $rowTax));
|
747 |
-
$item->setBaseDiscountTaxCompensation($baseRowTaxBeforeDiscount - max(0, $baseRowTax));
|
748 |
}
|
749 |
-
|
750 |
break;
|
751 |
}
|
752 |
-
$item->setTaxAmount(max(0, $rowTax));
|
753 |
-
$item->setBaseTaxAmount(max(0, $baseRowTax));
|
|
|
|
|
|
|
|
|
754 |
|
755 |
$rowTotalInclTax = $item->getRowTotalInclTax();
|
756 |
-
if (!isset($rowTotalInclTax)) {
|
757 |
-
$weeeTaxBeforeDiscount = 0;
|
758 |
-
$baseWeeeTaxBeforeDiscount = 0;
|
759 |
-
if ($isWeeeTaxable) {
|
760 |
-
$weeeTaxBeforeDiscount = $item->getWeeeTaxAppliedRowAmount() * $rate/100;
|
761 |
-
$baseWeeeTaxBeforeDiscount = $item->getBaseWeeeTaxAppliedRowAmount() * $rate/100;
|
762 |
-
}
|
763 |
if ($this->_config->priceIncludesTax($this->_store)) {
|
764 |
-
$item->setRowTotalInclTax($subtotal
|
765 |
-
$item->setBaseRowTotalInclTax($baseSubtotal
|
766 |
} else {
|
767 |
-
$
|
768 |
-
|
769 |
-
$item->setBaseRowTotalInclTax($
|
|
|
770 |
}
|
771 |
}
|
772 |
-
|
773 |
return $this;
|
774 |
}
|
775 |
|
@@ -782,10 +908,11 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
782 |
*/
|
783 |
protected function _totalBaseCalculation(Mage_Sales_Model_Quote_Address $address, $taxRateRequest)
|
784 |
{
|
785 |
-
$items
|
786 |
-
$store
|
787 |
-
$taxGroups
|
788 |
-
$itemTaxGroups
|
|
|
789 |
|
790 |
foreach ($items as $item) {
|
791 |
if ($item->getParentItem()) {
|
@@ -794,27 +921,13 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
794 |
|
795 |
if ($item->getHasChildren() && $item->isChildrenCalculated()) {
|
796 |
foreach ($item->getChildren() as $child) {
|
797 |
-
$
|
798 |
-
|
799 |
-
$applied_rates = $this->_calculator->getAppliedRates($taxRateRequest);
|
800 |
-
$taxGroups[(string)$rate]['applied_rates'] = $applied_rates;
|
801 |
-
$taxGroups[(string)$rate]['incl_tax'] = $child->getIsPriceInclTax();
|
802 |
-
$this->_aggregateTaxPerRate($child, $rate, $taxGroups);
|
803 |
-
if ($rate > 0) {
|
804 |
-
$itemTaxGroups[$child->getId()] = $applied_rates;
|
805 |
-
}
|
806 |
}
|
807 |
$this->_recalculateParent($item);
|
808 |
} else {
|
809 |
-
$
|
810 |
-
|
811 |
-
$applied_rates = $this->_calculator->getAppliedRates($taxRateRequest);
|
812 |
-
$taxGroups[(string)$rate]['applied_rates'] = $applied_rates;
|
813 |
-
$taxGroups[(string)$rate]['incl_tax'] = $item->getIsPriceInclTax();
|
814 |
-
$this->_aggregateTaxPerRate($item, $rate, $taxGroups);
|
815 |
-
if ($rate > 0) {
|
816 |
-
$itemTaxGroups[$item->getId()] = $applied_rates;
|
817 |
-
}
|
818 |
}
|
819 |
}
|
820 |
|
@@ -823,14 +936,17 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
823 |
}
|
824 |
$address->getQuote()->setTaxesForItems($itemTaxGroups);
|
825 |
|
826 |
-
foreach ($taxGroups as $
|
827 |
-
|
|
|
|
|
|
|
|
|
|
|
828 |
$inclTax = $data['incl_tax'];
|
829 |
|
830 |
-
$totalTax =
|
831 |
-
$
|
832 |
-
$baseTotalTax = $this->_calculator->calcTaxAmount(array_sum($data['base_totals']), $rate, $inclTax, false);
|
833 |
-
$baseTotalTax += array_sum($data['base_weee_tax']);
|
834 |
$this->_addAmount($totalTax);
|
835 |
$this->_addBaseAmount($baseTotalTax);
|
836 |
$totalTaxRounded = $this->_calculator->round($totalTax);
|
@@ -840,6 +956,63 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
840 |
return $this;
|
841 |
}
|
842 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
843 |
/**
|
844 |
* Aggregate row totals per tax rate in array
|
845 |
*
|
@@ -848,18 +1021,18 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
848 |
* @param array $taxGroups
|
849 |
* @return Mage_Tax_Model_Sales_Total_Quote
|
850 |
*/
|
851 |
-
protected function _aggregateTaxPerRate(
|
|
|
|
|
852 |
{
|
853 |
-
$inclTax
|
854 |
-
$rateKey
|
855 |
-
$taxSubtotal
|
856 |
$baseTaxSubtotal = $baseSubtotal = $item->getBaseTaxableAmount();
|
857 |
|
858 |
$isWeeeEnabled = $this->_weeeHelper->isEnabled();
|
859 |
$isWeeeTaxable = $this->_weeeHelper->isTaxable();
|
860 |
|
861 |
-
$item->setTaxPercent($rate);
|
862 |
-
|
863 |
if (!isset($taxGroups[$rateKey]['totals'])) {
|
864 |
$taxGroups[$rateKey]['totals'] = array();
|
865 |
$taxGroups[$rateKey]['base_totals'] = array();
|
@@ -867,22 +1040,38 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
867 |
$taxGroups[$rateKey]['base_weee_tax'] = array();
|
868 |
}
|
869 |
|
870 |
-
$hiddenTax
|
871 |
-
$baseHiddenTax
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
872 |
switch ($this->_helper->getCalculationSequence($this->_store)) {
|
873 |
case Mage_Tax_Model_Calculation::CALC_TAX_BEFORE_DISCOUNT_ON_EXCL:
|
874 |
case Mage_Tax_Model_Calculation::CALC_TAX_BEFORE_DISCOUNT_ON_INCL:
|
875 |
-
$
|
876 |
-
$
|
877 |
|
878 |
if ($isWeeeEnabled && $isWeeeTaxable) {
|
879 |
-
$
|
880 |
-
$
|
881 |
-
$
|
882 |
-
$
|
883 |
-
$taxGroups[$rateKey]['weee_tax'][] = $this->_deltaRound($
|
884 |
-
|
|
|
|
|
885 |
}
|
|
|
|
|
|
|
|
|
|
|
886 |
break;
|
887 |
case Mage_Tax_Model_Calculation::CALC_TAX_AFTER_DISCOUNT_ON_EXCL:
|
888 |
case Mage_Tax_Model_Calculation::CALC_TAX_AFTER_DISCOUNT_ON_INCL:
|
@@ -894,7 +1083,7 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
894 |
$baseDiscount = $item->getBaseDiscountAmount();
|
895 |
}
|
896 |
|
897 |
-
//weee discount
|
898 |
if ($isWeeeEnabled) {
|
899 |
$discount = $discount - $item->getWeeeDiscount();
|
900 |
$baseDiscount = $baseDiscount - $item->getBaseWeeeDiscount();
|
@@ -906,89 +1095,275 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
906 |
$baseRowTax = $this->_calculator->calcTaxAmount($baseTaxSubtotal, $rate, $inclTax, false);
|
907 |
|
908 |
if ($isWeeeEnabled && $this->_weeeHelper->isTaxable()) {
|
909 |
-
$weeeTax =
|
910 |
$rowTax += $weeeTax;
|
911 |
-
$baseWeeeTax =
|
912 |
-
($item->getBaseWeeeTaxAppliedRowAmount() - $item->getBaseWeeeDiscount()) * $rate / 100;
|
913 |
$baseRowTax += $baseWeeeTax;
|
914 |
$taxGroups[$rateKey]['weee_tax'][] = $weeeTax;
|
915 |
$taxGroups[$rateKey]['base_weee_tax'][] = $baseWeeeTax;
|
916 |
}
|
917 |
-
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
933 |
}
|
934 |
}
|
935 |
|
936 |
if ($inclTax && $discount > 0) {
|
937 |
-
$
|
938 |
-
$
|
939 |
$this->_hiddenTaxes[] = array(
|
940 |
'rate_key' => $rateKey,
|
941 |
'qty' => 1,
|
942 |
'item' => $item,
|
943 |
-
'value' => $
|
944 |
-
'base_value' => $
|
945 |
'incl_tax' => $inclTax,
|
946 |
);
|
947 |
}
|
948 |
break;
|
949 |
}
|
950 |
|
951 |
-
$
|
952 |
-
|
953 |
-
|
954 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
955 |
|
956 |
-
|
957 |
-
|
958 |
-
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
|
963 |
-
|
964 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
965 |
|
966 |
-
|
967 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
968 |
}
|
|
|
|
|
969 |
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
977 |
}
|
978 |
-
|
979 |
-
|
980 |
-
|
|
|
|
|
|
|
|
|
|
|
981 |
} else {
|
982 |
-
$
|
983 |
-
|
984 |
-
$item->setBaseRowTotalInclTax($baseSubtotal + $baseRowTax + $item->getBaseDiscountTaxCompensation());
|
985 |
}
|
|
|
|
|
|
|
|
|
|
|
986 |
}
|
|
|
|
|
987 |
|
988 |
-
$taxGroups[$rateKey]['totals'][] = max(0, $taxSubtotal);
|
989 |
-
$taxGroups[$rateKey]['base_totals'][] = max(0, $baseTaxSubtotal);
|
990 |
|
991 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
992 |
}
|
993 |
|
994 |
/**
|
@@ -1003,9 +1378,10 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
1003 |
protected function _deltaRound($price, $rate, $direction, $type = 'regular')
|
1004 |
{
|
1005 |
if ($price) {
|
1006 |
-
$rate
|
1007 |
-
$type
|
1008 |
-
|
|
|
1009 |
$price += $delta;
|
1010 |
$this->_roundingDeltas[$type][$rate] = $price - $this->_calculator->round($price);
|
1011 |
$price = $this->_calculator->round($price);
|
@@ -1021,11 +1397,11 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
1021 |
*/
|
1022 |
protected function _recalculateParent(Mage_Sales_Model_Quote_Item_Abstract $item)
|
1023 |
{
|
1024 |
-
$rowTaxAmount
|
1025 |
-
$baseRowTaxAmount
|
1026 |
foreach ($item->getChildren() as $child) {
|
1027 |
-
$rowTaxAmount
|
1028 |
-
$baseRowTaxAmount
|
1029 |
}
|
1030 |
$item->setTaxAmount($rowTaxAmount);
|
1031 |
$item->setBaseTaxAmount($baseRowTaxAmount);
|
@@ -1052,8 +1428,8 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
1052 |
continue;
|
1053 |
}
|
1054 |
if (!isset($previouslyAppliedTaxes[$row['id']])) {
|
1055 |
-
$row['process']
|
1056 |
-
$row['amount']
|
1057 |
$row['base_amount'] = 0;
|
1058 |
$previouslyAppliedTaxes[$row['id']] = $row;
|
1059 |
}
|
@@ -1062,21 +1438,21 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
1062 |
$row['percent'] = $row['percent'] ? $row['percent'] : 1;
|
1063 |
$rate = $rate ? $rate : 1;
|
1064 |
|
1065 |
-
$appliedAmount
|
1066 |
-
$baseAppliedAmount
|
1067 |
} else {
|
1068 |
-
$appliedAmount
|
1069 |
-
$baseAppliedAmount
|
1070 |
foreach ($row['rates'] as $rate) {
|
1071 |
-
$appliedAmount
|
1072 |
-
$baseAppliedAmount
|
1073 |
}
|
1074 |
}
|
1075 |
|
1076 |
|
1077 |
if ($appliedAmount || $previouslyAppliedTaxes[$row['id']]['amount']) {
|
1078 |
-
$previouslyAppliedTaxes[$row['id']]['amount']
|
1079 |
-
$previouslyAppliedTaxes[$row['id']]['base_amount']
|
1080 |
} else {
|
1081 |
unset($previouslyAppliedTaxes[$row['id']]);
|
1082 |
}
|
@@ -1092,9 +1468,9 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
1092 |
*/
|
1093 |
public function fetch(Mage_Sales_Model_Quote_Address $address)
|
1094 |
{
|
1095 |
-
$applied
|
1096 |
-
$store
|
1097 |
-
$amount
|
1098 |
|
1099 |
$items = $this->_getAddressItems($address);
|
1100 |
$discountTaxCompensation = 0;
|
@@ -1107,22 +1483,22 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
1107 |
*/
|
1108 |
if ($this->_weeeHelper->isEnabled()) {
|
1109 |
if (!$this->_weeeHelper->includeInSubtotal()) {
|
1110 |
-
$taxAmount
|
1111 |
}
|
1112 |
}
|
1113 |
|
1114 |
-
$area
|
1115 |
if ($this->_config->displayCartTaxWithGrandTotal($store) && $address->getGrandTotal()) {
|
1116 |
-
$area
|
1117 |
}
|
1118 |
|
1119 |
if (($amount != 0) || ($this->_config->displayCartZeroTax($store))) {
|
1120 |
$address->addTotal(array(
|
1121 |
-
'code'
|
1122 |
-
'title'
|
1123 |
'full_info' => $applied ? $applied : array(),
|
1124 |
-
'value'
|
1125 |
-
'area'
|
1126 |
));
|
1127 |
}
|
1128 |
|
@@ -1138,9 +1514,9 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
1138 |
}
|
1139 |
|
1140 |
$address->addTotal(array(
|
1141 |
-
'code'
|
1142 |
-
'title'
|
1143 |
-
'value'
|
1144 |
'value_incl_tax' => $subtotalInclTax,
|
1145 |
'value_excl_tax' => $address->getSubtotal(),
|
1146 |
));
|
@@ -1160,7 +1536,7 @@ class Mage_Tax_Model_Sales_Total_Quote_Tax extends Mage_Sales_Model_Quote_Addres
|
|
1160 |
public function processConfigArray($config, $store)
|
1161 |
{
|
1162 |
$calculationSequence = $this->_helper->getCalculationSequence($store);
|
1163 |
-
|
1164 |
case Mage_Tax_Model_Calculation::CALC_TAX_BEFORE_DISCOUNT_ON_INCL:
|
1165 |
$config['before'][] = 'discount';
|
1166 |
break;
|
84 |
*/
|
85 |
protected $_hiddenTaxes = array();
|
86 |
|
87 |
+
|
88 |
+
/**
|
89 |
+
* Weee helper class
|
90 |
+
*
|
91 |
+
* @var Mage_Weee_Helper_Data
|
92 |
+
*/
|
93 |
+
protected $_weeeHelper;
|
94 |
+
|
95 |
/**
|
96 |
* Class constructor
|
97 |
*/
|
98 |
public function __construct()
|
99 |
{
|
100 |
$this->setCode('tax');
|
101 |
+
$this->_helper = Mage::helper('tax');
|
102 |
+
$this->_calculator = Mage::getSingleton('tax/calculation');
|
103 |
+
$this->_config = Mage::getSingleton('tax/config');
|
104 |
$this->_weeeHelper = Mage::helper('weee');
|
105 |
}
|
106 |
|
157 |
public function collect(Mage_Sales_Model_Quote_Address $address)
|
158 |
{
|
159 |
parent::collect($address);
|
160 |
+
$this->_roundingDeltas = array();
|
161 |
+
$this->_baseRoundingDeltas = array();
|
162 |
+
$this->_hiddenTaxes = array();
|
163 |
$address->setShippingTaxAmount(0);
|
164 |
$address->setBaseShippingTaxAmount(0);
|
165 |
|
230 |
foreach ($this->_hiddenTaxes as $taxInfoItem) {
|
231 |
if (isset($taxInfoItem['item'])) {
|
232 |
// Item hidden taxes
|
233 |
+
$item = $taxInfoItem['item'];
|
234 |
+
$rateKey = $taxInfoItem['rate_key'];
|
235 |
+
$hiddenTax = $taxInfoItem['value'];
|
236 |
+
$baseHiddenTax = $taxInfoItem['base_value'];
|
237 |
+
$inclTax = $taxInfoItem['incl_tax'];
|
238 |
+
$qty = $taxInfoItem['qty'];
|
239 |
+
|
240 |
+
$hiddenTax = $this->_calculator->round($hiddenTax);
|
241 |
+
$baseHiddenTax = $this->_calculator->round($baseHiddenTax);
|
242 |
+
$item->setHiddenTaxAmount(max(0, $qty * $hiddenTax));
|
243 |
+
$item->setBaseHiddenTaxAmount(max(0, $qty * $baseHiddenTax));
|
244 |
+
$this->_getAddress()->addTotalAmount('hidden_tax', $item->getHiddenTaxAmount());
|
245 |
+
$this->_getAddress()->addBaseTotalAmount('hidden_tax', $item->getBaseHiddenTaxAmount());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
} else {
|
247 |
// Shipping hidden taxes
|
248 |
+
$rateKey = $taxInfoItem['rate_key'];
|
249 |
+
$hiddenTax = $taxInfoItem['value'];
|
250 |
+
$baseHiddenTax = $taxInfoItem['base_value'];
|
251 |
+
$inclTax = $taxInfoItem['incl_tax'];
|
252 |
|
253 |
+
$hiddenTax = $this->_calculator->round($hiddenTax);
|
254 |
+
$baseHiddenTax = $this->_calculator->round($baseHiddenTax);
|
|
|
255 |
|
256 |
+
$this->_getAddress()->addTotalAmount('shipping_hidden_tax', $hiddenTax);
|
257 |
+
$this->_getAddress()->addBaseTotalAmount('shipping_hidden_tax', $baseHiddenTax);
|
|
|
|
|
|
|
|
|
|
|
|
|
258 |
|
259 |
+
$this->_getAddress()->setShippingHiddenTaxAmount(max(0, $hiddenTax));
|
260 |
+
$this->_getAddress()->setBaseShippingHiddenTaxAmount(max(0, $baseHiddenTax));
|
|
|
|
|
|
|
261 |
}
|
262 |
}
|
263 |
}
|
279 |
}
|
280 |
|
281 |
/**
|
|
|
282 |
*
|
283 |
+
* @param Mage_Sales_Model_Quote_Address $address
|
284 |
+
* @param float $rate
|
285 |
+
* @param array $appliedRates
|
286 |
+
* @param string $taxId
|
287 |
*/
|
288 |
+
protected function _calculateShippingTaxByRate(
|
289 |
+
Mage_Sales_Model_Quote_Address $address, $rate, $appliedRates, $taxId = null)
|
290 |
{
|
291 |
+
$inclTax = $address->getIsShippingInclTax();
|
292 |
+
$shipping = $address->getShippingTaxable();
|
293 |
+
$baseShipping = $address->getBaseShippingTaxable();
|
294 |
+
$rateKey = ($taxId == null) ? (string)$rate : $taxId;
|
295 |
+
|
296 |
+
$hiddenTax = null;
|
297 |
+
$baseHiddenTax = null;
|
|
|
|
|
298 |
switch ($this->_helper->getCalculationSequence($this->_store)) {
|
299 |
case Mage_Tax_Model_Calculation::CALC_TAX_BEFORE_DISCOUNT_ON_EXCL:
|
300 |
case Mage_Tax_Model_Calculation::CALC_TAX_BEFORE_DISCOUNT_ON_INCL:
|
301 |
+
$tax = $this->_calculator->calcTaxAmount($shipping, $rate, $inclTax, false);
|
302 |
+
$baseTax = $this->_calculator->calcTaxAmount($baseShipping, $rate, $inclTax, false);
|
303 |
break;
|
304 |
case Mage_Tax_Model_Calculation::CALC_TAX_AFTER_DISCOUNT_ON_EXCL:
|
305 |
case Mage_Tax_Model_Calculation::CALC_TAX_AFTER_DISCOUNT_ON_INCL:
|
306 |
+
$discountAmount = $address->getShippingDiscountAmount();
|
307 |
$baseDiscountAmount = $address->getBaseShippingDiscountAmount();
|
308 |
$tax = $this->_calculator->calcTaxAmount(
|
309 |
$shipping - $discountAmount,
|
321 |
}
|
322 |
|
323 |
if ($this->_config->getAlgorithm($this->_store) == Mage_Tax_Model_Calculation::CALC_TOTAL_BASE) {
|
324 |
+
$tax = $this->_deltaRound($tax, $rateKey, $inclTax);
|
325 |
+
$baseTax = $this->_deltaRound($baseTax, $rateKey, $inclTax, 'base');
|
326 |
$this->_addAmount(max(0, $tax));
|
327 |
$this->_addBaseAmount(max(0, $baseTax));
|
|
|
|
|
328 |
} else {
|
329 |
+
$tax = $this->_calculator->round($tax);
|
330 |
+
$baseTax = $this->_calculator->round($baseTax);
|
331 |
$this->_addAmount(max(0, $tax));
|
332 |
$this->_addBaseAmount(max(0, $baseTax));
|
333 |
}
|
334 |
|
335 |
if ($inclTax && !empty($discountAmount)) {
|
336 |
+
$taxBeforeDiscount = $this->_calculator->calcTaxAmount(
|
337 |
+
$shipping,
|
338 |
+
$rate,
|
339 |
+
$inclTax,
|
340 |
+
false
|
341 |
+
);
|
342 |
+
$baseTaxBeforeDiscount = $this->_calculator->calcTaxAmount(
|
343 |
+
$baseShipping,
|
344 |
+
$rate,
|
345 |
+
$inclTax,
|
346 |
+
false
|
347 |
+
);
|
348 |
+
if ($this->_config->getAlgorithm($this->_store) == Mage_Tax_Model_Calculation::CALC_TOTAL_BASE) {
|
349 |
+
$taxBeforeDiscount =
|
350 |
+
$this->_deltaRound($taxBeforeDiscount, $rateKey, $inclTax, 'tax_before_discount');
|
351 |
+
$baseTaxBeforeDiscount =
|
352 |
+
$this->_deltaRound($baseTaxBeforeDiscount, $rateKey, $inclTax, 'tax_before_discount_base');
|
353 |
+
} else {
|
354 |
+
$taxBeforeDiscount = $this->_calculator->round($taxBeforeDiscount);
|
355 |
+
$baseTaxBeforeDiscount = $this->_calculator->round($baseTaxBeforeDiscount);
|
356 |
+
}
|
357 |
+
$hiddenTax = max(0, $taxBeforeDiscount - max(0, $tax));
|
358 |
+
$baseHiddenTax = max(0, $baseTaxBeforeDiscount - max(0, $baseTax));
|
359 |
$this->_hiddenTaxes[] = array(
|
360 |
+
'rate_key' => $rateKey,
|
361 |
+
'value' => $hiddenTax,
|
362 |
'base_value' => $baseHiddenTax,
|
363 |
+
'incl_tax' => $inclTax,
|
364 |
);
|
365 |
}
|
366 |
|
367 |
+
$address->setShippingTaxAmount($address->getShippingTaxAmount() + max(0, $tax));
|
368 |
+
$address->setBaseShippingTaxAmount($address->getBaseShippingTaxAmount() + max(0, $baseTax));
|
369 |
+
$this->_saveAppliedTaxes($address, $appliedRates, $tax, $baseTax, $rate);
|
370 |
+
}
|
371 |
+
|
372 |
+
/**
|
373 |
+
* Tax caclulation for shipping price
|
374 |
+
*
|
375 |
+
* @param Mage_Sales_Model_Quote_Address $address
|
376 |
+
* @param Varien_Object $taxRateRequest
|
377 |
+
* @return Mage_Tax_Model_Sales_Total_Quote
|
378 |
+
*/
|
379 |
+
protected function _calculateShippingTax(Mage_Sales_Model_Quote_Address $address, $taxRateRequest)
|
380 |
+
{
|
381 |
+
$taxRateRequest->setProductClassId($this->_config->getShippingTaxClass($this->_store));
|
382 |
+
$rate = $this->_calculator->getRate($taxRateRequest);
|
383 |
+
$inclTax = $address->getIsShippingInclTax();
|
384 |
|
385 |
+
$address->setShippingTaxAmount(0);
|
386 |
+
$address->setBaseShippingTaxAmount(0);
|
387 |
+
$address->setShippingHiddenTaxAmount(0);
|
388 |
+
$address->setBaseShippingHiddenTaxAmount(0);
|
389 |
+
$appliedRates = $this->_calculator->getAppliedRates($taxRateRequest);
|
390 |
+
if ($inclTax) {
|
391 |
+
$this->_calculateShippingTaxByRate($address, $rate, $appliedRates);
|
392 |
+
} else {
|
393 |
+
foreach ($appliedRates as $appliedRate) {
|
394 |
+
$taxRate = $appliedRate['percent'];
|
395 |
+
$taxId = $appliedRate['id'];
|
396 |
+
$this->_calculateShippingTaxByRate($address, $taxRate, array($appliedRate), $taxId);
|
397 |
+
}
|
398 |
+
}
|
399 |
return $this;
|
400 |
}
|
401 |
|
408 |
protected function _unitBaseCalculation(Mage_Sales_Model_Quote_Address $address, $taxRateRequest)
|
409 |
{
|
410 |
$items = $this->_getAddressItems($address);
|
411 |
+
$itemTaxGroups = array();
|
412 |
+
$store = $address->getQuote()->getStore();
|
413 |
+
$catalogPriceInclTax = $this->_config->priceIncludesTax($store);
|
414 |
|
415 |
foreach ($items as $item) {
|
416 |
if ($item->getParentItem()) {
|
419 |
|
420 |
if ($item->getHasChildren() && $item->isChildrenCalculated()) {
|
421 |
foreach ($item->getChildren() as $child) {
|
422 |
+
$this->_unitBaseProcessItemTax(
|
423 |
+
$address, $child, $taxRateRequest, $itemTaxGroups, $catalogPriceInclTax);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
424 |
}
|
425 |
$this->_recalculateParent($item);
|
426 |
+
} else {
|
427 |
+
$this->_unitBaseProcessItemTax(
|
428 |
+
$address, $item, $taxRateRequest, $itemTaxGroups, $catalogPriceInclTax);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
429 |
}
|
430 |
}
|
431 |
if ($address->getQuote()->getTaxesForItems()) {
|
435 |
return $this;
|
436 |
}
|
437 |
|
438 |
+
/**
|
439 |
+
*
|
440 |
+
* @param Mage_Sales_Model_Quote_Address $address
|
441 |
+
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
442 |
+
* @param Varien_Object $taxRateRequest
|
443 |
+
* @param array $itemTaxGroups
|
444 |
+
* @param boolean $catalogPriceInclTax
|
445 |
+
*/
|
446 |
+
protected function _unitBaseProcessItemTax(
|
447 |
+
$address, $item, $taxRateRequest, &$itemTaxGroups, $catalogPriceInclTax
|
448 |
+
)
|
449 |
+
{
|
450 |
+
$taxRateRequest->setProductClassId($item->getProduct()->getTaxClassId());
|
451 |
+
$rate = $this->_calculator->getRate($taxRateRequest);
|
452 |
+
|
453 |
+
$item->setTaxAmount(0);
|
454 |
+
$item->setBaseTaxAmount(0);
|
455 |
+
$item->setHiddenTaxAmount(0);
|
456 |
+
$item->setBaseHiddenTaxAmount(0);
|
457 |
+
$item->setTaxPercent($rate);
|
458 |
+
$item->setDiscountTaxCompensation(0);
|
459 |
+
$rowTotalInclTax = $item->getRowTotalInclTax();
|
460 |
+
$recalculateRowTotalInclTax = false;
|
461 |
+
if (!isset($rowTotalInclTax)) {
|
462 |
+
$qty = $item->getTotalQty();
|
463 |
+
$item->setRowTotalInclTax($this->_store->roundPrice($item->getTaxableAmount() * $qty));
|
464 |
+
$item->setBaseRowTotalInclTax(
|
465 |
+
$this->_store->roundPrice($item->getBaseTaxableAmount() * $qty));
|
466 |
+
$recalculateRowTotalInclTax = true;
|
467 |
+
}
|
468 |
+
|
469 |
+
$appliedRates = $this->_calculator->getAppliedRates($taxRateRequest);
|
470 |
+
$item->setTaxRates($appliedRates);
|
471 |
+
if ($catalogPriceInclTax) {
|
472 |
+
$this->_calcUnitTaxAmount($item, $rate);
|
473 |
+
$this->_saveAppliedTaxes(
|
474 |
+
$address, $appliedRates, $item->getTaxAmount(), $item->getBaseTaxAmount(), $rate);
|
475 |
+
} else {
|
476 |
+
//need to calculate each tax separately
|
477 |
+
$taxGroups = array();
|
478 |
+
foreach ($appliedRates as $appliedTax) {
|
479 |
+
$taxId = $appliedTax['id'];
|
480 |
+
$taxRate = $appliedTax['percent'];
|
481 |
+
$this->_calcUnitTaxAmount($item, $taxRate, $taxGroups, $taxId, $recalculateRowTotalInclTax);
|
482 |
+
$this->_saveAppliedTaxes(
|
483 |
+
$address, array($appliedTax), $taxGroups[$taxId]['tax'], $taxGroups[$taxId]['base_tax'], $taxRate);
|
484 |
+
}
|
485 |
+
//We need to calculate weeeAmountInclTax using multiple tax rate here
|
486 |
+
//because the _calculateWeeeTax and _calculateRowWeeeTax only take one tax rate
|
487 |
+
if ($this->_weeeHelper->isEnabled() && $this->_weeeHelper->isTaxable()) {
|
488 |
+
$this->_calculateWeeeAmountInclTax($item, $appliedRates, false);
|
489 |
+
$this->_calculateWeeeAmountInclTax($item, $appliedRates, true);
|
490 |
+
}
|
491 |
+
}
|
492 |
+
if ($rate > 0) {
|
493 |
+
$itemTaxGroups[$item->getId()] = $appliedRates;
|
494 |
+
}
|
495 |
+
$this->_addAmount($item->getTaxAmount());
|
496 |
+
$this->_addBaseAmount($item->getBaseTaxAmount());
|
497 |
+
return;
|
498 |
+
}
|
499 |
+
|
500 |
/**
|
501 |
* Calculate unit tax anount based on unit price
|
502 |
*
|
503 |
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
504 |
* @param float $rate
|
505 |
+
* @param array $taxGroups
|
506 |
+
* @param string $taxId
|
507 |
+
* @param boolean $recalculateRowTotalInclTax
|
508 |
* @return Mage_Tax_Model_Sales_Total_Quote
|
509 |
*/
|
510 |
+
protected function _calcUnitTaxAmount(
|
511 |
+
$item, $rate, &$taxGroups = null, $taxId = null, $recalculateRowTotalInclTax = false
|
512 |
+
)
|
513 |
{
|
514 |
+
$qty = $item->getTotalQty();
|
515 |
+
$inclTax = $item->getIsPriceInclTax();
|
516 |
+
$price = $item->getTaxableAmount();
|
517 |
+
$basePrice = $item->getBaseTaxableAmount();
|
518 |
+
$rateKey = ($taxId == null) ? (string)$rate : $taxId;
|
|
|
519 |
|
520 |
$isWeeeEnabled = $this->_weeeHelper->isEnabled();
|
521 |
$isWeeeTaxable = $this->_weeeHelper->isTaxable();
|
522 |
|
523 |
+
$hiddenTax = null;
|
524 |
+
$baseHiddenTax = null;
|
525 |
+
$weeeTax = null;
|
526 |
+
$baseWeeeTax = null;
|
527 |
+
$unitTaxBeforeDiscount = null;
|
528 |
+
$weeeTaxBeforeDiscount = null;
|
529 |
+
$baseUnitTaxBeforeDiscount = null;
|
530 |
+
$baseWeeeTaxBeforeDiscount = null;
|
531 |
+
|
532 |
switch ($this->_config->getCalculationSequence($this->_store)) {
|
533 |
case Mage_Tax_Model_Calculation::CALC_TAX_BEFORE_DISCOUNT_ON_EXCL:
|
534 |
case Mage_Tax_Model_Calculation::CALC_TAX_BEFORE_DISCOUNT_ON_INCL:
|
535 |
+
$unitTaxBeforeDiscount = $this->_calculator->calcTaxAmount($price, $rate, $inclTax, false);
|
536 |
+
$baseUnitTaxBeforeDiscount = $this->_calculator->calcTaxAmount($basePrice, $rate, $inclTax, false);
|
537 |
|
538 |
if ($isWeeeEnabled && $isWeeeTaxable) {
|
539 |
+
$weeeTaxBeforeDiscount = $this->_calculateWeeeTax(0, $item, $rate, false);
|
540 |
+
$unitTaxBeforeDiscount += $weeeTaxBeforeDiscount;
|
541 |
+
$baseWeeeTaxBeforeDiscount = $this->_calculateWeeeTax(0, $item, $rate);
|
542 |
+
$baseUnitTaxBeforeDiscount += $baseWeeeTaxBeforeDiscount;
|
543 |
}
|
544 |
+
$unitTaxBeforeDiscount = $unitTax = $this->_calculator->round($unitTaxBeforeDiscount);
|
545 |
+
$baseUnitTaxBeforeDiscount = $baseUnitTax = $this->_calculator->round($baseUnitTaxBeforeDiscount);
|
546 |
break;
|
547 |
case Mage_Tax_Model_Calculation::CALC_TAX_AFTER_DISCOUNT_ON_EXCL:
|
548 |
case Mage_Tax_Model_Calculation::CALC_TAX_AFTER_DISCOUNT_ON_INCL:
|
549 |
+
$discountAmount = $item->getDiscountAmount() / $qty;
|
550 |
$baseDiscountAmount = $item->getBaseDiscountAmount() / $qty;
|
551 |
|
552 |
+
//We want to remove weee
|
553 |
if ($isWeeeEnabled) {
|
554 |
$discountAmount = $discountAmount - $item->getWeeeDiscount() / $qty;
|
555 |
$baseDiscountAmount = $baseDiscountAmount - $item->getBaseWeeeDiscount() / $qty;
|
564 |
$baseUnitTax = $this->_calculator->round(max($baseUnitTaxBeforeDiscount - $baseUnitTaxDiscount, 0));
|
565 |
|
566 |
if ($isWeeeEnabled && $this->_weeeHelper->isTaxable()) {
|
567 |
+
$weeeTax = $this->_calculateRowWeeeTax($item->getWeeeDiscount(), $item, $rate, false);
|
568 |
$weeeTax = $weeeTax / $qty;
|
569 |
$unitTax += $weeeTax;
|
570 |
+
$baseWeeeTax = $this->_calculateRowWeeeTax($item->getBaseWeeeDiscount(), $item, $rate);
|
|
|
571 |
$baseWeeeTax = $baseWeeeTax / $qty;
|
572 |
$baseUnitTax += $baseWeeeTax;
|
573 |
}
|
574 |
+
|
575 |
$unitTax = $this->_calculator->round($unitTax);
|
576 |
$baseUnitTax = $this->_calculator->round($baseUnitTax);
|
577 |
+
|
578 |
+
//Calculate the weee taxes before discount
|
579 |
+
$weeeTaxBeforeDiscount = 0;
|
580 |
+
$baseWeeeTaxBeforeDiscount = 0;
|
581 |
+
|
582 |
+
if ($isWeeeTaxable) {
|
583 |
+
$weeeTaxBeforeDiscount = $this->_calculateWeeeTax(0, $item, $rate, false);
|
584 |
+
$unitTaxBeforeDiscount += $weeeTaxBeforeDiscount;
|
585 |
+
$baseWeeeTaxBeforeDiscount = $this->_calculateWeeeTax(0, $item, $rate);
|
586 |
+
$baseUnitTaxBeforeDiscount += $baseWeeeTaxBeforeDiscount;
|
587 |
+
}
|
588 |
+
|
589 |
+
$unitTaxBeforeDiscount = max(0, $this->_calculator->round($unitTaxBeforeDiscount));
|
590 |
+
$baseUnitTaxBeforeDiscount = max(0, $this->_calculator->round($baseUnitTaxBeforeDiscount));
|
591 |
+
|
592 |
if ($inclTax && $discountAmount > 0) {
|
593 |
+
$hiddenTax = $unitTaxBeforeDiscount - $unitTax;
|
594 |
+
$baseHiddenTax = $baseUnitTaxBeforeDiscount - $baseUnitTax;
|
595 |
$this->_hiddenTaxes[] = array(
|
596 |
+
'rate_key' => $rateKey,
|
597 |
+
'qty' => $qty,
|
598 |
+
'item' => $item,
|
599 |
+
'value' => $hiddenTax,
|
600 |
'base_value' => $baseHiddenTax,
|
601 |
+
'incl_tax' => $inclTax,
|
602 |
);
|
603 |
} elseif ($discountAmount > $price) { // case with 100% discount on price incl. tax
|
604 |
+
$hiddenTax = $discountAmount - $price;
|
605 |
+
$baseHiddenTax = $baseDiscountAmount - $basePrice;
|
606 |
$this->_hiddenTaxes[] = array(
|
607 |
+
'rate_key' => $rateKey,
|
608 |
+
'qty' => $qty,
|
609 |
+
'item' => $item,
|
610 |
+
'value' => $hiddenTax,
|
611 |
'base_value' => $baseHiddenTax,
|
612 |
+
'incl_tax' => $inclTax,
|
613 |
);
|
614 |
}
|
615 |
// calculate discount compensation
|
616 |
+
// We need the discount compensation when dont calculate the hidden taxes
|
617 |
+
// (when product does not include taxes)
|
618 |
if (!$item->getNoDiscount() && $item->getWeeeTaxApplied()) {
|
619 |
+
$item->setDiscountTaxCompensation($item->getDiscountTaxCompensation() +
|
620 |
+
$unitTaxBeforeDiscount * $qty - max(0, $unitTax) * $qty);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
621 |
}
|
622 |
break;
|
623 |
}
|
624 |
|
625 |
+
$rowTax = $this->_store->roundPrice(max(0, $qty * $unitTax));
|
626 |
+
$baseRowTax = $this->_store->roundPrice(max(0, $qty * $baseUnitTax));
|
627 |
+
$item->setTaxAmount($item->getTaxAmount() + $rowTax);
|
628 |
+
$item->setBaseTaxAmount($item->getBaseTaxAmount() + $baseRowTax);
|
629 |
+
if (is_array($taxGroups)) {
|
630 |
+
$taxGroups[$rateKey]['tax'] = max(0, $rowTax);
|
631 |
+
$taxGroups[$rateKey]['base_tax'] = max(0, $baseRowTax);
|
632 |
+
}
|
633 |
|
634 |
$rowTotalInclTax = $item->getRowTotalInclTax();
|
635 |
+
if (!isset($rowTotalInclTax) || $recalculateRowTotalInclTax) {
|
636 |
if ($this->_config->priceIncludesTax($this->_store)) {
|
637 |
+
$item->setRowTotalInclTax($price * $qty);
|
638 |
+
$item->setBaseRowTotalInclTax($basePrice * $qty);
|
|
|
|
|
|
|
|
|
|
|
|
|
639 |
} else {
|
640 |
+
$item->setRowTotalInclTax(
|
641 |
+
$item->getRowTotalInclTax() + ($unitTaxBeforeDiscount - $weeeTaxBeforeDiscount) * $qty);
|
642 |
$item->setBaseRowTotalInclTax(
|
643 |
+
$item->getBaseRowTotalInclTax() +
|
644 |
+
($baseUnitTaxBeforeDiscount - $baseWeeeTaxBeforeDiscount) * $qty);
|
645 |
}
|
646 |
}
|
647 |
|
658 |
protected function _rowBaseCalculation(Mage_Sales_Model_Quote_Address $address, $taxRateRequest)
|
659 |
{
|
660 |
$items = $this->_getAddressItems($address);
|
661 |
+
$itemTaxGroups = array();
|
662 |
+
$store = $address->getQuote()->getStore();
|
663 |
+
$catalogPriceInclTax = $this->_config->priceIncludesTax($store);
|
664 |
|
665 |
foreach ($items as $item) {
|
666 |
if ($item->getParentItem()) {
|
668 |
}
|
669 |
if ($item->getHasChildren() && $item->isChildrenCalculated()) {
|
670 |
foreach ($item->getChildren() as $child) {
|
671 |
+
$this->_rowBaseProcessItemTax(
|
672 |
+
$address, $child, $taxRateRequest, $itemTaxGroups, $catalogPriceInclTax);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
673 |
}
|
674 |
$this->_recalculateParent($item);
|
675 |
+
} else {
|
676 |
+
$this->_rowBaseProcessItemTax(
|
677 |
+
$address, $item, $taxRateRequest, $itemTaxGroups, $catalogPriceInclTax);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
678 |
}
|
679 |
}
|
680 |
|
685 |
return $this;
|
686 |
}
|
687 |
|
688 |
+
/**
|
689 |
+
*
|
690 |
+
* @param Mage_Sales_Model_Quote_Address $address
|
691 |
+
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
692 |
+
* @param Varien_Object $taxRateRequest
|
693 |
+
* @param array $itemTaxGroups
|
694 |
+
* @param boolean $catalogPriceInclTax
|
695 |
+
*/
|
696 |
+
protected function _rowBaseProcessItemTax($address, $item, $taxRateRequest, &$itemTaxGroups, $catalogPriceInclTax)
|
697 |
+
{
|
698 |
+
$taxRateRequest->setProductClassId($item->getProduct()->getTaxClassId());
|
699 |
+
$rate = $this->_calculator->getRate($taxRateRequest);
|
700 |
+
|
701 |
+
$item->setTaxAmount(0);
|
702 |
+
$item->setBaseTaxAmount(0);
|
703 |
+
$item->setHiddenTaxAmount(0);
|
704 |
+
$item->setBaseHiddenTaxAmount(0);
|
705 |
+
$item->setTaxPercent($rate);
|
706 |
+
$item->setDiscountTaxCompensation(0);
|
707 |
+
$rowTotalInclTax = $item->getRowTotalInclTax();
|
708 |
+
$recalculateRowTotalInclTax = false;
|
709 |
+
if (!isset($rowTotalInclTax)) {
|
710 |
+
$item->setRowTotalInclTax($item->getTaxableAmount());
|
711 |
+
$item->setBaseRowTotalInclTax($item->getBaseTaxableAmount());
|
712 |
+
$recalculateRowTotalInclTax = true;
|
713 |
+
}
|
714 |
+
|
715 |
+
$appliedRates = $this->_calculator->getAppliedRates($taxRateRequest);
|
716 |
+
$item->setTaxRates($appliedRates);
|
717 |
+
if ($catalogPriceInclTax) {
|
718 |
+
$this->_calcRowTaxAmount($item, $rate);
|
719 |
+
$this->_saveAppliedTaxes(
|
720 |
+
$address, $appliedRates, $item->getTaxAmount(), $item->getBaseTaxAmount(), $rate);
|
721 |
+
} else {
|
722 |
+
//need to calculate each tax separately
|
723 |
+
$taxGroups = array();
|
724 |
+
foreach ($appliedRates as $appliedTax) {
|
725 |
+
$taxId = $appliedTax['id'];
|
726 |
+
$taxRate = $appliedTax['percent'];
|
727 |
+
$this->_calcRowTaxAmount($item, $taxRate, $taxGroups, $taxId, $recalculateRowTotalInclTax);
|
728 |
+
$this->_saveAppliedTaxes(
|
729 |
+
$address, array($appliedTax), $taxGroups[$taxId]['tax'], $taxGroups[$taxId]['base_tax'], $taxRate);
|
730 |
+
}
|
731 |
+
//We need to calculate weeeAmountInclTax using multiple tax rate here
|
732 |
+
//because the _calculateWeeeTax and _calculateRowWeeeTax only take one tax rate
|
733 |
+
if ($this->_weeeHelper->isEnabled() && $this->_weeeHelper->isTaxable()) {
|
734 |
+
$this->_calculateWeeeAmountInclTax($item, $appliedRates, false);
|
735 |
+
$this->_calculateWeeeAmountInclTax($item, $appliedRates, true);
|
736 |
+
}
|
737 |
+
}
|
738 |
+
if ($rate > 0) {
|
739 |
+
$itemTaxGroups[$item->getId()] = $appliedRates;
|
740 |
+
}
|
741 |
+
$this->_addAmount($item->getTaxAmount());
|
742 |
+
$this->_addBaseAmount($item->getBaseTaxAmount());
|
743 |
+
return;
|
744 |
+
}
|
745 |
+
|
746 |
/**
|
747 |
* Calculate item tax amount based on row total
|
748 |
*
|
749 |
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
750 |
* @param float $rate
|
751 |
+
* @param array $taxGroups
|
752 |
+
* @param string $taxId
|
753 |
+
* @param boolean $recalculateRowTotalInclTax
|
754 |
* @return Mage_Tax_Model_Sales_Total_Quote
|
755 |
*/
|
756 |
+
protected function _calcRowTaxAmount(
|
757 |
+
$item, $rate, &$taxGroups = null, $taxId = null, $recalculateRowTotalInclTax = false
|
758 |
+
)
|
759 |
{
|
760 |
+
$inclTax = $item->getIsPriceInclTax();
|
761 |
+
$subtotal = $taxSubtotal = $item->getTaxableAmount();
|
762 |
+
$baseSubtotal = $baseTaxSubtotal = $item->getBaseTaxableAmount();
|
763 |
+
$rateKey = ($taxId == null) ? (string)$rate : $taxId;
|
|
|
764 |
|
765 |
$isWeeeEnabled = $this->_weeeHelper->isEnabled();
|
766 |
$isWeeeTaxable = $this->_weeeHelper->isTaxable();
|
767 |
|
768 |
+
$hiddenTax = null;
|
769 |
+
$baseHiddenTax = null;
|
770 |
+
$weeeTax = null;
|
771 |
+
$baseWeeeTax = null;
|
772 |
+
$rowTaxBeforeDiscount = null;
|
773 |
+
$baseRowTaxBeforeDiscount = null;
|
774 |
+
$weeeRowTaxBeforeDiscount = null;
|
775 |
+
$baseWeeeRowTaxBeforeDiscount = null;
|
776 |
+
|
777 |
switch ($this->_helper->getCalculationSequence($this->_store)) {
|
778 |
case Mage_Tax_Model_Calculation::CALC_TAX_BEFORE_DISCOUNT_ON_EXCL:
|
779 |
case Mage_Tax_Model_Calculation::CALC_TAX_BEFORE_DISCOUNT_ON_INCL:
|
780 |
+
$rowTaxBeforeDiscount = $this->_calculator->calcTaxAmount($subtotal, $rate, $inclTax, false);
|
781 |
+
$baseRowTaxBeforeDiscount = $this->_calculator->calcTaxAmount($baseSubtotal, $rate, $inclTax, false);
|
782 |
|
783 |
if ($isWeeeEnabled && $isWeeeTaxable) {
|
784 |
+
$weeeRowTaxBeforeDiscount = $this->_calculateRowWeeeTax(0, $item, $rate, false);
|
785 |
+
$rowTaxBeforeDiscount += $weeeRowTaxBeforeDiscount;
|
786 |
+
$baseWeeeRowTaxBeforeDiscount = $this->_calculateRowWeeeTax(0, $item, $rate);
|
787 |
+
$baseRowTaxBeforeDiscount += $baseWeeeRowTaxBeforeDiscount;
|
788 |
}
|
789 |
+
$rowTaxBeforeDiscount = $rowTax = $this->_calculator->round($rowTaxBeforeDiscount);
|
790 |
+
$baseRowTaxBeforeDiscount = $baseRowTax = $this->_calculator->round($baseRowTaxBeforeDiscount);
|
791 |
break;
|
792 |
case Mage_Tax_Model_Calculation::CALC_TAX_AFTER_DISCOUNT_ON_EXCL:
|
793 |
case Mage_Tax_Model_Calculation::CALC_TAX_AFTER_DISCOUNT_ON_INCL:
|
811 |
);
|
812 |
|
813 |
if ($isWeeeEnabled && $this->_weeeHelper->isTaxable()) {
|
814 |
+
$weeeTax = $this->_calculateRowWeeeTax($item->getWeeeDiscount(), $item, $rate, false);
|
815 |
$rowTax += $weeeTax;
|
816 |
+
$baseWeeeTax = $this->_calculateRowWeeeTax($item->getBaseWeeeDiscount(), $item, $rate);
|
|
|
817 |
$baseRowTax += $baseWeeeTax;
|
818 |
}
|
819 |
|
820 |
$rowTax = $this->_calculator->round($rowTax);
|
821 |
$baseRowTax = $this->_calculator->round($baseRowTax);
|
822 |
|
823 |
+
//Calculate the Row Tax before discount
|
824 |
+
$rowTaxBeforeDiscount = $this->_calculator->calcTaxAmount(
|
825 |
+
$subtotal,
|
826 |
+
$rate,
|
827 |
+
$inclTax,
|
828 |
+
false
|
829 |
+
);
|
830 |
+
$baseRowTaxBeforeDiscount = $this->_calculator->calcTaxAmount(
|
831 |
+
$baseSubtotal,
|
832 |
+
$rate,
|
833 |
+
$inclTax,
|
834 |
+
false
|
835 |
+
);
|
836 |
+
|
837 |
+
//Calculate the Weee taxes before discount
|
838 |
+
$weeeRowTaxBeforeDiscount = 0;
|
839 |
+
$baseWeeeRowTaxBeforeDiscount = 0;
|
840 |
+
if ($isWeeeTaxable) {
|
841 |
+
$weeeRowTaxBeforeDiscount = $this->_calculateRowWeeeTax(0, $item, $rate, false);
|
842 |
+
$rowTaxBeforeDiscount += $weeeRowTaxBeforeDiscount;
|
843 |
+
$baseWeeeRowTaxBeforeDiscount = $this->_calculateRowWeeeTax(0, $item, $rate);
|
844 |
+
$baseRowTaxBeforeDiscount += $baseWeeeRowTaxBeforeDiscount;
|
845 |
+
}
|
846 |
+
|
847 |
+
$rowTaxBeforeDiscount = max(0, $this->_calculator->round($rowTaxBeforeDiscount));
|
848 |
+
$baseRowTaxBeforeDiscount = max(0, $this->_calculator->round($baseRowTaxBeforeDiscount));
|
849 |
+
|
850 |
if ($inclTax && $discountAmount > 0) {
|
851 |
+
$hiddenTax = $rowTaxBeforeDiscount - $rowTax;
|
852 |
+
$baseHiddenTax = $baseRowTaxBeforeDiscount - $baseRowTax;
|
853 |
$this->_hiddenTaxes[] = array(
|
854 |
+
'rate_key' => $rateKey,
|
855 |
+
'qty' => 1,
|
856 |
+
'item' => $item,
|
857 |
+
'value' => $hiddenTax,
|
858 |
'base_value' => $baseHiddenTax,
|
859 |
+
'incl_tax' => $inclTax,
|
860 |
);
|
861 |
} elseif ($discountAmount > $subtotal) { // case with 100% discount on price incl. tax
|
862 |
+
$hiddenTax = $discountAmount - $subtotal;
|
863 |
+
$baseHiddenTax = $baseDiscountAmount - $baseSubtotal;
|
864 |
$this->_hiddenTaxes[] = array(
|
865 |
+
'rate_key' => $rateKey,
|
866 |
+
'qty' => 1,
|
867 |
+
'item' => $item,
|
868 |
+
'value' => $hiddenTax,
|
869 |
'base_value' => $baseHiddenTax,
|
870 |
+
'incl_tax' => $inclTax,
|
871 |
);
|
872 |
}
|
873 |
// calculate discount compensation
|
874 |
if (!$item->getNoDiscount() && $item->getWeeeTaxApplied()) {
|
875 |
+
$item->setDiscountTaxCompensation($item->getDiscountTaxCompensation() +
|
876 |
+
$rowTaxBeforeDiscount - max(0, $rowTax));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
877 |
}
|
|
|
878 |
break;
|
879 |
}
|
880 |
+
$item->setTaxAmount($item->getTaxAmount() + max(0, $rowTax));
|
881 |
+
$item->setBaseTaxAmount($item->getBaseTaxAmount() + max(0, $baseRowTax));
|
882 |
+
if (is_array($taxGroups)) {
|
883 |
+
$taxGroups[$rateKey]['tax'] = max(0, $rowTax);
|
884 |
+
$taxGroups[$rateKey]['base_tax'] = max(0, $baseRowTax);
|
885 |
+
}
|
886 |
|
887 |
$rowTotalInclTax = $item->getRowTotalInclTax();
|
888 |
+
if (!isset($rowTotalInclTax) || $recalculateRowTotalInclTax) {
|
|
|
|
|
|
|
|
|
|
|
|
|
889 |
if ($this->_config->priceIncludesTax($this->_store)) {
|
890 |
+
$item->setRowTotalInclTax($subtotal);
|
891 |
+
$item->setBaseRowTotalInclTax($baseSubtotal);
|
892 |
} else {
|
893 |
+
$item->setRowTotalInclTax(
|
894 |
+
$item->getRowTotalInclTax() + $rowTaxBeforeDiscount - $weeeRowTaxBeforeDiscount);
|
895 |
+
$item->setBaseRowTotalInclTax($item->getBaseRowTotalInclTax() +
|
896 |
+
$baseRowTaxBeforeDiscount - $baseWeeeRowTaxBeforeDiscount);
|
897 |
}
|
898 |
}
|
|
|
899 |
return $this;
|
900 |
}
|
901 |
|
908 |
*/
|
909 |
protected function _totalBaseCalculation(Mage_Sales_Model_Quote_Address $address, $taxRateRequest)
|
910 |
{
|
911 |
+
$items = $this->_getAddressItems($address);
|
912 |
+
$store = $address->getQuote()->getStore();
|
913 |
+
$taxGroups = array();
|
914 |
+
$itemTaxGroups = array();
|
915 |
+
$catalogPriceInclTax = $this->_config->priceIncludesTax($store);
|
916 |
|
917 |
foreach ($items as $item) {
|
918 |
if ($item->getParentItem()) {
|
921 |
|
922 |
if ($item->getHasChildren() && $item->isChildrenCalculated()) {
|
923 |
foreach ($item->getChildren() as $child) {
|
924 |
+
$this->_totalBaseProcessItemTax(
|
925 |
+
$child, $taxRateRequest, $taxGroups, $itemTaxGroups, $catalogPriceInclTax);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
926 |
}
|
927 |
$this->_recalculateParent($item);
|
928 |
} else {
|
929 |
+
$this->_totalBaseProcessItemTax(
|
930 |
+
$item, $taxRateRequest, $taxGroups, $itemTaxGroups, $catalogPriceInclTax);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
931 |
}
|
932 |
}
|
933 |
|
936 |
}
|
937 |
$address->getQuote()->setTaxesForItems($itemTaxGroups);
|
938 |
|
939 |
+
foreach ($taxGroups as $taxId => $data) {
|
940 |
+
if ($catalogPriceInclTax) {
|
941 |
+
$rate = (float)$taxId;
|
942 |
+
} else {
|
943 |
+
$rate = $data['applied_rates'][0]['percent'];
|
944 |
+
}
|
945 |
+
|
946 |
$inclTax = $data['incl_tax'];
|
947 |
|
948 |
+
$totalTax = array_sum($data['tax']);
|
949 |
+
$baseTotalTax = array_sum($data['base_tax']);
|
|
|
|
|
950 |
$this->_addAmount($totalTax);
|
951 |
$this->_addBaseAmount($baseTotalTax);
|
952 |
$totalTaxRounded = $this->_calculator->round($totalTax);
|
956 |
return $this;
|
957 |
}
|
958 |
|
959 |
+
/**
|
960 |
+
*
|
961 |
+
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
962 |
+
* @param Varien_Object $taxRateRequest
|
963 |
+
* @param array $taxGroups
|
964 |
+
* @param array $itemTaxGroups
|
965 |
+
* @param boolean $catalogPriceInclTax
|
966 |
+
*/
|
967 |
+
protected function _totalBaseProcessItemTax(
|
968 |
+
$item, $taxRateRequest, &$taxGroups, &$itemTaxGroups, $catalogPriceInclTax
|
969 |
+
)
|
970 |
+
{
|
971 |
+
$taxRateRequest->setProductClassId($item->getProduct()->getTaxClassId());
|
972 |
+
$rate = $this->_calculator->getRate($taxRateRequest);
|
973 |
+
|
974 |
+
$item->setTaxAmount(0);
|
975 |
+
$item->setBaseTaxAmount(0);
|
976 |
+
$item->setHiddenTaxAmount(0);
|
977 |
+
$item->setBaseHiddenTaxAmount(0);
|
978 |
+
$item->setTaxPercent($rate);
|
979 |
+
$item->setDiscountTaxCompensation(0);
|
980 |
+
$rowTotalInclTax = $item->getRowTotalInclTax();
|
981 |
+
$recalculateRowTotalInclTax = false;
|
982 |
+
if (!isset($rowTotalInclTax)) {
|
983 |
+
$item->setRowTotalInclTax($item->getTaxableAmount());
|
984 |
+
$item->setBaseRowTotalInclTax($item->getBaseTaxableAmount());
|
985 |
+
$recalculateRowTotalInclTax = true;
|
986 |
+
}
|
987 |
+
|
988 |
+
$appliedRates = $this->_calculator->getAppliedRates($taxRateRequest);
|
989 |
+
if ($catalogPriceInclTax) {
|
990 |
+
$taxGroups[(string)$rate]['applied_rates'] = $appliedRates;
|
991 |
+
$taxGroups[(string)$rate]['incl_tax'] = $item->getIsPriceInclTax();
|
992 |
+
$this->_aggregateTaxPerRate($item, $rate, $taxGroups);
|
993 |
+
} else {
|
994 |
+
//need to calculate each tax separately
|
995 |
+
foreach ($appliedRates as $appliedTax) {
|
996 |
+
$taxId = $appliedTax['id'];
|
997 |
+
$taxRate = $appliedTax['percent'];
|
998 |
+
$taxGroups[$taxId]['applied_rates'] = array($appliedTax);
|
999 |
+
$taxGroups[$taxId]['incl_tax'] = $item->getIsPriceInclTax();
|
1000 |
+
$this->_aggregateTaxPerRate($item, $taxRate, $taxGroups, $taxId, $recalculateRowTotalInclTax);
|
1001 |
+
}
|
1002 |
+
|
1003 |
+
//We need to calculate weeeAmountInclTax using multiple tax rate here
|
1004 |
+
//because the _calculateWeeeTax and _calculateRowWeeeTax only take one tax rate
|
1005 |
+
if ($this->_weeeHelper->isEnabled() && $this->_weeeHelper->isTaxable()) {
|
1006 |
+
$this->_calculateWeeeAmountInclTax($item, $appliedRates, false);
|
1007 |
+
$this->_calculateWeeeAmountInclTax($item, $appliedRates, true);
|
1008 |
+
}
|
1009 |
+
}
|
1010 |
+
if ($rate > 0) {
|
1011 |
+
$itemTaxGroups[$item->getId()] = $appliedRates;
|
1012 |
+
}
|
1013 |
+
return;
|
1014 |
+
}
|
1015 |
+
|
1016 |
/**
|
1017 |
* Aggregate row totals per tax rate in array
|
1018 |
*
|
1021 |
* @param array $taxGroups
|
1022 |
* @return Mage_Tax_Model_Sales_Total_Quote
|
1023 |
*/
|
1024 |
+
protected function _aggregateTaxPerRate(
|
1025 |
+
$item, $rate, &$taxGroups, $taxId = null, $recalculateRowTotalInclTax = false
|
1026 |
+
)
|
1027 |
{
|
1028 |
+
$inclTax = $item->getIsPriceInclTax();
|
1029 |
+
$rateKey = ($taxId == null) ? (string)$rate : $taxId;
|
1030 |
+
$taxSubtotal = $subtotal = $item->getTaxableAmount();
|
1031 |
$baseTaxSubtotal = $baseSubtotal = $item->getBaseTaxableAmount();
|
1032 |
|
1033 |
$isWeeeEnabled = $this->_weeeHelper->isEnabled();
|
1034 |
$isWeeeTaxable = $this->_weeeHelper->isTaxable();
|
1035 |
|
|
|
|
|
1036 |
if (!isset($taxGroups[$rateKey]['totals'])) {
|
1037 |
$taxGroups[$rateKey]['totals'] = array();
|
1038 |
$taxGroups[$rateKey]['base_totals'] = array();
|
1040 |
$taxGroups[$rateKey]['base_weee_tax'] = array();
|
1041 |
}
|
1042 |
|
1043 |
+
$hiddenTax = null;
|
1044 |
+
$baseHiddenTax = null;
|
1045 |
+
$weeeTax = null;
|
1046 |
+
$baseWeeeTax = null;
|
1047 |
+
$discount = 0;
|
1048 |
+
$rowTaxBeforeDiscount = 0;
|
1049 |
+
$baseRowTaxBeforeDiscount = 0;
|
1050 |
+
$weeeRowTaxBeforeDiscount = 0;
|
1051 |
+
$baseWeeeRowTaxBeforeDiscount = 0;
|
1052 |
+
|
1053 |
+
|
1054 |
switch ($this->_helper->getCalculationSequence($this->_store)) {
|
1055 |
case Mage_Tax_Model_Calculation::CALC_TAX_BEFORE_DISCOUNT_ON_EXCL:
|
1056 |
case Mage_Tax_Model_Calculation::CALC_TAX_BEFORE_DISCOUNT_ON_INCL:
|
1057 |
+
$rowTaxBeforeDiscount = $this->_calculator->calcTaxAmount($subtotal, $rate, $inclTax, false);
|
1058 |
+
$baseRowTaxBeforeDiscount = $this->_calculator->calcTaxAmount($baseSubtotal, $rate, $inclTax, false);
|
1059 |
|
1060 |
if ($isWeeeEnabled && $isWeeeTaxable) {
|
1061 |
+
$weeeRowTaxBeforeDiscount = $this->_calculateRowWeeeTax(0, $item, $rate, false);
|
1062 |
+
$baseWeeeRowTaxBeforeDiscount = $this->_calculateRowWeeeTax(0, $item, $rate);
|
1063 |
+
$rowTaxBeforeDiscount += $weeeRowTaxBeforeDiscount;
|
1064 |
+
$baseRowTaxBeforeDiscount += $baseWeeeRowTaxBeforeDiscount;
|
1065 |
+
$taxGroups[$rateKey]['weee_tax'][] = $this->_deltaRound($weeeRowTaxBeforeDiscount,
|
1066 |
+
$rateKey, $inclTax);
|
1067 |
+
$taxGroups[$rateKey]['base_weee_tax'][] = $this->_deltaRound($baseWeeeRowTaxBeforeDiscount,
|
1068 |
+
$rateKey, $inclTax);
|
1069 |
}
|
1070 |
+
$taxBeforeDiscountRounded = $rowTax = $this->_deltaRound($rowTaxBeforeDiscount, $rateKey, $inclTax);
|
1071 |
+
$baseTaxBeforeDiscountRounded = $baseRowTax = $this->_deltaRound($baseRowTaxBeforeDiscount,
|
1072 |
+
$rateKey, $inclTax, 'base');
|
1073 |
+
$item->setTaxAmount($item->getTaxAmount() + max(0, $rowTax));
|
1074 |
+
$item->setBaseTaxAmount($item->getBaseTaxAmount() + max(0, $baseRowTax));
|
1075 |
break;
|
1076 |
case Mage_Tax_Model_Calculation::CALC_TAX_AFTER_DISCOUNT_ON_EXCL:
|
1077 |
case Mage_Tax_Model_Calculation::CALC_TAX_AFTER_DISCOUNT_ON_INCL:
|
1083 |
$baseDiscount = $item->getBaseDiscountAmount();
|
1084 |
}
|
1085 |
|
1086 |
+
//We remove weee discount from discount if weee is not taxed
|
1087 |
if ($isWeeeEnabled) {
|
1088 |
$discount = $discount - $item->getWeeeDiscount();
|
1089 |
$baseDiscount = $baseDiscount - $item->getBaseWeeeDiscount();
|
1095 |
$baseRowTax = $this->_calculator->calcTaxAmount($baseTaxSubtotal, $rate, $inclTax, false);
|
1096 |
|
1097 |
if ($isWeeeEnabled && $this->_weeeHelper->isTaxable()) {
|
1098 |
+
$weeeTax = $this->_calculateRowWeeeTax($item->getWeeeDiscount(), $item, $rate, false);
|
1099 |
$rowTax += $weeeTax;
|
1100 |
+
$baseWeeeTax = $this->_calculateRowWeeeTax($item->getBaseWeeeDiscount(), $item, $rate);
|
|
|
1101 |
$baseRowTax += $baseWeeeTax;
|
1102 |
$taxGroups[$rateKey]['weee_tax'][] = $weeeTax;
|
1103 |
$taxGroups[$rateKey]['base_weee_tax'][] = $baseWeeeTax;
|
1104 |
}
|
1105 |
+
|
1106 |
+
$rowTax = $this->_deltaRound($rowTax, $rateKey, $inclTax);
|
1107 |
+
$baseRowTax = $this->_deltaRound($baseRowTax, $rateKey, $inclTax, 'base');
|
1108 |
+
|
1109 |
+
$item->setTaxAmount($item->getTaxAmount() + max(0, $rowTax));
|
1110 |
+
$item->setBaseTaxAmount($item->getBaseTaxAmount() + max(0, $baseRowTax));
|
1111 |
+
|
1112 |
+
//Calculate the Row taxes before discount
|
1113 |
+
$rowTaxBeforeDiscount = $this->_calculator->calcTaxAmount(
|
1114 |
+
$subtotal,
|
1115 |
+
$rate,
|
1116 |
+
$inclTax,
|
1117 |
+
false
|
1118 |
+
);
|
1119 |
+
$baseRowTaxBeforeDiscount = $this->_calculator->calcTaxAmount(
|
1120 |
+
$baseSubtotal,
|
1121 |
+
$rate,
|
1122 |
+
$inclTax,
|
1123 |
+
false
|
1124 |
+
);
|
1125 |
+
|
1126 |
+
|
1127 |
+
if ($isWeeeTaxable) {
|
1128 |
+
$weeeRowTaxBeforeDiscount = $this->_calculateRowWeeeTax(0, $item, $rate, false);
|
1129 |
+
$rowTaxBeforeDiscount += $weeeRowTaxBeforeDiscount;
|
1130 |
+
$baseWeeeRowTaxBeforeDiscount = $this->_calculateRowWeeeTax(0, $item, $rate);
|
1131 |
+
$baseRowTaxBeforeDiscount += $baseWeeeRowTaxBeforeDiscount;
|
1132 |
+
}
|
1133 |
+
|
1134 |
+
$taxBeforeDiscountRounded = max(
|
1135 |
+
0,
|
1136 |
+
$this->_deltaRound($rowTaxBeforeDiscount, $rateKey, $inclTax, 'tax_before_discount')
|
1137 |
+
);
|
1138 |
+
$baseTaxBeforeDiscountRounded = max(
|
1139 |
+
0,
|
1140 |
+
$this->_deltaRound($baseRowTaxBeforeDiscount, $rateKey, $inclTax, 'tax_before_discount_base')
|
1141 |
+
);
|
1142 |
+
|
1143 |
+
if (!$item->getNoDiscount()) {
|
1144 |
+
if ($item->getWeeeTaxApplied()) {
|
1145 |
+
$item->setDiscountTaxCompensation($item->getDiscountTaxCompensation() +
|
1146 |
+
$taxBeforeDiscountRounded - max(0, $rowTax));
|
1147 |
}
|
1148 |
}
|
1149 |
|
1150 |
if ($inclTax && $discount > 0) {
|
1151 |
+
$roundedHiddenTax = $taxBeforeDiscountRounded - max(0, $rowTax);
|
1152 |
+
$baseRoundedHiddenTax = $baseTaxBeforeDiscountRounded - max(0, $baseRowTax);
|
1153 |
$this->_hiddenTaxes[] = array(
|
1154 |
'rate_key' => $rateKey,
|
1155 |
'qty' => 1,
|
1156 |
'item' => $item,
|
1157 |
+
'value' => $roundedHiddenTax,
|
1158 |
+
'base_value' => $baseRoundedHiddenTax,
|
1159 |
'incl_tax' => $inclTax,
|
1160 |
);
|
1161 |
}
|
1162 |
break;
|
1163 |
}
|
1164 |
|
1165 |
+
$rowTotalInclTax = $item->getRowTotalInclTax();
|
1166 |
+
if (!isset($rowTotalInclTax) || $recalculateRowTotalInclTax) {
|
1167 |
+
if ($this->_config->priceIncludesTax($this->_store)) {
|
1168 |
+
$item->setRowTotalInclTax($subtotal);
|
1169 |
+
$item->setBaseRowTotalInclTax($baseSubtotal);
|
1170 |
+
} else {
|
1171 |
+
$item->setRowTotalInclTax(
|
1172 |
+
$item->getRowTotalInclTax() + $taxBeforeDiscountRounded - $weeeRowTaxBeforeDiscount);
|
1173 |
+
$item->setBaseRowTotalInclTax(
|
1174 |
+
$item->getBaseRowTotalInclTax()
|
1175 |
+
+ $baseTaxBeforeDiscountRounded
|
1176 |
+
- $baseWeeeRowTaxBeforeDiscount);
|
1177 |
+
}
|
1178 |
+
}
|
1179 |
|
1180 |
+
$taxGroups[$rateKey]['totals'][] = max(0, $taxSubtotal);
|
1181 |
+
$taxGroups[$rateKey]['base_totals'][] = max(0, $baseTaxSubtotal);
|
1182 |
+
$taxGroups[$rateKey]['tax'][] = max(0, $rowTax);
|
1183 |
+
$taxGroups[$rateKey]['base_tax'][] = max(0, $baseRowTax);
|
1184 |
+
return $this;
|
1185 |
+
}
|
1186 |
+
|
1187 |
+
/**
|
1188 |
+
* Calculates the weeeAmountInclTax for display purpose
|
1189 |
+
*
|
1190 |
+
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
1191 |
+
* @param array $appliedRates
|
1192 |
+
* @param bool $base
|
1193 |
+
*/
|
1194 |
+
protected function _calculateWeeeAmountInclTax($item, $appliedRates, $base = true)
|
1195 |
+
{
|
1196 |
+
foreach ($this->_weeeHelper->getApplied($item) as $tax) {
|
1197 |
+
$weeeAmountInclTax = 0;
|
1198 |
+
$weeeAmountExclTax = 0;
|
1199 |
+
|
1200 |
+
if ($base) {
|
1201 |
+
$weeeAmountInclTax = isset($tax['base_amount_incl_tax']) ? $tax['base_amount_incl_tax'] : 0;
|
1202 |
+
$weeeAmountExclTax = isset($tax['base_amount']) ? $tax['base_amount'] : 0;
|
1203 |
+
$weeeRowAmountInclTax = isset($tax['base_row_amount_incl_tax']) ? $tax['base_row_amount_incl_tax'] : 0;
|
1204 |
+
$weeeRowAmountExclTax = isset($tax['base_row_amount']) ? $tax['base_row_amount'] : 0;
|
1205 |
+
} else {
|
1206 |
+
$weeeAmountInclTax = isset($tax['amount_incl_tax']) ? $tax['amount_incl_tax'] : 0;
|
1207 |
+
$weeeAmountExclTax = isset($tax['amount']) ? $tax['amount'] : 0;
|
1208 |
+
$weeeRowAmountInclTax = isset($tax['row_amount_incl_tax']) ? $tax['row_amount_incl_tax'] : 0;
|
1209 |
+
$weeeRowAmountExclTax = isset($tax['row_amount']) ? $tax['row_amount'] : 0;
|
1210 |
+
}
|
1211 |
+
|
1212 |
+
$weeeTax = array();
|
1213 |
+
$weeeRowTax = array();
|
1214 |
+
foreach ($appliedRates as $appliedRate) {
|
1215 |
+
$rate = $appliedRate['percent'];
|
1216 |
+
$weeeTax[] = $this->_getWeeeTax($rate, $item, 0, $weeeAmountInclTax, $weeeAmountExclTax);
|
1217 |
+
$weeeRowTax[] = $this->_getWeeeTax($rate, $item, 0, $weeeRowAmountInclTax, $weeeRowAmountExclTax);
|
1218 |
+
}
|
1219 |
|
1220 |
+
//We want to update the tax calculated on Weee to the Item with out discount for display purpose
|
1221 |
+
$weeeAmountInclTax = array_sum($weeeTax) + $weeeAmountExclTax;
|
1222 |
+
$weeeRowAmountInclTax = array_sum($weeeRowTax) + $weeeRowAmountExclTax;
|
1223 |
+
$calculationMethod = $this->_config->getAlgorithm($this->_store);
|
1224 |
+
if ($calculationMethod == Mage_Tax_Model_Calculation::CALC_UNIT_BASE) {
|
1225 |
+
$weeeRowAmountInclTax = $this->_calculator->round($weeeAmountInclTax * $item->getQty());
|
1226 |
+
} else {
|
1227 |
+
$weeeAmountInclTax = $this->_calculator->round($weeeRowAmountInclTax / $item->getQty());
|
1228 |
+
}
|
1229 |
+
if ($base) {
|
1230 |
+
$this->_weeeHelper->setWeeeTaxesAppliedProperty($item, $tax['title'],
|
1231 |
+
'base_amount_incl_tax', $weeeAmountInclTax);
|
1232 |
+
$this->_weeeHelper->setWeeeTaxesAppliedProperty($item, $tax['title'],
|
1233 |
+
'base_row_amount_incl_tax', $weeeRowAmountInclTax);
|
1234 |
+
} else {
|
1235 |
+
$this->_weeeHelper->setWeeeTaxesAppliedProperty($item, $tax['title'],
|
1236 |
+
'amount_incl_tax', $weeeAmountInclTax);
|
1237 |
+
$this->_weeeHelper->setWeeeTaxesAppliedProperty($item, $tax['title'],
|
1238 |
+
'row_amount_incl_tax', $weeeRowAmountInclTax);
|
1239 |
+
}
|
1240 |
}
|
1241 |
+
return;
|
1242 |
+
}
|
1243 |
|
1244 |
+
/**
|
1245 |
+
* Calculates the weee tax based on the customer tax rate and discount
|
1246 |
+
*
|
1247 |
+
* @param float $discountAmount
|
1248 |
+
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
1249 |
+
* @param float $rate
|
1250 |
+
* @param bool $base
|
1251 |
+
* @return float
|
1252 |
+
*/
|
1253 |
+
protected function _calculateWeeeTax($discountAmount, $item, $rate, $base = true)
|
1254 |
+
{
|
1255 |
+
$totalWeeeAmountInclTax = 0;
|
1256 |
+
$totalWeeeAmountExclTax = 0;
|
1257 |
+
|
1258 |
+
foreach ($this->_weeeHelper->getApplied($item) as $tax) {
|
1259 |
+
$weeeAmountInclTax = 0;
|
1260 |
+
$weeeAmountExclTax = 0;
|
1261 |
+
|
1262 |
+
if ($base) {
|
1263 |
+
$weeeAmountInclTax = isset($tax['base_amount_incl_tax']) ? $tax['base_amount_incl_tax'] : 0;
|
1264 |
+
$weeeAmountExclTax = isset($tax['base_amount']) ? $tax['base_amount'] : 0;
|
1265 |
+
} else {
|
1266 |
+
$weeeAmountInclTax = isset($tax['amount_incl_tax']) ? $tax['amount_incl_tax'] : 0;
|
1267 |
+
$weeeAmountExclTax = isset($tax['amount']) ? $tax['amount'] : 0;
|
1268 |
}
|
1269 |
+
|
1270 |
+
$weeeTaxWithOutDiscount = $this->_getWeeeTax($rate, $item, 0, $weeeAmountInclTax, $weeeAmountExclTax);
|
1271 |
+
|
1272 |
+
//We want to update the tax calculated on Weee to the Item with out discount for display purpose
|
1273 |
+
$weeeAmountInclTax = $weeeTaxWithOutDiscount + $weeeAmountExclTax;
|
1274 |
+
if ($base) {
|
1275 |
+
$this->_weeeHelper->setWeeeTaxesAppliedProperty($item, $tax['title'],
|
1276 |
+
'base_amount_incl_tax', $weeeAmountInclTax);
|
1277 |
} else {
|
1278 |
+
$this->_weeeHelper->setWeeeTaxesAppliedProperty($item, $tax['title'],
|
1279 |
+
'amount_incl_tax', $weeeAmountInclTax);
|
|
|
1280 |
}
|
1281 |
+
|
1282 |
+
$totalWeeeAmountInclTax += $weeeAmountInclTax;
|
1283 |
+
$totalWeeeAmountExclTax += $weeeAmountExclTax;
|
1284 |
+
|
1285 |
+
|
1286 |
}
|
1287 |
+
return $this->_getWeeeTax($rate, $item, $discountAmount, $totalWeeeAmountInclTax, $totalWeeeAmountExclTax);
|
1288 |
+
}
|
1289 |
|
|
|
|
|
1290 |
|
1291 |
+
/**
|
1292 |
+
* Calculates and updates the wee tax based on the customer tax rate and discount for Row
|
1293 |
+
*
|
1294 |
+
* @param float $discountAmount
|
1295 |
+
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
1296 |
+
* @param float $rate
|
1297 |
+
* @param bool $base
|
1298 |
+
* @return int
|
1299 |
+
*/
|
1300 |
+
protected function _calculateRowWeeeTax($discountAmount, $item, $rate, $base = true)
|
1301 |
+
{
|
1302 |
+
//We want to update the weee tax for the unit too. discount amount set on the item is by row
|
1303 |
+
$discountAmountByUnit = $discountAmount / ($item->getTotalQty() ? $item->getTotalQty() : 1);
|
1304 |
+
$this->_calculateWeeeTax($discountAmountByUnit, $item, $rate, $base);
|
1305 |
+
|
1306 |
+
|
1307 |
+
$totalWeeeAmountInclTax = 0;
|
1308 |
+
$totalWeeeAmountExclTax = 0;
|
1309 |
+
|
1310 |
+
foreach ($this->_weeeHelper->getApplied($item) as $tax) {
|
1311 |
+
$weeeAmountInclTax = 0;
|
1312 |
+
$weeeAmountExclTax = 0;
|
1313 |
+
|
1314 |
+
if ($base) {
|
1315 |
+
$weeeAmountInclTax = isset($tax['base_row_amount_incl_tax']) ? $tax['base_row_amount_incl_tax'] : 0;
|
1316 |
+
$weeeAmountExclTax = isset($tax['base_row_amount']) ? $tax['base_row_amount'] : 0;
|
1317 |
+
} else {
|
1318 |
+
$weeeAmountInclTax = isset($tax['row_amount_incl_tax']) ? $tax['row_amount_incl_tax'] : 0;
|
1319 |
+
$weeeAmountExclTax = isset($tax['row_amount']) ? $tax['row_amount'] : 0;
|
1320 |
+
}
|
1321 |
+
|
1322 |
+
$weeeTaxWithOutDiscount = $this->_getWeeeTax($rate, $item, 0, $weeeAmountInclTax, $weeeAmountExclTax);
|
1323 |
+
|
1324 |
+
//We want to update the tax calculated on Weee to the Item without discount.
|
1325 |
+
//We do not show the discount to the user.
|
1326 |
+
$weeeAmountIncludingTax = $weeeTaxWithOutDiscount + $weeeAmountExclTax;
|
1327 |
+
if ($base) {
|
1328 |
+
$this->_weeeHelper->setWeeeTaxesAppliedProperty($item, $tax['title'],
|
1329 |
+
'base_row_amount_incl_tax', $weeeAmountIncludingTax);
|
1330 |
+
} else {
|
1331 |
+
$this->_weeeHelper->setWeeeTaxesAppliedProperty($item, $tax['title'],
|
1332 |
+
'row_amount_incl_tax', $weeeAmountIncludingTax);
|
1333 |
+
}
|
1334 |
+
$totalWeeeAmountInclTax += $weeeAmountInclTax;
|
1335 |
+
$totalWeeeAmountExclTax += $weeeAmountExclTax;
|
1336 |
+
}
|
1337 |
+
return $this->_getWeeeTax($rate, $item, $discountAmount, $totalWeeeAmountInclTax, $totalWeeeAmountExclTax);
|
1338 |
+
}
|
1339 |
+
|
1340 |
+
|
1341 |
+
/**
|
1342 |
+
* Calculate the Weee tax based on the discount and rate
|
1343 |
+
*
|
1344 |
+
* @param float $rate
|
1345 |
+
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
1346 |
+
* @param float $discountAmount
|
1347 |
+
* @param float $weeeAmountIncludingTax
|
1348 |
+
* @param float $weeeAmountExclTax
|
1349 |
+
* @return mixed
|
1350 |
+
*/
|
1351 |
+
private function _getWeeeTax($rate, $item, $discountAmount, $weeeAmountIncludingTax, $weeeAmountExclTax)
|
1352 |
+
{
|
1353 |
+
$isWeeeTaxAlreadyIncluded = $this->_weeeHelper->isTaxIncluded($this->_store);
|
1354 |
+
|
1355 |
+
if ($rate == $this->_calculator->getStoreRateForItem($item) && $isWeeeTaxAlreadyIncluded) {
|
1356 |
+
if (!$discountAmount || $discountAmount <= 0) {
|
1357 |
+
//We want to skip the re calculation and return the difference
|
1358 |
+
return max($weeeAmountIncludingTax - $weeeAmountExclTax, 0);
|
1359 |
+
} else {
|
1360 |
+
return $this->_calculator->calcTaxAmount($weeeAmountIncludingTax - $discountAmount, $rate, true, true);
|
1361 |
+
}
|
1362 |
+
}
|
1363 |
+
$discountAmount = !$discountAmount ? 0 : $discountAmount;
|
1364 |
+
|
1365 |
+
///Regular case where weee does not have the tax and we want to calculate the tax
|
1366 |
+
return $this->_calculator->calcTaxAmount($weeeAmountExclTax - $discountAmount, $rate, false, true);
|
1367 |
}
|
1368 |
|
1369 |
/**
|
1378 |
protected function _deltaRound($price, $rate, $direction, $type = 'regular')
|
1379 |
{
|
1380 |
if ($price) {
|
1381 |
+
$rate = (string)$rate;
|
1382 |
+
$type = $type . $direction;
|
1383 |
+
// initialize the delta to a small number to avoid non-deterministic behavior with rounding of 0.5
|
1384 |
+
$delta = isset($this->_roundingDeltas[$type][$rate]) ? $this->_roundingDeltas[$type][$rate] : 0.000001;
|
1385 |
$price += $delta;
|
1386 |
$this->_roundingDeltas[$type][$rate] = $price - $this->_calculator->round($price);
|
1387 |
$price = $this->_calculator->round($price);
|
1397 |
*/
|
1398 |
protected function _recalculateParent(Mage_Sales_Model_Quote_Item_Abstract $item)
|
1399 |
{
|
1400 |
+
$rowTaxAmount = 0;
|
1401 |
+
$baseRowTaxAmount = 0;
|
1402 |
foreach ($item->getChildren() as $child) {
|
1403 |
+
$rowTaxAmount += $child->getTaxAmount();
|
1404 |
+
$baseRowTaxAmount += $child->getBaseTaxAmount();
|
1405 |
}
|
1406 |
$item->setTaxAmount($rowTaxAmount);
|
1407 |
$item->setBaseTaxAmount($baseRowTaxAmount);
|
1428 |
continue;
|
1429 |
}
|
1430 |
if (!isset($previouslyAppliedTaxes[$row['id']])) {
|
1431 |
+
$row['process'] = $process;
|
1432 |
+
$row['amount'] = 0;
|
1433 |
$row['base_amount'] = 0;
|
1434 |
$previouslyAppliedTaxes[$row['id']] = $row;
|
1435 |
}
|
1438 |
$row['percent'] = $row['percent'] ? $row['percent'] : 1;
|
1439 |
$rate = $rate ? $rate : 1;
|
1440 |
|
1441 |
+
$appliedAmount = $amount / $rate * $row['percent'];
|
1442 |
+
$baseAppliedAmount = $baseAmount / $rate * $row['percent'];
|
1443 |
} else {
|
1444 |
+
$appliedAmount = 0;
|
1445 |
+
$baseAppliedAmount = 0;
|
1446 |
foreach ($row['rates'] as $rate) {
|
1447 |
+
$appliedAmount += $rate['amount'];
|
1448 |
+
$baseAppliedAmount += $rate['base_amount'];
|
1449 |
}
|
1450 |
}
|
1451 |
|
1452 |
|
1453 |
if ($appliedAmount || $previouslyAppliedTaxes[$row['id']]['amount']) {
|
1454 |
+
$previouslyAppliedTaxes[$row['id']]['amount'] += $appliedAmount;
|
1455 |
+
$previouslyAppliedTaxes[$row['id']]['base_amount'] += $baseAppliedAmount;
|
1456 |
} else {
|
1457 |
unset($previouslyAppliedTaxes[$row['id']]);
|
1458 |
}
|
1468 |
*/
|
1469 |
public function fetch(Mage_Sales_Model_Quote_Address $address)
|
1470 |
{
|
1471 |
+
$applied = $address->getAppliedTaxes();
|
1472 |
+
$store = $address->getQuote()->getStore();
|
1473 |
+
$amount = $address->getTaxAmount();
|
1474 |
|
1475 |
$items = $this->_getAddressItems($address);
|
1476 |
$discountTaxCompensation = 0;
|
1483 |
*/
|
1484 |
if ($this->_weeeHelper->isEnabled()) {
|
1485 |
if (!$this->_weeeHelper->includeInSubtotal()) {
|
1486 |
+
$taxAmount += $address->getWeeeDiscount();
|
1487 |
}
|
1488 |
}
|
1489 |
|
1490 |
+
$area = null;
|
1491 |
if ($this->_config->displayCartTaxWithGrandTotal($store) && $address->getGrandTotal()) {
|
1492 |
+
$area = 'taxes';
|
1493 |
}
|
1494 |
|
1495 |
if (($amount != 0) || ($this->_config->displayCartZeroTax($store))) {
|
1496 |
$address->addTotal(array(
|
1497 |
+
'code' => $this->getCode(),
|
1498 |
+
'title' => Mage::helper('tax')->__('Tax'),
|
1499 |
'full_info' => $applied ? $applied : array(),
|
1500 |
+
'value' => $amount,
|
1501 |
+
'area' => $area
|
1502 |
));
|
1503 |
}
|
1504 |
|
1514 |
}
|
1515 |
|
1516 |
$address->addTotal(array(
|
1517 |
+
'code' => 'subtotal',
|
1518 |
+
'title' => Mage::helper('sales')->__('Subtotal'),
|
1519 |
+
'value' => $subtotalInclTax,
|
1520 |
'value_incl_tax' => $subtotalInclTax,
|
1521 |
'value_excl_tax' => $address->getSubtotal(),
|
1522 |
));
|
1536 |
public function processConfigArray($config, $store)
|
1537 |
{
|
1538 |
$calculationSequence = $this->_helper->getCalculationSequence($store);
|
1539 |
+
switch ($calculationSequence) {
|
1540 |
case Mage_Tax_Model_Calculation::CALC_TAX_BEFORE_DISCOUNT_ON_INCL:
|
1541 |
$config['before'][] = 'discount';
|
1542 |
break;
|
app/code/core/Mage/Tax/Model/System/Config/Source/Tax/Region.php
CHANGED
@@ -27,12 +27,31 @@
|
|
27 |
|
28 |
class Mage_Tax_Model_System_Config_Source_Tax_Region
|
29 |
{
|
30 |
-
|
|
|
|
|
|
|
31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
public function toOptionArray($noEmpty=false, $country = null)
|
33 |
{
|
34 |
-
$options =
|
35 |
-
->getCollection()
|
36 |
->addCountryFilter($country)
|
37 |
->toOptionArray();
|
38 |
|
@@ -40,12 +59,13 @@ class Mage_Tax_Model_System_Config_Source_Tax_Region
|
|
40 |
unset($options[0]);
|
41 |
} else {
|
42 |
if ($options) {
|
43 |
-
$options[0]
|
44 |
} else {
|
45 |
-
$options = array(
|
|
|
|
|
46 |
}
|
47 |
}
|
48 |
-
|
49 |
return $options;
|
50 |
}
|
51 |
}
|
27 |
|
28 |
class Mage_Tax_Model_System_Config_Source_Tax_Region
|
29 |
{
|
30 |
+
/**
|
31 |
+
* @var Mage_Directory_Model_Region|null
|
32 |
+
*/
|
33 |
+
protected $_optionsModel;
|
34 |
|
35 |
+
/**
|
36 |
+
* @param array $arguments
|
37 |
+
*/
|
38 |
+
public function __construct($arguments = array())
|
39 |
+
{
|
40 |
+
/** @var Mage_Directory_Model_Region _optionsModel */
|
41 |
+
$this->_optionsModel = !empty($arguments['region_model'])
|
42 |
+
? $arguments['region_model'] : Mage::getModel('directory/region');
|
43 |
+
}
|
44 |
+
|
45 |
+
/**
|
46 |
+
* Return list of country's regions as array
|
47 |
+
*
|
48 |
+
* @param bool $noEmpty
|
49 |
+
* @param null|string $country
|
50 |
+
* @return array
|
51 |
+
*/
|
52 |
public function toOptionArray($noEmpty=false, $country = null)
|
53 |
{
|
54 |
+
$options = $this->_optionsModel->getCollection()
|
|
|
55 |
->addCountryFilter($country)
|
56 |
->toOptionArray();
|
57 |
|
59 |
unset($options[0]);
|
60 |
} else {
|
61 |
if ($options) {
|
62 |
+
$options[0] = array('value' => '0', 'label' => '*');
|
63 |
} else {
|
64 |
+
$options = array(
|
65 |
+
array('value' => '0', 'label' => '*'),
|
66 |
+
);
|
67 |
}
|
68 |
}
|
|
|
69 |
return $options;
|
70 |
}
|
71 |
}
|
app/code/core/Mage/Tax/etc/config.xml
CHANGED
@@ -167,7 +167,7 @@
|
|
167 |
</tax_subtotal>
|
168 |
<tax_shipping>
|
169 |
<class>tax/sales_total_quote_shipping</class>
|
170 |
-
<after>shipping</after>
|
171 |
<before>tax,discount</before>
|
172 |
</tax_shipping>
|
173 |
<tax>
|
167 |
</tax_subtotal>
|
168 |
<tax_shipping>
|
169 |
<class>tax/sales_total_quote_shipping</class>
|
170 |
+
<after>shipping,tax_subtotal</after>
|
171 |
<before>tax,discount</before>
|
172 |
</tax_shipping>
|
173 |
<tax>
|
app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl.php
CHANGED
@@ -752,10 +752,6 @@ class Mage_Usa_Model_Shipping_Carrier_Dhl
|
|
752 |
$priceArr = array();
|
753 |
$errorTitle = 'Unable to retrieve quotes';
|
754 |
|
755 |
-
$tr = get_html_translation_table(HTML_ENTITIES);
|
756 |
-
unset($tr['<'], $tr['>'], $tr['"']);
|
757 |
-
$response = str_replace(array_keys($tr), array_values($tr), $response);
|
758 |
-
|
759 |
if (strlen(trim($response)) > 0) {
|
760 |
if (strpos(trim($response), '<?xml') === 0) {
|
761 |
$xml = simplexml_load_string($response);
|
752 |
$priceArr = array();
|
753 |
$errorTitle = 'Unable to retrieve quotes';
|
754 |
|
|
|
|
|
|
|
|
|
755 |
if (strlen(trim($response)) > 0) {
|
756 |
if (strpos(trim($response), '<?xml') === 0) {
|
757 |
$xml = simplexml_load_string($response);
|
app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International.php
CHANGED
@@ -919,10 +919,6 @@ class Mage_Usa_Model_Shipping_Carrier_Dhl_International
|
|
919 |
*/
|
920 |
protected function _parseResponse($response)
|
921 |
{
|
922 |
-
$htmlTranslationTable = get_html_translation_table(HTML_ENTITIES);
|
923 |
-
unset($htmlTranslationTable['<'], $htmlTranslationTable['>'], $htmlTranslationTable['"']);
|
924 |
-
$response = str_replace(array_keys($htmlTranslationTable), array_values($htmlTranslationTable), $response);
|
925 |
-
|
926 |
$responseError = Mage::helper('usa')->__('The response is in wrong format.');
|
927 |
|
928 |
if (strlen(trim($response)) > 0) {
|
@@ -1634,10 +1630,6 @@ class Mage_Usa_Model_Shipping_Carrier_Dhl_International
|
|
1634 |
$errorTitle = Mage::helper('usa')->__('Unable to retrieve tracking');
|
1635 |
$resultArr = array();
|
1636 |
|
1637 |
-
$htmlTranslationTable = get_html_translation_table(HTML_ENTITIES);
|
1638 |
-
unset($htmlTranslationTable['<'], $htmlTranslationTable['>'], $htmlTranslationTable['"']);
|
1639 |
-
$response = str_replace(array_keys($htmlTranslationTable), array_values($htmlTranslationTable), $response);
|
1640 |
-
|
1641 |
if (strlen(trim($response)) > 0) {
|
1642 |
$xml = simplexml_load_string($response);
|
1643 |
if (!is_object($xml)) {
|
919 |
*/
|
920 |
protected function _parseResponse($response)
|
921 |
{
|
|
|
|
|
|
|
|
|
922 |
$responseError = Mage::helper('usa')->__('The response is in wrong format.');
|
923 |
|
924 |
if (strlen(trim($response)) > 0) {
|
1630 |
$errorTitle = Mage::helper('usa')->__('Unable to retrieve tracking');
|
1631 |
$resultArr = array();
|
1632 |
|
|
|
|
|
|
|
|
|
1633 |
if (strlen(trim($response)) > 0) {
|
1634 |
$xml = simplexml_load_string($response);
|
1635 |
if (!is_object($xml)) {
|
app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf/Page.php
CHANGED
@@ -102,7 +102,7 @@ class Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_Page extends Zend_Pdf_Page
|
|
102 |
* @throws Zend_Pdf_Exception
|
103 |
* @return Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_Page
|
104 |
*/
|
105 |
-
public function drawText($text, $x, $y, $charEncoding = '', $align = self::ALIGN_LEFT)
|
106 |
{
|
107 |
$left = null;
|
108 |
switch ($align) {
|
@@ -143,7 +143,7 @@ class Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_Page extends Zend_Pdf_Page
|
|
143 |
$y = $this->drawLines(array_filter($subLines), $x, $y, $maxWidth, $align);
|
144 |
continue;
|
145 |
}
|
146 |
-
$this->drawText($line, $x, $y,
|
147 |
$y -= ceil($this->getFontSize());
|
148 |
}
|
149 |
return $y;
|
102 |
* @throws Zend_Pdf_Exception
|
103 |
* @return Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_Page
|
104 |
*/
|
105 |
+
public function drawText($text, $x, $y, $charEncoding = 'UTF-8', $align = self::ALIGN_LEFT)
|
106 |
{
|
107 |
$left = null;
|
108 |
switch ($align) {
|
143 |
$y = $this->drawLines(array_filter($subLines), $x, $y, $maxWidth, $align);
|
144 |
continue;
|
145 |
}
|
146 |
+
$this->drawText($line, $x, $y, 'UTF-8', $align);
|
147 |
$y -= ceil($this->getFontSize());
|
148 |
}
|
149 |
return $y;
|
app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf/PageBuilder.php
CHANGED
@@ -114,7 +114,7 @@ class Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_PageBuilder
|
|
114 |
$x = $this->_x(0);
|
115 |
$y = $this->_y(0);
|
116 |
|
117 |
-
$image = new Zend_Pdf_Resource_Image_Jpeg(Mage::getBaseDir('media')
|
118 |
$this->_page->drawImage($image, $x + 191, $this->_y(27), $x + 287, $this->_y(1));
|
119 |
|
120 |
/* Vertical borders */
|
@@ -373,7 +373,7 @@ class Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_PageBuilder
|
|
373 |
$phoneNumber = implode(' ', array_filter(array($consignee->Contact->PhoneNumber,
|
374 |
$consignee->Contact->PhoneExtension))
|
375 |
);
|
376 |
-
$this->_page->drawText($phoneNumber, $this->_x(283), $y,
|
377 |
Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_Page::ALIGN_RIGHT
|
378 |
);
|
379 |
|
@@ -399,7 +399,7 @@ class Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_PageBuilder
|
|
399 |
if (!strlen($code)) {
|
400 |
throw new InvalidArgumentException(Mage::helper('usa')->__('Destination facility code is empty'));
|
401 |
}
|
402 |
-
$this->_page->drawText($code, $this->_x(144), $this->_y(186),
|
403 |
Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_Page::ALIGN_CENTER
|
404 |
);
|
405 |
|
@@ -550,7 +550,7 @@ class Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_PageBuilder
|
|
550 |
{
|
551 |
$this->_page->saveGS();
|
552 |
|
553 |
-
if(!strlen($number) || !strlen($barCode)) {
|
554 |
throw new InvalidArgumentException(Mage::helper('usa')->__('Waybill barcode information is missing'));
|
555 |
}
|
556 |
$image = new Zend_Pdf_Resource_Image_Png("data://image/png;base64," . $barCode);
|
@@ -577,7 +577,7 @@ class Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_PageBuilder
|
|
577 |
{
|
578 |
$this->_page->saveGS();
|
579 |
|
580 |
-
if(!$barCode) {
|
581 |
throw new InvalidArgumentException(Mage::helper('usa')->__('Routing barcode is missing'));
|
582 |
}
|
583 |
|
@@ -614,7 +614,7 @@ class Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_PageBuilder
|
|
614 |
|
615 |
$this->_page->setFont($this->_fontNormal, 9);
|
616 |
$routingText = '(' . $dataIdentifier . ')' . $licensePlate;
|
617 |
-
$this->_page->drawText($routingText, $this->_x(144), $this->_y(563), '',
|
618 |
Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_Page::ALIGN_CENTER
|
619 |
);
|
620 |
|
114 |
$x = $this->_x(0);
|
115 |
$y = $this->_y(0);
|
116 |
|
117 |
+
$image = new Zend_Pdf_Resource_Image_Jpeg(Mage::getBaseDir('media') . DS . 'dhl' . DS . 'logo.jpg');
|
118 |
$this->_page->drawImage($image, $x + 191, $this->_y(27), $x + 287, $this->_y(1));
|
119 |
|
120 |
/* Vertical borders */
|
373 |
$phoneNumber = implode(' ', array_filter(array($consignee->Contact->PhoneNumber,
|
374 |
$consignee->Contact->PhoneExtension))
|
375 |
);
|
376 |
+
$this->_page->drawText($phoneNumber, $this->_x(283), $y, 'UTF-8',
|
377 |
Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_Page::ALIGN_RIGHT
|
378 |
);
|
379 |
|
399 |
if (!strlen($code)) {
|
400 |
throw new InvalidArgumentException(Mage::helper('usa')->__('Destination facility code is empty'));
|
401 |
}
|
402 |
+
$this->_page->drawText($code, $this->_x(144), $this->_y(186), 'UTF-8',
|
403 |
Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_Page::ALIGN_CENTER
|
404 |
);
|
405 |
|
550 |
{
|
551 |
$this->_page->saveGS();
|
552 |
|
553 |
+
if (!strlen($number) || !strlen($barCode)) {
|
554 |
throw new InvalidArgumentException(Mage::helper('usa')->__('Waybill barcode information is missing'));
|
555 |
}
|
556 |
$image = new Zend_Pdf_Resource_Image_Png("data://image/png;base64," . $barCode);
|
577 |
{
|
578 |
$this->_page->saveGS();
|
579 |
|
580 |
+
if (!$barCode) {
|
581 |
throw new InvalidArgumentException(Mage::helper('usa')->__('Routing barcode is missing'));
|
582 |
}
|
583 |
|
614 |
|
615 |
$this->_page->setFont($this->_fontNormal, 9);
|
616 |
$routingText = '(' . $dataIdentifier . ')' . $licensePlate;
|
617 |
+
$this->_page->drawText($routingText, $this->_x(144), $this->_y(563), 'UTF-8',
|
618 |
Mage_Usa_Model_Shipping_Carrier_Dhl_Label_Pdf_Page::ALIGN_CENTER
|
619 |
);
|
620 |
|
app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php
CHANGED
@@ -1360,7 +1360,10 @@ class Mage_Usa_Model_Shipping_Carrier_Fedex
|
|
1360 |
'PhoneNumber' => $request->getShipperContactPhoneNumber()
|
1361 |
),
|
1362 |
'Address' => array(
|
1363 |
-
'StreetLines' => array(
|
|
|
|
|
|
|
1364 |
'City' => $request->getShipperAddressCity(),
|
1365 |
'StateOrProvinceCode' => $request->getShipperAddressStateOrProvinceCode(),
|
1366 |
'PostalCode' => $request->getShipperAddressPostalCode(),
|
@@ -1374,7 +1377,10 @@ class Mage_Usa_Model_Shipping_Carrier_Fedex
|
|
1374 |
'PhoneNumber' => $request->getRecipientContactPhoneNumber()
|
1375 |
),
|
1376 |
'Address' => array(
|
1377 |
-
'StreetLines' => array(
|
|
|
|
|
|
|
1378 |
'City' => $request->getRecipientAddressCity(),
|
1379 |
'StateOrProvinceCode' => $request->getRecipientAddressStateOrProvinceCode(),
|
1380 |
'PostalCode' => $request->getRecipientAddressPostalCode(),
|
1360 |
'PhoneNumber' => $request->getShipperContactPhoneNumber()
|
1361 |
),
|
1362 |
'Address' => array(
|
1363 |
+
'StreetLines' => array(
|
1364 |
+
$request->getShipperAddressStreet1(),
|
1365 |
+
$request->getShipperAddressStreet2()
|
1366 |
+
),
|
1367 |
'City' => $request->getShipperAddressCity(),
|
1368 |
'StateOrProvinceCode' => $request->getShipperAddressStateOrProvinceCode(),
|
1369 |
'PostalCode' => $request->getShipperAddressPostalCode(),
|
1377 |
'PhoneNumber' => $request->getRecipientContactPhoneNumber()
|
1378 |
),
|
1379 |
'Address' => array(
|
1380 |
+
'StreetLines' => array(
|
1381 |
+
$request->getRecipientAddressStreet1(),
|
1382 |
+
$request->getRecipientAddressStreet2()
|
1383 |
+
),
|
1384 |
'City' => $request->getRecipientAddressCity(),
|
1385 |
'StateOrProvinceCode' => $request->getRecipientAddressStateOrProvinceCode(),
|
1386 |
'PostalCode' => $request->getRecipientAddressPostalCode(),
|
app/code/core/Mage/Usa/Model/Shipping/Carrier/Usps.php
CHANGED
@@ -902,9 +902,9 @@ class Mage_Usa_Model_Shipping_Carrier_Usps
|
|
902 |
{
|
903 |
$this->setTrackingRequest();
|
904 |
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
|
909 |
$this->_getXMLTracking($trackingData);
|
910 |
|
@@ -1116,7 +1116,7 @@ class Mage_Usa_Model_Shipping_Carrier_Usps
|
|
1116 |
'CF' => 'Central African Republic',
|
1117 |
'CG' => 'Congo, Republic of the',
|
1118 |
'CH' => 'Switzerland',
|
1119 |
-
'CI' => 'Cote d Ivoire
|
1120 |
'CK' => 'Cook Islands (New Zealand)',
|
1121 |
'CL' => 'Chile',
|
1122 |
'CM' => 'Cameroon',
|
@@ -1184,7 +1184,7 @@ class Mage_Usa_Model_Shipping_Carrier_Usps
|
|
1184 |
'KH' => 'Cambodia',
|
1185 |
'KI' => 'Kiribati',
|
1186 |
'KM' => 'Comoros',
|
1187 |
-
'KN' => 'Saint Kitts (
|
1188 |
'KP' => 'North Korea (Korea, Democratic People\'s Republic of)',
|
1189 |
'KR' => 'South Korea (Korea, Republic of)',
|
1190 |
'KW' => 'Kuwait',
|
@@ -1271,8 +1271,8 @@ class Mage_Usa_Model_Shipping_Carrier_Usps
|
|
1271 |
'TG' => 'Togo',
|
1272 |
'TH' => 'Thailand',
|
1273 |
'TJ' => 'Tajikistan',
|
1274 |
-
'TK' => 'Tokelau (Union
|
1275 |
-
'TL' => 'East Timor (
|
1276 |
'TM' => 'Turkmenistan',
|
1277 |
'TN' => 'Tunisia',
|
1278 |
'TO' => 'Tonga',
|
902 |
{
|
903 |
$this->setTrackingRequest();
|
904 |
|
905 |
+
if (!is_array($trackingData)) {
|
906 |
+
$trackingData = array($trackingData);
|
907 |
+
}
|
908 |
|
909 |
$this->_getXMLTracking($trackingData);
|
910 |
|
1116 |
'CF' => 'Central African Republic',
|
1117 |
'CG' => 'Congo, Republic of the',
|
1118 |
'CH' => 'Switzerland',
|
1119 |
+
'CI' => 'Ivory Coast (Cote d Ivoire)',
|
1120 |
'CK' => 'Cook Islands (New Zealand)',
|
1121 |
'CL' => 'Chile',
|
1122 |
'CM' => 'Cameroon',
|
1184 |
'KH' => 'Cambodia',
|
1185 |
'KI' => 'Kiribati',
|
1186 |
'KM' => 'Comoros',
|
1187 |
+
'KN' => 'Saint Kitts (Saint Christopher and Nevis)',
|
1188 |
'KP' => 'North Korea (Korea, Democratic People\'s Republic of)',
|
1189 |
'KR' => 'South Korea (Korea, Republic of)',
|
1190 |
'KW' => 'Kuwait',
|
1271 |
'TG' => 'Togo',
|
1272 |
'TH' => 'Thailand',
|
1273 |
'TJ' => 'Tajikistan',
|
1274 |
+
'TK' => 'Tokelau (Union Group) (Western Samoa)',
|
1275 |
+
'TL' => 'East Timor (Timor-Leste, Democratic Republic of)',
|
1276 |
'TM' => 'Turkmenistan',
|
1277 |
'TN' => 'Tunisia',
|
1278 |
'TO' => 'Tonga',
|
app/code/core/Mage/Weee/Block/Renderer/Weee/Tax.php
CHANGED
@@ -31,23 +31,55 @@
|
|
31 |
* @package Mage_Adminhtml
|
32 |
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
*/
|
34 |
-
class Mage_Weee_Block_Renderer_Weee_Tax extends Mage_Adminhtml_Block_Widget
|
|
|
35 |
{
|
36 |
-
|
|
|
|
|
|
|
|
|
37 |
protected $_element = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
protected $_countries = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
protected $_websites = null;
|
40 |
|
|
|
|
|
|
|
41 |
public function __construct()
|
42 |
{
|
43 |
$this->setTemplate('weee/renderer/tax.phtml');
|
44 |
}
|
45 |
|
|
|
|
|
|
|
|
|
|
|
46 |
public function getProduct()
|
47 |
{
|
48 |
return Mage::registry('product');
|
49 |
}
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
public function render(Varien_Data_Form_Element_Abstract $element)
|
52 |
{
|
53 |
$this->setElement($element);
|
@@ -55,20 +87,37 @@ class Mage_Weee_Block_Renderer_Weee_Tax extends Mage_Adminhtml_Block_Widget impl
|
|
55 |
return $this->toHtml();
|
56 |
}
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
public function setElement(Varien_Data_Form_Element_Abstract $element)
|
59 |
{
|
60 |
$this->_element = $element;
|
61 |
return $this;
|
62 |
}
|
63 |
|
|
|
|
|
|
|
|
|
|
|
64 |
public function getElement()
|
65 |
{
|
66 |
return $this->_element;
|
67 |
}
|
68 |
|
|
|
|
|
|
|
|
|
|
|
69 |
public function getValues()
|
70 |
{
|
71 |
-
$values =array();
|
72 |
$data = $this->getElement()->getValue();
|
73 |
|
74 |
if (is_array($data) && count($data)) {
|
@@ -78,27 +127,50 @@ class Mage_Weee_Block_Renderer_Weee_Tax extends Mage_Adminhtml_Block_Widget impl
|
|
78 |
return $values;
|
79 |
}
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
protected function _sortWeeeTaxes($a, $b)
|
82 |
{
|
83 |
-
if ($a['website_id']
|
84 |
-
return $a['website_id']
|
85 |
}
|
86 |
-
if ($a['country']
|
87 |
-
return $a['country']
|
88 |
}
|
89 |
return 0;
|
90 |
}
|
91 |
|
|
|
|
|
|
|
|
|
|
|
92 |
public function getWebsiteCount()
|
93 |
{
|
94 |
return count($this->getWebsites());
|
95 |
}
|
96 |
|
|
|
|
|
|
|
|
|
|
|
97 |
public function isMultiWebsites()
|
98 |
{
|
99 |
return !Mage::app()->isSingleStoreMode();
|
100 |
}
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
102 |
public function getCountries()
|
103 |
{
|
104 |
if (is_null($this->_countries)) {
|
@@ -109,6 +181,11 @@ class Mage_Weee_Block_Renderer_Weee_Tax extends Mage_Adminhtml_Block_Widget impl
|
|
109 |
return $this->_countries;
|
110 |
}
|
111 |
|
|
|
|
|
|
|
|
|
|
|
112 |
public function getWebsites()
|
113 |
{
|
114 |
if (!is_null($this->_websites)) {
|
@@ -116,16 +193,16 @@ class Mage_Weee_Block_Renderer_Weee_Tax extends Mage_Adminhtml_Block_Widget impl
|
|
116 |
}
|
117 |
$websites = array();
|
118 |
$websites[0] = array(
|
119 |
-
'name'
|
120 |
-
'currency'
|
121 |
);
|
122 |
|
123 |
if (!Mage::app()->isSingleStoreMode() && !$this->getElement()->getEntityAttribute()->isScopeGlobal()) {
|
124 |
if ($storeId = $this->getProduct()->getStoreId()) {
|
125 |
$website = Mage::app()->getStore($storeId)->getWebsite();
|
126 |
$websites[$website->getId()] = array(
|
127 |
-
'name'
|
128 |
-
'currency'
|
129 |
);
|
130 |
} else {
|
131 |
foreach (Mage::app()->getWebsites() as $website) {
|
@@ -133,8 +210,8 @@ class Mage_Weee_Block_Renderer_Weee_Tax extends Mage_Adminhtml_Block_Widget impl
|
|
133 |
continue;
|
134 |
}
|
135 |
$websites[$website->getId()] = array(
|
136 |
-
'name'
|
137 |
-
'currency'
|
138 |
);
|
139 |
}
|
140 |
}
|
@@ -143,20 +220,28 @@ class Mage_Weee_Block_Renderer_Weee_Tax extends Mage_Adminhtml_Block_Widget impl
|
|
143 |
return $this->_websites;
|
144 |
}
|
145 |
|
|
|
|
|
|
|
146 |
protected function _setAddButton()
|
147 |
{
|
148 |
$this->setChild('add_button',
|
149 |
$this->getLayout()->createBlock('adminhtml/widget_button')
|
150 |
-
->setData(array(
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
}
|
156 |
|
|
|
|
|
|
|
|
|
|
|
157 |
public function getAddButtonHtml()
|
158 |
{
|
159 |
return $this->getChildHtml('add_button');
|
160 |
}
|
161 |
-
|
162 |
}
|
|
31 |
* @package Mage_Adminhtml
|
32 |
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
*/
|
34 |
+
class Mage_Weee_Block_Renderer_Weee_Tax extends Mage_Adminhtml_Block_Widget
|
35 |
+
implements Varien_Data_Form_Element_Renderer_Interface
|
36 |
{
|
37 |
+
/**
|
38 |
+
* Object being rendered
|
39 |
+
*
|
40 |
+
* @var Varien_Data_Form_Element_Abstract
|
41 |
+
*/
|
42 |
protected $_element = null;
|
43 |
+
|
44 |
+
/**
|
45 |
+
* List of countries
|
46 |
+
*
|
47 |
+
* @var array
|
48 |
+
*/
|
49 |
protected $_countries = null;
|
50 |
+
|
51 |
+
/**
|
52 |
+
* List of websites
|
53 |
+
*
|
54 |
+
* @var array
|
55 |
+
*/
|
56 |
protected $_websites = null;
|
57 |
|
58 |
+
/**
|
59 |
+
* Public constructor
|
60 |
+
*/
|
61 |
public function __construct()
|
62 |
{
|
63 |
$this->setTemplate('weee/renderer/tax.phtml');
|
64 |
}
|
65 |
|
66 |
+
/**
|
67 |
+
* Retrieve product in question
|
68 |
+
*
|
69 |
+
* @return Mage_Catalog_Model_Product
|
70 |
+
*/
|
71 |
public function getProduct()
|
72 |
{
|
73 |
return Mage::registry('product');
|
74 |
}
|
75 |
|
76 |
+
/**
|
77 |
+
* Renders html of block
|
78 |
+
*
|
79 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
80 |
+
*
|
81 |
+
* @return string
|
82 |
+
*/
|
83 |
public function render(Varien_Data_Form_Element_Abstract $element)
|
84 |
{
|
85 |
$this->setElement($element);
|
87 |
return $this->toHtml();
|
88 |
}
|
89 |
|
90 |
+
/**
|
91 |
+
* Sets internal reference to element
|
92 |
+
*
|
93 |
+
* @param Varien_Data_Form_Element_Abstract $element
|
94 |
+
*
|
95 |
+
* @return Mage_Weee_Block_Renderer_Weee_Tax
|
96 |
+
*/
|
97 |
public function setElement(Varien_Data_Form_Element_Abstract $element)
|
98 |
{
|
99 |
$this->_element = $element;
|
100 |
return $this;
|
101 |
}
|
102 |
|
103 |
+
/**
|
104 |
+
* Retrieves element
|
105 |
+
*
|
106 |
+
* @return Varien_Data_Form_Element_Abstract
|
107 |
+
*/
|
108 |
public function getElement()
|
109 |
{
|
110 |
return $this->_element;
|
111 |
}
|
112 |
|
113 |
+
/**
|
114 |
+
* Retrieves list of values
|
115 |
+
*
|
116 |
+
* @return array
|
117 |
+
*/
|
118 |
public function getValues()
|
119 |
{
|
120 |
+
$values = array();
|
121 |
$data = $this->getElement()->getValue();
|
122 |
|
123 |
if (is_array($data) && count($data)) {
|
127 |
return $values;
|
128 |
}
|
129 |
|
130 |
+
/**
|
131 |
+
* Sorts Weee Taxes
|
132 |
+
*
|
133 |
+
* @param array $a
|
134 |
+
* @param array $b
|
135 |
+
*
|
136 |
+
* @return integer
|
137 |
+
*/
|
138 |
protected function _sortWeeeTaxes($a, $b)
|
139 |
{
|
140 |
+
if ($a['website_id'] != $b['website_id']) {
|
141 |
+
return $a['website_id'] < $b['website_id'] ? -1 : 1;
|
142 |
}
|
143 |
+
if ($a['country'] != $b['country']) {
|
144 |
+
return $a['country'] < $b['country'] ? -1 : 1;
|
145 |
}
|
146 |
return 0;
|
147 |
}
|
148 |
|
149 |
+
/**
|
150 |
+
* Retrieves number of websites
|
151 |
+
*
|
152 |
+
* @return integer
|
153 |
+
*/
|
154 |
public function getWebsiteCount()
|
155 |
{
|
156 |
return count($this->getWebsites());
|
157 |
}
|
158 |
|
159 |
+
/**
|
160 |
+
* Is multi websites?
|
161 |
+
*
|
162 |
+
* @return bool
|
163 |
+
*/
|
164 |
public function isMultiWebsites()
|
165 |
{
|
166 |
return !Mage::app()->isSingleStoreMode();
|
167 |
}
|
168 |
+
|
169 |
+
/**
|
170 |
+
* Get list of countries
|
171 |
+
*
|
172 |
+
* @return array
|
173 |
+
*/
|
174 |
public function getCountries()
|
175 |
{
|
176 |
if (is_null($this->_countries)) {
|
181 |
return $this->_countries;
|
182 |
}
|
183 |
|
184 |
+
/**
|
185 |
+
* Get list of websites
|
186 |
+
*
|
187 |
+
* @return array
|
188 |
+
*/
|
189 |
public function getWebsites()
|
190 |
{
|
191 |
if (!is_null($this->_websites)) {
|
193 |
}
|
194 |
$websites = array();
|
195 |
$websites[0] = array(
|
196 |
+
'name' => $this->__('All Websites'),
|
197 |
+
'currency' => Mage::app()->getBaseCurrencyCode()
|
198 |
);
|
199 |
|
200 |
if (!Mage::app()->isSingleStoreMode() && !$this->getElement()->getEntityAttribute()->isScopeGlobal()) {
|
201 |
if ($storeId = $this->getProduct()->getStoreId()) {
|
202 |
$website = Mage::app()->getStore($storeId)->getWebsite();
|
203 |
$websites[$website->getId()] = array(
|
204 |
+
'name' => $website->getName(),
|
205 |
+
'currency' => $website->getConfig(Mage_Directory_Model_Currency::XML_PATH_CURRENCY_BASE),
|
206 |
);
|
207 |
} else {
|
208 |
foreach (Mage::app()->getWebsites() as $website) {
|
210 |
continue;
|
211 |
}
|
212 |
$websites[$website->getId()] = array(
|
213 |
+
'name' => $website->getName(),
|
214 |
+
'currency' => $website->getConfig(Mage_Directory_Model_Currency::XML_PATH_CURRENCY_BASE),
|
215 |
);
|
216 |
}
|
217 |
}
|
220 |
return $this->_websites;
|
221 |
}
|
222 |
|
223 |
+
/**
|
224 |
+
* Set add button and its properties
|
225 |
+
*/
|
226 |
protected function _setAddButton()
|
227 |
{
|
228 |
$this->setChild('add_button',
|
229 |
$this->getLayout()->createBlock('adminhtml/widget_button')
|
230 |
+
->setData(array('id' => "add_tax_" . $this->getElement()->getHtmlId(),
|
231 |
+
'label' => Mage::helper('catalog')->__('Add Tax'),
|
232 |
+
'onclick' => "weeeTaxControl.addItem('" . $this->getElement()->getHtmlId() . "')",
|
233 |
+
'class' => 'add'
|
234 |
+
)));
|
235 |
}
|
236 |
|
237 |
+
/**
|
238 |
+
* Retrieve add button html
|
239 |
+
*
|
240 |
+
* @return string
|
241 |
+
*/
|
242 |
public function getAddButtonHtml()
|
243 |
{
|
244 |
return $this->getChildHtml('add_button');
|
245 |
}
|
|
|
246 |
}
|
247 |
+
|
app/code/core/Mage/Weee/Helper/Data.php
CHANGED
@@ -34,8 +34,31 @@
|
|
34 |
class Mage_Weee_Helper_Data extends Mage_Core_Helper_Abstract
|
35 |
{
|
36 |
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
|
|
|
|
|
|
39 |
protected $_storeDisplayConfig = array();
|
40 |
|
41 |
/**
|
@@ -101,7 +124,30 @@ class Mage_Weee_Helper_Data extends Mage_Core_Helper_Abstract
|
|
101 |
*/
|
102 |
public function isTaxable($store = null)
|
103 |
{
|
104 |
-
return Mage::
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
}
|
106 |
|
107 |
/**
|
@@ -129,7 +175,7 @@ class Mage_Weee_Helper_Data extends Mage_Core_Helper_Abstract
|
|
129 |
{
|
130 |
if ($this->isEnabled()) {
|
131 |
return Mage::getSingleton('weee/tax')->
|
132 |
-
|
133 |
}
|
134 |
return 0;
|
135 |
}
|
@@ -192,10 +238,10 @@ class Mage_Weee_Helper_Data extends Mage_Core_Helper_Abstract
|
|
192 |
* @return array
|
193 |
*/
|
194 |
public function getProductWeeeAttributes($product, $shipping = null, $billing = null,
|
195 |
-
|
196 |
{
|
197 |
return Mage::getSingleton('weee/tax')
|
198 |
-
|
199 |
}
|
200 |
|
201 |
/**
|
@@ -224,7 +270,7 @@ class Mage_Weee_Helper_Data extends Mage_Core_Helper_Abstract
|
|
224 |
* not valid serialized data
|
225 |
*/
|
226 |
$data = $item->getWeeeTaxApplied();
|
227 |
-
if (empty($data)){
|
228 |
return array();
|
229 |
}
|
230 |
return unserialize($item->getWeeeTaxApplied());
|
@@ -268,7 +314,7 @@ class Mage_Weee_Helper_Data extends Mage_Core_Helper_Abstract
|
|
268 |
* @return array
|
269 |
*/
|
270 |
public function getProductWeeeAttributesForRenderer($product, $shipping = null, $billing = null,
|
271 |
-
|
272 |
{
|
273 |
if ($this->isEnabled()) {
|
274 |
return $this->getProductWeeeAttributes(
|
@@ -283,16 +329,41 @@ class Mage_Weee_Helper_Data extends Mage_Core_Helper_Abstract
|
|
283 |
}
|
284 |
|
285 |
/**
|
286 |
-
* Returns amount to display
|
287 |
*
|
288 |
* @param Mage_Catalog_Model_Product $product
|
289 |
-
* @return
|
290 |
*/
|
291 |
public function getAmountForDisplay($product)
|
292 |
{
|
293 |
if ($this->isEnabled()) {
|
294 |
-
|
295 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
296 |
}
|
297 |
return 0;
|
298 |
}
|
@@ -316,19 +387,22 @@ class Mage_Weee_Helper_Data extends Mage_Core_Helper_Abstract
|
|
316 |
*
|
317 |
* @param Mage_Catalog_Model_Product $product
|
318 |
* @param array $tierPrices
|
|
|
319 |
* @return Mage_Weee_Helper_Data
|
320 |
*/
|
321 |
-
public function processTierPrices($product, &$tierPrices)
|
322 |
{
|
|
|
323 |
$weeeAmount = $this->getAmountForDisplay($product);
|
324 |
$store = Mage::app()->getStore();
|
325 |
foreach ($tierPrices as $index => &$tier) {
|
|
|
326 |
$html = $store->formatPrice($store->convertPrice(
|
327 |
-
Mage::helper('tax')->getPrice($product, $tier['website_price'], true)
|
328 |
-
$tier['formated_price_incl_weee'] =
|
329 |
$html = $store->formatPrice($store->convertPrice(
|
330 |
-
Mage::helper('tax')->getPrice($product, $tier['website_price'])
|
331 |
-
$tier['formated_price_incl_weee_only'] =
|
332 |
$tier['formated_weee'] = $store->formatPrice($store->convertPrice($weeeAmount));
|
333 |
}
|
334 |
return $this;
|
@@ -342,11 +416,25 @@ class Mage_Weee_Helper_Data extends Mage_Core_Helper_Abstract
|
|
342 |
*/
|
343 |
public function isEnabled($store = null)
|
344 |
{
|
|
|
|
|
|
|
|
|
345 |
return Mage::getStoreConfig(self::XML_PATH_FPT_ENABLED, $store);
|
346 |
}
|
347 |
|
348 |
/**
|
349 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
350 |
*
|
351 |
* @throws Mage_Exception
|
352 |
* @param array $attributes Array of Varien_Object, result from getProductWeeeAttributes()
|
@@ -366,4 +454,191 @@ class Mage_Weee_Helper_Data extends Mage_Core_Helper_Abstract
|
|
366 |
|
367 |
return (float)$amount;
|
368 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
369 |
}
|
|
34 |
class Mage_Weee_Helper_Data extends Mage_Core_Helper_Abstract
|
35 |
{
|
36 |
|
37 |
+
/**
|
38 |
+
* Config Path for FPT
|
39 |
+
*/
|
40 |
+
const XML_PATH_FPT_ENABLED = 'tax/weee/enable';
|
41 |
+
|
42 |
+
/**
|
43 |
+
*'FPT Tax Configuration' for TAXED
|
44 |
+
*/
|
45 |
+
const TAXED = '1';
|
46 |
+
|
47 |
+
/**
|
48 |
+
*'FPT Tax Configuration' for LOADED_AND_DISPLAY_WITH_TAX
|
49 |
+
*/
|
50 |
+
const LOADED_AND_DISPLAY_WITH_TAX = '2';
|
51 |
+
|
52 |
+
/**
|
53 |
+
* Current store, in the case of backend order, it could be different from admin store
|
54 |
+
*
|
55 |
+
* @var Mage_Core_Model_Store
|
56 |
+
*/
|
57 |
+
protected $_store;
|
58 |
|
59 |
+
/**
|
60 |
+
* @var array
|
61 |
+
*/
|
62 |
protected $_storeDisplayConfig = array();
|
63 |
|
64 |
/**
|
124 |
*/
|
125 |
public function isTaxable($store = null)
|
126 |
{
|
127 |
+
return Mage::getStoreConfig('tax/weee/apply_vat', $store) == self::TAXED ||
|
128 |
+
Mage::getStoreConfig('tax/weee/apply_vat', $store) == self::LOADED_AND_DISPLAY_WITH_TAX;
|
129 |
+
}
|
130 |
+
|
131 |
+
/**
|
132 |
+
* Returns true if default store tax is already applied to the FPT(weee)
|
133 |
+
*
|
134 |
+
* @param mixed $store
|
135 |
+
* @return bool
|
136 |
+
*/
|
137 |
+
public function isTaxIncluded($store = null)
|
138 |
+
{
|
139 |
+
return Mage::getStoreConfig('tax/weee/apply_vat', $store) == self::LOADED_AND_DISPLAY_WITH_TAX;
|
140 |
+
}
|
141 |
+
|
142 |
+
/**
|
143 |
+
* Get Weee Tax Configuration Type
|
144 |
+
*
|
145 |
+
* @param mixed $store
|
146 |
+
* @return int
|
147 |
+
*/
|
148 |
+
public function getTaxType($store = null)
|
149 |
+
{
|
150 |
+
return Mage::getStoreConfig('tax/weee/apply_vat', $store);
|
151 |
}
|
152 |
|
153 |
/**
|
175 |
{
|
176 |
if ($this->isEnabled()) {
|
177 |
return Mage::getSingleton('weee/tax')->
|
178 |
+
getWeeeAmount($product, $shipping, $billing, $website, $calculateTaxes);
|
179 |
}
|
180 |
return 0;
|
181 |
}
|
238 |
* @return array
|
239 |
*/
|
240 |
public function getProductWeeeAttributes($product, $shipping = null, $billing = null,
|
241 |
+
$website = null, $calculateTaxes = false)
|
242 |
{
|
243 |
return Mage::getSingleton('weee/tax')
|
244 |
+
->getProductWeeeAttributes($product, $shipping, $billing, $website, $calculateTaxes);
|
245 |
}
|
246 |
|
247 |
/**
|
270 |
* not valid serialized data
|
271 |
*/
|
272 |
$data = $item->getWeeeTaxApplied();
|
273 |
+
if (empty($data)) {
|
274 |
return array();
|
275 |
}
|
276 |
return unserialize($item->getWeeeTaxApplied());
|
314 |
* @return array
|
315 |
*/
|
316 |
public function getProductWeeeAttributesForRenderer($product, $shipping = null, $billing = null,
|
317 |
+
$website = null, $calculateTaxes = false)
|
318 |
{
|
319 |
if ($this->isEnabled()) {
|
320 |
return $this->getProductWeeeAttributes(
|
329 |
}
|
330 |
|
331 |
/**
|
332 |
+
* Returns amount to display excluding taxes
|
333 |
*
|
334 |
* @param Mage_Catalog_Model_Product $product
|
335 |
+
* @return float
|
336 |
*/
|
337 |
public function getAmountForDisplay($product)
|
338 |
{
|
339 |
if ($this->isEnabled()) {
|
340 |
+
$attributes = $this->getProductWeeeAttributesForRenderer($product,
|
341 |
+
null, null, null, true);
|
342 |
+
|
343 |
+
if (is_array($attributes)) {
|
344 |
+
$amount = 0;
|
345 |
+
foreach ($attributes as $attribute) {
|
346 |
+
/* @var $attribute Varien_Object */
|
347 |
+
$amount += $attribute->getAmount();
|
348 |
+
}
|
349 |
+
return $amount;
|
350 |
+
}
|
351 |
+
}
|
352 |
+
return 0;
|
353 |
+
}
|
354 |
+
|
355 |
+
/**
|
356 |
+
* Returns amount to display including taxes
|
357 |
+
*
|
358 |
+
* @param Mage_Catalog_Model_Product $product
|
359 |
+
* @return float
|
360 |
+
*/
|
361 |
+
public function getAmountForDisplayInclTaxes($product)
|
362 |
+
{
|
363 |
+
if ($this->isEnabled()) {
|
364 |
+
$attributes = $this->getProductWeeeAttributesForRenderer($product,
|
365 |
+
null, null, null, true);
|
366 |
+
return $this->getAmountInclTaxes($attributes);
|
367 |
}
|
368 |
return 0;
|
369 |
}
|
387 |
*
|
388 |
* @param Mage_Catalog_Model_Product $product
|
389 |
* @param array $tierPrices
|
390 |
+
* @param boolean $includeIndex
|
391 |
* @return Mage_Weee_Helper_Data
|
392 |
*/
|
393 |
+
public function processTierPrices($product, &$tierPrices, $includeIndex = true)
|
394 |
{
|
395 |
+
$weeeAmountInclTax = $this->getAmountForDisplayInclTaxes($product);
|
396 |
$weeeAmount = $this->getAmountForDisplay($product);
|
397 |
$store = Mage::app()->getStore();
|
398 |
foreach ($tierPrices as $index => &$tier) {
|
399 |
+
$spanTag = '<span class="price tier-' . ($includeIndex ? $index : 'fixed');
|
400 |
$html = $store->formatPrice($store->convertPrice(
|
401 |
+
Mage::helper('tax')->getPrice($product, $tier['website_price'], true) + $weeeAmountInclTax), false);
|
402 |
+
$tier['formated_price_incl_weee'] = $spanTag . '-incl-tax">' . $html . '</span>';
|
403 |
$html = $store->formatPrice($store->convertPrice(
|
404 |
+
Mage::helper('tax')->getPrice($product, $tier['website_price']) + $weeeAmount), false);
|
405 |
+
$tier['formated_price_incl_weee_only'] = $spanTag . '">' . $html . '</span>';
|
406 |
$tier['formated_weee'] = $store->formatPrice($store->convertPrice($weeeAmount));
|
407 |
}
|
408 |
return $this;
|
416 |
*/
|
417 |
public function isEnabled($store = null)
|
418 |
{
|
419 |
+
if ($store == null && $this->_store) {
|
420 |
+
//This is needed when order is created from backend
|
421 |
+
$store = $this->_store;
|
422 |
+
}
|
423 |
return Mage::getStoreConfig(self::XML_PATH_FPT_ENABLED, $store);
|
424 |
}
|
425 |
|
426 |
/**
|
427 |
+
* Set the store for the current quote
|
428 |
+
*
|
429 |
+
* @param Mage_Core_Model_Store $store
|
430 |
+
*/
|
431 |
+
public function setStore($store)
|
432 |
+
{
|
433 |
+
$this->_store = $store;
|
434 |
+
}
|
435 |
+
|
436 |
+
/**
|
437 |
+
* Returns all summed weee taxes with all local taxes applied
|
438 |
*
|
439 |
* @throws Mage_Exception
|
440 |
* @param array $attributes Array of Varien_Object, result from getProductWeeeAttributes()
|
454 |
|
455 |
return (float)$amount;
|
456 |
}
|
457 |
+
|
458 |
+
/**
|
459 |
+
* Check if the configuration for the particular store causes conflicts
|
460 |
+
*
|
461 |
+
* @param Mage_Core_Model_Store|null $store
|
462 |
+
* @return boolean
|
463 |
+
*/
|
464 |
+
public function validateCatalogPricesAndFptConfiguration($store = null)
|
465 |
+
{
|
466 |
+
// Check the configuration - Weee enabled and catalog display
|
467 |
+
$priceIncludesTax = $this->_getHelper('tax')->priceIncludesTax($store);
|
468 |
+
// $priceIncludesTax = Mage::getStoreConfig(Mage_Tax_Model_Config::CONFIG_XML_PATH_PRICE_INCLUDES_TAX, $store);
|
469 |
+
$fptTaxConfig = $this->getTaxType($store);
|
470 |
+
|
471 |
+
// If FPT == Including tax & Catalog Prices Excluding Tax or
|
472 |
+
// FPT = Taxed (Meaning - go ahead and calculate tax on fpt and Catalog Prices Include tax)
|
473 |
+
return (($fptTaxConfig == Mage_Tax_Model_Config::FPT_LOADED_DISPLAY_WITH_TAX && !$priceIncludesTax)
|
474 |
+
|| ($fptTaxConfig == Mage_Tax_Model_Config::FPT_TAXED && $priceIncludesTax));
|
475 |
+
}
|
476 |
+
|
477 |
+
/**
|
478 |
+
* Set a value to a specific property searching FPT by title for the Item
|
479 |
+
*
|
480 |
+
* @param Mage_Core_Model_Abstract $item
|
481 |
+
* @param string $title
|
482 |
+
* @param string $property
|
483 |
+
* @param string $value
|
484 |
+
*/
|
485 |
+
public function setWeeeTaxesAppliedProperty($item, $title, $property, $value)
|
486 |
+
{
|
487 |
+
$weeeTaxAppliedAmounts = $this->getApplied($item);
|
488 |
+
foreach ($weeeTaxAppliedAmounts as &$weeeTaxAppliedAmount) {
|
489 |
+
//if the title is not set we set the value to all fields
|
490 |
+
if (isset($title)) {
|
491 |
+
if ($weeeTaxAppliedAmount['title'] == $title) {
|
492 |
+
$weeeTaxAppliedAmount[$property] = $value;
|
493 |
+
}
|
494 |
+
} else {
|
495 |
+
$weeeTaxAppliedAmount[$property] = $value;
|
496 |
+
}
|
497 |
+
}
|
498 |
+
$item->setWeeeTaxApplied(serialize($weeeTaxAppliedAmounts));
|
499 |
+
}
|
500 |
+
|
501 |
+
/**
|
502 |
+
* Get the total weee tax
|
503 |
+
*
|
504 |
+
* @param Mage_Core_Model_Abstract $item
|
505 |
+
* @return float
|
506 |
+
*/
|
507 |
+
public function getWeeeTaxInclTax($item)
|
508 |
+
{
|
509 |
+
$weeeTaxAppliedAmounts = $this->getApplied($item);
|
510 |
+
$totalWeeeTaxIncTaxApplied = 0;
|
511 |
+
foreach ($weeeTaxAppliedAmounts as $weeeTaxAppliedAmount) {
|
512 |
+
$totalWeeeTaxIncTaxApplied += max($weeeTaxAppliedAmount['amount_incl_tax'], 0);
|
513 |
+
}
|
514 |
+
return $totalWeeeTaxIncTaxApplied;
|
515 |
+
}
|
516 |
+
|
517 |
+
/**
|
518 |
+
* Get the total base weee tax
|
519 |
+
*
|
520 |
+
* @param Mage_Core_Model_Abstract $item
|
521 |
+
* @return float
|
522 |
+
*/
|
523 |
+
public function getBaseWeeeTaxInclTax($item)
|
524 |
+
{
|
525 |
+
$weeeTaxAppliedAmounts = $this->getApplied($item);
|
526 |
+
$totalBaseWeeeTaxIncTaxApplied = 0;
|
527 |
+
foreach ($weeeTaxAppliedAmounts as $weeeTaxAppliedAmount) {
|
528 |
+
$totalBaseWeeeTaxIncTaxApplied += max($weeeTaxAppliedAmount['base_amount_incl_tax'], 0);
|
529 |
+
}
|
530 |
+
return $totalBaseWeeeTaxIncTaxApplied;
|
531 |
+
}
|
532 |
+
|
533 |
+
/**
|
534 |
+
* Get the total weee including tax by row
|
535 |
+
*
|
536 |
+
* @param Mage_Core_Model_Abstract $item
|
537 |
+
* @return float
|
538 |
+
*/
|
539 |
+
public function getRowWeeeTaxInclTax($item)
|
540 |
+
{
|
541 |
+
$weeeTaxAppliedAmounts = $this->getApplied($item);
|
542 |
+
$totalWeeeTaxIncTaxApplied = 0;
|
543 |
+
foreach ($weeeTaxAppliedAmounts as $weeeTaxAppliedAmount) {
|
544 |
+
$totalWeeeTaxIncTaxApplied += max($weeeTaxAppliedAmount['row_amount_incl_tax'], 0);
|
545 |
+
}
|
546 |
+
return $totalWeeeTaxIncTaxApplied;
|
547 |
+
}
|
548 |
+
|
549 |
+
/**
|
550 |
+
* Get the total base weee including tax by row
|
551 |
+
*
|
552 |
+
* @param Mage_Core_Model_Abstract $item
|
553 |
+
* @return float
|
554 |
+
*/
|
555 |
+
public function getBaseRowWeeeTaxInclTax($item)
|
556 |
+
{
|
557 |
+
$weeeTaxAppliedAmounts = $this->getApplied($item);
|
558 |
+
$totalWeeeTaxIncTaxApplied = 0;
|
559 |
+
foreach ($weeeTaxAppliedAmounts as $weeeTaxAppliedAmount) {
|
560 |
+
$totalWeeeTaxIncTaxApplied += max($weeeTaxAppliedAmount['base_row_amount_incl_tax'], 0);
|
561 |
+
}
|
562 |
+
return $totalWeeeTaxIncTaxApplied;
|
563 |
+
}
|
564 |
+
|
565 |
+
/**
|
566 |
+
* Get the total tax applied on weee by unit
|
567 |
+
*
|
568 |
+
* @param Mage_Core_Model_Abstract $item
|
569 |
+
* @return float
|
570 |
+
*/
|
571 |
+
public function getTotalTaxAppliedForWeeeTax($item)
|
572 |
+
{
|
573 |
+
$weeeTaxAppliedAmounts = $this->getApplied($item);
|
574 |
+
$totalTaxForWeeeTax = 0;
|
575 |
+
foreach ($weeeTaxAppliedAmounts as $weeeTaxAppliedAmount) {
|
576 |
+
$totalTaxForWeeeTax += max($weeeTaxAppliedAmount['amount_incl_tax']
|
577 |
+
- $weeeTaxAppliedAmount['amount'], 0);
|
578 |
+
}
|
579 |
+
return $totalTaxForWeeeTax;
|
580 |
+
}
|
581 |
+
|
582 |
+
/**
|
583 |
+
* Get the total tax applied on weee by unit
|
584 |
+
*
|
585 |
+
* @param Mage_Core_Model_Abstract $item
|
586 |
+
* @return float
|
587 |
+
*/
|
588 |
+
public function getBaseTotalTaxAppliedForWeeeTax($item)
|
589 |
+
{
|
590 |
+
$weeeTaxAppliedAmounts = $this->getApplied($item);
|
591 |
+
$totalTaxForWeeeTax = 0;
|
592 |
+
foreach ($weeeTaxAppliedAmounts as $weeeTaxAppliedAmount) {
|
593 |
+
$totalTaxForWeeeTax += max($weeeTaxAppliedAmount['base_amount_incl_tax']
|
594 |
+
- $weeeTaxAppliedAmount['base_amount'], 0);
|
595 |
+
}
|
596 |
+
return $totalTaxForWeeeTax;
|
597 |
+
}
|
598 |
+
|
599 |
+
/**
|
600 |
+
* Get the Total tax applied for Weee
|
601 |
+
*
|
602 |
+
* @param Mage_Core_Model_Abstract $item
|
603 |
+
* @return float
|
604 |
+
*/
|
605 |
+
public function getTotalRowTaxAppliedForWeeeTax($item)
|
606 |
+
{
|
607 |
+
$weeeTaxAppliedAmounts = $this->getApplied($item);
|
608 |
+
$totalTaxForWeeeTax = 0;
|
609 |
+
foreach ($weeeTaxAppliedAmounts as $weeeTaxAppliedAmount) {
|
610 |
+
$totalTaxForWeeeTax += max($weeeTaxAppliedAmount['row_amount_incl_tax']
|
611 |
+
- $weeeTaxAppliedAmount['row_amount'], 0);
|
612 |
+
}
|
613 |
+
return $totalTaxForWeeeTax;
|
614 |
+
}
|
615 |
+
|
616 |
+
/**
|
617 |
+
* Get the Total tax applied in base for Weee
|
618 |
+
*
|
619 |
+
* @param Mage_Core_Model_Abstract $item
|
620 |
+
* @return float
|
621 |
+
*/
|
622 |
+
public function getBaseTotalRowTaxAppliedForWeeeTax($item)
|
623 |
+
{
|
624 |
+
$weeeTaxAppliedAmounts = $this->getApplied($item);
|
625 |
+
$totalTaxForWeeeTax = 0;
|
626 |
+
foreach ($weeeTaxAppliedAmounts as $weeeTaxAppliedAmount) {
|
627 |
+
$totalTaxForWeeeTax += max($weeeTaxAppliedAmount['base_row_amount_incl_tax']
|
628 |
+
- $weeeTaxAppliedAmount['base_row_amount'], 0);
|
629 |
+
}
|
630 |
+
return $totalTaxForWeeeTax;
|
631 |
+
}
|
632 |
+
|
633 |
+
/**
|
634 |
+
* Get The Helper with the name provider
|
635 |
+
*
|
636 |
+
* @param string $helperName
|
637 |
+
* @return Mage_Core_Helper_Abstract
|
638 |
+
*/
|
639 |
+
protected function _getHelper($helperName)
|
640 |
+
{
|
641 |
+
return Mage::helper($helperName);
|
642 |
+
}
|
643 |
}
|
644 |
+
|
app/code/core/Mage/{GoogleCheckout/Model/Source/Shipping/Virtual/Schedule.php → Weee/Model/Config/Source/Fpt/Tax.php}
RENAMED
@@ -19,19 +19,37 @@
|
|
19 |
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
*
|
21 |
* @category Mage
|
22 |
-
* @package
|
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_GoogleCheckout_Model_Source_Shipping_Virtual_Schedule
|
29 |
{
|
|
|
|
|
|
|
|
|
|
|
30 |
public function toOptionArray()
|
31 |
{
|
|
|
32 |
return array(
|
33 |
-
array('value' =>
|
34 |
-
array('value' =>
|
|
|
35 |
);
|
36 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
}
|
|
|
|
19 |
* needs please refer to http://www.magentocommerce.com for more information.
|
20 |
*
|
21 |
* @category Mage
|
22 |
+
* @package Mage_Weee
|
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_Weee_Model_Config_Source_Fpt_Tax
|
|
|
|
|
27 |
{
|
28 |
+
/**
|
29 |
+
* Array of options for FPT Tax Configuration
|
30 |
+
*
|
31 |
+
* @return array
|
32 |
+
*/
|
33 |
public function toOptionArray()
|
34 |
{
|
35 |
+
$weeeHelper = $this->_getHelper('weee');
|
36 |
return array(
|
37 |
+
array('value' => 0, 'label' => $weeeHelper->__('Not Taxed')),
|
38 |
+
array('value' => 1, 'label' => $weeeHelper->__('Taxed')),
|
39 |
+
array('value' => 2, 'label' => $weeeHelper->__('Loaded and Displayed with Tax')),
|
40 |
);
|
41 |
}
|
42 |
+
|
43 |
+
/**
|
44 |
+
* Return helper corresponding to given name
|
45 |
+
*
|
46 |
+
* @param string $helperName
|
47 |
+
* @return Mage_Core_Helper_Abstract
|
48 |
+
*/
|
49 |
+
protected function _getHelper($helperName)
|
50 |
+
{
|
51 |
+
return Mage::helper($helperName);
|
52 |
+
}
|
53 |
}
|
54 |
+
|
55 |
+
|
app/code/core/Mage/Weee/Model/Observer.php
CHANGED
@@ -24,6 +24,13 @@
|
|
24 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
*/
|
26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
class Mage_Weee_Model_Observer extends Mage_Core_Model_Abstract
|
28 |
{
|
29 |
/**
|
@@ -41,7 +48,8 @@ class Mage_Weee_Model_Observer extends Mage_Core_Model_Abstract
|
|
41 |
|
42 |
$attributes = Mage::getSingleton('weee/tax')->getWeeeAttributeCodes(true);
|
43 |
foreach ($attributes as $code) {
|
44 |
-
|
|
|
45 |
$weeeTax->setRenderer(
|
46 |
Mage::app()->getLayout()->createBlock('weee/renderer_weee_tax')
|
47 |
);
|
@@ -61,10 +69,10 @@ class Mage_Weee_Model_Observer extends Mage_Core_Model_Abstract
|
|
61 |
{
|
62 |
//adminhtml_catalog_product_form_prepare_excluded_field_list
|
63 |
|
64 |
-
$block
|
65 |
-
$list
|
66 |
$attributes = Mage::getSingleton('weee/tax')->getWeeeAttributeCodes(true);
|
67 |
-
$list
|
68 |
|
69 |
$block->setFormExcludedFieldList($list);
|
70 |
|
@@ -84,7 +92,7 @@ class Mage_Weee_Model_Observer extends Mage_Core_Model_Abstract
|
|
84 |
return $this;
|
85 |
}
|
86 |
|
87 |
-
switch(Mage::helper('weee')->getListPriceDisplayType()) {
|
88 |
case Mage_Weee_Model_Tax::DISPLAY_EXCL_DESCR_INCL:
|
89 |
case Mage_Weee_Model_Tax::DISPLAY_EXCL:
|
90 |
return $this;
|
@@ -92,12 +100,12 @@ class Mage_Weee_Model_Observer extends Mage_Core_Model_Abstract
|
|
92 |
|
93 |
/** @var $select Varien_Db_Select */
|
94 |
$select = $observer->getEvent()->getSelect();
|
95 |
-
$table
|
96 |
|
97 |
-
$websiteId
|
98 |
$customerGroupId = (int)Mage::getSingleton('customer/session')->getCustomerGroupId();
|
99 |
|
100 |
-
$response
|
101 |
$additionalCalculations = $response->getAdditionalCalculations();
|
102 |
|
103 |
$attributes = Mage::getSingleton('weee/tax')->getWeeeAttributeCodes();
|
@@ -131,13 +139,13 @@ class Mage_Weee_Model_Observer extends Mage_Core_Model_Abstract
|
|
131 |
/** @var $rateRequest Varien_Object */
|
132 |
$rateRequest = Mage::getSingleton('tax/calculation')->getRateRequest();
|
133 |
|
134 |
-
$attributes
|
135 |
foreach ($attributes as $attribute) {
|
136 |
$attributeId = (int)Mage::getSingleton('eav/entity_attribute')
|
137 |
->getIdByCode(Mage_Catalog_Model_Product::ENTITY, $attribute);
|
138 |
-
$tableAlias
|
139 |
$quotedTableAlias = $select->getAdapter()->quoteTableAs($tableAlias, null);
|
140 |
-
$attributeSelect
|
141 |
$attributeSelect
|
142 |
->from(array($tableAlias => Mage::getSingleton('weee/tax')->getResource()->getTable('weee/tax')))
|
143 |
->where("{$quotedTableAlias}.attribute_id = ?", $attributeId)
|
@@ -242,7 +250,7 @@ class Mage_Weee_Model_Observer extends Mage_Core_Model_Abstract
|
|
242 |
public function updateElementTypes(Varien_Event_Observer $observer)
|
243 |
{
|
244 |
$response = $observer->getEvent()->getResponse();
|
245 |
-
$types
|
246 |
$types['weee'] = Mage::getConfig()->getBlockClassName('weee/element_weee_tax');
|
247 |
$response->setTypes($types);
|
248 |
return $this;
|
@@ -286,22 +294,29 @@ class Mage_Weee_Model_Observer extends Mage_Core_Model_Abstract
|
|
286 |
}
|
287 |
|
288 |
$response = $observer->getEvent()->getResponseObject();
|
289 |
-
$options
|
290 |
|
291 |
$_product = Mage::registry('current_product');
|
292 |
if (!$_product) {
|
293 |
return $this;
|
294 |
}
|
295 |
|
296 |
-
$amount
|
297 |
-
$origAmount
|
298 |
-
$attributes
|
299 |
$amountInclTaxes = $weeeHelper->getAmountInclTaxes($attributes);
|
300 |
-
$taxes
|
301 |
|
302 |
-
$
|
303 |
-
|
304 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
|
306 |
// Exclude Weee amount from excluding tax amount
|
307 |
if (!$weeeHelper->typeOfDisplay($_product, array(0, 1, 4))) {
|
@@ -338,12 +353,20 @@ class Mage_Weee_Model_Observer extends Mage_Core_Model_Abstract
|
|
338 |
return $this;
|
339 |
}
|
340 |
|
341 |
-
$amount
|
342 |
-
$attributes
|
343 |
$amountInclTaxes = $weeeHelper->getAmountInclTaxes($attributes);
|
344 |
-
$taxes
|
345 |
-
|
346 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
347 |
// Exclude Weee amount from excluding tax amount
|
348 |
if (!$weeeHelper->typeOfDisplay($_product, array(0, 1, 4))) {
|
349 |
$options['exclDisposition'] = true;
|
@@ -353,5 +376,25 @@ class Mage_Weee_Model_Observer extends Mage_Core_Model_Abstract
|
|
353 |
|
354 |
return $this;
|
355 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
356 |
}
|
357 |
|
24 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
*/
|
26 |
|
27 |
+
/**
|
28 |
+
* Class Mage_Weee_Model_Observer
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_Weee
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
class Mage_Weee_Model_Observer extends Mage_Core_Model_Abstract
|
35 |
{
|
36 |
/**
|
48 |
|
49 |
$attributes = Mage::getSingleton('weee/tax')->getWeeeAttributeCodes(true);
|
50 |
foreach ($attributes as $code) {
|
51 |
+
$weeeTax = $form->getElement($code);
|
52 |
+
if ($weeeTax) {
|
53 |
$weeeTax->setRenderer(
|
54 |
Mage::app()->getLayout()->createBlock('weee/renderer_weee_tax')
|
55 |
);
|
69 |
{
|
70 |
//adminhtml_catalog_product_form_prepare_excluded_field_list
|
71 |
|
72 |
+
$block = $observer->getEvent()->getObject();
|
73 |
+
$list = $block->getFormExcludedFieldList();
|
74 |
$attributes = Mage::getSingleton('weee/tax')->getWeeeAttributeCodes(true);
|
75 |
+
$list = array_merge($list, array_values($attributes));
|
76 |
|
77 |
$block->setFormExcludedFieldList($list);
|
78 |
|
92 |
return $this;
|
93 |
}
|
94 |
|
95 |
+
switch (Mage::helper('weee')->getListPriceDisplayType()) {
|
96 |
case Mage_Weee_Model_Tax::DISPLAY_EXCL_DESCR_INCL:
|
97 |
case Mage_Weee_Model_Tax::DISPLAY_EXCL:
|
98 |
return $this;
|
100 |
|
101 |
/** @var $select Varien_Db_Select */
|
102 |
$select = $observer->getEvent()->getSelect();
|
103 |
+
$table = $observer->getEvent()->getTable();
|
104 |
|
105 |
+
$websiteId = (int)Mage::app()->getStore($storeId)->getWebsiteId();
|
106 |
$customerGroupId = (int)Mage::getSingleton('customer/session')->getCustomerGroupId();
|
107 |
|
108 |
+
$response = $observer->getEvent()->getResponseObject();
|
109 |
$additionalCalculations = $response->getAdditionalCalculations();
|
110 |
|
111 |
$attributes = Mage::getSingleton('weee/tax')->getWeeeAttributeCodes();
|
139 |
/** @var $rateRequest Varien_Object */
|
140 |
$rateRequest = Mage::getSingleton('tax/calculation')->getRateRequest();
|
141 |
|
142 |
+
$attributes = Mage::getSingleton('weee/tax')->getWeeeTaxAttributeCodes();
|
143 |
foreach ($attributes as $attribute) {
|
144 |
$attributeId = (int)Mage::getSingleton('eav/entity_attribute')
|
145 |
->getIdByCode(Mage_Catalog_Model_Product::ENTITY, $attribute);
|
146 |
+
$tableAlias = sprintf('weee_%s_table', $attribute);
|
147 |
$quotedTableAlias = $select->getAdapter()->quoteTableAs($tableAlias, null);
|
148 |
+
$attributeSelect = $this->_getSelect();
|
149 |
$attributeSelect
|
150 |
->from(array($tableAlias => Mage::getSingleton('weee/tax')->getResource()->getTable('weee/tax')))
|
151 |
->where("{$quotedTableAlias}.attribute_id = ?", $attributeId)
|
250 |
public function updateElementTypes(Varien_Event_Observer $observer)
|
251 |
{
|
252 |
$response = $observer->getEvent()->getResponse();
|
253 |
+
$types = $response->getTypes();
|
254 |
$types['weee'] = Mage::getConfig()->getBlockClassName('weee/element_weee_tax');
|
255 |
$response->setTypes($types);
|
256 |
return $this;
|
294 |
}
|
295 |
|
296 |
$response = $observer->getEvent()->getResponseObject();
|
297 |
+
$options = $response->getAdditionalOptions();
|
298 |
|
299 |
$_product = Mage::registry('current_product');
|
300 |
if (!$_product) {
|
301 |
return $this;
|
302 |
}
|
303 |
|
304 |
+
$amount = $weeeHelper->getAmountForDisplay($_product);
|
305 |
+
$origAmount = $weeeHelper->getOriginalAmount($_product);
|
306 |
+
$attributes = $weeeHelper->getProductWeeeAttributes($_product, null, null, null, $weeeHelper->isTaxable());
|
307 |
$amountInclTaxes = $weeeHelper->getAmountInclTaxes($attributes);
|
308 |
+
$taxes = $amountInclTaxes - $amount;
|
309 |
|
310 |
+
if ($weeeHelper->typeOfDisplay($_product, 3)) {
|
311 |
+
// don't show weee as part of the product
|
312 |
+
$options['oldPlusDisposition'] = 0;
|
313 |
+
$options['plusDisposition'] = 0;
|
314 |
+
$options['plusDispositionTax'] = 0;
|
315 |
+
} else {
|
316 |
+
$options['oldPlusDisposition'] = $origAmount;
|
317 |
+
$options['plusDisposition'] = $amount;
|
318 |
+
$options['plusDispositionTax'] = ($taxes < 0) ? 0 : $taxes;
|
319 |
+
}
|
320 |
|
321 |
// Exclude Weee amount from excluding tax amount
|
322 |
if (!$weeeHelper->typeOfDisplay($_product, array(0, 1, 4))) {
|
353 |
return $this;
|
354 |
}
|
355 |
|
356 |
+
$amount = $weeeHelper->getAmountForDisplay($selection);
|
357 |
+
$attributes = $weeeHelper->getProductWeeeAttributes($_product, null, null, null, $weeeHelper->isTaxable());
|
358 |
$amountInclTaxes = $weeeHelper->getAmountInclTaxes($attributes);
|
359 |
+
$taxes = $amountInclTaxes - $amount;
|
360 |
+
|
361 |
+
if ($weeeHelper->typeOfDisplay($_product, 3)) {
|
362 |
+
// don't show weee as part of the product
|
363 |
+
$options['plusDisposition'] = 0;
|
364 |
+
$options['plusDispositionTax'] = 0;
|
365 |
+
} else {
|
366 |
+
$options['plusDisposition'] = $amount;
|
367 |
+
$options['plusDispositionTax'] = ($taxes < 0) ? 0 : $taxes;
|
368 |
+
}
|
369 |
+
|
370 |
// Exclude Weee amount from excluding tax amount
|
371 |
if (!$weeeHelper->typeOfDisplay($_product, array(0, 1, 4))) {
|
372 |
$options['exclDisposition'] = true;
|
376 |
|
377 |
return $this;
|
378 |
}
|
379 |
+
|
380 |
+
/**
|
381 |
+
* Notify weee helper about the admin session quote store when creating order
|
382 |
+
* in the backend
|
383 |
+
*
|
384 |
+
* @param Varien_Event_Observer $observer
|
385 |
+
* @return Mage_Weee_Model_Observer
|
386 |
+
*/
|
387 |
+
public function setSessionQuoteStore(Varien_Event_Observer $observer)
|
388 |
+
{
|
389 |
+
/* @var $weeeHelper Mage_Weee_Helper_Data */
|
390 |
+
$weeeHelper = Mage::helper('weee');
|
391 |
+
|
392 |
+
$sessionQuote = $observer->getEvent()->getSessionQuote();
|
393 |
+
if ($sessionQuote) {
|
394 |
+
$weeeHelper->setStore($sessionQuote->getStore());
|
395 |
+
}
|
396 |
+
|
397 |
+
return $this;
|
398 |
+
}
|
399 |
}
|
400 |
|
app/code/core/Mage/Weee/Model/Tax.php
CHANGED
@@ -24,6 +24,9 @@
|
|
24 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
*/
|
26 |
|
|
|
|
|
|
|
27 |
class Mage_Weee_Model_Tax extends Mage_Core_Model_Abstract
|
28 |
{
|
29 |
/**
|
@@ -43,7 +46,18 @@ class Mage_Weee_Model_Tax extends Mage_Core_Model_Abstract
|
|
43 |
*/
|
44 |
const DISPLAY_EXCL = 3;
|
45 |
|
|
|
|
|
|
|
|
|
|
|
46 |
protected $_allAttributes = null;
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
protected $_productDiscounts = array();
|
48 |
|
49 |
/**
|
@@ -55,6 +69,17 @@ class Mage_Weee_Model_Tax extends Mage_Core_Model_Abstract
|
|
55 |
}
|
56 |
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
public function getWeeeAmount(
|
59 |
$product,
|
60 |
$shipping = null,
|
@@ -78,13 +103,19 @@ class Mage_Weee_Model_Tax extends Mage_Core_Model_Abstract
|
|
78 |
return $amount;
|
79 |
}
|
80 |
|
|
|
|
|
|
|
|
|
|
|
|
|
81 |
public function getWeeeAttributeCodes($forceEnabled = false)
|
82 |
{
|
83 |
return $this->getWeeeTaxAttributeCodes($forceEnabled);
|
84 |
}
|
85 |
|
86 |
/**
|
87 |
-
* Retrieve
|
88 |
*
|
89 |
* @param bool $forceEnabled
|
90 |
* @return array
|
@@ -101,6 +132,17 @@ class Mage_Weee_Model_Tax extends Mage_Core_Model_Abstract
|
|
101 |
return $this->_allAttributes;
|
102 |
}
|
103 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
public function getProductWeeeAttributes(
|
105 |
$product,
|
106 |
$shipping = null,
|
@@ -131,6 +173,14 @@ class Mage_Weee_Model_Tax extends Mage_Core_Model_Abstract
|
|
131 |
$calculator->setCustomer($customer);
|
132 |
}
|
133 |
$rateRequest = $calculator->getRateRequest($shipping, $billing, $customerTaxClass, $store);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
134 |
$defaultRateRequest = $calculator->getRateRequest(false, false, false, $store);
|
135 |
$discountPercent = 0;
|
136 |
|
@@ -166,11 +216,22 @@ class Mage_Weee_Model_Tax extends Mage_Core_Model_Abstract
|
|
166 |
$defaultPercent = Mage::getModel('tax/calculation')
|
167 |
->getRate($defaultRateRequest
|
168 |
->setProductClassId($product->getTaxClassId()));
|
169 |
-
|
170 |
-
if (Mage::helper('
|
171 |
-
$taxAmount = Mage::app()->getStore()
|
|
|
|
|
172 |
} else {
|
173 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
}
|
175 |
}
|
176 |
|
@@ -187,6 +248,12 @@ class Mage_Weee_Model_Tax extends Mage_Core_Model_Abstract
|
|
187 |
return $result;
|
188 |
}
|
189 |
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
protected function _getDiscountPercentForProduct($product)
|
191 |
{
|
192 |
$website = Mage::app()->getStore()->getWebsiteId();
|
@@ -196,8 +263,9 @@ class Mage_Weee_Model_Tax extends Mage_Core_Model_Abstract
|
|
196 |
$this->_productDiscounts[$key] = (int) $this->getResource()
|
197 |
->getProductDiscountPercent($product->getId(), $website, $group);
|
198 |
}
|
199 |
-
|
200 |
-
|
|
|
201 |
} else {
|
202 |
return 0;
|
203 |
}
|
24 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
*/
|
26 |
|
27 |
+
/**
|
28 |
+
* Model to calculate Weee amount
|
29 |
+
*/
|
30 |
class Mage_Weee_Model_Tax extends Mage_Core_Model_Abstract
|
31 |
{
|
32 |
/**
|
46 |
*/
|
47 |
const DISPLAY_EXCL = 3;
|
48 |
|
49 |
+
/**
|
50 |
+
* All weee attributes
|
51 |
+
*
|
52 |
+
* @var array
|
53 |
+
*/
|
54 |
protected $_allAttributes = null;
|
55 |
+
|
56 |
+
/**
|
57 |
+
* Cache product discounts
|
58 |
+
*
|
59 |
+
* @var array
|
60 |
+
*/
|
61 |
protected $_productDiscounts = array();
|
62 |
|
63 |
/**
|
69 |
}
|
70 |
|
71 |
|
72 |
+
/**
|
73 |
+
* Calculate weee amount for a product
|
74 |
+
*
|
75 |
+
* @param Mage_Catalog_Model_Product $product
|
76 |
+
* @param Mage_Customer_Model_Address_Abstract $shipping
|
77 |
+
* @param Mage_Customer_Model_Address_Abstract $billing
|
78 |
+
* @param mixed $website
|
79 |
+
* @param boolean $calculateTax
|
80 |
+
* @param boolean $ignoreDiscount
|
81 |
+
* @return float
|
82 |
+
*/
|
83 |
public function getWeeeAmount(
|
84 |
$product,
|
85 |
$shipping = null,
|
103 |
return $amount;
|
104 |
}
|
105 |
|
106 |
+
/**
|
107 |
+
* Get a list of Weee attribute codes
|
108 |
+
*
|
109 |
+
* @param boolean $forceEnabled
|
110 |
+
* @return array
|
111 |
+
*/
|
112 |
public function getWeeeAttributeCodes($forceEnabled = false)
|
113 |
{
|
114 |
return $this->getWeeeTaxAttributeCodes($forceEnabled);
|
115 |
}
|
116 |
|
117 |
/**
|
118 |
+
* Retrieve Weee tax attribute codes
|
119 |
*
|
120 |
* @param bool $forceEnabled
|
121 |
* @return array
|
132 |
return $this->_allAttributes;
|
133 |
}
|
134 |
|
135 |
+
/**
|
136 |
+
* Get Weee amounts associated with a product
|
137 |
+
*
|
138 |
+
* @param Mage_Catalog_Model_Product $product
|
139 |
+
* @param Mage_Customer_Model_Address_Abstract $shipping
|
140 |
+
* @param Mage_Customer_Model_Address_Abstract $billing
|
141 |
+
* @param mixed $website
|
142 |
+
* @param boolean $calculateTax
|
143 |
+
* @param boolean $ignoreDiscount
|
144 |
+
* @return array|\Varien_Object
|
145 |
+
*/
|
146 |
public function getProductWeeeAttributes(
|
147 |
$product,
|
148 |
$shipping = null,
|
173 |
$calculator->setCustomer($customer);
|
174 |
}
|
175 |
$rateRequest = $calculator->getRateRequest($shipping, $billing, $customerTaxClass, $store);
|
176 |
+
|
177 |
+
$currentPercent = $product->getTaxPercent();
|
178 |
+
|
179 |
+
if (!$currentPercent) {
|
180 |
+
$currentPercent = Mage::getSingleton('tax/calculation')->getRate(
|
181 |
+
$rateRequest->setProductClassId($product->getTaxClassId()));
|
182 |
+
}
|
183 |
+
|
184 |
$defaultRateRequest = $calculator->getRateRequest(false, false, false, $store);
|
185 |
$discountPercent = 0;
|
186 |
|
216 |
$defaultPercent = Mage::getModel('tax/calculation')
|
217 |
->getRate($defaultRateRequest
|
218 |
->setProductClassId($product->getTaxClassId()));
|
219 |
+
|
220 |
+
if (Mage::helper('weee')->isTaxIncluded($store)) {
|
221 |
+
$taxAmount = Mage::app()->getStore()
|
222 |
+
->roundPrice($value / (100 + $defaultPercent) * $currentPercent);
|
223 |
+
$amount = $amount - $taxAmount;
|
224 |
} else {
|
225 |
+
$appliedRates = Mage::getModel('tax/calculation')->getAppliedRates($defaultRateRequest);
|
226 |
+
if (count($appliedRates) > 1) {
|
227 |
+
$taxAmount = 0;
|
228 |
+
foreach ($appliedRates as $appliedRate) {
|
229 |
+
$taxRate = $appliedRate['percent'];
|
230 |
+
$taxAmount += Mage::app()->getStore()->roundPrice($value * $taxRate / 100);
|
231 |
+
}
|
232 |
+
} else {
|
233 |
+
$taxAmount = Mage::app()->getStore()->roundPrice($value * $defaultPercent / 100);
|
234 |
+
}
|
235 |
}
|
236 |
}
|
237 |
|
248 |
return $result;
|
249 |
}
|
250 |
|
251 |
+
/**
|
252 |
+
* Get discount percentage for a product
|
253 |
+
*
|
254 |
+
* @param Mage_Catalog_Model_Product $product
|
255 |
+
* @return int
|
256 |
+
*/
|
257 |
protected function _getDiscountPercentForProduct($product)
|
258 |
{
|
259 |
$website = Mage::app()->getStore()->getWebsiteId();
|
263 |
$this->_productDiscounts[$key] = (int) $this->getResource()
|
264 |
->getProductDiscountPercent($product->getId(), $website, $group);
|
265 |
}
|
266 |
+
$value = $this->_productDiscounts[$key];
|
267 |
+
if ($value) {
|
268 |
+
return 100 - min(100, max(0, $value));
|
269 |
} else {
|
270 |
return 0;
|
271 |
}
|
app/code/core/Mage/Weee/Model/Total/Creditmemo/Weee.php
CHANGED
@@ -34,31 +34,51 @@ class Mage_Weee_Model_Total_Creditmemo_Weee extends Mage_Sales_Model_Order_Credi
|
|
34 |
$totalTax = 0;
|
35 |
$baseTotalTax = 0;
|
36 |
|
|
|
|
|
|
|
37 |
foreach ($creditmemo->getAllItems() as $item) {
|
38 |
if ($item->getOrderItem()->isDummy()) {
|
39 |
continue;
|
40 |
}
|
41 |
$orderItemQty = $item->getOrderItem()->getQtyOrdered();
|
42 |
|
43 |
-
$
|
44 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
$newApplied = array();
|
47 |
$applied = Mage::helper('weee')->getApplied($item);
|
48 |
foreach ($applied as $one) {
|
49 |
-
$one['base_row_amount'] = $one['base_amount']
|
50 |
-
$one['row_amount'] = $one['amount']
|
51 |
-
$one['base_row_amount_incl_tax'] = $one['base_amount_incl_tax']
|
52 |
-
$one['row_amount_incl_tax'] = $one['amount_incl_tax']
|
53 |
|
54 |
$newApplied[] = $one;
|
55 |
}
|
56 |
Mage::helper('weee')->setApplied($item, $newApplied);
|
57 |
|
58 |
-
$item->setWeeeTaxRowDisposition($item->getWeeeTaxDisposition()
|
59 |
-
$item->setBaseWeeeTaxRowDisposition($item->getBaseWeeeTaxDisposition()
|
60 |
}
|
61 |
|
|
|
|
|
|
|
|
|
62 |
if (Mage::helper('weee')->includeInSubtotal($store)) {
|
63 |
$creditmemo->setSubtotal($creditmemo->getSubtotal() + $totalTax);
|
64 |
$creditmemo->setBaseSubtotal($creditmemo->getBaseSubtotal() + $baseTotalTax);
|
@@ -67,6 +87,11 @@ class Mage_Weee_Model_Total_Creditmemo_Weee extends Mage_Sales_Model_Order_Credi
|
|
67 |
$creditmemo->setBaseTaxAmount($creditmemo->getBaseTaxAmount() + $baseTotalTax);
|
68 |
}
|
69 |
|
|
|
|
|
|
|
|
|
|
|
70 |
$creditmemo->setGrandTotal($creditmemo->getGrandTotal() + $totalTax);
|
71 |
$creditmemo->setBaseGrandTotal($creditmemo->getBaseGrandTotal() + $baseTotalTax);
|
72 |
|
34 |
$totalTax = 0;
|
35 |
$baseTotalTax = 0;
|
36 |
|
37 |
+
$weeeTaxAmount = 0;
|
38 |
+
$baseWeeeTaxAmount = 0;
|
39 |
+
|
40 |
foreach ($creditmemo->getAllItems() as $item) {
|
41 |
if ($item->getOrderItem()->isDummy()) {
|
42 |
continue;
|
43 |
}
|
44 |
$orderItemQty = $item->getOrderItem()->getQtyOrdered();
|
45 |
|
46 |
+
$weeeAmountExclTax = (Mage::helper('weee')->getWeeeTaxInclTax($item)
|
47 |
+
- Mage::helper('weee')->getTotalTaxAppliedForWeeeTax($item)
|
48 |
+
- $item->getOrderItem()->getDiscountAppliedForWeeeTax()) * $item->getQty();
|
49 |
+
$totalTax += $weeeAmountExclTax;
|
50 |
+
|
51 |
+
$baseWeeeAmountExclTax = (Mage::helper('weee')->getBaseWeeeTaxInclTax($item)
|
52 |
+
- Mage::helper('weee')->getBaseTotalTaxAppliedForWeeeTax($item)
|
53 |
+
- $item->getOrderItem()->getDiscountAppliedForWeeeTax()) * $item->getQty();
|
54 |
+
$baseTotalTax += $baseWeeeAmountExclTax;
|
55 |
+
|
56 |
+
$item->setWeeeTaxAppliedRowAmount($weeeAmountExclTax);
|
57 |
+
$item->setBaseWeeeTaxAppliedRowAmount($baseWeeeAmountExclTax);
|
58 |
+
|
59 |
+
$weeeTaxAmount += (Mage::helper('weee')->getWeeeTaxInclTax($item)) * $item->getQty();
|
60 |
+
$baseWeeeTaxAmount += (Mage::helper('weee')->getBaseWeeeTaxInclTax($item)) * $item->getQty();
|
61 |
|
62 |
$newApplied = array();
|
63 |
$applied = Mage::helper('weee')->getApplied($item);
|
64 |
foreach ($applied as $one) {
|
65 |
+
$one['base_row_amount'] = $one['base_amount'] * $item->getQty();
|
66 |
+
$one['row_amount'] = $one['amount'] * $item->getQty();
|
67 |
+
$one['base_row_amount_incl_tax'] = $one['base_amount_incl_tax'] * $item->getQty();
|
68 |
+
$one['row_amount_incl_tax'] = $one['amount_incl_tax'] * $item->getQty();
|
69 |
|
70 |
$newApplied[] = $one;
|
71 |
}
|
72 |
Mage::helper('weee')->setApplied($item, $newApplied);
|
73 |
|
74 |
+
$item->setWeeeTaxRowDisposition($item->getWeeeTaxDisposition() * $item->getQty());
|
75 |
+
$item->setBaseWeeeTaxRowDisposition($item->getBaseWeeeTaxDisposition() * $item->getQty());
|
76 |
}
|
77 |
|
78 |
+
/*
|
79 |
+
* please refer the description in weee - invoice section for reasoning
|
80 |
+
*/
|
81 |
+
|
82 |
if (Mage::helper('weee')->includeInSubtotal($store)) {
|
83 |
$creditmemo->setSubtotal($creditmemo->getSubtotal() + $totalTax);
|
84 |
$creditmemo->setBaseSubtotal($creditmemo->getBaseSubtotal() + $baseTotalTax);
|
87 |
$creditmemo->setBaseTaxAmount($creditmemo->getBaseTaxAmount() + $baseTotalTax);
|
88 |
}
|
89 |
|
90 |
+
//Increment the subtotal
|
91 |
+
$creditmemo->setSubtotalInclTax($creditmemo->getSubtotalInclTax() + $weeeTaxAmount);
|
92 |
+
$creditmemo->setBaseSubtotalInclTax($creditmemo->getBaseSubtotalInclTax() + $baseWeeeTaxAmount);
|
93 |
+
|
94 |
+
//Increment the grand total
|
95 |
$creditmemo->setGrandTotal($creditmemo->getGrandTotal() + $totalTax);
|
96 |
$creditmemo->setBaseGrandTotal($creditmemo->getBaseGrandTotal() + $baseTotalTax);
|
97 |
|
app/code/core/Mage/Weee/Model/Total/Invoice/Weee.php
CHANGED
@@ -39,6 +39,8 @@ class Mage_Weee_Model_Total_Invoice_Weee extends Mage_Sales_Model_Order_Invoice_
|
|
39 |
|
40 |
$totalTax = 0;
|
41 |
$baseTotalTax = 0;
|
|
|
|
|
42 |
|
43 |
foreach ($invoice->getAllItems() as $item) {
|
44 |
$orderItem = $item->getOrderItem();
|
@@ -51,6 +53,9 @@ class Mage_Weee_Model_Total_Invoice_Weee extends Mage_Sales_Model_Order_Invoice_
|
|
51 |
$weeeTaxAmount = $item->getWeeeTaxAppliedAmount() * $item->getQty();
|
52 |
$baseWeeeTaxAmount = $item->getBaseWeeeTaxAppliedAmount() * $item->getQty();
|
53 |
|
|
|
|
|
|
|
54 |
$item->setWeeeTaxAppliedRowAmount($weeeTaxAmount);
|
55 |
$item->setBaseWeeeTaxAppliedRowAmount($baseWeeeTaxAmount);
|
56 |
$newApplied = array();
|
@@ -70,6 +75,9 @@ class Mage_Weee_Model_Total_Invoice_Weee extends Mage_Sales_Model_Order_Invoice_
|
|
70 |
|
71 |
$totalTax += $weeeTaxAmount;
|
72 |
$baseTotalTax += $baseWeeeTaxAmount;
|
|
|
|
|
|
|
73 |
}
|
74 |
|
75 |
/*
|
@@ -100,6 +108,11 @@ class Mage_Weee_Model_Total_Invoice_Weee extends Mage_Sales_Model_Order_Invoice_
|
|
100 |
$invoice->setBaseTaxAmount($invoice->getBaseTaxAmount() + $baseTotalTax);
|
101 |
}
|
102 |
|
|
|
|
|
|
|
|
|
|
|
103 |
$invoice->setGrandTotal($invoice->getGrandTotal() + $totalTax);
|
104 |
$invoice->setBaseGrandTotal($invoice->getBaseGrandTotal() + $baseTotalTax);
|
105 |
|
39 |
|
40 |
$totalTax = 0;
|
41 |
$baseTotalTax = 0;
|
42 |
+
$weeeInclTax = 0;
|
43 |
+
$baseWeeeInclTax = 0;
|
44 |
|
45 |
foreach ($invoice->getAllItems() as $item) {
|
46 |
$orderItem = $item->getOrderItem();
|
53 |
$weeeTaxAmount = $item->getWeeeTaxAppliedAmount() * $item->getQty();
|
54 |
$baseWeeeTaxAmount = $item->getBaseWeeeTaxAppliedAmount() * $item->getQty();
|
55 |
|
56 |
+
$weeeTaxAmountInclTax = Mage::helper('weee')->getWeeeTaxInclTax($item) * $item->getQty();
|
57 |
+
$baseWeeeTaxAmountInclTax = Mage::helper('weee')->getBaseWeeeTaxInclTax($item) * $item->getQty();
|
58 |
+
|
59 |
$item->setWeeeTaxAppliedRowAmount($weeeTaxAmount);
|
60 |
$item->setBaseWeeeTaxAppliedRowAmount($baseWeeeTaxAmount);
|
61 |
$newApplied = array();
|
75 |
|
76 |
$totalTax += $weeeTaxAmount;
|
77 |
$baseTotalTax += $baseWeeeTaxAmount;
|
78 |
+
|
79 |
+
$weeeInclTax += $weeeTaxAmountInclTax;
|
80 |
+
$baseWeeeInclTax += $baseWeeeTaxAmountInclTax;
|
81 |
}
|
82 |
|
83 |
/*
|
108 |
$invoice->setBaseTaxAmount($invoice->getBaseTaxAmount() + $baseTotalTax);
|
109 |
}
|
110 |
|
111 |
+
if (!$invoice->isLast()) {
|
112 |
+
$invoice->setSubtotalInclTax($invoice->getSubtotalInclTax() + $weeeInclTax);
|
113 |
+
$invoice->setBaseSubtotalInclTax($invoice->getBaseSubtotalInclTax() + $baseWeeeInclTax);
|
114 |
+
}
|
115 |
+
|
116 |
$invoice->setGrandTotal($invoice->getGrandTotal() + $totalTax);
|
117 |
$invoice->setBaseGrandTotal($invoice->getBaseGrandTotal() + $baseTotalTax);
|
118 |
|
app/code/core/Mage/Weee/Model/Total/Quote/Weee.php
CHANGED
@@ -90,6 +90,8 @@ class Mage_Weee_Model_Total_Quote_Weee extends Mage_Tax_Model_Sales_Total_Quote_
|
|
90 |
$address->setAppliedTaxes(array());
|
91 |
|
92 |
$this->_store = $address->getQuote()->getStore();
|
|
|
|
|
93 |
foreach ($items as $item) {
|
94 |
if ($item->getParentItemId()) {
|
95 |
continue;
|
@@ -137,72 +139,130 @@ class Mage_Weee_Model_Total_Quote_Weee extends Mage_Tax_Model_Sales_Total_Quote_
|
|
137 |
$applied = array();
|
138 |
$productTaxes = array();
|
139 |
|
140 |
-
$totalValue
|
141 |
-
$baseTotalValue
|
142 |
-
$totalRowValue
|
143 |
-
$baseTotalRowValue
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
|
145 |
foreach ($attributes as $k => $attribute) {
|
146 |
-
$baseValue
|
147 |
-
$
|
148 |
-
$rowValue = $value*$item->getTotalQty();
|
149 |
-
$baseRowValue = $baseValue*$item->getTotalQty();
|
150 |
-
$title = $attribute->getName();
|
151 |
|
152 |
-
$
|
153 |
-
|
154 |
-
|
155 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
|
157 |
$productTaxes[] = array(
|
158 |
-
'title'
|
159 |
-
'base_amount'
|
160 |
-
'amount'
|
161 |
-
'row_amount'
|
162 |
-
'base_row_amount' => $
|
163 |
/**
|
164 |
* Tax value can't be presented as include/exclude tax
|
165 |
*/
|
166 |
-
'base_amount_incl_tax'
|
167 |
-
'amount_incl_tax'
|
168 |
-
'row_amount_incl_tax'
|
169 |
-
'base_row_amount_incl_tax'
|
170 |
);
|
171 |
|
172 |
$applied[] = array(
|
173 |
-
'id'
|
174 |
-
'percent'
|
175 |
-
'hidden'
|
176 |
-
'rates'
|
177 |
'base_real_amount' => $baseRowValue,
|
178 |
-
'base_amount'
|
179 |
-
'amount'
|
180 |
-
'code'
|
181 |
-
'title'
|
182 |
-
'percent'
|
183 |
-
'position'
|
184 |
-
'priority'
|
185 |
))
|
186 |
);
|
187 |
}
|
188 |
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
|
|
193 |
|
194 |
-
$this->_processTaxSettings($item, $
|
195 |
-
|
|
|
196 |
|
197 |
$this->_helper->setApplied($item, array_merge($this->_helper->getApplied($item), $productTaxes));
|
198 |
if ($applied) {
|
199 |
$this->_saveAppliedTaxes($address, $applied,
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
);
|
204 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
206 |
}
|
207 |
|
208 |
/**
|
@@ -241,7 +301,8 @@ class Mage_Weee_Model_Total_Quote_Weee extends Mage_Tax_Model_Sales_Total_Quote_
|
|
241 |
->unsPriceInclTax()
|
242 |
->unsBasePriceInclTax();
|
243 |
}
|
244 |
-
if ($this->_helper->isTaxable($this->_store)
|
|
|
245 |
if (!$this->_helper->includeInSubtotal($this->_store)) {
|
246 |
$item->setExtraTaxableAmount($value)
|
247 |
->setBaseExtraTaxableAmount($baseValue)
|
@@ -552,6 +613,37 @@ class Mage_Weee_Model_Total_Quote_Weee extends Mage_Tax_Model_Sales_Total_Quote_
|
|
552 |
}
|
553 |
}
|
554 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
555 |
/**
|
556 |
* No aggregated label for fixed product tax
|
557 |
*
|
90 |
$address->setAppliedTaxes(array());
|
91 |
|
92 |
$this->_store = $address->getQuote()->getStore();
|
93 |
+
$this->_helper->setStore($this->_store);
|
94 |
+
|
95 |
foreach ($items as $item) {
|
96 |
if ($item->getParentItemId()) {
|
97 |
continue;
|
139 |
$applied = array();
|
140 |
$productTaxes = array();
|
141 |
|
142 |
+
$totalValue = 0;
|
143 |
+
$baseTotalValue = 0;
|
144 |
+
$totalRowValue = 0;
|
145 |
+
$baseTotalRowValue = 0;
|
146 |
+
|
147 |
+
$totalExclTaxValue = 0;
|
148 |
+
$baseTotalExclTaxValue = 0;
|
149 |
+
$totalExclTaxRowValue = 0;
|
150 |
+
$baseTotalExclTaxRowValue = 0;
|
151 |
+
|
152 |
+
$customerRatePercentage = $this->_customerRatePercent($address,$item);
|
153 |
|
154 |
foreach ($attributes as $k => $attribute) {
|
155 |
+
$baseValue = $attribute->getAmount();
|
156 |
+
$baseValueExclTax = $baseValue;
|
|
|
|
|
|
|
157 |
|
158 |
+
if ($customerRatePercentage && $this->_helper->isTaxIncluded($this->_store)) {
|
159 |
+
//Remove the customer tax. This in general applies to EU scenario
|
160 |
+
$baseValueExclTax
|
161 |
+
= $this->_getCalculator()->round(($baseValue * 100) / (100 + $customerRatePercentage));
|
162 |
+
}
|
163 |
+
|
164 |
+
$value = $this->_store->convertPrice($baseValue);
|
165 |
+
$rowValue = $value * $item->getTotalQty();
|
166 |
+
$baseRowValue = $baseValue * $item->getTotalQty();
|
167 |
+
|
168 |
+
//Get the values excluding tax
|
169 |
+
$valueExclTax = $this->_store->convertPrice($baseValueExclTax);
|
170 |
+
$rowValueExclTax = $valueExclTax * $item->getTotalQty();
|
171 |
+
$baseRowValueExclTax = $baseValueExclTax * $item->getTotalQty();
|
172 |
+
|
173 |
+
$title = $attribute->getName();
|
174 |
+
|
175 |
+
//Calculate the Wee value
|
176 |
+
$totalValue += $value;
|
177 |
+
$baseTotalValue += $baseValue;
|
178 |
+
$totalRowValue += $rowValue;
|
179 |
+
$baseTotalRowValue += $baseRowValue;
|
180 |
+
|
181 |
+
//Calculate the Wee without tax
|
182 |
+
$totalExclTaxValue += $valueExclTax;
|
183 |
+
$baseTotalExclTaxValue += $baseValueExclTax;
|
184 |
+
$totalExclTaxRowValue += $rowValueExclTax;
|
185 |
+
$baseTotalExclTaxRowValue += $baseRowValueExclTax;
|
186 |
+
|
187 |
+
/*
|
188 |
+
* Note: including Tax does not necessarily mean it includes all the tax
|
189 |
+
* *_incl_tax only holds the tax associated with Tax included products
|
190 |
+
*/
|
191 |
|
192 |
$productTaxes[] = array(
|
193 |
+
'title' => $title,
|
194 |
+
'base_amount' => $baseValueExclTax,
|
195 |
+
'amount' => $valueExclTax,
|
196 |
+
'row_amount' => $rowValueExclTax,
|
197 |
+
'base_row_amount' => $baseRowValueExclTax,
|
198 |
/**
|
199 |
* Tax value can't be presented as include/exclude tax
|
200 |
*/
|
201 |
+
'base_amount_incl_tax' => $baseValue,
|
202 |
+
'amount_incl_tax' => $value,
|
203 |
+
'row_amount_incl_tax' => $rowValue,
|
204 |
+
'base_row_amount_incl_tax' => $baseRowValue,
|
205 |
);
|
206 |
|
207 |
$applied[] = array(
|
208 |
+
'id' => $attribute->getCode(),
|
209 |
+
'percent' => null,
|
210 |
+
'hidden' => $this->_helper->includeInSubtotal($this->_store),
|
211 |
+
'rates' => array(array(
|
212 |
'base_real_amount' => $baseRowValue,
|
213 |
+
'base_amount' => $baseRowValue,
|
214 |
+
'amount' => $rowValue,
|
215 |
+
'code' => $attribute->getCode(),
|
216 |
+
'title' => $title,
|
217 |
+
'percent' => null,
|
218 |
+
'position' => 1,
|
219 |
+
'priority' => -1000 + $k,
|
220 |
))
|
221 |
);
|
222 |
}
|
223 |
|
224 |
+
//We set the TAX exclusive value
|
225 |
+
$item->setWeeeTaxAppliedAmount($totalExclTaxValue);
|
226 |
+
$item->setBaseWeeeTaxAppliedAmount($baseTotalExclTaxValue);
|
227 |
+
$item->setWeeeTaxAppliedRowAmount($totalExclTaxRowValue);
|
228 |
+
$item->setBaseWeeeTaxAppliedRowAmount($baseTotalExclTaxRowValue);
|
229 |
|
230 |
+
$this->_processTaxSettings($item, $totalExclTaxValue, $baseTotalExclTaxValue,
|
231 |
+
$totalExclTaxRowValue, $baseTotalExclTaxRowValue)
|
232 |
+
->_processTotalAmount($address, $totalExclTaxRowValue, $baseTotalExclTaxRowValue);
|
233 |
|
234 |
$this->_helper->setApplied($item, array_merge($this->_helper->getApplied($item), $productTaxes));
|
235 |
if ($applied) {
|
236 |
$this->_saveAppliedTaxes($address, $applied,
|
237 |
+
$item->getWeeeTaxAppliedAmount(),
|
238 |
+
$item->getBaseWeeeTaxAppliedAmount(),
|
239 |
+
null
|
240 |
);
|
241 |
}
|
242 |
+
}
|
243 |
+
|
244 |
+
/**
|
245 |
+
* Get the default store rate
|
246 |
+
*
|
247 |
+
* @param Mage_Sales_Model_Quote_Address $address
|
248 |
+
* @param Mage_Sales_Model_Quote_Item_Abstract $item
|
249 |
+
* @return mixed
|
250 |
+
*/
|
251 |
+
protected function _customerRatePercent($address, $item)
|
252 |
+
{
|
253 |
+
$taxCalculationModel = Mage::getSingleton('tax/calculation');
|
254 |
|
255 |
+
$request = $taxCalculationModel->getRateRequest(
|
256 |
+
$address,
|
257 |
+
$address->getQuote()->getBillingAddress(),
|
258 |
+
$address->getQuote()->getCustomerTaxClassId(),
|
259 |
+
$this->_store
|
260 |
+
);
|
261 |
+
|
262 |
+
$customerRatePercentage = $taxCalculationModel->getRate(
|
263 |
+
$request->setProductClassId($item->getProduct()->getTaxClassId())
|
264 |
+
);
|
265 |
+
return $customerRatePercentage;
|
266 |
}
|
267 |
|
268 |
/**
|
301 |
->unsPriceInclTax()
|
302 |
->unsBasePriceInclTax();
|
303 |
}
|
304 |
+
if ($this->_helper->isTaxable($this->_store)
|
305 |
+
&& !$this->_helper->isTaxIncluded($this->_store) && $rowValue) {
|
306 |
if (!$this->_helper->includeInSubtotal($this->_store)) {
|
307 |
$item->setExtraTaxableAmount($value)
|
308 |
->setBaseExtraTaxableAmount($baseValue)
|
613 |
}
|
614 |
}
|
615 |
|
616 |
+
/**
|
617 |
+
* Returns the model for calculation
|
618 |
+
*
|
619 |
+
* @return Mage_Tax_Model_Calculation
|
620 |
+
*/
|
621 |
+
protected function _getCalculator()
|
622 |
+
{
|
623 |
+
return Mage::getSingleton('tax/calculation');
|
624 |
+
}
|
625 |
+
|
626 |
+
/**
|
627 |
+
* Set the helper object.
|
628 |
+
*
|
629 |
+
* @param Mage_Weee_Helper_Data $helper
|
630 |
+
*/
|
631 |
+
public function setHelper($helper)
|
632 |
+
{
|
633 |
+
$this->_helper = $helper;
|
634 |
+
}
|
635 |
+
|
636 |
+
|
637 |
+
/**
|
638 |
+
* Set the store Object
|
639 |
+
*
|
640 |
+
* @param Mage_Core_Model_Store $store
|
641 |
+
*/
|
642 |
+
public function setStore($store)
|
643 |
+
{
|
644 |
+
$this->_store = $store;
|
645 |
+
}
|
646 |
+
|
647 |
/**
|
648 |
* No aggregated label for fixed product tax
|
649 |
*
|
app/code/core/Mage/Weee/etc/config.xml
CHANGED
@@ -106,6 +106,22 @@
|
|
106 |
</weee>
|
107 |
</observers>
|
108 |
</bundle_product_view_config>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
</events>
|
110 |
<fieldsets>
|
111 |
<sales_convert_quote_item>
|
@@ -196,8 +212,7 @@
|
|
196 |
<totals>
|
197 |
<weee>
|
198 |
<class>weee/total_invoice_weee</class>
|
199 |
-
<after>subtotal,tax,discount,grand_total,cost_total</after>
|
200 |
-
<before>shipping</before>
|
201 |
</weee>
|
202 |
</totals>
|
203 |
</order_invoice>
|
@@ -206,7 +221,7 @@
|
|
206 |
<weee>
|
207 |
<class>weee/total_creditmemo_weee</class>
|
208 |
<after>subtotal</after>
|
209 |
-
<before>
|
210 |
</weee>
|
211 |
</totals>
|
212 |
</order_creditmemo>
|
106 |
</weee>
|
107 |
</observers>
|
108 |
</bundle_product_view_config>
|
109 |
+
<create_order_session_quote_initialized>
|
110 |
+
<observers>
|
111 |
+
<weee>
|
112 |
+
<class>weee/observer</class>
|
113 |
+
<method>setSessionQuoteStore</method>
|
114 |
+
</weee>
|
115 |
+
</observers>
|
116 |
+
</create_order_session_quote_initialized>
|
117 |
+
<init_from_order_session_quote_initialized>
|
118 |
+
<observers>
|
119 |
+
<weee>
|
120 |
+
<class>weee/observer</class>
|
121 |
+
<method>setSessionQuoteStore</method>
|
122 |
+
</weee>
|
123 |
+
</observers>
|
124 |
+
</init_from_order_session_quote_initialized>
|
125 |
</events>
|
126 |
<fieldsets>
|
127 |
<sales_convert_quote_item>
|
212 |
<totals>
|
213 |
<weee>
|
214 |
<class>weee/total_invoice_weee</class>
|
215 |
+
<after>subtotal,tax,discount,grand_total,cost_total,shipping</after>
|
|
|
216 |
</weee>
|
217 |
</totals>
|
218 |
</order_invoice>
|
221 |
<weee>
|
222 |
<class>weee/total_creditmemo_weee</class>
|
223 |
<after>subtotal</after>
|
224 |
+
<before>tax,discount,grand_total</before>
|
225 |
</weee>
|
226 |
</totals>
|
227 |
</order_creditmemo>
|
app/code/core/Mage/Weee/etc/system.xml
CHANGED
@@ -91,9 +91,9 @@
|
|
91 |
<show_in_store>0</show_in_store>
|
92 |
</discount>
|
93 |
<apply_vat translate="label">
|
94 |
-
<label>
|
95 |
<frontend_type>select</frontend_type>
|
96 |
-
<source_model>
|
97 |
<sort_order>60</sort_order>
|
98 |
<show_in_default>1</show_in_default>
|
99 |
<show_in_website>1</show_in_website>
|
91 |
<show_in_store>0</show_in_store>
|
92 |
</discount>
|
93 |
<apply_vat translate="label">
|
94 |
+
<label>FPT Tax Configuration</label>
|
95 |
<frontend_type>select</frontend_type>
|
96 |
+
<source_model>weee/config_source_fpt_tax</source_model>
|
97 |
<sort_order>60</sort_order>
|
98 |
<show_in_default>1</show_in_default>
|
99 |
<show_in_website>1</show_in_website>
|
app/code/core/Mage/Wishlist/Controller/Abstract.php
CHANGED
@@ -73,10 +73,15 @@ abstract class Mage_Wishlist_Controller_Abstract extends Mage_Core_Controller_Fr
|
|
73 |
*/
|
74 |
public function allcartAction()
|
75 |
{
|
|
|
|
|
|
|
|
|
|
|
76 |
$wishlist = $this->_getWishlist();
|
77 |
if (!$wishlist) {
|
78 |
$this->_forward('noRoute');
|
79 |
-
return
|
80 |
}
|
81 |
$isOwner = $wishlist->isOwner(Mage::getSingleton('customer/session')->getCustomerId());
|
82 |
|
@@ -89,7 +94,9 @@ abstract class Mage_Wishlist_Controller_Abstract extends Mage_Core_Controller_Fr
|
|
89 |
$collection = $wishlist->getItemCollection()
|
90 |
->setVisibilityFilter();
|
91 |
|
92 |
-
$
|
|
|
|
|
93 |
foreach ($collection as $item) {
|
94 |
/** @var Mage_Wishlist_Model_Item */
|
95 |
try {
|
@@ -117,6 +124,11 @@ abstract class Mage_Wishlist_Controller_Abstract extends Mage_Core_Controller_Fr
|
|
117 |
} else {
|
118 |
$messages[] = $this->__('%s for "%s".', trim($e->getMessage(), '.'), $item->getProduct()->getName());
|
119 |
}
|
|
|
|
|
|
|
|
|
|
|
120 |
} catch (Exception $e) {
|
121 |
Mage::logException($e);
|
122 |
$messages[] = Mage::helper('wishlist')->__('Cannot add the item to shopping cart.');
|
@@ -187,9 +199,10 @@ abstract class Mage_Wishlist_Controller_Abstract extends Mage_Core_Controller_Fr
|
|
187 |
Mage::getSingleton('checkout/session')->addSuccess(
|
188 |
Mage::helper('wishlist')->__('%d product(s) have been added to shopping cart: %s.', count($addedItems), join(', ', $products))
|
189 |
);
|
|
|
|
|
|
|
190 |
}
|
191 |
-
// save cart and collect totals
|
192 |
-
$cart->save()->getQuote()->collectTotals();
|
193 |
|
194 |
Mage::helper('wishlist')->calculate();
|
195 |
|
73 |
*/
|
74 |
public function allcartAction()
|
75 |
{
|
76 |
+
if (!$this->_validateFormKey()) {
|
77 |
+
$this->_forward('noRoute');
|
78 |
+
return;
|
79 |
+
}
|
80 |
+
|
81 |
$wishlist = $this->_getWishlist();
|
82 |
if (!$wishlist) {
|
83 |
$this->_forward('noRoute');
|
84 |
+
return;
|
85 |
}
|
86 |
$isOwner = $wishlist->isOwner(Mage::getSingleton('customer/session')->getCustomerId());
|
87 |
|
94 |
$collection = $wishlist->getItemCollection()
|
95 |
->setVisibilityFilter();
|
96 |
|
97 |
+
$qtysString = $this->getRequest()->getParam('qty');
|
98 |
+
$qtys = array_filter(json_decode($qtysString), 'strlen');
|
99 |
+
|
100 |
foreach ($collection as $item) {
|
101 |
/** @var Mage_Wishlist_Model_Item */
|
102 |
try {
|
124 |
} else {
|
125 |
$messages[] = $this->__('%s for "%s".', trim($e->getMessage(), '.'), $item->getProduct()->getName());
|
126 |
}
|
127 |
+
|
128 |
+
$cartItem = $cart->getQuote()->getItemByProduct($item->getProduct());
|
129 |
+
if ($cartItem) {
|
130 |
+
$cart->getQuote()->deleteItem($cartItem);
|
131 |
+
}
|
132 |
} catch (Exception $e) {
|
133 |
Mage::logException($e);
|
134 |
$messages[] = Mage::helper('wishlist')->__('Cannot add the item to shopping cart.');
|
199 |
Mage::getSingleton('checkout/session')->addSuccess(
|
200 |
Mage::helper('wishlist')->__('%d product(s) have been added to shopping cart: %s.', count($addedItems), join(', ', $products))
|
201 |
);
|
202 |
+
|
203 |
+
// save cart and collect totals
|
204 |
+
$cart->save()->getQuote()->collectTotals();
|
205 |
}
|
|
|
|
|
206 |
|
207 |
Mage::helper('wishlist')->calculate();
|
208 |
|
app/code/core/Mage/Wishlist/Helper/Data.php
CHANGED
@@ -367,7 +367,7 @@ class Mage_Wishlist_Helper_Data extends Mage_Core_Helper_Abstract
|
|
367 |
}
|
368 |
|
369 |
/**
|
370 |
-
* Retrieve URL for adding item to
|
371 |
*
|
372 |
* @param string|Mage_Catalog_Model_Product|Mage_Wishlist_Model_Item $item
|
373 |
* @return string
|
367 |
}
|
368 |
|
369 |
/**
|
370 |
+
* Retrieve URL for adding item to shopping cart
|
371 |
*
|
372 |
* @param string|Mage_Catalog_Model_Product|Mage_Wishlist_Model_Item $item
|
373 |
* @return string
|
cron.php
CHANGED
@@ -24,6 +24,9 @@
|
|
24 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
*/
|
26 |
|
|
|
|
|
|
|
27 |
require 'app/Mage.php';
|
28 |
|
29 |
if (!Mage::isInstalled()) {
|
24 |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
25 |
*/
|
26 |
|
27 |
+
// Change current directory to the directory of current script
|
28 |
+
chdir(dirname(__FILE__));
|
29 |
+
|
30 |
require 'app/Mage.php';
|
31 |
|
32 |
if (!Mage::isInstalled()) {
|
errors/design.xml
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<!--
|
3 |
/**
|
4 |
-
* Magento
|
5 |
*
|
6 |
* NOTICE OF LICENSE
|
7 |
*
|
8 |
-
* This source file is subject to the
|
9 |
-
* that is bundled with this package in the file
|
10 |
* It is also available through the world-wide-web at this URL:
|
11 |
-
* http://
|
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.
|
@@ -22,7 +22,7 @@
|
|
22 |
* @category Mage
|
23 |
* @package Errors
|
24 |
* @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
|
25 |
-
* @license http://
|
26 |
*/
|
27 |
-->
|
28 |
<config>
|
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.
|
22 |
* @category Mage
|
23 |
* @package Errors
|
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>
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Mage_Core_Modules</name>
|
4 |
-
<version>1.8.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Collection of Magento Core Modules</summary>
|
10 |
<description>Collection of Magento Core Modules</description>
|
11 |
-
<notes>1.8.
|
12 |
<authors><author><name>Magento Core Team</name><user>core</user><email>core@magentocommerce.com</email></author></authors>
|
13 |
-
<date>2013-09-24</date>
|
14 |
-
<time>09:09:45</time>
|
15 |
-
<contents><target name="magecore"><dir name="Mage"><dir name="Admin"><dir name="data"><dir name="admin_setup"><file name="data-install-1.6.0.0.php" hash="145a2a947b022b4fb4c38131b76dd943"/></dir></dir><dir name="etc"><file name="config.xml" hash="caad1e5653e24067c18bbed08e61c61b"/></dir><dir name="Helper"><file name="Data.php" hash="668d3fe6b16e2eb92dcf30910e0a01d3"/></dir><dir name="Model"><dir name="Acl"><dir name="Assert"><file name="Ip.php" hash="09ca9f02dbbe8b2fb6d62ba287e5d1f5"/><file name="Time.php" hash="9f6fbafa1161abcecd883044b5688a3e"/></dir><file name="Resource.php" hash="a4658b7f68bfd400f1f514eee6b8a822"/><dir name="Role"><file name="Generic.php" hash="042ca3f0a8e902fa64856f4787b6979c"/><file name="Group.php" hash="e196e83a26393d1047cc3c0589331d6a"/><file name="Registry.php" hash="327f2e1e7999037d189f03fcb5e3c581"/><file name="User.php" hash="f7da37ae0cf2dc9f3c0a017a9b2f2119"/></dir><file name="Role.php" hash="e77178106cbcd931ce251495ac086a92"/></dir><file name="Acl.php" hash="7eeaad0d0d98c70911e55042198040d4"/><file name="Config.php" hash="8e528a2b4dfe6776b7102b3c5ecc3590"/><dir name="Mysql4"><dir name="Acl"><dir name="Role"><file name="Collection.php" hash="a5b81d0dff9fc0b929acf5f073fd428a"/></dir><file name="Role.php" hash="6e8bdbb010cc9b1efc45aa974445309e"/></dir><file name="Acl.php" hash="d321bc784428a5e168791e922f015895"/><dir name="Permissions"><file name="Collection.php" hash="fea132672160416132d69320e533ada2"/></dir><dir name="Role"><file name="Collection.php" hash="f09e5dd5edc1b4263b40f74a4e2719e4"/></dir><file name="Role.php" hash="fd55f2cdd8c0f9f8d89380d823dccaa0"/><dir name="Roles"><file name="Collection.php" hash="eb17bb1e70e56317bd17de2305021701"/><dir name="User"><file name="Collection.php" hash="b203780708193eccb6493a81ecad86c4"/></dir></dir><file name="Roles.php" hash="9e178b69ee60bb1179654fcdcc23bb9c"/><dir name="Rules"><file name="Collection.php" hash="ea803529fd9ef2e48e6feab01cd3a279"/></dir><file name="Rules.php" hash="7901e937e2f7da7d4e7eb4c93cd0ac05"/><dir name="User"><file name="Collection.php" hash="132b6cc8832b4b41c87444c69c823995"/></dir><file name="User.php" hash="db76170b2f03aa18526d9b97292ca8df"/></dir><file name="Observer.php" hash="c6aa2d5d3c5ea95645a1af5892da255f"/><dir name="Resource"><dir name="Acl"><dir name="Role"><file name="Collection.php" hash="d0adfc1d049205c338133e8bf68fa1e7"/></dir><file name="Role.php" hash="deea95ad0a7f10af2aa4c947560db5d5"/></dir><file name="Acl.php" hash="82f85e03260d9830ff91e972175a7ca3"/><dir name="Permissions"><file name="Collection.php" hash="79b202930881903afbca9ab7157fc65c"/></dir><dir name="Role"><file name="Collection.php" hash="96d2d7ac5d047e27be15f8b6e4176bb5"/></dir><file name="Role.php" hash="288f6fbaf9facbd576f5a51369750c07"/><dir name="Roles"><file name="Collection.php" hash="3099d94db4e9cf48a968cdd1255542b0"/><dir name="User"><file name="Collection.php" hash="b2fdf6252412264c1fc91fa49c9e8734"/></dir></dir><file name="Roles.php" hash="c98c7036dbc5020e660bdd63202bc588"/><dir name="Rules"><file name="Collection.php" hash="dae98d63254bfea24c35df3721167301"/></dir><file name="Rules.php" hash="98f0675056e03a40bff735697a9b7b91"/><dir name="User"><file name="Collection.php" hash="db9d4080c147be6243635958bd6c7a5c"/></dir><file name="User.php" hash="99705a0518dd1d094f98b27e83b5a577"/></dir><file name="Role.php" hash="45fda2123797cb25f43373a164f90a8c"/><file name="Roles.php" hash="1b17350bed603de4ad41fba3c1871ab4"/><file name="Rules.php" hash="0d5634ad56eaa2ba6595890f6684c4a3"/><file name="Session.php" hash="38d89a1366a458ce79b2cd6fb8c32d6f"/><file name="User.php" hash="41b3e013c5f2de84611e7e8b830f23da"/></dir><dir name="sql"><dir name="admin_setup"><file name="install-1.6.0.0.php" hash="25f5d7648d1a665394c54873d9e910af"/><file name="mysql4-install-0.7.0.php" hash="45ce399e8df548c998c0ceca281e0208"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="2311e2793599ce5a3d09d112f117c404"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="288aafaeec8cbac3a2d5dbd440d889fb"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="867643eb4a5bf049cbdb165e3b786f5e"/><file name="upgrade-1.6.0.0-1.6.1.0.php" hash="849eff25332a59a55d3951e4ccf267c3"/><file name="upgrade-1.6.1.0-1.6.1.1.php" hash="bd73aa097ca356c7dcbfcde5652e8883"/></dir></dir></dir><dir name="AdminNotification"><dir name="etc"><file name="adminhtml.xml" hash="86e3bacfe609ee63353e260347c0c2bd"/><file name="config.xml" hash="9f82ab304a52b8bcf653a75916a23fcc"/><file name="system.xml" hash="e4457f70e46e2b685c4ce30783dbc07a"/></dir><dir name="Helper"><file name="Data.php" hash="7f253422718144321f3f7a994dddf326"/></dir><dir name="Model"><file name="Feed.php" hash="db6d04052177d3e6dd6685ca80b78078"/><file name="Inbox.php" hash="533804c7b223c269421c05ef2b40e8a5"/><dir name="Mysql4"><dir name="Inbox"><file name="Collection.php" hash="fee472f0f76d7722490fb52c3191e36f"/></dir><file name="Inbox.php" hash="c454f8b9cd5c8838462a76285cbf9bb6"/></dir><file name="Observer.php" hash="b9906fad6abfa189e53355429aa27f19"/><dir name="Resource"><dir name="Inbox"><file name="Collection.php" hash="e3500364d4438fc9c96064cfb700c168"/></dir><file name="Inbox.php" hash="b6000b4c25af36bacf2494a93044f018"/></dir><file name="Survey.php" hash="97453ac8be654cf8a3393c43c3fcb692"/></dir><dir name="sql"><dir name="adminnotification_setup"><file name="install-1.6.0.0.php" hash="14bc50375fb60e7e4564188cc53bb2d7"/><file name="mysql4-install-1.0.0.php" hash="4aa462c6c1c4e7b5c348f99100858893"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="03def0c5cee75fcc6a78a035d79f46dd"/></dir></dir></dir><dir name="Api"><dir name="Controller"><file name="Action.php" hash="a8f3b2058a3bad4b0d352fc82586d3ef"/></dir><dir name="controllers"><file name="IndexController.php" hash="a6874a1a8ed50b6198897047ddde5120"/><file name="SoapController.php" hash="32eaa0e1d452aa8e6195b009fedc7a3a"/><dir name="V2"><file name="SoapController.php" hash="f8e468005f5106cd51b965bfd52c87c1"/></dir><file name="XmlrpcController.php" hash="2c38549c96d7b51953d853bd937d0925"/></dir><dir name="etc"><file name="adminhtml.xml" hash="6a38418261fef5893bd8d9170a4d046d"/><file name="api.xml" hash="e91e9705af4246e6307c27ff7d9885bf"/><file name="config.xml" hash="57a0da8d7925a5353d45b1ad192309d0"/><file name="system.xml" hash="1e4cfcd92a41481a622b790219658101"/><file name="wsdl2.xml" hash="7d527421ba4b63a8a812ab6b1095891d"/><file name="wsdl.xml" hash="f0db676b04733b38f310355bb44bc3cb"/><file name="wsi.xml" hash="9fb1700cf935a26e7fada90a07fae7fe"/></dir><file name="Exception.php" hash="1c122cc217beddf4b15014584e28a1cf"/><dir name="Helper"><file name="Data.php" hash="3da188e6c4617162ae9a648b6dfa4b5a"/></dir><dir name="Model"><dir name="Acl"><dir name="Assert"><file name="Ip.php" hash="bae122c2007ca32ae03657607c6847bd"/><file name="Time.php" hash="ebf9df996baf7fe1791b5cb76851495b"/></dir><file name="Resource.php" hash="889760b07d1e2f5c56617f7874e7f9bc"/><dir name="Role"><file name="Generic.php" hash="b34f7897ca6764786abae8747f2a91ce"/><file name="Group.php" hash="7c3f381e1159d1807dc3f94d271f46f3"/><file name="Registry.php" hash="73e5aece47e3d9ea89aa61dc4c2c550e"/><file name="User.php" hash="67575e18879df254344941083824ae5f"/></dir><file name="Role.php" hash="838fd0ff956328983211cf46dc4a0c3b"/></dir><file name="Acl.php" hash="94c993762d0d0d67177e4706a1ad069f"/><file name="Config.php" hash="b3c12b2d800a8d228668c2a6c3e36489"/><dir name="Mysql4"><dir name="Acl"><dir name="Role"><file name="Collection.php" hash="60dd9a326d6a905eaadd8dea8da51891"/></dir><file name="Role.php" hash="fc426cadd4110bc0bd19b1f210c36131"/></dir><file name="Acl.php" hash="66f59ed378f0745c5c0d00d488276447"/><dir name="Permissions"><file name="Collection.php" hash="4642101400e27eb6fba716e07d5d0e82"/></dir><dir name="Role"><file name="Collection.php" hash="42687893bd5ea809330c0bd5631851b4"/></dir><file name="Role.php" hash="17d123850f594e9780219b02c4805d9e"/><dir name="Roles"><file name="Collection.php" hash="3e7fc78510f2c3ee681c9391a5a7eafa"/><dir name="User"><file name="Collection.php" hash="55c032d6936f59d8fad0bfbebc1f9f73"/></dir></dir><file name="Roles.php" hash="a10ceb1f198cb62b35bb1478f98e0312"/><dir name="Rules"><file name="Collection.php" hash="c786c21f8704777861faf53d1e250c37"/></dir><file name="Rules.php" hash="0ada834fb583567a00a74b297dd4961a"/><dir name="User"><file name="Collection.php" hash="928eb5966a3fb9efd72fbc1964b865ee"/></dir><file name="User.php" hash="36d641654ce3ac176897ea7032c06f1a"/></dir><dir name="Resource"><file name="Abstract.php" hash="cfdd0c7bbd3aa117b632913036305513"/><dir name="Acl"><dir name="Role"><file name="Collection.php" hash="83cd3129cb181c4e4003e5fe3c8a8f2c"/></dir><file name="Role.php" hash="233a59bba7fa30a5c05b663b6c29a744"/></dir><file name="Acl.php" hash="98e22c223f86fc01e26abd5cf7694127"/><dir name="Permissions"><file name="Collection.php" hash="8c286a5f5001f803255e70be3b81770b"/></dir><dir name="Role"><file name="Collection.php" hash="1637dd4afa80313ec4024894a836f330"/></dir><file name="Role.php" hash="f8581cbc351494d30d72ec80b333f166"/><dir name="Roles"><file name="Collection.php" hash="ef3d8fc2af1ddd73a221f6d47fd6066d"/><dir name="User"><file name="Collection.php" hash="756f58f2614086dfa1f4a348ee60463b"/></dir></dir><file name="Roles.php" hash="e808d8a9af3c07da49b5a8624982aa6f"/><dir name="Rules"><file name="Collection.php" hash="202bfa186d729c73d71a5b2ab99ff1cf"/></dir><file name="Rules.php" hash="034339290396d16d4f16cdfe720b9505"/><dir name="User"><file name="Collection.php" hash="0e4781fdcb94399e127f6515cae89088"/></dir><file name="User.php" hash="87981c7634dd3c24d03b74a8d7768912"/></dir><file name="Role.php" hash="5204604d372bd9d8aea637d3c5ee8050"/><file name="Roles.php" hash="a42dacd9b0598fc8469a9eac8ce430b2"/><file name="Rules.php" hash="f467c0270a2c5c72046f835bc84189b4"/><dir name="Server"><dir name="Adapter"><file name="Interface.php" hash="ee1620d933aa1f24893527eb981f86e4"/><file name="Soap.php" hash="959f050f42d5f57c8520dd6bb901a646"/><file name="Xmlrpc.php" hash="e8d5968756a8c7a0c3a5ee08f95956a0"/></dir><dir name="Handler"><file name="Abstract.php" hash="b33b97080cb9030bc09110e42d7d9ee7"/></dir><file name="Handler.php" hash="ea79748e8a24c32abe609799670d836c"/><dir name="V2"><dir name="Adapter"><file name="Soap.php" hash="e4aee88d94e9e79cc63874ed65e041d8"/></dir><file name="Handler.php" hash="a91364bdc7e703281a2ed1617cd37ab4"/></dir><dir name="Wsi"><dir name="Adapter"><file name="Soap.php" hash="968a68e449fc84ab1c96152be5c06915"/></dir><file name="Handler.php" hash="5fc667ab2c7dafe8d7f246de398a7310"/></dir></dir><file name="Server.php" hash="0908159c36ff3fd7093ae0893f0ae593"/><file name="Session.php" hash="59ed98a84bdce5cd9f4c77aa0b11305b"/><file name="User.php" hash="f8ae074806c936c0b83615e0897c3d52"/><dir name="Wsdl"><dir name="Config"><file name="Base.php" hash="0a941cc124d1d550faab0696029560be"/><file name="Element.php" hash="20410378f8897be74fae74e99f6aa239"/></dir><file name="Config.php" hash="11bdc1e2e7cc5e308af96a906c24e207"/></dir></dir><dir name="sql"><dir name="api_setup"><file name="install-1.6.0.0.php" hash="78e30fde7e978bf199beab7e53532ea4"/><file name="mysql4-install-0.7.0.php" hash="dcbb27856e26d4b3eb6cbb64eb0eebbc"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="79c32c8823935ba7cc5407a323d8dea3"/><file name="mysql4-upgrade-0.8.0-0.8.1.php" hash="8fdc2b417ee88b86fe1c2401a0701ab4"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="a262afd5ebc6b659b61126fcdb739e9a"/><file name="mysql4-upgrade-1.6.0.0-1.6.0.1.php" hash="f4865db815ed678d191fd471f0eadd86"/></dir></dir></dir><dir name="Api2"><dir name="Block"><dir name="Adminhtml"><dir name="Attribute"><file name="Buttons.php" hash="9ecdddb2f1928c93910bb30fa2b89c95"/><dir name="Edit"><file name="Form.php" hash="f29e8e329b2155c65d3d518e5450a2a6"/></dir><file name="Edit.php" hash="9d083386afa2f7e41673ccdd0bb6dacf"/><file name="Grid.php" hash="7e14536d71709f369d4a48eb551d8ccf"/><dir name="Tab"><file name="Resource.php" hash="8634e8a6fb97acfe3b212845dc5ef73a"/></dir><file name="Tabs.php" hash="c68526ef313329ad6ae69ab5a60a7a4b"/></dir><file name="Attribute.php" hash="3802c01411f3c5282b5b2ce492d71086"/><dir name="Permissions"><dir name="User"><dir name="Edit"><dir name="Tab"><file name="Roles.php" hash="9d031a1838df7d93312b025e2437123b"/></dir></dir></dir></dir><dir name="Roles"><file name="Buttons.php" hash="b67a5b67526627e8e8e58bad35469529"/><file name="Grid.php" hash="f060e2d3f35cff4bd0e2e6544356dc2c"/><dir name="Tab"><file name="Info.php" hash="22e4cbf7904c56fe4af5ecb48de37cd7"/><file name="Resources.php" hash="5136e98eccac7c005cd2e486976765ee"/><file name="Users.php" hash="60cd1b41e9a756cf4b6958b38db8b321"/></dir><file name="Tabs.php" hash="ed30e80b1fee765a768a5af9bc596e94"/></dir><file name="Roles.php" hash="b5dae51542657b5e76150ba63ddbfc47"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Api2"><file name="AttributeController.php" hash="e63636ea85ff5718de65bf1b3cc9e455"/><file name="RoleController.php" hash="e6eb721e3be943fcf1591fe4f234df1b"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="2068b7725e8fa27082e72856a20cfe65"/><file name="config.xml" hash="c5aacdd03cf19fcb3e6710d774af711a"/></dir><file name="Exception.php" hash="b29a53ff1cf0a7ecd04eb8a2163f7ccd"/><dir name="Helper"><file name="Data.php" hash="280bb0a60a35e53ba8e560e25919aab0"/></dir><dir name="Model"><dir name="Acl"><dir name="Filter"><dir name="Attribute"><file name="Operation.php" hash="e16ee400525266e1f8fa39173d12c08c"/><file name="ResourcePermission.php" hash="12a5ec98f51a2fca0a64ce814081da9d"/></dir><file name="Attribute.php" hash="716b3d32061c90ef46257997fdda008d"/></dir><file name="Filter.php" hash="14dd710602108f02eb3ccfb78d6f6fcf"/><dir name="Global"><file name="Role.php" hash="1611511edf95095cf8f8889696d6f120"/><dir name="Rule"><file name="Permission.php" hash="55cad88a4ec9ac8d624c18a20957bfc5"/><file name="Privilege.php" hash="9a3024a2f2cb57aa4a236619bfbc7731"/><file name="ResourcePermission.php" hash="3b23c225caac870fe48d0663a513673c"/><file name="Tree.php" hash="78ebd17cf328173e89253ec84431de6e"/></dir><file name="Rule.php" hash="1a82ed5b621061bbae8deb88fadbcd79"/></dir><file name="Global.php" hash="f2738380fc6367d91a490a988a28dcc3"/><file name="PermissionInterface.php" hash="e26bf209bb98b2d677c4bc85ef5fdf58"/></dir><file name="Acl.php" hash="1e32e2df6daf16aa03d6be149837c985"/><dir name="Auth"><dir name="Adapter"><file name="Abstract.php" hash="5c826c1443b8fcd34a8ede8551122610"/><file name="Oauth.php" hash="9bc1d44870ef0418a0b5804be5bb3add"/></dir><file name="Adapter.php" hash="2ee482ea37b78f0888329df956c199b4"/><dir name="User"><file name="Abstract.php" hash="6c2f172f43c543349931e08c21866e56"/><file name="Admin.php" hash="ce233fff344a484386ab167907d477f0"/><file name="Customer.php" hash="8b73ae6abfef78dc48ea56a12be9de8f"/><file name="Guest.php" hash="a4f31e650783ad6e029a6436fe927870"/></dir><file name="User.php" hash="9ed82368bd00dbe4eefb1e03fcfbef6a"/></dir><file name="Auth.php" hash="d628cd8bf088f803e1441d759cc92fd6"/><file name="Config.php" hash="c27da92b13d60e03739ded5ff6b9a868"/><file name="Dispatcher.php" hash="1cc135a7c3de8dd35f9dcc5989d42829"/><file name="Multicall.php" hash="82381a36fe0172bef2b2d0497b660c15"/><file name="Observer.php" hash="29e4fc9f2c1a8a36542b53b628e0e081"/><dir name="Renderer"><file name="Interface.php" hash="c1ec874fcc29f7bfc8be8f95cfd2039a"/><file name="Json.php" hash="ec87eb53de1ac4e3eb7bc4644b8194a9"/><file name="Query.php" hash="7724211281e1b2f7cfcef9a35ed9d3ce"/><dir name="Xml"><file name="Writer.php" hash="3d0f2f64b44ef17476275b122c0ed941"/></dir><file name="Xml.php" hash="bc062055ba76472094bd5c51ec353fbe"/></dir><file name="Renderer.php" hash="48702b5883f50e131826053e7d0769c6"/><dir name="Request"><file name="Internal.php" hash="4f0d44aa88967126c7c00dec8cf804cf"/><dir name="Interpreter"><file name="Interface.php" hash="5b0e958f1d505eed2399974b98c7f7b4"/><file name="Json.php" hash="7a2d29b25edd612667f35fc652f1d096"/><file name="Query.php" hash="98e654fca2e4f1abd1eb7bb5505eb51e"/><file name="Xml.php" hash="a19373703fc0cb43b975ad143edd52cc"/></dir><file name="Interpreter.php" hash="656dfd5fc3f5b2c101600399e892f676"/></dir><file name="Request.php" hash="7805a97ec78ba461a4aa39068aad53f3"/><dir name="Resource"><dir name="Acl"><dir name="Filter"><dir name="Attribute"><file name="Collection.php" hash="56158fc3aa9d4e3776ca6989d09c3dfe"/></dir><file name="Attribute.php" hash="dffc8853799f80022de534c2e4e59821"/></dir><dir name="Global"><dir name="Role"><file name="Collection.php" hash="c985d7ca9add94d15360d9befd1d63d4"/></dir><file name="Role.php" hash="1e5c802f1e2d7f7753e8abd287f2696e"/><dir name="Rule"><file name="Collection.php" hash="98eab9e16e67c5060106016e3365ad26"/></dir><file name="Rule.php" hash="5f229b8223c7fada0e2d9d926927cb21"/></dir></dir><file name="Setup.php" hash="d5b30593a486fb00f1336f9eef1bf1c9"/><dir name="Validator"><file name="Eav.php" hash="741268e643216bb90242f185a2ae07f5"/><file name="Fields.php" hash="b2276308adb78e988e954dcf0b0ff367"/></dir><file name="Validator.php" hash="dd67405dc65f57d2808b9485ff155b5a"/></dir><file name="Resource.php" hash="4313dd190ec4b1e306db3602683f5daf"/><file name="Response.php" hash="97f6dc59cc30189b9c6e3cc47453dfdf"/><dir name="Route"><file name="Abstract.php" hash="d77246ad3914881dc74424d1cfb7d8e1"/><file name="ApiType.php" hash="f40e89c2f37e4605d89b8aec1cfb7b21"/><file name="Interface.php" hash="00228f30409a155c399e8b6c4e511141"/><file name="Rest.php" hash="f4a679f6097a6f0c414c04f5ad3196f0"/></dir><file name="Router.php" hash="014fd4756228be2a4adf32b261339b04"/><file name="Server.php" hash="9b5558ffd2d990ee797fed16524f1aca"/></dir><dir name="sql"><dir name="api2_setup"><file name="install-1.0.0.0.php" hash="5c6a317ab60cf0f960396ed0eb69ba9c"/></dir></dir></dir><dir name="Authorizenet"><dir name="Block"><dir name="Directpost"><file name="Form.php" hash="7a6409c81b9baddb198037f566135672"/><file name="Iframe.php" hash="4e1b67512653e2806a8a6bc0ada769fe"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Authorizenet"><dir name="Directpost"><file name="PaymentController.php" hash="9cb24c731cd86b9b1cf0715ecd07ac45"/></dir></dir></dir><dir name="Directpost"><file name="PaymentController.php" hash="4fdb387f046c3dd9a0c2df68165b994d"/></dir></dir><dir name="etc"><file name="config.xml" hash="b18d889cfeac2d56c0cb5b0b342efd35"/><file name="system.xml" hash="d133f8404ad586339b1d6c35e319883e"/></dir><dir name="Helper"><file name="Data.php" hash="f4e636c2039d466184adb581954e4cdb"/></dir><dir name="Model"><dir name="Directpost"><file name="Observer.php" hash="fa06a00e65801d15bbb35ca952b77867"/><file name="Request.php" hash="7bce89c7393fde8ecdc407253b20cab2"/><file name="Response.php" hash="cd4a125f7ccff990dbad778a2b187e9e"/><file name="Session.php" hash="2370edefb1f71d07896485482ae3fd2d"/></dir><file name="Directpost.php" hash="38b3a76a733de6816dbdd90d5ca07c5f"/></dir></dir><dir name="Backup"><dir name="etc"><file name="adminhtml.xml" hash="83d62ca297818cbb66efd2ae8e9375cd"/><file name="config.xml" hash="eca96f3c87241804a1224384a783899e"/><file name="system.xml" hash="62dbde5c31ffe8d5991bc6f83955650f"/></dir><file name="Exception.php" hash="63a7102e9fabf9cb75a5929c465f1979"/><dir name="Helper"><file name="Data.php" hash="9b880ad6f4f7a3b19b76a563908bf049"/></dir><dir name="Model"><file name="Backup.php" hash="acaba10b83754af56efdec0e7c64c2e1"/><dir name="Config"><dir name="Backend"><file name="Cron.php" hash="7c4bf81fea3fba44c5ba40a49a01fb90"/></dir><dir name="Source"><file name="Type.php" hash="4fa2eb9cdbc276c73d4ac4189537a362"/></dir></dir><file name="Db.php" hash="791d8c84737cfd1e4ee0e7f6af645708"/><dir name="Fs"><file name="Collection.php" hash="658f22a214ce21e9d19ef2aad7bc0062"/></dir><dir name="Mysql4"><file name="Db.php" hash="77b9c8c0572b93f26b6664b3a4c84630"/></dir><file name="Observer.php" hash="58490c328305ea18d686119591b76390"/><dir name="Resource"><file name="Db.php" hash="5e0a8cdf278c5cf528b554dfdf304f87"/><dir name="Helper"><file name="Mysql4.php" hash="374ac97d2efe43d3c6103532dbd092db"/></dir></dir></dir></dir><dir name="Bundle"><dir name="Block"><dir name="Adminhtml"><dir name="Catalog"><dir name="Product"><dir name="Composite"><dir name="Fieldset"><file name="Bundle.php" hash="4eedc42fcf235b2a75b365136b06a7c9"/><dir name="Options"><dir name="Type"><file name="Checkbox.php" hash="6824ac88334a5cadb485e09c05e0c385"/><file name="Multi.php" hash="4098687cd6dd1dfc63e3bb49f43bd0f3"/><file name="Radio.php" hash="fbad0e2b095e08d212ac2337a323360a"/><file name="Select.php" hash="70c309398788fa17c06289954ed4033a"/></dir></dir></dir></dir><dir name="Edit"><dir name="Tab"><dir name="Attributes"><file name="Extend.php" hash="159f6fe7c7b060d7b0b245240e438226"/><file name="Special.php" hash="75e46f3fde0da13649a1bb53d88b19e8"/></dir><file name="Attributes.php" hash="d42dcc47500071a6108e1ab375cfb9e4"/><dir name="Bundle"><dir name="Option"><dir name="Search"><file name="Grid.php" hash="a9b9509f13bfb4509aec65f83b958d60"/></dir><file name="Search.php" hash="ff26c15818d6c398bbe5a8f514aded1c"/><file name="Selection.php" hash="7ef1c34cbc5d8fc218d391feaa52f6ba"/></dir><file name="Option.php" hash="2c67b923ceb7be10ba78de4ccfdb1552"/></dir><file name="Bundle.php" hash="8d5cc8cb1e9c1de5e887618ff5af14e9"/></dir><file name="Tabs.php" hash="e0df01128851d1df611424d135912015"/></dir></dir></dir><dir name="Sales"><dir name="Order"><dir name="Items"><file name="Renderer.php" hash="0e24bbfcb1e1fc66c6e9268f1fc67aa4"/></dir><dir name="View"><dir name="Items"><file name="Renderer.php" hash="9b86421d4a5fee896ee3aa428529f086"/></dir></dir></dir></dir></dir><dir name="Catalog"><dir name="Product"><dir name="List"><file name="Partof.php" hash="cd09aa6d05e71fb0617e94a761afc709"/></dir><file name="Price.php" hash="1ec610f56e3cda328bd227f1c743c439"/><dir name="View"><dir name="Type"><dir name="Bundle"><dir name="Option"><file name="Checkbox.php" hash="ac0774edcfae8c954578766a639e8703"/><file name="Multi.php" hash="303739b57e341ce0c8771d9c54066d29"/><file name="Radio.php" hash="cbf154899c8cfeb37c27fa1c7f407790"/><file name="Select.php" hash="b25f77eb2feb5ca6a08624524370e9cb"/></dir><file name="Option.php" hash="f20ec67f16bc943a331ee74fd94816a3"/></dir><file name="Bundle.php" hash="a8e6bb4adf8f950cba40b33e99d126e3"/></dir></dir><file name="View.php" hash="2d99bef5e10e53997e80c7e68eb74f4f"/></dir></dir><dir name="Checkout"><dir name="Cart"><dir name="Item"><file name="Renderer.php" hash="cb25cbbb6fe5bb404046f18e25cd8634"/></dir></dir></dir><dir name="Sales"><dir name="Order"><dir name="Items"><file name="Renderer.php" hash="66ba7dff54ff3cd3c2c2de2589d1d92b"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Bundle"><dir name="Product"><file name="EditController.php" hash="f35878447cbd3283bdf620e7231fb847"/></dir><file name="SelectionController.php" hash="d40b74c51f96c85d930d697bb3b01f83"/></dir></dir><dir name="Product"><file name="EditController.php" hash="1a90f5062b635818b25a82f96520a538"/></dir><file name="SelectionController.php" hash="65b6943a2d5c622fc19a550329ca99c3"/></dir><dir name="data"><dir name="bundle_setup"><file name="data-install-1.6.0.0.php" hash="704f36ca3adfcdb5593d89b6938ca14e"/></dir></dir><dir name="etc"><file name="config.xml" hash="89528bd70878f0505994bce17329e0b1"/></dir><dir name="Helper"><dir name="Catalog"><dir name="Product"><file name="Configuration.php" hash="dc317de1d5c2fe81193c000666edb540"/></dir></dir><file name="Data.php" hash="88f016b3f3d4975dc7336860cf458c35"/></dir><dir name="Model"><dir name="CatalogIndex"><dir name="Data"><file name="Bundle.php" hash="49cdcb0b8a21a9863d05f433500488a6"/></dir></dir><dir name="Mysql4"><file name="Bundle.php" hash="290e69849efc355a8829c54152045db6"/><dir name="Indexer"><file name="Price.php" hash="febc7d36d92ba7838dd5cd9a483aa2db"/><file name="Stock.php" hash="140200e1ec7fb52357057feba89d91e9"/></dir><dir name="Option"><file name="Collection.php" hash="e69efe03d6c7ee502ad5f07902f5c251"/></dir><file name="Option.php" hash="478d876dd2c2b7b515d27e39daca4de5"/><dir name="Price"><file name="Index.php" hash="d7229eccb5c1818f354945005aecd6a6"/></dir><dir name="Selection"><file name="Collection.php" hash="b86c75c38aead1f8c19301674c57b6ac"/></dir><file name="Selection.php" hash="42ab6145a2d6730824e1262290374001"/></dir><file name="Observer.php" hash="684fd3cb4ba4ccb01b81c7c665d49abb"/><file name="Option.php" hash="9fb2b11de818eac23bdde9e11ee7806f"/><dir name="Price"><file name="Index.php" hash="08eb9eed194dca5329a1a9dd4c7f2dc2"/></dir><dir name="Product"><dir name="Attribute"><dir name="Source"><dir name="Price"><file name="View.php" hash="8f63ded9adc2ed0de625605a957f8a93"/></dir></dir></dir><file name="Price.php" hash="95f84b52dc3a3b28052d442b38cd895a"/><file name="Type.php" hash="9b3b5e34ef4f04e5ca09fbad72be3a23"/></dir><dir name="Resource"><file name="Bundle.php" hash="7b960e8bab4fd3a54af061b728ea563e"/><dir name="Indexer"><file name="Price.php" hash="62a65576cb7972754aa3c97584cd3d34"/><file name="Stock.php" hash="4241160781909ff2c364156d5cf423ce"/></dir><dir name="Option"><file name="Collection.php" hash="7b82c57c6d687165d2cf44beae7a8be7"/></dir><file name="Option.php" hash="f2cdd5bed549090dcdbe13461666eac7"/><dir name="Price"><file name="Index.php" hash="22268ab62259559faaa0a6a7faecbd08"/></dir><dir name="Selection"><file name="Collection.php" hash="5dee04b12e2a33b4f1b17e1053c40c41"/></dir><file name="Selection.php" hash="04c2fa578b41350d002fa1ec4f403d39"/></dir><dir name="Sales"><dir name="Order"><dir name="Pdf"><dir name="Items"><file name="Abstract.php" hash="84f52d958ffbefe58327490cf3787e19"/><file name="Creditmemo.php" hash="18756e38915d33b0598886a0714f00b2"/><file name="Invoice.php" hash="10d1ee44aee326ca2783871e362bd24c"/><file name="Shipment.php" hash="b660cd96424be3625bd2cbc0d5af2924"/></dir></dir></dir></dir><file name="Selection.php" hash="e0dd7c8bf0bf9dc26ae083a73b4bff9f"/><dir name="Source"><dir name="Option"><dir name="Selection"><dir name="Price"><file name="Type.php" hash="22152d93f3443deb8ec9fcd40fd3ec0c"/></dir></dir><file name="Type.php" hash="5837e9163832f0b2de322eba8ae5d811"/></dir></dir></dir><dir name="sql"><dir name="bundle_setup"><file name="install-1.6.0.0.php" hash="b226cb28e8ad8ecd381b2e308fc1b195"/><file name="mysql4-data-upgrade-0.1.13-0.1.14.php" hash="1d90a8f6ce0c6afe2b84e0998095be6c"/><file name="mysql4-install-0.1.0.php" hash="08d75e37d46fddc418159508e6152e19"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="ec87533b7e5ee419cb00333ed2d7d67c"/><file name="mysql4-upgrade-0.1.10-0.1.11.php" hash="329909b16d5fb794a7beb343fc34987c"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="9f26bf582848205065163c1a3a2dec50"/><file name="mysql4-upgrade-0.1.11-0.1.12.php" hash="acdb9dd20d747b4890035b308a55fba8"/><file name="mysql4-upgrade-0.1.12-0.1.13.php" hash="e593bd07036a34ad7e128faa808f4130"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="0e4cbd51fa2a7fd8b14185671a9b7746"/><file name="mysql4-upgrade-0.1.3-0.1.4.php" hash="2e3737201d5251f638da211cf999b653"/><file name="mysql4-upgrade-0.1.4-0.1.5.php" hash="78f08a804f8e2db12a99ead0498b92f4"/><file name="mysql4-upgrade-0.1.5-0.1.6.php" hash="6c575e141e96d6d7f0ce756ab09e978b"/><file name="mysql4-upgrade-0.1.6-0.1.7.php" hash="03c48db53620b075f962b7fe11bee0ba"/><file name="mysql4-upgrade-0.1.7-0.1.8.php" hash="337df5b43b9ca6fe25ae047cf007f9db"/><file name="mysql4-upgrade-0.1.8-0.1.9.php" hash="3d7071a15b19daea388308356cf5a8ef"/><file name="mysql4-upgrade-0.1.9-0.1.10.php" hash="27f1ef0531c3d967f8697d29c3ac7ee9"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="e1da936caf443d5239bc5fffacfa12a0"/><file name="mysql4-upgrade-1.6.0.0-1.6.0.0.1.php" hash="cc181aa01c3efd2829a5770a288899b2"/><file name="upgrade-1.6.0.0-1.6.0.0.1.php" hash="407879fe21df83f7dd30aa178f526e2f"/></dir></dir></dir><dir name="Captcha"><dir name="Block"><dir name="Captcha"><file name="Zend.php" hash="ffbf8d995bb75f3c8803fded8a4768db"/></dir><file name="Captcha.php" hash="ce5035cddf38029b45585f473ee47c6a"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="RefreshController.php" hash="ee0396034fc9f0e2b3e3b6e2a98581b9"/></dir><file name="RefreshController.php" hash="239b8055322ac27a294209f80e016ef6"/></dir><dir name="etc"><file name="config.xml" hash="12f6b073cf078146d00d62ef51651cf3"/><file name="system.xml" hash="690658c5a492270714d0bcc72550f103"/></dir><dir name="Helper"><file name="Data.php" hash="6f42cf12a0b962f97a0114d3cfd3cc27"/></dir><dir name="Model"><dir name="Config"><file name="Font.php" hash="1c62aedef1dd4a737f66da848abbaf70"/><dir name="Form"><file name="Abstract.php" hash="c9bbc3df33430641b456a1ef5cf445b5"/><file name="Backend.php" hash="cfdf863563a57502d71257ba9b11806c"/><file name="Frontend.php" hash="cdccc239c91602b5204d6675a87aa29e"/></dir><file name="Mode.php" hash="2a23c39de34e9a330fffd2e3cfd3fe22"/></dir><file name="Interface.php" hash="dbce8a3a499e2a8c1bc370036506a6e7"/><file name="Observer.php" hash="7ff26aafb866ea6a2476eafd511d6228"/><dir name="Resource"><file name="Log.php" hash="16a36311b7707fc6fa8fe9e308805c30"/></dir><file name="Zend.php" hash="7d4b905070efa21847ffbfd8cc6029cd"/></dir><dir name="sql"><dir name="captcha_setup"><file name="install-1.7.0.0.0.php" hash="7e140705a745857abf931fd505800426"/></dir></dir></dir><dir name="Catalog"><dir name="Block"><file name="Breadcrumbs.php" hash="dc9e922b228221db5ea70baffacc6676"/><dir name="Category"><file name="View.php" hash="24b0772ece662f018e6f8d0285011d25"/><dir name="Widget"><file name="Link.php" hash="51943311af899a10efd72e811f04a46a"/></dir></dir><dir name="Layer"><dir name="Filter"><file name="Abstract.php" hash="569759c08edaab1cdb5b6c259194381b"/><file name="Attribute.php" hash="e1b8a2fa5bc884eae8484c272ce207f0"/><file name="Category.php" hash="fa2df4e73dadd13b44d62d4a6d5ff25d"/><file name="Decimal.php" hash="605afd83a2ecb3941cd803cc567b1b1a"/><file name="Price.php" hash="c58bd4e7805195d2bd288b953b3a21c3"/></dir><file name="State.php" hash="e218ddafb70baa69e0d9082e7ec15a5e"/><file name="View.php" hash="c008a96f5e5fc6f4d367d47bee377b2a"/></dir><file name="Navigation.php" hash="15a50431173e196a6225fa88ace520bb"/><dir name="Product"><file name="Abstract.php" hash="059f66b8c66bf0eb5f2137ea1a004cee"/><dir name="Compare"><file name="Abstract.php" hash="78269ca45e70312138222e66d47ce0c5"/><file name="List.php" hash="5d8a8f0aa187ed8fc4b78218b56cddf0"/><file name="Sidebar.php" hash="63d0b9ae33733b0e78d4ad9f10e0e4b0"/></dir><file name="Gallery.php" hash="ceb0e1200f3504da31f68882ff6e8293"/><dir name="List"><file name="Crosssell.php" hash="b1e827a260196c3055939572237f60b5"/><file name="Promotion.php" hash="925ad8794cbd45d78d3ca2222369e944"/><file name="Random.php" hash="2b29b91cb4dfc1902bbb6e06ae21518a"/><file name="Related.php" hash="7388a2c16bc5c735ad80c19d9eed4a38"/><file name="Toolbar.php" hash="27ffcf367d419757fadcaf07965d3f21"/><file name="Upsell.php" hash="ac71dbeb570db3c8b0eae5587264c65d"/></dir><file name="List.php" hash="1cac6521c378360a1a6776bb0fb02f06"/><file name="New.php" hash="da1c08708b00346aa8eaf67540ed7294"/><dir name="Price"><file name="Template.php" hash="4f40d083dd3346932770a76dbe58f87b"/></dir><file name="Price.php" hash="be0601a984203f26bba5cdab288a657c"/><file name="Send.php" hash="0fb7118c94fc9fbd62afec4a7c38daef"/><dir name="View"><file name="Abstract.php" hash="bc0aae10b8b4a1cc828715d42ae00202"/><file name="Additional.php" hash="ad4116b8d16d1a4a42baeae7e928e0fc"/><file name="Attributes.php" hash="20f63c86e08129836c24153c6191c06b"/><file name="Description.php" hash="249ea0103d9d1bceb95b581d9eefe229"/><file name="Media.php" hash="28392b486ee1cb2520e2b93e02f7ed44"/><dir name="Options"><file name="Abstract.php" hash="8cfc7077188d68a5c6ed0e590c1b96c2"/><dir name="Type"><file name="Date.php" hash="d8d6f664fd350af6ef24339555137e89"/><file name="Default.php" hash="662faa975468e743d10ca0874d2806a2"/><file name="File.php" hash="e954fe2d3afca765c289e18fa6fbb399"/><file name="Select.php" hash="0c91bc6f8ff123f68cea46dc03548e0d"/><file name="Text.php" hash="c61f008cf7f940e27ca79284b9da0706"/></dir></dir><file name="Options.php" hash="27f57059c4b3b47150a14192c3c61df6"/><file name="Price.php" hash="0de63fad2d2765724137151c113e7ddb"/><file name="Tabs.php" hash="3818f4cebeb3c163a69f127d152045d6"/><dir name="Type"><file name="Configurable.php" hash="f6505827a6f6b904c73920c68f6e89c2"/><file name="Grouped.php" hash="f5c26394a55341522d043c3e1b9217ae"/><file name="Simple.php" hash="40dbb32b8d8f8ab18034af3c8fb89353"/><file name="Virtual.php" hash="e1f378e2265d6ec2181531449abb9065"/></dir></dir><file name="View.php" hash="31d671b8c3b8e241acd2a5284510e035"/><dir name="Widget"><dir name="Html"><file name="Pager.php" hash="7d9cc90487248a2ce8816c733febc2e5"/></dir><file name="Link.php" hash="a465566af5823d8d61973fd1511c429c"/><file name="New.php" hash="876fc482bd5c2dc5862fcd36a44fd35e"/></dir></dir><file name="Product.php" hash="8ceda690e095cfb529dfb89841a0eba5"/><dir name="Seo"><dir name="Sitemap"><file name="Abstract.php" hash="042a3e9d4f68986607793993a3b61b92"/><file name="Category.php" hash="2b03d8b59dd4d9ec59834dee4cec37c3"/><file name="Product.php" hash="db09ffc8393a23bd2a2bee64b77da16d"/><dir name="Tree"><file name="Category.php" hash="7e1b8c0ea353c7fa1cf82da49a212ce8"/><file name="Pager.php" hash="50703d82266da06084ade6709b43bc6a"/></dir></dir></dir><dir name="Widget"><file name="Link.php" hash="407ddfa8c96400eb9b130db91595d675"/></dir></dir><dir name="controllers"><file name="CategoryController.php" hash="032b5040829fa6fd0510bcf4023b3eeb"/><file name="IndexController.php" hash="beb90e52fa1b684861506c374baf158f"/><dir name="Product"><file name="CompareController.php" hash="40378a25f23699876e0509c756ed6fc6"/></dir><file name="ProductController.php" hash="2b60853942ee3aa4db8110e96f5cdd14"/><dir name="Seo"><file name="SitemapController.php" hash="65837364f9e0d4beffb64b9f06faccf4"/></dir></dir><dir name="data"><dir name="catalog_setup"><file name="data-install-1.6.0.0.php" hash="fbab910c7aa98246e46741274f17c72f"/><file name="data-upgrade-1.6.0.0.12-1.6.0.0.13.php" hash="3911aeb53668e40f7fb2272820790df9"/><file name="data-upgrade-1.6.0.0.13-1.6.0.0.14.php" hash="7306c67e63e71befcb56aa2ecde853bd"/><file name="data-upgrade-1.6.0.0.4-1.6.0.0.5.php" hash="9ccfe35014822fad827e39269574e7b9"/><file name="data-upgrade-1.6.0.0.8-1.6.0.0.9.php" hash="8459521031dffb50b88e9329a019ed0e"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="40beeeb31015db0ab3c34a54754999f9"/><file name="api2.xml" hash="9a778e459c7d57a8d05b4f88d81f7a5b"/><file name="api.xml" hash="c7045f94f3c0b8783d77eefcade87a85"/><file name="config.xml" hash="502ae6beee4c5154f8c3886af0848694"/><file name="convert.xml" hash="5af43903b4013d0952b569c2fb8cf418"/><file name="system.xml" hash="63e1da750fb8ed9fc1c82b5b9d427ee5"/><file name="widget.xml" hash="b03efa2295a3e667817c9c16212bdf14"/><file name="wsdl.xml" hash="5d8cb83637ec17fee6d788a8e6e971db"/><file name="wsi.xml" hash="1e5b98550e17d40a89dac371f747e929"/></dir><file name="Exception.php" hash="e4d7f8084f644da43a48f40a373dc2e1"/><dir name="Helper"><dir name="Category"><file name="Flat.php" hash="7ff07e03b6aa68b1b8562290dd74b8f3"/><dir name="Url"><dir name="Rewrite"><file name="Interface.php" hash="5e9320dc71fcd7cfbe67c4f4a58845a9"/></dir><file name="Rewrite.php" hash="627f104af145d0c7b6408b551e9fd91a"/></dir></dir><file name="Category.php" hash="b3391bbdb0ff672a33aba084471138ab"/><file name="Data.php" hash="03ecc2c8611d8c2c2c70dbe8771f8eb4"/><dir name="Flat"><file name="Abstract.php" hash="fa7225d63b763b053807e38ebd113ff1"/></dir><file name="Image.php" hash="70a2c674704ccb0ba1314a332077e984"/><file name="Map.php" hash="ce44179e8add0a6161ef1682df9c1eb8"/><file name="Output.php" hash="1a1f57a48a0ad1c343cb3bfe5e9086a2"/><dir name="Product"><file name="Compare.php" hash="f60307adcfefedbe5055cf19118f0da4"/><dir name="Configuration"><file name="Interface.php" hash="c095f59ce8ced6c87b3c116a096c52ae"/></dir><file name="Configuration.php" hash="04162bc060a553c95a325f93d446c46c"/><file name="Flat.php" hash="cefde54b79adfe5ef6e75ba464039e72"/><file name="Options.php" hash="f988c4f33eaa09438eee95ed3dc19dee"/><dir name="Url"><dir name="Rewrite"><file name="Interface.php" hash="4f060547161deff9f3313dfffb5c989c"/></dir><file name="Rewrite.php" hash="b9edba0f196802cfac2fe7559646678b"/></dir><file name="Url.php" hash="d265be34f3a67227bf2a86a63518a7b4"/><file name="View.php" hash="95181c79f2ae347ad5bb664bb0cff616"/></dir><file name="Product.php" hash="43046780e28df17716851d9dab202413"/></dir><dir name="Model"><file name="Abstract.php" hash="c281e885017d917455c4049104560a98"/><dir name="Api"><file name="Resource.php" hash="f3ae6f09bcbf5b3c7d58684ab98d23a4"/></dir><dir name="Api2"><dir name="Product"><dir name="Category"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="d7463365a68cc7698dbd952e4cc52970"/></dir><dir name="Customer"><file name="V1.php" hash="4897a1b88c4f08748e6eed7986ed3f3b"/></dir><dir name="Guest"><file name="V1.php" hash="89671a164cd1c5a59df1b22737cdb136"/></dir></dir><file name="Rest.php" hash="52f88cfde6aa54fac964ca5f49018c61"/></dir><file name="Category.php" hash="e228a73b6bad4b66397da9e7edcf7549"/><dir name="Image"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="7947cc5b90273de24139f05848b456ad"/></dir><dir name="Customer"><file name="V1.php" hash="e143921ca571fa41f2003379ed25e0c9"/></dir><dir name="Guest"><file name="V1.php" hash="2caef43ca7f3f588ed7cba057820306f"/></dir></dir><file name="Rest.php" hash="002f73eac76b368efb5d63f6eb36adac"/><dir name="Validator"><file name="Image.php" hash="43631447def8a029998ae04c8b04f889"/></dir></dir><file name="Image.php" hash="e0f3a3b7e3a3b72194720237289aef3b"/><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="27ef43f101b205c0ad22baa5392400df"/></dir><dir name="Customer"><file name="V1.php" hash="14a090b850abd03fbac17ead1ef6e40c"/></dir><dir name="Guest"><file name="V1.php" hash="37422a66a336b27f86df7bbb49479011"/></dir></dir><file name="Rest.php" hash="9c92c62d53932d54e53b28a57f53c467"/><dir name="Validator"><file name="Product.php" hash="bf95835adfed0a8911ecb8dac4db87b6"/></dir><dir name="Website"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="6b19391c139022f1f7ac021b43af2e3d"/></dir></dir><file name="Rest.php" hash="037f6b2f10421acfb952fe3b9a898264"/><dir name="Validator"><dir name="Admin"><file name="Website.php" hash="0e433d584ccca99b9acefd79bdab7fbc"/></dir></dir></dir><file name="Website.php" hash="641130e49b954337362c6a0488e52d21"/></dir><file name="Product.php" hash="42ce3a97fa396b42b7ff557b39f48cc0"/></dir><dir name="Attribute"><dir name="Backend"><file name="Customlayoutupdate.php" hash="f4ab7237def9ac94d33c03ec7eb09b44"/><dir name="Urlkey"><file name="Abstract.php" hash="45c67002c7753aec68d5419899dd489c"/></dir></dir></dir><dir name="Category"><dir name="Api"><file name="V2.php" hash="ec3fe9b7b86e1b6e1a012dfb1c18e191"/></dir><file name="Api.php" hash="48aa19e1c476773401a29ebf1a1fcee8"/><dir name="Attribute"><dir name="Api"><file name="V2.php" hash="f61fafde3b521c79f0101751609180ba"/></dir><file name="Api.php" hash="24605e5a575fcb8413073d61696e95e5"/><dir name="Backend"><file name="Image.php" hash="21ce9a5861450e48eef722887089f8eb"/><file name="Sortby.php" hash="b468e2f87d5dc712c238ac9c7260f644"/><file name="Urlkey.php" hash="9bba4c1dc7de04fb067ce5937cb38f69"/></dir><dir name="Source"><file name="Layout.php" hash="0e1cfcd254acee0bc655a1487388be19"/><file name="Mode.php" hash="b373a227f514ce26e1cda5e6938738a1"/><file name="Page.php" hash="97ad2b9da37e5002896afca12f61053e"/><file name="Sortby.php" hash="e2eee4b2f530328b5c6779605dcdc498"/></dir></dir><dir name="Indexer"><file name="Flat.php" hash="ff6b6d5e6326f58d56101a78b37f783b"/><file name="Product.php" hash="5f124ee71507c928d6c36efc4a9c7ab5"/></dir><file name="Url.php" hash="4e299fc4747eef04c5847115dcda1374"/></dir><file name="Category.php" hash="d8560050cc8e54db844184bdc1737ce7"/><file name="Config.php" hash="1fdf1ef67200887b33a80ff6172633c6"/><dir name="Convert"><dir name="Adapter"><file name="Catalog.php" hash="6c306896cec102b3598369b526ddd356"/><file name="Product.php" hash="e755fcc3a3b9d7386a9a8d77fee9c210"/></dir><dir name="Parser"><file name="Product.php" hash="5566eb7ef892e726d8e203d348906305"/></dir></dir><file name="Convert.php" hash="0337af3205a0971f20f0b32fdec3aa6c"/><file name="Design.php" hash="6e3c4bcf1ab14f24eea6a0a3191c7bf6"/><dir name="Entity"><file name="Attribute.php" hash="c667fd05f7c4b687500b9ab5b7e8e1c2"/><dir name="Product"><dir name="Attribute"><dir name="Design"><dir name="Options"><file name="Container.php" hash="e15f240921abc513c1c935d674afa2bb"/></dir></dir><dir name="Frontend"><file name="Image.php" hash="a5f142e07896ed343a51c89a29eb6ae4"/></dir></dir></dir></dir><file name="Factory.php" hash="a4f1a0cd7d3466f6fa9dd7f353e601a9"/><dir name="Indexer"><file name="Url.php" hash="b95a2d41553be1b7f48e31c5ada9764d"/></dir><file name="Index.php" hash="c2e37bb2c5b2e2c08bfdb8d5d5a82f08"/><dir name="Layer"><dir name="Filter"><file name="Abstract.php" hash="41f5bc312733ae1a8c7b6535476f2613"/><file name="Attribute.php" hash="2e25571187dfb6fb77d3099738d3f27c"/><file name="Category.php" hash="5d68e5cb2b338051f3465b4433876b49"/><file name="Decimal.php" hash="b8c45bedc4da0945ef09f22e7f0d12d6"/><file name="Item.php" hash="57a35e5fb7a897dfb6c15f2660ad1ffe"/><dir name="Price"><file name="Algorithm.php" hash="2c03f4df49550186c835dd2b26902be8"/></dir><file name="Price.php" hash="ed1265732b7624a2a3deea47a0396345"/></dir><file name="State.php" hash="a062acfe79a1c474990efd20d8139c1f"/></dir><file name="Layer.php" hash="3b59a186f95fac9850a7f8fc34a960b3"/><file name="Observer.php" hash="d9e5814c881485d38c7dbcf9114993a9"/><dir name="Product"><file name="Action.php" hash="d797dff6b9954a507e7e6dea103c505e"/><dir name="Api"><file name="V2.php" hash="ef05176e4faa490d4f8165859e9b6bcf"/></dir><file name="Api.php" hash="96247a452d6553ce35cc66ae5299867b"/><dir name="Attribute"><dir name="Api"><file name="V2.php" hash="d1b09b971caf68f6438d5acca09fa9d7"/></dir><file name="Api.php" hash="b0ca0ea5d13a8ee83545490eb23c8ca1"/><dir name="Backend"><file name="Boolean.php" hash="5d43b16dc03c8a17802d596f883bf5b5"/><dir name="Groupprice"><file name="Abstract.php" hash="1c464745115074ab1b75b35e366cd2ac"/></dir><file name="Groupprice.php" hash="05214af58303f852d1443a960cbe166a"/><file name="Media.php" hash="952b0ee5782a7649bfbf4ba7e1b6437c"/><file name="Msrp.php" hash="093ecdb7cc1d111c5cb6a6e346f235e8"/><file name="Price.php" hash="cf88ffa6a5cae7754649c3de65301294"/><file name="Recurring.php" hash="52ad084292a8d47d3ef47f0446f6bb47"/><file name="Sku.php" hash="5611966c68d03dd736ea8170a8c32cff"/><file name="Startdate.php" hash="f53e683ae7a658664c34a1d10fa249b6"/><file name="Tierprice.php" hash="4a2256c2a482a9c4888bc39b6e4ad217"/><file name="Urlkey.php" hash="1cf1a12d4f0c2fd2fb442abe9eb3a7c1"/></dir><dir name="Frontend"><file name="Image.php" hash="38a31a3ffa45775be209ed3fa4c59b9c"/></dir><file name="Group.php" hash="6051422dc8b3913a0bab046d9d25f639"/><dir name="Media"><dir name="Api"><file name="V2.php" hash="52458780d3a1103f9eb83a08b9d8a3df"/></dir><file name="Api.php" hash="3e78783c90a07384d0bc65cafec70825"/></dir><dir name="Set"><dir name="Api"><file name="V2.php" hash="38265b6ebcaecec52ede6c9dbd1ff575"/></dir><file name="Api.php" hash="d14893520702cfa5066d778daf8c0c61"/></dir><dir name="Source"><file name="Boolean.php" hash="0435bc68402916bc1bb9d83a6d18caab"/><file name="Countryofmanufacture.php" hash="5cd6d2e092352038061b3d56ff927b60"/><file name="Inputtype.php" hash="5211f52f96d9488ac3de0ba713aedd60"/><file name="Layout.php" hash="0cb39e26eda6df97c32ef5296e21ae05"/><dir name="Msrp"><dir name="Type"><file name="Enabled.php" hash="d82969a6d96c579857cb648f8c8428be"/><file name="Price.php" hash="de36e234ab22ef16540f68584b6ced6d"/></dir><file name="Type.php" hash="b6af2b9765e0dbd524f9eb72203db3ea"/></dir></dir><dir name="Tierprice"><dir name="Api"><file name="V2.php" hash="d46ec821e7072555f117056ee9287f8e"/></dir><file name="Api.php" hash="96793f25dd6f50995a37cbf14a724716"/></dir></dir><dir name="Compare"><file name="Item.php" hash="203d61ed118de7123dcebf595c9c6109"/><file name="List.php" hash="04d592bd07f4afcc039539d3cf7a3fd7"/></dir><dir name="Condition"><file name="Interface.php" hash="4123d8ead26f8b3d23cdc28f7cdda245"/></dir><file name="Condition.php" hash="4abf9e7c55fb78c59ecdcb7750761ef0"/><dir name="Configuration"><dir name="Item"><file name="Interface.php" hash="e33e94e74d7f5a8a1c31a63848f0f49a"/><dir name="Option"><file name="Interface.php" hash="c4100fea0a1092d1d9b2dc9c07b6340f"/></dir><file name="Option.php" hash="d7357c87274336c7b1f5c0a1b112503b"/></dir></dir><dir name="Flat"><file name="Flag.php" hash="f7bf904d892fac8e508abbf85f059aa6"/><file name="Indexer.php" hash="4bc262508a1a250d17f8420b166049d1"/><file name="Observer.php" hash="d56f0fbfcba79137e696dae413463c89"/></dir><file name="Image.php" hash="18ce2e2f48725521bbe8294ed4a4389b"/><dir name="Indexer"><file name="Eav.php" hash="b63e63aefc592e89c9e5cde2bbffca42"/><file name="Flat.php" hash="9f4c0484a2d6b8319df6494d0f8e76d1"/><file name="Price.php" hash="4f3b0c62e9e1d14cb4e1496590f2c2ca"/></dir><dir name="Link"><dir name="Api"><file name="V2.php" hash="597c076466a91df78258561b6697e01c"/></dir><file name="Api.php" hash="8d3acc8ad49a3c6944af0270bb470c34"/></dir><file name="Link.php" hash="2e9f26a075c75923667eebf9c15b4cff"/><dir name="Media"><file name="Config.php" hash="35263379f5d038a1f65495c14da95029"/></dir><dir name="Option"><dir name="Api"><file name="V2.php" hash="e34f6414ecb4c6a41146576bd8220183"/></dir><file name="Api.php" hash="98485a7c350344957c5a033ab871c612"/><file name="Observer.php" hash="dcdda369df03de933ca3907b578f3d2b"/><dir name="Type"><file name="Date.php" hash="efa9939248f48416abde4d1b05151b36"/><file name="Default.php" hash="034fa57259e0fede27cf46771f1abadd"/><file name="File.php" hash="fc009f745a8a3aaf475675e56df90187"/><file name="Select.php" hash="d23ba582720ce91e317315ef23da65c1"/><file name="Text.php" hash="31e80b4c587b8b2adbb3f993476efa72"/></dir><dir name="Value"><dir name="Api"><file name="V2.php" hash="1861092d45f3e44c6d4e998f9401ea8d"/></dir><file name="Api.php" hash="017e4295fea23f32492a1f9e0e553f1e"/></dir><file name="Value.php" hash="0067c50022591d8ce5d4a44aef403a80"/></dir><file name="Option.php" hash="86bfbd9ae590ec240285b576665a5d95"/><file name="Status.php" hash="b75a2d3e06a96368e7087ca93c7e98cc"/><dir name="Type"><file name="Abstract.php" hash="c39c757513a231937c1de3e02cd9d604"/><dir name="Api"><file name="V2.php" hash="3b0282ac4c4b655bae81d233c4b19035"/></dir><file name="Api.php" hash="8428eac3af499ac819048c87124718ab"/><dir name="Configurable"><file name="Attribute.php" hash="d204d9b64e356bb4235905080514ad0b"/><file name="Price.php" hash="6fc1458f4d17dfafac38ecdb229f2b89"/></dir><file name="Configurable.php" hash="064656d08e0c2ab778c0861a45e6ac7e"/><dir name="Grouped"><file name="Price.php" hash="baea4892f5aaf3cba6c5724fb62b5488"/></dir><file name="Grouped.php" hash="887b651e2869b4f01e4c700d233d0911"/><file name="Price.php" hash="6b9d4635a15ba577441ab7e9fdc75a8e"/><file name="Simple.php" hash="aee9e32012bfe6ca319868d97e874ad2"/><file name="Virtual.php" hash="25c9a032d4034566f523ff085c9e0145"/></dir><file name="Type.php" hash="3292c47e166dc1cd7f3a3d582c29a307"/><file name="Url.php" hash="31433f0ef54a50a7df0a7dbb526891c1"/><file name="Visibility.php" hash="b661bcce5b13c7a965db54c91726b9d5"/><file name="Website.php" hash="4f8c82955fbef1ec9b480cdfb3ffb0b4"/></dir><file name="Product.php" hash="b46e3627a75733a0d1cbbcf4ee145bf7"/><dir name="Resource"><file name="Abstract.php" hash="e11953fbeeaca598a1686e7de29f1ff6"/><file name="Attribute.php" hash="26504bb8d633845aaf4d4d5e8af7bd73"/><dir name="Category"><dir name="Attribute"><file name="Collection.php" hash="58936d1eccb09f1e00c409016160dfa5"/><dir name="Frontend"><file name="Image.php" hash="b4a53ea143ab7a300e403a66fe0ebdc7"/></dir><dir name="Source"><file name="Layout.php" hash="0f88b9f23cacaf040f9c11d160d1bfe6"/><file name="Mode.php" hash="9ea870023eb8ab6b9b47ff0cd36ef177"/><file name="Page.php" hash="557d5271400bdb65ffed1c31c33d1c9f"/></dir></dir><file name="Collection.php" hash="8cb67cc913e44c130289433b8fae6220"/><dir name="Flat"><file name="Collection.php" hash="7009be903240d0e3f11e4c6f61bb40e9"/></dir><file name="Flat.php" hash="65290f7b31d40c7291c106b1f74da524"/><dir name="Indexer"><file name="Product.php" hash="d24c19cdc021b0f599b8fc8ab62c9b36"/></dir><file name="Tree.php" hash="6dd71f99cfd237ac2b60541e75175bec"/></dir><file name="Category.php" hash="3274d1b6cee403313412468574d2c500"/><dir name="Collection"><file name="Abstract.php" hash="960e831ee7482fb2c863422de7321448"/></dir><file name="Config.php" hash="f0751d1bc0fe0917eb2114843fe469b5"/><dir name="Eav"><file name="Attribute.php" hash="5d38030672070332a3b96c399987300e"/><dir name="Mysql4"><file name="Abstract.php" hash="fec5ae896ed48dc0400c6bec078ce26f"/><file name="Attribute.php" hash="3cd9977f7f6f5cd55472a7ca8eee5d6c"/><dir name="Category"><dir name="Attribute"><file name="Collection.php" hash="e2ef88f78cc1743d888416112a9fb19e"/><dir name="Frontend"><file name="Image.php" hash="3b4bbb408fa469e390d8a23be3b5812c"/></dir><dir name="Source"><file name="Layout.php" hash="1ff45522651f53774670049ea761f6da"/><file name="Mode.php" hash="1a906f1c7d3ee735ee2c10585a35a1ab"/><file name="Page.php" hash="9f55b6962d18bb7562639e902296220c"/></dir></dir><file name="Collection.php" hash="a9c85649d2f1b1be6009e4fc337bcb09"/><dir name="Flat"><file name="Collection.php" hash="078192dc43424ae4e0e2060b62cba1a4"/></dir><file name="Flat.php" hash="1d674915d323e5614e60e1eea390fe9c"/><dir name="Indexer"><file name="Product.php" hash="5b9b697f13db78f46b33fb277d189a94"/></dir><file name="Tree.php" hash="1dcdee5288f75bda0387a9227ae2f47c"/></dir><file name="Category.php" hash="b8d250d3bbd7229866e83646055c6553"/><dir name="Collection"><file name="Abstract.php" hash="f0d3da3442bbd8ed41ae16723fdf1b20"/></dir><file name="Config.php" hash="467ec207f03fb54e7d25c3836381b5b9"/><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="7d80489e6ea0c19670f62d845cea7df3"/><file name="Decimal.php" hash="b94b49abeada423022843d28a85ae39d"/><file name="Price.php" hash="00d4392df59fd6699152c016657b5689"/></dir></dir><dir name="Product"><file name="Action.php" hash="1f51c2b55a40c0e0aca8f7f8444c4c4d"/><dir name="Attribute"><dir name="Backend"><file name="Image.php" hash="2e775535a28167e3d8796fda21d94e0e"/><file name="Media.php" hash="4765cd26146659850e1d131ecd37fd40"/><file name="Tierprice.php" hash="93984939d06a090b100c313b62d4ca2a"/><file name="Urlkey.php" hash="4a77f9e363e9e4a4bb6b123ba1a3e586"/></dir><file name="Collection.php" hash="2396580a34957aa888018fde54294919"/><dir name="Frontend"><file name="Image.php" hash="bd4966494eeb1f05ea7ca52fedae40a7"/><file name="Tierprice.php" hash="4fd1416f762278dc713f4b19165f85c5"/></dir></dir><file name="Collection.php" hash="050506ce256fda2e015c2ae8b4fcbce8"/><dir name="Compare"><dir name="Item"><file name="Collection.php" hash="4f6cbedfb7b83105bbc4492a5f22ffd1"/></dir><file name="Item.php" hash="c9cc3cd5ea2d190d1a35b2b69f3c7a5d"/></dir><dir name="Flat"><file name="Indexer.php" hash="589a7e68689e17fcbb335c5732a6cf8d"/></dir><file name="Flat.php" hash="eca948eb7ace497105c509e4223404f3"/><dir name="Indexer"><file name="Abstract.php" hash="18a0d49dfc3031ce4d6fc0691965e57e"/><dir name="Eav"><file name="Abstract.php" hash="fe08264627b29aa1aa49511a6a6926ed"/><file name="Decimal.php" hash="bb1a0e68127a4b2e052e14213174b6a6"/><file name="Source.php" hash="21f8a6333f52c92030b59a89630759f6"/></dir><file name="Eav.php" hash="542ccf752ce59f3c8aa51e91407c833a"/><dir name="Price"><file name="Configurable.php" hash="741ba6c2a77604ddd83a3e73f7d44535"/><file name="Default.php" hash="fa7e137fce414bc3d564cf48f845cbae"/><file name="Grouped.php" hash="632cb9262af8925aff9fc766a3067b37"/><file name="Interface.php" hash="721633f30ee0c94d5325091329ef882d"/></dir><file name="Price.php" hash="b3f651ea4b47138f8d501c99388dcd41"/></dir><dir name="Link"><file name="Collection.php" hash="a7a7c84016d4b0d3ebd7932607360957"/><dir name="Product"><file name="Collection.php" hash="ff8f31e04293ae0439090f4b58e9fe91"/></dir></dir><file name="Link.php" hash="6dc93b2a6c467acb24849199a333fdbb"/><dir name="Option"><file name="Collection.php" hash="4c0bd5299489d93173a85c21c4f97a08"/><dir name="Value"><file name="Collection.php" hash="56a46ae9076e1343802dd7a6bd9fa21e"/></dir><file name="Value.php" hash="a12d798dc0e154896bba73732378d451"/></dir><file name="Option.php" hash="aef68a293d35b76735dbb3c7d586f737"/><file name="Relation.php" hash="9f1f38762dc49d15f88d194ba786a125"/><file name="Status.php" hash="c3d1d93f92128e897c2084a5c9338f94"/><dir name="Type"><dir name="Configurable"><dir name="Attribute"><file name="Collection.php" hash="3ce9b172d0f135d22c9447bfcfbe3695"/></dir><file name="Attribute.php" hash="5f66e38a4b18b5c2a61a3013cbeb36f1"/><dir name="Product"><file name="Collection.php" hash="76a60de645b1cf7e83281dd1f330cc84"/></dir></dir><file name="Configurable.php" hash="2e5de82551035112b4a32995eba29c52"/></dir><file name="Website.php" hash="8ac7919ab6445402f9c2da77a2915fb8"/></dir><file name="Product.php" hash="dc7e8ec8dc8b1fcc33783e1d2dd4c045"/><dir name="Sendfriend"><file name="Collection.php" hash="59042bef7888faf4785700b041764066"/></dir><file name="Sendfriend.php" hash="d6ab684eac529ef563075f3908ec522b"/><file name="Setup.php" hash="04290127a98dcfdf08d5b6f00c629afc"/><file name="Url.php" hash="f5b271ed01262736003047147a31f035"/></dir></dir><dir name="Helper"><file name="Mysql4.php" hash="11438e483612518abea5575579b49266"/></dir><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="371bfffeb8b70149931ff8b38bbf801a"/><file name="Decimal.php" hash="76554717f86f55fd148f31be71810b36"/><file name="Price.php" hash="48376110c5346e18c80ffbca2547296d"/></dir></dir><dir name="Product"><file name="Action.php" hash="0d6bf5ae194c3522e15c98f31f37e78b"/><dir name="Attribute"><dir name="Backend"><dir name="Groupprice"><file name="Abstract.php" hash="a6e3e267cdf11af6f2ae1fcc948f173d"/></dir><file name="Groupprice.php" hash="214ace8c07913f70857fefc8a3091c0b"/><file name="Image.php" hash="95c78004fb3e9c20d566b30cee310b67"/><file name="Media.php" hash="47fd9d8f048a20a635b8edbd7ca5812a"/><file name="Tierprice.php" hash="f0e692f7bf1d29e667a9a71414bbb9b0"/><file name="Urlkey.php" hash="0605a3595dfc96acaeeecdbb84766807"/></dir><file name="Collection.php" hash="b33fa37d5fa8cb161fefd6d4c0753fa7"/><dir name="Frontend"><file name="Image.php" hash="e72df9dead7c27415e03e3b454085e14"/><file name="Tierprice.php" hash="81c63277524ed1b2b70bd9694d18c33a"/></dir></dir><file name="Collection.php" hash="d5a59183693a8f3a983c0e92318a1e3b"/><dir name="Compare"><dir name="Item"><file name="Collection.php" hash="9ba5594d68d345053bfc1fef3bdf90bb"/></dir><file name="Item.php" hash="a0619e7fb617034731cf65b8254b45a0"/></dir><dir name="Flat"><file name="Indexer.php" hash="0f37bc3f3a9e4d80758276e1ca14bd65"/></dir><file name="Flat.php" hash="b7134dc04eaa5f4816818a84f885da0e"/><dir name="Indexer"><file name="Abstract.php" hash="a26b5496f5a4c01c095e6d5337d0a7fc"/><dir name="Eav"><file name="Abstract.php" hash="878027ae169af53df47dd81ff5c4efac"/><file name="Decimal.php" hash="352267095b95f183f8d05c4b2da65dfd"/><file name="Source.php" hash="0f87e7cf65932cc08d22e78058cb4921"/></dir><file name="Eav.php" hash="21f382c28fe53739401a7d7b1631a252"/><dir name="Price"><file name="Configurable.php" hash="98e0d7ad60a4ba2362645da44459a156"/><file name="Default.php" hash="5d576b371baf194478dddc357976db74"/><file name="Grouped.php" hash="22c1c9360f2f795a404114331f045326"/><file name="Interface.php" hash="b8647f719b87f050dabcbe65f45e310d"/></dir><file name="Price.php" hash="99157d8fa86d3ed5be75c729e1577ab6"/></dir><dir name="Link"><file name="Collection.php" hash="56cab4cf9838358bcec7dff5fde2d384"/><dir name="Product"><file name="Collection.php" hash="b13cd35c223f3a7e6e4d9ba23ae2c0dd"/></dir></dir><file name="Link.php" hash="9352804e22afde329113e28069f5a016"/><dir name="Option"><file name="Collection.php" hash="8b9153db40d540e67b39119571925ab9"/><dir name="Value"><file name="Collection.php" hash="7c85bdbb63fb94b971bd97de4afc78d9"/></dir><file name="Value.php" hash="c5a31ad9328f651ac0f7890c8dd8db61"/></dir><file name="Option.php" hash="e76c073bd5d74d790c40b4b8478d6d63"/><file name="Relation.php" hash="0df8f410acf3ca869909c2057483bb23"/><file name="Status.php" hash="5cdcc578414e085cff014758db4a24d1"/><dir name="Type"><dir name="Configurable"><dir name="Attribute"><file name="Collection.php" hash="1ec0097d014793bc56770bc4f43a4d2a"/></dir><file name="Attribute.php" hash="7dba7704392f32cdc4ac004aa063abba"/><dir name="Product"><file name="Collection.php" hash="f07a3451715df0d8a15dc78285dea26c"/></dir></dir><file name="Configurable.php" hash="77f1e34c147dd0ebdc75d843f773dca1"/></dir><file name="Website.php" hash="327a5306a6f6cb15de7039c44b0497ee"/></dir><file name="Product.php" hash="e6703ac8bd516deb358a5762f8a1a8a0"/><file name="Setup.php" hash="f1c56f2dde18c6a5b7920a89ce416fa5"/><file name="Url.php" hash="a8f0db7dd902d57c84d7559c3006fc8a"/></dir><file name="Session.php" hash="c98c1c30ad83e073310c12204e76e108"/><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Catalog"><dir name="Category"><file name="Flat.php" hash="804cc67fcf6ca8db4fd3939b604c7cd9"/></dir><dir name="Product"><file name="Flat.php" hash="28a32826393ce3dc927b5b61c799136c"/></dir><dir name="Url"><dir name="Rewrite"><file name="Suffix.php" hash="804f66f8abddd0770e5a8d58469f3691"/></dir></dir></dir></dir></dir></dir><dir name="Template"><file name="Filter.php" hash="12a65323e1eacc536e9c14436d27173b"/></dir><file name="Url.php" hash="5b01d1ebce6cc01efd52c20f4818bf41"/></dir><dir name="sql"><dir name="catalog_setup"><file name="install-1.6.0.0.php" hash="982fb6352e0e7a49fd61d518b456eb8a"/><file name="mysql4-data-upgrade-0.7.57-0.7.58.php" hash="dfc18bb800cfde6020a951265fe62f8e"/><file name="mysql4-data-upgrade-0.7.63-0.7.64.php" hash="d91c5493cd2a597edcbf556e212d4741"/><file name="mysql4-data-upgrade-1.4.0.0.28-1.4.0.0.29.php" hash="3818bedb30f945f3146620ef330847ef"/><file name="mysql4-data-upgrade-1.4.0.0.42-1.4.0.0.43.php" hash="88ef36bdc70492ec1ce27c8abd585fc6"/><file name="mysql4-install-0.7.0.php" hash="6d56c529f68ef31ed41d47b97fe8d6c0"/><file name="mysql4-install-1.4.0.0.0.php" hash="32c7ddec7d7938f9923b222b0f699429"/><file name="mysql4-upgrade-0.6.40-0.7.0.php" hash="14d330802d294c4bbbcb23ca3b4e7a61"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="1c98efca82784e87a2bc17a5b8e6e466"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="fbeb032d50fdd80fd987d8d15bcdde60"/><file name="mysql4-upgrade-0.7.11-0.7.12.php" hash="32b043fbe235b2a6095969666766701f"/><file name="mysql4-upgrade-0.7.12-0.7.13.php" hash="2c333a67ccb85b3b0c3fe6594a9c9fc6"/><file name="mysql4-upgrade-0.7.13-0.7.14.php" hash="f3e99f8f7908706550d8440e16e509b3"/><file name="mysql4-upgrade-0.7.14-0.7.15.php" hash="311aaa9e49e770e527216c5a338df154"/><file name="mysql4-upgrade-0.7.15-0.7.16.php" hash="1f7b814ed6b28ffdce0e0d68b54f31af"/><file name="mysql4-upgrade-0.7.16-0.7.17.php" hash="2c333a67ccb85b3b0c3fe6594a9c9fc6"/><file name="mysql4-upgrade-0.7.17-0.7.18.php" hash="df70feec51961c39c06b09ab7f970a46"/><file name="mysql4-upgrade-0.7.18-0.7.19.php" hash="dbe182f5c9ea854e5ba1c2b18117e87b"/><file name="mysql4-upgrade-0.7.19-0.7.20.php" hash="32b043fbe235b2a6095969666766701f"/><file name="mysql4-upgrade-0.7.20-0.7.21.php" hash="220f6ea6cf76e77996b823ec1a1d6e44"/><file name="mysql4-upgrade-0.7.2-0.7.3.php" hash="cf27fb0124081d1fefc1c04946adf6de"/><file name="mysql4-upgrade-0.7.21-0.7.22.php" hash="a379adafcda21596148a2f8bf1d9682b"/><file name="mysql4-upgrade-0.7.22-0.7.23.php" hash="54b90012bd748bcb5924333126f0ab12"/><file name="mysql4-upgrade-0.7.23-0.7.24.php" hash="1e696686066ac38039f6042db6b82fbe"/><file name="mysql4-upgrade-0.7.24-0.7.25.php" hash="598f21eaf3188b66d71e5158a951526b"/><file name="mysql4-upgrade-0.7.25-0.7.26.php" hash="598f21eaf3188b66d71e5158a951526b"/><file name="mysql4-upgrade-0.7.26-0.7.27.php" hash="129381d8fcc97e872f78a4b9dccb708d"/><file name="mysql4-upgrade-0.7.27-0.7.28.php" hash="0aa391a4784e266e5e3b322fc7433fae"/><file name="mysql4-upgrade-0.7.28-0.7.29.php" hash="fbbf953870d2f65651720b3b1eca714e"/><file name="mysql4-upgrade-0.7.29-0.7.30.php" hash="4719d1b78ecfcb4c16a69f0af900ad67"/><file name="mysql4-upgrade-0.7.30-0.7.31.php" hash="b8399457e4ced2ad07491c3801895b8f"/><file name="mysql4-upgrade-0.7.31-0.7.32.php" hash="a76dac5f02b400884701a90382b268cb"/><file name="mysql4-upgrade-0.7.32-0.7.33.php" hash="392cd84f23752470fb6b7109e833de96"/><file name="mysql4-upgrade-0.7.33-0.7.34.php" hash="11bbfcfc6a131f1c1f262a962b40b05d"/><file name="mysql4-upgrade-0.7.34-0.7.35.php" hash="a1bd0eb394d10ee477bc06d7f8249d86"/><file name="mysql4-upgrade-0.7.35-0.7.36.php" hash="cee71fbbb5fb15dfe8aa79226f97aa42"/><file name="mysql4-upgrade-0.7.36-0.7.37.php" hash="0b019772e287ffe4160df566d4d2d588"/><file name="mysql4-upgrade-0.7.37-0.7.38.php" hash="400ab90a2d546f9f223cd5c260a720c0"/><file name="mysql4-upgrade-0.7.38-0.7.39.php" hash="3fd3d22a84af39c690e66e0988acb8a2"/><file name="mysql4-upgrade-0.7.39-0.7.40.php" hash="e35ef7bd4cd9ef46cfd54c1ae55bec83"/><file name="mysql4-upgrade-0.7.40-0.7.41.php" hash="214c49286c4facddfbccc50aadb50366"/><file name="mysql4-upgrade-0.7.4-0.7.5.php" hash="4108821c59117b57eaa51624fafa5e2c"/><file name="mysql4-upgrade-0.7.41-0.7.42.php" hash="92ca2b8befc3b446e1dbfbd5a7f432d9"/><file name="mysql4-upgrade-0.7.43-0.7.44.php" hash="4c772d38f1082bc1bb954b34c2ca9afa"/><file name="mysql4-upgrade-0.7.44-0.7.45.php" hash="fe1d11ca2fc0da4507a7bd0fcf8abfd1"/><file name="mysql4-upgrade-0.7.45-0.7.46.php" hash="771bad200ed8686a93d01f78adb0339c"/><file name="mysql4-upgrade-0.7.46-0.7.47.php" hash="283e3a0206033c523b7e4d8e2ac2a2fa"/><file name="mysql4-upgrade-0.7.47-0.7.48.php" hash="d54ed8cecc525b225bf8e72ac802f192"/><file name="mysql4-upgrade-0.7.48-0.7.49.php" hash="c09b37865b84f0e36bd3f199de743ffc"/><file name="mysql4-upgrade-0.7.49-0.7.50.php" hash="5fe092cf7191551179204f6d0acd0632"/><file name="mysql4-upgrade-0.7.50-0.7.51.php" hash="58d529dacfc06d7da6a94918ea646240"/><file name="mysql4-upgrade-0.7.5-0.7.6.php" hash="9110a8b68711e77c791d2ad9cc156bc4"/><file name="mysql4-upgrade-0.7.51-0.7.52.php" hash="4a916a4a3557ea131ff1865e74dd7a34"/><file name="mysql4-upgrade-0.7.52-0.7.53.php" hash="e7d94166d4d6a80c28731371282ae2ba"/><file name="mysql4-upgrade-0.7.53-0.7.54.php" hash="15c9ca280bdf99305b63281327555974"/><file name="mysql4-upgrade-0.7.54-0.7.55.php" hash="578d3eaae3e22ac5d4d366aabf36e03e"/><file name="mysql4-upgrade-0.7.55-0.7.56.php" hash="61e4a0df6e4bceb5863cfff29fc162df"/><file name="mysql4-upgrade-0.7.56-0.7.57.php" hash="f10bd4e0fe09b189e672cfdea1ca195b"/><file name="mysql4-upgrade-0.7.57-0.7.58.php" hash="53f71b8ad2571a6980b6eed1e20a7f41"/><file name="mysql4-upgrade-0.7.58-0.7.59.php" hash="6cd94ecd75f6d9b86f7b9903b6d12f79"/><file name="mysql4-upgrade-0.7.59-0.7.60.php" hash="e619a24252aadd843a5eaa9273528e21"/><file name="mysql4-upgrade-0.7.60-0.7.61.php" hash="a5990ab2248a9632f8e57a2d9fcd0468"/><file name="mysql4-upgrade-0.7.6-0.7.7.php" hash="32b043fbe235b2a6095969666766701f"/><file name="mysql4-upgrade-0.7.61-0.7.62.php" hash="762847b725d5fd594beba37f03363163"/><file name="mysql4-upgrade-0.7.62-0.7.63.php" hash="bee5f46108602066f28d5b8c53295305"/><file name="mysql4-upgrade-0.7.63-0.7.64.php" hash="95574b3b50ffb43f0048a00fd68b9db0"/><file name="mysql4-upgrade-0.7.64-0.7.65.php" hash="e2fb72d2fab5b8d0ac6c0df34f6af12e"/><file name="mysql4-upgrade-0.7.65-0.7.66.php" hash="133cd07a7501c6b0f769c6fcd09e55c8"/><file name="mysql4-upgrade-0.7.66-0.7.67.php" hash="dd74be8f48ddedde01bb5bf3c94cb950"/><file name="mysql4-upgrade-0.7.67-0.7.68.php" hash="d325bf970a80b2eb51040c26d0f0836f"/><file name="mysql4-upgrade-0.7.68-0.7.69.php" hash="8af4a3d517b329b3e0871d4a23f77117"/><file name="mysql4-upgrade-0.7.69-0.7.70.php" hash="e4aad2635fa22ef142a47fd929e68949"/><file name="mysql4-upgrade-0.7.70-0.7.71.php" hash="13c1c3aa4b1e59f5a8488492911ef85c"/><file name="mysql4-upgrade-0.7.7-0.7.8.php" hash="1e81214c778693970143870774b30369"/><file name="mysql4-upgrade-0.7.71-0.7.72.php" hash="5b045571a2e662f10e784fe7a27e6eaa"/><file name="mysql4-upgrade-0.7.72-0.7.73.php" hash="725b0b5ac584a5db4c4ac4024efa4ff6"/><file name="mysql4-upgrade-0.7.73-1.4.0.0.0.php" hash="b197fcfdc43aa685116d3b40e4e6a89f"/><file name="mysql4-upgrade-0.7.8-0.7.9.php" hash="54e1ab8f464f948952c51e25984683c8"/><file name="mysql4-upgrade-1.4.0.0.0-1.4.0.0.1.php" hash="b22a7d04eaed58de2d7ea6ef21bb51ac"/><file name="mysql4-upgrade-1.4.0.0.10-1.4.0.0.11.php" hash="b5e5b0f2caa137097a3c4cd31483ff1f"/><file name="mysql4-upgrade-1.4.0.0.11-1.4.0.0.12.php" hash="a9326930bf3bf128ae62417c9ca57b71"/><file name="mysql4-upgrade-1.4.0.0.1-1.4.0.0.2.php" hash="7d60933a7353919405908b05a4cab6ad"/><file name="mysql4-upgrade-1.4.0.0.12-1.4.0.0.13.php" hash="3a19c9b4a2a660aa4c28477450e7edb8"/><file name="mysql4-upgrade-1.4.0.0.13-1.4.0.0.14.php" hash="13ba066ce8d561246ef97ed4e8101530"/><file name="mysql4-upgrade-1.4.0.0.14-1.4.0.0.15.php" hash="ac867e50fb46d6ce8aceb83e4c401cf7"/><file name="mysql4-upgrade-1.4.0.0.15-1.4.0.0.16.php" hash="9cf5bab7b0d76f2cc81b0c2e76585f68"/><file name="mysql4-upgrade-1.4.0.0.16-1.4.0.0.17.php" hash="96ce2ff7f4cf967e07c4561790c84955"/><file name="mysql4-upgrade-1.4.0.0.17-1.4.0.0.18.php" hash="a9a3b58a1bc7812de03643f74876f3fa"/><file name="mysql4-upgrade-1.4.0.0.18-1.4.0.0.19.php" hash="f9c9e2d8a6e143df652232c5be3f289d"/><file name="mysql4-upgrade-1.4.0.0.19-1.4.0.0.20.php" hash="1ead9ab71bd0a5579780ad05092a351b"/><file name="mysql4-upgrade-1.4.0.0.20-1.4.0.0.21.php" hash="54358351366d3bb3d048a3a22491cf05"/><file name="mysql4-upgrade-1.4.0.0.21-1.4.0.0.22.php" hash="7822d6b18f17b48e3f0f2b838abfd37f"/><file name="mysql4-upgrade-1.4.0.0.2-1.4.0.0.3.php" hash="1db498452bc698b2f8f54c704c95b68e"/><file name="mysql4-upgrade-1.4.0.0.22-1.4.0.0.23.php" hash="bdc31bcafa9ad7fa9adfbb24b92ab916"/><file name="mysql4-upgrade-1.4.0.0.23-1.4.0.0.24.php" hash="3819ad8993293b85ca4cc93bb4f8a2b5"/><file name="mysql4-upgrade-1.4.0.0.24-1.4.0.0.25.php" hash="21e940cefa00a40a7ab29bf4809ef660"/><file name="mysql4-upgrade-1.4.0.0.25-1.4.0.0.26.php" hash="e1265bc263b705541430b8ab677b6244"/><file name="mysql4-upgrade-1.4.0.0.26-1.4.0.0.27.php" hash="c0ce662f94cc14d92c0fcc83ac3cb970"/><file name="mysql4-upgrade-1.4.0.0.27-1.4.0.0.28.php" hash="8e77a8896817b458b3a05a456161e4d8"/><file name="mysql4-upgrade-1.4.0.0.28-1.4.0.0.29.php" hash="934df90496b8c4c54aa20ac306305f9b"/><file name="mysql4-upgrade-1.4.0.0.30-1.4.0.0.31.php" hash="c2b135eae6838a795c533d911707390d"/><file name="mysql4-upgrade-1.4.0.0.31-1.4.0.0.32.php" hash="a75f6db7e7079ae8e86e3fb593015dda"/><file name="mysql4-upgrade-1.4.0.0.3-1.4.0.0.4.php" hash="60488ba899ac280017b6b74b32825ba5"/><file name="mysql4-upgrade-1.4.0.0.32-1.4.0.0.33.php" hash="df2810115655224359101f1e2e503d0c"/><file name="mysql4-upgrade-1.4.0.0.33-1.4.0.0.34.php" hash="858b0b7870d1ea3f2aa27ed9f8dbea60"/><file name="mysql4-upgrade-1.4.0.0.34-1.4.0.0.35.php" hash="621583cb65c9f66eec97f80ebaa74252"/><file name="mysql4-upgrade-1.4.0.0.35-1.4.0.0.36.php" hash="c2a258fa122b120a5dcc7562a0420c76"/><file name="mysql4-upgrade-1.4.0.0.36-1.4.0.0.37.php" hash="7613c541fc91b024d45841f06cc1cc62"/><file name="mysql4-upgrade-1.4.0.0.37-1.4.0.0.38.php" hash="f1067df5b98e728051e50b829bb0a303"/><file name="mysql4-upgrade-1.4.0.0.38-1.4.0.0.39.php" hash="13708f8b08f42abf0609258cc0906158"/><file name="mysql4-upgrade-1.4.0.0.39-1.4.0.0.40.php" hash="c6e890c3b1c5aa48efcf21d1233ecc64"/><file name="mysql4-upgrade-1.4.0.0.40-1.4.0.0.41.php" hash="8dfb06efe3d3145030730ac06f04796b"/><file name="mysql4-upgrade-1.4.0.0.41-1.4.0.0.42.php" hash="de02f83acccc228664a6fcaa28b10bf9"/><file name="mysql4-upgrade-1.4.0.0.4-1.4.0.0.5.php" hash="4a7b3d044d1d345c322e5c8de10b7c01"/><file name="mysql4-upgrade-1.4.0.0.43-1.4.0.0.44.php" hash="59ba96b8b6f4feeeb35d0b56da570c58"/><file name="mysql4-upgrade-1.4.0.0.5-1.4.0.0.6.php" hash="d20d5182f7047e64b5be39cc5ed2d427"/><file name="mysql4-upgrade-1.4.0.0.6-1.4.0.0.7.php" hash="ea4be62dd4b9fdffb2e4ff7958909be7"/><file name="mysql4-upgrade-1.4.0.0.7-1.4.0.0.8.php" hash="2f57e3d83a2b7a23966cfcc8a3070623"/><file name="mysql4-upgrade-1.4.0.0.8-1.4.0.0.9.php" hash="4e9c449b4e0a0debc26f670127a24bee"/><file name="mysql4-upgrade-1.4.0.0.9-1.4.0.0.10.php" hash="bfcd201cdf917b3bae73fd07ce257e85"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="411b20fedb1689c0226b886807445ec6"/><file name="mysql4-upgrade-1.6.0.0.8-1.6.0.0.9.php" hash="a03f0f16ac3bc565f547103974871a63"/><file name="upgrade-1.6.0.0.10-1.6.0.0.11.php" hash="c57992c4fd0168a5649d0914da6a8aa1"/><file name="upgrade-1.6.0.0.11-1.6.0.0.12.php" hash="112937031398e6f18be90b5ac3020196"/><file name="upgrade-1.6.0.0.1-1.6.0.0.2.php" hash="1df97005797ee1347aa92fa1c86d52cf"/><file name="upgrade-1.6.0.0.14-1.6.0.0.15.php" hash="c3be6d470138e508f59f8a0e1a6b6a8b"/><file name="upgrade-1.6.0.0.15-1.6.0.0.18.php" hash="6857e664e5bf33655f80509571dabfce"/><file name="upgrade-1.6.0.0-1.6.0.0.1.php" hash="1f174d3f3a36bdc468c419d1ba51e8de"/><file name="upgrade-1.6.0.0.2-1.6.0.0.3.php" hash="20ae5b3ae184a64f06ab4a1a8eac8266"/><file name="upgrade-1.6.0.0.3-1.6.0.0.4.php" hash="25c45a8eb6ed1da8d78e5c898fd2378f"/><file name="upgrade-1.6.0.0.4-1.6.0.0.5.php" hash="c9a58b29d41804208479121cfca91b0f"/><file name="upgrade-1.6.0.0.5-1.6.0.0.6.php" hash="2a3b132ddc02277d7f2680babe7dd015"/><file name="upgrade-1.6.0.0.6-1.6.0.0.7.php" hash="ff6032305fd04e2d37e0cc988774add8"/><file name="upgrade-1.6.0.0.7-1.6.0.0.8.php" hash="6a657e8dd4a49f348bba1b0f9bdc471e"/><file name="upgrade-1.6.0.0.9-1.6.0.0.10.php" hash="d0679e6cddc9465a6fcd49f4c2be1472"/></dir></dir></dir><dir name="CatalogIndex"><dir name="etc"><file name="config.xml" hash="cebed1209dcba034a684d003ee164a26"/></dir><dir name="Model"><file name="Aggregation.php" hash="d31e49e4021a25c8f0b8002b2df8f3eb"/><file name="Attribute.php" hash="8216005a3b312041d757b2f3141ed544"/><dir name="Catalog"><dir name="Index"><file name="Flag.php" hash="728d0d63881d0b92ffc306ec38fa4b38"/><dir name="Kill"><file name="Flag.php" hash="f692c8bb0d0971fb48fefb8fe7805efc"/></dir></dir></dir><dir name="Data"><file name="Abstract.php" hash="8e2c4bb22434751a580849560a0cb9e4"/><file name="Configurable.php" hash="99dba1fe074934df8a4bec5778a48139"/><file name="Grouped.php" hash="4567ab11ecf80d24feeb7b97588c7efe"/><file name="Simple.php" hash="9f7f40c69f9a7e6bc8851aa3ac0db6b1"/><file name="Virtual.php" hash="137215f3def15a5d66cc081b4d85bfeb"/></dir><dir name="Indexer"><file name="Abstract.php" hash="6ebb9a615befc97f163effbe3a337a57"/><file name="Eav.php" hash="48b369448ea565d1119e376fe0a10683"/><file name="Interface.php" hash="acdcc5ce1636212a561eddc59c3d5901"/><file name="Minimalprice.php" hash="883207d73852f406bc14da408c87238f"/><file name="Price.php" hash="d3ae232790da240f246a8d8cb2ad51b4"/><file name="Tierprice.php" hash="cb4390bd83f138bfdaa416280b8b070b"/></dir><file name="Indexer.php" hash="eaff59988ae56d15eb9299a393d9691d"/><dir name="Mysql4"><file name="Abstract.php" hash="523c30db0456b0a4d76a9bbd61aa1776"/><file name="Aggregation.php" hash="2186d569ca18fae53e2499f35e3d8bb6"/><file name="Attribute.php" hash="f61020eba9f656d9c581605331bd4b29"/><dir name="Data"><file name="Abstract.php" hash="0dbcb1e2e9cd55b95da9babb1c368978"/><file name="Configurable.php" hash="3e789a4925423e77bba4fec002a27e1f"/><file name="Grouped.php" hash="e3565acd1c7c98d576513a0a36867542"/></dir><dir name="Indexer"><file name="Abstract.php" hash="e8a0f9b01068bd9cdb3f54b9e2bbe9f6"/><file name="Eav.php" hash="ca386fb5c4d18025865af05efa5450fb"/><file name="Minimalprice.php" hash="f7053c7fd96aa26c6d385cb6e78a7f63"/><file name="Price.php" hash="6fa37730276d08f0599a7cee047a0ae1"/></dir><file name="Indexer.php" hash="ff634d986f1df8b265f576ab582f380d"/><file name="Price.php" hash="2e57ec66396ad0a1d33e2dcf836d372b"/><file name="Retreiver.php" hash="65dce2aa9cfbfd1d493f9da051895e8f"/><file name="Setup.php" hash="736cb9b99704d1d598c5526927743eb4"/></dir><file name="Observer.php" hash="d5031f11f182cd2c45d8c6d8c29bf53a"/><file name="Price.php" hash="00aa112b88eb078b61f5dabdec0293aa"/><dir name="Resource"><file name="Abstract.php" hash="b920d7e7d112815e18a505d3f9dd2b46"/><file name="Aggregation.php" hash="bb47797aefe50331eebc86956db3d505"/><file name="Attribute.php" hash="fceeb63c9a269a608c21b09dbf5277a3"/><dir name="Data"><file name="Abstract.php" hash="81efe64c5fa7122a30c4ed9ad87a66b0"/><file name="Configurable.php" hash="6e66e5369c0a2e9c85452c525d042a43"/><file name="Grouped.php" hash="70ccf67828dec422cc145e6f6e99983c"/></dir><dir name="Indexer"><file name="Abstract.php" hash="68414164d4ca4999af35421dfa7ba818"/><file name="Eav.php" hash="846addf70a651913144821681505f897"/><file name="Minimalprice.php" hash="4979be41b6e0f47210cc2977d80a178a"/><file name="Price.php" hash="808a3c1854ef88da56d2c04045826a38"/></dir><file name="Indexer.php" hash="210c0051d7e1840ad319260053774063"/><file name="Price.php" hash="dbfb03440574a3a591c54a8653ddea38"/><file name="Retreiver.php" hash="76f160263f80ce8906fa3c79c18aec77"/><file name="Setup.php" hash="ff6b8df2c48eb62465e6fb4bb704d746"/></dir><file name="Retreiver.php" hash="ad9dc6f9fe7744cd8053ee17cccb890c"/></dir><dir name="sql"><dir name="catalogindex_setup"><file name="install-1.6.0.0.php" hash="860ecb17811929019c3a6a6c0f4d6a7f"/><file name="mysql4-install-0.7.0.php" hash="1a4e1811125019c9356a150eca8de536"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="945cbff1870a44283b7fc382412dff76"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="1a126427d9bce784ef15ee7616da30a7"/><file name="mysql4-upgrade-0.7.2-0.7.3.php" hash="93fc44a3c00ee722c8cf98837e46f863"/><file name="mysql4-upgrade-0.7.3-0.7.4.php" hash="3ede4b2b68b2f346cff2893c25365903"/><file name="mysql4-upgrade-0.7.4-0.7.5.php" hash="e2e9b65960a14bb68370d109bfc97f36"/><file name="mysql4-upgrade-0.7.5-0.7.6.php" hash="66f4e131d6ae952954d3e1cf94882a9c"/><file name="mysql4-upgrade-0.7.6-0.7.7.php" hash="ab51d401b05f7e6e1e60ccff902a8618"/><file name="mysql4-upgrade-0.7.7-0.7.8.php" hash="ad87f9a12f527b713ce5016f2cf470d3"/><file name="mysql4-upgrade-0.7.8-0.7.9.php" hash="2f1dbe24ccbd7f8339ea0939747e61b7"/><file name="mysql4-upgrade-0.7.9-0.7.10.php" hash="5215cbfd7585b9008237d62cfe3227b8"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="59ac52b921d06c5d1e0b92b84f7b2453"/></dir></dir></dir><dir name="CatalogInventory"><dir name="Block"><dir name="Adminhtml"><dir name="Form"><dir name="Field"><file name="Customergroup.php" hash="0498233e3abf33b20e6b09f602a5d2aa"/><file name="Minsaleqty.php" hash="d5a530a0fa1a96f1f4fa0ef3a93614b3"/></dir></dir></dir><file name="Qtyincrements.php" hash="3d1dfa08d508213b95336415ae9c61bc"/><dir name="Stockqty"><file name="Abstract.php" hash="f6d1c072c97daa2e7644b503916935c2"/><file name="Composite.php" hash="5446215704ddf0eccb0552da10683bf1"/><file name="Default.php" hash="e34ac54facdf2a4341360025f538759c"/><dir name="Type"><file name="Configurable.php" hash="030d96a3b4e47180f303f22495e705c1"/><file name="Grouped.php" hash="cb09313a5d12922efea9ad0554e5eacb"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="b17aca3af7c9b6f4d74ddb0d60d32d46"/><file name="api2.xml" hash="39f61c116e921d8c809780f45ddd2072"/><file name="api.xml" hash="341d5615343ca642faa846961a07a43a"/><file name="config.xml" hash="64da0ae1099eb28df78d9c16bbf0932d"/><file name="system.xml" hash="fe8fc14697c4056b750a2cead503f8f3"/><file name="wsdl.xml" hash="cfad5924eb32b8fb7ccf79309e5966df"/><file name="wsi.xml" hash="ec7bdd8cb2bc5dd12c0a4d865fe3d313"/></dir><dir name="Helper"><file name="Data.php" hash="4474095b8f0f7df69a780e9e91b7bcad"/><file name="Minsaleqty.php" hash="50de78c2d77ca61c14a0da39596a3b5f"/></dir><dir name="Model"><dir name="Api2"><dir name="Stock"><dir name="Item"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="d2750ff1cf07a2a841fbfef5d94e45fc"/></dir></dir><file name="Rest.php" hash="ff5ac4da52ee994b62aa7e0c7b490129"/><dir name="Validator"><file name="Item.php" hash="dd54a19910798771a536d48ab091e7db"/></dir></dir><file name="Item.php" hash="08bf42c3ae095995d25be2c8ef260eed"/></dir></dir><dir name="Indexer"><file name="Stock.php" hash="c980c19adbd3d5328393dd13d9a992fe"/></dir><dir name="Mysql4"><dir name="Indexer"><dir name="Stock"><file name="Configurable.php" hash="758cc6a7fabe488fb211e9e773791da1"/><file name="Default.php" hash="e8de50709391dde190379b7a1a1e51ee"/><file name="Grouped.php" hash="477a78ee8f78dbcdff286a8f865a1c56"/><file name="Interface.php" hash="ec5d055223a7fa3b29f51b47e27739e8"/></dir><file name="Stock.php" hash="a718e7580c584474251ef1fa6c1767ed"/></dir><dir name="Stock"><dir name="Item"><file name="Collection.php" hash="edee6ba7e7afa1470c9dd93244441491"/></dir><file name="Item.php" hash="99d4ac7b1db4b366a1aebf46ff13601e"/><file name="Status.php" hash="2845db012621452afb827f783ed30e71"/></dir><file name="Stock.php" hash="31c806ccca7b815a934815cdf7df8ea8"/></dir><file name="Observer.php" hash="d04a655b588b064a497f68a08c648be9"/><dir name="Resource"><dir name="Indexer"><dir name="Stock"><file name="Configurable.php" hash="eebcbc9337eee04eeb803d364fbb5579"/><file name="Default.php" hash="1019d4309ea8b9a5367823e2247523b9"/><file name="Grouped.php" hash="9374c4605bc457c74b1bd6db1f4f7ce5"/><file name="Interface.php" hash="5fc78d99b18a885ba29dfa162ef1323e"/></dir><file name="Stock.php" hash="7f81f24dc748a4b0038de8c46df3be45"/></dir><dir name="Stock"><dir name="Item"><file name="Collection.php" hash="8d4a97ad236196c1399b8970220e21e3"/></dir><file name="Item.php" hash="9e4e7422e75ed3297e2bbc786a270208"/><file name="Status.php" hash="6343582af9d0e202f3305db3c5ef9b01"/></dir><file name="Stock.php" hash="22c041ea9ed0de9ccc85fc86d2a0ddce"/></dir><dir name="Source"><file name="Backorders.php" hash="cf37f61676f9b7cd1537212a135d0003"/><file name="Stock.php" hash="10cbe3d356bd410faa68b3b0be15db04"/></dir><dir name="Stock"><dir name="Item"><dir name="Api"><file name="V2.php" hash="7fd26b45378a8b055f504a3a3eb198a5"/></dir><file name="Api.php" hash="e066c3bfcfe24b3959105e5fca1e977a"/></dir><file name="Item.php" hash="a307fac47a364d05c502702b03cdf415"/><file name="Status.php" hash="a39f6081db8f6579b51a8b340fd5b234"/></dir><file name="Stock.php" hash="9250bc10daf246bb45535a8b60a8855d"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Minqty.php" hash="e447a9a06aa8cc32c4016dbacf726898"/><file name="Minsaleqty.php" hash="ab2e9a7ca9f0f62977c9354cbe339c69"/><file name="Qtyincrements.php" hash="691c45b58ac705d8e7ed724825304aa2"/></dir></dir></dir></dir><dir name="sql"><dir name="cataloginventory_setup"><file name="install-1.6.0.0.php" hash="d2be040a825afd6214a26690c49a0cab"/><file name="mysql4-install-0.7.0.php" hash="b57e148f4fdea171ed2364dde009ffe1"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="e75d3bc6081ebee614933421f4a66d26"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="56fe7c36081664263d7e73889a48fe4d"/><file name="mysql4-upgrade-0.7.2-0.7.3.php" hash="25e0385b2d6353e4fd6caedad18318c3"/><file name="mysql4-upgrade-0.7.3-0.7.4.php" hash="5bee2a36440e1ae1505ed299f8203be3"/><file name="mysql4-upgrade-0.7.4-0.7.5.php" hash="8a4a14d587c4d5edec4a349888c1e539"/><file name="mysql4-upgrade-0.7.5-0.7.6.php" hash="5806390faabe64ee57ca1b6403e3cc4a"/><file name="mysql4-upgrade-0.7.6-0.7.7.php" hash="bd765a760d859e14d3a1aa68ee42b788"/><file name="mysql4-upgrade-0.7.7-0.7.8.php" hash="75d577f989a5595a17a29f84fe68ad5a"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="3dd540283ab6f7e9f66d9eb89764d739"/><file name="mysql4-upgrade-1.6.0.0-1.6.0.0.1.php" hash="e10cd368b68d2941fb9932b43197707d"/><file name="upgrade-1.6.0.0.1-1.6.0.0.2.php" hash="c9c61c8aee26892ce145f8be817fb4b7"/></dir></dir></dir><dir name="CatalogRule"><dir name="etc"><file name="adminhtml.xml" hash="018a68862ea89b44e871ab45f9c73543"/><file name="config.xml" hash="2b36fd0b69e0397afa26e74fd837928c"/></dir><dir name="Helper"><file name="Data.php" hash="88dd5fddb543c461faa7628c10a3766e"/></dir><dir name="Model"><dir name="Action"><dir name="Index"><dir name="Refresh"><file name="Row.php" hash="ba790cf19863c2dc24e040339ae183de"/></dir><file name="Refresh.php" hash="87ebccfc331c32d1fc590c13e7a68827"/></dir></dir><file name="Flag.php" hash="dab979c0515ff7ea791a6730b5f8c3a0"/><dir name="Mysql4"><dir name="Rule"><file name="Collection.php" hash="7a7603221700e83bdb5ab790d6e485ad"/><dir name="Product"><dir name="Price"><file name="Collection.php" hash="94794e2ff9a463ec00f0ff4bbd668686"/></dir><file name="Price.php" hash="99082930f79b87aa3dc3414103fe8075"/></dir></dir><file name="Rule.php" hash="4fb7bc501442dbaa6f19c7b23844fc28"/></dir><file name="Observer.php" hash="27928f107ed450072c427ff72ef9c3fc"/><dir name="Resource"><dir name="Rule"><file name="Collection.php" hash="6a17484a8b544d687dc17db8caa59d36"/><dir name="Product"><dir name="Price"><file name="Collection.php" hash="21a82e18647999f730292b77bcf0de45"/></dir><file name="Price.php" hash="1ca151e66b728d718e46bcae3d92c5a9"/></dir></dir><file name="Rule.php" hash="c9e0c97fadbe91803d95e8fd22cc8f6d"/></dir><dir name="Rule"><dir name="Action"><file name="Collection.php" hash="841d1b98c6df02294b077095cfaf20e8"/><file name="Product.php" hash="050fa52e3d3fd8841cfa648f59596f0f"/></dir><dir name="Condition"><file name="Combine.php" hash="c3ca1cbcccbe8fcd8591ff962e51d837"/><file name="Product.php" hash="7d2f2ccea8db76f9854f909838ccc197"/></dir><dir name="Product"><file name="Price.php" hash="070b4168d15c4cbad49155f08bb062d9"/></dir></dir><file name="Rule.php" hash="e190448d373f271156c6e40e6d10da23"/></dir><dir name="sql"><dir name="catalogrule_setup"><file name="install-1.6.0.0.php" hash="8647198997fdfd53ddbe91849c8d5367"/><file name="mysql4-install-0.7.0.php" hash="30bb62824df1fb5ca4f1cdece6f903db"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="cd45d2d0de0690e5afd405739327a1ea"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="ee393138d8e0b9d12f703aabdaa60df9"/><file name="mysql4-upgrade-0.7.2-0.7.3.php" hash="dde3fb667ecad49eb51e250d0408cf95"/><file name="mysql4-upgrade-0.7.3-0.7.4.php" hash="7831f348547c2b4445e5ed1af42ad08d"/><file name="mysql4-upgrade-0.7.4-0.7.5.php" hash="279dfffc07bc9b7fdf53ac466459a39b"/><file name="mysql4-upgrade-0.7.5-0.7.6.php" hash="3dd0652fb28fddf5af88dd88235c064e"/><file name="mysql4-upgrade-0.7.6-0.7.7.php" hash="624cd603f5e2dd5c7f53782b86516013"/><file name="mysql4-upgrade-0.7.7-0.7.8.php" hash="4a3237c84e5b0c31ae10a25e10a46955"/><file name="mysql4-upgrade-0.7.8-0.7.9.php" hash="4dac14552c92eea58d7331432e78187f"/><file name="mysql4-upgrade-0.7.9-0.7.10.php" hash="dbd3379543eab37f57e2937445e58b7f"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="ed26249c627adaca4dbcb2042e07406d"/><file name="upgrade-1.6.0.0-1.6.0.1.php" hash="b52d869687af6062f1ee30ff7b881ffe"/><file name="upgrade-1.6.0.1-1.6.0.2.php" hash="d38baf71a49c81338e05052260b6e279"/><file name="upgrade-1.6.0.2-1.6.0.3.php" hash="dcfbd14db4e00bf539c03640adca51dd"/></dir></dir></dir><dir name="CatalogSearch"><dir name="Block"><dir name="Advanced"><file name="Form.php" hash="9bcee8af4a6266723667a95c4416c701"/><file name="Result.php" hash="6a4bfa47742489fe354d8b2300f793e6"/></dir><file name="Autocomplete.php" hash="ce49fdff1b1b27e537f42e9e1112e63d"/><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="2b25b33a5d50e9a777a2abd9d36cad25"/></dir></dir><file name="Layer.php" hash="c6710073ca2271ef34ddadeb176c7edf"/><file name="Result.php" hash="f883ee8baa2df0281dbed937fb3309a5"/><file name="Term.php" hash="9b28f96049c33602054100bdb50fb3ec"/></dir><dir name="controllers"><file name="AdvancedController.php" hash="498aa9679d3e7781ebb0117bb5771b44"/><file name="AjaxController.php" hash="9b7b237a0e6d3f341c77fe8b98c4658f"/><file name="ResultController.php" hash="6807b302606a33cb8b04fa9a577332e4"/><file name="TermController.php" hash="82e958818353f74417d9ba8c0b1cc674"/></dir><dir name="etc"><file name="adminhtml.xml" hash="e08e0df767b8ca1d9784b46b526165f5"/><file name="config.xml" hash="a9df768dc162759a459ba3ecd9080807"/><file name="system.xml" hash="525d2f29f07ba11fad6d254d96b456b2"/></dir><dir name="Helper"><file name="Data.php" hash="dcb5f6c1343c96ef74abf9e339f22a02"/></dir><dir name="Model"><file name="Advanced.php" hash="9d35c203ea49bf6d60d2b5015895d4f9"/><dir name="Fulltext"><file name="Observer.php" hash="d908ae2847e466c59c5d8d202f586d07"/></dir><file name="Fulltext.php" hash="c16f9ac4c0b7636f1f90b31f6c38292a"/><dir name="Indexer"><file name="Fulltext.php" hash="ce7566291fffbe7d4bbbd21f7b7daeb7"/></dir><dir name="Layer"><dir name="Filter"><file name="Attribute.php" hash="e1d0ab63463857b987729d8e6db84d12"/></dir></dir><file name="Layer.php" hash="c0888219027262e120bcd22cc3731437"/><dir name="Mysql4"><dir name="Advanced"><file name="Collection.php" hash="9e1bc81e2ea0076649a3a50aa7305c5e"/></dir><file name="Advanced.php" hash="5a8f9130ea06c931ccc0845a25247799"/><dir name="Fulltext"><file name="Collection.php" hash="ecbc5c6b6458e4fe673dcc95f4db60fe"/><file name="Engine.php" hash="9240bf0a6cb48fe163cfc96638fe8587"/></dir><file name="Fulltext.php" hash="112505d321cacb2bd7ed482b095e6907"/><dir name="Indexer"><file name="Fulltext.php" hash="34f7143487177721a75cde041a0765fb"/></dir><dir name="Query"><file name="Collection.php" hash="78eab5ce9c4d4449d7930d59ca58ea37"/></dir><file name="Query.php" hash="e94e75700baf44ef3b0708cf46f0e849"/><dir name="Search"><file name="Collection.php" hash="746730d3ccd1412d6e52b25d431fda45"/></dir></dir><file name="Query.php" hash="fe49a8eda184d8e322e5ca2999f52b12"/><dir name="Resource"><dir name="Advanced"><file name="Collection.php" hash="803b45cf70551b580402d50891be1a89"/></dir><file name="Advanced.php" hash="78afe82b617efeaff140d202a742acc5"/><dir name="Fulltext"><file name="Collection.php" hash="9d529834b506a0dde8600b584d13b797"/><file name="Engine.php" hash="957ed76dc9d0139123f03c2ac12359f5"/></dir><file name="Fulltext.php" hash="e52bbe6e254b484383e6c39a1647985c"/><dir name="Helper"><file name="Mysql4.php" hash="f625168d95a7d0343f63bf38de9681a4"/></dir><dir name="Indexer"><file name="Fulltext.php" hash="8b83be6ace7a750f9fc3a4a5524b50fb"/></dir><dir name="Query"><file name="Collection.php" hash="75602dde2b833cb4d311b71530cb6817"/></dir><file name="Query.php" hash="29057de0700bccecd33dcdb5a7a7acde"/><dir name="Search"><file name="Collection.php" hash="6f8c4e7a54577a2f075b5fa203544861"/></dir></dir><file name="Session.php" hash="c6ed3524fcb78805a996cb8f1d48f934"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Sitemap.php" hash="a0a3ab54e8f1a72da79327a31af15d95"/></dir></dir></dir></dir><dir name="sql"><dir name="catalogsearch_setup"><file name="install-1.6.0.0.php" hash="8e418826108665e64a6fa8b1f3acbe1c"/><file name="mysql4-install-0.7.0.php" hash="7dec78028211de0e717ba46c998120eb"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="a6c3b7716ccf81add863940649196e47"/><file name="mysql4-upgrade-0.7.2-0.7.3.php" hash="2f119fd2af710b97b6294df41e8b2d1e"/><file name="mysql4-upgrade-0.7.3-0.7.4.php" hash="2ed349b8a14ebc9217e263f6ad80dee7"/><file name="mysql4-upgrade-0.7.4-0.7.5.php" hash="688b09ce96282fa566ba54eae0e068cc"/><file name="mysql4-upgrade-0.7.5-0.7.6.php" hash="c534564410db7ce8bd53c467a6d13caf"/><file name="mysql4-upgrade-0.7.6-0.7.7.php" hash="e691a335ae15a78b516378581eb69437"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="f979a354003609bf8412249b6c476f11"/></dir></dir></dir><dir name="Checkout"><dir name="Block"><file name="Agreements.php" hash="f32f01463d6bcb6b8e532edbf37680c6"/><dir name="Cart"><file name="Abstract.php" hash="1c4323edfecc1bc5d638a4364a543742"/><file name="Coupon.php" hash="24b37f09465eb5cf3ac892cd1da72471"/><file name="Crosssell.php" hash="832cc52a6a0a012c7dcfb0b5f84fbde7"/><dir name="Item"><file name="Configure.php" hash="b0cbf337bafea5e431a4f22f83b69abd"/><dir name="Renderer"><file name="Configurable.php" hash="1569fe73631a5f291921b5ca782483ea"/><file name="Grouped.php" hash="21fc6300c199a4fcc63e65573c8667b7"/></dir><file name="Renderer.php" hash="5351c2fb03e9c0475dd40baecbb7f76e"/></dir><file name="Shipping.php" hash="a7a8d27af384dbc2479f801e283db893"/><file name="Sidebar.php" hash="59721df7c72a13ba0b48a590ad1e8833"/><file name="Totals.php" hash="2ad8e2ed4784125ae3e7b9338c6c55dc"/></dir><file name="Cart.php" hash="855a53a7111d15384fe747603c557684"/><file name="Links.php" hash="0ddfa33bf29b7a0e059b450e99bf12d6"/><dir name="Multishipping"><file name="Abstract.php" hash="3c7c478c24774bf06dab3cb1ba93e237"/><dir name="Address"><file name="Select.php" hash="4bb89f228f678fee3767436ff6d978b3"/></dir><file name="Addresses.php" hash="11e84faf57e605f841431c907c8e977d"/><dir name="Billing"><file name="Items.php" hash="2969f6313e30374279e107bd6564b252"/></dir><file name="Billing.php" hash="a61ec69be71fc006da0c1f7b30c79220"/><file name="Link.php" hash="a4459fbf533bf5e3d9f538948a5dadde"/><file name="Overview.php" hash="d7971c40a4e0f269783ec670a302ad0c"/><dir name="Payment"><file name="Info.php" hash="52a3975182b862b6d7ea8e3512215372"/></dir><file name="Shipping.php" hash="3e4ac9bea370e7e48fb31822e1df3719"/><file name="State.php" hash="035d683a8f1132ff72e98628a3f88a17"/><file name="Success.php" hash="c348035feaeccee757d11b8b475a2466"/></dir><dir name="Onepage"><file name="Abstract.php" hash="fd8671019473e80b647bf60a6fd5b72a"/><file name="Billing.php" hash="6cfc735012d0bdb260cb79bfb0adbd0c"/><file name="Failure.php" hash="53df1a06a269ccdb7394c055f1a066e6"/><file name="Link.php" hash="02180863ab252ea1d1b2d1a76ed2b58d"/><file name="Login.php" hash="849dee3698c3b77d7dadbd89db33bb06"/><dir name="Payment"><file name="Info.php" hash="55755913bd2f2cb0646d7e3a2bbc255c"/><file name="Methods.php" hash="e178a6d508711d77e8156b076ede4e6c"/></dir><file name="Payment.php" hash="ce00f30aed0f4d880e2a7c24cc49dc4f"/><file name="Progress.php" hash="25fb4c9fb54804b49974206d0150d798"/><dir name="Review"><file name="Info.php" hash="2c0f1b6903f622bec431878a78fe3edf"/></dir><file name="Review.php" hash="70a8f63d4c8145082fafb337f5be2583"/><dir name="Shipping"><dir name="Method"><file name="Additional.php" hash="dce7cb83d1f41eb4fa79248a01e0178a"/><file name="Available.php" hash="735eb2286ad049d997f9acc8fc890637"/></dir><file name="Method.php" hash="ce928ddbb936592a7e49809c6b118d24"/></dir><file name="Shipping.php" hash="4ccd3acad8ad5da2f85bb874cec5c326"/><file name="Success.php" hash="56fdb6969a2d65aa57f0a9b190645ecb"/></dir><file name="Onepage.php" hash="866f261f1b72beaa823b572d46afd863"/><file name="Success.php" hash="b18b7150af82f962062db366df7039a6"/><dir name="Total"><file name="Default.php" hash="038bf549bbdfe00b4a507f1c57cba108"/><file name="Nominal.php" hash="6202ca5112e9dd463504c6c4b1ee92a2"/><file name="Tax.php" hash="c66ae8078055044ceeae6bc4d522491e"/></dir></dir><dir name="Controller"><file name="Action.php" hash="c9f4ed5f0de6f8f4416d0cdcb28e885f"/></dir><dir name="controllers"><file name="CartController.php" hash="e3c03f02b7f1aaff286f27e1c4ceabb6"/><file name="IndexController.php" hash="cdb7dce888886353403814f91355926c"/><dir name="Multishipping"><file name="AddressController.php" hash="899d1b5e33fa250e26a8d20d7ed4fa14"/></dir><file name="MultishippingController.php" hash="0c41105cd385832715bc9e58d4e2a85c"/><file name="OnepageController.php" hash="6cacd468286fcdbe1423e010f5609346"/></dir><dir name="etc"><file name="adminhtml.xml" hash="788c8c0e9eede6205cc0bab56ad42884"/><file name="api.xml" hash="1219d93e3ae5d86fe52cb8fbcf0dee1e"/><file name="config.xml" hash="33f21ae7b4783e782d21a6e72e3ad9f7"/><file name="jstranslator.xml" hash="5a2bb916060ed6f57242c6909f45906b"/><file name="system.xml" hash="5032057ed76a0a96b1aa843453aaccff"/><file name="wsdl.xml" hash="9a10e25803e84713f5031a168dd0c624"/><file name="wsi.xml" hash="2567bee4ef18e1b426c700ce66c3bcb1"/></dir><file name="Exception.php" hash="04b7d293c0dd6c3bf7c5f357ec6e2a28"/><dir name="Helper"><file name="Cart.php" hash="6e1a4ca0c6cbbeb44f86b843a3ada7ca"/><file name="Data.php" hash="0f9ce0a292b5252d41e213c856239e89"/><file name="Url.php" hash="030d5bdf146b3b99cc9d8746c7926503"/></dir><dir name="Model"><file name="Agreement.php" hash="df3962ddcf7955accf00d714c5ead8e9"/><dir name="Api"><dir name="Resource"><file name="Customer.php" hash="6afd7bb0cb922ec8bda8cadb29451c95"/><file name="Product.php" hash="3e7be8a835660a8420a407d118010575"/></dir><file name="Resource.php" hash="c1f177cee11d0abc00480858da5ab41f"/></dir><dir name="Cart"><dir name="Api"><file name="V2.php" hash="077e21659fffece19616e060eacb48e2"/></dir><file name="Api.php" hash="0d889353860bfddd133d4d1f71b6de9a"/><dir name="Coupon"><dir name="Api"><file name="V2.php" hash="3819cccab8c750c686fd32f1519744ee"/></dir><file name="Api.php" hash="8ac75499c8c55708480f0b6ae51af119"/></dir><dir name="Customer"><dir name="Api"><file name="V2.php" hash="00d35835ad9d92aacfa1839d023904f3"/></dir><file name="Api.php" hash="8be5ae4a793eb93fe0044d735b7b1df8"/></dir><file name="Interface.php" hash="ebc9bcbcd56b5d434ba77ed7ff720bc8"/><dir name="Payment"><dir name="Api"><file name="V2.php" hash="6a4b038c801888694de6c44b3443c423"/></dir><file name="Api.php" hash="0a67d858dcff5e96329b016825490f88"/></dir><dir name="Product"><dir name="Api"><file name="V2.php" hash="d770d4e0ed45ffde564259aa31df4949"/></dir><file name="Api.php" hash="14005534953369616945876a9010e67e"/></dir><dir name="Shipping"><dir name="Api"><file name="V2.php" hash="d9a882d9ffafd6565519d0fb16cf0c77"/></dir><file name="Api.php" hash="8da33e2502d97f7183e399a9eec9a342"/></dir></dir><file name="Cart.php" hash="18b28a107260e5156794e2b72f46a190"/><dir name="Config"><dir name="Source"><dir name="Cart"><file name="Summary.php" hash="a02787d864ebfae10582d174868d96f1"/></dir></dir></dir><dir name="Mysql4"><dir name="Agreement"><file name="Collection.php" hash="382a91375e387aa34a22f2bff32e0664"/></dir><file name="Agreement.php" hash="410fb5df15e05f6280b260ff92d1519b"/><file name="Cart.php" hash="f71a9c3f9f8833c9a4111946c1173a1e"/><file name="Setup.php" hash="30411aeed997b72d15eab8b569ea293f"/></dir><file name="Observer.php" hash="d381013d2e1d180f64c4de1a951323a5"/><dir name="Resource"><dir name="Agreement"><file name="Collection.php" hash="4a726a585c363e1f03ba5a0bf3bbccb1"/></dir><file name="Agreement.php" hash="59a884f3339d51bcc6bfd4e5e52e662c"/><file name="Cart.php" hash="3ff0fd5a962ee131c36955a6d3710ca6"/><file name="Setup.php" hash="c54ad902cccbd093f61132257f622b9d"/></dir><file name="Session.php" hash="3b7230f751645b683eea043f70c5373d"/><dir name="Type"><file name="Abstract.php" hash="b81065dc35a709901f5aa219c484027c"/><dir name="Multishipping"><file name="State.php" hash="ee82bfca6f53192b100bbb682f747703"/></dir><file name="Multishipping.php" hash="399d388fe83466612fb1ea86d6f27fe2"/><file name="Onepage.php" hash="d035aa49f176b26640bb8eb62bc7696f"/></dir></dir><dir name="sql"><dir name="checkout_setup"><file name="install-1.6.0.0.php" hash="4469d343a5a08520291501615162782c"/><file name="mysql4-install-0.9.1.php" hash="43edc180bb20b77293f781a7766d64fe"/><file name="mysql4-upgrade-0.9.0-0.9.1.php" hash="779c10141182bab401a325704f465685"/><file name="mysql4-upgrade-0.9.1-0.9.2.php" hash="e4b33012e23340674bb734eafcade2c1"/><file name="mysql4-upgrade-0.9.2-0.9.3.php" hash="c31f984331e9c1c5786b06ea9bfe7c22"/><file name="mysql4-upgrade-0.9.3-0.9.4.php" hash="b5570bfcb3f219c23f5614d89f35d808"/><file name="mysql4-upgrade-0.9.4-0.9.5.php" hash="5d8713068dfa71f3be43a7a68d210fb4"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="390d29e552409bbd74baf088722d2ecc"/></dir></dir></dir><dir name="Cms"><dir name="Block"><file name="Block.php" hash="cd41391541ff3bfdeef4a2fca9312a15"/><file name="Page.php" hash="4a917b06112e6ee15ee849a613f244ce"/><dir name="Widget"><file name="Block.php" hash="743b41e6e6916c45414a622ec71a7d35"/><dir name="Page"><file name="Link.php" hash="6c94e75e10fae6746cf8884b19cd5576"/></dir></dir></dir><dir name="Controller"><file name="Router.php" hash="01e004e9497c92084a5273a9fa860a3a"/></dir><dir name="controllers"><file name="IndexController.php" hash="a0428df0501a68673f1177d0dbd2150b"/><file name="PageController.php" hash="46982d49f38d4070d1900c27a490bcc3"/></dir><dir name="data"><dir name="cms_setup"><file name="data-install-1.6.0.0.php" hash="3d3af93f64a56c81dd5b1849266b9a34"/><file name="data-upgrade-1.6.0.0.0-1.6.0.0.1.php" hash="918695cad1c49a1fa2d57caedc260ba7"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="3650744e9dee2e44233f1e500bbaa18e"/><file name="config.xml" hash="47a5aad49cd73f5b8cdcc355574d64af"/><file name="system.xml" hash="a3eef090aea13bf5143d6a7afebe103b"/><file name="widget.xml" hash="cce68d9bba54481a18ecf478bcda6283"/></dir><dir name="Helper"><file name="Data.php" hash="2ffa36f756131d8ebdf545a50f556d9b"/><file name="Page.php" hash="e178f42904942dda21b7bdbd04d788ff"/><dir name="Wysiwyg"><file name="Images.php" hash="ffa1f918c511e0e00e241bd20444ec53"/></dir></dir><dir name="Model"><file name="Block.php" hash="d315f5abaf7aa534a2847ca11072230c"/><dir name="Mysql4"><dir name="Block"><file name="Collection.php" hash="f114990e8139a6bb5af7fc535cb7deae"/></dir><file name="Block.php" hash="f342eeb583536cb204c259007ea3268b"/><dir name="Page"><file name="Collection.php" hash="35f5994643ac1b4e80272a48ad9d9a93"/><file name="Service.php" hash="42a55d20b1a66d6f5630c885f85086a2"/></dir><file name="Page.php" hash="d6e59c0c6d993bb3b9a2f3a303d4d1fb"/></dir><file name="Observer.php" hash="087435a085bb7faa76b1f7e694073236"/><file name="Page.php" hash="6ec25e8cbdecad68c9288dd4e3901060"/><dir name="Resource"><dir name="Block"><file name="Collection.php" hash="86d4b7cad3eefb334d2e9807c96f9104"/></dir><file name="Block.php" hash="00427267d39835bc711330cf09c83de8"/><dir name="Page"><file name="Collection.php" hash="5fcec317a2fc3874788324c4836bc66c"/><file name="Service.php" hash="58beeb725144ae8954cffad25d8b4d3d"/></dir><file name="Page.php" hash="ce8b43b2ea6032c4ba027b4b4a324a60"/></dir><dir name="Template"><file name="Filter.php" hash="fba9d583282cb7bab313214b2057c136"/></dir><dir name="Wysiwyg"><file name="Config.php" hash="f1dc9181c9b9a9f0fdd5de649e131c40"/><dir name="Images"><dir name="Storage"><file name="Collection.php" hash="fd6a930d67ecd61c7b3652a2951db865"/></dir><file name="Storage.php" hash="79a3998f2ae5fd3fce44cd3ca53e3a2c"/></dir></dir></dir><dir name="sql"><dir name="cms_setup"><file name="install-1.6.0.0.php" hash="2f325ff06947a8939f4f388fd7ecf096"/><file name="mysql4-install-0.7.0.php" hash="ba982a891d42004013ec0d0ae591ae25"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="da7d6308764a8fbf50fd1841eeaf4361"/><file name="mysql4-upgrade-0.7.10-0.7.11.php" hash="4421811dd029a0c02c38ab34e860e3f0"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="b7b865bed3b4468420425808bbdc5b1e"/><file name="mysql4-upgrade-0.7.11-0.7.12.php" hash="6cf87fd5c6286202d603b5fd90c7e5bc"/><file name="mysql4-upgrade-0.7.12-0.7.13.php" hash="4a886e9bc5e7ca2d8523aa48f078a3fd"/><file name="mysql4-upgrade-0.7.2-0.7.3.php" hash="94f9c6fbe93a15e086317d836e8b84d4"/><file name="mysql4-upgrade-0.7.4-0.7.5.php" hash="694ce5a5adae8a8d2bf9b688c54a270e"/><file name="mysql4-upgrade-0.7.5-0.7.6.php" hash="51d0bb48fe741b0bb405fef6dd11c35b"/><file name="mysql4-upgrade-0.7.7-0.7.8.php" hash="3a96a9f7d2bbdc449966c463a07c30e6"/><file name="mysql4-upgrade-0.7.8-0.7.9.php" hash="2709bed5b1ebb7adedd1b35a7f9b2a59"/><file name="mysql4-upgrade-0.7.9-0.7.10.php" hash="538fc08e5372ac6f80fff61ded413bb1"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="6c998bf371b9a71cf99c9a09ac151068"/></dir></dir></dir><dir name="Connect"><dir name="Block"><dir name="Adminhtml"><dir name="Extension"><dir name="Custom"><dir name="Edit"><file name="Form.php" hash="1383c04c2961d52cbc1bec39a201ac57"/><dir name="Tab"><file name="Abstract.php" hash="42261d5834b5f3c74f56bdced164435c"/><file name="Authors.php" hash="396e94163dfdd04577ae3ffe3c1be6df"/><file name="Contents.php" hash="acbdacab8bf1e6e7b2a430bd4e0ef96f"/><file name="Depends.php" hash="554a746b123df54b5984b438222e47c3"/><file name="Grid.php" hash="147163ca10710f8db50aa1889d2eb3c4"/><file name="Load.php" hash="894f3f70ab3d52eec6aee33910fb6a55"/><file name="Local.php" hash="5dea8fd3743b82f3202de683ada2d5af"/><file name="Package.php" hash="55f6e44d8ba3af305d77b2263c4abebf"/><file name="Release.php" hash="9405933e664d77b837ac8745414b6d89"/></dir><file name="Tabs.php" hash="a6091bf6766e33021b1255a8f6e46dec"/></dir><file name="Edit.php" hash="6bed39d39269b1e6efc17f5579c2da01"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Extension"><file name="CustomController.php" hash="740701a788bcc201895be39bd552719b"/><file name="LocalController.php" hash="b5f37e8195d7be89892aafe5aef455eb"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="970bf51e02b86448b906cce43d11e048"/><file name="config.xml" hash="e974d3d2b4ac7464724a68222dd1800b"/></dir><dir name="Helper"><file name="Data.php" hash="5d8b4f9e8473195278078b84e822dff2"/></dir><dir name="Model"><dir name="Extension"><file name="Collection.php" hash="5fe952fe339cd51bca9478bbb1b2025e"/></dir><file name="Extension.php" hash="79cb6010aaac04ae6acae90fe283b875"/><file name="Session.php" hash="d5cc98d3b5bf71ebc8fe99d6e14f3ec9"/></dir></dir><dir name="Contacts"><dir name="controllers"><file name="IndexController.php" hash="36d90b47828bbe05fbbc2b1804c33471"/></dir><dir name="etc"><file name="adminhtml.xml" hash="6ba42f01f1d9b99d6e1edd020965c8ac"/><file name="config.xml" hash="2a1d11475c5c81eee38231630eb05a5b"/><file name="system.xml" hash="889b6e1509e248fd3681731c840c86c6"/></dir><dir name="Helper"><file name="Data.php" hash="cfd50692c06ff83bf1e31cf8617a3b4d"/></dir><dir name="Model"><dir name="System"><dir name="Config"><dir name="Backend"><file name="Links.php" hash="123757fdd0f36f5e6c0a26adaf57ed67"/></dir></dir></dir></dir><dir name="sql"><dir name="contacts_setup"><file name="install-1.6.0.0.php" hash="9de64c84aac321bdb88540c11f740f2f"/><file name="mysql4-install-0.7.1.php" hash="e9dab0dc609d3953f4ba457af60ac756"/><file name="mysql4-install-0.8.0.php" hash="93303f2687d9007afe65d7f68d6bafc8"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="d0feefaea070d94faaa20f787b0cd9df"/></dir></dir></dir><dir name="Core"><dir name="Block"><file name="Abstract.php" hash="82256e331ac78c2c52eb864ce250bf1c"/><file name="Flush.php" hash="d514b0279c4e43d755a083cd15eb3dba"/><dir name="Html"><file name="Calendar.php" hash="b7d5d8194b8aecd63fcd340db391968f"/><file name="Date.php" hash="aed6462ed4baf396ff86699b5a50b96e"/><file name="Link.php" hash="7e697d46edc5177a6c9ecda200fa0500"/><file name="Select.php" hash="6dc6fc73c778728a98c3264a832b7012"/></dir><file name="Messages.php" hash="2dd730afad2d9b06b883714860c6ca9e"/><file name="Profiler.php" hash="b0a9bd6c05ed8bb6d676e6fda7ee1ea2"/><dir name="Store"><file name="Switcher.php" hash="a4fb26a88eb683bcbfd801d8707afd32"/></dir><dir name="Template"><file name="Facade.php" hash="869603ba40daaedbfbfeb729c415dc99"/><file name="Smarty.php" hash="ceaf6731283fdfad4c3935ea9bff09d8"/><file name="Zend.php" hash="3ac43e2fc39ef57200a9a984f4f473d2"/></dir><file name="Template.php" hash="1386d912dc332ea09ca6ceabe099ab41"/><dir name="Text"><dir name="List"><file name="Item.php" hash="951ad839e1969adb392b0fd2f255abc0"/><file name="Link.php" hash="eadf8bde0ba92f1e7241236856464f62"/></dir><file name="List.php" hash="2a7b394d7af275d47bd65203b76ea186"/><dir name="Tag"><dir name="Css"><file name="Admin.php" hash="2e2584dbd2234df9cdcba3c5ca0a4f10"/></dir><file name="Css.php" hash="534007c5ece24139c6eee235c6f6859d"/><file name="Debug.php" hash="e70cb0add1b88940d4129c4171aefb75"/><file name="Js.php" hash="78f6f915c1ecb51df068c70edd4116f6"/><file name="Meta.php" hash="0e8a2418f23e82bb428413e4043190aa"/></dir><file name="Tag.php" hash="d2f28f3f5a112e2a4d30bfa0dd295957"/></dir><file name="Text.php" hash="1be038de2bc3963ad91e3abe3ac12eea"/></dir><dir name="Controller"><dir name="Front"><file name="Action.php" hash="74a0d88299ad03d25b862e988dc8fffa"/><file name="Router.php" hash="68ea2f2a4d3a1da37db5ceb240a105b6"/></dir><dir name="Request"><file name="Http.php" hash="ccb56f23ea96618bc5c2a594f7cb4241"/></dir><dir name="Response"><file name="Http.php" hash="17d51f23b4d406882e9fe6c7da031c6c"/></dir><dir name="Varien"><file name="Action.php" hash="741b30665a51a5f931f22990b5055cc7"/><file name="Exception.php" hash="372cc26a1355f2a105ea66e05669c623"/><file name="Front.php" hash="7de091295bb9d96551d912d02a0a9d1c"/><dir name="Router"><file name="Abstract.php" hash="8c6f5123d15e132c8c921e99546a30d4"/><file name="Admin.php" hash="7b6d51491b5999c35ff8ccff95ded4be"/><file name="Default.php" hash="e573239d21d5ea824abbb16151d16850"/><file name="Standard.php" hash="cb74f1440d282b3770c364474134d495"/></dir></dir></dir><dir name="controllers"><file name="AjaxController.php" hash="65910c3321c4acd31ae5f54b197884d3"/><file name="IndexController.php" hash="a2906692eb07188d7393b0c965fa6c1e"/></dir><dir name="etc"><file name="api.xml" hash="b8c71c08732ab438695f8144eab877aa"/><file name="config.xml" hash="940e7157e44795dddbd75a308b60fcd0"/><file name="jstranslator.xml" hash="89e90097389307a2dc2c1ecc52b99fc6"/><file name="system.xml" hash="74645630a0cdb97de31a720eba9b9a29"/><file name="wsdl.xml" hash="79501d6ccf39846b5dd551e85880dcb8"/><file name="wsi.xml" hash="31fa195d527181c946019bcd44d819d6"/></dir><file name="Exception.php" hash="0974b264a37f2a3ee278fde81a2ed80d"/><file name="functions.php" hash="dd250f04f8a18a289ded06470a557eec"/><dir name="Helper"><file name="Abstract.php" hash="6816767936e20a9171b633f602c13883"/><file name="Cookie.php" hash="c9fdeb23abfad6a9a78b781f250cfbec"/><file name="Data.php" hash="cfef221878937b07bcd3c2418b21f789"/><dir name="File"><dir name="Storage"><file name="Database.php" hash="3386578adfaf6dc7c68f67c7a79b090f"/></dir><file name="Storage.php" hash="283426826b39928144a20067c5bd1d41"/></dir><file name="Hint.php" hash="628da9bf92ef07007e6578c83aa2e58c"/><file name="Http.php" hash="0578082a1dcda489dd451ea8e257c76d"/><file name="Js.php" hash="78cef1513fc24feafe8561eda4ad42eb"/><file name="String.php" hash="67fc836a5b1e800a40bb58c34a7936c4"/><file name="Translate.php" hash="51d3acc916931652116eafd2f5aa7923"/><dir name="Url"><file name="Rewrite.php" hash="0f72823b730eb422df5bee8195de71e2"/></dir><file name="Url.php" hash="0d894098825a5788028542f4bcf100c1"/></dir><dir name="Model"><file name="Abstract.php" hash="92871f9888cad306e87371c68699e785"/><dir name="App"><file name="Area.php" hash="05b78decedfcdd33fa88aae4640f437a"/><file name="Emulation.php" hash="ac0e6aabaf5081dafb897d5f0206a298"/></dir><file name="App.php" hash="359d716d3e6749e6c94e91552f9082e0"/><file name="Cache.php" hash="a5fe2ce1d115d92f389a80269412c78a"/><file name="Calculator.php" hash="2defa83829be22a6111ec97812d8a581"/><dir name="Config"><file name="Base.php" hash="7d6d83e0f46655211a018e041d673d8d"/><file name="Data.php" hash="2b11250583c57a9013f87bf7529e6bd0"/><file name="Element.php" hash="41faddf5aa5acd667b1f51c7f80dd013"/><file name="Options.php" hash="7ce60ac8790716d4c678c4b2ce3f9797"/><file name="System.php" hash="9c26236242ea6099fee3f15bb3c0a35c"/></dir><file name="Config.php" hash="58e7d9a8903ca9bb3758d23699707dc6"/><file name="Convert.php" hash="b3e47a80738ebc487893ba371957b42f"/><file name="Cookie.php" hash="e1b64bc4e9cc3a6d9ec34492451216d0"/><file name="Date.php" hash="01392e3305186069e77946b28a79a81d"/><dir name="Design"><file name="Package.php" hash="6b964865a772dd44d3dad5a56c279dae"/><dir name="Source"><file name="Apply.php" hash="10829421eecec7fc18c1aac58969b508"/><file name="Design.php" hash="bf63679529657037ec2c4de3d94eadb1"/></dir></dir><file name="Design.php" hash="1ebf3a504f944748cbd70e822b05bd73"/><dir name="Email"><file name="Info.php" hash="d3627d819b5db67c86c70cde9a558fd8"/><dir name="Template"><file name="Filter.php" hash="e912590ca3c59df5d76e45f8631d235d"/><file name="Mailer.php" hash="313268e9163a6bfa4feaa08973b72cbd"/></dir><file name="Template.php" hash="27c15e38c359a6030806752f106964d9"/><file name="Transport.php" hash="bba455ff293edebca0de33d98444aa43"/></dir><file name="Email.php" hash="7f7821d5e8b94a5fcaafef8dac58a6f9"/><file name="Encryption.php" hash="5ad82d565c8b81f5443a3f4f94635e40"/><file name="Factory.php" hash="522514bd62c02dcd060e2496e0bbfc57"/><dir name="File"><dir name="Storage"><file name="Abstract.php" hash="50a9c54ac538990fa3360fba28e9cb7d"/><dir name="Database"><file name="Abstract.php" hash="688a6c2bde07b012dd96742fc4d56fd8"/></dir><file name="Database.php" hash="b287fe2143d4def32037b146f028d47f"/><dir name="Directory"><file name="Database.php" hash="875e025ded446ffce81a4838addfb0d0"/></dir><file name="File.php" hash="5409c58bcef26a275d9532040a9a9d0a"/><file name="Flag.php" hash="020fcab951b9228ecb67b6828d93e90b"/></dir><file name="Storage.php" hash="5c6f55b51360ab027cd7304cab7f6835"/><file name="Uploader.php" hash="a4fb426d8b7030a439d5907b3c7bcbb8"/><dir name="Validator"><file name="AvailablePath.php" hash="123be1c8c6837a9993108299fec6171a"/><file name="NotProtectedExtension.php" hash="18616a51f342e61e1852b43c3b8160dc"/></dir></dir><file name="Flag.php" hash="8ca3a531b9a533f042a23cca22b2641e"/><dir name="Input"><dir name="Filter"><file name="MaliciousCode.php" hash="576b9b4a6f1a955c6c21e95b1d6d135c"/></dir><file name="Filter.php" hash="cc89eb6c553ac09cf0d7c67e3a069e35"/></dir><file name="Language.php" hash="63cb88b1e4737b7c61522cbe53c6ee89"/><dir name="Layout"><file name="Data.php" hash="2ef2490a266ac8dfbe91992743a6396a"/><file name="Element.php" hash="8513ff9108f29b39a4553913580938df"/><file name="Update.php" hash="4b6862c459da2cb3d3332a66b9d2b58c"/></dir><file name="Layout.php" hash="1b50105321f94faca3e987602c243b03"/><dir name="Locale"><file name="Config.php" hash="641d6fdfd47cc912143c9a833106e61b"/></dir><file name="Locale.php" hash="f3c0e9bdf1f6b8929071db9c21f3dc63"/><dir name="Log"><file name="Adapter.php" hash="a458c6e59759a4e427153c4a1e234a52"/></dir><file name="Logger.php" hash="433f74eabc1b5c50444cbb385db900b6"/><dir name="Magento"><dir name="Api"><file name="V2.php" hash="9fec085743cc4a61661dced84122dd7d"/></dir><file name="Api.php" hash="bf8a71947750a64e33659c4f451d5612"/></dir><dir name="Message"><file name="Abstract.php" hash="9427fb9f476e6dce05cf5794785528fe"/><file name="Collection.php" hash="66f2ddc4075d6a985742c87ff74374eb"/><file name="Error.php" hash="c4800b42fa88b65be8aa154246bee095"/><file name="Notice.php" hash="a5beb5665acef097d02f05eccda9bba4"/><file name="Success.php" hash="61eb0b56ecb95795a7baaeb502e10a0b"/><file name="Warning.php" hash="b7f47d2928afef1a3e4a1fe1ad332ea9"/></dir><file name="Message.php" hash="e280f0708fc4680520b85a845224a782"/><dir name="Mysql4"><file name="Abstract.php" hash="39332001536e64d7ee99a806b0c36d1a"/><file name="Cache.php" hash="7adace09d8eef27188eb69ac940fe7f4"/><dir name="Collection"><file name="Abstract.php" hash="99dc4a24279c296e6f1c63749623fd30"/></dir><dir name="Config"><dir name="Data"><file name="Collection.php" hash="7097527cbc4e5deec22179ff1f553d40"/></dir><file name="Data.php" hash="44f9e7d7a3aa00cdffa0e32b726374de"/></dir><file name="Config.php" hash="fe460ffbdadcfcd73d258973b6bea8b1"/><dir name="Design"><file name="Collection.php" hash="b103e71ce7fe9b79135e5824c4b00934"/><dir name="Package"><file name="Collection.php" hash="6c8c7fc5284530fb1489ae0e66a260e5"/></dir><dir name="Theme"><file name="Collection.php" hash="ce8814e87fb299de2c45ca783ccd11ee"/></dir></dir><file name="Design.php" hash="3a7042029ff4a7623fac3c9439e6f3c6"/><dir name="Email"><dir name="Template"><file name="Collection.php" hash="2562b12dc3c34c65447d975f2cc7b342"/></dir><file name="Template.php" hash="8e76c6d5890bf3533d30e4a9c06b8be4"/></dir><dir name="File"><dir name="Storage"><file name="Abstract.php" hash="7ef46e183f2e2d3aca130bf291622ba8"/><file name="Database.php" hash="36883f2262fa261fe0b6bd7e06cb02da"/><dir name="Directory"><file name="Database.php" hash="fef9e094903fd97e4b84b0acd4896343"/></dir><file name="File.php" hash="475fa518331fc393b592bfe2864c0ffe"/></dir></dir><file name="Flag.php" hash="0383258e5c7d60933cc4f890ece8543b"/><dir name="Language"><file name="Collection.php" hash="a0abeab432e62cc7bbe2612777532894"/></dir><file name="Language.php" hash="9ef76521c3d531301243c3a84b391a26"/><file name="Layout.php" hash="699d1b1097bfe84ad8a21e54815f3d2a"/><file name="Resource.php" hash="93ad6e8130895c562e707883c86e8d21"/><file name="Session.php" hash="21a9b65264050c12517264851a8b5af0"/><dir name="Store"><file name="Collection.php" hash="a6c4095db952594c142d856197dcca26"/><dir name="Group"><file name="Collection.php" hash="76c4ed4f18697e41e5f5081d2d160b8a"/></dir><file name="Group.php" hash="3722ae4812666c831dffa9b02e8f3d2c"/></dir><file name="Store.php" hash="eca08a2749d5e81ae3efc007d2cb73ba"/><dir name="Translate"><file name="String.php" hash="7739d7d6a8ba9c44e2f429f13b23d057"/></dir><file name="Translate.php" hash="761cb9bda0641a2a2029f593a86b3028"/><dir name="Url"><dir name="Rewrite"><file name="Collection.php" hash="8635c8956ddf3c9676340bc57e995a41"/></dir><file name="Rewrite.php" hash="f0cf2f12f8ba3434dd8f21abeee4119e"/></dir><dir name="Variable"><file name="Collection.php" hash="a11cb34b9f7987b4cdc5ac74d9107eb7"/></dir><file name="Variable.php" hash="0556d675a8329a116e61fd50e4c1e633"/><dir name="Website"><file name="Collection.php" hash="dc320bd6e59c2543dd4b3a7c10673061"/></dir><file name="Website.php" hash="64252dabefd42c6b0a7dfbc00a6cbacd"/></dir><file name="Observer.php" hash="5533dd099586604731b30a366b0e5dec"/><dir name="Resource"><file name="Abstract.php" hash="533f2d803ef51f71cdb42062d9f7144c"/><file name="Cache.php" hash="8d943911084bc72b6a76618a4e14b70f"/><dir name="Config"><dir name="Data"><file name="Collection.php" hash="c87f59133ae5932e15f00b4f0f266155"/></dir><file name="Data.php" hash="23f45f6c878259a60124c641bf4f1e82"/></dir><file name="Config.php" hash="faf82cfca5e3ca23f39af08066ea59a9"/><dir name="Db"><file name="Abstract.php" hash="d0e58bda35a24de22665fbebda8b59cd"/><dir name="Collection"><file name="Abstract.php" hash="6f101c4c2b7836b5a227da21f8c439be"/></dir></dir><dir name="Design"><file name="Collection.php" hash="8a74da3d12c7ca51d022e80a268aa30c"/><dir name="Package"><file name="Collection.php" hash="c15b81b31dace4ddbc7dfa6c8a57aa57"/></dir></dir><file name="Design.php" hash="998caf6fa4e178d36b2f2403119cad1a"/><dir name="Email"><dir name="Template"><file name="Collection.php" hash="7fe31320ce6fa17f727ec23e94f3df3d"/></dir><file name="Template.php" hash="4239433c8efb889ad1eba2ec501c02bf"/></dir><dir name="Entity"><file name="Abstract.php" hash="631273eae70ece532311def7c9312919"/><file name="Table.php" hash="79700d2f8193fb586f12f1994415abf5"/></dir><dir name="File"><dir name="Storage"><file name="Abstract.php" hash="bff876072be5a848f2cc43e69d60e3cf"/><file name="Database.php" hash="b0a13ec6275c537d894abd6cf3323b12"/><dir name="Directory"><file name="Database.php" hash="175a6e3c00f11128f3693eb84b0dd789"/></dir><file name="File.php" hash="35aa426f80e2db1f506b5d39402581be"/></dir></dir><file name="Flag.php" hash="3e921eb46b35fce16630162d10069609"/><dir name="Helper"><file name="Abstract.php" hash="765fcde4da91029e0b85b0841645efc0"/><file name="Mysql4.php" hash="28c910adaa3d68bc7888dc9c09864ad5"/></dir><file name="Iterator.php" hash="def53b3d72df498955fe06ccc9630e6b"/><dir name="Language"><file name="Collection.php" hash="9c90543ec3797727c50c43f914f535e5"/></dir><file name="Language.php" hash="084fd5a4f3687a105666df59887c868d"/><file name="Layout.php" hash="d8ba832ed6b990738be539bcf527f616"/><file name="Resource.php" hash="ec971cd6eb0000818fa1b4997dd331ea"/><file name="Session.php" hash="955464382903367e19851023ac03d412"/><dir name="Setup"><dir name="Query"><file name="Modifier.php" hash="59f9c9270c168212eb1cee2f6e350723"/></dir></dir><file name="Setup.php" hash="db0d98e5063113decbcfa15151534509"/><dir name="Store"><file name="Collection.php" hash="10e06b78482295d88459e37739b6cc00"/><dir name="Group"><file name="Collection.php" hash="9e7f335d8eaf02984578d0e2df689717"/></dir><file name="Group.php" hash="57bd8bfaec0ecd85d26508b1275b27f2"/></dir><file name="Store.php" hash="fa2c934d69827786c75d252ca7644d52"/><file name="Transaction.php" hash="97b89bd584b128a187d9d1adf5c5b916"/><dir name="Translate"><file name="String.php" hash="8cd0aa3f5c7c30aad3fd0fcd165cc720"/></dir><file name="Translate.php" hash="68b58a58b7ef47e8aed0bb79491a38f4"/><dir name="Type"><file name="Abstract.php" hash="07c31641fc2d2823229c49816b6ef570"/><dir name="Db"><dir name="Mysqli"><file name="Setup.php" hash="3cf0a09e1c7e731c9dae3d5b3afff4e7"/></dir><file name="Mysqli.php" hash="36f70719b0310a02391d83aa3dbdedfd"/><dir name="Pdo"><file name="Mysql.php" hash="86c11192008640210f5fa5fc0b3deafe"/></dir></dir><file name="Db.php" hash="b09e37229d7d40eee4dd16b0eb6907c7"/></dir><dir name="Url"><dir name="Rewrite"><file name="Collection.php" hash="e75527e332151ca01f35f971c917dcf7"/></dir><file name="Rewrite.php" hash="b5c8af2cc2ab413518506b15a4ed504b"/></dir><dir name="Variable"><file name="Collection.php" hash="838d97522785722aa461c6f9fe2def30"/></dir><file name="Variable.php" hash="e591445a13f86a4eeb771a557d5a9034"/><dir name="Website"><file name="Collection.php" hash="c2b3e1105e3d69602f7f472293231fc2"/></dir><file name="Website.php" hash="de29c0cc660e16151378a336a5fb61c7"/></dir><file name="Resource.php" hash="9527d36fa5e2aa75187ff4c049f697ff"/><dir name="Session"><dir name="Abstract"><file name="Varien.php" hash="e7740959b34ad951d4630c0a4daa3164"/><file name="Zend.php" hash="72308b2d11ab000588d25d4df25150e1"/></dir><file name="Abstract.php" hash="ac95bc37f2165214c041991a275b2771"/><file name="Exception.php" hash="98839131586ab9bb8fb3a35e601a4f52"/></dir><file name="Session.php" hash="455a0d0855993fea73d72f03aec1621a"/><dir name="Source"><dir name="Email"><file name="Variables.php" hash="82be90144f94a06b71bf27807c7d107d"/></dir></dir><dir name="Store"><dir name="Api"><file name="V2.php" hash="e6cc0a3ed846b4ebf71127e97baa1ff4"/></dir><file name="Api.php" hash="a8a47906c88f28347b38b7e153a16651"/><file name="Exception.php" hash="d1e31c1cc1505c1c266f4af2cd0bf498"/><file name="Group.php" hash="30964e160110fcc2f0ce59f4f81d67fb"/><file name="Observer.php" hash="8cb68f3c084ceff07f686a2ad8a09057"/></dir><file name="Store.php" hash="3d9e0aaa53b5a4b1fedbd91745fa8ac4"/><file name="Template.php" hash="11abdbe9095ecab9a7a4b41616b3286e"/><dir name="Translate"><file name="Expr.php" hash="89e7e11868c16b2c1a8c56d3518cd664"/><file name="Inline.php" hash="ccf2256e9b570310ec8d15f0366f39cf"/><file name="String.php" hash="64c7aaef4b2c4230198c986db3a39906"/></dir><file name="Translate.php" hash="300e03f6505372907280c435b6d9b1f7"/><dir name="Url"><dir name="Rewrite"><file name="Interface.php" hash="a385334dd67b0f705b323ecae16780f6"/><file name="Request.php" hash="fe73343df5f2361271c83c1a9183b4ee"/></dir><file name="Rewrite.php" hash="0e710ac59c1081104a491323e9b9a40b"/><file name="Validator.php" hash="45cfba7e2f2df169e3fb9b2d4f7a766d"/></dir><file name="Url.php" hash="cad05661f9f09624d78241ce97a47868"/><dir name="Variable"><file name="Config.php" hash="71309347cdb795a981b235b8157b7957"/><file name="Observer.php" hash="3b94cc6bc1e793ff721b49aac6ebc18e"/></dir><file name="Variable.php" hash="6ec4f6f72dbbc8f49a652cd9e800ff34"/><file name="Website.php" hash="dc2d1fad015f020f80e38987e6bc1778"/></dir><dir name="sql"><dir name="core_setup"><file name="install-1.6.0.0.php" hash="774e5e49bbf1e87d5c962021a0cd2e65"/><file name="mysql4-data-upgrade-1.6.0.2-1.6.0.3.php" hash="d3b1209b8d9c4266ff6b4c14ae3c938e"/><file name="mysql4-install-0.7.0.php" hash="3ae49979a6faacfa5db7f3ea1f2e6fbf"/><file name="mysql4-install-0.8.0.php" hash="1b852beb9c45d6186c776c4abbfd0a6d"/><file name="mysql4-upgrade-0.6.26-0.7.0.php" hash="9e4c60efe83690f72d57c97e9a9baa92"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="8fa0e5181a55ae5afa7fbc06aa54555b"/><file name="mysql4-upgrade-0.7.2-0.7.3.php" hash="073d25959a3e4bf165cd6020360f194d"/><file name="mysql4-upgrade-0.7.3-0.7.4.php" hash="cfbcb5cdf775395eae0a391b79148c57"/><file name="mysql4-upgrade-0.7.4-0.7.5.php" hash="b6efdcbdbc52c5cd04a1dd589be38cbd"/><file name="mysql4-upgrade-0.7.5-0.7.6.php" hash="3fba8368c3a4243cc7bdb0ce91bc5e6e"/><file name="mysql4-upgrade-0.7.6-0.7.7.php" hash="3e70058014814055129c221bf0b7b537"/><file name="mysql4-upgrade-0.7.7-0.7.8.php" hash="04eebbaa204660f46e9d0089ce004baa"/><file name="mysql4-upgrade-0.7.8-0.7.9.php" hash="3741b30ead80a24b76b40f5db5d5fd1c"/><file name="mysql4-upgrade-0.8.0-0.8.1.php" hash="9a11702898a5e2df4425d1d1538736ab"/><file name="mysql4-upgrade-0.8.10-0.8.11.php" hash="46191d1b92235ea78ab7d9b54717d8fb"/><file name="mysql4-upgrade-0.8.1-0.8.2.php" hash="c53289e81586f87c494d07e0ea29d39e"/><file name="mysql4-upgrade-0.8.11-0.8.12.php" hash="ca6a6706bfcdc8f470c889019b69fa12"/><file name="mysql4-upgrade-0.8.12-0.8.13.php" hash="afe2edd992d3cc32b494089d740aa910"/><file name="mysql4-upgrade-0.8.13-0.8.14.php" hash="9f92e4a05d09f12a8830ead23276cb09"/><file name="mysql4-upgrade-0.8.14-0.8.15.php" hash="0d95f61a511a0137b2b2cb9c523139a4"/><file name="mysql4-upgrade-0.8.15-0.8.16.php" hash="687698e8bea775e51d640f0ffbdc1ef1"/><file name="mysql4-upgrade-0.8.16-0.8.17.php" hash="5132926360c0e0866ffbb25b87a8106d"/><file name="mysql4-upgrade-0.8.17-0.8.18.php" hash="4f25a42e71ffd35a7e2853d1f2cd3263"/><file name="mysql4-upgrade-0.8.18-0.8.19.php" hash="90a043d70163f673f4de7e43811ea8bc"/><file name="mysql4-upgrade-0.8.19-0.8.20.php" hash="dc6a7ab95f741061bba0025ea246f297"/><file name="mysql4-upgrade-0.8.20-0.8.21.php" hash="8f2a893467f078ec86f375cd0fd11891"/><file name="mysql4-upgrade-0.8.2-0.8.3.php" hash="a9537c660ce867aa741fe980527052a4"/><file name="mysql4-upgrade-0.8.21-0.8.22.php" hash="98143b6228c3b923f7a2ca4642680b4c"/><file name="mysql4-upgrade-0.8.22-0.8.23.php" hash="8f82208b444c39ab80934eac6b5b2091"/><file name="mysql4-upgrade-0.8.23-0.8.24.php" hash="aba8ec42952aa998964b4645d8050919"/><file name="mysql4-upgrade-0.8.24-0.8.25.php" hash="87ceb0c0480b3a94afdc276b325ba97d"/><file name="mysql4-upgrade-0.8.25-0.8.26.php" hash="70a0ce49c08e2c6a2c8b8a27684e0681"/><file name="mysql4-upgrade-0.8.26-0.8.27.php" hash="dcbb3cac0555c4737d9ef293aea8b0fd"/><file name="mysql4-upgrade-0.8.27-0.8.28.php" hash="32f9193a5cdb114854cf7c4bdad6f1a3"/><file name="mysql4-upgrade-0.8.3-0.8.4.php" hash="5f403a49ee786185ce30823c631a4ec1"/><file name="mysql4-upgrade-0.8.4-0.8.5.php" hash="cbfb928674adc40c3336c862d4b117db"/><file name="mysql4-upgrade-0.8.5-0.8.6.php" hash="0ef6546a015a5caa06bb6c0638708294"/><file name="mysql4-upgrade-0.8.6-0.8.7.php" hash="8f9476af25731a0f8f2683ab509b9fa7"/><file name="mysql4-upgrade-0.8.7-0.8.8.php" hash="07c713b6c27686eeeec4ddf2ba8b92ae"/><file name="mysql4-upgrade-0.8.8-0.8.9.php" hash="9a87a148c4c817944f02ff3337491452"/><file name="mysql4-upgrade-0.8.9-0.8.10.php" hash="b5e0af48288aae03dec9a19c0dc4a65f"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="d94144fbdb93139d4b26fc34fd1040be"/><file name="upgrade-1.6.0.1-1.6.0.2.php" hash="677b033cbfcb4a353f553da20968dd31"/><file name="upgrade-1.6.0.2-1.6.0.3.php" hash="4d28c3fed61de1207f85b121b5a7f062"/></dir></dir></dir><dir name="Cron"><dir name="etc"><file name="config.xml" hash="575300fbf78a4e39d6c7c74a850c5014"/><file name="system.xml" hash="b91aac8f1e7b2f4194d8acc16e101476"/></dir><file name="Exception.php" hash="e88795f5b211d37223ae01b8607e5661"/><dir name="Helper"><file name="Data.php" hash="7d7d8d6e596634692e03c6b7f0e9a082"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Schedule"><file name="Collection.php" hash="8700a67949cbd86229884818ef850870"/></dir><file name="Schedule.php" hash="0cb13b9f30787bb112ffc7f99d90005b"/></dir><file name="Observer.php" hash="9d88a212101711843bff04604456e710"/><dir name="Resource"><dir name="Schedule"><file name="Collection.php" hash="d202a05b8c5bcdd40874fefc347a4d36"/></dir><file name="Schedule.php" hash="45b1097088855382a14064ff17870760"/></dir><file name="Schedule.php" hash="a9fcc94de83679a3503cff3876570bfc"/></dir><dir name="sql"><dir name="cron_setup"><file name="install-1.6.0.0.php" hash="bc67842c49d3e3084004fe4571cfe4c3"/><file name="mysql4-install-0.7.0.php" hash="d67f5bae07d592a74c6fba2e1b5c5c23"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="d58f230a2761383c816202cc37a19ffa"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="e2852b31880174092f7a5b52dc00e5aa"/></dir></dir></dir><dir name="CurrencySymbol"><dir name="Block"><dir name="Adminhtml"><dir name="System"><file name="Currencysymbol.php" hash="2420b903cdac65f32ef9b34e12df8cf6"/></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="System"><file name="CurrencysymbolController.php" hash="acc72c43ff94e747b572f4fc95f8447d"/></dir></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="d2f660fb94dbe08ec1cd9d6dcead5385"/><file name="config.xml" hash="990db1257d1bb6341b32385232563cdc"/></dir><dir name="Helper"><file name="Data.php" hash="d401559c1674748d8fd83027a42f21ac"/></dir><dir name="Model"><file name="Observer.php" hash="952980650e6f41602910d4f45626c089"/><dir name="System"><file name="Currencysymbol.php" hash="ba3c94102d9c5f5ec06546e33f982e7d"/></dir></dir></dir><dir name="Customer"><dir name="Block"><dir name="Account"><dir name="Dashboard"><file name="Address.php" hash="6e9159a75e4aa8a83e6d91e85bb87e0d"/><file name="Block.php" hash="34c51d3cd66e8a3eadf58508f375db6f"/><file name="Hello.php" hash="1c280c347ffcb5200aa8cb426c26c7c5"/><file name="Info.php" hash="62d5edda23e10a1a55ad4a57e04ab238"/><file name="Newsletter.php" hash="68e77e54e35997603e80e2766ec7bd19"/><file name="Sidebar.php" hash="4f5e309afccfbe6c7605fdd11424527c"/></dir><file name="Dashboard.php" hash="85b0dbd0760aa71301b05340eca8c9bb"/><file name="Forgotpassword.php" hash="d2be186d931b95927369956514c19002"/><file name="Navigation.php" hash="1e52d544a1af959927d9d4382c53a4fe"/><file name="Resetpassword.php" hash="54db212c29e68fce33a3e2288698d276"/></dir><file name="Account.php" hash="1044133d2c6ccf832529d80b34868e93"/><dir name="Address"><file name="Book.php" hash="8cfc98566d53ffae9d3bde593d07fe36"/><file name="Edit.php" hash="6325d4b5774c467c26e013688816b066"/><dir name="Renderer"><file name="Default.php" hash="86a91ca248cb89df0f7f42470d890be5"/><file name="Interface.php" hash="e75acbb252ed40b20321ca39950b1137"/></dir></dir><dir name="Form"><file name="Edit.php" hash="9def0573840f98df0a51c3c353fd8141"/><file name="Login.php" hash="0537fad0ca7ec67e1453fbb31de7020b"/><file name="Register.php" hash="f8b6758961d84ce5a3992875d0ec847b"/></dir><file name="Newsletter.php" hash="d8679147156129e0d9c36150cfd7ac24"/><dir name="Widget"><file name="Abstract.php" hash="cc4a9267251d08378b6acc16f75d58ac"/><file name="Dob.php" hash="2d60d4c0ee0dc85e4756cc2cd76a080f"/><file name="Gender.php" hash="2c71c164f703bb8087a7b89c9470b849"/><file name="Name.php" hash="2ef45cd7827e821c8f57c6b398e42499"/><file name="Taxvat.php" hash="ce61bdc5cb66301a4cb11da2c53d1bda"/></dir></dir><dir name="controllers"><file name="AccountController.php" hash="337a635b0d7223922b53100c07113de0"/><file name="AddressController.php" hash="9d33926df8708ddb681d61a78884827c"/><file name="ReviewController.php" hash="9bd76e984049f8a495072a4d2885e299"/></dir><dir name="etc"><file name="adminhtml.xml" hash="8f262211c7f4a1877ddab0296c530bd4"/><file name="api2.xml" hash="03cac279f220d4662cb5bdde9a630b96"/><file name="api.xml" hash="daaad1af1d2196a9a8dee40e6fcbe8e7"/><file name="config.xml" hash="d2e12771206cff25db36c5fe5764d0f9"/><file name="system.xml" hash="b9826ea3d24abbc0423711918515c1f9"/><file name="wsdl.xml" hash="ee377e78b3435b0493ce59957d0fc1f3"/><file name="wsi.xml" hash="7cf579d2b5ee2eb66eee6e8194617404"/></dir><file name="Exception.php" hash="e2bab042c7bb2d198efe893aaf90bfe5"/><dir name="Helper"><file name="Address.php" hash="d3d2dc2d9b0f88292a397872586828eb"/><file name="Data.php" hash="e28d1cd3cc3bb6c0c08449481eefd783"/></dir><dir name="Model"><dir name="Address"><file name="Abstract.php" hash="0c64751b83a28f808b548cd92f5c7db4"/><dir name="Api"><file name="V2.php" hash="d2e4dd2e0a62762122ca3384b710ea84"/></dir><file name="Api.php" hash="ffe5654257fd8c76a4a20104b449efd5"/><file name="Config.php" hash="39307cd4c060d658391a4c3a07c66a00"/></dir><file name="Address.php" hash="f642fcea28891883cdcd6d6567915cac"/><dir name="Api"><file name="Resource.php" hash="2e3b72e52202dbf9843b338c962ada01"/></dir><dir name="Api2"><dir name="Customer"><dir name="Address"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="cd6fb2c8d7da24f9a12d57f46730178c"/></dir><dir name="Customer"><file name="V1.php" hash="86e5677e15f9f5fa85a58d0779e63f10"/></dir></dir><file name="Rest.php" hash="bed3c53fcd7850f2df4d29a541052314"/><file name="Validator.php" hash="75694da19e5abafdb7ccb63587d21eaf"/></dir><file name="Address.php" hash="37d92cb2f2d05a182faa81751e86b8a9"/><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="aeaafc49023607ab4162c2944d9285c9"/></dir><dir name="Customer"><file name="V1.php" hash="eabd1d45db4fedce73b7f290d5fd2d74"/></dir></dir><file name="Rest.php" hash="2b62a7e453d9a5b99ea5aaeda9f470f3"/></dir><file name="Customer.php" hash="72d0eadbe14e96de082a8e64be94a4c6"/></dir><dir name="Attribute"><dir name="Backend"><dir name="Data"><file name="Boolean.php" hash="c43d852b887b33608d92c6bbba966b6b"/></dir></dir><dir name="Data"><file name="Abstract.php" hash="719affca7e10245e8387cc1ffbed5601"/><file name="Boolean.php" hash="8d0b765518eef12130ebc5a986936e30"/><file name="Date.php" hash="779139744992a374d8d86ef940b13236"/><file name="File.php" hash="5b03efa0e46b4c0bd563373274837714"/><file name="Hidden.php" hash="dd8be7c6da027cf41e1848703f8ddfe7"/><file name="Image.php" hash="c70f5759042b4c58be8fc83cdc16cb60"/><file name="Multiline.php" hash="13b29e691ffc3c289f3715d7ac2cc6c7"/><file name="Multiselect.php" hash="bb876771d402809d45390cb0995a5503"/><file name="Postcode.php" hash="ab422addf5aff0f12cab68cab4999c33"/><file name="Select.php" hash="d191f532051b54ddf96c165a1b0022c2"/><file name="Textarea.php" hash="52e3c544bafc808f4d3855af27afecb7"/><file name="Text.php" hash="ff0d18fbb3529a8f64d0a39309ca6b8b"/></dir><file name="Data.php" hash="26896ca03ae10c661eae8955b1ed2c68"/></dir><file name="Attribute.php" hash="6f2849ac067026a3efb609c917d6a883"/><dir name="Config"><file name="Share.php" hash="a3f83b4693f570dbec69f052c246d67f"/></dir><dir name="Convert"><dir name="Adapter"><file name="Customer.php" hash="b6aafa6d6f2f61683a7d2c10146c4efa"/></dir><dir name="Parser"><file name="Customer.php" hash="3dd4ea42c2277c27302fe78ccd0232fa"/></dir></dir><dir name="Customer"><dir name="Api"><file name="V2.php" hash="6bfe3b3ae9029896d0347de43401f659"/></dir><file name="Api.php" hash="fca9df265e8b05846daaf15e04f98acb"/><dir name="Attribute"><dir name="Backend"><file name="Billing.php" hash="5508eb212020e468960c49db21afa798"/><file name="Password.php" hash="134b9b11d4b807da0ca024a68f757c77"/><file name="Shipping.php" hash="2c7e13d10bc1153d91227d4666b6faca"/><file name="Store.php" hash="3d95721f77483a8e0f9845cd62fbfdb8"/><file name="Website.php" hash="5f6b2fa61ee00c1bf735ca9d3eaa45c7"/></dir><dir name="Source"><file name="Group.php" hash="c22870e048053096d0ef6b0ee9d377fa"/><file name="Store.php" hash="db5df4dbf7b0a13757a325f25f7c3f4d"/><file name="Website.php" hash="71eab49b32063c493ed7cf6b6e1cb78f"/></dir></dir></dir><file name="Customer.php" hash="e3acf9086b2ee0dfe32f3110627e5307"/><dir name="Entity"><dir name="Address"><dir name="Attribute"><dir name="Backend"><file name="Region.php" hash="2db41df75616e9a6abde54730a90bdbf"/><file name="Street.php" hash="709004dc6540b028abfdd5ce943f4d50"/></dir><file name="Collection.php" hash="1e41fa62c80815a9c6e33820218a69ec"/><dir name="Source"><file name="Country.php" hash="079d14b77a9c211c7766120e8ce41973"/><file name="Region.php" hash="1db757cfbb3c5f52a2d61bb70655f941"/></dir></dir><file name="Collection.php" hash="2a4885334c43745b52cedfe1b9541c9f"/></dir><file name="Address.php" hash="b9f02b4ec095303b4906fd534be1a112"/><dir name="Attribute"><file name="Collection.php" hash="fe8ef3942a0ed1ff3c81d652779956c8"/></dir><file name="Attribute.php" hash="8764f35fb182eb7f1893eefffed2d43c"/><dir name="Customer"><file name="Collection.php" hash="ed3797cf2610d224264ff311fa2354cb"/></dir><file name="Customer.php" hash="01f68d7acf54b436d54f4306a73a5c5b"/><dir name="Form"><dir name="Attribute"><file name="Collection.php" hash="0e2ec5722da271f7c8a78fa888a861a4"/></dir><file name="Attribute.php" hash="ad4fe06f5cc25eca5f18af0b46b525f7"/></dir><dir name="Group"><file name="Collection.php" hash="ebd1e0bdc05f220e275e1ed0d2f8a9fc"/></dir><file name="Group.php" hash="95c2f7e8a95b975c4fbe5c4f8aa86f71"/><file name="Setup.php" hash="760cb7a6581653fce441825ace5487c0"/><dir name="Wishlist"><file name="Collection.php" hash="6c456b0efe16741ddc823685500a9c1e"/></dir></dir><file name="Form.php" hash="cd2edce875d3684cf7c213e5f105081d"/><dir name="Group"><dir name="Api"><file name="V2.php" hash="cf2ea4825d3a5d12f6932fa6b6fbe16d"/></dir><file name="Api.php" hash="a95262a7e0c74c9a520d8d32c697ddde"/></dir><file name="Group.php" hash="6ab564a97c312985571a535992ad2365"/><file name="Observer.php" hash="ec291c2167456521b759b8f3672f5b79"/><dir name="Resource"><dir name="Address"><dir name="Attribute"><dir name="Backend"><file name="Region.php" hash="c7056f48250a8f36b3f85c4249ca1d81"/><file name="Street.php" hash="bfb890d08d4aa16d047b95e59d7c7555"/></dir><file name="Collection.php" hash="b2ca7c83d838c85e463514033bf80761"/><dir name="Source"><file name="Country.php" hash="1daaf1f384d2d6deca8f642e2ee01a08"/><file name="Region.php" hash="b5f3784989f9b42b35afca1bb6d51942"/></dir></dir><file name="Collection.php" hash="0f3dc05bb7509277a3f5fd174c1450b3"/></dir><file name="Address.php" hash="ebff6ddb74301c07a214574160ceba20"/><dir name="Attribute"><file name="Collection.php" hash="f87cfd3ec113de1b14dd0b5556dcca56"/></dir><file name="Attribute.php" hash="3e74d16932a2c3a0b4394e3ead7135ad"/><dir name="Customer"><file name="Collection.php" hash="0c35bfeb804d4a4a4cc1e54e7231a0cf"/></dir><file name="Customer.php" hash="db6f1f65202a015739e81130ebf1bb8c"/><dir name="Form"><dir name="Attribute"><file name="Collection.php" hash="b613c6dc7fa13167ec09317527ccc3e8"/></dir><file name="Attribute.php" hash="02bf5fc3ad369ccc0501be85945fac51"/></dir><dir name="Group"><file name="Collection.php" hash="a2aa4fb9b65df04411878086ef468b92"/></dir><file name="Group.php" hash="2fc1621733dd4fed901152bc09fe0de1"/><file name="Setup.php" hash="f20c1b2067b6416eb89bb516e21ae7b7"/><dir name="Wishlist"><file name="Collection.php" hash="ef8fde2e8822133ff34c45c024f33cd7"/></dir></dir><file name="Session.php" hash="012900f557f267e3246d9ce5b69f1e37"/></dir><dir name="sql"><dir name="customer_setup"><file name="install-1.6.0.0.php" hash="e550331b662d7fc0347cb5c414484153"/><file name="mysql4-data-upgrade-1.4.0.0.11-1.4.0.0.12.php" hash="631dd02c4639bbb59ffe5eeb1c2f3508"/><file name="mysql4-data-upgrade-1.4.0.0.13-1.4.0.0.14.php" hash="d19025b10c5fd1c01915a8c975ce7b47"/><file name="mysql4-data-upgrade-1.4.0.0.7-1.4.0.0.8.php" hash="587cb24f1b333871930099415095e60e"/><file name="mysql4-data-upgrade-1.4.0.0.8-1.4.0.0.9.php" hash="d464f5e1edb3749957766cea16d5d616"/><file name="mysql4-install-0.7.0.php" hash="b2680ce071d0447086a38f9b08247890"/><file name="mysql4-install-0.8.0.php" hash="ef5d85d5ec05a66de096001e280f12f0"/><file name="mysql4-install-1.4.0.0.0.php" hash="825c615799adc3ba0df1209ba14ad40a"/><file name="mysql4-upgrade-0.6.1-0.7.0.php" hash="be68e51325e112aa014c3e33e7cee836"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="1491af6e46f68abe4744817062b82d9c"/><file name="mysql4-upgrade-0.7.2-0.7.3.php" hash="21e0832d2feaa9c249efba5a9cf2a679"/><file name="mysql4-upgrade-0.8.0-0.8.1.php" hash="877aa414cca237e5921510ce046a09d8"/><file name="mysql4-upgrade-0.8.10-0.8.11.php" hash="ed53b9ce78cdc7f1e4edc555c249ff72"/><file name="mysql4-upgrade-0.8.11-0.8.12.php" hash="73aa0b642b9199712bcd1f6b870dd17d"/><file name="mysql4-upgrade-0.8.12-1.4.0.0.0.php" hash="70e4317324e02468737da0e75b328e6b"/><file name="mysql4-upgrade-0.8.4-0.8.5.php" hash="48cef2dc2134fac01b284ed1995dd6af"/><file name="mysql4-upgrade-0.8.5-0.8.6.php" hash="6a0a6d19564652c9e5b4fab87ae8cadd"/><file name="mysql4-upgrade-0.8.6-0.8.7.php" hash="74c252ca559f1018e9e908326c6df77b"/><file name="mysql4-upgrade-0.8.7-0.8.8.php" hash="ceabb289a773f0fbfea1a0e0286df0d2"/><file name="mysql4-upgrade-0.8.8-0.8.9.php" hash="e8a67a99c38a8b4bca471d167b119cec"/><file name="mysql4-upgrade-0.8.9-0.8.10.php" hash="e99095d5122127da7143d0c33ac7e8e5"/><file name="mysql4-upgrade-1.4.0.0.0-1.4.0.0.1.php" hash="66e46752993f980a14cdd38dca591676"/><file name="mysql4-upgrade-1.4.0.0.10-1.4.0.0.11.php" hash="7832b0027d8aeafd6d389f04649cdecf"/><file name="mysql4-upgrade-1.4.0.0.1-1.4.0.0.2.php" hash="06e178ae93b3822074acff6b019fc726"/><file name="mysql4-upgrade-1.4.0.0.12-1.4.0.0.13.php" hash="df116d2a0bb9720c26f220118f724e5c"/><file name="mysql4-upgrade-1.4.0.0.2-1.4.0.0.3.php" hash="f7ec1198653c489e9f65f2b4f7d55086"/><file name="mysql4-upgrade-1.4.0.0.3-1.4.0.0.4.php" hash="44f63a45cefac2d763548552f04d3309"/><file name="mysql4-upgrade-1.4.0.0.5-1.4.0.0.6.php" hash="ec7b8f479e12ae31a4c6b75dc19e6baa"/><file name="mysql4-upgrade-1.4.0.0.6-1.4.0.0.7.php" hash="b605b717ed3193902738bba563066742"/><file name="mysql4-upgrade-1.4.0.0.7-1.4.0.0.8.php" hash="08ff5779d81efb07a7833d15d8a2a893"/><file name="mysql4-upgrade-1.4.0.0.8-1.4.0.0.9.php" hash="a34a35b7976546adacb1ff28f72b0a5b"/><file name="mysql4-upgrade-1.4.0.0.9-1.4.0.0.10.php" hash="683216e87dac2bbb12907913eebedb55"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="b18e2e88f5358fd1b3c0bfcd680124fe"/><file name="mysql4-upgrade-1.6.0.0-1.6.1.0.php" hash="20f22e44f8232f6720cc51ddaa266977"/><file name="upgrade-1.6.1.0-1.6.2.0.php" hash="e8af27a80d7a66ecba09a732aec65d24"/><file name="upgrade-1.6.2.0-1.6.2.0.1.php" hash="7f35443747a01396b918ff694ef990f2"/></dir></dir></dir><dir name="Dataflow"><dir name="data"><dir name="dataflow_setup"><file name="data-install-1.6.0.0.php" hash="195f641182f0a642c7197a96a59180d8"/></dir></dir><dir name="etc"><file name="config.xml" hash="9ae264687597840fc0d0a9cfcd41bf34"/></dir><dir name="Helper"><file name="Data.php" hash="94ea892ec5100face7778bbadf9dc9f2"/></dir><dir name="Model"><dir name="Batch"><file name="Abstract.php" hash="41a76d255a5b7c84c163c5da171385ef"/><file name="Export.php" hash="2342b21bc678433c81948d647a425fcc"/><file name="Import.php" hash="ceb18fa47cab0f437ddee1e79bd2a80b"/><file name="Io.php" hash="a99e787106b7d1524aeae3299b485a59"/></dir><file name="Batch.php" hash="4c5426fc61a59fd9e807f5d2ea8ce3a1"/><dir name="Convert"><dir name="Action"><file name="Abstract.php" hash="e1948d2e8fe96ac15f4b6497dbdbd104"/><file name="Interface.php" hash="0eb1d54c86350f859003a915ba086788"/></dir><file name="Action.php" hash="ffc0d5b9b4e8f821d7d784cd5af2402c"/><dir name="Adapter"><file name="Abstract.php" hash="e2f63428a6f0e81b6764adcc37ab8b4f"/><dir name="Db"><file name="Table.php" hash="c9cbd429a934d0bfb8ca3f4ebcabbbe3"/></dir><dir name="Http"><file name="Curl.php" hash="cf99745f245740dcc58b079f3b16cf6a"/></dir><file name="Http.php" hash="260038519358251b72fb9773412436ff"/><file name="Interface.php" hash="27a65f50911cb10cfdad1fb60bd303d0"/><file name="Io.php" hash="02b7b84b38be2627164ce457a7eac054"/><file name="Soap.php" hash="60ae8995f47fab93899cd17dbca1d42e"/><file name="Std.php" hash="a453839d9aa122d333da7f596af292e0"/><dir name="Zend"><file name="Cache.php" hash="5566150708783923a775c1c3a1a3ebeb"/><file name="Db.php" hash="4357273ecffb3ec5f1e1c503c242d098"/></dir></dir><dir name="Container"><file name="Abstract.php" hash="5a60f6eefaa561da914eb43e13dbf106"/><file name="Collection.php" hash="f03d5843071b4046a052b501134906b7"/><file name="Generic.php" hash="f5709a1bf93f2cebe970b346f51f8a1b"/><file name="Interface.php" hash="384dbf84229755cbe9f1e31887fdaf5c"/></dir><file name="Exception.php" hash="cea84bd39c2f9ec7f1da2f9fe9d3af4e"/><dir name="Iterator"><dir name="File"><file name="Csv.php" hash="b611694adc398b61348811e95763bbe1"/></dir><file name="Http.php" hash="94382495b2ff119941491b9bcb70387c"/><file name="Interface.php" hash="c380df886e777964e807a07fdc2c4e7d"/></dir><file name="Iterator.php" hash="b28265ffd82bcdc63c11c0b8d98d2264"/><dir name="Mapper"><file name="Abstract.php" hash="e54ca8c4a10b7f434b42b28464ef7a9a"/><file name="Column.php" hash="9271a7aa643092ce357d2eb88a24ced3"/><file name="Interface.php" hash="2e3d8c0691de7a28a7bb8cb4daa8fb6b"/></dir><dir name="Parser"><file name="Abstract.php" hash="0318a0e81176f547638625cbcfba6bc0"/><file name="Csv.php" hash="75c753c85e344d11275bed5dba602547"/><file name="Interface.php" hash="85d3fcb69fa7a5ef5219ff3651e6cb86"/><file name="Serialize.php" hash="717879cf28ad47cdb5dc8ecc5bbc478b"/><dir name="Xml"><file name="Excel.php" hash="ab35f1205eccb0d1d44ca6f616447501"/></dir></dir><dir name="Profile"><file name="Abstract.php" hash="0699e1a71dcca85883f89d8fb3737518"/><file name="Collection.php" hash="db9b4afbbe44367e2457f2b15445847a"/><file name="Interface.php" hash="80bbb1f1dca1895df957926d989d96f3"/></dir><file name="Profile.php" hash="4ff187e9f0e757bc2eb8aa94ecc810dc"/><dir name="Validator"><file name="Abstract.php" hash="80ad0e1d109127bb09cb387348aec528"/><file name="Column.php" hash="2d3b3dea742eefda7a09e156d20dbb86"/><file name="Dryrun.php" hash="0b498d30c3739a96078561d906096c5d"/><file name="Interface.php" hash="6d67d5d320df8c7c4d7d6c06a7455c00"/></dir></dir><file name="Convert.php" hash="29031d99d9ed6453c4660be496ca2c26"/><file name="Import.php" hash="1b7cbc3d5d380840b77495318be92abf"/><dir name="Mysql4"><dir name="Batch"><file name="Abstract.php" hash="5fd3a348516a16e5d2507be8f7cd91f1"/><file name="Collection.php" hash="d5461d8c4a0eb4c49e8d98b8e2487df7"/><file name="Export.php" hash="057056843517aa184ecbd194af97ad8b"/><file name="Import.php" hash="6c13499abf1dbd6963a865dece2675ab"/></dir><file name="Batch.php" hash="725e10b441fa1ec3775e6018a73f25e3"/><file name="Catalogold.php" hash="ef7ee4fba4da66ccd1d470a331d50224"/><dir name="Import"><file name="Collection.php" hash="10c2f2822df0c3c1b3fff0017898f507"/></dir><file name="Import.php" hash="82724b71ecf32fa7ec1e104c52bf36f7"/><dir name="Profile"><file name="Collection.php" hash="8786bd6706e6ea81bf390027c475684a"/><dir name="History"><file name="Collection.php" hash="aae9f224583b5da2f7839378d5fcb2f2"/></dir><file name="History.php" hash="acf0f11841917de639b4515cb86317af"/></dir><file name="Profile.php" hash="f1fd5425070fdaf55baeb47129169f58"/><file name="Session.php" hash="d237701967bf5bbe185b41bd8f10e90f"/></dir><dir name="Profile"><file name="History.php" hash="73d919b1b2cdf310021563895aa1f730"/></dir><file name="Profile.php" hash="d37746b7eb9437ad2478a98c875e8bd3"/><dir name="Resource"><dir name="Batch"><file name="Abstract.php" hash="80a4334d779c8c81613e01c2b71715fb"/><file name="Collection.php" hash="c6dfe467f3948dab03ef87158a52f032"/><file name="Export.php" hash="f5bfde2968f27bb4024557db9fe9312e"/><file name="Import.php" hash="6b22271b77ef9c8d2e3a8806661baee5"/></dir><file name="Batch.php" hash="f11259deb623dcaa5619e35d684b84b1"/><dir name="Import"><file name="Collection.php" hash="e5f066f77f3c36ad738f70b82ec21106"/></dir><file name="Import.php" hash="7d29d4c3eb56823ecb1df61d8f40eb05"/><dir name="Profile"><file name="Collection.php" hash="8d0de95c988bb1f08806be4613cae3ab"/><dir name="History"><file name="Collection.php" hash="c0400b619dd43190f06682a4b22d3f3c"/></dir><file name="History.php" hash="64598bb34195f93d855fba7f70431a1b"/></dir><file name="Profile.php" hash="be2fc6b2e12e9e08c8bfb99bb9165950"/><file name="Session.php" hash="50df569772cdee91c4101b0254ef7e67"/></dir><dir name="Session"><dir name="Adapter"><file name="Http.php" hash="d36d9e9918e7a949a0cf738ba47e5a26"/></dir><dir name="Parser"><file name="Csv.php" hash="7dd65312094c29daab2e89fcb646d762"/></dir></dir><file name="Session.php" hash="a6a164408701d00b68fad01568ea8af7"/></dir><dir name="sql"><dir name="dataflow_setup"><file name="install-1.6.0.0.php" hash="12e49e1ef025261cde22087024e07bb5"/><file name="mysql4-install-0.7.0.php" hash="2021b68cee83637c9dd36b434a7fe0c3"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="28f2fd13c13310236814964bac107e5d"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="af1dc1f0e49ec3802517ac0e3135b866"/><file name="mysql4-upgrade-0.7.2-0.7.3.php" hash="56cf728f46656ef1a40106ad6e64a073"/><file name="mysql4-upgrade-0.7.3-0.7.4.php" hash="99bfc9b32757e91e8c096cb5e1c9e927"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="994c3af240a6c67e6b13f9fc6390269f"/></dir></dir></dir><dir name="Directory"><dir name="Block"><dir name="Adminhtml"><dir name="Frontend"><dir name="Currency"><file name="Base.php" hash="4e0219ddc658d4cdf84d759b5d4df613"/></dir><dir name="Region"><file name="Updater.php" hash="5e68af3786fc11d21ddd286978b030f1"/></dir></dir></dir><file name="Currency.php" hash="42f582d5b4251fdf862886f0b75231b3"/><file name="Data.php" hash="a1fcfe2e6758342aea0084f6f010ce51"/></dir><dir name="controllers"><file name="CurrencyController.php" hash="ed96beef0629a58183193022b66d4a69"/></dir><dir name="data"><dir name="directory_setup"><file name="data-install-1.6.0.0.php" hash="a86d5c5cb802e3eee0b42f584d54c362"/><file name="data-upgrade-1.6.0.0-1.6.0.1.php" hash="e161f73f4f57bf8e4fefde7931be613d"/></dir></dir><dir name="etc"><file name="api.xml" hash="57681bc4db1db3db1351604942fb42c3"/><file name="config.xml" hash="d5ca5f290857076f656751886d3f1d35"/><file name="system.xml" hash="20d24918ea12aca0bbe47a2bee302480"/><file name="wsdl.xml" hash="cc488b81c0eae648a0ee360d6e2d9960"/><file name="wsi.xml" hash="66de37cc17e24c0c66f74c52e2df616e"/></dir><file name="Exception.php" hash="d7b214200b3cf7bd09edd22ca180abcc"/><dir name="Helper"><file name="Data.php" hash="e301fd08443818d1aff745aa0d072557"/><file name="Url.php" hash="7f9de744f02cc081acddf6ee102df54d"/></dir><dir name="Model"><dir name="Country"><dir name="Api"><file name="V2.php" hash="5155e2d7e4823c272881ac215cbd953e"/></dir><file name="Api.php" hash="31d0e213789a5ae666156c89aca73246"/><file name="Format.php" hash="9fa00a645f1e0eda5ce5842044706d88"/></dir><file name="Country.php" hash="b5d86dabad5ba152f927eef9f661cf49"/><dir name="Currency"><file name="Filter.php" hash="5f464402aa2eae8be8a93d0c3be9326a"/><dir name="Import"><file name="Abstract.php" hash="68e956fc83456523aa63c796adce8232"/><file name="Webservicex.php" hash="0fb99338060d79965474c8547a1b600b"/></dir></dir><file name="Currency.php" hash="d37685712df8ba13a4ade3648899302b"/><dir name="Mysql4"><dir name="Country"><file name="Collection.php" hash="7ac4ff7a1806d9d1e7967b765b9cbe83"/><dir name="Format"><file name="Collection.php" hash="1ddc239d9ae7572c8d023ed607d76ca6"/></dir><file name="Format.php" hash="7cf0c3e12781d008e2232b8002d3f91c"/></dir><file name="Country.php" hash="836920bbb94abfc49a9ef34dce36d6d4"/><dir name="Currency"><file name="Collection.php" hash="ce409aeef7d41f682a593faf89274d9f"/></dir><file name="Currency.php" hash="8640c219167a4fae5f2ecd8bff4b8557"/><dir name="Region"><file name="Collection.php" hash="0b56d26af59226df7d756891e00fec67"/></dir><file name="Region.php" hash="a5216b3e3b0897a1cc56dd7a7096a4f4"/></dir><file name="Observer.php" hash="6bf84c84efe131e0aaf6a54547f00f30"/><dir name="Region"><dir name="Api"><file name="V2.php" hash="2d02de099b8a19fc71f9d0bea3bf8e8c"/></dir><file name="Api.php" hash="29f91b917fdbb213a47685e907dd2a72"/></dir><file name="Region.php" hash="9cd8556ff685d2840acb63a62fe7023b"/><dir name="Resource"><dir name="Country"><file name="Collection.php" hash="fb74a34fa68f2953591c31e2cd524cc3"/><dir name="Format"><file name="Collection.php" hash="d86522253addf9ed6f5311138be52a6e"/></dir><file name="Format.php" hash="fb3cc349d35353b3d66ddd4ed72afbe9"/></dir><file name="Country.php" hash="dc42379e40a67d5e09f73f5664a1b5a1"/><dir name="Currency"><file name="Collection.php" hash="7c9434a049dcc27a2c71e782118f19ec"/></dir><file name="Currency.php" hash="a2968750dbcbf8affd8af639583dfc93"/><dir name="Region"><file name="Collection.php" hash="0d336cb273211eb6cf249d8b1a57e845"/></dir><file name="Region.php" hash="122ec8cd245f112919e886e65f866967"/></dir></dir><dir name="sql"><dir name="directory_setup"><file name="install-1.6.0.0.php" hash="a35b3e1ae3f66ce0d1d5c8671eee47e5"/><file name="mysql4-install-0.7.0.php" hash="4b33300b59cd41e2d582f08748a701a9"/><file name="mysql4-install-0.8.0.php" hash="8961747d608c56bb1cf23c4379b4f4b0"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="db7d9ffc49764800aa5f5546646dd268"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="382f23acde90bf81206465eb8daf2ea5"/><file name="mysql4-upgrade-0.8.0-0.8.1.php" hash="7de811903a150170101637e802ceae9e"/><file name="mysql4-upgrade-0.8.10-0.8.11.php" hash="26b365ae87cf5b0f64f774b1330d2da5"/><file name="mysql4-upgrade-0.8.1-0.8.2.php" hash="b1a46462d8d509b1035e8d359335466f"/><file name="mysql4-upgrade-0.8.2-0.8.3.php" hash="281917321769b6870d33a730ff186651"/><file name="mysql4-upgrade-0.8.3-0.8.4.php" hash="31ebee443000a8bdc4f8dd0ff8452306"/><file name="mysql4-upgrade-0.8.4-0.8.5.php" hash="ac25242cc2a4daf94d3a98aefa126446"/><file name="mysql4-upgrade-0.8.5-0.8.6.php" hash="61f15e6487c21db687c3a0a2eb85138a"/><file name="mysql4-upgrade-0.8.6-0.8.7.php" hash="a57dbcbd880cc219f049a2636312c485"/><file name="mysql4-upgrade-0.8.7-0.8.8.php" hash="ee895e1005826725d0838bdb5cd54410"/><file name="mysql4-upgrade-0.8.8-0.8.9.php" hash="5b18848a16a0aeb185cedfb669761ebc"/><file name="mysql4-upgrade-0.8.9-0.8.10.php" hash="e9a28da7c649ffd4ab3459b1cc10e0e8"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="cc4da2053e41f6340de5ce9d6550fda3"/><file name="upgrade-1.6.0.1-1.6.0.2.php" hash="c711270d7c3d4db1fca8b5a966c7b2b0"/></dir></dir></dir><dir name="Downloadable"><dir name="Block"><dir name="Adminhtml"><dir name="Catalog"><dir name="Product"><dir name="Composite"><dir name="Fieldset"><file name="Downloadable.php" hash="9743b9c5456f134f904daee986c2bbdc"/></dir></dir><dir name="Edit"><dir name="Tab"><dir name="Downloadable"><file name="Links.php" hash="7f4689fa6ee54e0d760c763be4e16ec3"/><file name="Samples.php" hash="2e274125fde854239288c39c4a5e0e89"/></dir><file name="Downloadable.php" hash="5649222a58544ae2c83a225ae7f6a4f3"/></dir></dir></dir></dir><dir name="Sales"><dir name="Items"><dir name="Column"><dir name="Downloadable"><file name="Name.php" hash="e1c1f719e3519af7a8b3a5a81da82571"/></dir></dir></dir></dir></dir><dir name="Catalog"><dir name="Product"><file name="Links.php" hash="cad6f5c305fbe73e85559b539cc4c37d"/><file name="Samples.php" hash="2630a0998d2d0d3b9e52737b07c2e702"/><dir name="View"><file name="Type.php" hash="10506f5a7e8e6f6c74fb381de8627262"/></dir></dir></dir><dir name="Checkout"><dir name="Cart"><dir name="Item"><file name="Renderer.php" hash="a8c53262706cc9da0b02d31d5b275336"/></dir></dir><file name="Success.php" hash="a12f6d8532a162409b8855e2175d6ccf"/></dir><dir name="Customer"><dir name="Products"><file name="List.php" hash="8045558ff93b1aeb35f7c8d8e096a108"/></dir></dir><dir name="Sales"><dir name="Order"><dir name="Email"><dir name="Items"><file name="Downloadable.php" hash="1f1ba9a367d9c120c173834a293a6508"/><dir name="Order"><file name="Downloadable.php" hash="31b5717f6bdd5da175859c68f6f8efe9"/></dir></dir></dir><dir name="Item"><dir name="Renderer"><file name="Downloadable.php" hash="fdcef26acc053a0267718aaa8041a97d"/></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Downloadable"><file name="FileController.php" hash="598eba2daa241edcc49b1221b7fbc5c8"/><dir name="Product"><file name="EditController.php" hash="be6f9a301e655f232d926414ae54a323"/></dir></dir></dir><file name="CustomerController.php" hash="645871bf4129e5c171125b953c01bafa"/><file name="DownloadController.php" hash="4af30c6691efd7eb00d1e5af3ccd54e6"/><file name="FileController.php" hash="7dc886921b70c106bc56fbd2269c5f5e"/><dir name="Product"><file name="EditController.php" hash="9c6b9ab7d96a84d059da807e4cc6cb23"/></dir></dir><dir name="data"><dir name="downloadable_setup"><file name="data-install-1.6.0.0.php" hash="ba3f650af06d4922ff2c96ee8630a610"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="62a69fa1d9955df4a80eb9199236d11a"/><file name="api.xml" hash="80dfc0d8f4e584428b430c752260a297"/><file name="config.xml" hash="d5306cfbe33cb0fe6e44d7c7a688dc6b"/><file name="system.xml" hash="4343c64c3c83fe226317e731f2a08ad3"/><file name="wsdl.xml" hash="b3935ff3bf7e2ca40ddd304b4c78577f"/><file name="wsi.xml" hash="7eef36b29c2abf88596e63b6a042626d"/></dir><dir name="Helper"><dir name="Catalog"><dir name="Product"><file name="Configuration.php" hash="1b0f2e373dbbbbd463a6a52d944dd0d0"/></dir></dir><file name="Data.php" hash="43d3e8dfb3273e1efa594e1151dc1c21"/><file name="Download.php" hash="0181b50a7ffa367b4700380c8b3542a4"/><file name="File.php" hash="85af4a0fc9381f34c2ea212ef13451bc"/></dir><dir name="Model"><dir name="CatalogIndex"><dir name="Data"><file name="Downloadable.php" hash="ca0585e62a4d207238f010d57f6f8fcb"/></dir></dir><dir name="Link"><dir name="Api"><file name="Uploader.php" hash="368ddafdaa4724f45859d1944ad914f0"/><file name="V2.php" hash="2dbaae76b6275b788f85ca79b8c2a6f3"/><file name="Validator.php" hash="e971c4c834a10d1dda6fa4cbb435ddaa"/></dir><file name="Api.php" hash="6c5d906b6d82f3a2d70c33552982390b"/><dir name="Purchased"><file name="Item.php" hash="5409895d11ab323fb06dc5b6b0adfe37"/></dir><file name="Purchased.php" hash="c103d9bb43e1fbc8860293ed513ca645"/></dir><file name="Link.php" hash="3e40dff13ee7290bf5c5c82f1f738e34"/><dir name="Mysql4"><dir name="Indexer"><file name="Price.php" hash="68ceb3428f44bba2080b88144152e1d5"/></dir><dir name="Link"><file name="Collection.php" hash="075614b09b2da42307801be926649966"/><dir name="Purchased"><file name="Collection.php" hash="278e21d2e92c65a8c283485af934100d"/><dir name="Item"><file name="Collection.php" hash="0b426f7128f86f35fde40cb7033c10c2"/></dir><file name="Item.php" hash="ffc5b72853f0027201abd8e321af49c4"/></dir><file name="Purchased.php" hash="c5aec78e19aebe4d4e4cc3acb75c1dd2"/></dir><file name="Link.php" hash="d837a9755b0ad4a206c93961f9399118"/><dir name="Sample"><file name="Collection.php" hash="12a0c3cf9ed3be2773b9def10624fa88"/></dir><file name="Sample.php" hash="99290dedaa12fe19e5a314bd92a94ba7"/></dir><file name="Observer.php" hash="596891b801f12e36a07a293b16147da8"/><dir name="Product"><file name="Price.php" hash="5069197d38100dc5ca6d534c857cb339"/><file name="Type.php" hash="ae26804a7c88f862c44ad2ffe257ad81"/></dir><dir name="Resource"><dir name="Indexer"><file name="Price.php" hash="bb47d44ce24a0246e591ff2c37b24bcb"/></dir><dir name="Link"><file name="Collection.php" hash="5c0a9e2f769789f0086315c12581fd9e"/><dir name="Purchased"><file name="Collection.php" hash="5954f63b5f9425b2efb0ecc0743bd7d6"/><dir name="Item"><file name="Collection.php" hash="03afa669e1013c030652a145999e602b"/></dir><file name="Item.php" hash="86ae589ca268928acf8b19f12c5a5e8a"/></dir><file name="Purchased.php" hash="3619c06db548ac379f287a9227780858"/></dir><file name="Link.php" hash="082b74575e6ff6c34742804b657b196e"/><dir name="Sample"><file name="Collection.php" hash="59ea3d7e6ec3c6ea002f98c2a4137023"/></dir><file name="Sample.php" hash="c0b238d602b757aa9ee39874c1734d74"/></dir><dir name="Sales"><dir name="Order"><dir name="Pdf"><dir name="Items"><file name="Abstract.php" hash="9c4e651ef209353c74f3039a3fa9aea1"/><file name="Creditmemo.php" hash="bc6aa03309998c31da386f5539ca751c"/><file name="Invoice.php" hash="08cb50eacad71be54280e15bea9292c9"/></dir></dir></dir></dir><file name="Sample.php" hash="7302b1af79603dc61153315834797031"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Contentdisposition.php" hash="a953a92d9c47521598d7bb4d3b6a54e1"/><file name="Orderitemstatus.php" hash="464e857052d410f48dc98dc87147c11b"/></dir></dir></dir></dir><dir name="sql"><dir name="downloadable_setup"><file name="install-1.6.0.0.php" hash="02f4364d17a0ce35134fd935a1e6b53e"/><file name="mysql4-install-0.1.0.php" hash="227c2e7e46b178e9c5726a36ebd0735d"/><file name="mysql4-install-1.4.0.0.php" hash="ed8e4add4b2dd3e6c8b018d6f7d5ccca"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="a5f6fc0c9e29f307a40508a90a9a1fb8"/><file name="mysql4-upgrade-0.1.10-0.1.11.php" hash="0482cdc3cc0959f0c8c8ae773eab3a02"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="ef4354ac783bd97bcf065754a16ae644"/><file name="mysql4-upgrade-0.1.11-0.1.12.php" hash="e543e5f43f95c2fac46d5a1b12c3ac7a"/><file name="mysql4-upgrade-0.1.12-0.1.13.php" hash="6d21b51e1d21a6c7598c2206fe016b3e"/><file name="mysql4-upgrade-0.1.13-0.1.14.php" hash="882de82e3b9c6015b2300fe3f936dfbe"/><file name="mysql4-upgrade-0.1.14-0.1.15.php" hash="a25d671905f5d8c1818243712b7f245c"/><file name="mysql4-upgrade-0.1.15-0.1.16.php" hash="22bfc8474a03ab76c2c55c913ef21e57"/><file name="mysql4-upgrade-0.1.2-0.1.3.php" hash="59c33ab499a598f0b8bf949965c14e59"/><file name="mysql4-upgrade-0.1.3-0.1.4.php" hash="cdfe7fb66566ca86879bbd8338a0424e"/><file name="mysql4-upgrade-0.1.4-0.1.5.php" hash="1535fdfa990054392d990c83a535b010"/><file name="mysql4-upgrade-0.1.5-0.1.6.php" hash="b9148c21ad8fb6806cded2dcb8389138"/><file name="mysql4-upgrade-0.1.6-0.1.7.php" hash="1ea623c7c894ccbd021c41a6f002d17d"/><file name="mysql4-upgrade-0.1.7-0.1.8.php" hash="91353b8f4e6ca0272ffa65613e26f657"/><file name="mysql4-upgrade-0.1.8-0.1.9.php" hash="2b389b29fb30cd6bf8a69df321a8e587"/><file name="mysql4-upgrade-0.1.9-0.1.10.php" hash="47737b2130151e1ce36e14203078645b"/><file name="mysql4-upgrade-1.3.9-1.4.0.0.php" hash="14c4dc3baf66bed7e057bfe2a8c55b59"/><file name="mysql4-upgrade-1.4.0.0-1.4.0.1.php" hash="75fb2e1939b579d613d2d708dac3f0dd"/><file name="mysql4-upgrade-1.4.0.1-1.4.0.2.php" hash="acb92743d5297ad5ad149a6a1aff6b85"/><file name="mysql4-upgrade-1.4.0.2-1.4.0.3.php" hash="ad8d2e0bba89fcbb3988d2c35539121b"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="d62e0d5ac4acfed8e382ce0eee068f10"/><file name="mysql4-upgrade-1.6.0.0.1-1.6.0.0.2.php" hash="f4d80ff0b7a41d376283fa02d3c40e0f"/><file name="upgrade-1.6.0.0.1-1.6.0.0.2.php" hash="ec7654928055a671b943abc7ef8d2dcf"/><file name="upgrade-1.6.0.0-1.6.0.0.1.php" hash="2a3569ee4caa76733a3ca097876e00b5"/></dir></dir></dir><dir name="Eav"><dir name="Block"><dir name="Adminhtml"><dir name="Attribute"><dir name="Edit"><file name="Js.php" hash="6bd3f1047ee52819c81ddffc762dc67c"/><dir name="Main"><file name="Abstract.php" hash="03937f29656f33467ce49f11509953a1"/></dir><dir name="Options"><file name="Abstract.php" hash="1f11738b7d90eb9049b4f6de3fae4374"/></dir></dir><dir name="Grid"><file name="Abstract.php" hash="79a45bbecc91dbed1c4397a2d311b372"/></dir></dir></dir></dir><dir name="etc"><file name="config.xml" hash="72a1f547c53309a5e66b502fdb37fcc7"/></dir><file name="Exception.php" hash="338399700b128bcce788f4bcbca88761"/><dir name="Helper"><file name="Data.php" hash="3a33423ece0105efcf1df6e8d14bf3cd"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><dir name="Inputtype"><file name="Validator.php" hash="8b595c6b0ec8f6a3d19063bb4c1f2b56"/></dir><file name="Inputtype.php" hash="7a9615f77c6bfca0c2f568c5b358b76f"/></dir></dir></dir></dir><dir name="Attribute"><dir name="Data"><file name="Abstract.php" hash="0bf1040a56a7b6a1c401a4a5d2bd0716"/><file name="Boolean.php" hash="85f8246ab9df1a4870741f8274ea8769"/><file name="Date.php" hash="91aa527ab9cbc83024627273fe9e4923"/><file name="File.php" hash="2e4c4deb9e3accbb2ca1362add9a7aa1"/><file name="Hidden.php" hash="39d410dc998edd387d52ee8edb546dfd"/><file name="Image.php" hash="69b8d41d0772d97e4d020692af9d6d4d"/><file name="Multiline.php" hash="ed7a9ad5a39261332e05330fbdaed856"/><file name="Multiselect.php" hash="5964b3d8c521bddb9f06d2771d11e573"/><file name="Select.php" hash="668515f2360f457cad2797aeb8de1094"/><file name="Textarea.php" hash="4d224719761bb38ce4c1190315218d52"/><file name="Text.php" hash="871791d3800b518cdbc08d932a40e3af"/></dir><file name="Data.php" hash="0f9b7ba6ceef1324d86f551133432325"/></dir><file name="Attribute.php" hash="3c31e0bd526be009675337eea94eb78c"/><file name="Config.php" hash="cc5aaf752d45906cde626ae9f2bf3f7e"/><dir name="Convert"><dir name="Adapter"><file name="Entity.php" hash="5f9d8faf2969481156c271389cf3e2d0"/><file name="Grid.php" hash="6533de09fb0389a27e3b6053a50ff7f0"/></dir><dir name="Parser"><file name="Abstract.php" hash="ba7bc17f061f5021b2f6b94ecec3d5d2"/></dir></dir><dir name="Entity"><file name="Abstract.php" hash="4edc1881cc6722de83e420b2960fd5ec"/><dir name="Attribute"><file name="Abstract.php" hash="18595a457115ec00dddc2488e3ba2343"/><dir name="Backend"><file name="Abstract.php" hash="c8646c593c58e7fec60c66f8259b2f68"/><file name="Array.php" hash="23519e1ab8b8a72fdce09bc1eae461fb"/><file name="Datetime.php" hash="43b634a5a755d3b64787fe8b8bfba3c1"/><file name="Default.php" hash="32cc4823e0b56d1195f0725e43bd86cf"/><file name="Increment.php" hash="ab3015246d6ecd82b9441eab503c6103"/><file name="Interface.php" hash="c9a2578454e24b87f46732a008714596"/><file name="Serialized.php" hash="f8b805e4a4236ec998abd4a182e519dd"/><file name="Store.php" hash="657bc44a8b1d8cf92897f0dff0b7f40a"/><dir name="Time"><file name="Created.php" hash="2366d479080a84b5bf7a50ea0adbeba0"/><file name="Updated.php" hash="1c61c3075fed948dc91d51ffbb12bd42"/></dir></dir><file name="Exception.php" hash="f037ec93cb28523b2b0641d4b8e77c90"/><dir name="Frontend"><file name="Abstract.php" hash="4f7887cd11f268ac5150cadb29d3d5c3"/><file name="Datetime.php" hash="c6f3fbc642ebebeebc3054f76238f258"/><file name="Default.php" hash="1d6551c2d9ac8d26cd65dd53d19d7e62"/><file name="Interface.php" hash="999a04fd1409a331aecc5bb3b34f9ac3"/></dir><file name="Group.php" hash="5eeaf283a2139a6e83e3ad14b4eabf3f"/><file name="Interface.php" hash="e8affc9c93a5d2fe880c092f93e782fc"/><file name="Option.php" hash="590e76834235fab10bbe9915a5e3174c"/><file name="Set.php" hash="50f1578e055ccf74197e088af60e9d81"/><dir name="Source"><file name="Abstract.php" hash="e2f5dc4e642fcda1649b9727da01fa7a"/><file name="Boolean.php" hash="2fca44d30189bea98e23445ecf9d95b9"/><file name="Config.php" hash="07a4aa8d71f026cb2997aa8e85a7cb04"/><file name="Interface.php" hash="f52efa4af13384ab400a2b63ca9be9fe"/><file name="Store.php" hash="67f93424f0c6a01c704e0f54f0a02822"/><file name="Table.php" hash="2f6d92a8e98da36b65ca2b73cd187ec5"/></dir></dir><file name="Attribute.php" hash="d3312c8323d8b5c5e73855b4df78e3e5"/><dir name="Collection"><file name="Abstract.php" hash="1e363cd4a43ebb51fa6d8ae617ac553b"/></dir><file name="Collection.php" hash="7c79f30f012e8d8e38c20193c8fcc34d"/><dir name="Increment"><file name="Abstract.php" hash="e93f16f31763486aa9c0712ab875a932"/><file name="Alphanum.php" hash="8aaa683164a8a7bd714a59bca784512a"/><file name="Interface.php" hash="4e0ad4e7ea651b8e7dda244c5a65394d"/><file name="Numeric.php" hash="0e29003149592b1a3d38610d1a369dc2"/></dir><file name="Interface.php" hash="f6d1bedebd05898f0914b7b3a93ced04"/><file name="Setup.php" hash="410966b07a93f4d2741f8964f2dcd607"/><file name="Store.php" hash="53edea3ce2ea0d7b127d740c8d4bf990"/><file name="Type.php" hash="f823562f2c834b512a13cd7feb1b7d57"/></dir><file name="Entity.php" hash="8f33d8a0716b491f3819703ef790bce3"/><dir name="Form"><file name="Element.php" hash="51bd50a79f7345fe78b61c8bc0c537d1"/><file name="Fieldset.php" hash="5b327fc5bcbc4f920619c69205b9d315"/><file name="Type.php" hash="547af9c49ac72b5149792284174c9272"/></dir><file name="Form.php" hash="85c70d7b53d2430cb09bcf8fb142ec9e"/><dir name="Mysql4"><file name="Config.php" hash="35b923a5c0ae169b11433d8bab9d7d25"/><dir name="Entity"><dir name="Attribute"><file name="Collection.php" hash="4ced2061fe6878cf7899c9f80af2eb63"/><dir name="Group"><file name="Collection.php" hash="20508679cf88971ec4c929ecfa69b3ca"/></dir><file name="Group.php" hash="648305ff4127434fa5913abf4b828873"/><dir name="Option"><file name="Collection.php" hash="faf2f2a782f8285e73d5e41780e724b3"/></dir><file name="Option.php" hash="3cf86f635368c030a3954db35704bb4f"/><dir name="Set"><file name="Collection.php" hash="afee03dcb7a2d12dcd011b08668c0bf0"/></dir><file name="Set.php" hash="452f7cd8550a4e3489276643cf45c19e"/></dir><file name="Attribute.php" hash="839c5a69dde545df4f28f72153bd8069"/><file name="Store.php" hash="4a35da3d15186a3fabc197b945f4e673"/><dir name="Type"><file name="Collection.php" hash="74b88f6bf0ab426a743d191f885d932e"/></dir><file name="Type.php" hash="da89cba104dcd004b74e19ba4ef057ee"/></dir><dir name="Form"><dir name="Element"><file name="Collection.php" hash="54b9e9e7336a6d2e8bd3d6d2a0a2e6bd"/></dir><file name="Element.php" hash="09b0aea95ac80aec4cbde424a5aed58e"/><dir name="Fieldset"><file name="Collection.php" hash="78d7525ac55b7a3d26b02434b53a5c8c"/></dir><file name="Fieldset.php" hash="6b13a9229903aedb28ab1be9876cbca0"/><dir name="Type"><file name="Collection.php" hash="9efa45f3889a2725d55779bde24089e6"/></dir><file name="Type.php" hash="a751818c1ec9de31777c6b3d6e42eb9b"/></dir></dir><dir name="Resource"><dir name="Attribute"><file name="Collection.php" hash="dcbfa9127eadf942a51008a1c9e522b7"/></dir><file name="Attribute.php" hash="751ee0776a5915351a99c2450a142fb8"/><file name="Config.php" hash="6e30f1fd65fece5d070be80a22d04998"/><dir name="Entity"><dir name="Attribute"><file name="Collection.php" hash="914e238a790229b91f66729b995f4eb5"/><dir name="Group"><file name="Collection.php" hash="742ad6a7852ad660c2d385e495e5f0ef"/></dir><file name="Group.php" hash="1974cdbc75e0d2cc86b0a60432b31b36"/><dir name="Option"><file name="Collection.php" hash="4454fd614fe06a946f4ea42fff8073be"/></dir><file name="Option.php" hash="0feff64acecfa8528b1c58c511b4da68"/><dir name="Set"><file name="Collection.php" hash="67bb5968dd39e2c54f8ca0e2db7ff04d"/></dir><file name="Set.php" hash="bf6ede65e7075deaa089bf98accd1803"/></dir><file name="Attribute.php" hash="0abdc6be25274d8012336cca657ca0d9"/><file name="Store.php" hash="186e168577df45c5a0495262bb305481"/><dir name="Type"><file name="Collection.php" hash="f10c326eff0e8f32151696f9b7bc4ea8"/></dir><file name="Type.php" hash="9aaa21dd6c47d83f5e46b6cdbf5f6ab5"/></dir><dir name="Form"><dir name="Attribute"><file name="Collection.php" hash="409860a23f62ad96d34aad57537611e5"/></dir><file name="Attribute.php" hash="47ababb365add5b8ef945e047fe936c2"/><dir name="Element"><file name="Collection.php" hash="6ba5d7dbc8c2853a73837d0fb6b7d628"/></dir><file name="Element.php" hash="f871f9ba2fcd1abe20d6bcdfedbc6143"/><dir name="Fieldset"><file name="Collection.php" hash="bc541f521c172a86c89b19dcd6cce01f"/></dir><file name="Fieldset.php" hash="9928bbd128d60f96376a6ee134513408"/><dir name="Type"><file name="Collection.php" hash="9bbe502527b13556e879569f722c2ddc"/></dir><file name="Type.php" hash="ad3ef1393c0e773fd76ebd35ea73f90f"/></dir><dir name="Helper"><file name="Mysql4.php" hash="5781f9be5ce2ad9e132bb1723e1f0a50"/></dir></dir></dir><dir name="sql"><dir name="eav_setup"><file name="install-1.6.0.0.php" hash="4c879572ac1cb2c34976ddb9d3a3414e"/><file name="mysql4-install-0.7.0.php" hash="006fc42fa1b7c90b3bb6c2ef873f27ab"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="6ae0811afcf81b536e2ca327eeb03769"/><file name="mysql4-upgrade-0.7.10-0.7.11.php" hash="1302bc1e7b234c805b3985e21f520ca7"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="7bf60ce8f70c5ca9fe28e40fdfdb985b"/><file name="mysql4-upgrade-0.7.11-0.7.12.php" hash="bb4eef59a74692d523312cb6f6a4aa33"/><file name="mysql4-upgrade-0.7.12-0.7.13.php" hash="b441d99ae9c5f6775992b8606124ff88"/><file name="mysql4-upgrade-0.7.13-0.7.14.php" hash="b85a21b371153272a7b44e9dc181ffb3"/><file name="mysql4-upgrade-0.7.14-0.7.15.php" hash="2118a3462bf3decab4420d3fe753f5c9"/><file name="mysql4-upgrade-0.7.15-0.7.16.php" hash="ae2a30a6c2f02c24882940dedbe2a855"/><file name="mysql4-upgrade-0.7.2-0.7.3.php" hash="3660cbe5bbd307c87363c93047319a99"/><file name="mysql4-upgrade-0.7.3-0.7.4.php" hash="e6000b6a9329c4300623b9ab259dfd4d"/><file name="mysql4-upgrade-0.7.4-0.7.5.php" hash="e61eb261e574a446660e0a6d6e5bebbb"/><file name="mysql4-upgrade-0.7.5-0.7.6.php" hash="0da9d8014f7651a1b3dce9665a170c6d"/><file name="mysql4-upgrade-0.7.6-0.7.7.php" hash="acf89bc6fd73bd5821981e666b697350"/><file name="mysql4-upgrade-0.7.7-0.7.8.php" hash="b29fa91cd8d6e850cf46324e4b9c65f4"/><file name="mysql4-upgrade-0.7.8-0.7.9.php" hash="edb1a4b16d6adcba2e27f4964fefcfd6"/><file name="mysql4-upgrade-0.7.9-0.7.10.php" hash="10fe3e3889a23c26ef734c38239c4685"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="39e9b18a34eeb85ceb918cab7c27d112"/></dir></dir></dir><dir name="GiftMessage"><dir name="Block"><dir name="Adminhtml"><dir name="Product"><dir name="Helper"><dir name="Form"><file name="Config.php" hash="56ebc0a4dd6d99dc890cbbc158e1f09b"/></dir></dir></dir><dir name="Sales"><dir name="Order"><dir name="Create"><file name="Form.php" hash="171dd4046dda0d537572c0297c7a44a9"/><file name="Giftoptions.php" hash="5a16e6298d4dcc4988eb02f1766412c9"/><file name="Items.php" hash="663524a023391474dcc20482567a531f"/></dir><dir name="View"><file name="Form.php" hash="a24a42f898ad898d60c534e99f760251"/><file name="Giftoptions.php" hash="0e4a729c38e88ce8d590e690fa633481"/><file name="Items.php" hash="86345f1348f2ca44d87108415c7ca7de"/></dir></dir></dir></dir><dir name="Message"><file name="Form.php" hash="9312fce35bb031623871901aa3dac3d9"/><file name="Helper.php" hash="c1c414359a1610b40923fb2727ddca27"/><file name="Inline.php" hash="ac6f6062de6b202f90d20b1ff980d198"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="4f71bc1d255540c5c28b127b1bd11785"/></dir><dir name="etc"><file name="api.xml" hash="bcc10f7d6527bd56996c491f7d0705e5"/><file name="config.xml" hash="3c63349cb9e3fcd60ff99477b6f5da68"/><file name="system.xml" hash="6fcc04ad5ceccc2af6065890e08da11b"/><file name="wsdl.xml" hash="b99aaaac0126c6e09a7ba59fa4dbcf30"/><file name="wsi.xml" hash="ab77c7cfecb0f5d6cb7b07c0b5abc1d1"/></dir><dir name="Helper"><file name="Data.php" hash="7b31d380f028bd3f04ab82d41de3e77b"/><file name="Message.php" hash="46a883a412475741a6ef2a2b9fbc0c44"/><file name="Url.php" hash="8b273c62bc34acda2d8d681717ed66a4"/></dir><dir name="Model"><dir name="Api"><file name="V2.php" hash="80bdb07f32cff6142bdedda79c7019f7"/></dir><file name="Api.php" hash="72e256cfc90094cdb713e6ecc6bae938"/><dir name="Entity"><dir name="Attribute"><dir name="Backend"><dir name="Boolean"><file name="Config.php" hash="456786371d3d4bf1fc234153a6c0c866"/></dir></dir><dir name="Source"><dir name="Boolean"><file name="Config.php" hash="cd4b51b5f44883afcf0608bcbfd1fdb6"/></dir></dir></dir></dir><file name="Message.php" hash="406263bf9b01af39c41ef01c791eeb42"/><dir name="Mysql4"><dir name="Message"><file name="Collection.php" hash="f08d27f42dd172e970a9b4aff1c75131"/></dir><file name="Message.php" hash="af13604ac0fc21d75db321576b267053"/><file name="Setup.php" hash="ebd64361351d867d5cff6d284d05e8dd"/></dir><file name="Observer.php" hash="012f370ce4393bfb99933358f9b8002a"/><dir name="Resource"><dir name="Message"><file name="Collection.php" hash="ead26a627f946fb57b0ac10e169afdbf"/></dir><file name="Message.php" hash="02701550266c809527c45a725bdabf26"/><file name="Setup.php" hash="237612c1539848d706ae7c1f64d2930c"/></dir></dir><dir name="sql"><dir name="giftmessage_setup"><file name="install-1.6.0.0.php" hash="71fa43b0ff0badefeacf5fe8766a6c0a"/><file name="mysql4-install-0.7.0.php" hash="43fed0b5c896d34ada69dc0376716e13"/><file name="mysql4-upgrade-0.1.3-0.7.0.php" hash="e23b6afa04a41debd8572e6abeb8a98e"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="4b7f3394351e7b4f0ea4e404f36d2757"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="dc7e14f0cb6fa8144771681920c521e1"/><file name="mysql4-upgrade-0.7.2-0.7.3.php" hash="019911d9734c393ef629b6bb57b4abfc"/><file name="mysql4-upgrade-0.7.3-0.7.4.php" hash="0960b891751b8b3ce014fbd585227e22"/><file name="mysql4-upgrade-0.7.4-0.7.5.php" hash="b1cc7462b89813f8dc8eb152e55be6e1"/><file name="mysql4-upgrade-0.7.5-0.7.6.php" hash="06f78b3eb8f8947696e5325f53598759"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="ee49836989d289c4efef5cea40a36954"/></dir></dir></dir><dir name="GoogleAnalytics"><dir name="Block"><file name="Ga.php" hash="5b8233decf84b4c379b02e87d193d19a"/></dir><dir name="etc"><file name="adminhtml.xml" hash="03bff1cbc8a4d47641fc2cdaea16e8a1"/><file name="config.xml" hash="af1769d01842a31a5be7fb050eb6aa0e"/><file name="system.xml" hash="a3a36dd9e064643b9df9152cc01da29a"/></dir><dir name="Helper"><file name="Data.php" hash="b8ccc9d6ea561bd56433d940454269f2"/></dir><dir name="Model"><file name="Observer.php" hash="ba43fb15f7910d792a8c60e7894d7141"/></dir></dir><dir name="GoogleBase"><dir name="Block"><dir name="Adminhtml"><file name="Captcha.php" hash="11d35ca98e02940c1a9f809cd15cae5e"/><dir name="Items"><file name="Item.php" hash="b924bff61044962dc1666b1fc616fce0"/><file name="Product.php" hash="a75c067400bb11381c318926f0c76136"/><dir name="Renderer"><file name="Id.php" hash="30869ffce8f2a931db958aa83a42600f"/></dir></dir><file name="Items.php" hash="ab01bf2db057a12321a53b8ff68e8d2a"/><dir name="Store"><file name="Switcher.php" hash="b05f1f0f7f3b7cefbcfce6dcc2de05e5"/></dir><dir name="Types"><dir name="Edit"><file name="Attributes.php" hash="bb5194cd5035103bad818d43964d4032"/><file name="Form.php" hash="fbb8df5c3436288f4653951582ce1742"/></dir><file name="Edit.php" hash="653117dfc9b4f56e0fdbdbc46b3ff15a"/><file name="Grid.php" hash="4bb662a4de3c01538feb43ecf98ae62b"/><dir name="Renderer"><file name="Country.php" hash="037f73f00c88591d64f9f3f1a6735f63"/></dir></dir><file name="Types.php" hash="0fc3ac1cdc8c72d2abb5292a5902a64f"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Googlebase"><file name="ItemsController.php" hash="619511f52eadd06f8c707b6b3ad4b818"/><file name="SelectionController.php" hash="0207170667b739b668e780d87694bfd2"/><file name="TypesController.php" hash="cb4c27dd4d35826fec1a564cb25f4c7d"/></dir></dir><file name="ItemsController.php" hash="e085476d3570a9db4e0416cb6a1593a9"/><file name="SelectionController.php" hash="c513207288ddf64260bb132b89fc4642"/><file name="TypesController.php" hash="178b5e996d847aced024df13580a907d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="9b5d0300d279b66d942dc99cc1c5a143"/><file name="config.xml" hash="17000770847a4d00b34857ff64e7662d"/><file name="system.xml" hash="3ce42884279b43bb9eae70d925efcbeb"/></dir><dir name="Helper"><file name="Data.php" hash="1ecfb400cfbe9793602ae5b9bc8a4bac"/></dir><dir name="Model"><file name="Attribute.php" hash="881f6ff8630a0fc7c7058394f2d40cb7"/><file name="Config.php" hash="fa085226b80f876729df3ef5536a5d1e"/><file name="Item.php" hash="7f0e3721d23ad455aad38614a51b2385"/><dir name="Mysql4"><dir name="Attribute"><file name="Collection.php" hash="80a200732f55c28eb748b1607b93f932"/></dir><file name="Attribute.php" hash="7b065434473b90568d58526ac2d34327"/><dir name="Item"><file name="Collection.php" hash="18377f6175716f42f0109c3082354261"/></dir><file name="Item.php" hash="30df6296f7fd6048c6e2c47d651cc2b0"/><dir name="Type"><file name="Collection.php" hash="655254e8bd73564c00e9668a50aebeef"/></dir><file name="Type.php" hash="65f0ac23b619bc691263c871ac1d281a"/></dir><file name="Observer.php" hash="d5424472c73d999610077296d8627232"/><dir name="Resource"><dir name="Attribute"><file name="Collection.php" hash="b93ccc40ea7186a15973403ca5c6e994"/></dir><file name="Attribute.php" hash="30c13b4c9295bbb88c06251120260ff9"/><dir name="Item"><file name="Collection.php" hash="1db2fdd63421b671590188bc0c260852"/></dir><file name="Item.php" hash="d7094884556b824015d2daecdf70b871"/><dir name="Type"><file name="Collection.php" hash="803fa1cb79dc3f3291a0f2c971f45732"/></dir><file name="Type.php" hash="a2fd82d425ca3b0e28b65bf9c6591b05"/></dir><dir name="Service"><file name="Feed.php" hash="c24ea40285240bc6b898b9a74fb0e49d"/><file name="Item.php" hash="eca216c852002600ca4aa943ffe5953f"/></dir><file name="Service.php" hash="daa83f849957f45c20f11f30a8ff8987"/><dir name="Source"><file name="Accounttype.php" hash="dbd14cc47e6d96f3611b703a8a41ffbf"/><file name="Authtype.php" hash="e2f1ea0e5a140e77bca30954ea565eca"/><file name="Country.php" hash="8f025ee185da9f3d5d87d96957558337"/><file name="Statuses.php" hash="eefecdef5ddc01cc09e456e82ae5247b"/></dir><file name="Type.php" hash="67d0312b1b2b74c26f4a4546529eb266"/></dir><dir name="sql"><dir name="googlebase_setup"><file name="install-1.6.0.0.php" hash="8a19cd7e0e990fc2472ad0917107a6b0"/><file name="mysql4-install-0.1.0.php" hash="d41c2b21d7e560a75b86cbe86685368c"/><file name="mysql4-upgrade-0.1.0-0.1.1.php" hash="6269576c23f677938082f96e52786641"/><file name="mysql4-upgrade-0.1.1-0.1.2.php" hash="41834668441873ce3c22913272c57494"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="bf5ebba307f2e9df0279a23e742dd620"/></dir></dir></dir><dir name="GoogleCheckout"><dir name="Block"><dir name="Adminhtml"><dir name="Shipping"><dir name="Applicable"><file name="Countries.php" hash="2d87988a05d5f864b81702c49d79eb43"/></dir><file name="Merchant.php" hash="b1e62fa388c138b1d43608a0b8e1236c"/></dir></dir><file name="Form.php" hash="78e2c28dcf00cabea35fc7960a6dd53e"/><file name="Link.php" hash="b7dcb5128c272b80b85d4ad79956d380"/><file name="Redirect.php" hash="922ddf15c5a9cd70a6a0e0e530fe26a7"/></dir><dir name="controllers"><file name="ApiController.php" hash="4762dbe6e79b338f17869b5df33fcfdb"/><file name="RedirectController.php" hash="b95fb5eb9d812d2b73400ccf2b60bf9a"/></dir><dir name="etc"><file name="adminhtml.xml" hash="262f293d6ed542223573e0e18d28c59e"/><file name="config.xml" hash="b2d4aff569e2f9c78ebcbaed361fab3e"/><file name="system.xml" hash="bb9023835a8720d150388ea20edb39cf"/><file name="wsdl.xml" hash="6afabc0271d6e7e1fd11b3d4ee76aa86"/><file name="wsi.xml" hash="7d4dabc90cbde5a078f6beeaac4df3ab"/></dir><file name="Exception.php" hash="ad28999c1fbf2d672e8565a7a0dfed9d"/><dir name="Helper"><file name="Data.php" hash="5a5fd536c5eef1bc9d3ac6b560c91b3d"/></dir><dir name="Model"><dir name="Api"><file name="Debug.php" hash="916c2afbe544b5623583fc63bff6178c"/><dir name="Xml"><file name="Abstract.php" hash="a209f824449a68bd48d865adfd143d71"/><file name="Calculate.php" hash="d2305b16fd3b584aa81e15d3c8eae2e5"/><file name="Callback.php" hash="98ab8ba14a71461ad122f4a101ad818c"/><file name="Checkout.php" hash="1727c1c01f2a46269778068190fbfe40"/><file name="Order.php" hash="9a4b96544ea90d6a3056a6d376196f65"/></dir></dir><file name="Api.php" hash="fdf76ecb25a36b511999b6053e6ca51c"/><dir name="Mysql4"><dir name="Api"><dir name="Debug"><file name="Collection.php" hash="4b8c6c757efad4e5352d1351c68b7a5d"/></dir><file name="Debug.php" hash="8a988b61fe5c82ac92320316b6549c33"/></dir><file name="Notification.php" hash="e3aa7bca37128eff83eb7ad8ab82756a"/><file name="Setup.php" hash="b8aea813f39f73ec9ebfb785fae08f90"/><file name="Tax.php" hash="1ad5e89e11e4d730285b2b0dc5d0a3f3"/></dir><file name="Notification.php" hash="6f23a6f52ae8feae7534437cba90f9de"/><file name="Observer.php" hash="e6f4f5c84d87da2d18513732ad8dd9f0"/><file name="Payment.php" hash="4f0ec5077ac3debf79f4b3f61e06bd42"/><dir name="Resource"><dir name="Api"><dir name="Debug"><file name="Collection.php" hash="2e7fe79dede155d0f6604b411f9f7c6d"/></dir><file name="Debug.php" hash="0786e903ed126ccb9578c6ba22d30ec6"/></dir><file name="Notification.php" hash="d023a61494d9ce282b306088b6b3c8c4"/><file name="Setup.php" hash="d923b4b4f964c3715a539a6d450ea970"/><file name="Tax.php" hash="8cfe344a37db5fe2f773f738cae65571"/></dir><file name="Shipping.php" hash="3f57f3a588787749ae62978aa3c0dc43"/><dir name="Source"><dir name="Checkout"><file name="Image.php" hash="1d02c0938b8ea6303c547a0bcc88b691"/></dir><file name="Locale.php" hash="e144b68d78177b2ead67910e98d3ca05"/><dir name="Shipping"><file name="Carrier.php" hash="a599ac14da1eb99698d0a3196cb94ebc"/><file name="Category.php" hash="e0a3c9a550f6656bfc5d912769fcc0c8"/><file name="Units.php" hash="f1c4cf8aa0d6b31d208b9830f99477df"/><dir name="Virtual"><file name="Method.php" hash="bc7c8ce6a73dce1e711c77ece72184f7"/><file name="Schedule.php" hash="73fe0c592996fc456a941b9440acf3b4"/></dir></dir></dir></dir><dir name="sql"><dir name="googlecheckout_setup"><file name="install-1.6.0.0.php" hash="3e7d0e5cda716082d927f8b3e5e0b00c"/><file name="mysql4-install-0.7.0.php" hash="f082a5fb8f90dfdaa0099ae6b240b270"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="3717fb4e7f03abb51cb8a70aa1ce2c9b"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="f960735bc96a3347e0ef5041bfab9d27"/><file name="mysql4-upgrade-0.7.2-0.7.3.php" hash="1dbf5f76a075d856523889cad873c426"/><file name="mysql4-upgrade-0.7.3-0.7.4.php" hash="881c273ffd40e2c3e9659c0bd9346208"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="d0d1c37f748aaa985808f3e6be003e95"/><file name="mysql4-upgrade-1.6.0.0-1.6.0.1.php" hash="75ad6726a715c107c67c14c5fa48d8de"/></dir></dir></dir><dir name="ImportExport"><dir name="Block"><dir name="Adminhtml"><dir name="Export"><dir name="Edit"><file name="Form.php" hash="1f8cc14307d73eeab2bc05ae7082afac"/></dir><file name="Edit.php" hash="0f6b1f7c730fce6e42593c0ca96c30e8"/><file name="Filter.php" hash="dd41b2e540678b2b080ab3bf0c93baf8"/></dir><dir name="Import"><dir name="Edit"><file name="Form.php" hash="8c828d1b20d7b383776033a166b2bd41"/></dir><file name="Edit.php" hash="16768787bd9ab901b75382fb3117a986"/><dir name="Frame"><file name="Result.php" hash="e92fc3e25c9c4d668cb2756cfb33fece"/></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="ExportController.php" hash="7ef85cb30a20b9f573915f33a38e5cbb"/><file name="ImportController.php" hash="270277dd5325bbaef53854902f0a0afe"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="ce7cdf4c196b16e94e3de02aae57a49e"/><file name="config.xml" hash="046e25cb72a79eb3ff0376f9807f7261"/></dir><dir name="Helper"><file name="Data.php" hash="b49c8c88d4d9484750c2f9702397ea72"/></dir><dir name="Model"><file name="Abstract.php" hash="c2cfa876b764b44432ecacd12a0cc021"/><file name="Config.php" hash="b7d0d95535bd85a072a5675580fe4176"/><dir name="Export"><dir name="Adapter"><file name="Abstract.php" hash="345e6e8a4c0573cb47d42f70854374e4"/><file name="Csv.php" hash="fb08a18befa44a4a438368b9c4685e39"/></dir><dir name="Entity"><file name="Abstract.php" hash="05badc6914078e29de15060bb5d1f979"/><file name="Customer.php" hash="bfd7a7ed406402a25d4f7b573ac7c53d"/><dir name="Product"><dir name="Type"><file name="Abstract.php" hash="b32e7b7ed013704dccc989d1d1f6cffc"/><file name="Configurable.php" hash="d060a9c76c61dafdf48a3774124677d8"/><file name="Grouped.php" hash="057bb1d7ad344dcff932cb764fd8870f"/><file name="Simple.php" hash="4a6f3fd00866c544a2d41b8dc8ebb7ab"/></dir></dir><file name="Product.php" hash="f6cdae1fc1df9978228d352850b14689"/></dir></dir><file name="Export.php" hash="bdab9c8901fbe634a88a5aaa83aaf0b9"/><dir name="Import"><dir name="Adapter"><file name="Abstract.php" hash="43b51ccc5d4cf3bfadc539971a75b2cf"/><file name="Csv.php" hash="07c3817e258b3ab277356bfa8861b0d5"/></dir><file name="Adapter.php" hash="f521ad7a655ec08d1af07381585e9353"/><dir name="Entity"><file name="Abstract.php" hash="4104436823467c80593e80ce26eeea56"/><dir name="Customer"><file name="Address.php" hash="3ccbc2321b52cc83abbc8d0105370b57"/></dir><file name="Customer.php" hash="194bfbfb96af86b22f9dd0f2fe00f51c"/><dir name="Product"><dir name="Type"><file name="Abstract.php" hash="128f83adeccc56b1d4f4d0e94bc96380"/><file name="Configurable.php" hash="20c6dfee01fad5b262d07382fd8a497f"/><file name="Grouped.php" hash="a7384b3ecf7c8fdb4a65503afa4aa4dc"/><file name="Simple.php" hash="393bb8e57ab8491288a458c8fe8c318c"/></dir></dir><file name="Product.php" hash="b7991b0249c601a49940bbb373ef68b5"/></dir><dir name="Proxy"><dir name="Product"><file name="Resource.php" hash="1839273d424e4df568ac2819547c50f7"/></dir><file name="Product.php" hash="fe1c8b143f4a6eeaab2d600b14b86a18"/></dir><file name="Uploader.php" hash="30e4b4916064567bc15b1eb1e81d3bb3"/></dir><file name="Import.php" hash="7dc8c49a334e4266215d2e72e7c65106"/><dir name="Mysql4"><dir name="Import"><file name="Data.php" hash="c226a9cd451fff5c59b99860adf70b85"/></dir><file name="Setup.php" hash="c7c15e7117934ac37a15629421b95ccb"/></dir><dir name="Product"><dir name="Attribute"><dir name="Backend"><file name="Urlkey.php" hash="288236a04d30bb6b2760ad853dba3275"/></dir></dir></dir><dir name="Resource"><dir name="Helper"><file name="Mysql4.php" hash="e57bb631a54c685d0bc3c2d70b558c61"/></dir><dir name="Import"><file name="Data.php" hash="cd4eb4355ed21bb18e8a15ddcc781aaa"/></dir><file name="Setup.php" hash="c96e4654498cd257b818add804956318"/></dir><dir name="Source"><dir name="Export"><file name="Entity.php" hash="0d921dc609e4e444620831f641fbb6b9"/><file name="Format.php" hash="2d4195f9a0db6ff344e9b0f3135e57fc"/></dir><dir name="Import"><file name="Behavior.php" hash="03693e092e980161e81b73d879f36f2f"/><file name="Entity.php" hash="02b9ba84d31773615f6c1259ee539882"/></dir></dir></dir><dir name="sql"><dir name="importexport_setup"><file name="install-1.6.0.0.php" hash="389a0bb4e6fed9f82f91e16b2ba60abe"/><file name="mysql4-install-0.1.0.php" hash="5967da7bd544d58a669203adb09fd56a"/><file name="mysql4-upgrade-1.6.0.1-1.6.0.2.php" hash="d586052bdcd33a447bd9fb0fca73adc5"/></dir></dir></dir><dir name="Index"><dir name="Block"><dir name="Adminhtml"><file name="Notifications.php" hash="dfafc1d35b5705985ed322b84b807f73"/><dir name="Process"><dir name="Edit"><file name="Form.php" hash="23f792c9c6294a31838c41f379d9d07d"/><dir name="Tab"><file name="Main.php" hash="0ac3fd82274e9fd1797d47ef2d3e741e"/></dir><file name="Tabs.php" hash="e3a387be0568a3f20448cf2503409ed8"/></dir><file name="Edit.php" hash="11281c80727aecb11c6d860b547bf12a"/><dir name="Grid"><file name="Massaction.php" hash="1268b64e97b0189f5cd086ea905395e3"/></dir><file name="Grid.php" hash="0b5f93254fe95f21829e42164a06f926"/></dir><file name="Process.php" hash="c75365cf9420d8cb875a713f7e1c4f64"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="ProcessController.php" hash="4b89a84dfa45a70324d8423f7b0e71e6"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="cfd5f0284b6ce5ce0dbd097c7551b4f6"/><file name="config.xml" hash="7e4bd24175911a8a73c046bc28db5257"/></dir><dir name="Helper"><file name="Data.php" hash="4788bf8d391f1a14fdafdcaaaec180b5"/></dir><dir name="Model"><file name="Event.php" hash="0d15ed384ed12c3a38ab53d96fb27020"/><dir name="Indexer"><file name="Abstract.php" hash="e40afd11339fc098b31d988abb9404ac"/></dir><file name="Indexer.php" hash="854a9789588dec1f6f4dc706c8a5ca3a"/><dir name="Mysql4"><file name="Abstract.php" hash="3bed8b3facf6a58b355159bf8ceae30d"/><dir name="Event"><file name="Collection.php" hash="da5bb0c786097ea5fe9015f4cfcfd7b7"/></dir><file name="Event.php" hash="4120731c55117a4786d0105213570cc5"/><dir name="Process"><file name="Collection.php" hash="75bc067c1e321d6547deaf1ee5920796"/></dir><file name="Process.php" hash="36f201f62b2ff6f53d4bf3803f193019"/><file name="Setup.php" hash="9586dd20141587e527872b253b396e7a"/></dir><file name="Observer.php" hash="a7c0f6f819da166a25fb19e18c91fed6"/><file name="Process.php" hash="cb3d7ea754bb5ccc1ad38df6976af3a8"/><dir name="Resource"><file name="Abstract.php" hash="9841c446a01d1fe536682313f62f8b4a"/><dir name="Event"><file name="Collection.php" hash="6785f29bff5092b066554dc5310e85ca"/></dir><file name="Event.php" hash="48ee9c5470d7974b869cf3999b28f119"/><dir name="Helper"><file name="Mysql4.php" hash="eb700536d57a6144b502d382ab3ae067"/></dir><dir name="Process"><file name="Collection.php" hash="3dc6326339d71342f13922f492f8a31e"/></dir><file name="Process.php" hash="86014bf500b2990e47f829bb97602843"/><file name="Setup.php" hash="6e1d9dbdf767451bc63b86da214a8945"/></dir></dir><dir name="sql"><dir name="index_setup"><file name="install-1.6.0.0.php" hash="d0f65c6f8e47e0551be8c8aebce5d0ff"/><file name="mysql4-install-1.4.0.0.php" hash="3d4cbdaae6af1e1dc0ea104213740c85"/><file name="mysql4-upgrade-1.4.0.0-1.4.0.1.php" hash="5d483bdc4d485de6adfb93087a20bfe0"/><file name="mysql4-upgrade-1.4.0.1-1.4.0.2.php" hash="128ccef7c327b8971d788a3531aefa6a"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="4f2427c1c36ee6423d5ae104fce26e36"/></dir></dir></dir><dir name="Install"><dir name="Block"><file name="Abstract.php" hash="ccc416686e311be2dc283d74f91d7b9a"/><file name="Admin.php" hash="4d8291f7e703c720f53ea7c87750cfcb"/><file name="Begin.php" hash="51c006bfa6f0fb1537578ce406b1a02d"/><file name="Config.php" hash="cf809114a42e0c4643fa4e869e7d1764"/><dir name="Db"><file name="Main.php" hash="ee664b34bfc5e7bd27dbc8532decdd2f"/><dir name="Type"><file name="Mysql4.php" hash="cc617cc432230a6982fa6ec58b1b2857"/></dir><file name="Type.php" hash="8f22663b3a384e321ea3cf91b8148ec8"/></dir><file name="Download.php" hash="cff48437b846f6656c96efe559f7d7dc"/><file name="End.php" hash="5c204e585bc0500d1518cf81c57e7b4e"/><file name="Locale.php" hash="2ff57cb39292502dbef7d470226b5c4e"/><file name="State.php" hash="61e46db6de917b3f15bf4038db946c88"/></dir><dir name="Controller"><file name="Action.php" hash="6d97384e3e692984445880e4fa1f693a"/></dir><dir name="controllers"><file name="IndexController.php" hash="5c9763d824968f02f3345911601b92f6"/><file name="WizardController.php" hash="6bfa0ec4cc08744a25efe3b453cec3be"/></dir><dir name="etc"><file name="config.xml" hash="f17873de30cff1e5d2a6ca7aaa734c9d"/><file name="install.xml" hash="de6c943b26e8239685f9abc9dc6afcc6"/></dir><dir name="Helper"><file name="Data.php" hash="cb55517f699c021ac482a4ee4ca39989"/></dir><dir name="Model"><file name="Config.php" hash="4bd45e27e1032f71db9008dcb7ebc21b"/><dir name="Installer"><file name="Abstract.php" hash="a3e53ed8a4d483e47a72f7af4bd370c9"/><file name="Config.php" hash="5883118cb6d13026846161e9e35e6671"/><file name="Console.php" hash="66d342a7cfa3a45d4640d99cf36fc276"/><file name="Data.php" hash="0183279f43b6b396095925d7363c51f0"/><dir name="Db"><file name="Abstract.php" hash="f1ceca0a1abf4041e20b50068cb0f776"/><file name="Mysql4.php" hash="3a1f20470f0303e99f34bfacfa7e5379"/></dir><file name="Db.php" hash="044e76741ede7fcafb9c5f3e1748f8c4"/><file name="Env.php" hash="b6891aacfe70774792b9f154ec9950d7"/><file name="Filesystem.php" hash="3f3e1696b5ffe8dd7fbff3ef230b8d69"/><file name="Pear.php" hash="0f652d25c541995d6957bf5001dfd871"/></dir><file name="Installer.php" hash="c3693e3285b3cdc20640023e02ee6df5"/><file name="Observer.php" hash="b88db2fd39679f65e9e7598e72700410"/><file name="Session.php" hash="3a93ffe0704d020b7d515a1a41e4cafe"/><file name="Wizard.php" hash="4937d69b57ddc0c6116fe743848a4d80"/></dir></dir><dir name="Log"><dir name="data"><dir name="log_setup"><file name="data-install-1.6.0.0.php" hash="18e0546079f0e810abba1c52c8df13f1"/></dir></dir><dir name="etc"><file name="config.xml" hash="2918bb186d96d3b3af9384a73a06b1ea"/><file name="system.xml" hash="acd41c2f6c891f460dcc211d161761d7"/></dir><dir name="Helper"><file name="Data.php" hash="7b06cb53be5c5b1ba30a613dcfb4fc4d"/></dir><dir name="Model"><file name="Aggregation.php" hash="ea4805b5799032d5382f9c190d0944d1"/><file name="Cron.php" hash="d5369f4ad5e05b60ad4b3b7af170a91c"/><file name="Customer.php" hash="914739f34ba902e801f764ae39256aad"/><file name="Log.php" hash="703b7e232e54c0990842711069a54c18"/><dir name="Mysql4"><file name="Aggregation.php" hash="b8830fa1849d19c61dea9abf9faa0c81"/><file name="Customer.php" hash="ad802602f8ee37c15338308db095876f"/><file name="Log.php" hash="5e928cfddc29f305c78a7fe260e16b25"/><dir name="Visitor"><file name="Collection.php" hash="631246721edd073f33526a9617d50699"/><dir name="Online"><file name="Collection.php" hash="0f4ea8a17eae3306e099dc16aeb7fca6"/></dir><file name="Online.php" hash="fa5aac8a5cf9dbb39ddcd454c22a58af"/></dir><file name="Visitor.php" hash="62cce8f9fdee2e7e74455ce38e5502ea"/></dir><dir name="Resource"><file name="Aggregation.php" hash="294fa73306eeb9141187c1528486a311"/><file name="Customer.php" hash="4941fe04d861c247b4d477975611ae28"/><file name="Log.php" hash="d1001b9e4ff165a41da45f28180d65d4"/><dir name="Visitor"><file name="Collection.php" hash="c2cf4c48661fb8fa5ecfe5ccf184b38e"/><dir name="Online"><file name="Collection.php" hash="285639b28f757b611ce3a05ff3935320"/></dir><file name="Online.php" hash="1275c85a053c339b6b0419e2328ca630"/></dir><file name="Visitor.php" hash="aec53c145fa4181b4acd757f7f9125af"/></dir><dir name="Visitor"><file name="Online.php" hash="706d0496938cb2a8ff9619996b7278c9"/></dir><file name="Visitor.php" hash="cedc39717d4da81075538c00bebffd8d"/></dir><dir name="sql"><dir name="log_setup"><file name="install-1.6.0.0.php" hash="3c7df5f5245bb1c0086522aecc2f6ade"/><file name="mysql4-install-0.7.0.php" hash="9d4affa349aaeda4b1567e129ff973d8"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="d42a53396d6f93c44977b8fbe5e88c3a"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="3127cd46c0e0be56c7493773c0e2f0d6"/><file name="mysql4-upgrade-0.7.3-0.7.4.php" hash="e62d115d1f28798413f7fd2e37af9b35"/><file name="mysql4-upgrade-0.7.4-0.7.5.php" hash="0a8fca14ec255cf00389512072aea918"/><file name="mysql4-upgrade-0.7.5-0.7.6.php" hash="58040afde114b6503a9ba3ae789d45f4"/><file name="mysql4-upgrade-0.7.6-0.7.7.php" hash="d53f398917bc121bf54923030f10c9b2"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="b6713df90e577d06c21973d742ea9c29"/></dir></dir></dir><dir name="Media"><dir name="etc"><file name="config.xml" hash="e849345faf2d84e953f6d4cdccbe7d53"/></dir><dir name="Helper"><file name="Data.php" hash="e8a812a865eb115e82d2809ddfdbd55a"/></dir><dir name="Model"><dir name="File"><file name="Image.php" hash="dadfd33d4a602936917175711aec1586"/></dir><dir name="Image"><dir name="Config"><file name="Interface.php" hash="07873395bce51eeab4f019ffac2baa25"/></dir></dir><file name="Image.php" hash="256abf2af363b287aa3463df56667930"/></dir></dir><dir name="Newsletter"><dir name="Block"><file name="Subscribe.php" hash="5c37203a6863e9e39851508c5e3c8eaf"/></dir><dir name="controllers"><file name="ManageController.php" hash="336d04127bd5d7c690d1cc814c29f5ae"/><file name="SubscriberController.php" hash="23a317ef974d3b67d28739486c12c9f8"/></dir><dir name="data"><dir name="newsletter_setup"><file name="data-upgrade-1.6.0.0-1.6.0.1.php" hash="c61a5973895f394c9ca73e2f331c009e"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="2546abd23047622109ca31239f75ed06"/><file name="config.xml" hash="3c42ba31bbf72e2ea467d45c574d2458"/><file name="system.xml" hash="6b76126fbf1f16f77e81e8ac30bc3ef0"/></dir><dir name="Helper"><file name="Data.php" hash="4994467bb617fb9aaf92a33dfcad0e99"/></dir><dir name="Model"><file name="Message.php" hash="088bc71aed55295d57043eb887b2d223"/><dir name="Mysql4"><dir name="Problem"><file name="Collection.php" hash="c7ff2d27861554dd6f46851fba42bf89"/></dir><file name="Problem.php" hash="c3ae973f360cf0b815c8aa5e96f3b114"/><dir name="Queue"><file name="Collection.php" hash="6ec5e25c0a862d20dc9a290388810b7b"/></dir><file name="Queue.php" hash="1ba620a81cab8e5b86182443a1e26eb7"/><dir name="Subscriber"><file name="Collection.php" hash="6f81234609258a6b3d829a9bc8e96e44"/></dir><file name="Subscriber.php" hash="0f080247ecf0496c68dd4380ae3b233d"/><dir name="Template"><file name="Collection.php" hash="7d9b82ef00b549886b0d562c87b0fd11"/></dir><file name="Template.php" hash="daa1f2f39cc60d39765d43087ead8c30"/></dir><file name="Observer.php" hash="f69ac54ca7ca32bc66dc5ddd58281e06"/><file name="Problem.php" hash="3c26de81269564ad223c6e30645e2040"/><file name="Queue.php" hash="c22b3da85a9eed7d12e5724cc72082f6"/><dir name="Resource"><dir name="Problem"><file name="Collection.php" hash="db54e1432a67f3fe18d80d538f6c1d0b"/></dir><file name="Problem.php" hash="83abef7ec71e3d0a2310650989e21384"/><dir name="Queue"><file name="Collection.php" hash="10b4210ba1cb95aa7eefea9bd08cd99f"/></dir><file name="Queue.php" hash="91fe9fcc396a2855b2ffbac8de6d39a5"/><dir name="Subscriber"><file name="Collection.php" hash="4f13e0545ca69a2eac68675c7dd4185c"/></dir><file name="Subscriber.php" hash="9c6af6b6e386704de704e097771b9ff5"/><dir name="Template"><file name="Collection.php" hash="6055403188059d714f47e1d3b52948d4"/></dir><file name="Template.php" hash="237a399347c9c2ab328a0f2e26506334"/></dir><file name="Session.php" hash="d0410abbebf207506726475fe002496b"/><file name="Subscriber.php" hash="37dd45587df67a5f1b3fd7b8305e400b"/><dir name="Template"><file name="Filter.php" hash="cb3f7282cfd5122ba5dc44e866a73cc6"/></dir><file name="Template.php" hash="b144f3dcafb6b6c0f77ea9a7ca6215e4"/></dir><dir name="sql"><dir name="newsletter_setup"><file name="install-1.6.0.0.php" hash="ab8b788a51f57d04cd8f1bf3ea47c4d1"/><file name="mysql4-install-0.7.0.php" hash="60bd08cdae51e3947bbf46d619ecd90b"/><file name="mysql4-install-0.8.0.php" hash="7dbdcea83c2a4dc18ebcc2a1b143d34d"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="073951b2d83763bce12c8dea56b2f749"/><file name="mysql4-upgrade-0.8.0-0.8.1.php" hash="d1643eb7fe4065eceb9b76f670d26e71"/><file name="mysql4-upgrade-0.8.1-0.8.2.php" hash="0b0eb7f8184bb770553f1e7057709de4"/><file name="mysql4-upgrade-0.8.2-0.8.3.php" hash="b1cbdbfc9ab0ec2aa512c953578c6a6b"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="fb1cd5d6ccb81111187d383c7f1b36ab"/></dir></dir></dir><dir name="Oauth"><dir name="Block"><dir name="Adminhtml"><dir name="Oauth"><dir name="Admin"><dir name="Token"><file name="Grid.php" hash="fc970422a0522f4f12efb7cb4ea755ee"/></dir><file name="Token.php" hash="f67e12705823c159a9cb1f823a534a5a"/></dir><dir name="Authorize"><file name="Button.php" hash="b007a310c75829fa0dfd1460aa7ca70b"/></dir><dir name="AuthorizedTokens"><file name="Grid.php" hash="59b94767c2d874c249357d435e1210cc"/></dir><file name="AuthorizedTokens.php" hash="e33fdcb021eedaa16c1209fe116a5d01"/><file name="Authorize.php" hash="0e9e007f72fe1d1bb59a1850634a2b5e"/><dir name="Consumer"><dir name="Edit"><file name="Form.php" hash="b4501387b738015babb646abe9671d6c"/></dir><file name="Edit.php" hash="7aceba86baa8cefcc97792b5fe04d087"/><file name="Grid.php" hash="3a6b126275b19ae2c833eae33ed27852"/></dir><file name="Consumer.php" hash="33f9e4652db5930b056683e217156379"/></dir></dir><dir name="Authorize"><file name="Abstract.php" hash="6f8d74712b577d92c1ebcd206fe205c0"/><file name="ButtonBaseAbstract.php" hash="9b3ad19b4eb6c01ff16057516484bbac"/><file name="Button.php" hash="22e376ba5376924a4c512e53ee68631c"/></dir><file name="AuthorizeBaseAbstract.php" hash="2132de56a5905d3b549a3c6ad7abaad3"/><file name="Authorize.php" hash="4b1c6feb3f463ac372bc7ccd489deec6"/><dir name="Customer"><dir name="Token"><file name="List.php" hash="d67d4d4dcb061cf398c2cd63a5ed45fc"/></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Oauth"><dir name="Admin"><file name="TokenController.php" hash="60e29a85ac6c7a800ba9cee92b5f45d0"/></dir><file name="AuthorizeController.php" hash="64cd078c8905130aca59620e54d57c80"/><file name="AuthorizedTokensController.php" hash="37f6ff41c587d07f38c2824b4b13bb75"/><file name="ConsumerController.php" hash="3b8c38be5f05f878c032ee6ea67bd5e3"/></dir></dir><file name="AuthorizeController.php" hash="44817a6b3cf922d35a9ec92297a78c5b"/><dir name="Customer"><file name="TokenController.php" hash="27501a939f63fa89a7225347e1704c6f"/></dir><file name="InitiateController.php" hash="9dae6bd1d2ca4e569ad47721541cd7c8"/><file name="TokenController.php" hash="f1454d21ff2504e8fcce5db27a8663e5"/></dir><dir name="etc"><file name="adminhtml.xml" hash="9970ff9ba532adb4f0c8fcf6433e0fc8"/><file name="config.xml" hash="11045502b3dab8a4d1d781e5cbeffdd6"/><file name="system.xml" hash="0ddd5b1e3370249379811b171ed0f3a8"/></dir><file name="Exception.php" hash="0e7333244c5f7efeafcab95e3102a130"/><dir name="Helper"><file name="Data.php" hash="219bbd24e6d604e8815c009f1f052400"/></dir><dir name="Model"><dir name="Consumer"><dir name="Validator"><file name="KeyLength.php" hash="d9d2ccf46f76b2e46281a178836475cc"/></dir></dir><file name="Consumer.php" hash="759d92e59053521fc1951abffcf38d74"/><file name="Nonce.php" hash="d957311b79ac24d570591f9bd840cb3a"/><file name="Observer.php" hash="e0749e684fc8bb9954f03634e414361f"/><dir name="Resource"><dir name="Consumer"><file name="Collection.php" hash="556ae9a72a26662912fad21debda7ff8"/></dir><file name="Consumer.php" hash="34b2b045cb25ca5d64621af67e0a0fca"/><dir name="Nonce"><file name="Collection.php" hash="6dc8e515caf18d42135aa09309fa36ba"/></dir><file name="Nonce.php" hash="d0896d071e8a715ecf75d031e0d4d3aa"/><file name="Setup.php" hash="2d4b59ff63bdc8f1d175b50faef7f955"/><dir name="Token"><file name="Collection.php" hash="829fc11161d64a9601a3f3360468025c"/></dir><file name="Token.php" hash="d0452e878e8805d21f327c35c738afff"/></dir><file name="Server.php" hash="ec0ab06f5d68d9488880f84d7d2fafdb"/><file name="Token.php" hash="7607fea6bee8988e6df77dd1445b2cc7"/></dir><dir name="sql"><dir name="oauth_setup"><file name="install-1.0.0.0.php" hash="be55ee7c09fde3568302254ce81e05f2"/></dir></dir></dir><dir name="Page"><dir name="Block"><dir name="Html"><file name="Breadcrumbs.php" hash="a3e875ac773fdb36e5e4bcd52b9fda9d"/><file name="Footer.php" hash="6a1ac1bbac21f9f650fc23122fe0b021"/><file name="Header.php" hash="49206c235132aaf5742f16b40d89a3b5"/><file name="Head.php" hash="c48ce8df32333a768ca8e5111d3ba7e4"/><file name="Notices.php" hash="1faf2692443d5eeaa0e2e37bfebb2633"/><file name="Pager.php" hash="d778e7d57bc03d1bf39453700c0394fe"/><file name="Toplinks.php" hash="8eef80780a96b03cbad8660ff701a1df"/><file name="Topmenu.php" hash="6d8aadc5fc281a2963cc89128c0b7b65"/><file name="Welcome.php" hash="e8faa496fd5aaf2b6a10e788a4884513"/><file name="Wrapper.php" hash="8a32cb1a6055ca78607176a475057aff"/></dir><file name="Html.php" hash="acfffb4a26c286791ddd557135d54ad9"/><dir name="Js"><file name="Cookie.php" hash="ecc21170aac5fd5a65725ecbc29d9c1b"/><file name="Translate.php" hash="13a5721d7224901455902385abd0f5f0"/></dir><file name="Redirect.php" hash="593393edca80c9feecad5bb3cac3d77e"/><file name="Switch.php" hash="1fd6f0101aa0937758d79d3e41c25c08"/><dir name="Template"><file name="Container.php" hash="89694f4adf947b41650f0017268f9f07"/><dir name="Links"><file name="Block.php" hash="122e99bed5a49375e3bd303f8df70b21"/></dir><file name="Links.php" hash="3fe2f282343b5996daea97d7b10ebb6e"/></dir></dir><dir name="etc"><file name="config.xml" hash="2f7f049d3eb0cbddaf2c76243f6883e8"/><file name="system.xml" hash="ec99dc32af677977662036146681d09e"/></dir><dir name="Helper"><file name="Data.php" hash="3c11747b579b8a33fd3a2a00e6ff6204"/><file name="Html.php" hash="bbc2e3c5ca0fa5428b2c124a0bd24e81"/><file name="Layout.php" hash="8204c54ff6f758ca00a6bc5d0ef1f37c"/></dir><dir name="Model"><file name="Config.php" hash="1863a8c310dd8ebf87947b9625dd2ea6"/><dir name="Source"><file name="Layout.php" hash="7c4005209930d7e0a9480589fc591bd0"/></dir></dir></dir><dir name="PageCache"><dir name="Block"><dir name="Adminhtml"><dir name="Cache"><file name="Additional.php" hash="d7f4fc20b6abc5e7837f5cf29aaf332f"/></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="PageCacheController.php" hash="d68e87faf81e71e19e6a81101961c8dd"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="3ffc83694c1a7ac7349d15a0a208d601"/><file name="config.xml" hash="8e8f4f2fa01f2235c3d8b5d876654cd7"/><file name="system.xml" hash="4206d203d213fe3686b9ed6b4a1d4c0b"/></dir><dir name="Helper"><file name="Data.php" hash="4a11d0d970f06e6b0e6eea555e7d028b"/></dir><dir name="Model"><dir name="Control"><file name="Interface.php" hash="f96c6dba6bb7998f58ab75d6a0e5a1d9"/><file name="Zend.php" hash="7e0332800e7a731267cdf8995cd5b37a"/></dir><file name="Observer.php" hash="bc095ebd1ac9e8c2a090da5ecf0d3b7a"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Controls.php" hash="e901f801436bedf60b4e8520089c0243"/></dir></dir></dir></dir></dir><dir name="Paygate"><dir name="Block"><dir name="Authorizenet"><dir name="Form"><file name="Cc.php" hash="1ee3adf34b7195a1f6bd898a6865088c"/></dir><dir name="Info"><file name="Cc.php" hash="c798a05ed284013b1c56bcf28022c6fb"/></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Paygate"><dir name="Authorizenet"><file name="PaymentController.php" hash="5566273064aea1dbb401a064c6570712"/></dir></dir></dir><dir name="Authorizenet"><file name="PaymentController.php" hash="be192ee82fd2f3f27f4b2ffa55c4b516"/></dir></dir><dir name="etc"><file name="config.xml" hash="437c88af79ef6528e7e405c0927c91ca"/><file name="system.xml" hash="1d89f7e280e6077c4aae6f7f711c4fe6"/></dir><dir name="Helper"><file name="Data.php" hash="68b7a8f021ce4ec1abfac5a23e1c825e"/></dir><dir name="Model"><dir name="Authorizenet"><file name="Cards.php" hash="e68924419b173ca60bfe9964583f97c7"/><file name="Debug.php" hash="8701fdcd74bddda978d279ebea7a652e"/><file name="Request.php" hash="e92c449aa75215a1751bde81e15cb292"/><file name="Result.php" hash="037b37bac231f359b010ccd430c9984c"/><dir name="Source"><file name="Cctype.php" hash="785dabf6ea4d90133e687013fc1eb82a"/><file name="PaymentAction.php" hash="fa44dae26cc25ea497711ef18bf14e8d"/></dir></dir><file name="Authorizenet.php" hash="22841b141855df2f6c621107890e9ea6"/><dir name="Mysql4"><dir name="Authorizenet"><dir name="Debug"><file name="Collection.php" hash="9a48149883e80929d5152c5ab3194e3b"/></dir><file name="Debug.php" hash="c7d54b54057bd832de84e3fd56025a74"/></dir></dir><dir name="Resource"><dir name="Authorizenet"><dir name="Debug"><file name="Collection.php" hash="b6b7889d57e70790dbcbc672b5e7f69c"/></dir><file name="Debug.php" hash="b68e0bd66b490561a5d07845cde8e7de"/></dir></dir></dir><dir name="sql"><dir name="paygate_setup"><file name="install-1.6.0.0.php" hash="132150574acab1b7491d37cd6c27d6af"/><file name="mysql4-data-upgrade-0.7.0-0.7.1.php" hash="6fd40d9f34f13fa672f2f65c4a99c2d8"/><file name="mysql4-install-0.7.0.php" hash="9a7775fe0c8d4f42b67d768cc447d7b6"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="50ac1a4d08833d9b1b36e769c0190bf9"/></dir></dir></dir><dir name="Payment"><dir name="Block"><dir name="Catalog"><dir name="Product"><dir name="View"><file name="Profile.php" hash="c8fef279bbcefed6a884c8876611ede9"/></dir></dir></dir><dir name="Form"><file name="Banktransfer.php" hash="99cb37d17e0fe70792d2cc0174495aed"/><file name="Cashondelivery.php" hash="af3dc833bb3ca32a83a382d3f2dd1cc7"/><file name="Cc.php" hash="14054d8c9b0d8e710586f0277c6dde60"/><file name="Ccsave.php" hash="93120aa9bd872a844d5c6933b0f7cda6"/><file name="Checkmo.php" hash="6a873d77f544848bc0996caf49637976"/><file name="Container.php" hash="947bdf43b770ddce45b10996fbfa45ac"/><file name="Purchaseorder.php" hash="71deba94c1580d63c5d2eba649f96c27"/></dir><file name="Form.php" hash="a606c801fdae62455aa809400cef815e"/><dir name="Info"><file name="Banktransfer.php" hash="94758f0f85a2c16c9889162bf934f93e"/><file name="Cc.php" hash="7185ae2c5c8f0e2c915dc024826db424"/><file name="Ccsave.php" hash="efa357d6d7640dba98562c41f8828aff"/><file name="Checkmo.php" hash="8490011a4f0844a58d29cf20461fee1e"/><file name="Container.php" hash="540b2356d3a6d1b49a816bf7009796e1"/><file name="Purchaseorder.php" hash="1d8649c0fc22e83e0f8a897a3132de3b"/></dir><file name="Info.php" hash="c7deec491ee07349bc72356e831a3cfc"/></dir><dir name="etc"><file name="adminhtml.xml" hash="2ca8211b1dcfe9609377a09a46d030ce"/><file name="config.xml" hash="15b092bdd0024ca64774a289c60a742b"/><file name="system.xml" hash="89220912efe730b89a46862be0a46530"/></dir><file name="Exception.php" hash="8654a507211a88d6312cb23070109f1f"/><dir name="Helper"><file name="Data.php" hash="cda6b5e0220422a83291e71630174094"/></dir><dir name="Model"><dir name="Billing"><dir name="Agreement"><file name="MethodInterface.php" hash="9ea2d1af29b219aed7b914e2e5c8d246"/></dir><file name="AgreementAbstract.php" hash="bfb93b8772ff8923bbdbb5bdba6af900"/></dir><file name="Config.php" hash="ae1bb11ff1199c11cbe1ef465129e4f1"/><dir name="Info"><file name="Exception.php" hash="b20621db63c4b0410ac1509f64089f4f"/></dir><file name="Info.php" hash="9719c1cfda3f1f24df3d4d5ebe860374"/><dir name="Method"><file name="Abstract.php" hash="45a2fce0229e618b0705d0ab8452066a"/><file name="Banktransfer.php" hash="d6cc5607dbbc0bc12ea4fcdf658778d4"/><file name="Cashondelivery.php" hash="fb9081177f4a9942e93f847d519912d0"/><file name="Cc.php" hash="3ec7b6ebbeac4d63dad2fc8bf1ecbc96"/><file name="Ccsave.php" hash="7b473493e2c4fef4a898b3207b3508a5"/><file name="Checkmo.php" hash="9f7fa217b0b812dae36038518c8182b9"/><file name="Free.php" hash="a0b611524e68bf30a6c4b8eca1647f60"/><file name="Purchaseorder.php" hash="52ed13e8a25e62df184c2b80e7a102df"/></dir><file name="Observer.php" hash="e77c4b1f6e6e30ed0792565bae1bbd76"/><dir name="Paygate"><file name="Request.php" hash="79939f5b9c17341809661e9e1ae8907f"/><file name="Result.php" hash="bd189bbbc5f7ad6dfcbb8c58b98d43c3"/></dir><dir name="Recurring"><dir name="Profile"><file name="MethodInterface.php" hash="9864b9f25408e6f9927d88e39e8b13c8"/></dir><file name="Profile.php" hash="fc439d8ba0479ec1d5f688f1dc59c8b9"/></dir><dir name="Source"><file name="Cctype.php" hash="54fb791f3199534f30b9201f9d522cf3"/><file name="Invoice.php" hash="58ca0a1f1124300a494cf3e47d4eef2d"/></dir></dir></dir><dir name="Paypal"><dir name="Block"><dir name="Adminhtml"><dir name="Settlement"><dir name="Details"><file name="Form.php" hash="9287b090950d29dfdf05c30114c8bb91"/></dir><file name="Details.php" hash="e34b85829b70e07a1647b5e731e36d2d"/><dir name="Report"><file name="Grid.php" hash="a73cfe6ca620c19efd5c7b07e453cc15"/></dir><file name="Report.php" hash="a9a4d7e8c3785242264672ab5063b284"/></dir><dir name="System"><dir name="Config"><file name="ApiWizard.php" hash="46017314d7b4dfd05ed69dad8eb38d9e"/><dir name="Field"><file name="Country.php" hash="09102c53ae367007cfaa16c16d3de393"/><file name="Hidden.php" hash="004fc9277fa3f97392482d4c9a92d811"/></dir><dir name="Fieldset"><file name="Expanded.php" hash="de012abf285a46d7eceaac4f2d75f52f"/><file name="Global.php" hash="e8b395fc63bc8f678931465d7efeb646"/><file name="Group.php" hash="a069822beac8c3fa695d01e1b715fee3"/><file name="Hint.php" hash="4e0dc2f1cdb4e7fc10e447ad4b9c6b2f"/><file name="Location.php" hash="a1ed0d3bdbae40419526d4b292863e96"/><file name="Payment.php" hash="01c9915805c3bb31db97f0f057f5260b"/><file name="Store.php" hash="e624156c5d5d9c014ac7ed7e9db2bdf0"/></dir><dir name="Payflowlink"><file name="Advanced.php" hash="d7fc6a51406872aaa597989fdc834b97"/><file name="Info.php" hash="935d5020da003ed0e94f69d224c1e90e"/></dir></dir></dir></dir><dir name="Express"><file name="Form.php" hash="64a124d9aeed9e470a35a8d7dde113aa"/><dir name="Review"><file name="Billing.php" hash="82d065f33b13a0ac21d507500c2e0683"/><file name="Details.php" hash="9674beed2105bd8275746b0f46fc03a2"/><file name="Shipping.php" hash="81759af60602039c45e4aa5f780e6da8"/></dir><file name="Review.php" hash="e1ef650c02470a48a3704341630e8ca3"/><file name="Shortcut.php" hash="4d59c28bc02b31beabef972c2921da71"/></dir><dir name="Hosted"><dir name="Pro"><file name="Form.php" hash="80a32bfa94107523b2596dcab4f69d43"/><file name="Iframe.php" hash="f1dc96ff319218232c44ccb079cc1580"/><file name="Info.php" hash="1745fe6bdfd976e4a8b64c4a6782961e"/></dir></dir><file name="Iframe.php" hash="31ba52bd7743106bc1c5715237d819dd"/><file name="Logo.php" hash="8da27cc047696dc69cc9b596c81ac815"/><dir name="Payflow"><dir name="Advanced"><file name="Form.php" hash="bc607f3182b35e595f8adb232fda4bd9"/><file name="Iframe.php" hash="5dbee6a0f23f564b3f0b7c6e3ae2b531"/><file name="Info.php" hash="4194c9697bfefa70230fe9ed00df7d17"/><file name="Review.php" hash="98b8f89f322af15883a22480caed18e4"/></dir><dir name="Link"><file name="Form.php" hash="9d4e4e6102d9839f899fd03605ec8a92"/><file name="Iframe.php" hash="5b126ebbc6724f87b75ecfbe30917c7b"/><file name="Info.php" hash="cba6aff46b7e0c329d4377f5966335a1"/><file name="Review.php" hash="fd82f78e60062b882ed48534e0a6783a"/></dir></dir><dir name="Payment"><file name="Info.php" hash="728ca85032cd5e621cadf9f46844f7e1"/></dir><dir name="Standard"><file name="Form.php" hash="a7595f9af3bacd2ef1b6371ed1ef24e7"/><file name="Redirect.php" hash="3ff12537fd311e7e117ce3625c67e6c2"/></dir></dir><dir name="Controller"><dir name="Express"><file name="Abstract.php" hash="19dbaf1226d857d356dc11174805dad2"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Paypal"><file name="ReportsController.php" hash="f33f37f7a4ee7eaec6037174df855d5c"/></dir></dir><file name="ExpressController.php" hash="59a7085ce8ff8919b787699ba7e0610a"/><file name="HostedproController.php" hash="09bb545892056e176ea47b8325b5be27"/><file name="IpnController.php" hash="e6efa853fec6a115cde9e708660c9348"/><file name="PayflowadvancedController.php" hash="a065facae9c469a0703a2c4ec12bb2a9"/><file name="PayflowController.php" hash="0b923d12ad420ea3220e1a3cb970f6b6"/><file name="StandardController.php" hash="5cb59bb4ac6078808f9390b9ac683334"/></dir><dir name="data"><dir name="paypal_setup"><file name="data-upgrade-1.6.0.2-1.6.0.3.php" hash="4a8d676d3c695e83d4bf5a0d6e40c9de"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="c1adcf02624e6657b7200673e700a72d"/><file name="config.xml" hash="cc2f294c42c6f025ddb04ef43e880e04"/><file name="system.xml" hash="1939fb6cb49f3e9d185548a75ee54b3b"/></dir><file name="Exception.php" hash="ce7ae11c73d5cb7abadce986fbec7dff"/><dir name="Helper"><file name="Checkout.php" hash="2c4643828d007c5373374cc1b3892b04"/><file name="Data.php" hash="6958a5d4f1c852ff648f802bde11c985"/><file name="Hss.php" hash="6e694dd9ce0a1efc2ab7de898329652a"/></dir><dir name="Model"><dir name="Api"><file name="Abstract.php" hash="27585bf3b3cde837bb970d567c517550"/><file name="Nvp.php" hash="643e1eb3b38ca6529eefbbef695992f5"/><file name="Standard.php" hash="df117a9edc0b981b996120372df10073"/></dir><file name="Cart.php" hash="8471aa552b142cdb89a9c4bd4182ec14"/><file name="Cert.php" hash="0f8622e510ba8b384e920ad46ed35044"/><file name="Config.php" hash="8c0c3e64ec5d33d016adf4355ee2804f"/><file name="Direct.php" hash="3989effef2a3a41b6d2fc4d8494010a2"/><dir name="Express"><file name="Checkout.php" hash="09a01abaf8f8dd9eb07b11e04262fe02"/></dir><file name="Express.php" hash="797d111073dca60d716fdfdfd6247871"/><dir name="Hostedpro"><file name="Request.php" hash="dafa46e0daa0f0bd5c45ee9148e85606"/></dir><file name="Hostedpro.php" hash="8aba8adcae8200b31e5c5144961d6098"/><file name="Info.php" hash="ca721b1804f3fea2d4d77fd9e649aa40"/><file name="Ipn.php" hash="aaaa8920dee711287a743ef4ccf86f4f"/><dir name="Method"><file name="Agreement.php" hash="f6856240ce52d5db17a640eb20293f18"/></dir><dir name="Mysql4"><file name="Cert.php" hash="13634249d45262334197b62d0f00674f"/><dir name="Report"><dir name="Settlement"><dir name="Row"><file name="Collection.php" hash="366db458aaedeef2118ecffa6ed2b52f"/></dir><file name="Row.php" hash="c8592681bb64b7224986db18ddc55ce9"/></dir><file name="Settlement.php" hash="bd0da36d11500bd89d072f1994474cce"/></dir><file name="Setup.php" hash="d716084dfc8ae9795b0ded112594044b"/></dir><file name="Observer.php" hash="042464b56ecda867444d5a9585c2337b"/><dir name="Payflow"><file name="Request.php" hash="bb0c1f7f1bad4c8361a16f2f5e608e49"/></dir><file name="Payflowadvanced.php" hash="04c0396a5f53242427d6f7e4f9c99101"/><file name="Payflowlink.php" hash="fafbf7a45d453119e6acf0c66dedc300"/><file name="Payflowpro.php" hash="4e8684735c4eb49728c7654791c7a6f5"/><dir name="Payment"><file name="Transaction.php" hash="e0bc4792d33223c07f802c9ef835efcf"/></dir><file name="Pro.php" hash="949a366f0da1ada26af6a1922b4b85df"/><dir name="Report"><dir name="Settlement"><file name="Row.php" hash="e4f9754dee817f5deb3fc5218b88d68f"/></dir><file name="Settlement.php" hash="29c43fca0e955084520629102e3bfe6a"/></dir><dir name="Resource"><file name="Cert.php" hash="7522b914e914933d3cb0e99eb67076f9"/><dir name="Payment"><dir name="Transaction"><file name="Collection.php" hash="2f598a3790e5442bbd0396943c55b5eb"/></dir><file name="Transaction.php" hash="8ec0a8c47fde8e18dd59d93267e67658"/></dir><dir name="Report"><dir name="Settlement"><dir name="Row"><file name="Collection.php" hash="a258be887b56f8689869cc763fd62111"/></dir><file name="Row.php" hash="d69dddc1bc2a81d09519f468bcc38969"/></dir><file name="Settlement.php" hash="cf94e2be70b8a7dacc14d9fcb361e02b"/></dir><file name="Setup.php" hash="9cda4402fc0a36eb7496b60b71bdd273"/></dir><file name="Session.php" hash="6ea5f5accdd8cdf27fe4b14372dc6d46"/><file name="Standard.php" hash="60028ae2d1e25fae83221f04b25b9c9f"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Cert.php" hash="e855a88c4dce4ebadc72ecaec2548f7c"/><file name="Cron.php" hash="4d410d50de911c2c481e9627e61dd869"/><file name="MerchantCountry.php" hash="71ada83f04d36c60b48bbd1986c380f2"/></dir><dir name="Source"><file name="AuthorizationAmounts.php" hash="4404a9d18e026c427a938756e299f5ab"/><file name="BuyerCountry.php" hash="44f21199a353dadbfea5b834174f8a0d"/><file name="FetchingSchedule.php" hash="90bd097a35cd19e58e389da979f8a2ee"/><file name="Logo.php" hash="a28088fd787156439fe396f73d32e645"/><file name="MerchantCountry.php" hash="50cd30cbd7119bc912af64a7b83349bb"/><dir name="PaymentActions"><file name="Express.php" hash="63683e1cd890db215cd699a179a593c2"/></dir><file name="PaymentActions.php" hash="852b9912ab96a7233719d1a30176ff8a"/><file name="RequireBillingAddress.php" hash="eec748bc0d8371e1f78f2b721a63de22"/><file name="UrlMethod.php" hash="806edab1bb0fb5f02facd1a1fc3807ba"/></dir></dir></dir></dir><dir name="sql"><dir name="paypal_setup"><file name="install-1.6.0.0.php" hash="14acd37a5e228a77974f53d2e81afb6d"/><file name="mysql4-install-0.7.0.php" hash="9cd714520f0afebf0c7fcd2495ead0be"/><file name="mysql4-install-1.4.0.0.php" hash="28bc6b61995a7a5f038b0c1be05b4b90"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="38d713ba0251c8b830f4b66a2a885380"/><file name="mysql4-upgrade-0.7.2-0.7.3.php" hash="8ffca1b59f274fd947f2d64962e4a6d6"/><file name="mysql4-upgrade-1.4.0.0-1.4.0.1.php" hash="90f86d9ac87358b9adc6036ebe9d08db"/><file name="mysql4-upgrade-1.4.0.1-1.4.0.2.php" hash="b92e43e6935aa8e49d7c942785c7d895"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="32b681f4e183d912a7e212bf7da707d6"/><file name="upgrade-1.6.0.0-1.6.0.1.php" hash="0ca7d5c76495a629462c394738a5b0cc"/><file name="upgrade-1.6.0.1-1.6.0.2.php" hash="4c49d24198d0bb28075412df3c862e14"/><file name="upgrade-1.6.0.3-1.6.0.4.php" hash="79ed29dbd0d98adc1d0fcd86d48906a5"/></dir></dir></dir><dir name="PaypalUk"><dir name="Block"><dir name="Express"><file name="Form.php" hash="675234e80b8a0f4b2562157e4c094167"/><file name="Shortcut.php" hash="14a1a9213b301aac43a2588bf1758526"/></dir></dir><dir name="controllers"><file name="ExpressController.php" hash="c7142fadccc45f38769d6576ff7d4fd3"/></dir><dir name="etc"><file name="config.xml" hash="8944143d2791c65f796ba631cf8cbd8a"/></dir><dir name="Helper"><file name="Data.php" hash="9de8dd42bc9145936da038e1c50b87cf"/></dir><dir name="Model"><dir name="Api"><file name="Nvp.php" hash="cb23f0d5e590c517b5d96233db958c13"/></dir><file name="Direct.php" hash="9c5f13b72c7b1b6ea8b0f2b3f1755e67"/><dir name="Express"><file name="Checkout.php" hash="2ab6feaf081f79e8b9c311f2c87d90c3"/></dir><file name="Express.php" hash="41aab85d8a4d5b57dcfbadb6ba70d324"/><file name="Pro.php" hash="3d76f08c350229746280e3974d765c81"/><file name="Session.php" hash="6bf8f32bdae8d30dc58d9a2fab85d08d"/></dir><dir name="sql"><dir name="paypaluk_setup"><file name="install-1.6.0.0.php" hash="0071f0613f985e696951177a3b7e7de9"/><file name="mysql4-install-0.7.0.php" hash="b2b44155ade7258b09dc1d4c32b9b0f1"/></dir></dir></dir><dir name="Persistent"><dir name="Block"><dir name="Form"><file name="Remember.php" hash="ff8df17ec27ba969bd196b8315695d16"/></dir><dir name="Header"><file name="Additional.php" hash="e0ab385a26b8c33822306954672356b3"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="234724920b48e144f0a95e195871a00f"/></dir><dir name="etc"><file name="adminhtml.xml" hash="07b0eea8422430d40a7f688071e9af43"/><file name="config.xml" hash="fb1fb9084c58abdddad9aa4f2922b783"/><file name="persistent.xml" hash="04182a1b113782e663584f8ed057d5db"/><file name="system.xml" hash="abeaf984dbed262195b6f71a35314a29"/></dir><dir name="Helper"><file name="Data.php" hash="63b0a64b351c780a7f8b502b69ffcf9c"/><file name="Session.php" hash="df62a0644cbb8d0c553542bd937daba7"/></dir><dir name="Model"><dir name="Observer"><file name="Session.php" hash="7b87e31979d69266fd448bbc9b05a1ee"/></dir><file name="Observer.php" hash="5450a8c2ae7ff14c52c3afef71c6ae0d"/><dir name="Persistent"><file name="Config.php" hash="eb157ddd874ab6c29860c784d650bafe"/></dir><dir name="Resource"><file name="Session.php" hash="2941b618de87394826dbb0629c973824"/></dir><file name="Session.php" hash="e16655b3d00bbc0bb3b5ce353b887fcf"/></dir><dir name="sql"><dir name="persistent_setup"><file name="install-1.0.0.0.php" hash="82069df6fe70f8b2d50437539cb29ba6"/></dir></dir></dir><dir name="Poll"><dir name="Block"><file name="ActivePoll.php" hash="954c5cdbe6a9a7d52e18d969f2d02ac0"/><file name="Poll.php" hash="a5ba22cd6eb9c34e5a536e1c35b7f4ce"/></dir><dir name="controllers"><file name="VoteController.php" hash="0b1458dfaa0c5173179eee549fc06e97"/></dir><dir name="data"><dir name="poll_setup"><file name="data-install-1.6.0.0.php" hash="471057d8abf86cb2df93ab7e5d8742db"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="905453d24c326bb59b3c88dbc0425b54"/><file name="config.xml" hash="e14b241ce78545e50396650a94416260"/><file name="system.xml" hash="599b3a4bf8e1a2c377f3bd6c1f3d2048"/></dir><dir name="Helper"><file name="Data.php" hash="faa62e5b6d70ab6f0f002e45acb32c41"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Poll"><dir name="Answer"><file name="Collection.php" hash="1d2c87b72abe9b00712dc666ae74648b"/></dir><file name="Answer.php" hash="3e6605f26efaf626be2f1588bd64aaab"/><file name="Collection.php" hash="4800b7335c1dfb953d224c168dc36131"/><file name="Vote.php" hash="50334679eb06bd61ee30b8f597fcbb39"/></dir><file name="Poll.php" hash="9bfa5fd6b7d954963203f2daab5b2464"/></dir><dir name="Poll"><file name="Answer.php" hash="03a22571d26d068711fa6a381f92f6de"/><file name="Vote.php" hash="6ae1d8b40f2324443efe254c19efef01"/></dir><file name="Poll.php" hash="68391855b2d3e6ede1f876b51c04b3ad"/><dir name="Resource"><dir name="Poll"><dir name="Answer"><file name="Collection.php" hash="3c2d27181cd4f5042a541954cf303beb"/></dir><file name="Answer.php" hash="a539558e40483e3a8b6412d15ac5edb5"/><file name="Collection.php" hash="f5c8a76bac64d701baeb8b9b6e813bd1"/><file name="Vote.php" hash="f2115993942595bb9ef35040fef7b408"/></dir><file name="Poll.php" hash="3af179bb36bbe57f00a75c1bf6ae3d32"/></dir></dir><dir name="sql"><dir name="poll_setup"><file name="install-1.6.0.0.php" hash="6183699a1d2391e4a7cf2a7624dd9f5e"/><file name="mysql4-install-0.7.0.php" hash="05287ee1b7bead94f61935f353acfa45"/><file name="mysql4-upgrade-0.6.0-0.6.1.php" hash="46930ddee4eee53fe4bd690e758227ea"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="c336015c5ae00159385efcdc8f3d2da7"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="11120b74156de38de238b77b577ee402"/></dir></dir></dir><dir name="ProductAlert"><dir name="Block"><dir name="Email"><file name="Abstract.php" hash="6f31eae5caffca7cc2ced585e322b6a5"/><file name="Price.php" hash="e843faa0b688ee3736de903ea95a904e"/><file name="Stock.php" hash="18fca7c85de2c98a788e5c161b873a8f"/></dir><file name="Price.php" hash="6e9258e675ef94bd07daf08ba15332be"/><dir name="Product"><file name="View.php" hash="457b8753af19efb258d3bc16158271a4"/></dir><file name="Stock.php" hash="1dfa6861eb468f24bd491f64b59a6351"/></dir><dir name="controllers"><file name="AddController.php" hash="aa481601b430ebf7a871c47457871233"/><file name="UnsubscribeController.php" hash="20755cbdef82ba9cfa37a877be211d2b"/></dir><dir name="etc"><file name="config.xml" hash="5c9761c4ce22a44fe4d3a8a15a64f894"/><file name="system.xml" hash="246a29c79196e1ec024cbcb9b277e5da"/></dir><dir name="Helper"><file name="Data.php" hash="498f69622ceac34e8ac996d797559fc4"/></dir><dir name="Model"><file name="Email.php" hash="c200061386861faff7dff5af7d25030e"/><dir name="Mysql4"><dir name="Price"><file name="Collection.php" hash="9c1b343e741040cab34739e6016eaf9b"/><dir name="Customer"><file name="Collection.php" hash="2fba78b724c1585f7923316be25a95b6"/></dir></dir><file name="Price.php" hash="987a20039b7df4ab955ebd34c17e1174"/><dir name="Stock"><file name="Collection.php" hash="7a978a1ff8c496b471a08a13e7d7d6d3"/><dir name="Customer"><file name="Collection.php" hash="bfa66da29ed06044d181a69b56b49e00"/></dir></dir><file name="Stock.php" hash="70d07a275e5b9a79804b114be5716022"/></dir><file name="Observer.php" hash="975d9b8019f315c00e90014d11261247"/><file name="Price.php" hash="4d065d2a5349ff94c752f0cf1fa7e62f"/><dir name="Resource"><file name="Abstract.php" hash="ab3e7f45ed4b853d48a9b2c97b8c3d0b"/><dir name="Price"><file name="Collection.php" hash="3baa71acbd8b7651d5cdefbb90a0049c"/><dir name="Customer"><file name="Collection.php" hash="74baec93225bcc23fe6ed89335f04209"/></dir></dir><file name="Price.php" hash="88bef31524ea97bf4bbda6e84745c9eb"/><dir name="Stock"><file name="Collection.php" hash="ffc2a627c9ad2042fc86faeae79a1d00"/><dir name="Customer"><file name="Collection.php" hash="b6acc3858be0ca356941499a999d8ff1"/></dir></dir><file name="Stock.php" hash="6b5fcba04cf684d73968de0ea9e6fec7"/></dir><file name="Stock.php" hash="725f5bd8230fe754ee3fe30db877a2c2"/></dir><dir name="sql"><dir name="productalert_setup"><file name="install-1.6.0.0.php" hash="306476f173b7f15ec9f35c73b3db389a"/><file name="mysql4-install-0.7.0.php" hash="3f055a61e7e4039a45beaae9d1d77ad5"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="0363dc8ad772a74454eaeb636a33fbba"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="ee93da8164f89ef4d9800c8ce2d29ebe"/></dir></dir></dir><dir name="Rating"><dir name="Block"><dir name="Entity"><file name="Detailed.php" hash="8710f08354d45b6ee76a784e186ef952"/></dir></dir><dir name="data"><dir name="rating_setup"><file name="data-install-1.6.0.0.php" hash="6135ca1fcbd9712f70cbd89d38896c23"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="5e753464c3d6863efa0adf729174f70d"/><file name="config.xml" hash="6fe309e950a8f3a4b5de14872fa7bad2"/></dir><dir name="Helper"><file name="Data.php" hash="59d6a0d726141cc0cd503a414dbecab2"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Rating"><file name="Collection.php" hash="7c2d1b04c22d3d0e21cd4addc938d282"/><file name="Entity.php" hash="7830f61bef21be13bbe00c52924e9514"/><dir name="Option"><file name="Collection.php" hash="6e7eee1b5acbaf7d0f5719aa4f27d31b"/><dir name="Vote"><file name="Collection.php" hash="56ea721ddb4d80ced768a5f9e39b02ba"/></dir><file name="Vote.php" hash="9b67209ec18628ec48bb8c0d4bd4b7b4"/></dir><file name="Option.php" hash="6cfd2cd1d9add1f2f3eb20bf731fc021"/></dir><file name="Rating.php" hash="1c8e9da357e27b6394f2384a73798fa9"/></dir><file name="Observer.php" hash="937a42280ba9d74bf500ffaaa7d2cee8"/><dir name="Rating"><file name="Entity.php" hash="6fa3ea4fb988e267c80130e3fe232e11"/><dir name="Option"><file name="Vote.php" hash="dccf22feb7ab9e110192b4771d439648"/></dir><file name="Option.php" hash="73acfef8054f425168d747a81dfc07d7"/></dir><file name="Rating.php" hash="58fe2acf2240a168166eb7ba9006b3d1"/><dir name="Resource"><dir name="Rating"><file name="Collection.php" hash="bb9ed1e87439c691df1b0ec868bb787e"/><file name="Entity.php" hash="43abf45304b77ceb1662502667ea9ac9"/><dir name="Option"><file name="Collection.php" hash="f351d06181979d45ac56375e4acba143"/><dir name="Vote"><file name="Collection.php" hash="b235575cbfda89255afcf06ad6901bf8"/></dir><file name="Vote.php" hash="cd889bf7608f7936f64b58cec7d34ed2"/></dir><file name="Option.php" hash="f461d15f11611bb030c20c786408fe67"/></dir><file name="Rating.php" hash="fa3904ec801fd53933e6dd6faf4d3629"/></dir></dir><dir name="sql"><dir name="rating_setup"><file name="install-1.6.0.0.php" hash="90201263b239eda7b3920a0a589ad1d0"/><file name="mysql4-install-0.7.0.php" hash="03f21f189f0b0d71b65f7509eaa5ac29"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="07dfa450476d0a915d54e1352182d074"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="9d9a8ce42a6d065194ed1b30a22ebf7f"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="20713b402edb64773a9307d887337a54"/></dir></dir></dir><dir name="Reports"><dir name="Block"><dir name="Product"><file name="Abstract.php" hash="6f0b62fc50a0e8c377fdb1021f8e76e8"/><file name="Compared.php" hash="86151aa60d2085c063da0c2def93e554"/><file name="Viewed.php" hash="0cea1406ec2574b91157559bf7f554b1"/><dir name="Widget"><file name="Compared.php" hash="518c255ea96d9a1fb491a89a263a3a77"/><file name="Viewed.php" hash="33f56b836895d45d7f0e187beee41b60"/></dir></dir></dir><dir name="data"><dir name="reports_setup"><file name="data-install-1.6.0.0.php" hash="e6b8c7a83598489e2b96acdc297998c7"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="a7005244de82da220a101d7c8ed323c8"/><file name="config.xml" hash="bf7347786b72cce2075da0e533e716fb"/><file name="system.xml" hash="a09b06273548ece5bb9addbe95add367"/><file name="widget.xml" hash="9a3496d98c7a5bca08d72a66e1748289"/></dir><file name="Exception.php" hash="b8f6e43a89f3664a8793778026cd695d"/><dir name="Helper"><file name="Data.php" hash="8e2e0860a81bb3fcd0ed98cb16ecd28c"/></dir><dir name="Model"><file name="Config.php" hash="93353ed155cec19d94f6d09de37fabc6"/><dir name="Event"><file name="Observer.php" hash="ce0da439f203bf47e91cd5f5eb6869fa"/><file name="Type.php" hash="1e2dac5f816c0f464f829a8ea935861a"/></dir><file name="Event.php" hash="2ea9a78cb06feb398d7a12b5d73c52a9"/><file name="Flag.php" hash="ca972f3fb30707ba8ceaef4c31e71e3b"/><dir name="Grouped"><file name="Collection.php" hash="e5a681308650a322d39c5962d24256f8"/></dir><dir name="Mysql4"><dir name="Accounts"><file name="Collection.php" hash="e4f605fd677fd4192b3f3ce1d860128b"/></dir><dir name="Coupons"><file name="Collection.php" hash="6e7a3ba71b619a04c3ef1b18e28b7e80"/></dir><dir name="Customer"><file name="Collection.php" hash="cccd1f90fa16bbdecdc24053bda54d7b"/><dir name="Orders"><file name="Collection.php" hash="d056aa6f487f596bce6652d580ba4755"/></dir><dir name="Totals"><file name="Collection.php" hash="1993929bd7e302d2cf5742be02336000"/></dir></dir><dir name="Entity"><dir name="Summary"><dir name="Collection"><file name="Abstract.php" hash="96dc444865f146c0be58b1767cccc5e3"/></dir></dir></dir><dir name="Event"><file name="Collection.php" hash="d3bcf4db28ce41e84f9d98f8152c998e"/><dir name="Type"><file name="Collection.php" hash="1677e024aae26c759fc00f516a3ee057"/></dir><file name="Type.php" hash="36263662032c752470c85be2e140f4d4"/></dir><file name="Event.php" hash="7258518645c031d8da30a73d06d4527f"/><dir name="Invoiced"><file name="Collection.php" hash="cd0d0e2651a1c23eef7895d6e2d89dd8"/></dir><dir name="Order"><file name="Collection.php" hash="838a4c07fbaef4a0978f3839fb2ef826"/></dir><dir name="Product"><file name="Collection.php" hash="57c1de1ed40dc826d0c1bbe1ffc8f40d"/><dir name="Downloads"><file name="Collection.php" hash="caa44048731148f11bcbc6cb862c1757"/></dir><dir name="Index"><file name="Abstract.php" hash="7cdff2cac45e92aad908ca6ea01e5751"/><dir name="Collection"><file name="Abstract.php" hash="3cc814ab7cf9ad386bcaab03cc9c8c41"/></dir><dir name="Compared"><file name="Collection.php" hash="396275c9d26661e6a0911d686615940a"/></dir><file name="Compared.php" hash="459187547853e5d2767bb49145f03735"/><dir name="Viewed"><file name="Collection.php" hash="ae80340127fdffc01a653b9ed54ecd26"/></dir><file name="Viewed.php" hash="5ae0e3079ac7dfbe8dcb41b35c9afe15"/></dir><dir name="Lowstock"><file name="Collection.php" hash="26030ea58790cda76cc5e1badfab55ba"/></dir><dir name="Ordered"><file name="Collection.php" hash="dc9aa0404503165df4a628af21eac87f"/></dir><dir name="Sold"><file name="Collection.php" hash="54366f87d1eec9beec7c227e12884689"/></dir><dir name="Viewed"><file name="Collection.php" hash="b775890e3e8f3a932872f031545ce5d6"/></dir></dir><dir name="Quote"><file name="Collection.php" hash="d308f055c8f67fa890a23c8469bed384"/></dir><dir name="Refunded"><file name="Collection.php" hash="d9c2f63aa0029f103524b8213de646ad"/></dir><dir name="Report"><file name="Abstract.php" hash="d8575ac7ce62d10c1a5ec7a7dc2e22e6"/><file name="Collection.php" hash="e5e8dfad4de1eb32bedee88acdd4ab12"/></dir><dir name="Review"><file name="Collection.php" hash="3076da05e42875f545a7e8f593135a93"/><dir name="Customer"><file name="Collection.php" hash="f8e24c55fdfcd19eebec45df72f732b4"/></dir><dir name="Product"><file name="Collection.php" hash="5d6e9df20c7125f27d252a4ad8ccc037"/></dir></dir><dir name="Shipping"><file name="Collection.php" hash="8f67eee4cad030ff6ce659240d99dc61"/></dir><dir name="Shopcart"><dir name="Product"><file name="Collection.php" hash="07fd035103f6a0cecdcec4b7655bd9bf"/></dir></dir><dir name="Tag"><file name="Collection.php" hash="9a257b5ac5a2fd2badda3ef31c111eb6"/><dir name="Customer"><file name="Collection.php" hash="249df272f63bfc99b8f20139fc37f545"/></dir><dir name="Product"><file name="Collection.php" hash="01967572ee4951cb4fd79c3f5f97a03b"/></dir></dir><dir name="Tax"><file name="Collection.php" hash="4544e017a56384c1835cd8fc03c602a8"/></dir><dir name="Wishlist"><file name="Collection.php" hash="ffce2511237fa818b652e1d4e498e840"/><dir name="Product"><file name="Collection.php" hash="d1da497513fa365f7d1eab50727d2409"/></dir></dir></dir><dir name="Product"><dir name="Index"><file name="Abstract.php" hash="d7608de113759fc20068c6ea2f6ccc68"/><file name="Compared.php" hash="67b613394ac8903c27dd3298b7a7f0c0"/><file name="Viewed.php" hash="e5d74b029acbdee4968d32866360b60c"/></dir></dir><file name="Report.php" hash="6e00b32680508f4e08cd6676cedd2a94"/><dir name="Resource"><dir name="Accounts"><file name="Collection.php" hash="9568022a2ee06d2298bf1dd6f38436ce"/></dir><dir name="Coupons"><file name="Collection.php" hash="66e690a39179f5e4db0f8d842926a4f9"/></dir><dir name="Customer"><file name="Collection.php" hash="f4718abc92e94156215ca604f7420ce8"/><dir name="Orders"><file name="Collection.php" hash="b93b272fdad6dd33b5d7d4ae995aed16"/></dir><dir name="Totals"><file name="Collection.php" hash="6004dfdf3f11fa07ae252f0cd6de0e34"/></dir></dir><dir name="Entity"><dir name="Summary"><dir name="Collection"><file name="Abstract.php" hash="8a995e6412d5d4e8478934b6042eefb5"/></dir></dir></dir><dir name="Event"><file name="Collection.php" hash="186a69e07be0ea06939ff724c9c72ed8"/><dir name="Type"><file name="Collection.php" hash="7b67a269187fef3f6620aa92aadf5378"/></dir><file name="Type.php" hash="4b8abf004b08aa95846b51966fecd62e"/></dir><file name="Event.php" hash="5d32f7e4507f9d384ef19f41caa41120"/><dir name="Helper"><file name="Interface.php" hash="858d9829729d760b741b87123f37c93f"/><file name="Mysql4.php" hash="9ba489cb3a582af7e2a84c72ac7a49d4"/></dir><dir name="Invoiced"><file name="Collection.php" hash="62e94eb90ffe59ae79bb20b1b61d8405"/></dir><dir name="Order"><file name="Collection.php" hash="2e547904f0e39d87e145d75fabc118a0"/></dir><dir name="Product"><file name="Collection.php" hash="30f88b2b095a6453a0e853b60845a164"/><dir name="Downloads"><file name="Collection.php" hash="c4e69533b1b18134172dd5b1d99f27a9"/></dir><dir name="Index"><file name="Abstract.php" hash="368d538d44a3a13cc79f92f79189e825"/><dir name="Collection"><file name="Abstract.php" hash="a1d0ac5ad62840f42bbaef6e9ef018e5"/></dir><dir name="Compared"><file name="Collection.php" hash="29d8dfdd64dc42e9b107ef81a25ace11"/></dir><file name="Compared.php" hash="ac6170f1148b8db1876e0911ae2153b1"/><dir name="Viewed"><file name="Collection.php" hash="7d5162193c4b481caa63265d48200606"/></dir><file name="Viewed.php" hash="fdb4f9b273c8e14afdb4340764c26590"/></dir><dir name="Lowstock"><file name="Collection.php" hash="992f12434023ca2264599074eed83513"/></dir><dir name="Ordered"><file name="Collection.php" hash="e74572e97f6c52ceceedddf454e0d3ab"/></dir><dir name="Sold"><file name="Collection.php" hash="770281a6ee43d39df3fb7cee4fcc2a6f"/></dir><dir name="Viewed"><file name="Collection.php" hash="11b2d0b23cbd91137768ac55dbadc345"/></dir></dir><dir name="Quote"><file name="Collection.php" hash="1bae38408456efe5c98b4587062f2eda"/></dir><dir name="Refunded"><file name="Collection.php" hash="f4318a70aa87adbab16fe9e384bac59d"/></dir><dir name="Report"><file name="Abstract.php" hash="7e235e2b244ace660959aa1ec2bdeae3"/><dir name="Collection"><file name="Abstract.php" hash="9605da6ba1ca83270ed066662789afb5"/></dir><file name="Collection.php" hash="65698e7ed5b280006b984152321fe631"/><dir name="Product"><dir name="Viewed"><file name="Collection.php" hash="c885811f21a874898d097c22fd95fe67"/></dir><file name="Viewed.php" hash="aa26b0123c8cd11330518241ef443675"/></dir></dir><dir name="Review"><file name="Collection.php" hash="cf59d2cf5fbc32ee2d1a81ed88642f9e"/><dir name="Customer"><file name="Collection.php" hash="c8b08e1a83750a9dd49ccbdd6f05ab16"/></dir><dir name="Product"><file name="Collection.php" hash="49a606ba0651018e2257233de2c67dcc"/></dir></dir><dir name="Shipping"><file name="Collection.php" hash="68e6fac25b480c5e390add20bd53b7e5"/></dir><dir name="Shopcart"><dir name="Product"><file name="Collection.php" hash="f5b61ffb17552d653bd163d01927b62d"/></dir></dir><dir name="Tag"><file name="Collection.php" hash="7f0387e3185d1c8816ffd6e9e9e1a205"/><dir name="Customer"><file name="Collection.php" hash="b4fd488184c83790700655ba4f0e94a2"/></dir><dir name="Product"><file name="Collection.php" hash="d854cc5cb7568a9b82e22a8d90044be2"/></dir></dir><dir name="Tax"><file name="Collection.php" hash="27ecb5bb6ceb5ab4fb807c5f8ef380cc"/></dir><dir name="Wishlist"><file name="Collection.php" hash="c405916913f56a54be65557d56a6fb74"/><dir name="Product"><file name="Collection.php" hash="f4a0f3cb00564e74c100e383b0350c29"/></dir></dir></dir><file name="Session.php" hash="90a1937d9b1181ca3d86a91af7105750"/><file name="Test.php" hash="6c12dc1b404173e9bc5ff879a0ddda6d"/><file name="Totals.php" hash="c937f869bb760029fdd1727673f86921"/></dir><dir name="sql"><dir name="reports_setup"><file name="install-1.6.0.0.php" hash="fce2efb27e84987145d0d8cf69dfa535"/><file name="mysql4-install-0.7.1.php" hash="a11f9fa85c524fac9f59f97422a91f53"/><file name="mysql4-install-1.5.0.0.php" hash="e0a88dd180254f8667f5499f5e8b8194"/><file name="mysql4-install-1.6.0.0.php" hash="bc4b6efa0100cb03134601abb7b1b741"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="5367a98d517289f6d269493704092f69"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="65e389d8d34990964554120c186bf5ca"/><file name="mysql4-upgrade-0.7.2-0.7.3.php" hash="cd1d5bb24de72f9dbbe37dbd4d3853ff"/><file name="mysql4-upgrade-0.7.3-0.7.4.php" hash="87e106317d9018597a86e68d8bbe4272"/><file name="mysql4-upgrade-0.7.4-0.7.5.php" hash="7941a2b79344e81c6ab4b3ab582bc2b8"/><file name="mysql4-upgrade-0.7.5-0.7.7.php" hash="a595f4b477bc7250004be129662f90b4"/><file name="mysql4-upgrade-0.7.7-0.7.8.php" hash="b949bf6cdd39adcadfaeaa4556bf3726"/><file name="mysql4-upgrade-0.7.8-0.7.9.php" hash="57f2ff852cfc1d72295aeb7ca6c256cc"/><file name="mysql4-upgrade-0.7.9-0.7.10.php" hash="9906e43aca73b2b00f043592ace8ac4a"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="ae3fe138dce31638cfe48c1bcc76ddfe"/><file name="upgrade-1.6.0.0-1.6.0.0.1.php" hash="5bc18bc67a7ac04317bdc20cb4e59520"/></dir></dir></dir><dir name="Review"><dir name="Block"><dir name="Customer"><file name="List.php" hash="512f6bccef84c8a74fda5f420445c4d0"/><file name="Recent.php" hash="1360e263f20197c4c490e58a76c75e84"/><file name="View.php" hash="79dcb73a30715fe0503714761d0cbc43"/></dir><file name="Form.php" hash="97e96bd77694697efd6ddad3a80886a6"/><file name="Helper.php" hash="c2898b88acfa4b895f175c434b0d23b7"/><dir name="Product"><dir name="View"><file name="List.php" hash="8d51b77d0c9c40d0a26ce6fc9e691ef1"/></dir><file name="View.php" hash="1ff570d54d2cc10293a95c6d470b7ab3"/></dir><file name="View.php" hash="3a14309417e3dc331693e339fc030dee"/></dir><dir name="controllers"><file name="CustomerController.php" hash="7f8bde1175d4f1c84e1003eb22a2a04f"/><file name="ProductController.php" hash="54a19e74ba34ff2775a9d734933173eb"/></dir><dir name="data"><dir name="review_setup"><file name="data-install-1.6.0.0.php" hash="06f866a61735b94c77e41eab769bfca9"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="c37c8b5ab9782f01b2052078804b756f"/><file name="config.xml" hash="ba18f2b1e9af08a7cca32ac29aad1f8b"/><file name="system.xml" hash="296917bd2227622735c06f2ad0efc10e"/></dir><dir name="Helper"><file name="Data.php" hash="77a835e8b76aaee5808b10acf14e85cc"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Review"><file name="Collection.php" hash="5b04aafae1ba00964a3e355702eb0e8e"/><dir name="Product"><file name="Collection.php" hash="665da21b59130b405bcbd02c881355f8"/></dir><dir name="Status"><file name="Collection.php" hash="232d1c40b0ce6d75a98222df25540b1a"/></dir><dir name="Summary"><file name="Collection.php" hash="4d74684b5238cb670d01256b71252d72"/></dir><file name="Summary.php" hash="51127438707df4925ca3eb4c46c88759"/></dir><file name="Review.php" hash="52165c52f6a55f95c04a9b8bcfe7916b"/></dir><file name="Observer.php" hash="cf41fc1dd4e1fd52f18d4702cf76b057"/><dir name="Resource"><dir name="Review"><file name="Collection.php" hash="313532b00b0f8c95efdc4b2861667972"/><dir name="Product"><file name="Collection.php" hash="0d00efec461805e8670cd171a167e0e1"/></dir><dir name="Status"><file name="Collection.php" hash="4e168c66bdb3ad0e7637745f22644fc4"/></dir><file name="Status.php" hash="0ee3c9050c5f8f7863101c64f0a7be17"/><dir name="Summary"><file name="Collection.php" hash="af6a615ac909f2f5bc66f5c45c06f00c"/></dir><file name="Summary.php" hash="af953b40062ca41c374bf52ef423d8e5"/></dir><file name="Review.php" hash="702d3cb8924128c9390bbf60bdccca9f"/></dir><dir name="Review"><file name="Status.php" hash="37d6b0248fc4db13ad37f57adb95ea0f"/><file name="Summary.php" hash="fa22e88d5721e74e396af6639cf4849e"/></dir><file name="Review.php" hash="548850726d7006c046e7d7c31012dbec"/><file name="Session.php" hash="5011f17908d79c4e7884211b82081c83"/></dir><dir name="sql"><dir name="review_setup"><file name="install-1.6.0.0.php" hash="608a4a29080becd12dc041ae5fc19514"/><file name="mysql4-install-0.7.0.php" hash="5a6f80f002bed460b1a987498a7a096b"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="d5fd6c392fbc64817d98c419ff54603d"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="7ac48a534bd8706db958ab3b9b6d2c2d"/><file name="mysql4-upgrade-0.7.2-0.7.3.php" hash="cc2ec170b5d31a80ce4b35ff0e8d5ae3"/><file name="mysql4-upgrade-0.7.3-0.7.4.php" hash="bdad8dfabbd5e5956ff7a139e405c3b1"/><file name="mysql4-upgrade-0.7.4-0.7.5.php" hash="1e448fec1c7d0c8d4cec3e8fe1d52855"/><file name="mysql4-upgrade-0.7.5-0.7.6.php" hash="1947e923106a808c80aa923a25b54491"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="7d58eb14c4475963abd496f3580035f1"/></dir></dir></dir><dir name="Rss"><dir name="Block"><file name="Abstract.php" hash="331a822c60937a0d471544df3de9d659"/><dir name="Catalog"><file name="Abstract.php" hash="cf7af7e78a5114dc5d958a338db5108f"/><file name="Category.php" hash="9389bf7aa38c2e618ca8a37b7864ddb4"/><file name="New.php" hash="77ebd6905023d62a97c70b517ff91702"/><file name="NotifyStock.php" hash="7c87d363b1fed1d13fc9e8a349120354"/><file name="Review.php" hash="cf9e97c6e005b741e5d38cf29af54769"/><file name="Salesrule.php" hash="48320719d42035795ea4257dc0a2de10"/><file name="Special.php" hash="5c2a557c0e4484545ae8816ba9671111"/><file name="Tag.php" hash="ca7621f8af888dc9b0ba5106271b9852"/></dir><file name="List.php" hash="0b3dd6ac95ad3a60855517bc4661b150"/><dir name="Order"><file name="Details.php" hash="1d243e3c908a1f3ece31e7d65f600e3f"/><file name="New.php" hash="ba413c58ebdfdf34653349c3224b5863"/><file name="Status.php" hash="6dc825ce1c71b2c20e2a31a927e0de69"/></dir><file name="Wishlist.php" hash="fcc30ea48b5a607e80a246e421f73def"/></dir><dir name="controllers"><file name="CatalogController.php" hash="9f7e4e48ab930df9f62a69864b28ab83"/><file name="IndexController.php" hash="eb30ab3ee18351e8de8891cb818097c6"/><file name="OrderController.php" hash="6e5eb5da17755081e2c8ded96a24c9bd"/></dir><dir name="etc"><file name="adminhtml.xml" hash="802ec822d5984fc507ecd00ae9987052"/><file name="config.xml" hash="3ba1c6b26f9c53f2242e9ea6a3acb962"/><file name="system.xml" hash="3b3d393672f9401cfb242022b53b4e5c"/></dir><dir name="Helper"><file name="Catalog.php" hash="e7c7bf342450791dcf5f5aeb67780c4d"/><file name="Data.php" hash="b60dd947d753c061ce26018f7e045703"/><file name="Order.php" hash="d2caf3b89eab2f9367eccc02b032d236"/></dir><dir name="Model"><dir name="Mysql4"><file name="Order.php" hash="a6cde6961f4a385a0cde9e6b7cc015ee"/></dir><file name="Observer.php" hash="9a9a9672089d466fdfbc8a646a8bb3b6"/><dir name="Resource"><file name="Order.php" hash="f5dcf5ddd7f0b3455929a64fe49ea00e"/></dir><file name="Rss.php" hash="e92c3c5832318244adc7ad24523ed6c2"/><file name="Session.php" hash="5ad7456a9aed6bfca235b4ca5024e0b5"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Links.php" hash="79e3bf8dad81d01888dd43c43d19c680"/></dir></dir></dir></dir></dir><dir name="Rule"><dir name="Block"><file name="Actions.php" hash="a0b150d68bb444eb7076d96afe32f556"/><file name="Conditions.php" hash="76029d83a9ef4b0ca4b85328c4a2e44e"/><file name="Editable.php" hash="e5f2554327d7d59c45bf9fd0fb71fd78"/><file name="Newchild.php" hash="4c43c3139e2c7a112ba3570001c55132"/><file name="Rule.php" hash="6849a19a500b281da15e63832051fac3"/></dir><dir name="etc"><file name="config.xml" hash="61983085b5622046f06a3d1b15585007"/></dir><dir name="Helper"><file name="Data.php" hash="9ea2a71c6cdbbe13c5033f3c3950546a"/></dir><dir name="Model"><file name="Abstract.php" hash="0a451a3cbb024527e89f3ec3d2ca706a"/><dir name="Action"><file name="Abstract.php" hash="6223e0acc6c3d4dd5491eb2afba20cfb"/><file name="Collection.php" hash="72aa17db211e2fe6c4fd8944f10635c5"/><file name="Interface.php" hash="68fcfdd1e53b958a602c594e97de1178"/></dir><dir name="Condition"><file name="Abstract.php" hash="f2814742717bf856bb89282921326b3f"/><file name="Combine.php" hash="011848c974b065087d312f5df1069129"/><file name="Interface.php" hash="5d5d7021e900e24ff83609e7af7143d8"/><dir name="Product"><file name="Abstract.php" hash="ccf5c0894026fca25a25f463b0913353"/></dir></dir><file name="Environment.php" hash="eab0f10cf2cc52b1dbde2c0bd73704e6"/><dir name="Mysql4"><dir name="Rule"><file name="Collection.php" hash="a5c3e8b06d349235eb3aa6d603a60ba8"/></dir><file name="Rule.php" hash="26c8ad9294a344f4e13d87bb9bc6e5fa"/></dir><dir name="Renderer"><file name="Actions.php" hash="90b7a62b5f9e53539ba1fa8208a0527e"/><file name="Conditions.php" hash="c075c7b79052eb75c24b26670b1839d3"/></dir><dir name="Resource"><file name="Abstract.php" hash="debae6fc267abfc7d43dadc2826dfca7"/><dir name="Rule"><dir name="Collection"><file name="Abstract.php" hash="b88069cea72d5383acc7a6e5fe4a80bc"/></dir><file name="Collection.php" hash="d73272762bd7e5e25d6912ffb7b76e8a"/><dir name="Condition"><file name="SqlBuilder.php" hash="5fe02f7f46ca3063fa63989b32212044"/></dir></dir><file name="Rule.php" hash="f431afc5ec1d904293122583760e19cc"/></dir><file name="Rule.php" hash="c9b4cfa869892b360ac6ecbdca971cce"/></dir></dir><dir name="Sales"><dir name="Block"><dir name="Adminhtml"><dir name="Billing"><dir name="Agreement"><file name="Grid.php" hash="663e48b2ae5d315c2ae2a0a754c67c7c"/><dir name="View"><file name="Form.php" hash="984ca7876570077960b563fa74278f6f"/><dir name="Tab"><file name="Info.php" hash="a64543dbf6fced6b7a108ce6ad90c43e"/><file name="Orders.php" hash="ba0f50ebbdbcd59f7fac237878e4b3f0"/></dir><file name="Tabs.php" hash="cbac95f69cb21c92c196ad2c19cda8bc"/></dir><file name="View.php" hash="be411d31e98963d73d4d6280e00b80a3"/></dir><file name="Agreement.php" hash="449fa7b6d10dee7018f41c275e271423"/></dir><dir name="Customer"><dir name="Edit"><dir name="Tab"><file name="Agreement.php" hash="04483b9d8432b77516c169b84f50b8f3"/><dir name="Recurring"><file name="Profile.php" hash="5f70ba08850e95b4e22995316f112684"/></dir></dir></dir></dir><dir name="Recurring"><dir name="Profile"><dir name="Edit"><file name="Form.php" hash="2622ba6fc27fe351ac84f79afe4f233c"/></dir><file name="Grid.php" hash="40355f4c8e1b37b553d189671b0c80e7"/><dir name="View"><file name="Getawayinfo.php" hash="9c2c03a4ca1c3e92c2685967db60ded3"/><file name="Info.php" hash="5c6edb9761e8e72b6dbeaa7f0b82653c"/><file name="Items.php" hash="3aa5473305d2f7473a66713608fe1b68"/><dir name="Tab"><file name="Info.php" hash="a2cb34ce79544cf9684e7ba274d8ae52"/><file name="Orders.php" hash="93bbd3811e3d7a0289238a298768ad86"/></dir></dir><file name="View.php" hash="b5cb8f2a0e9511e1593e00987016d455"/></dir><file name="Profile.php" hash="23f4f9a245cb99519d8d15428506eb64"/></dir><dir name="Report"><dir name="Filter"><dir name="Form"><file name="Coupon.php" hash="45e2c9bce0c153f10966b4557d749a9b"/><file name="Order.php" hash="e75e7771a337fd90aa303308aff0a53d"/></dir><file name="Form.php" hash="2abf3a948cfb32be1db773845e0430a3"/></dir></dir></dir><dir name="Billing"><dir name="Agreement"><file name="View.php" hash="e1ec10c82e53fd49f85b5f5148842f36"/></dir><file name="Agreements.php" hash="e59f440586c6551a8ba1bbc1dcc4c9a6"/></dir><dir name="Guest"><file name="Links.php" hash="9ea5a8e9f7aa1572efac642f21449841"/></dir><dir name="Items"><file name="Abstract.php" hash="c09fd47ee383879d0b3c6c0e1362614e"/></dir><dir name="Order"><file name="Comments.php" hash="a5f44559689b78f3ee3ddc4dda3dbab6"/><dir name="Creditmemo"><file name="Items.php" hash="d8009b9b7e66892c5a793ad39b869774"/><file name="Totals.php" hash="8e843e9bd47c2a282d809edb0b08c993"/></dir><file name="Creditmemo.php" hash="6aa17d7be7fad8db2d4da74627e5884d"/><file name="Details.php" hash="d159ff9c6c4d08028a7caef941ecb7c5"/><dir name="Email"><dir name="Creditmemo"><file name="Items.php" hash="afd28baa1c02bbd13da85cf3f5f4328b"/></dir><dir name="Invoice"><file name="Items.php" hash="d474773ba70575ee263567d7614304ab"/></dir><dir name="Items"><file name="Default.php" hash="aaea07e417958545c3d78ac6b9081f1a"/><dir name="Order"><file name="Default.php" hash="5b2785a6d26ad72260f05cbabdfc094d"/><file name="Grouped.php" hash="5abde96018674e60c8533067375b015d"/></dir></dir><file name="Items.php" hash="8aab6c6a12d226c2154171e88ed5adce"/><dir name="Shipment"><file name="Items.php" hash="cc6643f54bc7f620bfc51923558a21a3"/></dir></dir><file name="History.php" hash="79d820579e3ce317f5f9aaab00adce43"/><dir name="Info"><file name="Buttons.php" hash="58c61fd2ed7659363372d27d4bb2348f"/></dir><file name="Info.php" hash="452689591f840661befe37f599696fe3"/><dir name="Invoice"><file name="Items.php" hash="6de1df7bed7505f6ed510b8773df9e76"/><file name="Totals.php" hash="611df8dd9676593b59290774bbc6eaf8"/></dir><file name="Invoice.php" hash="3526efba6bd5d17551c2c38561237a6f"/><dir name="Item"><dir name="Renderer"><file name="Default.php" hash="4dc03ec3c63ed05dbe483c5011e09133"/><file name="Grouped.php" hash="a69b4e139fb887f240c8ed3531ca806a"/></dir></dir><file name="Items.php" hash="75d79776e3f7c1622058f2f639594f8f"/><dir name="Print"><file name="Creditmemo.php" hash="950ba9c464877866d854d99247a67fc7"/><file name="Invoice.php" hash="31e640f77a81994af4c33fbcf9995339"/><file name="Shipment.php" hash="f2c3e3fc9ee8d655084777f7888c8f5c"/></dir><file name="Print.php" hash="1ac6020966522d5f19d958a9b8a0d977"/><file name="Recent.php" hash="19828034c12eab875992fa41fb58901b"/><dir name="Shipment"><file name="Items.php" hash="64296d135f3896e4ace963ce454f633b"/></dir><file name="Shipment.php" hash="adfd4e0ac9fd1bd452ddf6f92afd1f8f"/><file name="Tax.php" hash="877a0541bf1c4fddab4f63b9c9ec24ab"/><file name="Totals.php" hash="a916f5cfe3c05f5f873bf01913d82127"/><file name="View.php" hash="3404763f9f2e696540ba0cbc7f091820"/></dir><dir name="Payment"><dir name="Form"><dir name="Billing"><file name="Agreement.php" hash="3c67c84c2aea873d0a75307d9fe72515"/></dir></dir><dir name="Info"><dir name="Billing"><file name="Agreement.php" hash="4e825763afe14c289d7417aec9c824af"/></dir></dir></dir><dir name="Recurring"><dir name="Profile"><file name="View.php" hash="1fb9198061970f6c857b78b3c82c7d41"/></dir><file name="Profiles.php" hash="06f12ec4b37a0c6b91c9a9187dd99ee7"/></dir><dir name="Reorder"><file name="Sidebar.php" hash="7879f83d7ab76500a5a68262b725d102"/></dir><dir name="Widget"><dir name="Guest"><file name="Form.php" hash="79328142adeef748e3b205ecdf36429f"/></dir></dir></dir><dir name="Controller"><file name="Abstract.php" hash="03628e37cf15b2c9a20208fb1637a951"/></dir><dir name="controllers"><dir name="Billing"><file name="AgreementController.php" hash="0c43ad9d5dc3faa2fe601cf1c42ff7ae"/></dir><file name="DownloadController.php" hash="40d1bb137de68983b28b5f15e3450014"/><file name="GuestController.php" hash="0740bef48e3c62203749ee97ac6d1a08"/><file name="OrderController.php" hash="bada7556cfb708a088b735e54b59aec9"/><dir name="Recurring"><file name="ProfileController.php" hash="7800235d5a27bc5c43f555cdb22e039e"/></dir></dir><dir name="data"><dir name="sales_setup"><file name="data-install-1.6.0.0.php" hash="07f8a46b6221cc6e732982e0f71646c3"/><file name="data-upgrade-1.6.0.4-1.6.0.5.php" hash="41b7c0a8985043718bdd7659de159ea4"/></dir></dir><dir name="doc"><file name="invoice.txt" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="order_actions.HTM" hash="b955e61bff753ea0534f907ef6ba9bb6"/><file name="order.txt" hash="5dce876530c94ebbedbba7a234c23846"/><file name="quote.txt" hash="55ecfbdd576958ff1b1fbf16957ba9df"/><file name="test.php" hash="9bc93498924ccbe63f0d08c4e8731fd0"/></dir><dir name="etc"><file name="adminhtml.xml" hash="e73bb044bad576aa131798df1790f66d"/><file name="api2.xml" hash="c60570acbefb8bf78cc2aab6c80617a1"/><file name="api.xml" hash="fcfbf7665494872e744b801bfa3574a1"/><file name="config.xml" hash="3d7711669d1524457f931c24677cefe2"/><file name="system.xml" hash="11767f93e25f4835df6cd3769eecc94d"/><file name="widget.xml" hash="0e5fe489ab86dbf266d5a89f3bb40040"/><file name="wsdl.xml" hash="ed13de1dde6408ab508892374ef57b81"/><file name="wsi.xml" hash="6aba2f44765955ec8bcd1afcebfb0800"/></dir><file name="Exception.php" hash="4441b7cbf57bfd39a5743010f45854bb"/><dir name="Helper"><file name="Data.php" hash="478a523e2bc3586de0425713e33dd23d"/><file name="Guest.php" hash="fbaf51d671ef9719b60aa9e1429ce82e"/><file name="Reorder.php" hash="f6a521d48892dcb49978bd832a34b864"/></dir><dir name="Model"><file name="Abstract.php" hash="11cf7f74476a6edca1cf03155f7fc06f"/><dir name="Api"><file name="Resource.php" hash="b72b10b689a1f2a2c91cbbb0fa4f967d"/></dir><dir name="Api2"><dir name="Order"><dir name="Address"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="67ebb4ba974d83416106286c8c9274fe"/></dir><dir name="Customer"><file name="V1.php" hash="b2740d9e4d25c52863c56bfdfe4781fb"/></dir></dir><file name="Rest.php" hash="5e8582adf0d32e3f533b82d5bfcc5465"/></dir><file name="Address.php" hash="729dfeaa5549c0d1ee6e885d46c38ae5"/><dir name="Comment"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="dbd47810c46fa094cfb0eadd796d9b2c"/></dir><dir name="Customer"><file name="V1.php" hash="1cc629a63b9b8ee871de8683f1133356"/></dir></dir><file name="Rest.php" hash="b041ed77886208f7685a27a922423285"/></dir><file name="Comment.php" hash="4392f5db6e41f2bbcfd9f2dfcd889d11"/><dir name="Item"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="f3ce8e9d41348d5717aed1002ed31716"/></dir><dir name="Customer"><file name="V1.php" hash="19dddbb520393cc073af190eb610ae99"/></dir></dir><file name="Rest.php" hash="3df89f39774d95d76baeb7151f7b12d9"/></dir><file name="Item.php" hash="81138d1ee990d24199cb8a75a09d1252"/><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="8767fa4db2feab9c400507d358dfe895"/></dir><dir name="Customer"><file name="V1.php" hash="66da449f274219d1de878b3dfa421d3a"/></dir></dir><file name="Rest.php" hash="d6c60e043702ea3f501cef93527204ce"/></dir><file name="Order.php" hash="6ecf5ce91303a518e498d200cdb8d86b"/></dir><dir name="Billing"><file name="Agreement.php" hash="7a681e26a78d503e4ad48e4f350025d0"/></dir><dir name="Config"><file name="Ordered.php" hash="27f854036b76e23f15bb732489f463c2"/></dir><file name="Config.php" hash="2d4f68d19647860304bb8be6103f224d"/><dir name="Convert"><file name="Order.php" hash="007a986acd83d82e65d441b9f91ccbed"/><file name="Quote.php" hash="35fe281999c4e12bfcd63346f453abf3"/></dir><dir name="Email"><file name="Template.php" hash="0b5d82151a0960d21821c64fc94ef201"/></dir><dir name="Entity"><dir name="Order"><dir name="Address"><file name="Collection.php" hash="5766d17a81b123d749621aa77a4c10f5"/></dir><file name="Address.php" hash="19c9f8830ad739eb5d8961eff1c09657"/><dir name="Attribute"><dir name="Backend"><file name="Billing.php" hash="a45641f010c69926e245ad84b3199b9e"/><file name="Child.php" hash="5fbc02a06aedb3f7d3818184df11b094"/><file name="Parent.php" hash="b04f050eea5b8c213b32affaef695586"/><file name="Shipping.php" hash="6a9c033db37ef99a2b674257c3be334a"/></dir></dir><file name="Collection.php" hash="0e4ccc29c9e78d2799719b84d8f1f43a"/><dir name="Creditmemo"><dir name="Attribute"><dir name="Backend"><file name="Child.php" hash="1a68c7ae98eb0800b0169cdcc508b35d"/><file name="Parent.php" hash="940fad4c1b0fa32ae1a27e2351c6b188"/></dir></dir><file name="Collection.php" hash="7a38a07a6fd04fde560364b4fade4e83"/><dir name="Comment"><file name="Collection.php" hash="2316d9141c43d866c0e51b7aa02d3613"/></dir><file name="Comment.php" hash="29cae325212acf2de3e30a28341d9aa5"/><dir name="Item"><file name="Collection.php" hash="bae6084a3fbd82593d80822aa642b4b5"/></dir><file name="Item.php" hash="98083afbc879289a97dbf91e28f0965d"/></dir><file name="Creditmemo.php" hash="a854ec87cdab64f8f80edd53ddf6e5bc"/><dir name="Invoice"><dir name="Attribute"><dir name="Backend"><file name="Child.php" hash="35926828dff48dcab530cbc643809d9c"/><file name="Item.php" hash="657a8ad83975e96d0b01f5fb5d173b75"/><file name="Order.php" hash="44b4edd447c511f67bb24190a30aa3c9"/><file name="Parent.php" hash="5045fdce051cd209e9b1acd81fc7dfed"/></dir></dir><file name="Collection.php" hash="1d2de78e72c3baf0bd13867431bb5884"/><dir name="Comment"><file name="Collection.php" hash="f41366a70181290fa097abf3604f6993"/></dir><file name="Comment.php" hash="2c5ac613b4c3ed93cf999e39f4cb612b"/><dir name="Item"><file name="Collection.php" hash="4a7b6593be9e179e8ecccceab1f4ff7b"/></dir><file name="Item.php" hash="84b4e02f49e0e461cad8e882b0aceae5"/></dir><file name="Invoice.php" hash="8a8ce3f016b773502d6e23a6c50e8d51"/><dir name="Item"><file name="Collection.php" hash="a8ef79b1c516b51d84777be58a50db8b"/></dir><file name="Item.php" hash="58ca9ea6aa3ab8bc8eb786b781cb03f9"/><dir name="Payment"><file name="Collection.php" hash="eb2b2badb21dd434fa38efa37245a481"/></dir><file name="Payment.php" hash="2f7842ec9ec111273721d19ba17148de"/><dir name="Shipment"><dir name="Attribute"><dir name="Backend"><file name="Child.php" hash="896c76b148112177cb00dbab3ff04e00"/><file name="Parent.php" hash="8df58202984af8587a586318aae68528"/></dir></dir><file name="Collection.php" hash="3ca3e22355ee024005834c4c0fd2c314"/><dir name="Comment"><file name="Collection.php" hash="4272836e8153f1689e2a0352e913d68e"/></dir><file name="Comment.php" hash="102fa89d48258947f665d5c982f99105"/><dir name="Item"><file name="Collection.php" hash="5395c94786cd0ba5a97fa03f04f69a10"/></dir><file name="Item.php" hash="4b9999d532791aaa7bef9541fa789b82"/><dir name="Track"><file name="Collection.php" hash="5971fdcda1ee2af75b5ca0b6cad8bb91"/></dir><file name="Track.php" hash="583328e30d02f3bbb6231a50b3f846c7"/></dir><file name="Shipment.php" hash="7cefc3d57fb6bac18e3ff2fe4d84461e"/><dir name="Status"><dir name="History"><file name="Collection.php" hash="c7efb1a3e07a6018a962e11b6a63098d"/></dir><file name="History.php" hash="7b62f81846aac3b1530e10a375c34127"/></dir></dir><file name="Order.php" hash="6172561cc551475f708dafd7db347e4e"/><dir name="Quote"><dir name="Address"><dir name="Attribute"><dir name="Backend"><file name="Child.php" hash="4e6001d4a13458bd4a3072479bdcb0f2"/><file name="Parent.php" hash="3e99e06c7759e3bcf64c70ccd5c69b2e"/><file name="Region.php" hash="846650adb4e9d136407eecc67b777035"/></dir><file name="Backend.php" hash="a6baf45d86523c0da8c738b46de34bf7"/><dir name="Frontend"><file name="Custbalance.php" hash="e2af566b37a8b580e32eacf75ad54359"/><file name="Discount.php" hash="5357ffca3917527b02b8b25717a593b3"/><file name="Grand.php" hash="f0f49960212176f27361f6622c524a39"/><file name="Shipping.php" hash="36c1b2fc02839705595427ef81cffe04"/><file name="Subtotal.php" hash="34de6a34cf0d9960ee07f3133cd5bf72"/><file name="Tax.php" hash="06e9a6ab4383348eaa3ea78248e8c0e4"/></dir><file name="Frontend.php" hash="b1029792df9b5faab32fd9ea72e9e7c5"/></dir><file name="Collection.php" hash="d64979d7d85bf9727f7bbe901faf5b04"/><dir name="Item"><file name="Collection.php" hash="4b3a00c9a61f7532c3c9ea9c5a5c6af7"/></dir><file name="Item.php" hash="dd7ca260fd23e0ea43bc7733264e4417"/><dir name="Rate"><file name="Collection.php" hash="7ad45cf8c8472935475aa966fff214d1"/></dir><file name="Rate.php" hash="4da2866b0b0de346b8261d3f6e322f4c"/></dir><file name="Address.php" hash="e600212b7895204482aa1138880a6810"/><file name="Collection.php" hash="2bc796f885f1956e5afed43d5ef54064"/><dir name="Item"><file name="Collection.php" hash="a9f32e705db227a6992a5d8219f881e3"/></dir><file name="Item.php" hash="03c05e524857ef664da61bbde0292024"/><dir name="Payment"><file name="Collection.php" hash="d3374a60fe829fc2556630538deb60a0"/></dir><file name="Payment.php" hash="d33ad08997fe1f34797cb45e29cf1307"/></dir><file name="Quote.php" hash="90e6131394be459c960a919496f2392d"/><dir name="Sale"><file name="Collection.php" hash="f84cf5dba0f39f31aacccc456b1f684c"/></dir><file name="Setup.php" hash="b2ed53d7646d549d5eb1ddcf638d6ec2"/></dir><dir name="Mysql4"><file name="Abstract.php" hash="128add902202303cb2cc50f83ac6c5fa"/><dir name="Billing"><dir name="Agreement"><file name="Collection.php" hash="a9163e84abbd23e110cc3f166436036b"/></dir><file name="Agreement.php" hash="0a0d0575aa6fa7b61eb9e3a47e1b220f"/></dir><dir name="Collection"><file name="Abstract.php" hash="82b22b98a63304124f8c8b7cfbdd69a7"/></dir><dir name="Order"><file name="Abstract.php" hash="e9bda3bece5826e87d0d4422db27ff74"/><dir name="Address"><file name="Collection.php" hash="49ecf4aa5f645fd556e847aef7631d8f"/></dir><file name="Address.php" hash="6b7f31ec020ebc154a7b0c925f2b425c"/><dir name="Attribute"><dir name="Backend"><file name="Billing.php" hash="954b13b81b33d0220cff629fe351d07c"/><file name="Child.php" hash="60d0ea5f3652b0dc694b1705f25e3c7b"/><file name="Parent.php" hash="13c6a4b7a45a286fe2eb1e4471febe80"/><file name="Shipping.php" hash="c6382b97fd956369a411e036320803cc"/></dir></dir><dir name="Collection"><file name="Abstract.php" hash="0ca49af555976302b079787517574d81"/></dir><file name="Collection.php" hash="934e03a6b2e1a205d1fe499770740b99"/><dir name="Comment"><dir name="Collection"><file name="Abstract.php" hash="8dc5749ab2b075db69858bd268f6c56a"/></dir></dir><dir name="Creditmemo"><dir name="Attribute"><dir name="Backend"><file name="Child.php" hash="e18db842b0815a134d71d86e26d1893d"/><file name="Parent.php" hash="856f71f2a531a2cb9927971d1252b3f7"/></dir></dir><file name="Collection.php" hash="81302a8789ee5b925a8b9f70d206897b"/><dir name="Comment"><file name="Collection.php" hash="57cc525da057dc2f43fc018eb4328421"/></dir><file name="Comment.php" hash="d1144bd9d3446bf32636b1e2a145f781"/><dir name="Grid"><file name="Collection.php" hash="9edc4ff74b8bc60172b4c89e96d136d5"/></dir><dir name="Item"><file name="Collection.php" hash="096b66c8dd41068af6484b22c051e14a"/></dir><file name="Item.php" hash="c299ff8271689c908613c49b49fe5e05"/></dir><file name="Creditmemo.php" hash="6578cbbb22a2a658abb04c421f3fb8da"/><dir name="Grid"><file name="Collection.php" hash="4de46611e98bf975a2faab35b1c521ce"/></dir><dir name="Invoice"><dir name="Attribute"><dir name="Backend"><file name="Child.php" hash="3ad1b41d9fea412445fc085fd4a44df6"/><file name="Item.php" hash="a7dd732b1c44d095baadc79fa03004b9"/><file name="Order.php" hash="95d04268dd02902957ae13dbfedcba00"/><file name="Parent.php" hash="16a1463dbf53cc977b46e571e629248c"/></dir></dir><file name="Collection.php" hash="d90d7493c81611fbcfdbe050730ed154"/><dir name="Comment"><file name="Collection.php" hash="e26f0d819ff1ce2b8fe7b231e72710d8"/></dir><file name="Comment.php" hash="d89d07a17bb347ddb5044eac5ea9692c"/><dir name="Grid"><file name="Collection.php" hash="f18b1bf1654da34c04daa98c912b3f40"/></dir><dir name="Item"><file name="Collection.php" hash="b98e39cc84e942ab9c22927f3325c801"/></dir><file name="Item.php" hash="23483baa22e9d49acda71932b3d95ea4"/></dir><file name="Invoice.php" hash="b41af8f8bbbdfc3154f4f391b3a1657d"/><dir name="Item"><file name="Collection.php" hash="792340760753ee53838fb6a82afcb8e6"/></dir><file name="Item.php" hash="7313d63910bbf281b2e0ee4d23766b82"/><dir name="Payment"><file name="Collection.php" hash="82d6533783a611d7465589c76b7ff874"/><dir name="Transaction"><file name="Collection.php" hash="9fa0a722e2e39398fda162f3af28afa2"/></dir><file name="Transaction.php" hash="c507b030526ab631a563b8369a976ac2"/></dir><file name="Payment.php" hash="df4e94c339c8098a5ef4ef38d51eb0e8"/><dir name="Shipment"><dir name="Attribute"><dir name="Backend"><file name="Child.php" hash="2d2ce48c0f6dd5b3332b242aee43105b"/><file name="Parent.php" hash="f3bf55cdb90f7cd19eeda63eaeae8d7b"/></dir></dir><file name="Collection.php" hash="8f7c55f8525dcd2f30cf9aaef5488b0d"/><dir name="Comment"><file name="Collection.php" hash="aae07d826e543599f87022d1cbf91012"/></dir><file name="Comment.php" hash="610aaae5149ad5d9d2733967a8de44dc"/><dir name="Grid"><file name="Collection.php" hash="9efeb3ec27d9ac2cd929730e37ef4e4f"/></dir><dir name="Item"><file name="Collection.php" hash="51e112df8b81ef310892b122e051b75c"/></dir><file name="Item.php" hash="b44a64b5654e9dd9ced6f941b6eb095b"/><dir name="Track"><file name="Collection.php" hash="a7c27e28803f12acb64692ca66de6837"/></dir><file name="Track.php" hash="3720baaebce72420c024157632ab99f9"/></dir><file name="Shipment.php" hash="b1eb09646e0c251ab83d5ad880d63cdc"/><dir name="Status"><file name="Collection.php" hash="3bee86636d708dc72b3bae367c78e5c3"/><dir name="History"><file name="Collection.php" hash="fc68c4a740c4fb2301346cd17287e053"/></dir><file name="History.php" hash="ebef39b8d1cba78fa2b472901b656994"/></dir><file name="Status.php" hash="2fcee2be0b2d402be0eae31c7059dce8"/><dir name="Tax"><file name="Collection.php" hash="6642b1bfd26fee9b775e6910d4021d2d"/></dir><file name="Tax.php" hash="fcb20608ae95407630c5d8bb33ab85b0"/></dir><file name="Order.php" hash="c40d54841d1a3027e1b5f6da9143d93d"/><dir name="Quote"><dir name="Address"><dir name="Attribute"><dir name="Backend"><file name="Child.php" hash="5e5981e1455701462a7f30b9b169aa3e"/><file name="Parent.php" hash="38aeac1afc6cb5db3afa7fdc08bb83e4"/><file name="Region.php" hash="b7adc57e6c16eb13b3690134ba9c564a"/></dir><file name="Backend.php" hash="edc8b860ae10b21bc4cac459c9dc0d48"/><dir name="Frontend"><file name="Custbalance.php" hash="e680ca81ba2a4845697b93c4a728a880"/><file name="Discount.php" hash="6a7dc5385377397a2fdc8902b59ef489"/><file name="Grand.php" hash="e68b97e262d97a8282232c71800c03b4"/><file name="Shipping.php" hash="53603ed1a56f474ba9ed8b9fb00bf32f"/><file name="Subtotal.php" hash="96c6dbee82c5da5dd3ac3d13a8a09a85"/><file name="Tax.php" hash="493aa07eaff245095336e83d8359dbc2"/></dir><file name="Frontend.php" hash="ef4679616bf7d42102fef461e28e7b74"/></dir><file name="Collection.php" hash="bfab1ab76703790ef2ea88178bc6deea"/><dir name="Item"><file name="Collection.php" hash="c31e142d560d9fc891f4f242e8216f94"/></dir><file name="Item.php" hash="d8a883ad952aa2ff14071e9859b4035b"/><dir name="Rate"><file name="Collection.php" hash="a2e3be0c0c4f6aedc7a3401373b5f641"/></dir><file name="Rate.php" hash="b6613721e91779d035c4df6b44126b6c"/></dir><file name="Address.php" hash="9e672c91dc6b76205491c39afc07d736"/><file name="Collection.php" hash="242eb33f4414e101a3adda458a0eec5e"/><dir name="Item"><file name="Collection.php" hash="11e6e994d2dd81133ac57d64eabaf344"/><dir name="Option"><file name="Collection.php" hash="ab10fde6fa328f6b6b28fe78939b3b2e"/></dir><file name="Option.php" hash="9e6185c8d738091b2bae6b1bb449254c"/></dir><file name="Item.php" hash="9c3ec7452ede7ca738c9b5a7949d8474"/><dir name="Payment"><file name="Collection.php" hash="63e1e84ce07530482b7602cf43e8e9ac"/></dir><file name="Payment.php" hash="721d8250d9822e93cd57f511ed297cf8"/></dir><file name="Quote.php" hash="315f6a2ecb39e0725f3f266c15e21674"/><dir name="Recurring"><dir name="Profile"><file name="Collection.php" hash="d3ac315015cc0e803f184a85125cef9d"/></dir><file name="Profile.php" hash="91aba342aa51acd78e6166438e8c65e5"/></dir><dir name="Report"><file name="Abstract.php" hash="5501ee57e374d9711d710ef72f2a85a2"/><dir name="Bestsellers"><file name="Collection.php" hash="524043554d7f1bfc76f6cfcebcab6125"/></dir><file name="Bestsellers.php" hash="e9819db1270b9ab2f5ddc760ec674a63"/><dir name="Collection"><file name="Abstract.php" hash="ab6550e2698c0cede5f5fddc4ea463d8"/></dir><dir name="Invoiced"><dir name="Collection"><file name="Invoiced.php" hash="6fe3c1017e086ba4e88edede5220ccf7"/><file name="Order.php" hash="238f218524e7f91ace6dad13d54d61a5"/></dir></dir><file name="Invoiced.php" hash="b9c9cba1c465c11091a4a2fbc0610e8e"/><dir name="Order"><file name="Collection.php" hash="522f29eec35c7fcdc4366c246d723480"/><dir name="Updatedat"><file name="Collection.php" hash="82606f09e07187ce6a65eaa1ecff06df"/></dir></dir><file name="Order.php" hash="4f8a1ae5542d891f3f193d6dcb7c5f38"/><dir name="Refunded"><dir name="Collection"><file name="Order.php" hash="62bb9d5309eceae85f87b5fd22aa96d4"/><file name="Refunded.php" hash="1637262766f63aaf091f2a7f8367a9ba"/></dir></dir><file name="Refunded.php" hash="e600376c3c03fcb83ca967adcdbce9e4"/><dir name="Shipping"><dir name="Collection"><file name="Order.php" hash="18c6adbab346f3d9cec5848a6cd5c70d"/><file name="Shipment.php" hash="963eee5684e3acf6d311151446870d73"/></dir></dir><file name="Shipping.php" hash="ed643f4dde6ca5aeed9989f570b13dcf"/></dir><file name="Report.php" hash="0d5ddcfe98cdf28de6a2a8dd55e4b968"/><dir name="Sale"><file name="Collection.php" hash="5cc429a18ee7758bbb4e1b8cd62fc668"/></dir><file name="Setup.php" hash="ab109d54b2e21bb90daf2c63652b00d5"/></dir><file name="Observer.php" hash="ef8e008d112171a941318c65183cfa96"/><dir name="Order"><file name="Address.php" hash="3dc2060d626b425c1e97b998ce94180b"/><dir name="Api"><file name="V2.php" hash="c5bec3186dd3a6c5ee954e2e84bd9f2f"/></dir><file name="Api.php" hash="901ce1705c0f7cc486bb8750c0330b30"/><file name="Config.php" hash="28d1dccebea93da875eb6ef3844bf05e"/><dir name="Creditmemo"><dir name="Api"><file name="V2.php" hash="605b5f520783ee1a07b5df1a2ca27adc"/></dir><file name="Api.php" hash="96056a119e6446e103b34849d0c31eca"/><file name="Comment.php" hash="f0a6f81b92fa7050e220817cae65e2d0"/><file name="Config.php" hash="55e7766ead48b3fa754e92c32e34c20a"/><file name="Item.php" hash="41307a104a0d62421d334057f5366b59"/><dir name="Total"><file name="Abstract.php" hash="b233b7c4a7e8991388cb3cccd696d73c"/><file name="Cost.php" hash="2a7e76ce7bb78c3037db47e3b0854707"/><file name="Discount.php" hash="87d45fa4b418574747bbcdf69106c454"/><file name="Grand.php" hash="2e2cbc584bb6c80ee2fd8bde4ee1dbe5"/><file name="Shipping.php" hash="2614d1326eacc24cf09254570aa13059"/><file name="Subtotal.php" hash="aad15222440186f5f1580cf907bbfb21"/><file name="Tax.php" hash="45779741ae5fcd94dcdc0ee19ca1ac14"/></dir></dir><file name="Creditmemo.php" hash="61bad416ec6c036f70b15ef9203a999f"/><dir name="Invoice"><dir name="Api"><file name="V2.php" hash="9df6d6338b591262d29ee1adf9b8c5a5"/></dir><file name="Api.php" hash="822b4a16c1c314a66e4d7711f86a5402"/><file name="Comment.php" hash="564093b8f554d09d3518b6d72144ceb4"/><file name="Config.php" hash="8a2c0f326a9c689a94272f7617e3c3de"/><file name="Item.php" hash="c82373a9630c66deb23f9b788dd8e94d"/><dir name="Total"><file name="Abstract.php" hash="6f34c9549184970731390eaea4adc55e"/><file name="Cost.php" hash="4a4f13dc7a8d54a4298beb28bda67321"/><file name="Discount.php" hash="e0542966680f7b8e26f1404f7a0ff541"/><file name="Grand.php" hash="f6d864ada64d499a00792d3d0feed544"/><file name="Shipping.php" hash="d8c5e2a78e17c0ffb10358e824a9cf15"/><file name="Subtotal.php" hash="9235bc533dc549819bb21f391d7b2ce4"/><file name="Tax.php" hash="fbfdd688d973475382749cdf807e2052"/></dir></dir><file name="Invoice.php" hash="5e161f0c2c3eaf0c1e43adb3c8e74c9c"/><file name="Item.php" hash="83572d7f04c792fbadcdf9bcc6d0df19"/><dir name="Payment"><file name="Transaction.php" hash="6eeb7f10c93aa10ee1072103a5aa4cf4"/></dir><file name="Payment.php" hash="b22c3506e388fe38f57486aa98ff3a00"/><dir name="Pdf"><file name="Abstract.php" hash="902134abb4f9e9871a7fa6b6f9e70dd5"/><file name="Creditmemo.php" hash="f69191824cd44c68d3ff5acc2aa2d1bd"/><file name="Invoice.php" hash="393b3cc227fdb034f7992b8cef16a413"/><dir name="Items"><file name="Abstract.php" hash="3aa560042bb31618caf2fc7b2cba2060"/><dir name="Creditmemo"><file name="Default.php" hash="17dbb2bd543a2e1329e6e8e219d2c550"/><file name="Grouped.php" hash="8660c15601d9cb09f2c9742bf1d64052"/></dir><dir name="Invoice"><file name="Default.php" hash="6e15fc399d6f5cba06182f869d63456f"/><file name="Grouped.php" hash="be281c626b13fd0a26fe57fd1730b780"/></dir><dir name="Shipment"><file name="Default.php" hash="db57ad093bd56e82aef1068c730bad75"/></dir></dir><dir name="Shipment"><file name="Packaging.php" hash="c5fecb46a2b085beb02177b6cfd68b49"/></dir><file name="Shipment.php" hash="feea28842c018237f7b1fef8c3f4d957"/><dir name="Total"><file name="Default.php" hash="9419424e3fcd76345f9df0c7e1e56db0"/></dir></dir><dir name="Shipment"><dir name="Api"><file name="V2.php" hash="e32616155bb6c3539bddca097a587d98"/></dir><file name="Api.php" hash="84bd899ca269cbf155980469a26197d6"/><file name="Comment.php" hash="5073f33a6209bdc069f6f98d5be73862"/><file name="Item.php" hash="ce8dd783d966b6471ec44c3b6814ee79"/><file name="Track.php" hash="9dbc703408c30c3915c92a0d33da44d2"/></dir><file name="Shipment.php" hash="4fe14c92d2714116cca06501fe1839aa"/><dir name="Status"><file name="History.php" hash="d4321ed258e1a466502238bf5c39dc96"/></dir><file name="Status.php" hash="d90607b997601faf5dcf17cc44f40282"/><file name="Tax.php" hash="a1292231c94e6b244d610350abdbb70b"/><dir name="Total"><file name="Abstract.php" hash="549e306a62d9ef240480e23c6e1c24dd"/><dir name="Config"><file name="Base.php" hash="87222530849a4e81284663e6f7289877"/></dir></dir><file name="Total.php" hash="7baf7dacd2022b0cd4b13372fa7ee619"/></dir><file name="Order.php" hash="7c7247e25a0a64599f047f257be8d1e8"/><dir name="Payment"><dir name="Method"><dir name="Billing"><file name="AgreementAbstract.php" hash="36ba727b4a2aa0312529cb741f1372d5"/></dir></dir></dir><dir name="Quote"><dir name="Address"><file name="Item.php" hash="eff19902344bb990881b1038bb264cd4"/><file name="Rate.php" hash="ac7568287619116ac83f8607f43c0d5b"/><dir name="Total"><file name="Abstract.php" hash="21c10520967a0e16aa64df88854180de"/><file name="Collector.php" hash="f91e7b06749ac4265a1275fcbf54faae"/><file name="Custbalance.php" hash="35b9490e871165f66047879f7369dcb6"/><file name="Discount.php" hash="4a5a30cf5eb3be66a69b1112c1ed47a1"/><file name="Grand.php" hash="dca10e6d8b57ac870f9a6836acfd30dc"/><file name="Msrp.php" hash="9f850fe69084f35810d6226e41c134a3"/><dir name="Nominal"><file name="Collector.php" hash="5ec913bb6420fa56f0ad8a9e22417e26"/><dir name="Recurring"><file name="Initial.php" hash="fcbca757c2e5e282c6aea7d3a20c6415"/><file name="Trial.php" hash="ddc90ef8436abf8092d5699a62e49e66"/></dir><file name="RecurringAbstract.php" hash="d523c7c7f18fca0c3f6009e1333f91ba"/><file name="Shipping.php" hash="7d1e40de396943bf1a84ea671e4c1f0b"/><file name="Subtotal.php" hash="8afed5a17f23ada2fcd1d634e0740704"/></dir><file name="Nominal.php" hash="841f9235da982912d6798965edf21e20"/><file name="Shipping.php" hash="ff5902ba7eef009dd761d779dcf29301"/><file name="Subtotal.php" hash="ef7d56e5990a8f875c16faca41a14169"/><file name="Tax.php" hash="981bf7aa646bb1450c7c7be4f92ca6b7"/></dir><file name="Total.php" hash="fef1fca517a7d0fd3cca9c2f03d0456c"/></dir><file name="Address.php" hash="75fc0a97a0278729f3e4232bff590207"/><file name="Config.php" hash="fd5cda737c90b7b755e4f4efb4a37cad"/><dir name="Item"><file name="Abstract.php" hash="6e635b3849d47d36b179a426e993a803"/><file name="Option.php" hash="df3a8fd94135e2cb7cc3f9c32331d4d7"/></dir><file name="Item.php" hash="1d3f62aae3f66dfecee703b190eab2b6"/><file name="Payment.php" hash="57f7756bec4af5ed67bb344ff503d3fe"/></dir><file name="Quote.php" hash="cca4f04ed32ff243cca1b4ecd45fb329"/><dir name="Recurring"><file name="Profile.php" hash="fe0c38bd6aa48f370bb2b251c2d84a4f"/></dir><dir name="Resource"><file name="Abstract.php" hash="965c88159aee43cabfdec2641177200b"/><dir name="Billing"><dir name="Agreement"><file name="Collection.php" hash="25ad2f5afc48e698b8e8056a2814e85d"/></dir><file name="Agreement.php" hash="473e173749fb98be9f7efb3249dbd611"/></dir><dir name="Collection"><file name="Abstract.php" hash="26966527173ed18054d52bae9de5c2d3"/></dir><dir name="Helper"><file name="Interface.php" hash="d1c46c3057e759117e469d86bd953b33"/><file name="Mysql4.php" hash="fc65f4cf5dac893a2069a664848de8b4"/></dir><dir name="Order"><file name="Abstract.php" hash="32ab9459a3a24adb3238de92f3661bf5"/><dir name="Address"><file name="Collection.php" hash="ccd4041780d6c16bedd7dbcf884987f4"/></dir><file name="Address.php" hash="857f15728597cf58cc1260b349cc2d17"/><dir name="Attribute"><dir name="Backend"><file name="Billing.php" hash="304614aa4850321917318c4bd7908eaa"/><file name="Child.php" hash="899f2157affe5933be5248d006de088c"/><file name="Parent.php" hash="be2bf80fe5fcc8092b75d73d067deb73"/><file name="Shipping.php" hash="9881f1a99c191047b140a3d68da9c71c"/></dir></dir><dir name="Collection"><file name="Abstract.php" hash="1e2f956381b66c7c22fbc69ccf40aaa6"/></dir><file name="Collection.php" hash="d79866ef0167541dbcdf5159c760aa2e"/><dir name="Comment"><dir name="Collection"><file name="Abstract.php" hash="3f5ce9561c599386d7f0bf109abd2505"/></dir></dir><dir name="Creditmemo"><dir name="Attribute"><dir name="Backend"><file name="Child.php" hash="06d2bcd645f58452f9a06c8b30ef8688"/><file name="Parent.php" hash="2afb484746b2e18732de65fbd72b460c"/></dir></dir><file name="Collection.php" hash="a007dbc7ac82a457c8a84abf14a24f38"/><dir name="Comment"><file name="Collection.php" hash="c185ec12bd5e2bceee51ce6038c02776"/></dir><file name="Comment.php" hash="63b5fad6fbd263928e1fb5917fc04172"/><dir name="Grid"><file name="Collection.php" hash="258269175792f51bddc85fb3c8930d80"/></dir><dir name="Item"><file name="Collection.php" hash="4ad0cc2456567e821d1a99478bd89212"/></dir><file name="Item.php" hash="9ba0e0b9be56aa3812a51683f9fdf422"/></dir><file name="Creditmemo.php" hash="af125788908439d3c8e0b038af166fb1"/><dir name="Grid"><file name="Collection.php" hash="dda047386011a00fb2340eaaee0d1e48"/></dir><dir name="Invoice"><dir name="Attribute"><dir name="Backend"><file name="Child.php" hash="142f38f6ff58f18d0d403ea9a44e4852"/><file name="Item.php" hash="42a8604d0c61a0d6b04124fdfd4e7384"/><file name="Order.php" hash="b672855cc69c1276f285c05b009af5e9"/><file name="Parent.php" hash="fb901af0e65d0382b0451c0375fda894"/></dir></dir><file name="Collection.php" hash="6bb8cc14b45ec00b218770f6f429db18"/><dir name="Comment"><file name="Collection.php" hash="89365d3ea9d1817d0ba5707ea5f8f60e"/></dir><file name="Comment.php" hash="372beebe081e537d4837cd2ab89d0da0"/><dir name="Grid"><file name="Collection.php" hash="0f203bfde746136f5c08688b2ec1bdf1"/></dir><dir name="Item"><file name="Collection.php" hash="096c0a890a6ce76900e8b640bdef4cbb"/></dir><file name="Item.php" hash="a59176d4b89deb3c9a7523db6cdb890f"/></dir><file name="Invoice.php" hash="665b61ff6a29e8ea59b7ca918890291a"/><dir name="Item"><file name="Collection.php" hash="62ba018017a8908478bf1efb39662b40"/></dir><file name="Item.php" hash="78e4cc62c73cedc68d1b9f2eb85badc3"/><dir name="Payment"><file name="Collection.php" hash="394854020d198ac30e2fd9e0e41d2008"/><dir name="Transaction"><file name="Collection.php" hash="5ef74f60a5fdb28d232148ad233817f4"/></dir><file name="Transaction.php" hash="6de5fa2beb04c4d7a86e5eec1f782499"/></dir><file name="Payment.php" hash="65bf1cf8dee902410067b4562ed2cd24"/><dir name="Shipment"><dir name="Attribute"><dir name="Backend"><file name="Child.php" hash="ec082c789f16f3ecc0eb39b70b611b3b"/><file name="Parent.php" hash="9619322e8c5aaeab4ba48d03c8ff7e55"/></dir></dir><file name="Collection.php" hash="e1efc1d9da2feccea03bf9dcbd139407"/><dir name="Comment"><file name="Collection.php" hash="4d1db0dabb28960a953b74a4c3b2ea03"/></dir><file name="Comment.php" hash="e5650a7235991ec395bf7fec018c3f9d"/><dir name="Grid"><file name="Collection.php" hash="79afe40956c7004c5f53f66679819085"/></dir><dir name="Item"><file name="Collection.php" hash="448e12a9faef64a0aeb5ce7900ac2e40"/></dir><file name="Item.php" hash="48008c49afe3d441ba2c84f19b2a0093"/><dir name="Track"><file name="Collection.php" hash="29960ae8bbade4a8fa5e21b5dbdcf2da"/></dir><file name="Track.php" hash="2188fb4705def80fcdc29b31b9e6fcd6"/></dir><file name="Shipment.php" hash="e9768724dace7c600b31e97730c300f1"/><dir name="Status"><file name="Collection.php" hash="a8bd7f557c8a08cf12df913e35306138"/><dir name="History"><file name="Collection.php" hash="aa16e025ad649fbc5b832b8b89d62a4a"/></dir><file name="History.php" hash="a76a35d29d1fd2869b9fc17f9d7b86c1"/></dir><file name="Status.php" hash="fda21503949180742d4280d7fdc580e1"/><dir name="Tax"><file name="Collection.php" hash="36954f1a1c3fb8b35aa7b1f3cec7d4d0"/></dir><file name="Tax.php" hash="d4745c233803a91cc8f4316b63bc9f61"/></dir><file name="Order.php" hash="40ee6cdea14682142a7ebd12b60487c3"/><dir name="Quote"><dir name="Address"><dir name="Attribute"><dir name="Backend"><file name="Child.php" hash="5abc3338c2d7db40aade669727544f59"/><file name="Parent.php" hash="e2caeca8114e64ce04cb519c240cd0e4"/><file name="Region.php" hash="34f069f3e95692b9f34609397f2618d4"/></dir><file name="Backend.php" hash="14700b0cec55b7f3c311897edebf9a47"/><dir name="Frontend"><file name="Custbalance.php" hash="ee638c4c27f7958281443cd1203fed4d"/><file name="Discount.php" hash="10851ec7a1023af38493121e34feaca0"/><file name="Grand.php" hash="8b7fe12e4440d2a41570be9333e94af1"/><file name="Shipping.php" hash="144296835d49f22ba5efd0754d661478"/><file name="Subtotal.php" hash="446905955d44771b7fcf014efd1be3e6"/><file name="Tax.php" hash="014748dd5d7a2f1b3c95417b7a4452d0"/></dir><file name="Frontend.php" hash="eee3eb15c8813b14a58504d5488a49d2"/></dir><file name="Collection.php" hash="967398dafa2523497e46bbad3751ba84"/><dir name="Item"><file name="Collection.php" hash="34d01f6c061fd431588a554a806ec04d"/></dir><file name="Item.php" hash="04b737a40b64c090c8d5b702271c263a"/><dir name="Rate"><file name="Collection.php" hash="8277e39f773174afc28eb7298dcbcf36"/></dir><file name="Rate.php" hash="ef2db701e0b81e14afd1871c584ae76b"/></dir><file name="Address.php" hash="3879b22837a8af256ab2caed7f77c328"/><file name="Collection.php" hash="fe51430903c77b924cc1f755e4f0179e"/><dir name="Item"><file name="Collection.php" hash="f286a4136041f92b9b5c71474dd3d997"/><dir name="Option"><file name="Collection.php" hash="12f805a396e26d3cfd618dd60f114d7f"/></dir><file name="Option.php" hash="2e58a20ff8a0c946b1a6decd71a72f63"/></dir><file name="Item.php" hash="6091b3595b06b5f42dd76dd8839d40b8"/><dir name="Payment"><file name="Collection.php" hash="f745ae2bc0602a381c2a6a3365450e7f"/></dir><file name="Payment.php" hash="56d621bee328306d2a3a9ac5e9b8da56"/></dir><file name="Quote.php" hash="0c5088f86c4cfae07a93e1ca7767bebf"/><dir name="Recurring"><dir name="Profile"><file name="Collection.php" hash="79875bab853b2f3c659bf33345f0b33d"/></dir><file name="Profile.php" hash="5c5285cf1fe7268f2135595b21380c9d"/></dir><dir name="Report"><file name="Abstract.php" hash="332b8ce3ed8f2293bdc934d637c3a491"/><dir name="Bestsellers"><file name="Collection.php" hash="4355e5e9c7fe83a3646c084f1947b1ea"/></dir><file name="Bestsellers.php" hash="4feea5e8f6e1f6d9666d49d259687b66"/><dir name="Collection"><file name="Abstract.php" hash="96d7fad23628ddadf2278e81dfaf24d8"/></dir><dir name="Invoiced"><dir name="Collection"><file name="Invoiced.php" hash="e6d635f272e970227b88fce09a6926fc"/><file name="Order.php" hash="5c866625639c6c60ee54124a400c2c70"/></dir></dir><file name="Invoiced.php" hash="23536b9a08f9add5c0e4a0d56a3bbe88"/><dir name="Order"><file name="Collection.php" hash="690b58217bc4056f73931d7c959e2141"/><file name="Createdat.php" hash="1718880b15efc91fc517a189b2e42a8c"/><dir name="Updatedat"><file name="Collection.php" hash="ae8eeeaba903e8e20b5e83b3ab94f35a"/></dir><file name="Updatedat.php" hash="1ba8fa75f1b253cdb2b3648a3fcc7ba3"/></dir><file name="Order.php" hash="59a840d296fc3231f6f9f56095644cad"/><dir name="Refunded"><dir name="Collection"><file name="Order.php" hash="a64c74a5e0e1f0ed15b3b920f7d50110"/><file name="Refunded.php" hash="2944216473831d884baf008c3bddaa5d"/></dir></dir><file name="Refunded.php" hash="4cb798ff1fb8b5a962deab0bc7519e3a"/><dir name="Shipping"><dir name="Collection"><file name="Order.php" hash="c40fbd1690f888058f2c984cd5e06898"/><file name="Shipment.php" hash="da422bf0ef86a63e966f30f1a9101fa4"/></dir></dir><file name="Shipping.php" hash="573a3cf436618fa8469770ee862c88b3"/></dir><file name="Report.php" hash="2f448aa355aba0c596d32e904c53dc1b"/><dir name="Sale"><file name="Collection.php" hash="c05e5cf2051874339652e84e286b1076"/></dir><file name="Setup.php" hash="4a0e245c700aab11b35638a246071b64"/></dir><dir name="Service"><file name="Order.php" hash="91dbb41dd2d829190716757a3640482a"/><file name="Quote.php" hash="fdfdc063f47d2ea933086c78741c8b36"/></dir><dir name="Status"><file name="List.php" hash="be1b304c8efe2c6f0c1d8ca5c3119e03"/></dir></dir><dir name="sql"><dir name="sales_setup"><file name="install-1.6.0.0.php" hash="b98abf3de6eb15f1b907f17b7c58bb92"/><file name="mysql4-install-0.7.0.php" hash="4b9a1e3cdf78707209871e12b4aa5066"/><file name="mysql4-install-0.8.11.php" hash="2b36df3df070e5d0572f2b9d49bee9f9"/><file name="mysql4-install-0.9.0.php" hash="465403c6100fd4bf42214c0693f71b73"/><file name="mysql4-install-1.4.0.0.php" hash="00b0f75293d649b1c71478d02364ed29"/><file name="mysql4-upgrade-0.6.2-0.7.0.php" hash="beab1065e53f27e1265e4734a142336a"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="212b06e70c37b4d1f536df665c463c40"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="c8254f51f628da9aa0b78e10b9069ed6"/><file name="mysql4-upgrade-0.7.2-0.7.3.php" hash="75760549a73d983e6221e744b30af7bc"/><file name="mysql4-upgrade-0.7.9-0.7.10.php" hash="375bf2c3335b19883f2e9e67511bb568"/><file name="mysql4-upgrade-0.8.0-0.8.1.php" hash="e6ee07cacecb386ace8ab39809b1ff9c"/><file name="mysql4-upgrade-0.8.1-0.8.2.php" hash="f5c53299875982d878fccf1cbcd7321e"/><file name="mysql4-upgrade-0.8.11-0.8.12.php" hash="23f1b680a0918171e71ce2d916e72513"/><file name="mysql4-upgrade-0.8.12-0.8.13.php" hash="da3bf8ed52f46b4372922c4e192c6468"/><file name="mysql4-upgrade-0.8.13-0.8.14.php" hash="561e4fb75aa6b6401e818e9c3c3e57e5"/><file name="mysql4-upgrade-0.8.14-0.8.15.php" hash="a0cb24425aa5a5a630b1b5e90264369a"/><file name="mysql4-upgrade-0.8.15-0.8.16.php" hash="5fcecac61c47ce3a82d6f1be7ff4cdf1"/><file name="mysql4-upgrade-0.8.16-0.8.17.php" hash="ec3bd339361fefff5cbee488bf165641"/><file name="mysql4-upgrade-0.8.17-0.8.18.php" hash="2d96dfea29a14ae93a15449e0f41f705"/><file name="mysql4-upgrade-0.8.18-0.8.19.php" hash="dbe5fb519c8b66c9042616283c1aee16"/><file name="mysql4-upgrade-0.8.19-0.8.20.php" hash="679b9423ba09ef07cc256e2d5daaa2f4"/><file name="mysql4-upgrade-0.8.20-0.8.21.php" hash="d9525600331fba32f27a6e2793b17848"/><file name="mysql4-upgrade-0.8.2-0.8.3.php" hash="c5ce1fa44d09de71d09e37fd5cca5134"/><file name="mysql4-upgrade-0.8.21-0.8.22.php" hash="7f4c696e155063f9f14bba5483a128aa"/><file name="mysql4-upgrade-0.8.22-0.8.23.php" hash="f46c800286bc2a85f5ab0ad9332dc89c"/><file name="mysql4-upgrade-0.8.23-0.8.24.php" hash="ea81dc0b1542a96317cf9a3ca6810b3b"/><file name="mysql4-upgrade-0.8.24-0.8.25.php" hash="16000b70fbb9bdc6be05c5ad9872aa10"/><file name="mysql4-upgrade-0.8.25-0.8.26.php" hash="3d2db72f51da1c8e3231df393b4f8615"/><file name="mysql4-upgrade-0.8.26-0.8.27.php" hash="d3870bfa2dd11317988d2bebb9a689f1"/><file name="mysql4-upgrade-0.8.27-0.8.28.php" hash="a92fd349f673e6cf2c7575c2c21d0909"/><file name="mysql4-upgrade-0.8.28-0.8.29.php" hash="d34d7c9e5e89ef5ed89490902b4e4dae"/><file name="mysql4-upgrade-0.8.29-0.9.0.php" hash="afefeaa33d7456ce3d65baeff06d3017"/><file name="mysql4-upgrade-0.8.3-0.8.4.php" hash="243594ac5d193d391ef63a089a990173"/><file name="mysql4-upgrade-0.8.6-0.8.7.php" hash="c5ce1fa44d09de71d09e37fd5cca5134"/><file name="mysql4-upgrade-0.8.7-0.8.8.php" hash="fdb96a8440868633b438917df8997e19"/><file name="mysql4-upgrade-0.8.8-0.8.9.php" hash="6732b0d0b0f68b5c65edde9a68952a2e"/><file name="mysql4-upgrade-0.9.0-0.9.1.php" hash="8a05f9548f1e987f03d556bcf0de426e"/><file name="mysql4-upgrade-0.9.10-0.9.11.php" hash="023c3db0357f42d6a7bd0751443b1ac4"/><file name="mysql4-upgrade-0.9.1-0.9.2.php" hash="d66cf931a3e08f4519ec3f7d00abf20f"/><file name="mysql4-upgrade-0.9.11-0.9.12.php" hash="b81009bb934c54ca68840f30e036f826"/><file name="mysql4-upgrade-0.9.12-0.9.13.php" hash="4ae0c5d67aadb79ded08113c4ead9e4d"/><file name="mysql4-upgrade-0.9.13-0.9.14.php" hash="d623f354da09f2225b8f7875505bbea8"/><file name="mysql4-upgrade-0.9.14-0.9.15.php" hash="95f85b386278819bba86017b871a55f6"/><file name="mysql4-upgrade-0.9.15-0.9.16.php" hash="d9ef049aa50ca89e600c6ab653633f62"/><file name="mysql4-upgrade-0.9.16-0.9.17.php" hash="a2c816508326ae16481a9bdbedeb21a1"/><file name="mysql4-upgrade-0.9.17-0.9.18.php" hash="97874c4308ced0bf894096ac6dcdf92a"/><file name="mysql4-upgrade-0.9.18-0.9.19.php" hash="1465c8ca5936d55028cbedc92f4611ad"/><file name="mysql4-upgrade-0.9.19-0.9.20.php" hash="e2eee984bef15830fb20ff1ce3305da7"/><file name="mysql4-upgrade-0.9.20-0.9.21.php" hash="bb84ad1111741ee18c099942c48043d1"/><file name="mysql4-upgrade-0.9.2-0.9.3.php" hash="0c37cf2c00a873bca3c6caea5ac070b3"/><file name="mysql4-upgrade-0.9.21-0.9.22.php" hash="bf927dde2181a1015830fc00bf05b092"/><file name="mysql4-upgrade-0.9.22-0.9.23.php" hash="a2659f70b2c73eeb1e6cd483d3dd9cc5"/><file name="mysql4-upgrade-0.9.23-0.9.24.php" hash="30d40247c45aeebcdca7602ac9c2d5c0"/><file name="mysql4-upgrade-0.9.24-0.9.25.php" hash="21db05a38f350d21fd87877388c09b40"/><file name="mysql4-upgrade-0.9.25-0.9.26.php" hash="004bce6f5c72a5b23333a845eec17439"/><file name="mysql4-upgrade-0.9.26-0.9.27.php" hash="845a503a66b530e0e217906a8eeaac77"/><file name="mysql4-upgrade-0.9.27-0.9.28.php" hash="a09d3916621f9045533c94b803593ca0"/><file name="mysql4-upgrade-0.9.28-0.9.29.php" hash="5fb2e735ef6b9ce799c2dcba209f16b7"/><file name="mysql4-upgrade-0.9.29-0.9.30.php" hash="9b286e17508e4846dd8de1162cad688d"/><file name="mysql4-upgrade-0.9.30-0.9.31.php" hash="f52304769317e715da824fabfb8c4d78"/><file name="mysql4-upgrade-0.9.3-0.9.4.php" hash="323ab2535384c3b3ff309e6c51485688"/><file name="mysql4-upgrade-0.9.31-0.9.32.php" hash="2f9a94b5603d828d4507f3ff9f5e2764"/><file name="mysql4-upgrade-0.9.32-0.9.33.php" hash="7e2117e44a7d1632fea2302016055b7b"/><file name="mysql4-upgrade-0.9.33-0.9.34.php" hash="78e35c53e6a5953c7c7bccbaa23fdbb7"/><file name="mysql4-upgrade-0.9.34-0.9.35.php" hash="120d02a930fb1e7a81d6866b3433ee24"/><file name="mysql4-upgrade-0.9.35-0.9.36.php" hash="5cd4071357986be36b28a9452ee90343"/><file name="mysql4-upgrade-0.9.36-0.9.37.php" hash="cb739343e58e69b65988d5389b5e99ef"/><file name="mysql4-upgrade-0.9.37-0.9.38.php" hash="d141a6245094bdd705473d18368070f5"/><file name="mysql4-upgrade-0.9.38-0.9.39.php" hash="3738cc7d46110210cf3a2d9e3a36a0a7"/><file name="mysql4-upgrade-0.9.39-0.9.40.php" hash="2d4b045a42666ec35734fef8f07c24ac"/><file name="mysql4-upgrade-0.9.40-0.9.41.php" hash="f4692aa7e894b48e205d2a51bb87abc2"/><file name="mysql4-upgrade-0.9.4-0.9.5.php" hash="9612aec0a082aaea1c71c4e5ad2bf297"/><file name="mysql4-upgrade-0.9.41-0.9.42.php" hash="12c15a8ddc10e167e61c46537b1193a3"/><file name="mysql4-upgrade-0.9.42-0.9.43.php" hash="55d333fb1aa66ce469320521f33624b8"/><file name="mysql4-upgrade-0.9.43-0.9.44.php" hash="afa60732bf868e2f441e6c2edfbf7b4b"/><file name="mysql4-upgrade-0.9.44-0.9.45.php" hash="ba15674857476bb15c51086912790a22"/><file name="mysql4-upgrade-0.9.45-0.9.46.php" hash="dccdb1bc407e413ee627abba93147acd"/><file name="mysql4-upgrade-0.9.46-0.9.47.php" hash="18c1ddb8f1beaac0a33f3fd48a0fcd10"/><file name="mysql4-upgrade-0.9.47-0.9.48.php" hash="20c8629f9f98f6a83e61490c62252c81"/><file name="mysql4-upgrade-0.9.48-0.9.49.php" hash="97baa6b0724357de2d9f525ef598b2ef"/><file name="mysql4-upgrade-0.9.49-0.9.50.php" hash="9559e5e5afd6e3b1f3a781a9fb723b59"/><file name="mysql4-upgrade-0.9.50-0.9.51.php" hash="2390a47e7d5f807425360e446c88f8b2"/><file name="mysql4-upgrade-0.9.5-0.9.6.php" hash="8791e9c2c594bd6005f3e83ff79da6ea"/><file name="mysql4-upgrade-0.9.51-0.9.52.php" hash="ab22ce4dcfae09a82c4ba4741b94b5fd"/><file name="mysql4-upgrade-0.9.52-0.9.53.php" hash="b438f2280db072a83ec96c6b70027313"/><file name="mysql4-upgrade-0.9.53-0.9.54.php" hash="d4add99e42c8433d5d139c973490a406"/><file name="mysql4-upgrade-0.9.54-0.9.55.php" hash="04eed526bd8dc639dba8d286b4f53e15"/><file name="mysql4-upgrade-0.9.55-0.9.56.php" hash="c6e5225b6a74faa96e3dee2e3ededd48"/><file name="mysql4-upgrade-0.9.6-0.9.7.php" hash="3b005e940d92ce2360a55ffe9ec25f2b"/><file name="mysql4-upgrade-0.9.7-0.9.8.php" hash="3a889d0bd51bb8d345bfb62f988168d0"/><file name="mysql4-upgrade-0.9.8-0.9.9.php" hash="c3a12268b0e90685fac4566fc43a85da"/><file name="mysql4-upgrade-0.9.9-0.9.10.php" hash="c83b56526b4bd24d5122be9de532be84"/><file name="mysql4-upgrade-1.3.99-1.4.0.0.php" hash="692255be7b28b3829ba37ab493fc575e"/><file name="mysql4-upgrade-1.4.0.0-1.4.0.1.php" hash="b2ac96298c9fc4e11d14b61ab54466a5"/><file name="mysql4-upgrade-1.4.0.1-1.4.0.2.php" hash="dcac057eeec4d9cb13b1d597686d9335"/><file name="mysql4-upgrade-1.4.0.15-1.4.0.16.php" hash="35d0ae339bcd0c741067bb9ae0ca89af"/><file name="mysql4-upgrade-1.4.0.16-1.4.0.17.php" hash="364143b23986f12a8bd40a62dce4524b"/><file name="mysql4-upgrade-1.4.0.17-1.4.0.18.php" hash="bc72bbd6c9ac93289431c8661938c1ac"/><file name="mysql4-upgrade-1.4.0.18-1.4.0.19.php" hash="796f4894e6a83b774ba37a66b54d50d2"/><file name="mysql4-upgrade-1.4.0.19-1.4.0.20.php" hash="b2f393e079c792b520c998355eb43997"/><file name="mysql4-upgrade-1.4.0.20-1.4.0.21.php" hash="4740fab098ae44794acd5994fa391cc9"/><file name="mysql4-upgrade-1.4.0.21-1.4.0.22.php" hash="b09db44659e37944cc55cd66b4f50dd2"/><file name="mysql4-upgrade-1.4.0.2-1.4.0.3.php" hash="48f1bb637e77ffd4a299bb8b38ee2276"/><file name="mysql4-upgrade-1.4.0.22-1.4.0.23.php" hash="4ec185d4510410034862bf69a87e1e7e"/><file name="mysql4-upgrade-1.4.0.23-1.4.0.24.php" hash="f70da1e0fcc9300cfa6c2bab30d560ea"/><file name="mysql4-upgrade-1.4.0.24-1.4.0.25.php" hash="153d4a3c81c8da5e021c149d6e90fcad"/><file name="mysql4-upgrade-1.4.0.3-1.4.0.4.php" hash="e431c07ca779465bd4a9e2d67628b62c"/><file name="mysql4-upgrade-1.4.0.4-1.4.0.5.php" hash="f7e976ddb517f17915f7b0f00bef0db5"/><file name="mysql4-upgrade-1.4.0.5-1.4.0.6.php" hash="bca5b279dda968d7394634438f68dae0"/><file name="mysql4-upgrade-1.4.0.6-1.4.0.7.php" hash="6253c6f6e8bb53e31d6a13af5f57fdd9"/><file name="mysql4-upgrade-1.4.0.7-1.4.0.8.php" hash="f091cf1bdb6685ca46eda523348a58b7"/><file name="mysql4-upgrade-1.4.0.8-1.4.0.15.php" hash="a26acb42f1df21b9a7c66de4697d1fec"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="710ccbd8fabe6bbffc37f1a63f9bf00e"/><file name="upgrade-1.6.0.0-1.6.0.1.php" hash="a8de44ceeaacebe522527f7c0779a7ae"/><file name="upgrade-1.6.0.1-1.6.0.2.php" hash="2aaa781b48b218c6a521a2a62c1bcba9"/><file name="upgrade-1.6.0.2-1.6.0.3.php" hash="2c4efa267e6e2cf90d7ab10f621e0d05"/><file name="upgrade-1.6.0.3-1.6.0.4.php" hash="024f5cb104f1b5de3f17d4b6189a1ea0"/><file name="upgrade-1.6.0.4-1.6.0.5.php" hash="94a5df5b1bfaf77748885076d0513925"/><file name="upgrade-1.6.0.5-1.6.0.6.php" hash="52d95387429b6dea5f8098125040b527"/><file name="upgrade-1.6.0.6-1.6.0.7.php" hash="c1a4e058656250b2221592d19a934aba"/><file name="upgrade-1.6.0.7-1.6.0.8.php" hash="5b04f0ba003e86309b59074c22495370"/></dir></dir></dir><dir name="SalesRule"><dir name="etc"><file name="adminhtml.xml" hash="ff93916bff1520bf5730e44bd16a90ca"/><file name="config.xml" hash="7afccbc8bcb0de4b276ec3c48e0f8f97"/><file name="system.xml" hash="ac643808a027d20a3cbc7316e5814e28"/></dir><file name="Exception.php" hash="a409d238cb2af66dc6f6b519ecec7cee"/><dir name="Helper"><file name="Coupon.php" hash="076661d433396d356704898fcede0ee4"/><file name="Data.php" hash="929a01bb7c298f09fade127f9a96a803"/></dir><dir name="Model"><dir name="Coupon"><file name="CodegeneratorInterface.php" hash="90dc22bd0d834fc6235c044c0d5a317a"/><file name="Codegenerator.php" hash="2a15fd1d5e15b8bdba3bd67c1ce00ab3"/><file name="Massgenerator.php" hash="54cf39978eddd79e90b52e8265ac93a1"/></dir><file name="Coupon.php" hash="ee82ad96128e2601efcdf6146032b503"/><dir name="Mysql4"><dir name="Coupon"><file name="Collection.php" hash="57e126d7c6a2456b20b51aa88054e862"/><file name="Usage.php" hash="9ce34d8783aaeaa4bd72ca46ba55424e"/></dir><file name="Coupon.php" hash="157c5b261db576e649fb00f4d11bc3b9"/><dir name="Report"><file name="Collection.php" hash="b28fc2de6f150ff180af2e358983f740"/><file name="Rule.php" hash="0965e501097c69da140a7852d9c5fa2d"/><dir name="Updatedat"><file name="Collection.php" hash="23a977b7151b30f28d3ddd778447c166"/></dir></dir><dir name="Rule"><file name="Collection.php" hash="757f49b5e7d79f2986cb6b93a53de2f3"/><dir name="Customer"><file name="Collection.php" hash="1361ad61dc0b5ffe5369596281916db8"/></dir><file name="Customer.php" hash="c7eccda260e18353414fc3154a7539e8"/><dir name="Product"><file name="Collection.php" hash="eb7d191db6ee5d456efaab94c29950e9"/></dir><file name="Product.php" hash="5a59acf4be1d2b4468aaece3d8ad2c09"/></dir><file name="Rule.php" hash="20ed1f0250038d66e1b96ea8195596f5"/></dir><file name="Observer.php" hash="dbb153ec2c913a163e7a236b4e2f8036"/><dir name="Quote"><file name="Discount.php" hash="b2089e266c907ca0ba51d6baee61619f"/><file name="Freeshipping.php" hash="1ebfc63207c3d27d79d5efa396de8f5a"/><dir name="Nominal"><file name="Discount.php" hash="b5e67125975bdcb9e53d641f6a0820c5"/></dir></dir><dir name="Resource"><dir name="Coupon"><file name="Collection.php" hash="6dda38b5688cb5ccac05ef7df8a6f753"/><file name="Usage.php" hash="08a551cba66f643e7de9404ad679e136"/></dir><file name="Coupon.php" hash="4c811df3792b33bf22bfd4c897357b4e"/><dir name="Report"><file name="Collection.php" hash="febe21862758025f362f4bdc2e6d4918"/><dir name="Rule"><file name="Createdat.php" hash="586dc29714e31865b29d9a0cac78948c"/><file name="Updatedat.php" hash="9bcb12ae4c44334f466be7372fd9c14a"/></dir><file name="Rule.php" hash="130d0727a98b3998c1d2ce76a38502d2"/><dir name="Updatedat"><file name="Collection.php" hash="e4edb856726c667985b7a0b7b6f1556b"/></dir></dir><dir name="Rule"><file name="Collection.php" hash="57368e21768358b34197092c2b3a3fcb"/><dir name="Customer"><file name="Collection.php" hash="9debd1d149568e48e83a2ed58578f495"/></dir><file name="Customer.php" hash="9d19d5a220bb2f10fe8c5462a3172c99"/><dir name="Product"><file name="Collection.php" hash="557ba4a92c17da54a7381ab69444c7c8"/></dir><file name="Product.php" hash="3ab0edcf3e175350f8b6bba179babd0c"/></dir><file name="Rule.php" hash="1c0980a1689c6299a8a52798501b1372"/></dir><dir name="Rule"><dir name="Action"><file name="Collection.php" hash="212889f3d946a8e798f471064d2046ce"/><file name="Product.php" hash="a72880d06ab690b3d4a007fce563a7af"/></dir><dir name="Condition"><file name="Address.php" hash="646b1c6a6ce277ab4af82456f87395be"/><file name="Combine.php" hash="ec8ab6d2df7e11f855b6fca7378d8a45"/><dir name="Product"><file name="Combine.php" hash="258d28cc4bdcfa9ad115969df0bb1bfe"/><file name="Found.php" hash="a67b3c470b855ce16ff98b638622df2a"/><file name="Subselect.php" hash="8eaecb6dfd5dfe9f95b3c137707eaf58"/></dir><file name="Product.php" hash="84cd47fc995d00a51d74eea5821cc39f"/></dir><file name="Customer.php" hash="209ae6365ca1d20b673b19185519e033"/><file name="Product.php" hash="198914e09b8478af575dc8705e9d90ba"/></dir><file name="Rule.php" hash="348c9fbed3ef437e1e4ed3e4614d10fd"/><dir name="System"><dir name="Config"><dir name="Source"><dir name="Coupon"><file name="Format.php" hash="7cb7aa6d341c2b927d6244d425bb0d69"/></dir></dir></dir></dir><file name="Validator.php" hash="744358396ec8fe1989ec7cf14bdd6737"/></dir><dir name="sql"><dir name="salesrule_setup"><file name="install-1.6.0.0.php" hash="698861afe0a373b8f559fb65477e8567"/><file name="mysql4-install-0.7.0.php" hash="4903cce758e16ff75dc7c12b590fcde9"/><file name="mysql4-install-1.4.0.0.0.php" hash="16684ede3995614979b75be2bf0d6025"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="75c35d8d93e22d212c0fe35d34f988a9"/><file name="mysql4-upgrade-0.7.10-0.7.11.php" hash="dcb292017db900eb638cff6ef613334d"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="1cc1a69ae2343c0121e60451bd00c2cf"/><file name="mysql4-upgrade-0.7.11-0.7.12.php" hash="bff6bfb3a8d0e6cbf4aac3c5d7d19771"/><file name="mysql4-upgrade-0.7.2-0.7.3.php" hash="3921056a40f3bba72eb8a3239849a4fb"/><file name="mysql4-upgrade-0.7.3-0.7.4.php" hash="8b3c2b7517393c38570b40ec2cf091c2"/><file name="mysql4-upgrade-0.7.4-0.7.5.php" hash="1b9bd67484b0ef6f2a91932c74c07cd5"/><file name="mysql4-upgrade-0.7.5-0.7.6.php" hash="ecf1285f37d3d66ff740b699488f6e79"/><file name="mysql4-upgrade-0.7.6-0.7.7.php" hash="f5a543fe35340290a07cbb57141b7e02"/><file name="mysql4-upgrade-0.7.7-0.7.8.php" hash="d5ec2cf90b1ebd178ed8ab2fc4b1edd9"/><file name="mysql4-upgrade-0.7.8-0.7.9.php" hash="60d53600cd2842b1e6037048e9ecae04"/><file name="mysql4-upgrade-0.7.9-0.7.10.php" hash="c0594b066de6cc9c581b49f6468b4843"/><file name="mysql4-upgrade-1.4.0.0.0-1.4.0.0.1.php" hash="b0903816ba4b446193d8a2710d52fa30"/><file name="mysql4-upgrade-1.4.0.0.1-1.4.0.0.2.php" hash="103484c82bc780497c17e8d30f6b5534"/><file name="mysql4-upgrade-1.4.0.0.2-1.4.0.0.3.php" hash="393edb2b3be82e7f75d4abd5f512aac6"/><file name="mysql4-upgrade-1.4.0.0.3-1.4.0.0.4.php" hash="11536328006166db5ecaed659691c654"/><file name="mysql4-upgrade-1.4.0.0.4-1.4.0.0.5.php" hash="f7da41eca333930247692a3a8df19546"/><file name="mysql4-upgrade-1.4.0.0.5-1.4.0.0.6.php" hash="a8aedcd0481b69c4a4743ca2dfd47af6"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="a75d6ca93798f42234bfdc5ce5c9e1ce"/><file name="upgrade-1.6.0.0-1.6.0.1.php" hash="ec2a8581cd420e4d323a82d3b4e20cd4"/><file name="upgrade-1.6.0.1-1.6.0.2.php" hash="39855fbe53640fe1f6e28cb114f76222"/><file name="upgrade-1.6.0.2-1.6.0.3.php" hash="9662353b312ad408f1ffd07dd51f4b27"/></dir></dir></dir><dir name="Sendfriend"><dir name="Block"><file name="Send.php" hash="e2b5745cc523434802ec2991b2904047"/></dir><dir name="controllers"><file name="ProductController.php" hash="bd3373fed47afe468a558b07e0364c12"/></dir><dir name="etc"><file name="config.xml" hash="f55b9e46645c7278dd1edea2af5f3779"/><file name="system.xml" hash="edbdee5e2ebe73438c90f9138c4ba09e"/></dir><dir name="Helper"><file name="Data.php" hash="4d3b820259b22472496bb9f73efe8e06"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Sendfriend"><file name="Collection.php" hash="fe3ced4f6b4aa4ab2fc2d641a1b44773"/></dir><file name="Sendfriend.php" hash="7195ec9a036a80ca6c5210751426c1d5"/><file name="Setup.php" hash="45cabaf79c4e62b778e0ad5d71363d78"/></dir><file name="Observer.php" hash="07e811348a56a9c655636b04146b947e"/><dir name="Resource"><dir name="Sendfriend"><file name="Collection.php" hash="8a01d00c6e572affda88b04df79f25b8"/></dir><file name="Sendfriend.php" hash="704694d2c2d5e2d994cc867d199f4b8b"/><file name="Setup.php" hash="383dcd85cc092214027e759fc33a0140"/></dir><file name="Sendfriend.php" hash="d5ed0964b697ca6bb3cecc9dd953c5ee"/></dir><dir name="sql"><dir name="sendfriend_setup"><file name="install-1.6.0.0.php" hash="53f2a780abfe4abf405f1e5c3b034e5a"/><file name="mysql4-install-0.7.0.php" hash="eb4c3df29d60bd4f6881421c4d7e37c2"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="80b037e0b717d97ad0d58b6a0ad0c98f"/><file name="mysql4-upgrade-0.7.2-0.7.3.php" hash="dc6ba7cabe9ba72dec8d0fb1a1cd4373"/><file name="mysql4-upgrade-0.7.3-0.7.4.php" hash="09c638f845ac7fbe8d586afe5c3d466b"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="37da2fcc56fd7a5146052c55effbb1a9"/></dir></dir></dir><dir name="Shipping"><dir name="Block"><dir name="Tracking"><file name="Ajax.php" hash="7686ab1d93520de9ebcaff5cda30791c"/><file name="Popup.php" hash="1e9babea1817ec28faa24657fb5d2f30"/></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><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="4b431236510b4c72c5d7e7a4c34d3afb"/><file name="Freeshipping.php" hash="b4b77452ce4fd8c6174db2a3653e93a2"/><file name="Interface.php" hash="5fddefab850ca206ab6476c3868ea4f2"/><file name="Pickup.php" hash="42feda041aea6740362ba0e586a8c302"/><file name="Tablerate.php" hash="c8cfde307eb50129bf6b4a643a4703d1"/></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="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 name="Sitemap"><dir name="etc"><file name="adminhtml.xml" hash="0b257eac32645ec0aa739f0c75968306"/><file name="config.xml" hash="7314bbdbc5c041c621b7958cd0eb77a9"/><file name="system.xml" hash="852e7ff6d07cacaa6463dedde3b1cf36"/></dir><dir name="Helper"><file name="Data.php" hash="3cb4143a8970445623e89092bebaf62e"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Catalog"><file name="Category.php" hash="231ebc544efc3416f80090d4c1e033a8"/><file name="Product.php" hash="999e159fc164c5a12bd74b884f0bf17b"/></dir><dir name="Cms"><file name="Page.php" hash="a9d114208f846b22df0ddb1c487f375b"/></dir><dir name="Sitemap"><file name="Collection.php" hash="ed5b1435e4062170105ea38e3a036a10"/></dir><file name="Sitemap.php" hash="ef8109d5a66414a7002373bd9b689c37"/></dir><file name="Observer.php" hash="8c6383fdd80a45d3b53a5e883b4a7fd5"/><dir name="Resource"><dir name="Catalog"><file name="Abstract.php" hash="8bf92d37248df8abcb2b41f4c290e541"/><file name="Category.php" hash="d6d051ede918ac943db1dd9ba09a8fb5"/><file name="Product.php" hash="653a11966b05802a2b76eb129d2f13e2"/></dir><dir name="Cms"><file name="Page.php" hash="a8f81fbefe527d2dbae688050cf75cee"/></dir><dir name="Sitemap"><file name="Collection.php" hash="7a3452d2dcf3a99e2347e535898a2d6a"/></dir><file name="Sitemap.php" hash="0fdfe75f60f1b4ba8c63fe15d9b95afe"/></dir><file name="Sitemap.php" hash="13d5fcecb49bae03df9693792f2b7b00"/></dir><dir name="sql"><dir name="sitemap_setup"><file name="install-1.6.0.0.php" hash="26c70b1a6af405d8345a308dd1788b3c"/><file name="mysql4-install-0.7.0.php" hash="e522cdb28dffa2468f53a30e52a250cc"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="d8b4671e0f309be995a1055d7848bcb9"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="1c7387e1ece649ca0e212dfbcd7b9290"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="7488b431eb50f2e4bfccadcc54941e8d"/></dir></dir></dir><dir name="Tag"><dir name="Block"><file name="All.php" hash="f33ead9ba0be3378feca5ba2c45059c9"/><dir name="Customer"><file name="Edit.php" hash="4ff989c4d46e866b3e522d54c01585b9"/><file name="Recent.php" hash="d6716a5fef4bb7aaefbf06ba8d26f872"/><file name="Tags.php" hash="95a2b1b7262cc8d2f95953c4ce8f4dc1"/><file name="View.php" hash="fa81ccff0aa437fae3400c257a3308b1"/></dir><file name="Popular.php" hash="0b057f325c6a1bc718d5c0ae6597d13b"/><dir name="Product"><file name="List.php" hash="998a74679d6fe5a7826777217c742344"/><file name="Result.php" hash="f2b02d37961335f779d21b43a0a8f6ff"/></dir></dir><dir name="controllers"><file name="CustomerController.php" hash="2b67cd860ff2023c70dae1a246ddace6"/><file name="IndexController.php" hash="4afe6ed35e16fc731d1144f2b787fe22"/><file name="ListController.php" hash="1142edb0164afcd7bfc39b3a1b07e8a9"/><file name="ProductController.php" hash="8d52a2fec606ab6dffe95abbdfb11d7d"/></dir><dir name="etc"><file name="adminhtml.xml" hash="7b407009828fe746ce57fd053b23b4ef"/><file name="api.xml" hash="e3a788fccb3b6c4db90457140a62cf68"/><file name="config.xml" hash="af266bf923b72f4a54ed1546e8a8cb32"/><file name="wsdl.xml" hash="e87343a710e0068dcc555ffc4b302a9b"/><file name="wsi.xml" hash="1d31787826a686590acf89ec2703b76e"/></dir><dir name="Helper"><file name="Data.php" hash="5cbc150b4cdec0c79ead34315ebaa285"/></dir><dir name="Model"><dir name="Api"><file name="V2.php" hash="f41142bd15cdf9d44e85af461cc2f93f"/></dir><file name="Api.php" hash="4e090a284dbebc7930a37e25ae74bd64"/><dir name="Entity"><dir name="Customer"><file name="Collection.php" hash="81aa0e6fe3c8e0a4c6e8b0739039bf8b"/></dir></dir><dir name="Indexer"><file name="Summary.php" hash="5d69f3ddd7b02f539031f6fd67209a46"/></dir><dir name="Mysql4"><dir name="Customer"><file name="Collection.php" hash="f01056bb8f3e3bbd7060d9d9729a274c"/></dir><dir name="Indexer"><file name="Summary.php" hash="a4c3918c38387d74c6ce04595811bc86"/></dir><dir name="Popular"><file name="Collection.php" hash="5231542fd8151d8181205a987d432376"/></dir><dir name="Product"><file name="Collection.php" hash="a01f4a872ede6b62dc3b8073161d664c"/></dir><dir name="Tag"><file name="Collection.php" hash="597b7b6ce09f9f3a6c702c9fcbd4b363"/><file name="Relation.php" hash="17a1f589cc3a9990ee898a1859a18059"/></dir><file name="Tag.php" hash="ef09e44a9a2c07510b896f45a7527d5c"/></dir><dir name="Resource"><dir name="Customer"><file name="Collection.php" hash="39f02126954abe5cef731d150cf95769"/></dir><dir name="Indexer"><file name="Summary.php" hash="da48f028113cea6ef75f2992f511e4a4"/></dir><dir name="Popular"><file name="Collection.php" hash="329debd9a048dffffd38fb9616896f2e"/></dir><dir name="Product"><file name="Collection.php" hash="52aa2f941e573670554787b1ccf63f8f"/></dir><dir name="Tag"><file name="Collection.php" hash="830c306564420664a6cb3882a05fd558"/><file name="Relation.php" hash="f02afc2e7ad327a0c6036a50a8aef05c"/></dir><file name="Tag.php" hash="79ea73ad81374d5c644d71b1cf0249bc"/></dir><file name="Session.php" hash="fa30f7e00923092a61a8852070bf13b0"/><dir name="Tag"><file name="Relation.php" hash="2fa7d3a3639e4d0cc2625a7e6de97fa8"/></dir><file name="Tag.php" hash="3d6fe943d6fe4c5b27873f7c33b3bee2"/></dir><dir name="sql"><dir name="tag_setup"><file name="install-1.6.0.0.php" hash="a3bdc9923b026d832549dde7e02acae9"/><file name="mysql4-install-0.7.0.php" hash="7e9a4937f7f6d2777a2314d5c96a2402"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="f599b838e287953bd0640f006a4ea6fc"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="d9e16e8dcaf4a7cde3d321b752652c37"/><file name="mysql4-upgrade-0.7.2-0.7.3.php" hash="f6bd1ecde00bbd5708542fd4534475b2"/><file name="mysql4-upgrade-0.7.3-0.7.4.php" hash="766c6f284749f670daa3d2539bab29f7"/><file name="mysql4-upgrade-0.7.4-0.7.5.php" hash="fbbadfb2c7b7c3966a7d706ffebb5e5e"/><file name="mysql4-upgrade-0.7.5-0.7.6.php" hash="690ce463262f5c8b9c715562e6aa156c"/><file name="mysql4-upgrade-0.7.6-0.7.7.php" hash="0e018d2285990d35ecfe60c285ab86c7"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="81a7f78ab5d033b149a805b7539b9bf5"/></dir></dir></dir><dir name="Tax"><dir name="Block"><dir name="Adminhtml"><dir name="Frontend"><dir name="Region"><file name="Updater.php" hash="4a12ba8b7ac01061a61fad0d419fc935"/></dir></dir><file name="Notifications.php" hash="2957501473984d69da90ed00fea6e0c2"/></dir><dir name="Checkout"><file name="Discount.php" hash="e2269b837c9cb60b025d9770b52728b7"/><file name="Grandtotal.php" hash="a64ec9510b1d0b14682176fd85f85e3e"/><file name="Shipping.php" hash="ebcdcb12d38c53c150013e7a24dc3358"/><file name="Subtotal.php" hash="f600b189f8dc13c3915a87dc9a06cb7e"/><file name="Tax.php" hash="f8c85b475192aec3177891902b4a199f"/></dir><dir name="Sales"><dir name="Order"><file name="Tax.php" hash="109ad96d92a06e6b91c30278c95a0c69"/></dir></dir></dir><dir name="data"><dir name="tax_setup"><file name="data-install-1.6.0.0.php" hash="5057b3bfc095c1b69c8bb2ad8094272d"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="47244086a2c28390bbc49699590716e6"/><file name="config.xml" hash="2fa7538cf8805d9cd8e1f79ec2a05e48"/><file name="system.xml" hash="2f6dd5b5eb33af90b8576db7e07cc1f9"/></dir><file name="Exception.php" hash="514f96cf9fa5869e6ac150de54780758"/><dir name="Helper"><file name="Data.php" hash="c6aa314b3631f636460cdc66999d07eb"/></dir><dir name="Model"><dir name="Calculation"><dir name="Rate"><file name="Title.php" hash="33c1dee6bee5ded5fa6939db074684fb"/></dir><file name="Rate.php" hash="748c838f792539116a5d6e894cb07342"/><file name="Rule.php" hash="acb788d83f93893d023aedb9dab3a43c"/></dir><file name="Calculation.php" hash="dc021e22834a421fdaec9081d6cb2064"/><dir name="Class"><dir name="Source"><file name="Customer.php" hash="3ba36de54b7807c5b0f9ea767dbef870"/><file name="Product.php" hash="6186209f503da12bc419ea57cc3da888"/></dir></dir><file name="Class.php" hash="2c261ac2c1277fa16aa47fa6acf99678"/><dir name="Config"><file name="Notification.php" hash="df646d22401890c00055d4236f18e64e"/><dir name="Price"><file name="Include.php" hash="f1db83dc30d6b55b62f153208dc06c30"/></dir></dir><file name="Config.php" hash="bb312fd84616fee3dbeab82686e4b1fd"/><dir name="Mysql4"><dir name="Calculation"><file name="Collection.php" hash="726abf19554993c4418010f6f107f5ee"/><dir name="Rate"><file name="Collection.php" hash="76c6f3d66c0f5c5c8d2351bf4eb30286"/><dir name="Title"><file name="Collection.php" hash="5a3260596000a96e9d4bcb93e86503f3"/></dir><file name="Title.php" hash="133b6e3e7a1a301adb89af8f9f8c7fb9"/></dir><file name="Rate.php" hash="196ea7649a5435ff1264ec2540ab8ce8"/><dir name="Rule"><file name="Collection.php" hash="b8bc72ff6e19558181b1b77b21557f95"/></dir><file name="Rule.php" hash="4bd85d0313d4de14a5cf9306aedf550f"/></dir><file name="Calculation.php" hash="a72ad404e8725e835d6397597b8bb456"/><dir name="Class"><file name="Collection.php" hash="a8dcdfd45b29341877045ce28a6bc064"/></dir><file name="Class.php" hash="c60feb072ddc76ef7b1d32e17e530c09"/><dir name="Report"><file name="Collection.php" hash="8d3123f585d5132b76a0906acc86e4be"/><file name="Tax.php" hash="feda87174168b78fadbd0ad30155709b"/><dir name="Updatedat"><file name="Collection.php" hash="f718e5d8b8f4d14a310fd815ab309775"/></dir></dir><dir name="Sales"><dir name="Order"><dir name="Tax"><file name="Collection.php" hash="ee89d1eb1d80af25c4ed7a3ba71db245"/></dir><file name="Tax.php" hash="4f44cb2e8e4ba37cff97a6f84da9f19a"/></dir></dir><file name="Setup.php" hash="bbb4503f460eae53870e47012ee4e3d2"/></dir><file name="Observer.php" hash="94a6724e7ecb19988127d345c14a2635"/><dir name="Resource"><dir name="Calculation"><file name="Collection.php" hash="3488ae3a3b038379ae414fe47ab49008"/><dir name="Rate"><file name="Collection.php" hash="9786ea3b0b3d29bd58a4c63ada201eb4"/><dir name="Title"><file name="Collection.php" hash="8074eb6c2b8ff1430947fa0e1fab1338"/></dir><file name="Title.php" hash="3aedf9f4e6c02fd5b05c7b489588d53c"/></dir><file name="Rate.php" hash="27828f35658e1b229529f612a4cfc8e0"/><dir name="Rule"><file name="Collection.php" hash="a6a4b44fd4ce40118504c36ac422b00b"/></dir><file name="Rule.php" hash="1707a81fa27eb4345f31df3c5612abb9"/></dir><file name="Calculation.php" hash="224f3cdcb92d6dc4fd307626b7bf9c3d"/><dir name="Class"><file name="Collection.php" hash="6e4766b9462fde5c027d6951a85ea4a3"/></dir><file name="Class.php" hash="eb17406180d7c5caf26db4cb2e4a865d"/><dir name="Report"><file name="Collection.php" hash="6025dd20763c2f0dfb4b03fdbb6cbb0c"/><dir name="Tax"><file name="Createdat.php" hash="56ee659df4d6daa7a52935e3ed547e3f"/><file name="Updatedat.php" hash="310dca9a5c6cc3aad79b297bf551f434"/></dir><file name="Tax.php" hash="09778fabba158b5ebaf65a1961db9979"/><dir name="Updatedat"><file name="Collection.php" hash="56ef9467fe5c901b80419ae74f46e906"/></dir></dir><dir name="Sales"><dir name="Order"><dir name="Tax"><file name="Collection.php" hash="266d4c71fd3d509ff6de63b8e0c76b29"/><dir name="Item"><file name="Collection.php" hash="d7acfafd84f1b67ae13d318df9380a7b"/></dir><file name="Item.php" hash="6bf3beb3cfbc73e7a70e59c2cab150e2"/></dir><file name="Tax.php" hash="556d3a47e3600bd3a037e74f8b5217c7"/></dir></dir><file name="Setup.php" hash="dea9eb05203beaf15e1f56882e37908d"/></dir><dir name="Sales"><dir name="Order"><dir name="Tax"><file name="Item.php" hash="d4e1eda4a6f04e9770cfec6f69a0628c"/></dir><file name="Tax.php" hash="d5e907e598a149b8cc9ee2de81113334"/></dir><dir name="Pdf"><file name="Grandtotal.php" hash="901c80ad2eace96851bf1b1035f9b6b2"/><file name="Shipping.php" hash="bdd77301e3e4fa946332eb559f5d2b2d"/><file name="Subtotal.php" hash="50d7049c5606167dad5de300721c3e21"/><file name="Tax.php" hash="034069ce124fec2c2750925cfc1e9bb2"/></dir><dir name="Total"><dir name="Quote"><file name="Discount.php" hash="b4eb6edd384889a13025e56b39f0e386"/><dir name="Nominal"><file name="Subtotal.php" hash="45b5fa458cb8c663161bddcc73038678"/><file name="Tax.php" hash="f582b148d1437a54616edc872236a40b"/></dir><file name="Shipping.php" hash="6d90558d9128ec49924cef72ba4da234"/><file name="Subtotal.php" hash="e6c47786d8da475d5fd10cb3f0a64672"/><file name="Tax.php" hash="f93274dc238f3edd352507743e883b2a"/></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Source"><file name="Algorithm.php" hash="6d60cb74ca6952a1e75a65f55226b50e"/><file name="Apply.php" hash="2699fbe85e46e56e6e72269360fae9d1"/><file name="PriceType.php" hash="bd6be14b14289d911b09ecbe87199736"/><dir name="Tax"><file name="Country.php" hash="553692c48e14a430acad401bbdf954a6"/><dir name="Display"><file name="Type.php" hash="4eb61d5b320c2a84c0a45c0a12f32090"/></dir><file name="Region.php" hash="e2ca1b139bfcb51f052b65c295dd330f"/></dir></dir></dir></dir></dir><dir name="sql"><dir name="tax_setup"><file name="install-1.6.0.0.php" hash="eaa73936a798d30c979d453497e85369"/><file name="mysql4-install-0.7.0.php" hash="68f057d9696cf8974b01940f1cb95a8a"/><file name="mysql4-install-1.4.0.0.php" hash="357b2d3a3a7768512fc346ee777dc711"/><file name="mysql4-upgrade-0.6.1-0.7.0.php" hash="16b906e86bcc49de1dbe928f9f0c92a0"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="bef0cd4b44be8b547f2a95683801c1cf"/><file name="mysql4-upgrade-0.7.10-0.7.11.php" hash="3a5412eccf0f965d3e31194333b0ef9d"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="5cf0706979dfb6b2526c3f3931bb1569"/><file name="mysql4-upgrade-0.7.11-0.7.12.php" hash="e5f4768e8cabd4444aac41ac270139e2"/><file name="mysql4-upgrade-0.7.12-0.7.13.php" hash="3989f52a15a13cc4c0a14fa5c199f33d"/><file name="mysql4-upgrade-0.7.2-0.7.3.php" hash="09b521d44ed38a52cef4cc62e96f9c10"/><file name="mysql4-upgrade-0.7.3-0.7.4.php" hash="325d8de6f216f6d40377475659ca613b"/><file name="mysql4-upgrade-0.7.4-0.7.5.php" hash="4bae925a7396d3234145380e014a3766"/><file name="mysql4-upgrade-0.7.5-0.7.6.php" hash="a7eb0ebd38272b90ea6757ab9d01a060"/><file name="mysql4-upgrade-0.7.6-0.7.7.php" hash="005fdfafee45ce428a85a898cade8ebc"/><file name="mysql4-upgrade-0.7.7-0.7.8.php" hash="c209b767cc1d9803dd829546bafe0d70"/><file name="mysql4-upgrade-0.7.8-0.7.9.php" hash="cda1fd6a5e15274be819063cabee0084"/><file name="mysql4-upgrade-0.7.9-0.7.10.php" hash="7d6bfc9a05989b4b00967fc12c4c5434"/><file name="mysql4-upgrade-1.3.9-1.4.0.php" hash="f0679dff106261a60be0a284092a342d"/><file name="mysql4-upgrade-1.4.0.0-1.4.0.1.php" hash="f88561131551cff672d54416a0b3bf23"/><file name="mysql4-upgrade-1.4.0.1-1.4.0.2.php" hash="d1d519f08335b7f03736abd1effc0074"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="1c2636b79996f3f68c4fc58885ba130d"/><file name="upgrade-1.6.0.0-1.6.0.1.php" hash="43378fdde9b0b6af8f4f745016d88b64"/><file name="upgrade-1.6.0.1-1.6.0.2.php" hash="928b56a977e6061304b088d9933a88f2"/><file name="upgrade-1.6.0.2-1.6.0.3.php" hash="92c7340cba1444cde4bd99339767c77e"/><file name="upgrade-1.6.0.3-1.6.0.4.php" hash="1796e8585227c8212fb3430f18580baf"/></dir></dir></dir><dir name="Usa"><dir name="Block"><dir name="Adminhtml"><dir name="Dhl"><file name="Unitofmeasure.php" hash="752f96abcd38663b42b3a96501a2ba2b"/></dir></dir></dir><dir name="etc"><file name="config.xml" hash="573a0e9f45a58652c63ed564d8e97001"/><dir name="dhl"><dir name="international"><file name="countries.xml" hash="6484c011b94782626b3c800cde80e08f"/></dir></dir><file name="system.xml" hash="ace85f38c22f6bad2e07a58ee0b75ae4"/><dir name="wsdl"><dir name="FedEx"><file name="RateService_v10.wsdl" hash="352ed0cd739b31d42d206aba31bf4c31"/><file name="RateService_v9.wsdl" hash="5e698519a3b3ae3dcea2105545053763"/><file name="ShipService_v10.wsdl" hash="4e661e70491a1af695c27878610054e2"/><file name="ShipService_v9.wsdl" hash="9c3779aa87540dcae41b43b16b724df6"/><file name="TrackService_v5.wsdl" hash="89cc7077a8fc439446e70bac0ca0f0c1"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="12c5f5321b0013b80711561889464a17"/></dir><dir name="Model"><dir name="Shipping"><dir name="Carrier"><dir name="Abstract"><dir name="Source"><file name="Mode.php" hash="472cd4ed3dc1d8d66a4dbfeef55daaf4"/><file name="Requesttype.php" hash="1b37e0e5e75f800a22f369835ab439d8"/></dir></dir><file name="Abstract.php" hash="18acb6094fd01cfc3ec0516c688f188b"/><dir name="Dhl"><file name="Abstract.php" hash="27371027a2742e766bf4fe8c90e69989"/><dir name="International"><dir name="Source"><file name="Contenttype.php" hash="3f7ad79befb8d024621e88c44ff8fb4d"/><dir name="Method"><file name="Abstract.php" hash="812e1d8b6b721df3b2a5dcfde8c7a89a"/><file name="Doc.php" hash="2b226de0a5b4e980c7b7750e9a78aa91"/><file name="Freedoc.php" hash="a376828347ac478a54759234136fcf84"/><file name="Freenondoc.php" hash="20dd4095117152331aeffc3bd48ca98b"/><file name="Nondoc.php" hash="91cfd46975865daa2d5bad45eee6f0d7"/><file name="Size.php" hash="80efb82d49efcc80f4b95b19d0a872c0"/><file name="Unitofmeasure.php" hash="db516ec818cb62d09e7318e39cc419fe"/></dir></dir></dir><file name="International.php" hash="f742aa1c1227d248b19721427301aea4"/><dir name="Label"><dir name="Pdf"><file name="PageBuilder.php" hash="a1244a674c1f94bd8de4743dabf9df73"/><file name="Page.php" hash="26f5838bd5228dcff780decfcbaac8be"/></dir><file name="Pdf.php" hash="b3b92e30c6d116d7e11b624eeb4ff4a9"/></dir><dir name="Source"><file name="Dutypaymenttype.php" hash="4e2347366fc7a56eab9431e833197965"/><file name="Freemethod.php" hash="124f1cedf2211ea5be52179af407f427"/><file name="Method.php" hash="b4df2a5f2a7dd02f76bd8288c2dc3461"/><dir name="Protection"><file name="Rounding.php" hash="fab61796ae4becd1993ff1b514ff1ad2"/><file name="Value.php" hash="9747af15bc8ec86e758bdd8c983bd2dd"/></dir><file name="Shipmenttype.php" hash="0755f6c96748971df9d71407cd137bce"/></dir></dir><file name="Dhl.php" hash="3cff7e5e442b36f568abaff65e39bffb"/><dir name="Fedex"><dir name="Source"><file name="Dropoff.php" hash="ab1c1c54e22ed3f1c628cd2f34b50ea8"/><file name="Freemethod.php" hash="c9a73008682a1fee2701c63b221bb69f"/><file name="Method.php" hash="0f18a8b2ba195025973b695e8e026b72"/><file name="Packaging.php" hash="44ce1e140635d3ca9015d1fa69d32d1e"/><file name="Unitofmeasure.php" hash="98c7e7fa7fd6ec3a2f544324e7d04ff0"/></dir></dir><file name="Fedex.php" hash="58202bbec88ed2c1ef9a82e50ad0146a"/><dir name="Ups"><dir name="Source"><file name="Container.php" hash="087f0db941cb4d19ae7b68c12a7d33dd"/><file name="DestType.php" hash="b6894a44aed5b1bc738ae81269e930df"/><file name="Freemethod.php" hash="383d4fd7846c8e46f37df02a1a439e95"/><file name="Method.php" hash="85457353bf212965d57cb0fd21d527d3"/><file name="Mode.php" hash="824705212c40c38baa5d658cc5c496e4"/><file name="OriginShipment.php" hash="4047959177d1acb5abb8b60c13e1f786"/><file name="Pickup.php" hash="b1d14e211793157da597e87645868482"/><file name="Type.php" hash="be4e7749dd24008f22fe3926935fca21"/><file name="Unitofmeasure.php" hash="35c81117ae194b5851e9986a7aa6beeb"/></dir></dir><file name="Ups.php" hash="c1c176c696cfec97078c1fe7a6762272"/><dir name="Usps"><dir name="Source"><file name="Container.php" hash="7cacfc4771b6c5ead3952d56e13a50a7"/><file name="Freemethod.php" hash="80540774e75d1683952abd90d9d6c093"/><file name="Machinable.php" hash="a19b792aea3512bcdd41ad0c9cde6f37"/><file name="Method.php" hash="8712ae4ed7175b175ed52cef0a2cb50d"/><file name="Size.php" hash="a844ea645e9101a747383c4c7771705e"/></dir></dir><file name="Usps.php" hash="5fdc7092e678323f08057715b60bdb3a"/></dir></dir></dir><dir name="sql"><dir name="usa_setup"><file name="install-1.6.0.0.php" hash="d91d7e704c03fb17e4866a05622402e3"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="ac3205a9499f3aa732abcdd3f109a396"/><file name="upgrade-1.6.0.0-1.6.0.1.php" hash="c63ce436e8020a82d70a2a994ff161f0"/><file name="upgrade-1.6.0.1-1.6.0.2.php" hash="1f9b8ab5d153db1701a85cf10bd77137"/><file name="upgrade-1.6.0.2-1.6.0.3.php" hash="e5fea22f9747bf1a5c15dca35dab82a1"/></dir></dir></dir><dir name="Weee"><dir name="Block"><dir name="Element"><dir name="Weee"><file name="Tax.php" hash="db7122f75f83f6dd0cb37430f589ffb0"/></dir></dir><dir name="Renderer"><dir name="Weee"><file name="Tax.php" hash="a0fe85d4ccbd5493d63f786ddd953f87"/></dir></dir></dir><dir name="etc"><file name="config.xml" hash="6a99c2cdf718e202c28259adb16dc1d4"/><file name="system.xml" hash="58beb3dc2f47eb3e561cb9845b8dc245"/></dir><dir name="Helper"><file name="Data.php" hash="5607df816e29c55037a8fa5d85fbecac"/></dir><dir name="Model"><dir name="Attribute"><dir name="Backend"><dir name="Weee"><file name="Tax.php" hash="851508e6b1e10d366bf400877eb9af72"/></dir></dir></dir><dir name="Config"><dir name="Source"><file name="Display.php" hash="2c46bd17d9c834277617f5c4bb77e315"/></dir></dir><dir name="Mysql4"><dir name="Attribute"><dir name="Backend"><dir name="Weee"><file name="Tax.php" hash="3482fe4959a46dc1f87ebeb6200e1597"/></dir></dir></dir><file name="Setup.php" hash="aa82b716a786d9edc9539a7370247e59"/><file name="Tax.php" hash="b71e3ccccac4c049f3b66839158eb542"/></dir><file name="Observer.php" hash="0fd1a48ef2030ca0c5877357888021dc"/><dir name="Resource"><dir name="Attribute"><dir name="Backend"><dir name="Weee"><file name="Tax.php" hash="ab1b6f6100043b1d862257f28ba552d4"/></dir></dir></dir><file name="Setup.php" hash="bcd8dabf827d5dfe5ef0a51bcf499196"/><file name="Tax.php" hash="79acfa84ae3c44bc21095ef15cfd64a7"/></dir><file name="Tax.php" hash="c94141ed7f2ea989af1713ec3c58e7c1"/><dir name="Total"><dir name="Creditmemo"><file name="Weee.php" hash="eeba7624865af7f87d83d7de75b617a8"/></dir><dir name="Invoice"><file name="Weee.php" hash="0fa3da5c665fa31cb62e7b1e2147203e"/></dir><dir name="Quote"><dir name="Nominal"><file name="Weee.php" hash="fdba77c1529c8e8080932f6406cfd882"/></dir><file name="Weee.php" hash="15b531981457b8d768a31e2faa69d4fd"/></dir></dir></dir><dir name="sql"><dir name="weee_setup"><file name="install-1.6.0.0.php" hash="2fdb0cf303eec08f3cea0a4f6e94058b"/><file name="mysql4-install-0.1.php" hash="a0c573127f503981a597860fa5d5b68e"/><file name="mysql4-upgrade-0.10-0.11.php" hash="b0afbe121cf2ee69c70c2bb7a489db04"/><file name="mysql4-upgrade-0.1-0.2.php" hash="e7587be0ebf25f5ae5adbff12016f96e"/><file name="mysql4-upgrade-0.11-0.12.php" hash="545192ea5b24babe515b386b1e69584e"/><file name="mysql4-upgrade-0.12-0.13.php" hash="4dab305bbcd48e7611ef3914c8081fc3"/><file name="mysql4-upgrade-0.2-0.3.php" hash="f6e47d491b4468126e122f32e7016082"/><file name="mysql4-upgrade-0.3-0.4.php" hash="fa6e945a1801bdd2b8f7a40042d2e05d"/><file name="mysql4-upgrade-0.4-0.5.php" hash="99db48035f8fb206faba7808f1c9d1f2"/><file name="mysql4-upgrade-0.5-0.6.php" hash="0127e90d5934f825ec288cc8a7198da6"/><file name="mysql4-upgrade-0.6-0.7.php" hash="630199a25c1878f195493cbc444cba73"/><file name="mysql4-upgrade-0.7-0.8.php" hash="601fea24f808197366a9aac8761e4e5e"/><file name="mysql4-upgrade-0.8-0.9.php" hash="843d5ba27ca049c87c4eeac26a7e702d"/><file name="mysql4-upgrade-0.9-0.10.php" hash="450a11912e22a40a75d42f9ae8d1c18f"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="f090a2771a16657c2f52e2865abf8e93"/></dir></dir></dir><dir name="Widget"><dir name="Block"><dir name="Adminhtml"><dir name="Widget"><file name="Chooser.php" hash="849f52c01b73f1afd5f2f6299ccdadb3"/><file name="Form.php" hash="c70d938936d3e20f2df926849b41f077"/><dir name="Instance"><dir name="Edit"><dir name="Chooser"><file name="Block.php" hash="6e882eeb70bf2666e7de1a85caae1540"/><file name="Layout.php" hash="8dbb96175c541c00b498a547646f9014"/><file name="Template.php" hash="11cabd6f60abb168eeb6d3e010082e1e"/></dir><file name="Form.php" hash="bd93a6a67d2ca2caa3ec1428cc30ea6a"/><dir name="Tab"><dir name="Main"><file name="Layout.php" hash="cbc7730e6b53d90b9537569516bb1293"/></dir><file name="Main.php" hash="cf71d8445a6afc25faddb2256f780faf"/><file name="Properties.php" hash="4ae6932bd7dcb2c138712ef073cb1855"/><file name="Settings.php" hash="d587a9f4b17a882b7a1ad986dae204ee"/></dir><file name="Tabs.php" hash="7eb79b3e488d9837ea566fc3b1675401"/></dir><file name="Edit.php" hash="ed3f817c2653d2175e1974793b9288de"/><file name="Grid.php" hash="541bca12411fe919406d9ba63f886e7f"/></dir><file name="Instance.php" hash="78976bbf334a216dd6a3566a11ce3453"/><file name="Options.php" hash="3455c9a46b721414e1a543519f0c6a8f"/></dir><file name="Widget.php" hash="c64ffd1bf7f5b058dbf5d38099a8adcc"/></dir><file name="Interface.php" hash="9d8d9073052ec74cb3bcc90107053e33"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Widget"><file name="InstanceController.php" hash="ec52101ba2794ec939ce2488c995671b"/></dir><file name="WidgetController.php" hash="b0a799cdc44d2222a1b0fa80a6a3a15e"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="1b3766c87ed6fcd069c7883911839fe6"/><file name="config.xml" hash="fbf1db11668b549a94a89021a59f6117"/><file name="jstranslator.xml" hash="ece3f5e5e5c36902856a515304974a7f"/></dir><dir name="Helper"><file name="Data.php" hash="c356063f6d4b8d757544ddf267864853"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Widget"><dir name="Instance"><file name="Collection.php" hash="b29eb3e61fe4b2e46a319cc4aaf52f63"/></dir><file name="Instance.php" hash="5f9cfdac932704c3b0e6620ed6c44c7c"/></dir><file name="Widget.php" hash="76ca79096cc5ba66b5b90d0eee952261"/></dir><file name="Observer.php" hash="90858fbf4f82eacd258d1e36d8c9978b"/><dir name="Resource"><dir name="Widget"><dir name="Instance"><file name="Collection.php" hash="b15ad5ea41d073177aaac31b5630ecc4"/></dir><file name="Instance.php" hash="9a5cc69a61aff1709b5a1459a1c8bbc9"/></dir><file name="Widget.php" hash="43ab7cf7cf49f5a1bc0cd406e179cc37"/></dir><dir name="Template"><file name="Filter.php" hash="c2c3ddb7cb0c04bac83e77d75a22a9e3"/></dir><dir name="Widget"><file name="Config.php" hash="ce7da83573303308c56a9b775333307c"/><file name="Instance.php" hash="256a5e3f49c93858989b87f2d5f58a1d"/></dir><file name="Widget.php" hash="e6ae673d64e789e477c441770f3b4bdc"/></dir><dir name="sql"><dir name="widget_setup"><file name="install-1.6.0.0.php" hash="c58c238e776a67bab75f7e83a22a727c"/><file name="mysql4-install-1.4.0.0.0.php" hash="a0207b5fb894c7e923c7e1a13db6f13a"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="ae44d84762c86b96e80ec6e0350f893b"/></dir></dir></dir><dir name="Wishlist"><dir name="Block"><file name="Abstract.php" hash="70c0735c4f31ec3366851fdeb0b3d073"/><dir name="Customer"><file name="Sharing.php" hash="da391df5a73513523ca9ec6b06a86cb5"/><file name="Sidebar.php" hash="b42b42895ba4c34b259127df54489569"/><dir name="Wishlist"><file name="Button.php" hash="75fc65c987712a060a12e49449a83297"/><dir name="Item"><dir name="Column"><file name="Cart.php" hash="0a9a9dac808bc2fbf7b5721bef932d9a"/><file name="Comment.php" hash="8e13982d95fc82887089455999e322ec"/><file name="Image.php" hash="7d6cf74117d443b50e70398a500a7e96"/><file name="Remove.php" hash="2069c40f50887d801ea00542f918e073"/></dir><file name="Column.php" hash="2e9872680803a72bc67bf2260b3e5d67"/><file name="Options.php" hash="813ca3f92b76d9a897286ffd4fc59aef"/></dir><file name="Items.php" hash="ac432c88974949b32d71c2a2c1840e3c"/></dir><file name="Wishlist.php" hash="fb069b79e654b805f62c7c642e0e849e"/></dir><dir name="Item"><file name="Configure.php" hash="59743c0acb6dd996e7416d8cc3f5cc3c"/></dir><file name="Links.php" hash="2d3871055dd203ee01ceacf1482134f9"/><dir name="Render"><dir name="Item"><file name="Price.php" hash="fd102f24e73e54944275bd4d342624a3"/></dir></dir><dir name="Share"><dir name="Email"><file name="Items.php" hash="8566f7afde0aa047b8a7d30eb19347a4"/><file name="Rss.php" hash="36cb3df625529085d996a6b404c89b8d"/></dir><file name="Wishlist.php" hash="fe7cd5c69ec53082c4b46e253072324f"/></dir></dir><dir name="Controller"><file name="Abstract.php" hash="36904b669e9a66de69c9f5fa535e8d9c"/></dir><dir name="controllers"><file name="IndexController.php" hash="1086f91ebf568f590286bed2bb85a73a"/><file name="SharedController.php" hash="0775980b203a97f4b5991bae6b18d006"/></dir><dir name="etc"><file name="adminhtml.xml" hash="df16ea9169039cc0d8f5b2ade33f11c7"/><file name="config.xml" hash="de47a39f7d0b5f185c903c1ffd6d1cfb"/><file name="system.xml" hash="f0f962b7cf616f3e0657c5eaf3026874"/></dir><dir name="Helper"><file name="Data.php" hash="209bd9e195bbc6e6dd780d2bdd9b5ebf"/></dir><dir name="Model"><dir name="Config"><dir name="Source"><file name="Summary.php" hash="5b837c0de3e524ddf8db7a62ddbd7318"/></dir></dir><file name="Config.php" hash="f70c36f12598222eea5af0cc56c281ed"/><dir name="Item"><file name="Option.php" hash="1c29abefe8277f8e9304cb1b8d37fd47"/></dir><file name="Item.php" hash="cf707b92de0d719d0831af56dd0f789f"/><dir name="Mysql4"><dir name="Item"><file name="Collection.php" hash="7a4e745ec9f9926c3a094e1080fc1fd2"/><dir name="Option"><file name="Collection.php" hash="3451c62ee77d985e7340ea0bf3c96445"/></dir><file name="Option.php" hash="fe5c7b64a520a5dce11aac16dc15dbf0"/></dir><file name="Item.php" hash="d94ee9d970ff4326ca9de291a8279944"/><dir name="Product"><file name="Collection.php" hash="2aa0e7a1f052fdeb4d3cdeb74f4e4482"/></dir><dir name="Wishlist"><file name="Collection.php" hash="b02f0ddd0121a6d7039f8c8d11b4be2a"/></dir><file name="Wishlist.php" hash="9f7db1e4080cbfa3028bdb88cfbeb36b"/></dir><file name="Observer.php" hash="74c2346d19bb71d6f0ea7d0f62914fc7"/><dir name="Resource"><dir name="Item"><file name="Collection.php" hash="8b934c31e3e87c52caddf3da20713f8a"/><dir name="Option"><file name="Collection.php" hash="e726e7521f68377c534078304d4432d8"/></dir><file name="Option.php" hash="4cc83668c0febe2798db3b34ad96d23b"/></dir><file name="Item.php" hash="2226a4979c3152f608daee7fd42bb961"/><dir name="Product"><file name="Collection.php" hash="7d6284973fa8fed0b4df4080c9c48f6b"/></dir><dir name="Wishlist"><file name="Collection.php" hash="c55eadc461dd118b5ef8925156878569"/></dir><file name="Wishlist.php" hash="88b7ef634ed777c94ad39d968e163688"/></dir><file name="Session.php" hash="5fca6c71c18f63d80d4135dc7aadf27e"/><file name="Wishlist.php" hash="f5c04e2db769ed929ee37d148d0d23e1"/></dir><dir name="sql"><dir name="wishlist_setup"><file name="install-1.6.0.0.php" hash="31073f45370e6431b2d786a73c504fc7"/><file name="mysql4-install-0.7.0.php" hash="a097f3028ec3ba8f11c7b18040858d04"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="ddf9dfc1329698c654e3a6edad17de83"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="a292ef95bea613cdfc8325b6a952f94f"/><file name="mysql4-upgrade-0.7.2-0.7.4.php" hash="9c8de349323abfc195dd3c48438bcad3"/><file name="mysql4-upgrade-0.7.4-0.7.5.php" hash="46e1425fdabca50b7fe22405895cc99d"/><file name="mysql4-upgrade-0.7.5-0.7.6.php" hash="47fe21ade9c630c47cb1186c5689b513"/><file name="mysql4-upgrade-0.7.6-0.7.7.php" hash="46189698135c47e0ffc1314544ec9040"/><file name="mysql4-upgrade-0.7.7-0.7.8.php" hash="8641512cd1d5cef9577b1adb6477dbdc"/><file name="mysql4-upgrade-0.7.8-0.7.9.php" hash="11bc2b121db05033d7aaeff1cd5b10a2"/><file name="mysql4-upgrade-1.5.9.9-1.6.0.0.php" hash="020f9e5ef3531ab5e6e7b29370b1eebf"/></dir></dir></dir></dir><dir name="Zend"><file name="Date.php" hash="df6de8ff9dfdb044fe51cdf32e0af534"/><dir name="Db"><file name="Statement.php" hash="4b5b39a1e1c651ab9d6db332c882fdf7"/></dir><file name="Mime.php" hash="fcac9b00b4f04a99cddc8289dc10a33b"/><dir name="XmlRpc"><file name="Request.php" hash="819a8c3f2ca0a50028c51e8011ebd997"/><file name="Response.php" hash="8ca101f4782b43eaa58e3c81a6fbe26b"/></dir></dir></target><target name="mage"><dir name="app"><file name="Mage.php" hash="48a8188d1cdb1101e22f7f729b49d2d8"/><file name=".htaccess" hash="72617d60821288133a367f70bf39ad93"/></dir><dir name="."><file name="cron.php" hash="27893cef1ab2d45b952ade5620d4edb2"/><file name="LICENSE.txt" hash="59563e7be45096d0833dade102989042"/><file name="index.php.sample" hash="3c05ef39c5bdf92444b34b6bdd483c24"/><file name=".htaccess.sample" hash="1092ea05412986094c17f9143dff774a"/><file name="LICENSE_AFL.txt" hash="45a399f2095030865fb962263ccd7506"/><file name="LICENSE.html" hash="caf0a79ffb5e4719f9f4de286f253a61"/><file name="cron.sh" hash="c752a6d282579c3f2ed2e7a2e5864f28"/><file name="install.php" hash="689be80b5e0c2fdcb9dc9f031e29467b"/><file name="php.ini.sample" hash="d7412c2f78440a96fc2d9378ccf460cb"/><file name="get.php" hash="02ba078881f9b141a12c0cd51d3084ad"/><file name="RELEASE_NOTES.txt" hash="de14e209f5c91175d289d178b7d445db"/><file name="favicon.ico" hash="88733ee53676a47fc354a61c32516e82"/><file name="api.php" hash="6304dda413f235693b22bb21be5764f7"/></dir><dir name="errors"><file name="404.php" hash="d409d89b4d867a9307534c70cd662bfe"/><file name="503.php" hash="f0723ab668b765e518bf96eb8da62bd1"/><dir name="default"><file name="404.phtml" hash="6c74230baeb7cec598737dcc7811f57b"/><file name="503.phtml" hash="1040b486ae7f9ce1a2a3de69b9808b37"/><dir name="css"><file name="styles.css" hash="e9c08ef9e6672e5c46c8d79b3202166b"/></dir><dir name="images"><file name="bkg_body.gif" hash="82bfc5bfe346c8e974cd33b1314b0acf"/><file name="bkg_header.jpg" hash="0211c47be1493bd0ec72949c47932b81"/><file name="bkg_main1.gif" hash="a8f5717873dc6cf8f6bd22924b5838fe"/><file name="bkg_main2.gif" hash="cf18ba9f7c7e6b058b439cde1a897e9c"/><file name="favicon.ico" hash="88733ee53676a47fc354a61c32516e82"/><file name="i_msg-error.gif" hash="e4f28607f075a105e53fa3113d84bd26"/><file name="i_msg-note.gif" hash="e774ee481a2820789c1a77112377c4e0"/><file name="i_msg-success.gif" hash="834dfafd5f8b44c4b24a4c00add56fcf"/><file name="logo.gif" hash="48b7eb03807fdf80bdfb19b872cf84b8"/></dir><file name="page.phtml" hash="fa2466723abd0549457d66648f6af3c0"/><file name="report.phtml" hash="41a6a3fe256b9
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Mage_Core_Modules</name>
|
4 |
+
<version>1.8.1.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Collection of Magento Core Modules</summary>
|
10 |
<description>Collection of Magento Core Modules</description>
|
11 |
+
<notes>1.8.1.0</notes>
|
12 |
<authors><author><name>Magento Core Team</name><user>core</user><email>core@magentocommerce.com</email></author></authors>
|
|
|
|
|
|