Version Notes
1.6.0.0.22.1 version of package internal svn revision #121425
Download this release
Release Info
Developer | Magento Core Team |
Extension | Magento_Mobile |
Version | 1.6.0.0.22.1 |
Comparing to | |
See all releases |
Code changes from version 1.5.0.0.22.1 to 1.6.0.0.22.1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Country.php +1 -3
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Preview/Content.php +2 -9
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Preview/Tabitems.php +2 -7
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Renderer/Country/Androidmarket.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Renderer/Country/Istore.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Edit.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid.php +3 -4
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Application.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Msgtitle.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Pushtitle.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Status.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Template.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Edit.php +5 -13
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Edit/Form.php +2 -2
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Grid.php +5 -4
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Grid/Renderer/Application.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Grid/Renderer/Name.php +48 -0
- app/code/core/Mage/XmlConnect/Block/Cart.php +2 -1
- app/code/core/Mage/XmlConnect/Block/Cart/Crosssell.php +2 -4
- app/code/core/Mage/XmlConnect/Block/Cart/Info.php +3 -12
- app/code/core/Mage/XmlConnect/Block/Cart/Item/Renderer.php +18 -34
- app/code/core/Mage/XmlConnect/Block/Cart/Item/Renderer/Configurable.php +8 -7
- app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Details.php +3 -7
- app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Review.php +17 -51
- app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Shippingmethods.php +10 -31
- app/code/core/Mage/XmlConnect/Block/Cart/Totals.php +2 -9
- app/code/core/Mage/XmlConnect/Block/Catalog/Category.php +4 -9
- app/code/core/Mage/XmlConnect/Block/Catalog/Product.php +4 -9
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Attributes.php +3 -6
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Gallery.php +3 -9
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/List.php +3 -6
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options.php +7 -18
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Bundle.php +1 -6
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Configurable.php +2 -12
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Giftcard.php +43 -90
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Grouped.php +4 -10
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Simple.php +1 -2
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Virtual.php +1 -2
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price/Bundle.php +36 -55
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price/Default.php +124 -335
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price/Giftcard.php +5 -11
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Related.php +13 -20
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Review.php +1 -2
- app/code/core/Mage/XmlConnect/Block/Catalog/Product/Review/List.php +5 -9
- app/code/core/Mage/XmlConnect/Block/Catalog/Search.php +6 -5
- app/code/core/Mage/XmlConnect/Block/Checkout/Address/Billing.php +3 -1
- app/code/core/Mage/XmlConnect/Block/Checkout/Address/Form.php +60 -82
- app/code/core/Mage/XmlConnect/Block/Checkout/Agreements.php +1 -0
- app/code/core/Mage/XmlConnect/Block/Checkout/Order/Review/Info.php +1 -2
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Ccsave.php +1 -2
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Checkmo.php +1 -2
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Authorizenet.php +8 -20
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Ccsave.php +4 -11
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Checkmo.php +7 -16
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Free.php +1 -4
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Paypal/Abstract.php +4 -9
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Verisign.php +5 -11
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Purchaseorder.php +5 -13
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/List.php +19 -41
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Paypal/Payflow.php +1 -2
- app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Purchaseorder.php +1 -2
- app/code/core/Mage/XmlConnect/Block/Configuration.php +2 -8
- app/code/core/Mage/XmlConnect/Block/Customer/Address/Form.php +46 -75
- app/code/core/Mage/XmlConnect/Block/Customer/Address/List.php +7 -10
- app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Boolean.php +4 -14
- app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Date.php +20 -33
- app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/File.php +11 -18
- app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Image.php +5 -10
- app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Multiline.php +5 -16
- app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Select.php +1 -2
- app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Text.php +7 -24
- app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Textarea.php +1 -2
- app/code/core/Mage/XmlConnect/Block/Customer/GiftcardCheck.php +4 -18
- app/code/core/Mage/XmlConnect/Block/Customer/Order/Details.php +11 -25
- app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Bundle.php +26 -49
- app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Default.php +13 -34
- app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Downloadable.php +13 -35
- app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Giftcard.php +1 -1
- app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Grouped.php +2 -4
- app/code/core/Mage/XmlConnect/Block/Customer/Order/Items.php +2 -3
- app/code/core/Mage/XmlConnect/Block/Customer/Order/List.php +10 -23
- app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals.php +5 -12
- app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals/Customerbalance.php +2 -5
- app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals/Customerbalance/Refunded.php +2 -5
- app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals/Giftcards.php +3 -8
- app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals/Tax.php +4 -13
- app/code/core/Mage/XmlConnect/Block/Customer/Storecredit.php +26 -58
- app/code/core/Mage/XmlConnect/Block/Home.php +0 -2
- app/code/core/Mage/XmlConnect/Block/Review/Form.php +23 -46
- app/code/core/Mage/XmlConnect/Controller/Action.php +6 -9
- app/code/core/Mage/XmlConnect/Helper/Android.php +4 -9
- app/code/core/Mage/XmlConnect/Helper/Catalog/Category/Image.php +1 -0
- app/code/core/Mage/XmlConnect/Helper/Customer/Form/Renderer.php +1 -2
- app/code/core/Mage/XmlConnect/Helper/Customer/Order.php +47 -100
- app/code/core/Mage/XmlConnect/Helper/Data.php +63 -43
- app/code/core/Mage/XmlConnect/Helper/Image.php +4 -10
- app/code/core/Mage/XmlConnect/Helper/Ipad.php +6 -15
- app/code/core/Mage/XmlConnect/Helper/Iphone.php +10 -30
- app/code/core/Mage/XmlConnect/Helper/Theme.php +3 -7
- app/code/core/Mage/XmlConnect/Model/Adminhtml/System/Config/Backend/Baseurl.php +1 -1
- app/code/core/Mage/XmlConnect/Model/Application.php +25 -57
- app/code/core/Mage/XmlConnect/Model/Catalog/Category/Image.php +13 -28
- app/code/core/Mage/XmlConnect/Model/ConfigData.php +3 -9
- app/code/core/Mage/XmlConnect/Model/History.php +4 -4
- app/code/core/Mage/XmlConnect/Model/Input/Filter/MaliciousCode.php +0 -100
- app/code/core/Mage/XmlConnect/Model/Mysql4/Application.php +2 -94
- app/code/core/Mage/XmlConnect/Model/Mysql4/Application/Collection.php +9 -10
- app/code/core/Mage/XmlConnect/Model/Mysql4/Cms/Page/Collection.php +4 -31
- app/code/core/Mage/XmlConnect/Model/Mysql4/ConfigData.php +1 -72
- app/code/core/Mage/XmlConnect/Model/Mysql4/ConfigData/Collection.php +1 -141
- app/code/core/Mage/XmlConnect/Model/Mysql4/Filter/Collection.php +2 -67
- app/code/core/Mage/XmlConnect/Model/Mysql4/History.php +9 -57
- app/code/core/Mage/XmlConnect/Model/Mysql4/History/Collection.php +4 -36
- app/code/core/Mage/XmlConnect/Model/Mysql4/Queue.php +9 -10
- app/code/core/Mage/XmlConnect/Model/Mysql4/Queue/Collection.php +1 -67
- app/code/core/Mage/XmlConnect/Model/Mysql4/Setup.php +10 -2
- app/code/core/Mage/XmlConnect/Model/Mysql4/Template.php +9 -10
- app/code/core/Mage/XmlConnect/Model/Mysql4/Template/Collection.php +1 -36
- app/code/core/Mage/XmlConnect/Model/Observer.php +4 -7
- app/code/core/Mage/XmlConnect/Model/Payment/Method/Paypal/Config.php +2 -6
- app/code/core/Mage/XmlConnect/Model/Payment/Method/Paypal/Mecl.php +16 -9
- app/code/core/Mage/XmlConnect/Model/Payment/Method/Paypal/Mep.php +1 -2
- app/code/core/Mage/XmlConnect/Model/Paypal/Mecl/Checkout.php +1 -2
- app/code/core/Mage/XmlConnect/Model/Paypal/Mep/Checkout.php +9 -18
- app/code/core/Mage/XmlConnect/Model/Preview/Abstract.php +1 -1
- app/code/core/Mage/XmlConnect/Model/Queue.php +9 -15
- app/code/core/Mage/XmlConnect/Model/Resource/Application.php +121 -0
- app/code/core/Mage/XmlConnect/Model/Resource/Application/Collection.php +45 -0
- app/code/core/Mage/XmlConnect/Model/Resource/Cms/Page/Collection.php +62 -0
- app/code/core/Mage/XmlConnect/Model/Resource/ConfigData.php +102 -0
- app/code/core/Mage/XmlConnect/Model/Resource/ConfigData/Collection.php +173 -0
- app/code/core/Mage/XmlConnect/Model/Resource/Filter/Collection.php +101 -0
- app/code/core/Mage/XmlConnect/Model/Resource/History.php +90 -0
- app/code/core/Mage/XmlConnect/Model/Resource/History/Collection.php +67 -0
- app/code/core/Mage/XmlConnect/Model/Resource/Queue.php +45 -0
- app/code/core/Mage/XmlConnect/Model/Resource/Queue/Collection.php +113 -0
- app/code/core/Mage/XmlConnect/{Block/Checkout/Shipping/Method/Avaliable.php → Model/Resource/Setup.php} +2 -5
- app/code/core/Mage/XmlConnect/Model/Resource/Template.php +45 -0
- app/code/core/Mage/XmlConnect/Model/Resource/Template/Collection.php +72 -0
- app/code/core/Mage/XmlConnect/Model/Simplexml/Element.php +2 -9
- app/code/core/Mage/XmlConnect/Model/Simplexml/Form.php +16 -28
- app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Abstract.php +9 -14
- app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Abstract.php +3 -15
- app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/CountryListSelect.php +28 -65
- app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Fieldset.php +16 -23
- app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Multiline.php +3 -4
- app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Multiselect.php +3 -4
- app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Validator/Abstract.php +17 -23
- app/code/core/Mage/XmlConnect/Model/Template.php +1 -1
- app/code/core/Mage/XmlConnect/Model/Theme.php +5 -13
- app/code/core/Mage/XmlConnect/controllers/Adminhtml/MobileController.php +86 -124
- app/code/core/Mage/XmlConnect/controllers/CartController.php +23 -42
- app/code/core/Mage/XmlConnect/controllers/CatalogController.php +13 -23
- app/code/core/Mage/XmlConnect/controllers/CheckoutController.php +25 -19
- app/code/core/Mage/XmlConnect/controllers/CmsController.php +2 -2
- app/code/core/Mage/XmlConnect/controllers/ConfigurationController.php +11 -25
- app/code/core/Mage/XmlConnect/controllers/CustomerController.php +40 -85
- app/code/core/Mage/XmlConnect/controllers/IndexController.php +1 -1
- app/code/core/Mage/XmlConnect/controllers/Paypal/MeclController.php +37 -95
- app/code/core/Mage/XmlConnect/controllers/Paypal/MepController.php +20 -50
- app/code/core/Mage/XmlConnect/controllers/PbridgeController.php +2 -2
- app/code/core/Mage/XmlConnect/controllers/ReviewController.php +17 -38
- app/code/core/Mage/XmlConnect/controllers/WishlistController.php +18 -32
- app/code/core/Mage/XmlConnect/etc/config.xml +8 -6
- app/code/core/Mage/XmlConnect/sql/xmlconnect_setup/install-1.6.0.0.php +279 -0
- app/code/core/Mage/XmlConnect/sql/xmlconnect_setup/mysql4-upgrade-1.4.0.13-1.4.0.14.php +44 -23
- app/code/core/Mage/XmlConnect/sql/xmlconnect_setup/mysql4-upgrade-1.4.0.9-1.4.0.10.php +1 -6
- app/code/core/Mage/XmlConnect/sql/xmlconnect_setup/mysql4-upgrade-1.5.9.9-1.6.0.0.php +501 -0
- media/xmlconnect/system/ok.gif +0 -0
- package.xml +6 -7
- skin/adminhtml/default/default/images/xmlconnect/mobile_preview/android/bg_content.jpg +0 -0
- skin/adminhtml/default/default/images/xmlconnect/mobile_preview/android/bg_home_content.jpg +0 -0
- skin/adminhtml/default/default/images/xmlconnect/mobile_preview/android/logo_big.png +0 -0
app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit.php
CHANGED
@@ -128,7 +128,7 @@ class Mage_XmlConnect_Block_Adminhtml_Mobile_Edit
|
|
128 |
}
|
129 |
|
130 |
if (isset($app) && $app->getId()) {
|
131 |
-
return $this->__('Edit App "%s"', $this->
|
132 |
} else {
|
133 |
return $this->__('New App');
|
134 |
}
|
128 |
}
|
129 |
|
130 |
if (isset($app) && $app->getId()) {
|
131 |
+
return $this->__('Edit App "%s"', $this->escapeHtml($app->getName()));
|
132 |
} else {
|
133 |
return $this->__('New App');
|
134 |
}
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Country.php
CHANGED
@@ -127,9 +127,7 @@ class Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Country
|
|
127 |
$html .= PHP_EOL . '</tr>' . PHP_EOL;
|
128 |
}
|
129 |
|
130 |
-
$html .= '</table>'
|
131 |
-
. PHP_EOL
|
132 |
-
. $this->getAfterElementHtml();
|
133 |
|
134 |
return $html;
|
135 |
}
|
127 |
$html .= PHP_EOL . '</tr>' . PHP_EOL;
|
128 |
}
|
129 |
|
130 |
+
$html .= '</table>' . PHP_EOL . $this->getAfterElementHtml();
|
|
|
|
|
131 |
|
132 |
return $html;
|
133 |
}
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Preview/Content.php
CHANGED
@@ -31,8 +31,7 @@
|
|
31 |
* @package Mage_XmlConnect
|
32 |
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
*/
|
34 |
-
class Mage_XmlConnect_Block_Adminhtml_Mobile_Preview_Content
|
35 |
-
extends Mage_Adminhtml_Block_Template
|
36 |
{
|
37 |
/**
|
38 |
* Set path to template used for generating block's output.
|
@@ -43,13 +42,7 @@ class Mage_XmlConnect_Block_Adminhtml_Mobile_Preview_Content
|
|
43 |
public function setTemplate($templateType)
|
44 |
{
|
45 |
$deviceType = Mage::helper('xmlconnect')->getDeviceType();
|
46 |
-
parent::setTemplate(
|
47 |
-
'xmlconnect/edit/tab/design/preview/'
|
48 |
-
. $templateType
|
49 |
-
. '_'
|
50 |
-
. $deviceType
|
51 |
-
. '.phtml'
|
52 |
-
);
|
53 |
return $this;
|
54 |
}
|
55 |
}
|
31 |
* @package Mage_XmlConnect
|
32 |
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
*/
|
34 |
+
class Mage_XmlConnect_Block_Adminhtml_Mobile_Preview_Content extends Mage_Adminhtml_Block_Template
|
|
|
35 |
{
|
36 |
/**
|
37 |
* Set path to template used for generating block's output.
|
42 |
public function setTemplate($templateType)
|
43 |
{
|
44 |
$deviceType = Mage::helper('xmlconnect')->getDeviceType();
|
45 |
+
parent::setTemplate('xmlconnect/edit/tab/design/preview/' . $templateType . '_' . $deviceType . '.phtml');
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
return $this;
|
47 |
}
|
48 |
}
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Preview/Tabitems.php
CHANGED
@@ -31,8 +31,7 @@
|
|
31 |
* @package Mage_XmlConnect
|
32 |
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
*/
|
34 |
-
class Mage_XmlConnect_Block_Adminhtml_Mobile_Preview_Tabitems
|
35 |
-
extends Mage_Adminhtml_Block_Template
|
36 |
{
|
37 |
/**
|
38 |
* Set preview tab items template
|
@@ -42,11 +41,7 @@ class Mage_XmlConnect_Block_Adminhtml_Mobile_Preview_Tabitems
|
|
42 |
parent::__construct();
|
43 |
|
44 |
$deviceType = Mage::helper('xmlconnect')->getDeviceType();
|
45 |
-
$this->setTemplate(
|
46 |
-
'xmlconnect/edit/tab/design/preview/tab_items_'
|
47 |
-
. $deviceType
|
48 |
-
. '.phtml'
|
49 |
-
);
|
50 |
}
|
51 |
|
52 |
/**
|
31 |
* @package Mage_XmlConnect
|
32 |
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
*/
|
34 |
+
class Mage_XmlConnect_Block_Adminhtml_Mobile_Preview_Tabitems extends Mage_Adminhtml_Block_Template
|
|
|
35 |
{
|
36 |
/**
|
37 |
* Set preview tab items template
|
41 |
parent::__construct();
|
42 |
|
43 |
$deviceType = Mage::helper('xmlconnect')->getDeviceType();
|
44 |
+
$this->setTemplate('xmlconnect/edit/tab/design/preview/tab_items_' . $deviceType . '.phtml');
|
|
|
|
|
|
|
|
|
45 |
}
|
46 |
|
47 |
/**
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission.php
CHANGED
@@ -114,7 +114,7 @@ class Mage_XmlConnect_Block_Adminhtml_Mobile_Submission
|
|
114 |
{
|
115 |
$app = Mage::helper('xmlconnect')->getApplication();
|
116 |
if ($app && $app->getId()) {
|
117 |
-
return $this->__('Submit App "%s"', $this->
|
118 |
}
|
119 |
return '';
|
120 |
}
|
114 |
{
|
115 |
$app = Mage::helper('xmlconnect')->getApplication();
|
116 |
if ($app && $app->getId()) {
|
117 |
+
return $this->__('Submit App "%s"', $this->escapeHtml($app->getName()));
|
118 |
}
|
119 |
return '';
|
120 |
}
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Renderer/Country/Androidmarket.php
CHANGED
@@ -38,7 +38,7 @@ class Mage_XmlConnect_Block_Adminhtml_Mobile_Submission_Renderer_Country_Android
|
|
38 |
/**
|
39 |
* Override setting the template
|
40 |
*
|
41 |
-
* @return
|
42 |
*/
|
43 |
protected function _construct()
|
44 |
{
|
38 |
/**
|
39 |
* Override setting the template
|
40 |
*
|
41 |
+
* @return null
|
42 |
*/
|
43 |
protected function _construct()
|
44 |
{
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Renderer/Country/Istore.php
CHANGED
@@ -38,7 +38,7 @@ class Mage_XmlConnect_Block_Adminhtml_Mobile_Submission_Renderer_Country_Istore
|
|
38 |
/**
|
39 |
* Override setting the template
|
40 |
*
|
41 |
-
* @return
|
42 |
*/
|
43 |
protected function _construct()
|
44 |
{
|
38 |
/**
|
39 |
* Override setting the template
|
40 |
*
|
41 |
+
* @return null
|
42 |
*/
|
43 |
protected function _construct()
|
44 |
{
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Edit.php
CHANGED
@@ -80,7 +80,7 @@ class Mage_XmlConnect_Block_Adminhtml_Queue_Edit
|
|
80 |
{
|
81 |
$message = Mage::registry('current_message');
|
82 |
if ($message && $message->getId()) {
|
83 |
-
return $this->__('Edit AirMail Message Queue #%s', $this->
|
84 |
} else {
|
85 |
return $this->__('New AirMail Message Queue');
|
86 |
}
|
80 |
{
|
81 |
$message = Mage::registry('current_message');
|
82 |
if ($message && $message->getId()) {
|
83 |
+
return $this->__('Edit AirMail Message Queue #%s', $this->escapeHtml($message->getId()));
|
84 |
} else {
|
85 |
return $this->__('New AirMail Message Queue');
|
86 |
}
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid.php
CHANGED
@@ -33,7 +33,6 @@
|
|
33 |
*/
|
34 |
class Mage_XmlConnect_Block_Adminhtml_Queue_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
35 |
{
|
36 |
-
|
37 |
/**
|
38 |
* Setting grid_id, sort order and sort direction
|
39 |
*/
|
@@ -70,10 +69,10 @@ class Mage_XmlConnect_Block_Adminhtml_Queue_Grid extends Mage_Adminhtml_Block_Wi
|
|
70 |
*/
|
71 |
protected function _prepareColumns()
|
72 |
{
|
73 |
-
$this->addColumn('
|
74 |
'header' => $this->__('ID'),
|
75 |
'align' => 'center',
|
76 |
-
'index' => 'main_table.
|
77 |
'width' => '40px',
|
78 |
'renderer' => 'xmlconnect/adminhtml_queue_grid_renderer_id'
|
79 |
));
|
@@ -89,7 +88,7 @@ class Mage_XmlConnect_Block_Adminhtml_Queue_Grid extends Mage_Adminhtml_Block_Wi
|
|
89 |
$this->addColumn('app_code', array(
|
90 |
'header' => $this->__('Application Name'),
|
91 |
'align' => 'left',
|
92 |
-
'index' => '
|
93 |
'type' => 'options',
|
94 |
'options' => Mage::helper('xmlconnect')->getApplications(),
|
95 |
'renderer' => 'xmlconnect/adminhtml_queue_grid_renderer_application'
|
33 |
*/
|
34 |
class Mage_XmlConnect_Block_Adminhtml_Queue_Grid extends Mage_Adminhtml_Block_Widget_Grid
|
35 |
{
|
|
|
36 |
/**
|
37 |
* Setting grid_id, sort order and sort direction
|
38 |
*/
|
69 |
*/
|
70 |
protected function _prepareColumns()
|
71 |
{
|
72 |
+
$this->addColumn('queue_id', array(
|
73 |
'header' => $this->__('ID'),
|
74 |
'align' => 'center',
|
75 |
+
'index' => 'main_table.queue_id',
|
76 |
'width' => '40px',
|
77 |
'renderer' => 'xmlconnect/adminhtml_queue_grid_renderer_id'
|
78 |
));
|
88 |
$this->addColumn('app_code', array(
|
89 |
'header' => $this->__('Application Name'),
|
90 |
'align' => 'left',
|
91 |
+
'index' => 'app.code',
|
92 |
'type' => 'options',
|
93 |
'options' => Mage::helper('xmlconnect')->getApplications(),
|
94 |
'renderer' => 'xmlconnect/adminhtml_queue_grid_renderer_application'
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Application.php
CHANGED
@@ -42,7 +42,7 @@ class Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Application
|
|
42 |
*/
|
43 |
public function render(Varien_Object $row)
|
44 |
{
|
45 |
-
$str = $this->
|
46 |
if ($str == '') {
|
47 |
$str = ' --- ';
|
48 |
}
|
42 |
*/
|
43 |
public function render(Varien_Object $row)
|
44 |
{
|
45 |
+
$str = $this->escapeHtml($row->getAppName());
|
46 |
if ($str == '') {
|
47 |
$str = ' --- ';
|
48 |
}
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Msgtitle.php
CHANGED
@@ -46,6 +46,6 @@ class Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Msgtitle
|
|
46 |
if (strlen($msgTitle) > 50) {
|
47 |
$msgTitle = substr($msgTitle, 0, 50) . '...';
|
48 |
}
|
49 |
-
return $this->
|
50 |
}
|
51 |
}
|
46 |
if (strlen($msgTitle) > 50) {
|
47 |
$msgTitle = substr($msgTitle, 0, 50) . '...';
|
48 |
}
|
49 |
+
return $this->escapeHtml($msgTitle);
|
50 |
}
|
51 |
}
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Pushtitle.php
CHANGED
@@ -42,6 +42,6 @@ class Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Pushtitle
|
|
42 |
*/
|
43 |
public function render(Varien_Object $row)
|
44 |
{
|
45 |
-
return $this->
|
46 |
}
|
47 |
}
|
42 |
*/
|
43 |
public function render(Varien_Object $row)
|
44 |
{
|
45 |
+
return $this->escapeHtml($row->getPushTitle());
|
46 |
}
|
47 |
}
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Status.php
CHANGED
@@ -64,6 +64,6 @@ class Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Status
|
|
64 |
$str = $this->__('Undefined');
|
65 |
}
|
66 |
|
67 |
-
return $this->
|
68 |
}
|
69 |
}
|
64 |
$str = $this->__('Undefined');
|
65 |
}
|
66 |
|
67 |
+
return $this->escapeHtml($str);
|
68 |
}
|
69 |
}
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Template.php
CHANGED
@@ -42,7 +42,7 @@ class Mage_XmlConnect_Block_Adminhtml_Queue_Grid_Renderer_Template
|
|
42 |
*/
|
43 |
public function render(Varien_Object $row)
|
44 |
{
|
45 |
-
$str = $this->
|
46 |
if ($str == '') {
|
47 |
$str .= '---';
|
48 |
}
|
42 |
*/
|
43 |
public function render(Varien_Object $row)
|
44 |
{
|
45 |
+
$str = $this->escapeHtml($row->getTplName());
|
46 |
if ($str == '') {
|
47 |
$str .= '---';
|
48 |
}
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Edit.php
CHANGED
@@ -31,8 +31,7 @@
|
|
31 |
* @package Mage_XmlConnect
|
32 |
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
*/
|
34 |
-
class Mage_XmlConnect_Block_Adminhtml_Template_Edit
|
35 |
-
extends Mage_Adminhtml_Block_Widget_Form_Container
|
36 |
{
|
37 |
/**
|
38 |
* Constructor
|
@@ -44,16 +43,9 @@ class Mage_XmlConnect_Block_Adminhtml_Template_Edit
|
|
44 |
$this->_blockGroup = 'xmlconnect';
|
45 |
parent::__construct();
|
46 |
|
47 |
-
$this->_updateButton(
|
48 |
-
'
|
49 |
-
'
|
50 |
-
'deleteConfirm(\''
|
51 |
-
. $this->__('Warning: All related AirMail messages will be deleted!')
|
52 |
-
. PHP_EOL
|
53 |
-
. $this->__('Are you sure you want to do this?')
|
54 |
-
.'\', \''
|
55 |
-
. $this->getDeleteUrl()
|
56 |
-
. '\')'
|
57 |
);
|
58 |
$this->_updateButton('save', 'label', $this->__('Save'));
|
59 |
$this->_updateButton('save', 'onclick', 'if (editForm.submit()) {disableElements(\'save\')}');
|
@@ -79,7 +71,7 @@ class Mage_XmlConnect_Block_Adminhtml_Template_Edit
|
|
79 |
{
|
80 |
$template = Mage::registry('current_template');
|
81 |
if ($template && $template->getId()) {
|
82 |
-
return $this->__('Edit Template "%s"', $this->
|
83 |
} else {
|
84 |
return $this->__('New Template');
|
85 |
}
|
31 |
* @package Mage_XmlConnect
|
32 |
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
*/
|
34 |
+
class Mage_XmlConnect_Block_Adminhtml_Template_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
|
|
|
35 |
{
|
36 |
/**
|
37 |
* Constructor
|
43 |
$this->_blockGroup = 'xmlconnect';
|
44 |
parent::__construct();
|
45 |
|
46 |
+
$this->_updateButton('delete', 'onclick', 'deleteConfirm(\''
|
47 |
+
. $this->__('Warning: All related AirMail messages will be deleted!') . PHP_EOL
|
48 |
+
. $this->__('Are you sure you want to do this?') .'\', \'' . $this->getDeleteUrl() . '\')'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
);
|
50 |
$this->_updateButton('save', 'label', $this->__('Save'));
|
51 |
$this->_updateButton('save', 'onclick', 'if (editForm.submit()) {disableElements(\'save\')}');
|
71 |
{
|
72 |
$template = Mage::registry('current_template');
|
73 |
if ($template && $template->getId()) {
|
74 |
+
return $this->__('Edit Template "%s"', $this->escapeHtml($template->getName()));
|
75 |
} else {
|
76 |
return $this->__('New Template');
|
77 |
}
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Edit/Form.php
CHANGED
@@ -94,8 +94,8 @@ class Mage_XmlConnect_Block_Adminhtml_Template_Edit_Form
|
|
94 |
));
|
95 |
}
|
96 |
|
97 |
-
$fieldset->addField('
|
98 |
-
'name' => '
|
99 |
'label' => $this->__('Application'),
|
100 |
'title' => $this->__('Application'),
|
101 |
'disabled' => $model->getId() || !$this->_fieldsEnabled ? true : false,
|
94 |
));
|
95 |
}
|
96 |
|
97 |
+
$fieldset->addField('application_id', 'select', array(
|
98 |
+
'name' => 'application_id',
|
99 |
'label' => $this->__('Application'),
|
100 |
'title' => $this->__('Application'),
|
101 |
'disabled' => $model->getId() || !$this->_fieldsEnabled ? true : false,
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Grid.php
CHANGED
@@ -64,17 +64,18 @@ class Mage_XmlConnect_Block_Adminhtml_Template_Grid extends Mage_Adminhtml_Block
|
|
64 |
*/
|
65 |
protected function _prepareColumns()
|
66 |
{
|
67 |
-
$this->addColumn('
|
68 |
'header' => $this->__('ID'),
|
69 |
'align' => 'center',
|
70 |
-
'index' => '
|
71 |
'width' => '40px'
|
72 |
));
|
73 |
|
74 |
$this->addColumn('name', array(
|
75 |
'header' => $this->__('Template Name'),
|
76 |
'align' => 'left',
|
77 |
-
'index' => 'name',
|
|
|
78 |
'escape' => true
|
79 |
));
|
80 |
|
@@ -94,7 +95,7 @@ class Mage_XmlConnect_Block_Adminhtml_Template_Grid extends Mage_Adminhtml_Block
|
|
94 |
|
95 |
$this->addColumn('app_code', array(
|
96 |
'header' => $this->__('Application'),
|
97 |
-
'index' => '
|
98 |
'type' => 'options',
|
99 |
'align' => 'left',
|
100 |
'options' => Mage::helper('xmlconnect')->getApplications(),
|
64 |
*/
|
65 |
protected function _prepareColumns()
|
66 |
{
|
67 |
+
$this->addColumn('template_id', array(
|
68 |
'header' => $this->__('ID'),
|
69 |
'align' => 'center',
|
70 |
+
'index' => 'template_id',
|
71 |
'width' => '40px'
|
72 |
));
|
73 |
|
74 |
$this->addColumn('name', array(
|
75 |
'header' => $this->__('Template Name'),
|
76 |
'align' => 'left',
|
77 |
+
'index' => 'main_table.name',
|
78 |
+
'renderer' => 'xmlconnect/adminhtml_template_grid_renderer_name',
|
79 |
'escape' => true
|
80 |
));
|
81 |
|
95 |
|
96 |
$this->addColumn('app_code', array(
|
97 |
'header' => $this->__('Application'),
|
98 |
+
'index' => 'app.code',
|
99 |
'type' => 'options',
|
100 |
'align' => 'left',
|
101 |
'options' => Mage::helper('xmlconnect')->getApplications(),
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Grid/Renderer/Application.php
CHANGED
@@ -42,7 +42,7 @@ class Mage_XmlConnect_Block_Adminhtml_Template_Grid_Renderer_Application
|
|
42 |
*/
|
43 |
public function render(Varien_Object $row)
|
44 |
{
|
45 |
-
$str = $this->
|
46 |
if ($str == '') {
|
47 |
$str = ' --- ';
|
48 |
}
|
42 |
*/
|
43 |
public function render(Varien_Object $row)
|
44 |
{
|
45 |
+
$str = $this->escapeHtml($row->getAppName());
|
46 |
if ($str == '') {
|
47 |
$str = ' --- ';
|
48 |
}
|
app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Grid/Renderer/Name.php
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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_XmlConnect
|
23 |
+
* @copyright Copyright (c) 2010 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 |
+
* Adminhtml airmail queue grid block action item renderer
|
29 |
+
*
|
30 |
+
* @category Mage
|
31 |
+
* @package Mage_XmlConnect
|
32 |
+
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
+
*/
|
34 |
+
class Mage_XmlConnect_Block_Adminhtml_Template_Grid_Renderer_Name
|
35 |
+
extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
|
36 |
+
{
|
37 |
+
/**
|
38 |
+
* Render grid row
|
39 |
+
*
|
40 |
+
* @param Varien_Object $row
|
41 |
+
* @return string
|
42 |
+
*/
|
43 |
+
public function render(Varien_Object $row)
|
44 |
+
{
|
45 |
+
$str = $this->escapeHtml($row->getName());
|
46 |
+
return $str;
|
47 |
+
}
|
48 |
+
}
|
app/code/core/Mage/XmlConnect/Block/Cart.php
CHANGED
@@ -91,7 +91,7 @@ class Mage_XmlConnect_Block_Cart extends Mage_Checkout_Block_Cart_Abstract
|
|
91 |
) {
|
92 |
$inclPrice = $_incl + $item->getWeeeTaxAppliedAmount();
|
93 |
} else {
|
94 |
-
|
95 |
}
|
96 |
}
|
97 |
$exclPrice = Mage::helper('xmlconnect')->formatPriceForXml($exclPrice);
|
@@ -124,6 +124,7 @@ class Mage_XmlConnect_Block_Cart extends Mage_Checkout_Block_Cart_Abstract
|
|
124 |
* Info for paypal MEP if it's enabled
|
125 |
*/
|
126 |
$appConfig = Mage::helper('xmlconnect')->getApplication()->loadConfiguration()->getRenderConf();
|
|
|
127 |
$isMepActive = $appConfig['paypal']['isActive'];
|
128 |
|
129 |
$paypalMepIsAvailable = Mage::getModel('xmlconnect/payment_method_paypal_mep')->isAvailable(null);
|
91 |
) {
|
92 |
$inclPrice = $_incl + $item->getWeeeTaxAppliedAmount();
|
93 |
} else {
|
94 |
+
$inclPrice = $_incl - $item->getWeeeTaxDisposition();
|
95 |
}
|
96 |
}
|
97 |
$exclPrice = Mage::helper('xmlconnect')->formatPriceForXml($exclPrice);
|
124 |
* Info for paypal MEP if it's enabled
|
125 |
*/
|
126 |
$appConfig = Mage::helper('xmlconnect')->getApplication()->loadConfiguration()->getRenderConf();
|
127 |
+
|
128 |
$isMepActive = $appConfig['paypal']['isActive'];
|
129 |
|
130 |
$paypalMepIsAvailable = Mage::getModel('xmlconnect/payment_method_paypal_mep')->isAvailable(null);
|
app/code/core/Mage/XmlConnect/Block/Cart/Crosssell.php
CHANGED
@@ -83,14 +83,12 @@ class Mage_XmlConnect_Block_Cart_Crosssell extends Mage_Checkout_Block_Cart_Cros
|
|
83 |
}
|
84 |
|
85 |
if ($this->getChild('product_price')) {
|
86 |
-
$this->getChild('product_price')->setProduct($product)
|
87 |
-
->setProductXmlObj($itemXmlObj)
|
88 |
->collectProductPrices();
|
89 |
}
|
90 |
|
91 |
if (!$product->getRatingSummary()) {
|
92 |
-
Mage::getModel('review/review')
|
93 |
-
->getEntitySummary($product, Mage::app()->getStore()->getId());
|
94 |
}
|
95 |
|
96 |
$itemXmlObj->addChild('rating_summary', round((int)$product->getRatingSummary()->getRatingSummary() / 10));
|
83 |
}
|
84 |
|
85 |
if ($this->getChild('product_price')) {
|
86 |
+
$this->getChild('product_price')->setProduct($product)->setProductXmlObj($itemXmlObj)
|
|
|
87 |
->collectProductPrices();
|
88 |
}
|
89 |
|
90 |
if (!$product->getRatingSummary()) {
|
91 |
+
Mage::getModel('review/review')->getEntitySummary($product, Mage::app()->getStore()->getId());
|
|
|
92 |
}
|
93 |
|
94 |
$itemXmlObj->addChild('rating_summary', round((int)$product->getRatingSummary()->getRatingSummary() / 10));
|
app/code/core/Mage/XmlConnect/Block/Cart/Info.php
CHANGED
@@ -45,20 +45,11 @@ class Mage_XmlConnect_Block_Cart_Info extends Mage_XmlConnect_Block_Cart
|
|
45 |
/** @var $xmlObject Mage_XmlConnect_Model_Simplexml_Element */
|
46 |
$xmlObject = Mage::getModel('xmlconnect/simplexml_element', '<cart></cart>');
|
47 |
|
48 |
-
$xmlObject->addChild(
|
49 |
-
'is_virtual',
|
50 |
-
(int)$this->helper('checkout/cart')->getIsVirtualQuote()
|
51 |
-
);
|
52 |
|
53 |
-
$xmlObject->addChild(
|
54 |
-
'summary_qty',
|
55 |
-
(int)$this->helper('checkout/cart')->getSummaryCount()
|
56 |
-
);
|
57 |
|
58 |
-
$xmlObject->addChild(
|
59 |
-
'virtual_qty',
|
60 |
-
(int)$quote->getItemVirtualQty()
|
61 |
-
);
|
62 |
|
63 |
if (strlen($quote->getCouponCode())) {
|
64 |
$xmlObject->addChild('has_coupon_code', 1);
|
45 |
/** @var $xmlObject Mage_XmlConnect_Model_Simplexml_Element */
|
46 |
$xmlObject = Mage::getModel('xmlconnect/simplexml_element', '<cart></cart>');
|
47 |
|
48 |
+
$xmlObject->addChild('is_virtual', (int)$this->helper('checkout/cart')->getIsVirtualQuote());
|
|
|
|
|
|
|
49 |
|
50 |
+
$xmlObject->addChild('summary_qty', (int)$this->helper('checkout/cart')->getSummaryCount());
|
|
|
|
|
|
|
51 |
|
52 |
+
$xmlObject->addChild('virtual_qty', (int)$quote->getItemVirtualQty());
|
|
|
|
|
|
|
53 |
|
54 |
if (strlen($quote->getCouponCode())) {
|
55 |
$xmlObject->addChild('has_coupon_code', 1);
|
app/code/core/Mage/XmlConnect/Block/Cart/Item/Renderer.php
CHANGED
@@ -42,7 +42,7 @@ class Mage_XmlConnect_Block_Cart_Item_Renderer extends Mage_Checkout_Block_Cart_
|
|
42 |
{
|
43 |
$_item = $this->getItem();
|
44 |
$productXmlObj = $reviewXmlObj->addCustomChild('item');
|
45 |
-
$productXmlObj->addCustomChild('name', $this->
|
46 |
|
47 |
if ($_options = $this->getOptionList()) {
|
48 |
$optionsXmlObj = $productXmlObj->addChild('options');
|
@@ -55,14 +55,10 @@ class Mage_XmlConnect_Block_Cart_Item_Renderer extends Mage_Checkout_Block_Cart_
|
|
55 |
$value = null;
|
56 |
}
|
57 |
|
58 |
-
$optionsXmlObj->addCustomChild(
|
59 |
-
'
|
60 |
-
$value
|
61 |
-
|
62 |
-
'label' => $this->htmlEscape($_option['label']),
|
63 |
-
'value' => $_formattedOptionValue['value']
|
64 |
-
)
|
65 |
-
);
|
66 |
}
|
67 |
}
|
68 |
|
@@ -87,15 +83,14 @@ class Mage_XmlConnect_Block_Cart_Item_Renderer extends Mage_Checkout_Block_Cart_
|
|
87 |
|
88 |
if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()) {
|
89 |
if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')
|
90 |
-
&& $_item->getWeeeTaxAppliedAmount()
|
91 |
-
|
92 |
-
|
93 |
+ $_item->getWeeeTaxRowDisposition();
|
94 |
} else {
|
95 |
$exclPrice = $_item->getRowTotal();
|
96 |
}
|
97 |
$exclPrice = $this->_formatPrice($exclPrice);
|
98 |
-
|
99 |
$subtotalXmlObj->addAttribute('excluding_tax', $subtotalXmlObj->escapeXml($exclPrice));
|
100 |
}
|
101 |
|
@@ -212,45 +207,34 @@ class Mage_XmlConnect_Block_Cart_Item_Renderer extends Mage_Checkout_Block_Cart_
|
|
212 |
$amount = $tax['amount'];
|
213 |
}
|
214 |
|
215 |
-
$weeeXmlObj->addCustomChild(
|
216 |
-
'
|
217 |
-
|
218 |
-
|
219 |
-
'name' => $tax['title'],
|
220 |
-
'amount' => $this->_formatPrice($amount)
|
221 |
-
)
|
222 |
-
);
|
223 |
}
|
224 |
} elseif ($_item->getWeeeTaxAppliedAmount()
|
225 |
&& ($typeOfDisplay2 || Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales'))
|
226 |
) {
|
227 |
foreach (Mage::helper('weee')->getApplied($_item) as $tax) {
|
228 |
-
|
229 |
if ($subtotalFlag) {
|
230 |
$amount = $tax['row_amount_incl_tax'];
|
231 |
} else {
|
232 |
$amount = $tax['amount_incl_tax'];
|
233 |
}
|
234 |
|
235 |
-
$weeeXmlObj->addCustomChild(
|
236 |
-
'
|
237 |
-
|
238 |
-
|
239 |
-
'name' => $tax['title'],
|
240 |
-
'amount' => $this->_formatPrice($amount)
|
241 |
-
)
|
242 |
-
);
|
243 |
}
|
244 |
}
|
245 |
|
246 |
if ($typeOfDisplay2 && $_item->getWeeeTaxAppliedAmount()) {
|
247 |
if ($subtotalFlag) {
|
248 |
-
$totalExcl = $_item->getRowTotal()
|
249 |
-
+ $_item->getWeeeTaxAppliedRowAmount()
|
250 |
+ $_item->getWeeeTaxRowDisposition();
|
251 |
} else {
|
252 |
-
$totalExcl = $_item->getCalculationPrice()
|
253 |
-
+ $_item->getWeeeTaxAppliedAmount()
|
254 |
+ $_item->getWeeeTaxDisposition();
|
255 |
}
|
256 |
|
42 |
{
|
43 |
$_item = $this->getItem();
|
44 |
$productXmlObj = $reviewXmlObj->addCustomChild('item');
|
45 |
+
$productXmlObj->addCustomChild('name', $this->escapeHtml($this->getProductName()));
|
46 |
|
47 |
if ($_options = $this->getOptionList()) {
|
48 |
$optionsXmlObj = $productXmlObj->addChild('options');
|
55 |
$value = null;
|
56 |
}
|
57 |
|
58 |
+
$optionsXmlObj->addCustomChild('option', $value, array(
|
59 |
+
'label' => $this->escapeHtml($_option['label']),
|
60 |
+
'value' => $_formattedOptionValue['value']
|
61 |
+
));
|
|
|
|
|
|
|
|
|
62 |
}
|
63 |
}
|
64 |
|
83 |
|
84 |
if ($this->helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()) {
|
85 |
if (Mage::helper('weee')->typeOfDisplay($_item, array(0, 1, 4), 'sales')
|
86 |
+
&& $_item->getWeeeTaxAppliedAmount()
|
87 |
+
) {
|
88 |
+
$exclPrice = $_item->getRowTotal() + $_item->getWeeeTaxAppliedRowAmount()
|
89 |
+ $_item->getWeeeTaxRowDisposition();
|
90 |
} else {
|
91 |
$exclPrice = $_item->getRowTotal();
|
92 |
}
|
93 |
$exclPrice = $this->_formatPrice($exclPrice);
|
|
|
94 |
$subtotalXmlObj->addAttribute('excluding_tax', $subtotalXmlObj->escapeXml($exclPrice));
|
95 |
}
|
96 |
|
207 |
$amount = $tax['amount'];
|
208 |
}
|
209 |
|
210 |
+
$weeeXmlObj->addCustomChild('item', null, array(
|
211 |
+
'name' => $tax['title'],
|
212 |
+
'amount' => $this->_formatPrice($amount)
|
213 |
+
));
|
|
|
|
|
|
|
|
|
214 |
}
|
215 |
} elseif ($_item->getWeeeTaxAppliedAmount()
|
216 |
&& ($typeOfDisplay2 || Mage::helper('weee')->typeOfDisplay($_item, 4, 'sales'))
|
217 |
) {
|
218 |
foreach (Mage::helper('weee')->getApplied($_item) as $tax) {
|
|
|
219 |
if ($subtotalFlag) {
|
220 |
$amount = $tax['row_amount_incl_tax'];
|
221 |
} else {
|
222 |
$amount = $tax['amount_incl_tax'];
|
223 |
}
|
224 |
|
225 |
+
$weeeXmlObj->addCustomChild('item', null, array(
|
226 |
+
'name' => $tax['title'],
|
227 |
+
'amount' => $this->_formatPrice($amount)
|
228 |
+
));
|
|
|
|
|
|
|
|
|
229 |
}
|
230 |
}
|
231 |
|
232 |
if ($typeOfDisplay2 && $_item->getWeeeTaxAppliedAmount()) {
|
233 |
if ($subtotalFlag) {
|
234 |
+
$totalExcl = $_item->getRowTotal() + $_item->getWeeeTaxAppliedRowAmount()
|
|
|
235 |
+ $_item->getWeeeTaxRowDisposition();
|
236 |
} else {
|
237 |
+
$totalExcl = $_item->getCalculationPrice() + $_item->getWeeeTaxAppliedAmount()
|
|
|
238 |
+ $_item->getWeeeTaxDisposition();
|
239 |
}
|
240 |
|
app/code/core/Mage/XmlConnect/Block/Cart/Item/Renderer/Configurable.php
CHANGED
@@ -32,8 +32,8 @@
|
|
32 |
*/
|
33 |
class Mage_XmlConnect_Block_Cart_Item_Renderer_Configurable extends Mage_XmlConnect_Block_Cart_Item_Renderer
|
34 |
{
|
35 |
-
const CONFIGURABLE_PRODUCT_IMAGE= 'checkout/cart/configurable_product_image';
|
36 |
-
const USE_PARENT_IMAGE
|
37 |
|
38 |
/**
|
39 |
* Get item configurable product
|
@@ -42,7 +42,8 @@ class Mage_XmlConnect_Block_Cart_Item_Renderer_Configurable extends Mage_XmlConn
|
|
42 |
*/
|
43 |
public function getConfigurableProduct()
|
44 |
{
|
45 |
-
|
|
|
46 |
return $option->getProduct();
|
47 |
}
|
48 |
return $this->getProduct();
|
@@ -55,7 +56,8 @@ class Mage_XmlConnect_Block_Cart_Item_Renderer_Configurable extends Mage_XmlConn
|
|
55 |
*/
|
56 |
public function getChildProduct()
|
57 |
{
|
58 |
-
|
|
|
59 |
return $option->getProduct();
|
60 |
}
|
61 |
return $this->getProduct();
|
@@ -72,7 +74,7 @@ class Mage_XmlConnect_Block_Cart_Item_Renderer_Configurable extends Mage_XmlConn
|
|
72 |
}
|
73 |
|
74 |
/**
|
75 |
-
* Get list of all
|
76 |
*
|
77 |
* @return array
|
78 |
*/
|
@@ -80,7 +82,6 @@ class Mage_XmlConnect_Block_Cart_Item_Renderer_Configurable extends Mage_XmlConn
|
|
80 |
{
|
81 |
/* @var $helper Mage_Catalog_Helper_Product_Configuration */
|
82 |
$helper = Mage::helper('catalog/product_configuration');
|
83 |
-
|
84 |
-
return $options;
|
85 |
}
|
86 |
}
|
32 |
*/
|
33 |
class Mage_XmlConnect_Block_Cart_Item_Renderer_Configurable extends Mage_XmlConnect_Block_Cart_Item_Renderer
|
34 |
{
|
35 |
+
const CONFIGURABLE_PRODUCT_IMAGE = 'checkout/cart/configurable_product_image';
|
36 |
+
const USE_PARENT_IMAGE = 'parent';
|
37 |
|
38 |
/**
|
39 |
* Get item configurable product
|
42 |
*/
|
43 |
public function getConfigurableProduct()
|
44 |
{
|
45 |
+
$option = $this->getItem()->getOptionByCode('product_type');
|
46 |
+
if ($option) {
|
47 |
return $option->getProduct();
|
48 |
}
|
49 |
return $this->getProduct();
|
56 |
*/
|
57 |
public function getChildProduct()
|
58 |
{
|
59 |
+
$option = $this->getItem()->getOptionByCode('simple_product');
|
60 |
+
if ($option) {
|
61 |
return $option->getProduct();
|
62 |
}
|
63 |
return $this->getProduct();
|
74 |
}
|
75 |
|
76 |
/**
|
77 |
+
* Get list of all options for product
|
78 |
*
|
79 |
* @return array
|
80 |
*/
|
82 |
{
|
83 |
/* @var $helper Mage_Catalog_Helper_Product_Configuration */
|
84 |
$helper = Mage::helper('catalog/product_configuration');
|
85 |
+
return $helper->getConfigurableOptions($this->getItem());
|
|
|
86 |
}
|
87 |
}
|
app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Details.php
CHANGED
@@ -31,8 +31,7 @@
|
|
31 |
* @package Mage_Xmlconnect
|
32 |
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
*/
|
34 |
-
class Mage_XmlConnect_Block_Cart_Paypal_Mecl_Details
|
35 |
-
extends Mage_Paypal_Block_Express_Review_Details
|
36 |
{
|
37 |
/**
|
38 |
* Add cart details to XML object
|
@@ -47,9 +46,7 @@ class Mage_XmlConnect_Block_Cart_Paypal_Mecl_Details
|
|
47 |
$this->getItemXml($_item, $itemsXmlObj);
|
48 |
}
|
49 |
|
50 |
-
$reviewXmlObj->appendChild(
|
51 |
-
$this->getChild('totals')->setReturnObjectFlag(true)->_toHtml()
|
52 |
-
);
|
53 |
|
54 |
return $reviewXmlObj;
|
55 |
}
|
@@ -66,8 +63,7 @@ class Mage_XmlConnect_Block_Cart_Paypal_Mecl_Details
|
|
66 |
Mage_XmlConnect_Model_Simplexml_Element $reviewXmlObj
|
67 |
)
|
68 |
{
|
69 |
-
$renderer = $this->getItemRenderer($item->getProductType())
|
70 |
-
->setItem($item)->setQuote($this->getQuote());
|
71 |
return $renderer->addProductToXmlObj($reviewXmlObj);
|
72 |
}
|
73 |
|
31 |
* @package Mage_Xmlconnect
|
32 |
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
*/
|
34 |
+
class Mage_XmlConnect_Block_Cart_Paypal_Mecl_Details extends Mage_Paypal_Block_Express_Review_Details
|
|
|
35 |
{
|
36 |
/**
|
37 |
* Add cart details to XML object
|
46 |
$this->getItemXml($_item, $itemsXmlObj);
|
47 |
}
|
48 |
|
49 |
+
$reviewXmlObj->appendChild($this->getChild('totals')->setReturnObjectFlag(true)->_toHtml());
|
|
|
|
|
50 |
|
51 |
return $reviewXmlObj;
|
52 |
}
|
63 |
Mage_XmlConnect_Model_Simplexml_Element $reviewXmlObj
|
64 |
)
|
65 |
{
|
66 |
+
$renderer = $this->getItemRenderer($item->getProductType())->setItem($item)->setQuote($this->getQuote());
|
|
|
67 |
return $renderer->addProductToXmlObj($reviewXmlObj);
|
68 |
}
|
69 |
|
app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Review.php
CHANGED
@@ -41,88 +41,54 @@ class Mage_XmlConnect_Block_Cart_Paypal_Mecl_Review extends Mage_Paypal_Block_Ex
|
|
41 |
protected function _toHtml()
|
42 |
{
|
43 |
/** @var $reviewXmlObj Mage_XmlConnect_Model_Simplexml_Element */
|
44 |
-
$reviewXmlObj = Mage::getModel(
|
45 |
-
'xmlconnect/simplexml_element',
|
46 |
-
'<mecl_cart_details></mecl_cart_details>'
|
47 |
-
);
|
48 |
|
49 |
if ($this->getPaypalMessages()) {
|
50 |
-
$reviewXmlObj->addChild(
|
51 |
-
'paypal_message',
|
52 |
-
implode(PHP_EOL, $this->getPaypalMessages())
|
53 |
-
);
|
54 |
}
|
55 |
|
56 |
if ($this->getShippingAddress()) {
|
57 |
$reviewXmlObj->addCustomChild(
|
58 |
'shipping_address',
|
59 |
-
|
60 |
array('label' => $this->__('Shipping Address'))
|
61 |
);
|
62 |
}
|
63 |
|
64 |
if ($this->_quote->isVirtual()) {
|
65 |
-
$reviewXmlObj->addCustomChild(
|
66 |
-
'
|
67 |
-
|
68 |
-
array(
|
69 |
-
'label' => $this->__('No shipping method required.')
|
70 |
-
)
|
71 |
-
);
|
72 |
} elseif ($this->getCanEditShippingMethod() || !$this->getCurrentShippingRate()) {
|
73 |
if ($groups = $this->getShippingRateGroups()) {
|
74 |
$currentRate = $this->getCurrentShippingRate();
|
75 |
foreach ($groups as $code => $rates) {
|
76 |
foreach ($rates as $rate) {
|
77 |
if ($currentRate === $rate) {
|
78 |
-
$reviewXmlObj->addCustomChild(
|
79 |
-
'
|
80 |
-
|
81 |
-
|
82 |
-
'rate' => strip_tags($this->renderShippingRateOption($rate)),
|
83 |
-
'label' => $this->getCarrierName($code)
|
84 |
-
)
|
85 |
-
);
|
86 |
break(2);
|
87 |
}
|
88 |
}
|
89 |
}
|
90 |
}
|
91 |
}
|
92 |
-
$reviewXmlObj->addCustomChild(
|
93 |
-
'
|
94 |
-
|
95 |
-
array(
|
96 |
-
'label' => $this->__('Payment Method')
|
97 |
-
)
|
98 |
-
);
|
99 |
|
100 |
$reviewXmlObj->addCustomChild(
|
101 |
'billing_address',
|
102 |
-
|
103 |
array(
|
104 |
-
'label'
|
105 |
-
'payer_email'
|
106 |
-
|
107 |
-
);
|
108 |
|
109 |
$this->getChild('details')->addDetailsToXmlObj($reviewXmlObj);
|
110 |
|
111 |
return $reviewXmlObj->asNiceXml();
|
112 |
}
|
113 |
-
|
114 |
-
/**
|
115 |
-
* Get text output for specified address
|
116 |
-
*
|
117 |
-
* @param $address
|
118 |
-
* @return string
|
119 |
-
*/
|
120 |
-
public function renderAddress($address)
|
121 |
-
{
|
122 |
-
return preg_replace(
|
123 |
-
array('@\r@', '@\n+@'),
|
124 |
-
array('', PHP_EOL),
|
125 |
-
$address->getFormated(false)
|
126 |
-
);
|
127 |
-
}
|
128 |
}
|
41 |
protected function _toHtml()
|
42 |
{
|
43 |
/** @var $reviewXmlObj Mage_XmlConnect_Model_Simplexml_Element */
|
44 |
+
$reviewXmlObj = Mage::getModel('xmlconnect/simplexml_element', '<mecl_cart_details></mecl_cart_details>');
|
|
|
|
|
|
|
45 |
|
46 |
if ($this->getPaypalMessages()) {
|
47 |
+
$reviewXmlObj->addChild('paypal_message', implode(PHP_EOL, $this->getPaypalMessages()));
|
|
|
|
|
|
|
48 |
}
|
49 |
|
50 |
if ($this->getShippingAddress()) {
|
51 |
$reviewXmlObj->addCustomChild(
|
52 |
'shipping_address',
|
53 |
+
Mage::helper('xmlconnect')->trimLineBreaks($this->getShippingAddress()->format('text')),
|
54 |
array('label' => $this->__('Shipping Address'))
|
55 |
);
|
56 |
}
|
57 |
|
58 |
if ($this->_quote->isVirtual()) {
|
59 |
+
$reviewXmlObj->addCustomChild('shipping_method', null, array(
|
60 |
+
'label' => $this->__('No shipping method required.')
|
61 |
+
));
|
|
|
|
|
|
|
|
|
62 |
} elseif ($this->getCanEditShippingMethod() || !$this->getCurrentShippingRate()) {
|
63 |
if ($groups = $this->getShippingRateGroups()) {
|
64 |
$currentRate = $this->getCurrentShippingRate();
|
65 |
foreach ($groups as $code => $rates) {
|
66 |
foreach ($rates as $rate) {
|
67 |
if ($currentRate === $rate) {
|
68 |
+
$reviewXmlObj->addCustomChild('shipping_method', null, array(
|
69 |
+
'rate' => strip_tags($this->renderShippingRateOption($rate)),
|
70 |
+
'label' => $this->getCarrierName($code)
|
71 |
+
));
|
|
|
|
|
|
|
|
|
72 |
break(2);
|
73 |
}
|
74 |
}
|
75 |
}
|
76 |
}
|
77 |
}
|
78 |
+
$reviewXmlObj->addCustomChild('payment_method', $this->escapeHtml($this->getPaymentMethodTitle()), array(
|
79 |
+
'label' => $this->__('Payment Method')
|
80 |
+
));
|
|
|
|
|
|
|
|
|
81 |
|
82 |
$reviewXmlObj->addCustomChild(
|
83 |
'billing_address',
|
84 |
+
Mage::helper('xmlconnect')->trimLineBreaks($this->getBillingAddress()->format('text')),
|
85 |
array(
|
86 |
+
'label' => $this->__('Billing Address'),
|
87 |
+
'payer_email' => $this->__('Payer Email: %s', $this->getBillingAddress()->getEmail())
|
88 |
+
));
|
|
|
89 |
|
90 |
$this->getChild('details')->addDetailsToXmlObj($reviewXmlObj);
|
91 |
|
92 |
return $reviewXmlObj->asNiceXml();
|
93 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
}
|
app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Shippingmethods.php
CHANGED
@@ -50,9 +50,9 @@ class Mage_XmlConnect_Block_Cart_Paypal_Mecl_Shippingmethods
|
|
50 |
$methodListXmlObj->addAttribute('label', $this->__('Shipping Method'));
|
51 |
|
52 |
if ($this->getCanEditShippingMethod() || !$this->getCurrentShippingRate()) {
|
53 |
-
|
|
|
54 |
$currentRate = $this->getCurrentShippingRate();
|
55 |
-
|
56 |
foreach ($groups as $code => $rates) {
|
57 |
$rateXmlObj = $this->_addRatesToXmlObj($methodListXmlObj, $code);
|
58 |
foreach ($rates as $rate) {
|
@@ -63,36 +63,20 @@ class Mage_XmlConnect_Block_Cart_Paypal_Mecl_Shippingmethods
|
|
63 |
if ($currentRate === $rate) {
|
64 |
$rateAttributes += array('selected' => 1);
|
65 |
}
|
66 |
-
$rateXmlObj->addCustomChild(
|
67 |
-
'rate',
|
68 |
-
null,
|
69 |
-
$rateAttributes
|
70 |
-
);
|
71 |
}
|
72 |
}
|
73 |
} else {
|
74 |
-
$message = $this->_quote->isVirtual()
|
75 |
-
? $this->__('No shipping method required.')
|
76 |
: $this->__('Sorry, no quotes are available for this order at this time.');
|
77 |
-
$methodListXmlObj->addCustomChild(
|
78 |
-
'method',
|
79 |
-
null,
|
80 |
-
array(
|
81 |
-
'label' => $message
|
82 |
-
)
|
83 |
-
);
|
84 |
}
|
85 |
} else {
|
86 |
$rateXmlObj = $this->_addRatesToXmlObj($methodListXmlObj);
|
87 |
-
|
88 |
-
|
89 |
-
'
|
90 |
-
|
91 |
-
array(
|
92 |
-
'label' => $this->renderShippingRateOption($this->getCurrentShippingRate()),
|
93 |
-
'selected' => 1
|
94 |
-
)
|
95 |
-
);
|
96 |
}
|
97 |
|
98 |
return $methodListXmlObj->asNiceXml();
|
@@ -108,11 +92,6 @@ class Mage_XmlConnect_Block_Cart_Paypal_Mecl_Shippingmethods
|
|
108 |
protected function _addRatesToXmlObj(Mage_XmlConnect_Model_Simplexml_Element $methodListXmlObj, $code = '')
|
109 |
{
|
110 |
$attributes = $code ? array('label' => $this->getCarrierName($code)) : array();
|
111 |
-
return $methodListXmlObj->addCustomChild(
|
112 |
-
'method',
|
113 |
-
null,
|
114 |
-
$attributes
|
115 |
-
)
|
116 |
-
->addCustomChild('rates');
|
117 |
}
|
118 |
}
|
50 |
$methodListXmlObj->addAttribute('label', $this->__('Shipping Method'));
|
51 |
|
52 |
if ($this->getCanEditShippingMethod() || !$this->getCurrentShippingRate()) {
|
53 |
+
$groups = $this->getShippingRateGroups();
|
54 |
+
if ($groups) {
|
55 |
$currentRate = $this->getCurrentShippingRate();
|
|
|
56 |
foreach ($groups as $code => $rates) {
|
57 |
$rateXmlObj = $this->_addRatesToXmlObj($methodListXmlObj, $code);
|
58 |
foreach ($rates as $rate) {
|
63 |
if ($currentRate === $rate) {
|
64 |
$rateAttributes += array('selected' => 1);
|
65 |
}
|
66 |
+
$rateXmlObj->addCustomChild('rate', null, $rateAttributes);
|
|
|
|
|
|
|
|
|
67 |
}
|
68 |
}
|
69 |
} else {
|
70 |
+
$message = $this->_quote->isVirtual() ? $this->__('No shipping method required.')
|
|
|
71 |
: $this->__('Sorry, no quotes are available for this order at this time.');
|
72 |
+
$methodListXmlObj->addCustomChild('method', null, array('label' => $message));
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
}
|
74 |
} else {
|
75 |
$rateXmlObj = $this->_addRatesToXmlObj($methodListXmlObj);
|
76 |
+
$rateXmlObj->addCustomChild('rate', null, array(
|
77 |
+
'label' => $this->renderShippingRateOption($this->getCurrentShippingRate()),
|
78 |
+
'selected' => 1
|
79 |
+
));
|
|
|
|
|
|
|
|
|
|
|
80 |
}
|
81 |
|
82 |
return $methodListXmlObj->asNiceXml();
|
92 |
protected function _addRatesToXmlObj(Mage_XmlConnect_Model_Simplexml_Element $methodListXmlObj, $code = '')
|
93 |
{
|
94 |
$attributes = $code ? array('label' => $this->getCarrierName($code)) : array();
|
95 |
+
return $methodListXmlObj->addCustomChild('method', null, $attributes)->addCustomChild('rates');
|
|
|
|
|
|
|
|
|
|
|
96 |
}
|
97 |
}
|
app/code/core/Mage/XmlConnect/Block/Cart/Totals.php
CHANGED
@@ -42,7 +42,6 @@ class Mage_XmlConnect_Block_Cart_Totals extends Mage_Checkout_Block_Cart_Totals
|
|
42 |
{
|
43 |
/** @var $totalsXmlObj Mage_XmlConnect_Model_Simplexml_Element */
|
44 |
$totalsXmlObj = Mage::getModel('xmlconnect/simplexml_element', '<totals></totals>');
|
45 |
-
// $taxConfig = Mage::getSingleton('tax/config');
|
46 |
|
47 |
foreach ($this->getQuote()->getTotals() as $total) {
|
48 |
$code = $total->getCode();
|
@@ -74,10 +73,7 @@ class Mage_XmlConnect_Block_Cart_Totals extends Mage_Checkout_Block_Cart_Totals
|
|
74 |
if ($renderer->displayBoth()) {
|
75 |
$title = $renderer->getExcludeTaxLabel();
|
76 |
$this->_addTotalDataToXmlObj(
|
77 |
-
$totalsXmlObj,
|
78 |
-
$code . '_excl_tax',
|
79 |
-
$title,
|
80 |
-
$renderer->getShippingExcludeTax()
|
81 |
);
|
82 |
|
83 |
$code = $code . '_incl_tax';
|
@@ -95,10 +91,7 @@ class Mage_XmlConnect_Block_Cart_Totals extends Mage_Checkout_Block_Cart_Totals
|
|
95 |
if ($displayBoth) {
|
96 |
$title = $this->__('Grand Total (Excl. Tax)');
|
97 |
$this->_addTotalDataToXmlObj(
|
98 |
-
$totalsXmlObj,
|
99 |
-
$code . '_excl_tax',
|
100 |
-
$title,
|
101 |
-
$grandTotalExlTax
|
102 |
);
|
103 |
$code = $code . '_incl_tax';
|
104 |
$title = $this->__('Grand Total (Incl. Tax)');
|
42 |
{
|
43 |
/** @var $totalsXmlObj Mage_XmlConnect_Model_Simplexml_Element */
|
44 |
$totalsXmlObj = Mage::getModel('xmlconnect/simplexml_element', '<totals></totals>');
|
|
|
45 |
|
46 |
foreach ($this->getQuote()->getTotals() as $total) {
|
47 |
$code = $total->getCode();
|
73 |
if ($renderer->displayBoth()) {
|
74 |
$title = $renderer->getExcludeTaxLabel();
|
75 |
$this->_addTotalDataToXmlObj(
|
76 |
+
$totalsXmlObj, $code . '_excl_tax', $title, $renderer->getShippingExcludeTax()
|
|
|
|
|
|
|
77 |
);
|
78 |
|
79 |
$code = $code . '_incl_tax';
|
91 |
if ($displayBoth) {
|
92 |
$title = $this->__('Grand Total (Excl. Tax)');
|
93 |
$this->_addTotalDataToXmlObj(
|
94 |
+
$totalsXmlObj, $code . '_excl_tax', $title, $grandTotalExlTax
|
|
|
|
|
|
|
95 |
);
|
96 |
$code = $code . '_incl_tax';
|
97 |
$title = $this->__('Grand Total (Incl. Tax)');
|
app/code/core/Mage/XmlConnect/Block/Catalog/Category.php
CHANGED
@@ -55,16 +55,14 @@ class Mage_XmlConnect_Block_Catalog_Category extends Mage_XmlConnect_Block_Catal
|
|
55 |
$productListBlock = $this->getChild('product_list');
|
56 |
if ($productListBlock && $categoryModel->getLevel() > 1) {
|
57 |
$layer = Mage::getSingleton('catalog/layer');
|
58 |
-
$productsXmlObj = $productListBlock->setCategory($categoryModel)
|
59 |
-
->setLayer($layer)
|
60 |
->getProductsXmlObject();
|
61 |
$hasMoreProductItems = (int)$productListBlock->getHasProductItems();
|
62 |
}
|
63 |
|
64 |
$infoBlock = $this->getChild('category_info');
|
65 |
if ($infoBlock) {
|
66 |
-
$categoryInfoXmlObj = $infoBlock->setCategory($categoryModel)
|
67 |
-
->getCategoryInfoXmlObject();
|
68 |
$categoryInfoXmlObj->addChild('has_more_items', $hasMoreProductItems);
|
69 |
$categoryXmlObj->appendChild($categoryInfoXmlObj);
|
70 |
}
|
@@ -86,11 +84,8 @@ class Mage_XmlConnect_Block_Catalog_Category extends Mage_XmlConnect_Block_Catal
|
|
86 |
if (!is_null($categoryId)) {
|
87 |
$itemXmlObj->addChild('parent_id', $item->getParentId());
|
88 |
}
|
89 |
-
$icon = Mage::helper('xmlconnect/catalog_category_image')
|
90 |
-
->
|
91 |
-
->resize(
|
92 |
-
Mage::helper('xmlconnect/image')->getImageSizeForContent('category')
|
93 |
-
);
|
94 |
|
95 |
$iconXml = $itemXmlObj->addChild('icon', $icon);
|
96 |
|
55 |
$productListBlock = $this->getChild('product_list');
|
56 |
if ($productListBlock && $categoryModel->getLevel() > 1) {
|
57 |
$layer = Mage::getSingleton('catalog/layer');
|
58 |
+
$productsXmlObj = $productListBlock->setCategory($categoryModel)->setLayer($layer)
|
|
|
59 |
->getProductsXmlObject();
|
60 |
$hasMoreProductItems = (int)$productListBlock->getHasProductItems();
|
61 |
}
|
62 |
|
63 |
$infoBlock = $this->getChild('category_info');
|
64 |
if ($infoBlock) {
|
65 |
+
$categoryInfoXmlObj = $infoBlock->setCategory($categoryModel)->getCategoryInfoXmlObject();
|
|
|
66 |
$categoryInfoXmlObj->addChild('has_more_items', $hasMoreProductItems);
|
67 |
$categoryXmlObj->appendChild($categoryInfoXmlObj);
|
68 |
}
|
84 |
if (!is_null($categoryId)) {
|
85 |
$itemXmlObj->addChild('parent_id', $item->getParentId());
|
86 |
}
|
87 |
+
$icon = Mage::helper('xmlconnect/catalog_category_image')->initialize($item, 'thumbnail')
|
88 |
+
->resize(Mage::helper('xmlconnect/image')->getImageSizeForContent('category'));
|
|
|
|
|
|
|
89 |
|
90 |
$iconXml = $itemXmlObj->addChild('icon', $icon);
|
91 |
|
app/code/core/Mage/XmlConnect/Block/Catalog/Product.php
CHANGED
@@ -95,14 +95,8 @@ class Mage_XmlConnect_Block_Catalog_Product extends Mage_XmlConnect_Block_Catalo
|
|
95 |
Mage::getModel('review/review')->getEntitySummary($product, Mage::app()->getStore()->getId());
|
96 |
}
|
97 |
|
98 |
-
$item->addChild(
|
99 |
-
|
100 |
-
round((int)$product->getRatingSummary()->getRatingSummary() / 10)
|
101 |
-
);
|
102 |
-
$item->addChild(
|
103 |
-
'reviews_count',
|
104 |
-
$product->getRatingSummary()->getReviewsCount()
|
105 |
-
);
|
106 |
|
107 |
if ($this->getChild('product_price')) {
|
108 |
$this->getChild('product_price')->setProduct($product)->setProductXmlObj($item)
|
@@ -158,7 +152,8 @@ class Mage_XmlConnect_Block_Catalog_Product extends Mage_XmlConnect_Block_Catalo
|
|
158 |
}
|
159 |
}
|
160 |
|
161 |
-
$productOptions = $this->getChild('xmlconnect.catalog.product.options')
|
|
|
162 |
if ($productOptions instanceof Mage_XmlConnect_Model_Simplexml_Element) {
|
163 |
$productXmlObj->appendChild($productOptions);
|
164 |
}
|
95 |
Mage::getModel('review/review')->getEntitySummary($product, Mage::app()->getStore()->getId());
|
96 |
}
|
97 |
|
98 |
+
$item->addChild('rating_summary', round((int)$product->getRatingSummary()->getRatingSummary() / 10));
|
99 |
+
$item->addChild('reviews_count', $product->getRatingSummary()->getReviewsCount());
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
|
101 |
if ($this->getChild('product_price')) {
|
102 |
$this->getChild('product_price')->setProduct($product)->setProductXmlObj($item)
|
152 |
}
|
153 |
}
|
154 |
|
155 |
+
$productOptions = $this->getChild('xmlconnect.catalog.product.options')
|
156 |
+
->getProductOptionsXmlObject($product);
|
157 |
if ($productOptions instanceof Mage_XmlConnect_Model_Simplexml_Element) {
|
158 |
$productXmlObj->appendChild($productOptions);
|
159 |
}
|
app/code/core/Mage/XmlConnect/Block/Catalog/Product/Attributes.php
CHANGED
@@ -31,8 +31,7 @@
|
|
31 |
* @package Mage_XmlConnect
|
32 |
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
*/
|
34 |
-
class Mage_XmlConnect_Block_Catalog_Product_Attributes
|
35 |
-
extends Mage_Catalog_Block_Product_View_Attributes
|
36 |
{
|
37 |
/**
|
38 |
* Add additional information (attributes) to current product xml object
|
@@ -41,10 +40,8 @@ class Mage_XmlConnect_Block_Catalog_Product_Attributes
|
|
41 |
* @param Mage_XmlConnect_Model_Simplexml_Element $productXmlObject
|
42 |
*/
|
43 |
public function addAdditionalData(
|
44 |
-
Mage_Catalog_Model_Product $product,
|
45 |
-
|
46 |
-
)
|
47 |
-
{
|
48 |
if ($product && $productXmlObject && $product->getId()) {
|
49 |
$this->_product = $product;
|
50 |
$additionalData = $this->getAdditionalData();
|
31 |
* @package Mage_XmlConnect
|
32 |
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
*/
|
34 |
+
class Mage_XmlConnect_Block_Catalog_Product_Attributes extends Mage_Catalog_Block_Product_View_Attributes
|
|
|
35 |
{
|
36 |
/**
|
37 |
* Add additional information (attributes) to current product xml object
|
40 |
* @param Mage_XmlConnect_Model_Simplexml_Element $productXmlObject
|
41 |
*/
|
42 |
public function addAdditionalData(
|
43 |
+
Mage_Catalog_Model_Product $product, Mage_XmlConnect_Model_Simplexml_Element $productXmlObject
|
44 |
+
) {
|
|
|
|
|
45 |
if ($product && $productXmlObject && $product->getId()) {
|
46 |
$this->_product = $product;
|
47 |
$additionalData = $this->getAdditionalData();
|
app/code/core/Mage/XmlConnect/Block/Catalog/Product/Gallery.php
CHANGED
@@ -41,9 +41,7 @@ class Mage_XmlConnect_Block_Catalog_Product_Gallery extends Mage_XmlConnect_Bloc
|
|
41 |
protected function _toHtml()
|
42 |
{
|
43 |
$productId = $this->getRequest()->getParam('id', null);
|
44 |
-
$product = Mage::getModel('catalog/product')
|
45 |
-
->setStoreId(Mage::app()->getStore()->getId())
|
46 |
-
->load($productId);
|
47 |
$collection = $product->getMediaGalleryImages();
|
48 |
|
49 |
$imagesNode = Mage::getModel('xmlconnect/simplexml_element', '<images></images>');
|
@@ -55,9 +53,7 @@ class Mage_XmlConnect_Block_Catalog_Product_Gallery extends Mage_XmlConnect_Bloc
|
|
55 |
/**
|
56 |
* Big image
|
57 |
*/
|
58 |
-
$bigImage = $helper->init($product, 'image', $item->getFile())
|
59 |
-
->constrainOnly(true)
|
60 |
-
->keepFrame(false)
|
61 |
->resize(Mage::helper('xmlconnect/image')->getImageSizeForContent('product_gallery_big'));
|
62 |
|
63 |
$fileNode = $imageNode->addChild('file');
|
@@ -72,9 +68,7 @@ class Mage_XmlConnect_Block_Catalog_Product_Gallery extends Mage_XmlConnect_Bloc
|
|
72 |
/**
|
73 |
* Small image
|
74 |
*/
|
75 |
-
$smallImage = $helper->init($product, 'thumbnail', $item->getFile())
|
76 |
-
->constrainOnly(true)
|
77 |
-
->keepFrame(false)
|
78 |
->resize(Mage::helper('xmlconnect/image')->getImageSizeForContent('product_gallery_small'));
|
79 |
|
80 |
$fileNode = $imageNode->addChild('file');
|
41 |
protected function _toHtml()
|
42 |
{
|
43 |
$productId = $this->getRequest()->getParam('id', null);
|
44 |
+
$product = Mage::getModel('catalog/product')->setStoreId(Mage::app()->getStore()->getId())->load($productId);
|
|
|
|
|
45 |
$collection = $product->getMediaGalleryImages();
|
46 |
|
47 |
$imagesNode = Mage::getModel('xmlconnect/simplexml_element', '<images></images>');
|
53 |
/**
|
54 |
* Big image
|
55 |
*/
|
56 |
+
$bigImage = $helper->init($product, 'image', $item->getFile())->constrainOnly(true)->keepFrame(false)
|
|
|
|
|
57 |
->resize(Mage::helper('xmlconnect/image')->getImageSizeForContent('product_gallery_big'));
|
58 |
|
59 |
$fileNode = $imageNode->addChild('file');
|
68 |
/**
|
69 |
* Small image
|
70 |
*/
|
71 |
+
$smallImage = $helper->init($product, 'thumbnail', $item->getFile())->constrainOnly(true)->keepFrame(false)
|
|
|
|
|
72 |
->resize(Mage::helper('xmlconnect/image')->getImageSizeForContent('product_gallery_small'));
|
73 |
|
74 |
$fileNode = $imageNode->addChild('file');
|
app/code/core/Mage/XmlConnect/Block/Catalog/Product/List.php
CHANGED
@@ -108,8 +108,7 @@ class Mage_XmlConnect_Block_Catalog_Product_List extends Mage_XmlConnect_Block_C
|
|
108 |
$attributeCode = $attributeItem->getAttributeCode();
|
109 |
list($filterModel, $filterBlock) = $this->helper('xmlconnect')->getFilterByKey($attributeCode);
|
110 |
|
111 |
-
$filterModel->setLayer($layer)
|
112 |
-
->setAttributeModel($attributeItem);
|
113 |
|
114 |
$filterParam = parent::REQUEST_FILTER_PARAM_REFIX . $attributeCode;
|
115 |
/**
|
@@ -126,9 +125,8 @@ class Mage_XmlConnect_Block_Catalog_Product_List extends Mage_XmlConnect_Block_C
|
|
126 |
* Separately apply and save category filter
|
127 |
*/
|
128 |
list($categoryFilter, $categoryFilterBlock) = $this->helper('xmlconnect')->getFilterByKey('category');
|
129 |
-
$filterParam
|
130 |
-
$categoryFilter->setLayer($layer)
|
131 |
-
->setRequestVar($filterParam)
|
132 |
->apply($this->getRequest(), $categoryFilterBlock);
|
133 |
$filters[] = $categoryFilter;
|
134 |
|
@@ -156,7 +154,6 @@ class Mage_XmlConnect_Block_Catalog_Product_List extends Mage_XmlConnect_Block_C
|
|
156 |
$this->setHasProductItems(1);
|
157 |
}
|
158 |
$collection->getSelect()->limit($count, $offset);
|
159 |
-
|
160 |
$collection->setFlag('require_stock_items', true);
|
161 |
|
162 |
$this->_productCollection = $collection;
|
108 |
$attributeCode = $attributeItem->getAttributeCode();
|
109 |
list($filterModel, $filterBlock) = $this->helper('xmlconnect')->getFilterByKey($attributeCode);
|
110 |
|
111 |
+
$filterModel->setLayer($layer)->setAttributeModel($attributeItem);
|
|
|
112 |
|
113 |
$filterParam = parent::REQUEST_FILTER_PARAM_REFIX . $attributeCode;
|
114 |
/**
|
125 |
* Separately apply and save category filter
|
126 |
*/
|
127 |
list($categoryFilter, $categoryFilterBlock) = $this->helper('xmlconnect')->getFilterByKey('category');
|
128 |
+
$filterParam = parent::REQUEST_FILTER_PARAM_REFIX . $categoryFilter->getRequestVar();
|
129 |
+
$categoryFilter->setLayer($layer)->setRequestVar($filterParam)
|
|
|
130 |
->apply($this->getRequest(), $categoryFilterBlock);
|
131 |
$filters[] = $categoryFilter;
|
132 |
|
154 |
$this->setHasProductItems(1);
|
155 |
}
|
156 |
$collection->getSelect()->limit($count, $offset);
|
|
|
157 |
$collection->setFlag('require_stock_items', true);
|
158 |
|
159 |
$this->_productCollection = $collection;
|
app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options.php
CHANGED
@@ -97,18 +97,11 @@ class Mage_XmlConnect_Block_Catalog_Product_Options extends Mage_XmlConnect_Bloc
|
|
97 |
*/
|
98 |
$price = $option->getPrice();
|
99 |
if ($price) {
|
100 |
-
$optionNode->addAttribute(
|
101 |
-
|
102 |
-
Mage::helper('xmlconnect')->formatPriceForXml($price)
|
103 |
-
);
|
104 |
-
$formattedPrice = Mage::app()->getStore(
|
105 |
-
$product->getStoreId())->formatPrice($price, false
|
106 |
-
);
|
107 |
$optionNode->addAttribute('formated_price', $formattedPrice);
|
108 |
}
|
109 |
-
if ($type == self::OPTION_TYPE_CHECKBOX
|
110 |
-
|| $type == self::OPTION_TYPE_SELECT
|
111 |
-
) {
|
112 |
foreach ($option->getValues() as $value) {
|
113 |
$valueNode = $optionNode->addChild('value');
|
114 |
$valueNode->addAttribute('code', $value->getId());
|
@@ -139,12 +132,9 @@ class Mage_XmlConnect_Block_Catalog_Product_Options extends Mage_XmlConnect_Bloc
|
|
139 |
$priceIncTax = Mage::helper('tax')->getPrice($product, $price, true);
|
140 |
|
141 |
if (Mage::helper('tax')->displayBothPrices() && $priceTax != $priceIncTax) {
|
142 |
-
$formatted = Mage::helper('core')->currency($priceTax, true, false)
|
143 |
-
. '
|
144 |
-
. Mage::helper('
|
145 |
-
. ' '
|
146 |
-
. Mage::helper('tax')->__('Incl. Tax')
|
147 |
-
. ')';
|
148 |
} else {
|
149 |
$formatted = $this->helper('core')->currency($priceTax, true, false);
|
150 |
}
|
@@ -206,8 +196,7 @@ class Mage_XmlConnect_Block_Catalog_Product_Options extends Mage_XmlConnect_Bloc
|
|
206 |
protected function _toHtml()
|
207 |
{
|
208 |
$productId = $this->getRequest()->getParam('id', null);
|
209 |
-
$product = Mage::getModel('catalog/product')
|
210 |
-
->setStoreId(Mage::app()->getStore()->getId());
|
211 |
|
212 |
if ($productId) {
|
213 |
$product->load($productId);
|
97 |
*/
|
98 |
$price = $option->getPrice();
|
99 |
if ($price) {
|
100 |
+
$optionNode->addAttribute('price', Mage::helper('xmlconnect')->formatPriceForXml($price));
|
101 |
+
$formattedPrice = Mage::app()->getStore($product->getStoreId())->formatPrice($price, false);
|
|
|
|
|
|
|
|
|
|
|
102 |
$optionNode->addAttribute('formated_price', $formattedPrice);
|
103 |
}
|
104 |
+
if ($type == self::OPTION_TYPE_CHECKBOX || $type == self::OPTION_TYPE_SELECT) {
|
|
|
|
|
105 |
foreach ($option->getValues() as $value) {
|
106 |
$valueNode = $optionNode->addChild('value');
|
107 |
$valueNode->addAttribute('code', $value->getId());
|
132 |
$priceIncTax = Mage::helper('tax')->getPrice($product, $price, true);
|
133 |
|
134 |
if (Mage::helper('tax')->displayBothPrices() && $priceTax != $priceIncTax) {
|
135 |
+
$formatted = Mage::helper('core')->currency($priceTax, true, false) . ' (+'
|
136 |
+
. Mage::helper('core')->currency($priceIncTax, true, false) . ' '
|
137 |
+
. Mage::helper('tax')->__('Incl. Tax') . ')';
|
|
|
|
|
|
|
138 |
} else {
|
139 |
$formatted = $this->helper('core')->currency($priceTax, true, false);
|
140 |
}
|
196 |
protected function _toHtml()
|
197 |
{
|
198 |
$productId = $this->getRequest()->getParam('id', null);
|
199 |
+
$product = Mage::getModel('catalog/product')->setStoreId(Mage::app()->getStore()->getId());
|
|
|
200 |
|
201 |
if ($productId) {
|
202 |
$product->load($productId);
|
app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Bundle.php
CHANGED
@@ -42,7 +42,6 @@ class Mage_XmlConnect_Block_Catalog_Product_Options_Bundle extends Mage_XmlConne
|
|
42 |
*/
|
43 |
public function getProductOptionsXml(Mage_Catalog_Model_Product $product, $isObject = false)
|
44 |
{
|
45 |
-
|
46 |
$xmlModel = $this->getProductCustomOptionsXmlObject($product);
|
47 |
$optionsXmlObj = $xmlModel->options;
|
48 |
|
@@ -56,8 +55,7 @@ class Mage_XmlConnect_Block_Catalog_Product_Options_Bundle extends Mage_XmlConne
|
|
56 |
$product->getTypeInstance(true)->setStoreFilter($product->getStoreId(), $product);
|
57 |
$optionCollection = $product->getTypeInstance(true)->getOptionsCollection($product);
|
58 |
$selectionCollection = $product->getTypeInstance(true)->getSelectionsCollection(
|
59 |
-
$product->getTypeInstance(true)->getOptionsIds($product),
|
60 |
-
$product
|
61 |
);
|
62 |
$bundleOptions = $optionCollection->appendSelections($selectionCollection, false, false);
|
63 |
if (!sizeof($bundleOptions)) {
|
@@ -87,8 +85,6 @@ class Mage_XmlConnect_Block_Catalog_Product_Options_Bundle extends Mage_XmlConne
|
|
87 |
$optionNode->addAttribute('is_required', 1);
|
88 |
}
|
89 |
|
90 |
-
// $_default = $_option->getDefaultSelection();
|
91 |
-
|
92 |
foreach ($selections as $_selection) {
|
93 |
if (!$_selection->isSaleable()) {
|
94 |
continue;
|
@@ -113,7 +109,6 @@ class Mage_XmlConnect_Block_Catalog_Product_Options_Bundle extends Mage_XmlConne
|
|
113 |
));
|
114 |
$valueNode->addAttribute('formated_price', $this->_formatPriceString($price, $product));
|
115 |
}
|
116 |
-
// $_selection->getIsDefault();
|
117 |
}
|
118 |
}
|
119 |
|
42 |
*/
|
43 |
public function getProductOptionsXml(Mage_Catalog_Model_Product $product, $isObject = false)
|
44 |
{
|
|
|
45 |
$xmlModel = $this->getProductCustomOptionsXmlObject($product);
|
46 |
$optionsXmlObj = $xmlModel->options;
|
47 |
|
55 |
$product->getTypeInstance(true)->setStoreFilter($product->getStoreId(), $product);
|
56 |
$optionCollection = $product->getTypeInstance(true)->getOptionsCollection($product);
|
57 |
$selectionCollection = $product->getTypeInstance(true)->getSelectionsCollection(
|
58 |
+
$product->getTypeInstance(true)->getOptionsIds($product), $product
|
|
|
59 |
);
|
60 |
$bundleOptions = $optionCollection->appendSelections($selectionCollection, false, false);
|
61 |
if (!sizeof($bundleOptions)) {
|
85 |
$optionNode->addAttribute('is_required', 1);
|
86 |
}
|
87 |
|
|
|
|
|
88 |
foreach ($selections as $_selection) {
|
89 |
if (!$_selection->isSaleable()) {
|
90 |
continue;
|
109 |
));
|
110 |
$valueNode->addAttribute('formated_price', $this->_formatPriceString($price, $product));
|
111 |
}
|
|
|
112 |
}
|
113 |
}
|
114 |
|
app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Configurable.php
CHANGED
@@ -143,12 +143,7 @@ class Mage_XmlConnect_Block_Catalog_Product_Options_Configurable extends Mage_Xm
|
|
143 |
$valueNode->addAttribute('formated_price', $option['formated_price']);
|
144 |
}
|
145 |
if (sizeof($_attributes) > 1) {
|
146 |
-
$this->_prepareRecursivelyRelatedValues(
|
147 |
-
$valueNode,
|
148 |
-
$_attributes,
|
149 |
-
$option['products'],
|
150 |
-
1
|
151 |
-
);
|
152 |
}
|
153 |
}
|
154 |
$isFirst = false;
|
@@ -204,12 +199,7 @@ class Mage_XmlConnect_Block_Catalog_Product_Options_Configurable extends Mage_Xm
|
|
204 |
$_attrClone = $attributes;
|
205 |
if (next($_attrClone) != false) {
|
206 |
reset($_attrClone);
|
207 |
-
$this->_prepareRecursivelyRelatedValues(
|
208 |
-
$_valueNode,
|
209 |
-
$_attrClone,
|
210 |
-
$intersect,
|
211 |
-
$cycle + 1
|
212 |
-
);
|
213 |
}
|
214 |
}
|
215 |
}
|
143 |
$valueNode->addAttribute('formated_price', $option['formated_price']);
|
144 |
}
|
145 |
if (sizeof($_attributes) > 1) {
|
146 |
+
$this->_prepareRecursivelyRelatedValues($valueNode, $_attributes, $option['products'], 1);
|
|
|
|
|
|
|
|
|
|
|
147 |
}
|
148 |
}
|
149 |
$isFirst = false;
|
199 |
$_attrClone = $attributes;
|
200 |
if (next($_attrClone) != false) {
|
201 |
reset($_attrClone);
|
202 |
+
$this->_prepareRecursivelyRelatedValues($_valueNode, $_attrClone, $intersect, $cycle + 1);
|
|
|
|
|
|
|
|
|
|
|
203 |
}
|
204 |
}
|
205 |
}
|
app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Giftcard.php
CHANGED
@@ -31,8 +31,7 @@
|
|
31 |
* @package Mage_XmlConnect
|
32 |
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
*/
|
34 |
-
class Mage_XmlConnect_Block_Catalog_Product_Options_Giftcard
|
35 |
-
extends Mage_XmlConnect_Block_Catalog_Product_Options
|
36 |
{
|
37 |
/**
|
38 |
* Get sender name
|
@@ -172,12 +171,9 @@ class Mage_XmlConnect_Block_Catalog_Product_Options_Giftcard
|
|
172 |
if ($configValue == $price) {
|
173 |
$amountNode->addAttribute('selected', 1);
|
174 |
}
|
175 |
-
$amountNode->addAttribute(
|
176 |
-
|
177 |
-
|
178 |
-
$coreHelper->currency($price, true, false)
|
179 |
-
)
|
180 |
-
);
|
181 |
$amountNode->addAttribute('price', $price);
|
182 |
}
|
183 |
}
|
@@ -186,17 +182,13 @@ class Mage_XmlConnect_Block_Catalog_Product_Options_Giftcard
|
|
186 |
/**
|
187 |
* Render open amount options
|
188 |
*/
|
189 |
-
|
190 |
/** @var $openAmountNode Mage_XmlConnect_Model_Simplexml_Element */
|
191 |
$openAmountNode = $optionsXmlObj->addChild('open_amount');
|
192 |
if ($product->getAllowOpenAmount()) {
|
193 |
$openAmountNode->addAttribute('enabled', 1);
|
194 |
|
195 |
if ($configValue == 'custom') {
|
196 |
-
$openAmountNode->addAttribute(
|
197 |
-
'selected_amount',
|
198 |
-
$this->getDefaultValue('custom_giftcard_amount')
|
199 |
-
);
|
200 |
}
|
201 |
if ($priceModel->getMinAmount($product)) {
|
202 |
$minPrice = $product->getOpenAmountMin();
|
@@ -204,10 +196,7 @@ class Mage_XmlConnect_Block_Catalog_Product_Options_Giftcard
|
|
204 |
} else {
|
205 |
$minAmount = $minPrice = 0;
|
206 |
}
|
207 |
-
$openAmountNode->addAttribute(
|
208 |
-
'formatted_min_amount',
|
209 |
-
$xmlModel->xmlAttribute($minAmount)
|
210 |
-
);
|
211 |
$openAmountNode->addAttribute('min_amount', $minPrice);
|
212 |
|
213 |
if ($priceModel->getMaxAmount($product)) {
|
@@ -216,10 +205,7 @@ class Mage_XmlConnect_Block_Catalog_Product_Options_Giftcard
|
|
216 |
} else {
|
217 |
$maxAmount = $maxPrice = 0;
|
218 |
}
|
219 |
-
$openAmountNode->addAttribute(
|
220 |
-
'formatted_max_amount',
|
221 |
-
$xmlModel->xmlAttribute($maxAmount)
|
222 |
-
);
|
223 |
$openAmountNode->addAttribute('max_amount', $maxPrice);
|
224 |
} else {
|
225 |
$openAmountNode->addAttribute('enabled', 0);
|
@@ -228,89 +214,56 @@ class Mage_XmlConnect_Block_Catalog_Product_Options_Giftcard
|
|
228 |
/**
|
229 |
* Render Gift Card form options
|
230 |
*/
|
231 |
-
$form = $optionsXmlObj->addCustomChild(
|
232 |
-
'form',
|
233 |
-
|
234 |
-
|
235 |
-
'name' => 'giftcard-send-form',
|
236 |
-
'method' => 'post'
|
237 |
-
)
|
238 |
-
);
|
239 |
|
240 |
-
$senderFieldset = $form->addCustomChild(
|
241 |
-
'
|
242 |
-
|
243 |
-
array(
|
244 |
-
'legend' => $this->__('Sender Information')
|
245 |
-
)
|
246 |
-
);
|
247 |
|
248 |
-
$senderFieldset->addField(
|
249 |
-
'
|
250 |
-
'
|
251 |
-
|
252 |
-
|
253 |
-
'required' => 'true',
|
254 |
-
'value' => $this->getSenderName()
|
255 |
-
)
|
256 |
-
);
|
257 |
|
258 |
-
$recipientFieldset = $form->addCustomChild(
|
259 |
-
'
|
260 |
-
|
261 |
-
array(
|
262 |
-
'legend' => $this->__('Recipient Information')
|
263 |
-
)
|
264 |
-
);
|
265 |
|
266 |
-
$recipientFieldset->addField(
|
267 |
-
'
|
268 |
-
'
|
269 |
-
|
270 |
-
|
271 |
-
'required' => 'true',
|
272 |
-
'value' => $this->getDefaultValue('giftcard_recipient_name')
|
273 |
-
)
|
274 |
-
);
|
275 |
|
276 |
if ($this->isEmailAvailable($product)) {
|
277 |
-
$senderFieldset->addField(
|
278 |
-
'
|
279 |
-
'
|
280 |
-
|
281 |
-
|
282 |
-
'required' => 'true',
|
283 |
-
'value' => $this->getSenderEmail()
|
284 |
-
)
|
285 |
-
);
|
286 |
|
287 |
-
$recipientFieldset->addField(
|
288 |
-
'
|
289 |
-
'
|
290 |
-
|
291 |
-
|
292 |
-
'required' => 'true',
|
293 |
-
'value' => $this->getDefaultValue('giftcard_recipient_email')
|
294 |
-
)
|
295 |
-
);
|
296 |
}
|
297 |
|
298 |
if ($this->isMessageAvailable($product)) {
|
299 |
$messageMaxLength = (int) Mage::getStoreConfig(
|
300 |
Enterprise_GiftCard_Model_Giftcard::XML_PATH_MESSAGE_MAX_LENGTH
|
301 |
);
|
302 |
-
$recipientFieldset->addField(
|
303 |
-
'
|
304 |
-
'
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
'max_length'=> $messageMaxLength,
|
309 |
-
'value' => $this->getDefaultValue('giftcard_message')
|
310 |
-
)
|
311 |
-
);
|
312 |
}
|
313 |
-
|
314 |
return $isObject ? $xmlModel : $xmlModel->asNiceXml();
|
315 |
}
|
316 |
}
|
31 |
* @package Mage_XmlConnect
|
32 |
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
*/
|
34 |
+
class Mage_XmlConnect_Block_Catalog_Product_Options_Giftcard extends Mage_XmlConnect_Block_Catalog_Product_Options
|
|
|
35 |
{
|
36 |
/**
|
37 |
* Get sender name
|
171 |
if ($configValue == $price) {
|
172 |
$amountNode->addAttribute('selected', 1);
|
173 |
}
|
174 |
+
$amountNode->addAttribute('formatted_price', $xmlModel->xmlAttribute(
|
175 |
+
$coreHelper->currency($price, true, false)
|
176 |
+
));
|
|
|
|
|
|
|
177 |
$amountNode->addAttribute('price', $price);
|
178 |
}
|
179 |
}
|
182 |
/**
|
183 |
* Render open amount options
|
184 |
*/
|
|
|
185 |
/** @var $openAmountNode Mage_XmlConnect_Model_Simplexml_Element */
|
186 |
$openAmountNode = $optionsXmlObj->addChild('open_amount');
|
187 |
if ($product->getAllowOpenAmount()) {
|
188 |
$openAmountNode->addAttribute('enabled', 1);
|
189 |
|
190 |
if ($configValue == 'custom') {
|
191 |
+
$openAmountNode->addAttribute('selected_amount', $this->getDefaultValue('custom_giftcard_amount'));
|
|
|
|
|
|
|
192 |
}
|
193 |
if ($priceModel->getMinAmount($product)) {
|
194 |
$minPrice = $product->getOpenAmountMin();
|
196 |
} else {
|
197 |
$minAmount = $minPrice = 0;
|
198 |
}
|
199 |
+
$openAmountNode->addAttribute('formatted_min_amount', $xmlModel->xmlAttribute($minAmount));
|
|
|
|
|
|
|
200 |
$openAmountNode->addAttribute('min_amount', $minPrice);
|
201 |
|
202 |
if ($priceModel->getMaxAmount($product)) {
|
205 |
} else {
|
206 |
$maxAmount = $maxPrice = 0;
|
207 |
}
|
208 |
+
$openAmountNode->addAttribute('formatted_max_amount', $xmlModel->xmlAttribute($maxAmount));
|
|
|
|
|
|
|
209 |
$openAmountNode->addAttribute('max_amount', $maxPrice);
|
210 |
} else {
|
211 |
$openAmountNode->addAttribute('enabled', 0);
|
214 |
/**
|
215 |
* Render Gift Card form options
|
216 |
*/
|
217 |
+
$form = $optionsXmlObj->addCustomChild('form', null, array(
|
218 |
+
'name' => 'giftcard-send-form',
|
219 |
+
'method' => 'post'
|
220 |
+
));
|
|
|
|
|
|
|
|
|
221 |
|
222 |
+
$senderFieldset = $form->addCustomChild('fieldset', null, array(
|
223 |
+
'legend' => $this->__('Sender Information')
|
224 |
+
));
|
|
|
|
|
|
|
|
|
225 |
|
226 |
+
$senderFieldset->addField('giftcard_sender_name', 'text', array(
|
227 |
+
'label' => Mage::helper('enterprise_giftcard')->__('Sender Name'),
|
228 |
+
'required' => 'true',
|
229 |
+
'value' => $this->getSenderName()
|
230 |
+
));
|
|
|
|
|
|
|
|
|
231 |
|
232 |
+
$recipientFieldset = $form->addCustomChild('fieldset', null, array(
|
233 |
+
'legend' => $this->__('Recipient Information')
|
234 |
+
));
|
|
|
|
|
|
|
|
|
235 |
|
236 |
+
$recipientFieldset->addField('giftcard_recipient_name', 'text', array(
|
237 |
+
'label' => Mage::helper('enterprise_giftcard')->__('Recipient Name'),
|
238 |
+
'required' => 'true',
|
239 |
+
'value' => $this->getDefaultValue('giftcard_recipient_name')
|
240 |
+
));
|
|
|
|
|
|
|
|
|
241 |
|
242 |
if ($this->isEmailAvailable($product)) {
|
243 |
+
$senderFieldset->addField('giftcard_sender_email', 'email', array(
|
244 |
+
'label' => Mage::helper('enterprise_giftcard')->__('Sender Email'),
|
245 |
+
'required' => 'true',
|
246 |
+
'value' => $this->getSenderEmail()
|
247 |
+
));
|
|
|
|
|
|
|
|
|
248 |
|
249 |
+
$recipientFieldset->addField('giftcard_recipient_email', 'email', array(
|
250 |
+
'label' => Mage::helper('enterprise_giftcard')->__('Recipient Email'),
|
251 |
+
'required' => 'true',
|
252 |
+
'value' => $this->getDefaultValue('giftcard_recipient_email')
|
253 |
+
));
|
|
|
|
|
|
|
|
|
254 |
}
|
255 |
|
256 |
if ($this->isMessageAvailable($product)) {
|
257 |
$messageMaxLength = (int) Mage::getStoreConfig(
|
258 |
Enterprise_GiftCard_Model_Giftcard::XML_PATH_MESSAGE_MAX_LENGTH
|
259 |
);
|
260 |
+
$recipientFieldset->addField('giftcard_message', 'textarea', array(
|
261 |
+
'label' => Mage::helper('enterprise_giftcard')->__('Message'),
|
262 |
+
'required' => 'false',
|
263 |
+
'max_length'=> $messageMaxLength,
|
264 |
+
'value' => $this->getDefaultValue('giftcard_message')
|
265 |
+
));
|
|
|
|
|
|
|
|
|
266 |
}
|
|
|
267 |
return $isObject ? $xmlModel : $xmlModel->asNiceXml();
|
268 |
}
|
269 |
}
|
app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Grouped.php
CHANGED
@@ -83,16 +83,10 @@ class Mage_XmlConnect_Block_Catalog_Product_Options_Grouped extends Mage_XmlConn
|
|
83 |
|
84 |
if ($productPrice != 0) {
|
85 |
$productPrice = Mage::helper('xmlconnect')->formatPriceForXml($productPrice);
|
86 |
-
$optionNode->addAttribute(
|
87 |
-
'
|
88 |
-
|
89 |
-
|
90 |
-
)
|
91 |
-
);
|
92 |
-
$optionNode->addAttribute(
|
93 |
-
'formated_price',
|
94 |
-
$this->_formatPriceString($productPrice, $product)
|
95 |
-
);
|
96 |
}
|
97 |
}
|
98 |
|
83 |
|
84 |
if ($productPrice != 0) {
|
85 |
$productPrice = Mage::helper('xmlconnect')->formatPriceForXml($productPrice);
|
86 |
+
$optionNode->addAttribute('price', Mage::helper('xmlconnect')->formatPriceForXml(
|
87 |
+
Mage::helper('core')->currency($productPrice, false, false)
|
88 |
+
));
|
89 |
+
$optionNode->addAttribute('formated_price', $this->_formatPriceString($productPrice, $product));
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
}
|
91 |
}
|
92 |
|
app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Simple.php
CHANGED
@@ -31,8 +31,7 @@
|
|
31 |
* @package Mage_XmlConnect
|
32 |
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
*/
|
34 |
-
class Mage_XmlConnect_Block_Catalog_Product_Options_Simple
|
35 |
-
extends Mage_XmlConnect_Block_Catalog_Product_Options
|
36 |
{
|
37 |
/**
|
38 |
* Generate simple product options xml
|
31 |
* @package Mage_XmlConnect
|
32 |
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
*/
|
34 |
+
class Mage_XmlConnect_Block_Catalog_Product_Options_Simple extends Mage_XmlConnect_Block_Catalog_Product_Options
|
|
|
35 |
{
|
36 |
/**
|
37 |
* Generate simple product options xml
|
app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Virtual.php
CHANGED
@@ -31,8 +31,7 @@
|
|
31 |
* @package Mage_XmlConnect
|
32 |
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
*/
|
34 |
-
class Mage_XmlConnect_Block_Catalog_Product_Options_Virtual
|
35 |
-
extends Mage_XmlConnect_Block_Catalog_Product_Options
|
36 |
{
|
37 |
/**
|
38 |
* Generate virtual product options xml
|
31 |
* @package Mage_XmlConnect
|
32 |
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
*/
|
34 |
+
class Mage_XmlConnect_Block_Catalog_Product_Options_Virtual extends Mage_XmlConnect_Block_Catalog_Product_Options
|
|
|
35 |
{
|
36 |
/**
|
37 |
* Generate virtual product options xml
|
app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price/Bundle.php
CHANGED
@@ -31,8 +31,7 @@
|
|
31 |
* @package Mage_XmlConnect
|
32 |
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
*/
|
34 |
-
class Mage_XmlConnect_Block_Catalog_Product_Price_Bundle
|
35 |
-
extends Mage_Bundle_Block_Catalog_Product_Price
|
36 |
{
|
37 |
/**
|
38 |
* Collect product prices to specified item xml object
|
@@ -41,13 +40,9 @@ class Mage_XmlConnect_Block_Catalog_Product_Price_Bundle
|
|
41 |
* @param Mage_XmlConnect_Model_Simplexml_Element $item
|
42 |
*/
|
43 |
public function collectProductPrices(
|
44 |
-
Mage_Catalog_Model_Product $product,
|
45 |
-
|
46 |
-
|
47 |
-
{
|
48 |
-
$this->setProduct($product)
|
49 |
-
->setDisplayMinimalPrice(true)
|
50 |
-
->setUseLinkForAsLowAs(false);
|
51 |
|
52 |
$priceXmlObj = $item->addChild('price');
|
53 |
|
@@ -93,8 +88,7 @@ class Mage_XmlConnect_Block_Catalog_Product_Price_Bundle
|
|
93 |
if ($product->getPriceView()) {
|
94 |
if ($_taxHelper->displayBothPrices()) {
|
95 |
$priceXmlObj->addAttribute(
|
96 |
-
'as_low_as_excluding_tax',
|
97 |
-
$_coreHelper->currency($_minimalPriceTax, true, false)
|
98 |
);
|
99 |
if ($_weeeTaxAmount && $product->getPriceType() == 1
|
100 |
&& $_weeeHelper->typeOfDisplay($product, array(2, 1, 4))
|
@@ -118,13 +112,11 @@ class Mage_XmlConnect_Block_Catalog_Product_Price_Bundle
|
|
118 |
}
|
119 |
}
|
120 |
$priceXmlObj->addAttribute(
|
121 |
-
'as_low_as_including_tax',
|
122 |
-
$_coreHelper->currency($_minimalPriceInclTax, true, false)
|
123 |
);
|
124 |
} else {
|
125 |
$priceXmlObj->addAttribute(
|
126 |
-
'as_low_as',
|
127 |
-
$_coreHelper->currency($_minimalPriceTax, true, false)
|
128 |
);
|
129 |
if ($_weeeTaxAmount && $product->getPriceType() == 1
|
130 |
&& $_weeeHelper->typeOfDisplay($product, array(2, 1, 4))
|
@@ -142,13 +134,14 @@ class Mage_XmlConnect_Block_Catalog_Product_Price_Bundle
|
|
142 |
$weeeItemXmlObj->addAttribute(
|
143 |
'name', $weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName())
|
144 |
);
|
145 |
-
$weeeItemXmlObj->addAttribute(
|
|
|
|
|
146 |
}
|
147 |
}
|
148 |
if ($_weeeHelper->typeOfDisplay($product, 2) && $_weeeTaxAmount) {
|
149 |
$priceXmlObj->addAttribute(
|
150 |
-
'as_low_as_including_tax',
|
151 |
-
$_coreHelper->currency($_minimalPriceInclTax, true, false)
|
152 |
);
|
153 |
}
|
154 |
}
|
@@ -159,8 +152,7 @@ class Mage_XmlConnect_Block_Catalog_Product_Price_Bundle
|
|
159 |
if ($_minimalPrice <> $_maximalPrice) {
|
160 |
if ($_taxHelper->displayBothPrices()) {
|
161 |
$priceXmlObj->addAttribute(
|
162 |
-
'from_excluding_tax',
|
163 |
-
$_coreHelper->currency($_minimalPriceTax, true, false)
|
164 |
);
|
165 |
if ($_weeeTaxAmount && $product->getPriceType() == 1
|
166 |
&& $_weeeHelper->typeOfDisplay($product, array(2, 1, 4))
|
@@ -178,18 +170,16 @@ class Mage_XmlConnect_Block_Catalog_Product_Price_Bundle
|
|
178 |
$weeeItemXmlObj->addAttribute(
|
179 |
'name', $weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName())
|
180 |
);
|
181 |
-
$weeeItemXmlObj->addAttribute(
|
|
|
|
|
182 |
}
|
183 |
}
|
184 |
$priceXmlObj->addAttribute(
|
185 |
-
'from_including_tax',
|
186 |
-
$_coreHelper->currency($_minimalPriceInclTax, true, false)
|
187 |
);
|
188 |
} else {
|
189 |
-
$priceXmlObj->addAttribute(
|
190 |
-
'from',
|
191 |
-
$_coreHelper->currency($_minimalPriceTax, true, false)
|
192 |
-
);
|
193 |
if ($_weeeTaxAmount && $product->getPriceType() == 1
|
194 |
&& $_weeeHelper->typeOfDisplay($product, array(2, 1, 4))
|
195 |
) {
|
@@ -211,8 +201,7 @@ class Mage_XmlConnect_Block_Catalog_Product_Price_Bundle
|
|
211 |
}
|
212 |
if ($_weeeHelper->typeOfDisplay($product, 2) && $_weeeTaxAmount) {
|
213 |
$priceXmlObj->addAttribute(
|
214 |
-
'from_including_tax',
|
215 |
-
$_coreHelper->currency($_minimalPriceInclTax, true, false)
|
216 |
);
|
217 |
}
|
218 |
}
|
@@ -232,8 +221,7 @@ class Mage_XmlConnect_Block_Catalog_Product_Price_Bundle
|
|
232 |
|
233 |
if ($_taxHelper->displayBothPrices()) {
|
234 |
$priceXmlObj->addAttribute(
|
235 |
-
'to_excluding_tax',
|
236 |
-
$_coreHelper->currency($_maximalPriceTax, true, false)
|
237 |
);
|
238 |
if ($_weeeTaxAmount && $product->getPriceType() == 1
|
239 |
&& $_weeeHelper->typeOfDisplay($product, array(2, 1, 4))
|
@@ -251,14 +239,18 @@ class Mage_XmlConnect_Block_Catalog_Product_Price_Bundle
|
|
251 |
$weeeItemXmlObj->addAttribute(
|
252 |
'name', $weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName())
|
253 |
);
|
254 |
-
$weeeItemXmlObj->addAttribute(
|
|
|
|
|
255 |
}
|
256 |
}
|
257 |
$priceXmlObj->addAttribute(
|
258 |
'to_including_tax', $_coreHelper->currency($_maximalPriceInclTax, true, false)
|
259 |
);
|
260 |
} else {
|
261 |
-
$priceXmlObj->addAttribute(
|
|
|
|
|
262 |
if ($_weeeTaxAmount && $product->getPriceType() == 1
|
263 |
&& $_weeeHelper->typeOfDisplay($product, array(2, 1, 4))
|
264 |
) {
|
@@ -273,19 +265,16 @@ class Mage_XmlConnect_Block_Catalog_Product_Price_Bundle
|
|
273 |
}
|
274 |
$weeeItemXmlObj = $weeeXmlObj->addChild('item');
|
275 |
$weeeItemXmlObj->addAttribute(
|
276 |
-
'name',
|
277 |
-
$weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName())
|
278 |
);
|
279 |
$weeeItemXmlObj->addAttribute(
|
280 |
-
'amount',
|
281 |
-
$_coreHelper->currency($amount, true, false)
|
282 |
);
|
283 |
}
|
284 |
}
|
285 |
if ($_weeeHelper->typeOfDisplay($product, 2) && $_weeeTaxAmount) {
|
286 |
$priceXmlObj->addAttribute(
|
287 |
-
'to_including_tax',
|
288 |
-
$_coreHelper->currency($_maximalPriceInclTax, true, false)
|
289 |
);
|
290 |
}
|
291 |
}
|
@@ -295,8 +284,7 @@ class Mage_XmlConnect_Block_Catalog_Product_Price_Bundle
|
|
295 |
} else {
|
296 |
if ($_taxHelper->displayBothPrices()) {
|
297 |
$priceXmlObj->addAttribute(
|
298 |
-
'excluding_tax',
|
299 |
-
$_coreHelper->currency($_minimalPriceTax, true, false)
|
300 |
);
|
301 |
if ($_weeeTaxAmount && $product->getPriceType() == 1
|
302 |
&& $_weeeHelper->typeOfDisplay($product, array(2, 1, 4))
|
@@ -312,23 +300,19 @@ class Mage_XmlConnect_Block_Catalog_Product_Price_Bundle
|
|
312 |
}
|
313 |
$weeeItemXmlObj = $weeeXmlObj->addChild('item');
|
314 |
$weeeItemXmlObj->addAttribute(
|
315 |
-
'name',
|
316 |
-
$weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName())
|
317 |
);
|
318 |
$weeeItemXmlObj->addAttribute(
|
319 |
-
'amount',
|
320 |
-
$_coreHelper->currency($amount, true, false)
|
321 |
);
|
322 |
}
|
323 |
}
|
324 |
$priceXmlObj->addAttribute(
|
325 |
-
'including_tax',
|
326 |
-
$_coreHelper->currency($_minimalPriceInclTax, true, false)
|
327 |
);
|
328 |
} else {
|
329 |
$priceXmlObj->addAttribute(
|
330 |
-
'regular',
|
331 |
-
$_coreHelper->currency($_minimalPriceTax, true, false)
|
332 |
);
|
333 |
if ($_weeeTaxAmount && $product->getPriceType() == 1
|
334 |
&& $_weeeHelper->typeOfDisplay($product, array(2, 1, 4))
|
@@ -344,19 +328,16 @@ class Mage_XmlConnect_Block_Catalog_Product_Price_Bundle
|
|
344 |
}
|
345 |
$weeeItemXmlObj = $weeeXmlObj->addChild('item');
|
346 |
$weeeItemXmlObj->addAttribute(
|
347 |
-
'name',
|
348 |
-
$weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName())
|
349 |
);
|
350 |
$weeeItemXmlObj->addAttribute(
|
351 |
-
'amount',
|
352 |
-
$_coreHelper->currency($amount, true, false)
|
353 |
);
|
354 |
}
|
355 |
}
|
356 |
if ($_weeeHelper->typeOfDisplay($product, 2) && $_weeeTaxAmount) {
|
357 |
$priceXmlObj->addAttribute(
|
358 |
-
'including_tax',
|
359 |
-
$_coreHelper->currency($_minimalPriceInclTax, true, false)
|
360 |
);
|
361 |
}
|
362 |
}
|
31 |
* @package Mage_XmlConnect
|
32 |
* @author Magento Core Team <core@magentocommerce.com>
|
33 |
*/
|
34 |
+
class Mage_XmlConnect_Block_Catalog_Product_Price_Bundle extends Mage_Bundle_Block_Catalog_Product_Price
|
|
|
35 |
{
|
36 |
/**
|
37 |
* Collect product prices to specified item xml object
|
40 |
* @param Mage_XmlConnect_Model_Simplexml_Element $item
|
41 |
*/
|
42 |
public function collectProductPrices(
|
43 |
+
Mage_Catalog_Model_Product $product, Mage_XmlConnect_Model_Simplexml_Element $item
|
44 |
+
) {
|
45 |
+
$this->setProduct($product)->setDisplayMinimalPrice(true) ->setUseLinkForAsLowAs(false);
|
|
|
|
|
|
|
|
|
46 |
|
47 |
$priceXmlObj = $item->addChild('price');
|
48 |
|
88 |
if ($product->getPriceView()) {
|
89 |
if ($_taxHelper->displayBothPrices()) {
|
90 |
$priceXmlObj->addAttribute(
|
91 |
+
'as_low_as_excluding_tax', $_coreHelper->currency($_minimalPriceTax, true, false)
|
|
|
92 |
);
|
93 |
if ($_weeeTaxAmount && $product->getPriceType() == 1
|
94 |
&& $_weeeHelper->typeOfDisplay($product, array(2, 1, 4))
|
112 |
}
|
113 |
}
|
114 |
$priceXmlObj->addAttribute(
|
115 |
+
'as_low_as_including_tax', $_coreHelper->currency($_minimalPriceInclTax, true, false)
|
|
|
116 |
);
|
117 |
} else {
|
118 |
$priceXmlObj->addAttribute(
|
119 |
+
'as_low_as', $_coreHelper->currency($_minimalPriceTax, true, false)
|
|
|
120 |
);
|
121 |
if ($_weeeTaxAmount && $product->getPriceType() == 1
|
122 |
&& $_weeeHelper->typeOfDisplay($product, array(2, 1, 4))
|
134 |
$weeeItemXmlObj->addAttribute(
|
135 |
'name', $weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName())
|
136 |
);
|
137 |
+
$weeeItemXmlObj->addAttribute(
|
138 |
+
'amount', $_coreHelper->currency($amount, true, false)
|
139 |
+
);
|
140 |
}
|
141 |
}
|
142 |
if ($_weeeHelper->typeOfDisplay($product, 2) && $_weeeTaxAmount) {
|
143 |
$priceXmlObj->addAttribute(
|
144 |
+
'as_low_as_including_tax', $_coreHelper->currency($_minimalPriceInclTax, true, false)
|
|
|
145 |
);
|
146 |
}
|
147 |
}
|
152 |
if ($_minimalPrice <> $_maximalPrice) {
|
153 |
if ($_taxHelper->displayBothPrices()) {
|
154 |
$priceXmlObj->addAttribute(
|
155 |
+
'from_excluding_tax', $_coreHelper->currency($_minimalPriceTax, true, false)
|
|
|
156 |
);
|
157 |
if ($_weeeTaxAmount && $product->getPriceType() == 1
|
158 |
&& $_weeeHelper->typeOfDisplay($product, array(2, 1, 4))
|
170 |
$weeeItemXmlObj->addAttribute(
|
171 |
'name', $weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName())
|
172 |
);
|
173 |
+
$weeeItemXmlObj->addAttribute(
|
174 |
+
'amount', $_coreHelper->currency($amount, true, false)
|
175 |
+
);
|
176 |
}
|
177 |
}
|
178 |
$priceXmlObj->addAttribute(
|
179 |
+
'from_including_tax', $_coreHelper->currency($_minimalPriceInclTax, true, false)
|
|
|
180 |
);
|
181 |
} else {
|
182 |
+
$priceXmlObj->addAttribute('from', $_coreHelper->currency($_minimalPriceTax, true, false));
|
|
|
|
|
|
|
183 |
if ($_weeeTaxAmount && $product->getPriceType() == 1
|
184 |
&& $_weeeHelper->typeOfDisplay($product, array(2, 1, 4))
|
185 |
) {
|
201 |
}
|
202 |
if ($_weeeHelper->typeOfDisplay($product, 2) && $_weeeTaxAmount) {
|
203 |
$priceXmlObj->addAttribute(
|
204 |
+
'from_including_tax', $_coreHelper->currency($_minimalPriceInclTax, true, false)
|
|
|
205 |
);
|
206 |
}
|
207 |
}
|
221 |
|
222 |
if ($_taxHelper->displayBothPrices()) {
|
223 |
$priceXmlObj->addAttribute(
|
224 |
+
'to_excluding_tax', $_coreHelper->currency($_maximalPriceTax, true, false)
|
|
|
225 |
);
|
226 |
if ($_weeeTaxAmount && $product->getPriceType() == 1
|
227 |
&& $_weeeHelper->typeOfDisplay($product, array(2, 1, 4))
|
239 |
$weeeItemXmlObj->addAttribute(
|
240 |
'name', $weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName())
|
241 |
|