From 9de22232a890e87c416e4dbce945e09483f6e8ea Mon Sep 17 00:00:00 2001 From: mage2-team Date: Thu, 1 Mar 2012 18:41:25 -0800 Subject: [PATCH] Published Magento 2 update as of 2/29/2012 - Added jQuery to Magento 2. It has not been made a main library yet, however all new features are developed using jQuery. - Added support for new versions of testing tools - PHPUnit 3.6, PHPMD 1.3.0. Confirmed compatibility with latest PHPCS 1.3.2 and PHPCPD 1.3.5. - Improved legacy tests: -- Refactored Integrity_ClassesTest and Legacy_ClassesTest. -- Implemented a tool for migrating factory names from 1.x to 2.x. The tool scans PHP-code and replaces the most "popular" cases. -- Added tests for "//model" in config.xml files and "//*[@module]" in all xml files. -- Implemented a test that verifies the absence of relocated directories. -- Added a test against the obsolete Varien_Profiler. - Bug fixes: -- Fixed phpdoc for Mage_Core_Model_Design_Package. -- Fixed static code analysis failures related to case-sensitivity. -- Fixed several typos and minor mistakes. -- Fixed integration test's failures due to specifics of xpath library version. - Imported fresh features and bug fixes from Magento 1.x. --- .gitignore | 1 - app/Mage.php | 49 +- app/bootstrap.php | 2 +- .../Phoenix/Moneybookers/Block/Form.php | 2 +- .../Phoenix/Moneybookers/Block/Info.php | 2 +- .../Phoenix/Moneybookers/Block/Jsinit.php | 2 +- .../Phoenix/Moneybookers/Block/Payment.php | 2 +- .../Phoenix/Moneybookers/Block/Placeform.php | 2 +- .../Phoenix/Moneybookers/Block/Redirect.php | 2 +- .../Phoenix/Moneybookers/Helper/Data.php | 2 +- .../Phoenix/Moneybookers/Model/Abstract.php | 2 +- .../Phoenix/Moneybookers/Model/Acc.php | 2 +- .../Phoenix/Moneybookers/Model/Csi.php | 2 +- .../Phoenix/Moneybookers/Model/Did.php | 2 +- .../Phoenix/Moneybookers/Model/Dnk.php | 2 +- .../Phoenix/Moneybookers/Model/Ebt.php | 2 +- .../Phoenix/Moneybookers/Model/Ent.php | 2 +- .../Phoenix/Moneybookers/Model/Event.php | 2 +- .../Phoenix/Moneybookers/Model/Gcb.php | 2 +- .../Phoenix/Moneybookers/Model/Gir.php | 2 +- .../Phoenix/Moneybookers/Model/Idl.php | 2 +- .../Phoenix/Moneybookers/Model/Lsr.php | 2 +- .../Phoenix/Moneybookers/Model/Mae.php | 2 +- .../Phoenix/Moneybookers/Model/Npy.php | 2 +- .../Phoenix/Moneybookers/Model/Obt.php | 2 +- .../Phoenix/Moneybookers/Model/Pli.php | 2 +- .../Phoenix/Moneybookers/Model/Psp.php | 2 +- .../Phoenix/Moneybookers/Model/Pwy.php | 2 +- .../Phoenix/Moneybookers/Model/Sft.php | 2 +- .../Phoenix/Moneybookers/Model/So2.php | 2 +- .../Phoenix/Moneybookers/Model/Wlt.php | 2 +- .../controllers/MoneybookersController.php | 2 +- .../controllers/ProcessingController.php | 2 +- .../Phoenix/Moneybookers/etc/adminhtml.xml | 2 +- .../Phoenix/Moneybookers/etc/config.xml | 2 +- .../Phoenix/Moneybookers/etc/system.xml | 2 +- .../moneybookers_setup/install-1.6.0.0.php | 2 +- .../Moneybookers/view/adminhtml/activation.js | 2 +- .../Moneybookers/view/adminhtml/info.phtml | 2 +- .../Moneybookers/view/adminhtml/jsinit.phtml | 2 +- .../Moneybookers/view/adminhtml/layout.xml | 2 +- .../view/adminhtml/pdf/info.phtml | 2 +- .../Moneybookers/view/frontend/blank.phtml | 2 +- .../Moneybookers/view/frontend/form.phtml | 2 +- .../Moneybookers/view/frontend/info.phtml | 2 +- .../Moneybookers/view/frontend/layout.xml | 2 +- .../Moneybookers/view/frontend/payment.phtml | 2 +- .../view/frontend/placeform.phtml | 2 +- .../Moneybookers/view/frontend/redirect.phtml | 2 +- app/code/core/Mage/Admin/Helper/Data.php | 2 +- app/code/core/Mage/Admin/Model/Acl.php | 2 +- .../core/Mage/Admin/Model/Acl/Resource.php | 2 +- .../Mage/Admin/Model/Acl/Role/Generic.php | 2 +- .../core/Mage/Admin/Model/Acl/Role/Group.php | 2 +- .../Mage/Admin/Model/Acl/Role/Registry.php | 2 +- .../core/Mage/Admin/Model/Acl/Role/User.php | 2 +- app/code/core/Mage/Admin/Model/Config.php | 5 +- app/code/core/Mage/Admin/Model/Observer.php | 8 +- .../core/Mage/Admin/Model/Resource/Acl.php | 2 +- .../Model/Resource/Permissions/Collection.php | 2 +- .../core/Mage/Admin/Model/Resource/Role.php | 2 +- .../Admin/Model/Resource/Role/Collection.php | 2 +- .../core/Mage/Admin/Model/Resource/Roles.php | 2 +- .../Admin/Model/Resource/Roles/Collection.php | 2 +- .../Model/Resource/Roles/User/Collection.php | 2 +- .../core/Mage/Admin/Model/Resource/Rules.php | 2 +- .../Admin/Model/Resource/Rules/Collection.php | 2 +- .../core/Mage/Admin/Model/Resource/User.php | 2 +- .../Admin/Model/Resource/User/Collection.php | 2 +- app/code/core/Mage/Admin/Model/Role.php | 2 +- app/code/core/Mage/Admin/Model/Roles.php | 62 +- app/code/core/Mage/Admin/Model/Rules.php | 2 +- app/code/core/Mage/Admin/Model/Session.php | 2 +- app/code/core/Mage/Admin/Model/User.php | 15 +- .../data/admin_setup/data-install-1.6.0.0.php | 2 +- app/code/core/Mage/Admin/etc/config.xml | 2 +- .../Admin/sql/admin_setup/install-1.6.0.0.php | 2 +- .../mysql4-upgrade-1.6.0.0-1.6.1.0.php | 2 +- .../Mage/AdminNotification/Helper/Data.php | 2 +- .../Mage/AdminNotification/Model/Feed.php | 2 +- .../Mage/AdminNotification/Model/Inbox.php | 2 +- .../Mage/AdminNotification/Model/Observer.php | 2 +- .../Model/Resource/Inbox.php | 2 +- .../Model/Resource/Inbox/Collection.php | 2 +- .../Mage/AdminNotification/Model/Survey.php | 2 +- .../Mage/AdminNotification/etc/adminhtml.xml | 2 +- .../Mage/AdminNotification/etc/config.xml | 2 +- .../Mage/AdminNotification/etc/system.xml | 2 +- .../install-1.6.0.0.php | 2 +- .../core/Mage/Adminhtml/Block/Abstract.php | 2 +- .../core/Mage/Adminhtml/Block/Api/Buttons.php | 2 +- .../Mage/Adminhtml/Block/Api/Editroles.php | 2 +- .../Mage/Adminhtml/Block/Api/Grid/Role.php | 2 +- .../core/Mage/Adminhtml/Block/Api/Role.php | 2 +- .../Adminhtml/Block/Api/Role/Grid/User.php | 2 +- .../core/Mage/Adminhtml/Block/Api/Roles.php | 2 +- .../Mage/Adminhtml/Block/Api/Tab/Roleinfo.php | 2 +- .../Adminhtml/Block/Api/Tab/Rolesedit.php | 2 +- .../Adminhtml/Block/Api/Tab/Rolesusers.php | 2 +- .../core/Mage/Adminhtml/Block/Api/User.php | 12 +- .../Mage/Adminhtml/Block/Api/User/Edit.php | 2 +- .../Adminhtml/Block/Api/User/Edit/Form.php | 2 +- .../Block/Api/User/Edit/Tab/Main.php | 2 +- .../Block/Api/User/Edit/Tab/Roles.php | 2 +- .../Adminhtml/Block/Api/User/Edit/Tabs.php | 2 +- .../Mage/Adminhtml/Block/Api/User/Grid.php | 2 +- app/code/core/Mage/Adminhtml/Block/Backup.php | 66 +- .../Mage/Adminhtml/Block/Backup/Dialogs.php | 53 + .../core/Mage/Adminhtml/Block/Backup/Grid.php | 72 +- app/code/core/Mage/Adminhtml/Block/Cache.php | 2 +- .../Mage/Adminhtml/Block/Cache/Additional.php | 2 +- .../core/Mage/Adminhtml/Block/Cache/Grid.php | 2 +- .../Adminhtml/Block/Cache/Notifications.php | 2 +- .../Block/Catalog/Category/Abstract.php | 2 +- .../Catalog/Category/Checkboxes/Tree.php | 2 +- .../Adminhtml/Block/Catalog/Category/Edit.php | 2 +- .../Block/Catalog/Category/Edit/Form.php | 2 +- .../Block/Catalog/Category/Helper/Image.php | 2 +- .../Catalog/Category/Helper/Pricestep.php | 2 +- .../Category/Helper/Sortby/Available.php | 2 +- .../Category/Helper/Sortby/Default.php | 2 +- .../Block/Catalog/Category/Tab/Attributes.php | 4 +- .../Block/Catalog/Category/Tab/Design.php | 2 +- .../Block/Catalog/Category/Tab/General.php | 2 +- .../Block/Catalog/Category/Tab/Product.php | 2 +- .../Adminhtml/Block/Catalog/Category/Tabs.php | 2 +- .../Adminhtml/Block/Catalog/Category/Tree.php | 2 +- .../Block/Catalog/Category/Widget/Chooser.php | 2 +- .../Mage/Adminhtml/Block/Catalog/Form.php | 2 +- .../Form/Renderer/Attribute/Urlkey.php | 2 +- .../Form/Renderer/Config/DateFieldsOrder.php | 9 +- .../Form/Renderer/Config/YearRange.php | 2 +- .../Form/Renderer/Fieldset/Element.php | 2 +- .../Block/Catalog/Helper/Form/Wysiwyg.php | 2 +- .../Catalog/Helper/Form/Wysiwyg/Content.php | 2 +- .../Mage/Adminhtml/Block/Catalog/Product.php | 2 +- .../Block/Catalog/Product/Attribute.php | 2 +- .../Block/Catalog/Product/Attribute/Edit.php | 2 +- .../Catalog/Product/Attribute/Edit/Form.php | 2 +- .../Product/Attribute/Edit/Tab/Front.php | 2 +- .../Product/Attribute/Edit/Tab/Main.php | 2 +- .../Product/Attribute/Edit/Tab/Options.php | 2 +- .../Product/Attribute/Edit/Tab/System.php | 2 +- .../Catalog/Product/Attribute/Edit/Tabs.php | 2 +- .../Block/Catalog/Product/Attribute/Grid.php | 2 +- .../Attribute/New/Product/Attributes.php | 2 +- .../Product/Attribute/New/Product/Created.php | 2 +- .../Catalog/Product/Attribute/Set/Grid.php | 2 +- .../Catalog/Product/Attribute/Set/Main.php | 2 +- .../Attribute/Set/Main/Formattribute.php | 2 +- .../Product/Attribute/Set/Main/Formgroup.php | 2 +- .../Product/Attribute/Set/Main/Formset.php | 2 +- .../Attribute/Set/Main/Tree/Attribute.php | 2 +- .../Product/Attribute/Set/Main/Tree/Group.php | 2 +- .../Product/Attribute/Set/Toolbar/Add.php | 2 +- .../Product/Attribute/Set/Toolbar/Main.php | 2 +- .../Attribute/Set/Toolbar/Main/Filter.php | 2 +- .../Catalog/Product/Composite/Configure.php | 2 +- .../Block/Catalog/Product/Composite/Error.php | 2 +- .../Catalog/Product/Composite/Fieldset.php | 2 +- .../Composite/Fieldset/Configurable.php | 2 +- .../Product/Composite/Fieldset/Grouped.php | 2 +- .../Product/Composite/Fieldset/Options.php | 2 +- .../Product/Composite/Fieldset/Qty.php | 2 +- .../Product/Composite/Update/Result.php | 2 +- .../Block/Catalog/Product/Created.php | 2 +- .../Adminhtml/Block/Catalog/Product/Edit.php | 2 +- .../Catalog/Product/Edit/Action/Attribute.php | 2 +- .../Edit/Action/Attribute/Tab/Attributes.php | 10 +- .../Edit/Action/Attribute/Tab/Inventory.php | 2 +- .../Edit/Action/Attribute/Tab/Websites.php | 2 +- .../Product/Edit/Action/Attribute/Tabs.php | 2 +- .../Block/Catalog/Product/Edit/Js.php | 2 +- .../Product/Edit/Tab/Ajax/Serializer.php | 2 +- .../Block/Catalog/Product/Edit/Tab/Alerts.php | 2 +- .../Catalog/Product/Edit/Tab/Alerts/Price.php | 2 +- .../Catalog/Product/Edit/Tab/Alerts/Stock.php | 2 +- .../Catalog/Product/Edit/Tab/Attributes.php | 101 +- .../Product/Edit/Tab/Attributes/Create.php | 2 +- .../Catalog/Product/Edit/Tab/Categories.php | 2 +- .../Catalog/Product/Edit/Tab/Crosssell.php | 2 +- .../Catalog/Product/Edit/Tab/Inventory.php | 2 +- .../Catalog/Product/Edit/Tab/Options.php | 2 +- .../Product/Edit/Tab/Options/Option.php | 2 +- .../Edit/Tab/Options/Type/Abstract.php | 2 +- .../Product/Edit/Tab/Options/Type/Date.php | 2 +- .../Product/Edit/Tab/Options/Type/File.php | 2 +- .../Product/Edit/Tab/Options/Type/Select.php | 2 +- .../Product/Edit/Tab/Options/Type/Text.php | 2 +- .../Block/Catalog/Product/Edit/Tab/Price.php | 2 +- .../Catalog/Product/Edit/Tab/Price/Group.php | 97 + .../Product/Edit/Tab/Price/Group/Abstract.php | 348 ++ .../Product/Edit/Tab/Price/Recurring.php | 2 +- .../Catalog/Product/Edit/Tab/Price/Tier.php | 302 +- .../Catalog/Product/Edit/Tab/Related.php | 2 +- .../Catalog/Product/Edit/Tab/Reviews.php | 2 +- .../Catalog/Product/Edit/Tab/Settings.php | 2 +- .../Catalog/Product/Edit/Tab/Super/Config.php | 25 +- .../Product/Edit/Tab/Super/Config/Grid.php | 2 +- .../Super/Config/Grid/Filter/Inventory.php | 2 +- .../Super/Config/Grid/Renderer/Checkbox.php | 2 +- .../Super/Config/Grid/Renderer/Inventory.php | 2 +- .../Product/Edit/Tab/Super/Config/Simple.php | 21 +- .../Catalog/Product/Edit/Tab/Super/Group.php | 2 +- .../Product/Edit/Tab/Super/Settings.php | 2 +- .../Block/Catalog/Product/Edit/Tab/Tag.php | 2 +- .../Catalog/Product/Edit/Tab/Tag/Customer.php | 2 +- .../Block/Catalog/Product/Edit/Tab/Upsell.php | 2 +- .../Catalog/Product/Edit/Tab/Websites.php | 2 +- .../Block/Catalog/Product/Edit/Tabs.php | 2 +- .../Product/Edit/Tabs/Configurable.php | 2 +- .../Catalog/Product/Edit/Tabs/Grouped.php | 2 +- .../Product/Frontend/Product/Watermark.php | 2 +- .../Adminhtml/Block/Catalog/Product/Grid.php | 2 +- .../Catalog/Product/Helper/Form/Apply.php | 2 +- .../Catalog/Product/Helper/Form/Boolean.php | 2 +- .../Catalog/Product/Helper/Form/Config.php | 2 +- .../Catalog/Product/Helper/Form/Gallery.php | 2 +- .../Product/Helper/Form/Gallery/Content.php | 4 +- .../Catalog/Product/Helper/Form/Image.php | 2 +- .../Product/Helper/Form/Msrp/Enabled.php | 2 +- .../Product/Helper/Form/Msrp/Price.php | 2 +- .../Catalog/Product/Helper/Form/Price.php | 2 +- .../Catalog/Product/Helper/Form/Weight.php | 46 + .../Adminhtml/Block/Catalog/Product/Price.php | 2 +- .../Block/Catalog/Product/Widget/Chooser.php | 6 +- .../Product/Widget/Chooser/Container.php | 2 +- .../Mage/Adminhtml/Block/Catalog/Search.php | 2 +- .../Adminhtml/Block/Catalog/Search/Edit.php | 2 +- .../Block/Catalog/Search/Edit/Form.php | 54 +- .../Adminhtml/Block/Catalog/Search/Grid.php | 2 +- .../Adminhtml/Block/Checkout/Agreement.php | 4 +- .../Block/Checkout/Agreement/Edit.php | 4 +- .../Block/Checkout/Agreement/Edit/Form.php | 3 +- .../Block/Checkout/Agreement/Grid.php | 2 +- .../core/Mage/Adminhtml/Block/Cms/Block.php | 2 +- .../Mage/Adminhtml/Block/Cms/Block/Edit.php | 2 +- .../Adminhtml/Block/Cms/Block/Edit/Form.php | 7 +- .../Mage/Adminhtml/Block/Cms/Block/Grid.php | 2 +- .../Block/Cms/Block/Widget/Chooser.php | 2 +- .../core/Mage/Adminhtml/Block/Cms/Page.php | 2 +- .../Mage/Adminhtml/Block/Cms/Page/Edit.php | 2 +- .../Adminhtml/Block/Cms/Page/Edit/Form.php | 2 +- .../Block/Cms/Page/Edit/Tab/Content.php | 2 +- .../Block/Cms/Page/Edit/Tab/Design.php | 2 +- .../Block/Cms/Page/Edit/Tab/Main.php | 5 +- .../Block/Cms/Page/Edit/Tab/Meta.php | 2 +- .../Adminhtml/Block/Cms/Page/Edit/Tabs.php | 2 +- .../Mage/Adminhtml/Block/Cms/Page/Grid.php | 2 +- .../Block/Cms/Page/Grid/Renderer/Action.php | 2 +- .../Block/Cms/Page/Widget/Chooser.php | 2 +- .../Block/Cms/Wysiwyg/Images/Content.php | 2 +- .../Cms/Wysiwyg/Images/Content/Files.php | 2 +- .../Cms/Wysiwyg/Images/Content/Newfolder.php | 2 +- .../Cms/Wysiwyg/Images/Content/Uploader.php | 2 +- .../Block/Cms/Wysiwyg/Images/Tree.php | 2 +- .../core/Mage/Adminhtml/Block/Customer.php | 2 +- .../Mage/Adminhtml/Block/Customer/Edit.php | 2 +- .../Adminhtml/Block/Customer/Edit/Form.php | 2 +- .../Edit/Renderer/Attribute/Group.php | 105 + .../Block/Customer/Edit/Renderer/Newpass.php | 2 +- .../Block/Customer/Edit/Renderer/Region.php | 2 +- .../Block/Customer/Edit/Tab/Account.php | 76 +- .../Block/Customer/Edit/Tab/Addresses.php | 4 +- .../Block/Customer/Edit/Tab/Cart.php | 14 +- .../Block/Customer/Edit/Tab/Carts.php | 2 +- .../Block/Customer/Edit/Tab/Newsletter.php | 2 +- .../Customer/Edit/Tab/Newsletter/Grid.php | 2 +- .../Tab/Newsletter/Grid/Filter/Status.php | 2 +- .../Tab/Newsletter/Grid/Renderer/Action.php | 2 +- .../Tab/Newsletter/Grid/Renderer/Status.php | 2 +- .../Block/Customer/Edit/Tab/Orders.php | 2 +- .../Block/Customer/Edit/Tab/Reviews.php | 2 +- .../Adminhtml/Block/Customer/Edit/Tab/Tag.php | 2 +- .../Block/Customer/Edit/Tab/Tags.php | 2 +- .../Block/Customer/Edit/Tab/View.php | 2 +- .../Customer/Edit/Tab/View/Accordion.php | 6 +- .../Block/Customer/Edit/Tab/View/Cart.php | 2 +- .../Edit/Tab/View/Grid/Renderer/Item.php | 2 +- .../Block/Customer/Edit/Tab/View/Orders.php | 2 +- .../Block/Customer/Edit/Tab/View/Sales.php | 2 +- .../Block/Customer/Edit/Tab/View/Wishlist.php | 2 +- .../Block/Customer/Edit/Tab/Wishlist.php | 2 +- .../Wishlist/Grid/Renderer/Description.php | 2 +- .../Adminhtml/Block/Customer/Edit/Tabs.php | 2 +- .../Block/Customer/Form/Element/Boolean.php | 2 +- .../Block/Customer/Form/Element/File.php | 2 +- .../Block/Customer/Form/Element/Image.php | 2 +- .../Mage/Adminhtml/Block/Customer/Grid.php | 2 +- .../Block/Customer/Grid/Filter/Country.php | 2 +- .../Customer/Grid/Renderer/Multiaction.php | 2 +- .../Mage/Adminhtml/Block/Customer/Group.php | 2 +- .../Adminhtml/Block/Customer/Group/Edit.php | 2 +- .../Block/Customer/Group/Edit/Form.php | 5 +- .../Adminhtml/Block/Customer/Group/Grid.php | 2 +- .../Mage/Adminhtml/Block/Customer/Online.php | 2 +- .../Block/Customer/Online/Filter.php | 2 +- .../Adminhtml/Block/Customer/Online/Grid.php | 2 +- .../Customer/Online/Grid/Renderer/Ip.php | 2 +- .../Customer/Online/Grid/Renderer/Type.php | 2 +- .../Customer/Online/Grid/Renderer/Url.php | 2 +- .../Sales/Order/Address/Form/Renderer/Vat.php | 93 + .../Customer/System/Config/Validatevat.php | 79 + .../core/Mage/Adminhtml/Block/Dashboard.php | 2 +- .../Adminhtml/Block/Dashboard/Abstract.php | 2 +- .../Mage/Adminhtml/Block/Dashboard/Bar.php | 2 +- .../Adminhtml/Block/Dashboard/Diagrams.php | 2 +- .../Mage/Adminhtml/Block/Dashboard/Graph.php | 2 +- .../Mage/Adminhtml/Block/Dashboard/Grid.php | 2 +- .../Mage/Adminhtml/Block/Dashboard/Grids.php | 2 +- .../Adminhtml/Block/Dashboard/Orders/Grid.php | 2 +- .../Mage/Adminhtml/Block/Dashboard/Sales.php | 2 +- .../Block/Dashboard/Searches/Last.php | 2 +- .../Searches/Renderer/Searchquery.php | 2 +- .../Block/Dashboard/Searches/Top.php | 2 +- .../Adminhtml/Block/Dashboard/Tab/Amounts.php | 2 +- .../Block/Dashboard/Tab/Customers/Most.php | 2 +- .../Block/Dashboard/Tab/Customers/Newest.php | 2 +- .../Adminhtml/Block/Dashboard/Tab/Orders.php | 2 +- .../Block/Dashboard/Tab/Products/Ordered.php | 2 +- .../Block/Dashboard/Tab/Products/Viewed.php | 2 +- .../Mage/Adminhtml/Block/Dashboard/Totals.php | 2 +- app/code/core/Mage/Adminhtml/Block/Denied.php | 2 +- .../core/Mage/Adminhtml/Block/Html/Date.php | 2 +- .../core/Mage/Adminhtml/Block/Html/Select.php | 2 +- .../Mage/Adminhtml/Block/Media/Editor.php | 2 +- .../Mage/Adminhtml/Block/Media/Uploader.php | 7 +- .../core/Mage/Adminhtml/Block/Messages.php | 2 +- .../Adminhtml/Block/Newsletter/Problem.php | 2 +- .../Block/Newsletter/Problem/Grid.php | 2 +- .../Problem/Grid/Filter/Checkbox.php | 2 +- .../Problem/Grid/Renderer/Checkbox.php | 2 +- .../Mage/Adminhtml/Block/Newsletter/Queue.php | 2 +- .../Adminhtml/Block/Newsletter/Queue/Edit.php | 2 +- .../Block/Newsletter/Queue/Edit/Form.php | 2 +- .../Adminhtml/Block/Newsletter/Queue/Grid.php | 2 +- .../Newsletter/Queue/Grid/Renderer/Action.php | 2 +- .../Block/Newsletter/Queue/Preview.php | 2 +- .../Block/Newsletter/Queue/Preview/Form.php | 2 +- .../Adminhtml/Block/Newsletter/Subscriber.php | 2 +- .../Block/Newsletter/Subscriber/Grid.php | 2 +- .../Subscriber/Grid/Filter/Checkbox.php | 2 +- .../Subscriber/Grid/Filter/Website.php | 2 +- .../Subscriber/Grid/Renderer/Checkbox.php | 2 +- .../Adminhtml/Block/Newsletter/Template.php | 2 +- .../Block/Newsletter/Template/Edit.php | 2 +- .../Block/Newsletter/Template/Edit/Form.php | 2 +- .../Block/Newsletter/Template/Grid.php | 2 +- .../Template/Grid/Renderer/Action.php | 2 +- .../Template/Grid/Renderer/Sender.php | 2 +- .../Block/Newsletter/Template/Preview.php | 2 +- .../Newsletter/Template/Preview/Form.php | 2 +- .../Adminhtml/Block/Notification/Baseurl.php | 2 +- .../Adminhtml/Block/Notification/Grid.php | 2 +- .../Notification/Grid/Renderer/Actions.php | 2 +- .../Notification/Grid/Renderer/Notice.php | 2 +- .../Notification/Grid/Renderer/Severity.php | 2 +- .../Adminhtml/Block/Notification/Inbox.php | 2 +- .../Adminhtml/Block/Notification/Security.php | 2 +- .../Adminhtml/Block/Notification/Survey.php | 2 +- .../Adminhtml/Block/Notification/Toolbar.php | 2 +- .../Adminhtml/Block/Notification/Window.php | 2 +- app/code/core/Mage/Adminhtml/Block/Page.php | 2 +- .../core/Mage/Adminhtml/Block/Page/Footer.php | 2 +- .../core/Mage/Adminhtml/Block/Page/Head.php | 2 +- .../core/Mage/Adminhtml/Block/Page/Header.php | 2 +- .../core/Mage/Adminhtml/Block/Page/Menu.php | 2 +- .../Mage/Adminhtml/Block/Page/Notices.php | 2 +- .../Adminhtml/Block/Permissions/Buttons.php | 2 +- .../Adminhtml/Block/Permissions/Editroles.php | 2 +- .../Adminhtml/Block/Permissions/Grid/Role.php | 2 +- .../Adminhtml/Block/Permissions/Grid/User.php | 2 +- .../Mage/Adminhtml/Block/Permissions/Role.php | 2 +- .../Block/Permissions/Role/Grid/User.php | 2 +- .../Adminhtml/Block/Permissions/Roles.php | 2 +- .../Block/Permissions/Tab/Roleinfo.php | 2 +- .../Block/Permissions/Tab/Rolesedit.php | 2 +- .../Block/Permissions/Tab/Rolesusers.php | 2 +- .../Block/Permissions/Tab/Useredit.php | 2 +- .../Mage/Adminhtml/Block/Permissions/User.php | 12 +- .../Adminhtml/Block/Permissions/User/Edit.php | 2 +- .../Block/Permissions/User/Edit/Form.php | 2 +- .../Block/Permissions/User/Edit/Tab/Main.php | 2 +- .../Block/Permissions/User/Edit/Tab/Roles.php | 2 +- .../Block/Permissions/User/Edit/Tabs.php | 2 +- .../Adminhtml/Block/Permissions/User/Grid.php | 2 +- .../Adminhtml/Block/Permissions/Users.php | 2 +- .../Mage/Adminhtml/Block/Poll/Answer/Edit.php | 2 +- .../Adminhtml/Block/Poll/Answer/Edit/Form.php | 2 +- .../core/Mage/Adminhtml/Block/Poll/Edit.php | 2 +- .../Mage/Adminhtml/Block/Poll/Edit/Form.php | 2 +- .../Adminhtml/Block/Poll/Edit/Tab/Answers.php | 2 +- .../Block/Poll/Edit/Tab/Answers/Form.php | 2 +- .../Block/Poll/Edit/Tab/Answers/Grid.php | 2 +- .../Block/Poll/Edit/Tab/Answers/List.php | 2 +- .../Adminhtml/Block/Poll/Edit/Tab/Form.php | 5 +- .../Mage/Adminhtml/Block/Poll/Edit/Tabs.php | 2 +- .../core/Mage/Adminhtml/Block/Poll/Grid.php | 2 +- .../core/Mage/Adminhtml/Block/Poll/Poll.php | 2 +- .../Mage/Adminhtml/Block/Promo/Catalog.php | 2 +- .../Adminhtml/Block/Promo/Catalog/Edit.php | 55 +- .../Block/Promo/Catalog/Edit/Form.php | 2 +- .../Adminhtml/Block/Promo/Catalog/Edit/Js.php | 2 +- .../Block/Promo/Catalog/Edit/Tab/Actions.php | 2 +- .../Promo/Catalog/Edit/Tab/Conditions.php | 2 +- .../Block/Promo/Catalog/Edit/Tab/Main.php | 54 +- .../Block/Promo/Catalog/Edit/Tabs.php | 2 +- .../Adminhtml/Block/Promo/Catalog/Grid.php | 55 +- .../core/Mage/Adminhtml/Block/Promo/Quote.php | 2 +- .../Mage/Adminhtml/Block/Promo/Quote/Edit.php | 51 +- .../Adminhtml/Block/Promo/Quote/Edit/Form.php | 2 +- .../Block/Promo/Quote/Edit/Tab/Actions.php | 2 +- .../Block/Promo/Quote/Edit/Tab/Conditions.php | 2 +- .../Block/Promo/Quote/Edit/Tab/Coupons.php | 88 + .../Promo/Quote/Edit/Tab/Coupons/Form.php | 147 + .../Promo/Quote/Edit/Tab/Coupons/Grid.php | 146 + .../Tab/Coupons/Grid/Column/Renderer/Used.php | 42 + .../Block/Promo/Quote/Edit/Tab/Labels.php | 5 +- .../Block/Promo/Quote/Edit/Tab/Main.php | 79 +- .../Quote/Edit/Tab/Main/Renderer/Checkbox.php | 59 + .../Adminhtml/Block/Promo/Quote/Edit/Tabs.php | 2 +- .../Mage/Adminhtml/Block/Promo/Quote/Grid.php | 56 +- .../Adminhtml/Block/Promo/Widget/Chooser.php | 6 +- .../Block/Promo/Widget/Chooser/Daterange.php | 2 +- .../Block/Promo/Widget/Chooser/Sku.php | 2 +- .../core/Mage/Adminhtml/Block/Rating/Edit.php | 2 +- .../Mage/Adminhtml/Block/Rating/Edit/Form.php | 2 +- .../Adminhtml/Block/Rating/Edit/Tab/Form.php | 5 +- .../Block/Rating/Edit/Tab/Options.php | 2 +- .../Mage/Adminhtml/Block/Rating/Edit/Tabs.php | 2 +- .../core/Mage/Adminhtml/Block/Rating/Grid.php | 2 +- .../Mage/Adminhtml/Block/Rating/Rating.php | 2 +- .../Report/Config/Form/Field/MtdStart.php | 2 +- .../Report/Config/Form/Field/YtdStart.php | 2 +- .../Block/Report/Customer/Accounts.php | 2 +- .../Block/Report/Customer/Accounts/Grid.php | 2 +- .../Block/Report/Customer/Orders.php | 2 +- .../Block/Report/Customer/Orders/Grid.php | 2 +- .../Block/Report/Customer/Totals.php | 2 +- .../Block/Report/Customer/Totals/Grid.php | 2 +- .../Adminhtml/Block/Report/Filter/Form.php | 2 +- .../core/Mage/Adminhtml/Block/Report/Grid.php | 2 +- .../Adminhtml/Block/Report/Grid/Abstract.php | 47 +- .../Grid/Column/Renderer/Blanknumber.php | 2 +- .../Report/Grid/Column/Renderer/Currency.php | 2 +- .../Report/Grid/Column/Renderer/Customer.php | 2 +- .../Report/Grid/Column/Renderer/Product.php | 2 +- .../Adminhtml/Block/Report/Grid/Shopcart.php | 2 +- .../Mage/Adminhtml/Block/Report/Product.php | 2 +- .../Block/Report/Product/Downloads.php | 2 +- .../Block/Report/Product/Downloads/Grid.php | 2 +- .../Product/Downloads/Renderer/Purchases.php | 2 +- .../Adminhtml/Block/Report/Product/Grid.php | 2 +- .../Block/Report/Product/Lowstock.php | 2 +- .../Block/Report/Product/Lowstock/Grid.php | 2 +- .../Adminhtml/Block/Report/Product/Sold.php | 2 +- .../Block/Report/Product/Sold/Grid.php | 2 +- .../Adminhtml/Block/Report/Product/Viewed.php | 18 +- .../Block/Report/Product/Viewed/Grid.php | 97 +- .../Block/Report/Refresh/Statistics.php | 2 +- .../Block/Report/Refresh/Statistics/Grid.php | 10 +- .../Block/Report/Review/Customer.php | 2 +- .../Block/Report/Review/Customer/Grid.php | 2 +- .../Adminhtml/Block/Report/Review/Detail.php | 2 +- .../Block/Report/Review/Detail/Grid.php | 2 +- .../Adminhtml/Block/Report/Review/Product.php | 2 +- .../Block/Report/Review/Product/Grid.php | 2 +- .../Block/Report/Sales/Bestsellers.php | 2 +- .../Block/Report/Sales/Bestsellers/Grid.php | 2 +- .../Adminhtml/Block/Report/Sales/Coupons.php | 2 +- .../Block/Report/Sales/Coupons/Grid.php | 28 +- .../Sales/Grid/Column/Renderer/Date.php | 2 +- .../Adminhtml/Block/Report/Sales/Invoiced.php | 2 +- .../Block/Report/Sales/Invoiced/Grid.php | 2 +- .../Adminhtml/Block/Report/Sales/Refunded.php | 2 +- .../Block/Report/Sales/Refunded/Grid.php | 2 +- .../Adminhtml/Block/Report/Sales/Sales.php | 2 +- .../Block/Report/Sales/Sales/Grid.php | 2 +- .../Adminhtml/Block/Report/Sales/Shipping.php | 2 +- .../Block/Report/Sales/Shipping/Grid.php | 2 +- .../Mage/Adminhtml/Block/Report/Sales/Tax.php | 2 +- .../Adminhtml/Block/Report/Sales/Tax/Grid.php | 2 +- .../Mage/Adminhtml/Block/Report/Search.php | 2 +- .../Adminhtml/Block/Report/Search/Grid.php | 2 +- .../Block/Report/Shopcart/Abandoned.php | 2 +- .../Block/Report/Shopcart/Abandoned/Grid.php | 2 +- .../Block/Report/Shopcart/Customer.php | 2 +- .../Block/Report/Shopcart/Customer/Grid.php | 2 +- .../Block/Report/Shopcart/Product.php | 2 +- .../Block/Report/Shopcart/Product/Grid.php | 2 +- .../Adminhtml/Block/Report/Tag/Customer.php | 2 +- .../Block/Report/Tag/Customer/Detail.php | 2 +- .../Block/Report/Tag/Customer/Detail/Grid.php | 2 +- .../Block/Report/Tag/Customer/Grid.php | 2 +- .../Adminhtml/Block/Report/Tag/Popular.php | 2 +- .../Block/Report/Tag/Popular/Detail.php | 2 +- .../Block/Report/Tag/Popular/Detail/Grid.php | 2 +- .../Block/Report/Tag/Popular/Grid.php | 2 +- .../Adminhtml/Block/Report/Tag/Product.php | 2 +- .../Block/Report/Tag/Product/Detail.php | 2 +- .../Block/Report/Tag/Product/Detail/Grid.php | 2 +- .../Block/Report/Tag/Product/Grid.php | 2 +- .../Mage/Adminhtml/Block/Report/Wishlist.php | 2 +- .../Adminhtml/Block/Report/Wishlist/Grid.php | 2 +- .../core/Mage/Adminhtml/Block/Review/Add.php | 2 +- .../Mage/Adminhtml/Block/Review/Add/Form.php | 8 +- .../core/Mage/Adminhtml/Block/Review/Edit.php | 2 +- .../Mage/Adminhtml/Block/Review/Edit/Form.php | 15 +- .../core/Mage/Adminhtml/Block/Review/Grid.php | 38 +- .../Block/Review/Grid/Filter/Type.php | 2 +- .../Block/Review/Grid/Renderer/Type.php | 2 +- .../core/Mage/Adminhtml/Block/Review/Main.php | 2 +- .../Adminhtml/Block/Review/Product/Grid.php | 2 +- .../Block/Review/Rating/Detailed.php | 2 +- .../Adminhtml/Block/Review/Rating/Summary.php | 2 +- .../Mage/Adminhtml/Block/Sales/Creditmemo.php | 2 +- .../Adminhtml/Block/Sales/Creditmemo/Grid.php | 2 +- .../Mage/Adminhtml/Block/Sales/Invoice.php | 2 +- .../Adminhtml/Block/Sales/Invoice/Grid.php | 2 +- .../Adminhtml/Block/Sales/Items/Abstract.php | 2 +- .../Block/Sales/Items/Column/Default.php | 2 +- .../Block/Sales/Items/Column/Name.php | 2 +- .../Block/Sales/Items/Column/Name/Grouped.php | 2 +- .../Block/Sales/Items/Column/Qty.php | 2 +- .../Sales/Items/Renderer/Configurable.php | 2 +- .../Block/Sales/Items/Renderer/Default.php | 2 +- .../core/Mage/Adminhtml/Block/Sales/Order.php | 2 +- .../Adminhtml/Block/Sales/Order/Abstract.php | 2 +- .../Adminhtml/Block/Sales/Order/Address.php | 2 +- .../Block/Sales/Order/Address/Form.php | 2 +- .../Block/Sales/Order/Comments/View.php | 2 +- .../Adminhtml/Block/Sales/Order/Create.php | 14 +- .../Block/Sales/Order/Create/Abstract.php | 2 +- .../Sales/Order/Create/Billing/Address.php | 3 +- .../Sales/Order/Create/Billing/Method.php | 2 +- .../Order/Create/Billing/Method/Form.php | 2 +- .../Block/Sales/Order/Create/Comment.php | 2 +- .../Block/Sales/Order/Create/Coupons.php | 2 +- .../Block/Sales/Order/Create/Coupons/Form.php | 2 +- .../Block/Sales/Order/Create/Customer.php | 2 +- .../Sales/Order/Create/Customer/Grid.php | 2 +- .../Block/Sales/Order/Create/Data.php | 2 +- .../Block/Sales/Order/Create/Form.php | 2 +- .../Sales/Order/Create/Form/Abstract.php | 4 +- .../Block/Sales/Order/Create/Form/Account.php | 2 +- .../Block/Sales/Order/Create/Form/Address.php | 18 +- .../Block/Sales/Order/Create/Giftmessage.php | 2 +- .../Sales/Order/Create/Giftmessage/Form.php | 2 +- .../Block/Sales/Order/Create/Header.php | 2 +- .../Block/Sales/Order/Create/Items.php | 58 +- .../Block/Sales/Order/Create/Items/Grid.php | 2 +- .../Block/Sales/Order/Create/Load.php | 2 +- .../Block/Sales/Order/Create/Messages.php | 2 +- .../Block/Sales/Order/Create/Newsletter.php | 2 +- .../Sales/Order/Create/Newsletter/Form.php | 2 +- .../Block/Sales/Order/Create/Search.php | 2 +- .../Block/Sales/Order/Create/Search/Grid.php | 2 +- .../Create/Search/Grid/Renderer/Price.php | 7 +- .../Create/Search/Grid/Renderer/Product.php | 2 +- .../Order/Create/Search/Grid/Renderer/Qty.php | 2 +- .../Sales/Order/Create/Shipping/Address.php | 3 +- .../Sales/Order/Create/Shipping/Method.php | 2 +- .../Order/Create/Shipping/Method/Form.php | 2 +- .../Block/Sales/Order/Create/Sidebar.php | 2 +- .../Sales/Order/Create/Sidebar/Abstract.php | 2 +- .../Block/Sales/Order/Create/Sidebar/Cart.php | 25 +- .../Sales/Order/Create/Sidebar/Compared.php | 2 +- .../Sales/Order/Create/Sidebar/Pcompared.php | 2 +- .../Sales/Order/Create/Sidebar/Pviewed.php | 2 +- .../Sales/Order/Create/Sidebar/Reorder.php | 2 +- .../Sales/Order/Create/Sidebar/Viewed.php | 2 +- .../Sales/Order/Create/Sidebar/Wishlist.php | 2 +- .../Block/Sales/Order/Create/Store.php | 2 +- .../Block/Sales/Order/Create/Store/Select.php | 2 +- .../Block/Sales/Order/Create/Totals.php | 9 +- .../Sales/Order/Create/Totals/Default.php | 2 +- .../Sales/Order/Create/Totals/Discount.php | 2 +- .../Sales/Order/Create/Totals/Grandtotal.php | 2 +- .../Sales/Order/Create/Totals/Shipping.php | 2 +- .../Sales/Order/Create/Totals/Subtotal.php | 2 +- .../Block/Sales/Order/Create/Totals/Table.php | 2 +- .../Block/Sales/Order/Create/Totals/Tax.php | 2 +- .../Block/Sales/Order/Creditmemo/Create.php | 18 +- .../Order/Creditmemo/Create/Adjustments.php | 2 +- .../Sales/Order/Creditmemo/Create/Form.php | 2 +- .../Sales/Order/Creditmemo/Create/Items.php | 2 +- .../Block/Sales/Order/Creditmemo/Totals.php | 2 +- .../Block/Sales/Order/Creditmemo/View.php | 2 +- .../Sales/Order/Creditmemo/View/Comments.php | 2 +- .../Sales/Order/Creditmemo/View/Form.php | 2 +- .../Sales/Order/Creditmemo/View/Items.php | 2 +- .../Mage/Adminhtml/Block/Sales/Order/Grid.php | 2 +- .../Block/Sales/Order/Invoice/Create.php | 2 +- .../Block/Sales/Order/Invoice/Create/Form.php | 2 +- .../Sales/Order/Invoice/Create/Items.php | 2 +- .../Sales/Order/Invoice/Create/Tracking.php | 2 +- .../Block/Sales/Order/Invoice/Totals.php | 2 +- .../Block/Sales/Order/Invoice/View.php | 2 +- .../Sales/Order/Invoice/View/Comments.php | 2 +- .../Block/Sales/Order/Invoice/View/Form.php | 2 +- .../Block/Sales/Order/Invoice/View/Items.php | 2 +- .../Adminhtml/Block/Sales/Order/Payment.php | 2 +- .../Block/Sales/Order/Shipment/Create.php | 2 +- .../Sales/Order/Shipment/Create/Form.php | 2 +- .../Sales/Order/Shipment/Create/Items.php | 5 +- .../Sales/Order/Shipment/Create/Tracking.php | 2 +- .../Block/Sales/Order/Shipment/Packaging.php | 2 +- .../Sales/Order/Shipment/Packaging/Grid.php | 2 +- .../Sales/Order/Shipment/Tracking/Info.php | 2 +- .../Block/Sales/Order/Shipment/View.php | 2 +- .../Sales/Order/Shipment/View/Comments.php | 2 +- .../Block/Sales/Order/Shipment/View/Form.php | 7 +- .../Block/Sales/Order/Shipment/View/Items.php | 2 +- .../Sales/Order/Shipment/View/Tracking.php | 2 +- .../Adminhtml/Block/Sales/Order/Status.php | 2 +- .../Block/Sales/Order/Status/Assign.php | 2 +- .../Block/Sales/Order/Status/Assign/Form.php | 2 +- .../Block/Sales/Order/Status/Edit.php | 2 +- .../Block/Sales/Order/Status/Edit/Form.php | 2 +- .../Block/Sales/Order/Status/Grid.php | 2 +- .../Block/Sales/Order/Status/New.php | 2 +- .../Block/Sales/Order/Status/New/Form.php | 2 +- .../Adminhtml/Block/Sales/Order/Totalbar.php | 2 +- .../Adminhtml/Block/Sales/Order/Totals.php | 2 +- .../Block/Sales/Order/Totals/Item.php | 2 +- .../Block/Sales/Order/Totals/Tax.php | 2 +- .../Mage/Adminhtml/Block/Sales/Order/View.php | 2 +- .../Adminhtml/Block/Sales/Order/View/Form.php | 2 +- .../Block/Sales/Order/View/Giftmessage.php | 2 +- .../Block/Sales/Order/View/History.php | 2 +- .../Adminhtml/Block/Sales/Order/View/Info.php | 2 +- .../Block/Sales/Order/View/Items.php | 2 +- .../Order/View/Items/Renderer/Default.php | 2 +- .../Block/Sales/Order/View/Messages.php | 2 +- .../Sales/Order/View/Tab/Creditmemos.php | 2 +- .../Block/Sales/Order/View/Tab/History.php | 2 +- .../Block/Sales/Order/View/Tab/Info.php | 2 +- .../Block/Sales/Order/View/Tab/Invoices.php | 2 +- .../Block/Sales/Order/View/Tab/Shipments.php | 2 +- .../Sales/Order/View/Tab/Transactions.php | 2 +- .../Adminhtml/Block/Sales/Order/View/Tabs.php | 2 +- .../Block/Sales/Reorder/Renderer/Action.php | 2 +- .../Mage/Adminhtml/Block/Sales/Shipment.php | 2 +- .../Adminhtml/Block/Sales/Shipment/Grid.php | 2 +- .../Mage/Adminhtml/Block/Sales/Totals.php | 2 +- .../Adminhtml/Block/Sales/Transactions.php | 2 +- .../Block/Sales/Transactions/Child/Grid.php | 2 +- .../Block/Sales/Transactions/Detail.php | 7 +- .../Block/Sales/Transactions/Detail/Grid.php | 2 +- .../Block/Sales/Transactions/Grid.php | 2 +- .../Block/Shipping/Carrier/Tablerate/Grid.php | 2 +- .../core/Mage/Adminhtml/Block/Sitemap.php | 2 +- .../Mage/Adminhtml/Block/Sitemap/Edit.php | 2 +- .../Adminhtml/Block/Sitemap/Edit/Form.php | 2 +- .../Mage/Adminhtml/Block/Sitemap/Grid.php | 2 +- .../Block/Sitemap/Grid/Renderer/Action.php | 2 +- .../Block/Sitemap/Grid/Renderer/Link.php | 2 +- .../Block/Sitemap/Grid/Renderer/Time.php | 2 +- .../Mage/Adminhtml/Block/Store/Switcher.php | 55 +- .../Store/Switcher/Form/Renderer/Fieldset.php | 83 + .../Adminhtml/Block/System/Account/Edit.php | 2 +- .../Block/System/Account/Edit/Form.php | 2 +- .../Adminhtml/Block/System/Cache/Edit.php | 2 +- .../Adminhtml/Block/System/Cache/Form.php | 2 +- .../Adminhtml/Block/System/Config/Dwstree.php | 2 +- .../Adminhtml/Block/System/Config/Edit.php | 2 +- .../Adminhtml/Block/System/Config/Form.php | 16 +- .../Block/System/Config/Form/Field.php | 2 +- .../Config/Form/Field/Array/Abstract.php | 2 +- .../System/Config/Form/Field/Datetime.php | 2 +- .../Block/System/Config/Form/Field/Export.php | 2 +- .../Block/System/Config/Form/Field/File.php | 2 +- .../System/Config/Form/Field/Heading.php | 2 +- .../Block/System/Config/Form/Field/Image.php | 2 +- .../Block/System/Config/Form/Field/Import.php | 2 +- .../System/Config/Form/Field/Notification.php | 2 +- .../Config/Form/Field/Regexceptions.php | 2 +- .../Form/Field/Select/Allowspecific.php | 2 +- .../Config/Form/Field/Select/Flatcatalog.php | 2 +- .../Config/Form/Field/Select/Flatproduct.php | 2 +- .../Block/System/Config/Form/Fieldset.php | 2 +- .../Form/Fieldset/Modules/DisableOutput.php | 9 +- .../Config/Form/Fieldset/Order/Statuses.php | 2 +- .../Block/System/Config/Switcher.php | 11 +- .../System/Storage/Media/Synchronize.php | 2 +- .../Adminhtml/Block/System/Config/Tabs.php | 6 +- .../Adminhtml/Block/System/Convert/Gui.php | 2 +- .../Block/System/Convert/Gui/Edit.php | 2 +- .../Block/System/Convert/Gui/Edit/Form.php | 2 +- .../System/Convert/Gui/Edit/Tab/Upload.php | 2 +- .../System/Convert/Gui/Edit/Tab/View.php | 2 +- .../System/Convert/Gui/Edit/Tab/Wizard.php | 2 +- .../Block/System/Convert/Gui/Edit/Tabs.php | 2 +- .../Block/System/Convert/Gui/Grid.php | 2 +- .../Block/System/Convert/Profile.php | 2 +- .../Block/System/Convert/Profile/Edit.php | 2 +- .../Convert/Profile/Edit/Filter/Action.php | 2 +- .../System/Convert/Profile/Edit/Form.php | 2 +- .../Convert/Profile/Edit/Renderer/Action.php | 2 +- .../System/Convert/Profile/Edit/Tab/Edit.php | 2 +- .../Convert/Profile/Edit/Tab/History.php | 2 +- .../System/Convert/Profile/Edit/Tab/Run.php | 2 +- .../System/Convert/Profile/Edit/Tabs.php | 2 +- .../Block/System/Convert/Profile/Grid.php | 2 +- .../Block/System/Convert/Profile/Run.php | 2 +- .../Mage/Adminhtml/Block/System/Currency.php | 2 +- .../Block/System/Currency/Edit/Form.php | 2 +- .../Block/System/Currency/Edit/Tab/Main.php | 2 +- .../Block/System/Currency/Edit/Tab/Rates.php | 2 +- .../Block/System/Currency/Edit/Tabs.php | 2 +- .../Block/System/Currency/Rate/Matrix.php | 2 +- .../Block/System/Currency/Rate/Services.php | 2 +- .../Mage/Adminhtml/Block/System/Design.php | 2 +- .../Adminhtml/Block/System/Design/Edit.php | 2 +- .../Block/System/Design/Edit/Tab/General.php | 2 +- .../Block/System/Design/Edit/Tabs.php | 2 +- .../Adminhtml/Block/System/Design/Grid.php | 2 +- .../Adminhtml/Block/System/Email/Template.php | 2 +- .../Block/System/Email/Template/Edit.php | 2 +- .../Block/System/Email/Template/Edit/Form.php | 2 +- .../Block/System/Email/Template/Grid.php | 2 +- .../Email/Template/Grid/Filter/Type.php | 19 +- .../Email/Template/Grid/Renderer/Action.php | 2 +- .../Email/Template/Grid/Renderer/Sender.php | 2 +- .../Email/Template/Grid/Renderer/Type.php | 9 +- .../Block/System/Email/Template/Preview.php | 17 +- .../Adminhtml/Block/System/Store/Delete.php | 2 +- .../Block/System/Store/Delete/Form.php | 2 +- .../Block/System/Store/Delete/Group.php | 2 +- .../Block/System/Store/Delete/Website.php | 2 +- .../Adminhtml/Block/System/Store/Edit.php | 2 +- .../Block/System/Store/Edit/Form.php | 10 +- .../Adminhtml/Block/System/Store/Grid.php | 2 +- .../Block/System/Store/Grid/Render/Group.php | 2 +- .../Block/System/Store/Grid/Render/Store.php | 2 +- .../System/Store/Grid/Render/Website.php | 2 +- .../Adminhtml/Block/System/Store/Store.php | 2 +- .../Mage/Adminhtml/Block/System/Variable.php | 2 +- .../Adminhtml/Block/System/Variable/Edit.php | 2 +- .../Block/System/Variable/Edit/Form.php | 2 +- .../Adminhtml/Block/System/Variable/Grid.php | 2 +- .../Adminhtml/Block/Tag/Assigned/Grid.php | 2 +- .../Mage/Adminhtml/Block/Tag/Customer.php | 2 +- .../Adminhtml/Block/Tag/Customer/Grid.php | 2 +- .../core/Mage/Adminhtml/Block/Tag/Edit.php | 2 +- .../Adminhtml/Block/Tag/Edit/Accordion.php | 2 +- .../Adminhtml/Block/Tag/Edit/Assigned.php | 2 +- .../Mage/Adminhtml/Block/Tag/Edit/Form.php | 2 +- .../Mage/Adminhtml/Block/Tag/Grid/All.php | 2 +- .../Mage/Adminhtml/Block/Tag/Grid/Pending.php | 2 +- .../core/Mage/Adminhtml/Block/Tag/Pending.php | 2 +- .../core/Mage/Adminhtml/Block/Tag/Product.php | 2 +- .../Mage/Adminhtml/Block/Tag/Product/Grid.php | 2 +- .../Adminhtml/Block/Tag/Store/Switcher.php | 2 +- .../core/Mage/Adminhtml/Block/Tag/Tag.php | 2 +- .../Mage/Adminhtml/Block/Tag/Tag/Grid.php | 2 +- .../core/Mage/Adminhtml/Block/Tax/Class.php | 2 +- .../Mage/Adminhtml/Block/Tax/Class/Edit.php | 2 +- .../Adminhtml/Block/Tax/Class/Edit/Form.php | 2 +- .../Mage/Adminhtml/Block/Tax/Class/Grid.php | 2 +- .../Mage/Adminhtml/Block/Tax/Rate/Form.php | 4 +- .../Mage/Adminhtml/Block/Tax/Rate/Grid.php | 2 +- .../Block/Tax/Rate/Grid/Renderer/Country.php | 2 +- .../Block/Tax/Rate/Grid/Renderer/Data.php | 2 +- .../Adminhtml/Block/Tax/Rate/ImportExport.php | 2 +- .../Mage/Adminhtml/Block/Tax/Rate/Title.php | 2 +- .../Block/Tax/Rate/Title/Fieldset.php | 2 +- .../Adminhtml/Block/Tax/Rate/Toolbar/Add.php | 2 +- .../Adminhtml/Block/Tax/Rate/Toolbar/Save.php | 2 +- .../core/Mage/Adminhtml/Block/Tax/Rule.php | 2 +- .../Mage/Adminhtml/Block/Tax/Rule/Edit.php | 2 +- .../Adminhtml/Block/Tax/Rule/Edit/Form.php | 2 +- .../Mage/Adminhtml/Block/Tax/Rule/Grid.php | 2 +- .../core/Mage/Adminhtml/Block/Template.php | 2 +- .../core/Mage/Adminhtml/Block/Text/List.php | 2 +- .../core/Mage/Adminhtml/Block/Urlrewrite.php | 2 +- .../Block/Urlrewrite/Category/Tree.php | 2 +- .../Mage/Adminhtml/Block/Urlrewrite/Edit.php | 2 +- .../Adminhtml/Block/Urlrewrite/Edit/Form.php | 2 +- .../Mage/Adminhtml/Block/Urlrewrite/Grid.php | 2 +- .../Mage/Adminhtml/Block/Urlrewrite/Link.php | 2 +- .../Block/Urlrewrite/Product/Grid.php | 2 +- .../Adminhtml/Block/Urlrewrite/Selector.php | 2 +- app/code/core/Mage/Adminhtml/Block/Widget.php | 2 +- .../Mage/Adminhtml/Block/Widget/Accordion.php | 2 +- .../Adminhtml/Block/Widget/Accordion/Item.php | 2 +- .../Adminhtml/Block/Widget/Breadcrumbs.php | 2 +- .../Mage/Adminhtml/Block/Widget/Button.php | 4 +- .../Mage/Adminhtml/Block/Widget/Container.php | 2 +- .../core/Mage/Adminhtml/Block/Widget/Form.php | 7 +- .../Adminhtml/Block/Widget/Form/Container.php | 2 +- .../Adminhtml/Block/Widget/Form/Element.php | 2 +- .../Block/Widget/Form/Element/Dependence.php | 7 +- .../Block/Widget/Form/Element/Gallery.php | 2 +- .../Block/Widget/Form/Renderer/Element.php | 2 +- .../Block/Widget/Form/Renderer/Fieldset.php | 2 +- .../Widget/Form/Renderer/Fieldset/Element.php | 7 +- .../core/Mage/Adminhtml/Block/Widget/Grid.php | 48 +- .../Adminhtml/Block/Widget/Grid/Column.php | 2 +- .../Widget/Grid/Column/Filter/Abstract.php | 2 +- .../Widget/Grid/Column/Filter/Checkbox.php | 2 +- .../Widget/Grid/Column/Filter/Country.php | 2 +- .../Block/Widget/Grid/Column/Filter/Date.php | 2 +- .../Widget/Grid/Column/Filter/Datetime.php | 2 +- .../Widget/Grid/Column/Filter/Interface.php | 2 +- .../Widget/Grid/Column/Filter/Massaction.php | 2 +- .../Block/Widget/Grid/Column/Filter/Price.php | 2 +- .../Block/Widget/Grid/Column/Filter/Radio.php | 2 +- .../Block/Widget/Grid/Column/Filter/Range.php | 2 +- .../Widget/Grid/Column/Filter/Select.php | 2 +- .../Block/Widget/Grid/Column/Filter/Store.php | 2 +- .../Block/Widget/Grid/Column/Filter/Text.php | 2 +- .../Block/Widget/Grid/Column/Filter/Theme.php | 2 +- .../Widget/Grid/Column/Renderer/Abstract.php | 2 +- .../Widget/Grid/Column/Renderer/Action.php | 2 +- .../Widget/Grid/Column/Renderer/Checkbox.php | 2 +- .../Widget/Grid/Column/Renderer/Concat.php | 2 +- .../Widget/Grid/Column/Renderer/Country.php | 2 +- .../Widget/Grid/Column/Renderer/Currency.php | 2 +- .../Widget/Grid/Column/Renderer/Date.php | 2 +- .../Widget/Grid/Column/Renderer/Datetime.php | 2 +- .../Widget/Grid/Column/Renderer/Input.php | 2 +- .../Widget/Grid/Column/Renderer/Interface.php | 2 +- .../Block/Widget/Grid/Column/Renderer/Ip.php | 2 +- .../Widget/Grid/Column/Renderer/Longtext.php | 2 +- .../Grid/Column/Renderer/Massaction.php | 2 +- .../Widget/Grid/Column/Renderer/Number.php | 2 +- .../Widget/Grid/Column/Renderer/Options.php | 2 +- .../Widget/Grid/Column/Renderer/Price.php | 2 +- .../Widget/Grid/Column/Renderer/Radio.php | 2 +- .../Widget/Grid/Column/Renderer/Select.php | 2 +- .../Widget/Grid/Column/Renderer/Store.php | 2 +- .../Widget/Grid/Column/Renderer/Text.php | 2 +- .../Widget/Grid/Column/Renderer/Wrapline.php | 2 +- .../Adminhtml/Block/Widget/Grid/Container.php | 2 +- .../Block/Widget/Grid/Massaction.php | 2 +- .../Block/Widget/Grid/Massaction/Abstract.php | 27 +- .../Block/Widget/Grid/Massaction/Item.php | 2 +- .../Massaction/Item/Additional/Default.php | 2 +- .../Massaction/Item/Additional/Interface.php | 2 +- .../Block/Widget/Grid/Serializer.php | 2 +- .../Adminhtml/Block/Widget/Tab/Interface.php | 2 +- .../core/Mage/Adminhtml/Block/Widget/Tabs.php | 2 +- .../Adminhtml/Block/Widget/View/Container.php | 2 +- .../core/Mage/Adminhtml/Controller/Action.php | 2 +- .../Adminhtml/Controller/Report/Abstract.php | 124 + .../Adminhtml/Controller/Sales/Creditmemo.php | 2 +- .../Adminhtml/Controller/Sales/Invoice.php | 2 +- .../Adminhtml/Controller/Sales/Shipment.php | 2 +- app/code/core/Mage/Adminhtml/Exception.php | 2 +- .../core/Mage/Adminhtml/Helper/Addresses.php | 2 +- .../core/Mage/Adminhtml/Helper/Catalog.php | 2 +- .../Helper/Catalog/Product/Composite.php | 2 +- .../Catalog/Product/Edit/Action/Attribute.php | 2 +- .../Adminhtml/Helper/Dashboard/Abstract.php | 2 +- .../Mage/Adminhtml/Helper/Dashboard/Data.php | 2 +- .../Mage/Adminhtml/Helper/Dashboard/Order.php | 2 +- app/code/core/Mage/Adminhtml/Helper/Data.php | 2 +- app/code/core/Mage/Adminhtml/Helper/Js.php | 2 +- .../core/Mage/Adminhtml/Helper/Media/Js.php | 5 +- app/code/core/Mage/Adminhtml/Helper/Rss.php | 2 +- app/code/core/Mage/Adminhtml/Helper/Sales.php | 2 +- app/code/core/Mage/Adminhtml/Model/Config.php | 2 +- .../core/Mage/Adminhtml/Model/Config/Data.php | 4 +- .../Model/Customer/Renderer/Region.php | 2 +- .../Mage/Adminhtml/Model/Email/Template.php | 2 +- .../core/Mage/Adminhtml/Model/Extension.php | 2 +- .../Mage/Adminhtml/Model/Giftmessage/Save.php | 2 +- .../Model/LayoutUpdate/Validator.php | 2 +- .../Model/Newsletter/Renderer/Text.php | 2 +- .../core/Mage/Adminhtml/Model/Observer.php | 2 +- .../core/Mage/Adminhtml/Model/Report/Item.php | 2 +- .../core/Mage/Adminhtml/Model/Sales/Order.php | 7 +- .../Adminhtml/Model/Sales/Order/Create.php | 31 +- .../Adminhtml/Model/Sales/Order/Random.php | 2 +- .../Mage/Adminhtml/Model/Search/Catalog.php | 2 +- .../Mage/Adminhtml/Model/Search/Customer.php | 2 +- .../Mage/Adminhtml/Model/Search/Order.php | 2 +- .../core/Mage/Adminhtml/Model/Session.php | 2 +- .../Mage/Adminhtml/Model/Session/Quote.php | 2 +- .../System/Config/Backend/Admin/Custom.php | 2 +- .../Config/Backend/Admin/Custompath.php | 2 +- .../System/Config/Backend/Admin/Observer.php | 2 +- .../Admin/Password/Link/Expirationperiod.php | 2 +- .../System/Config/Backend/Admin/Usecustom.php | 2 +- .../Config/Backend/Admin/Usecustompath.php | 2 +- .../Config/Backend/Admin/Usesecretkey.php | 2 +- .../Model/System/Config/Backend/Baseurl.php | 2 +- .../Model/System/Config/Backend/Cache.php | 2 +- .../Backend/Catalog/Inventory/Managestock.php | 2 +- .../Config/Backend/Catalog/Search/Type.php | 2 +- .../Model/System/Config/Backend/Category.php | 2 +- .../Config/Backend/Currency/Abstract.php | 2 +- .../System/Config/Backend/Currency/Allow.php | 2 +- .../System/Config/Backend/Currency/Base.php | 2 +- .../System/Config/Backend/Currency/Cron.php | 2 +- .../Config/Backend/Currency/Default.php | 2 +- .../Backend/Customer/Address/Street.php | 2 +- .../Backend/Customer/GroupAutoAssign.php | 57 + .../Password/Link/Expirationperiod.php | 2 +- .../Config/Backend/Customer/Show/Address.php | 2 +- .../Config/Backend/Customer/Show/Customer.php | 2 +- .../Model/System/Config/Backend/Datashare.php | 2 +- .../Config/Backend/Design/Exception.php | 2 +- .../System/Config/Backend/Email/Address.php | 2 +- .../System/Config/Backend/Email/Sender.php | 2 +- .../Model/System/Config/Backend/Encrypted.php | 2 +- .../Model/System/Config/Backend/File.php | 2 +- .../Model/System/Config/Backend/Filename.php | 2 +- .../Model/System/Config/Backend/Image.php | 2 +- .../System/Config/Backend/Image/Favicon.php | 2 +- .../Model/System/Config/Backend/Image/Pdf.php | 2 +- .../Model/System/Config/Backend/Locale.php | 11 +- .../System/Config/Backend/Locale/Timezone.php | 2 +- .../Model/System/Config/Backend/Log/Cron.php | 2 +- .../System/Config/Backend/Price/Scope.php | 2 +- .../Config/Backend/Product/Alert/Cron.php | 2 +- .../Model/System/Config/Backend/Secure.php | 2 +- .../System/Config/Backend/Seo/Product.php | 2 +- .../System/Config/Backend/Serialized.php | 2 +- .../Config/Backend/Serialized/Array.php | 2 +- .../Config/Backend/Shipping/Tablerate.php | 2 +- .../Model/System/Config/Backend/Sitemap.php | 2 +- .../System/Config/Backend/Sitemap/Cron.php | 2 +- .../Config/Backend/Storage/Media/Database.php | 2 +- .../Model/System/Config/Backend/Store.php | 2 +- .../Model/System/Config/Backend/Translate.php | 2 +- .../Model/System/Config/Clone/Media/Image.php | 2 +- .../Model/System/Config/Source/Admin/Page.php | 2 +- .../Model/System/Config/Source/Allregion.php | 2 +- .../Config/Source/Catalog/GridPerPage.php | 2 +- .../System/Config/Source/Catalog/ListMode.php | 2 +- .../Config/Source/Catalog/ListPerPage.php | 2 +- .../System/Config/Source/Catalog/ListSort.php | 2 +- .../Config/Source/Catalog/Search/Type.php | 2 +- .../Config/Source/Catalog/TimeFormat.php | 2 +- .../Model/System/Config/Source/Category.php | 2 +- .../Model/System/Config/Source/Checktype.php | 2 +- .../Model/System/Config/Source/Cms/Page.php | 2 +- .../Config/Source/Cms/Wysiwyg/Enabled.php | 2 +- .../Model/System/Config/Source/Country.php | 2 +- .../System/Config/Source/Country/Full.php | 2 +- .../System/Config/Source/Cron/Frequency.php | 2 +- .../Model/System/Config/Source/Currency.php | 2 +- .../System/Config/Source/Currency/Service.php | 2 +- .../Config/Source/Customer/Address/Type.php | 48 + .../System/Config/Source/Customer/Group.php | 2 +- .../Source/Customer/Group/Multiselect.php | 50 + .../Model/System/Config/Source/Date/Short.php | 2 +- .../System/Config/Source/Design/Package.php | 2 +- .../System/Config/Source/Design/Robots.php | 2 +- .../System/Config/Source/Dev/Dbautoup.php | 9 +- .../System/Config/Source/Email/Identity.php | 2 +- .../System/Config/Source/Email/Method.php | 2 +- .../System/Config/Source/Email/Smtpauth.php | 2 +- .../System/Config/Source/Email/Template.php | 2 +- .../System/Config/Source/Enabledisable.php | 2 +- .../Model/System/Config/Source/Frequency.php | 2 +- .../Model/System/Config/Source/Locale.php | 2 +- .../System/Config/Source/Locale/Country.php | 2 +- .../System/Config/Source/Locale/Currency.php | 2 +- .../Config/Source/Locale/Currency/All.php | 2 +- .../System/Config/Source/Locale/Timezone.php | 2 +- .../System/Config/Source/Locale/Weekdays.php | 2 +- .../Model/System/Config/Source/Nooptreq.php | 2 +- .../Config/Source/Notification/Frequency.php | 2 +- .../System/Config/Source/Order/Status.php | 2 +- .../System/Config/Source/Order/Status/New.php | 2 +- .../Source/Order/Status/Newprocessing.php | 2 +- .../Config/Source/Order/Status/Processing.php | 2 +- .../Config/Source/Payment/Allmethods.php | 2 +- .../Config/Source/Payment/Allowedmethods.php | 2 +- .../Source/Payment/Allspecificcountries.php | 2 +- .../System/Config/Source/Payment/Cctype.php | 2 +- .../System/Config/Source/Price/Scope.php | 2 +- .../Model/System/Config/Source/Price/Step.php | 2 +- .../Config/Source/Product/Options/Price.php | 2 +- .../Config/Source/Product/Options/Type.php | 11 +- .../Config/Source/Product/Thumbnail.php | 2 +- .../System/Config/Source/Reports/Scope.php | 2 +- .../Config/Source/Shipping/Allmethods.php | 2 +- .../Source/Shipping/Allspecificcountries.php | 2 +- .../Config/Source/Shipping/Flatrate.php | 2 +- .../Config/Source/Shipping/Tablerate.php | 2 +- .../Config/Source/Shipping/Taxclass.php | 2 +- .../Config/Source/Storage/Media/Database.php | 2 +- .../Config/Source/Storage/Media/Storage.php | 2 +- .../Model/System/Config/Source/Store.php | 2 +- .../System/Config/Source/Tax/Apply/On.php | 2 +- .../System/Config/Source/Tax/Basedon.php | 2 +- .../System/Config/Source/Tax/Catalog.php | 2 +- .../Config/Source/Watermark/Position.php | 2 +- .../System/Config/Source/Web/Protocol.php | 2 +- .../System/Config/Source/Web/Redirect.php | 2 +- .../Model/System/Config/Source/Website.php | 2 +- .../Model/System/Config/Source/Yesno.php | 2 +- .../System/Config/Source/Yesnocustom.php | 2 +- .../Mage/Adminhtml/Model/System/Store.php | 4 +- app/code/core/Mage/Adminhtml/Model/Url.php | 2 +- .../Adminhtml/controllers/AjaxController.php | 2 +- .../controllers/Api/RoleController.php | 2 +- .../controllers/Api/UserController.php | 2 +- .../Adminhtml/controllers/CacheController.php | 2 +- .../Catalog/Category/WidgetController.php | 2 +- .../Catalog/CategoryController.php | 24 +- .../Product/Action/AttributeController.php | 5 +- .../Catalog/Product/AttributeController.php | 5 +- .../Catalog/Product/DatafeedsController.php | 2 +- .../Catalog/Product/GalleryController.php | 7 +- .../Catalog/Product/GroupController.php | 2 +- .../Catalog/Product/ReviewController.php | 2 +- .../Catalog/Product/SetController.php | 2 +- .../Catalog/Product/WidgetController.php | 2 +- .../controllers/Catalog/ProductController.php | 2 +- .../controllers/Catalog/SearchController.php | 6 +- .../Checkout/AgreementController.php | 15 +- .../Cms/Block/WidgetController.php | 2 +- .../controllers/Cms/BlockController.php | 2 +- .../controllers/Cms/Page/WidgetController.php | 2 +- .../controllers/Cms/PageController.php | 2 +- .../Cms/Wysiwyg/ImagesController.php | 2 +- .../controllers/Cms/WysiwygController.php | 2 +- .../Cart/Product/Composite/CartController.php | 2 +- .../controllers/Customer/GroupController.php | 2 +- .../controllers/Customer/OnlineController.php | 2 +- .../System/Config/ValidatevatController.php | 91 + .../Product/Composite/WishlistController.php | 2 +- .../controllers/CustomerController.php | 89 +- .../controllers/DashboardController.php | 2 +- .../Adminhtml/controllers/IndexController.php | 64 +- .../Adminhtml/controllers/JsonController.php | 2 +- .../controllers/Media/EditorController.php | 2 +- .../controllers/Media/UploaderController.php | 2 +- .../Newsletter/ProblemController.php | 2 +- .../Newsletter/QueueController.php | 2 +- .../Newsletter/SubscriberController.php | 10 +- .../Newsletter/TemplateController.php | 2 +- .../controllers/NotificationController.php | 2 +- .../Permissions/RoleController.php | 2 +- .../Permissions/UserController.php | 2 +- .../controllers/Poll/AnswerController.php | 2 +- .../Adminhtml/controllers/PollController.php | 2 +- .../controllers/Promo/CatalogController.php | 17 +- .../controllers/Promo/QuoteController.php | 163 +- .../controllers/Promo/WidgetController.php | 2 +- .../Adminhtml/controllers/PromoController.php | 2 +- .../controllers/RatingController.php | 2 +- .../controllers/Report/CustomerController.php | 2 +- .../controllers/Report/ProductController.php | 50 +- .../controllers/Report/ReviewController.php | 2 +- .../controllers/Report/SalesController.php | 75 +- .../controllers/Report/ShopcartController.php | 2 +- .../Report/StatisticsController.php | 15 +- .../controllers/Report/TagController.php | 2 +- .../controllers/ReportController.php | 2 +- .../controllers/Rss/CatalogController.php | 2 +- .../controllers/Rss/OrderController.php | 2 +- .../Sales/Billing/AgreementController.php | 2 +- .../Sales/CreditmemoController.php | 2 +- .../controllers/Sales/InvoiceController.php | 2 +- .../Sales/Order/CreateController.php | 23 +- .../Sales/Order/CreditmemoController.php | 2 +- .../Sales/Order/EditController.php | 28 +- .../Sales/Order/InvoiceController.php | 2 +- .../Sales/Order/ShipmentController.php | 13 +- .../Sales/Order/StatusController.php | 2 +- .../Order/View/GiftmessageController.php | 2 +- .../controllers/Sales/OrderController.php | 9 +- .../Sales/Recurring/ProfileController.php | 2 +- .../controllers/Sales/ShipmentController.php | 2 +- .../Sales/TransactionsController.php | 12 +- .../controllers/SitemapController.php | 2 +- .../controllers/SurveyController.php | 2 +- .../controllers/System/AccountController.php | 2 +- .../controllers/System/BackupController.php | 280 +- .../Config/System/StorageController.php | 2 +- .../controllers/System/ConfigController.php | 7 +- .../System/Convert/GuiController.php | 2 +- .../System/Convert/ProfileController.php | 2 +- .../controllers/System/CurrencyController.php | 2 +- .../controllers/System/DesignController.php | 2 +- .../System/Email/TemplateController.php | 2 +- .../controllers/System/StoreController.php | 6 +- .../controllers/System/VariableController.php | 10 +- .../controllers/SystemController.php | 2 +- .../Adminhtml/controllers/TagController.php | 24 +- .../Tax/Class/CustomerController.php | 2 +- .../Tax/Class/ProductController.php | 2 +- .../controllers/Tax/ClassController.php | 5 +- .../controllers/Tax/RateController.php | 25 +- .../controllers/Tax/RuleController.php | 7 +- .../controllers/UrlrewriteController.php | 2 +- .../core/Mage/Adminhtml/etc/adminhtml.xml | 2 +- app/code/core/Mage/Adminhtml/etc/config.xml | 8 +- .../core/Mage/Adminhtml/etc/translater.xml | 65 + .../Mage/Adminhtml/view/adminhtml/admin.xml | 2 +- .../view/adminhtml/admin/access_denied.phtml | 2 +- .../view/adminhtml/admin/forgotpassword.phtml | 7 +- .../view/adminhtml/admin/formkey.phtml | 2 +- .../view/adminhtml/admin/login.phtml | 5 +- .../view/adminhtml/admin/overlay_popup.phtml | 2 +- .../Adminhtml/view/adminhtml/admin/page.phtml | 4 +- .../view/adminhtml/admin/popup.phtml | 2 +- .../view/adminhtml/adminnotification.xml | 2 +- .../adminhtml/api/role_users_grid_js.phtml | 2 +- .../view/adminhtml/api/roleinfo.phtml | 2 +- .../Adminhtml/view/adminhtml/api/roles.phtml | 4 +- .../view/adminhtml/api/rolesedit.phtml | 2 +- .../view/adminhtml/api/rolesusers.phtml | 2 +- .../adminhtml/api/user_roles_grid_js.phtml | 2 +- .../view/adminhtml/api/userinfo.phtml | 2 +- .../view/adminhtml/api/usernroles.phtml | 2 +- .../view/adminhtml/backup/dialogs.phtml | 190 + .../view/adminhtml/backup/left.phtml | 2 +- .../view/adminhtml/backup/list.phtml | 9 +- .../Mage/Adminhtml/view/adminhtml/catalog.xml | 2 +- .../catalog/category/checkboxes/tree.phtml | 2 +- .../adminhtml/catalog/category/edit.phtml | 2 +- .../catalog/category/edit/form.phtml | 2 +- .../adminhtml/catalog/category/tree.phtml | 2 +- .../catalog/category/widget/tree.phtml | 2 +- .../form/renderer/fieldset/element.phtml | 2 +- .../view/adminhtml/catalog/product.js | 2 +- .../view/adminhtml/catalog/product.phtml | 2 +- .../catalog/product/attribute/js.phtml | 2 +- .../product/attribute/new/created.phtml | 2 +- .../catalog/product/attribute/options.phtml | 4 +- .../catalog/product/attribute/set/main.phtml | 2 +- .../attribute/set/main/tree/attribute.phtml | 2 +- .../attribute/set/main/tree/group.phtml | 2 +- .../product/attribute/set/toolbar/add.phtml | 2 +- .../product/attribute/set/toolbar/main.phtml | 2 +- .../catalog/product/composite/configure.js | 10 +- .../catalog/product/composite/configure.phtml | 6 +- .../composite/fieldset/configurable.phtml | 2 +- .../product/composite/fieldset/grouped.phtml | 2 +- .../product/composite/fieldset/options.phtml | 2 +- .../composite/fieldset/options/js.phtml | 2 +- .../fieldset/options/type/date.phtml | 2 +- .../fieldset/options/type/default.phtml | 2 +- .../fieldset/options/type/file.phtml | 2 +- .../fieldset/options/type/select.phtml | 2 +- .../fieldset/options/type/text.phtml | 2 +- .../product/composite/fieldset/qty.phtml | 2 +- .../adminhtml/catalog/product/created.phtml | 2 +- .../view/adminhtml/catalog/product/edit.phtml | 2 +- .../product/edit/action/attribute.phtml | 2 +- .../product/edit/action/inventory.phtml | 2 +- .../product/edit/action/websites.phtml | 2 +- .../catalog/product/edit/categories.phtml | 2 +- .../catalog/product/edit/options.phtml | 2 +- .../catalog/product/edit/options/option.phtml | 4 +- .../product/edit/options/type/date.phtml | 4 +- .../product/edit/options/type/file.phtml | 28 +- .../product/edit/options/type/select.phtml | 4 +- .../product/edit/options/type/text.phtml | 2 +- .../catalog/product/edit/price/group.phtml | 169 + .../catalog/product/edit/price/tier.phtml | 8 +- .../catalog/product/edit/serializer.phtml | 2 +- .../catalog/product/edit/super/config.phtml | 10 +- .../catalog/product/edit/websites.phtml | 3 +- .../catalog/product/helper/gallery.phtml | 2 +- .../view/adminhtml/catalog/product/js.phtml | 2 +- .../adminhtml/catalog/product/price.phtml | 16 +- .../adminhtml/catalog/product/tab/alert.phtml | 2 +- .../catalog/product/tab/inventory.phtml | 2 +- .../product/widget/chooser/container.phtml | 2 +- .../view/adminhtml/catalog/wysiwyg/js.phtml | 2 +- .../view/adminhtml/catalogsearch.xml | 2 +- .../Mage/Adminhtml/view/adminhtml/cms.xml | 2 +- .../view/adminhtml/cms/browser/content.phtml | 2 +- .../adminhtml/cms/browser/content/files.phtml | 2 +- .../cms/browser/content/newfolder.phtml | 2 +- .../cms/browser/content/uploader.phtml | 5 +- .../view/adminhtml/cms/browser/js.phtml | 2 +- .../view/adminhtml/cms/browser/tree.phtml | 2 +- .../cms/page/edit/form/renderer/content.phtml | 2 +- .../Adminhtml/view/adminhtml/customer.xml | 41 +- .../view/adminhtml/customer/edit/js.phtml | 2 +- .../tab/account/form/renderer/group.phtml | 52 + .../customer/edit/tab/view/grid/item.phtml | 2 +- .../view/adminhtml/customer/online.phtml | 2 +- .../create/address/form/renderer/vat.phtml | 52 + .../customer/system/config/validatevat.phtml | 65 + .../adminhtml/customer/tab/addresses.phtml | 8 +- .../view/adminhtml/customer/tab/cart.phtml | 2 +- .../adminhtml/customer/tab/newsletter.phtml | 2 +- .../view/adminhtml/customer/tab/view.phtml | 2 +- .../adminhtml/customer/tab/view/sales.phtml | 2 +- .../adminhtml/customer/tab/wishlist.phtml | 2 +- .../view/adminhtml/dashboard/graph.phtml | 2 +- .../adminhtml/dashboard/graph/disabled.phtml | 2 +- .../view/adminhtml/dashboard/grid.phtml | 2 +- .../view/adminhtml/dashboard/index.phtml | 2 +- .../view/adminhtml/dashboard/salebar.phtml | 2 +- .../view/adminhtml/dashboard/searches.phtml | 2 +- .../adminhtml/dashboard/store/switcher.phtml | 5 +- .../view/adminhtml/dashboard/totalbar.phtml | 2 +- .../Adminhtml/view/adminhtml/dataflow.xml | 2 +- .../view/adminhtml/email/order/items.phtml | 2 +- .../Mage/Adminhtml/view/adminhtml/main.xml | 22 +- .../view/adminhtml/media/editor.phtml | 3 +- .../view/adminhtml/media/uploader.phtml | 4 +- .../Adminhtml/view/adminhtml/newsletter.xml | 2 +- .../newsletter/preview/iframeswitcher.phtml | 4 +- .../adminhtml/newsletter/preview/store.phtml | 5 +- .../adminhtml/newsletter/problem/list.phtml | 2 +- .../adminhtml/newsletter/queue/edit.phtml | 2 +- .../adminhtml/newsletter/queue/list.phtml | 2 +- .../adminhtml/newsletter/queue/preview.phtml | 2 +- .../newsletter/subscriber/list.phtml | 4 +- .../adminhtml/newsletter/template/edit.phtml | 2 +- .../adminhtml/newsletter/template/list.phtml | 4 +- .../newsletter/template/preview.phtml | 2 +- .../view/adminhtml/notification/baseurl.phtml | 2 +- .../adminhtml/notification/security.phtml | 2 +- .../view/adminhtml/notification/survey.phtml | 2 +- .../view/adminhtml/notification/toolbar.phtml | 14 +- .../view/adminhtml/notification/window.phtml | 2 +- .../view/adminhtml/page/footer.phtml | 2 +- .../Adminhtml/view/adminhtml/page/head.phtml | 4 +- .../view/adminhtml/page/header.phtml | 2 +- .../view/adminhtml/page/js/calendar.phtml | 2 +- .../view/adminhtml/page/js/translate.phtml | 16 +- .../Adminhtml/view/adminhtml/page/menu.phtml | 4 +- .../view/adminhtml/page/notices.phtml | 4 +- .../permissions/role_users_grid_js.phtml | 2 +- .../view/adminhtml/permissions/roleinfo.phtml | 2 +- .../view/adminhtml/permissions/roles.phtml | 4 +- .../adminhtml/permissions/rolesedit.phtml | 2 +- .../adminhtml/permissions/rolesusers.phtml | 2 +- .../permissions/user_roles_grid_js.phtml | 2 +- .../view/adminhtml/permissions/userinfo.phtml | 2 +- .../view/adminhtml/permissions/users.phtml | 4 +- .../view/adminhtml/poll/answers/list.phtml | 2 +- .../Mage/Adminhtml/view/adminhtml/promo.xml | 13 +- .../view/adminhtml/promo/fieldset.phtml | 2 +- .../Adminhtml/view/adminhtml/promo/form.phtml | 2 +- .../Adminhtml/view/adminhtml/promo/js.phtml | 2 +- .../Adminhtml/view/adminhtml/promo/rules.js | 2 +- .../view/adminhtml/promo/salesrulejs.phtml | 113 + .../view/adminhtml/rating/detailed.phtml | 2 +- .../view/adminhtml/rating/options.phtml | 2 +- .../adminhtml/rating/stars/detailed.phtml | 2 +- .../view/adminhtml/rating/stars/summary.phtml | 2 +- .../Mage/Adminhtml/view/adminhtml/report.xml | 22 +- .../view/adminhtml/report/grid.phtml | 2 +- .../adminhtml/report/grid/container.phtml | 4 +- .../adminhtml/report/refresh/statistics.phtml | 2 +- .../adminhtml/report/store/switcher.phtml | 5 +- .../report/store/switcher/enhanced.phtml | 5 +- .../view/adminhtml/report/wishlist.phtml | 2 +- .../Adminhtml/view/adminhtml/review/add.phtml | 2 +- .../Mage/Adminhtml/view/adminhtml/sales.xml | 4 +- .../adminhtml/sales/items/column/name.phtml | 2 +- .../adminhtml/sales/items/column/qty.phtml | 2 +- .../sales/items/renderer/default.phtml | 2 +- .../adminhtml/sales/order/address/form.phtml | 2 +- .../adminhtml/sales/order/comments/view.phtml | 2 +- .../sales/order/create/abstract.phtml | 2 +- .../order/create/billing/method/form.phtml | 4 +- .../sales/order/create/comment.phtml | 2 +- .../sales/order/create/coupons/form.phtml | 2 +- .../adminhtml/sales/order/create/data.phtml | 4 +- .../adminhtml/sales/order/create/form.phtml | 2 +- .../sales/order/create/form/account.phtml | 2 +- .../sales/order/create/form/address.phtml | 2 +- .../sales/order/create/giftmessage.js | 2 +- .../sales/order/create/giftmessage.phtml | 2 +- .../adminhtml/sales/order/create/items.phtml | 2 +- .../sales/order/create/items/grid.phtml | 2 +- .../adminhtml/sales/order/create/js.phtml | 2 +- .../sales/order/create/newsletter/form.phtml | 2 +- .../adminhtml/sales/order/create/scripts.js | 216 +- .../order/create/shipping/method/form.phtml | 4 +- .../sales/order/create/sidebar.phtml | 2 +- .../sales/order/create/sidebar/items.phtml | 5 +- .../sales/order/create/store/select.phtml | 3 +- .../adminhtml/sales/order/create/totals.phtml | 2 +- .../sales/order/create/totals/default.phtml | 4 +- .../order/create/totals/grandtotal.phtml | 2 +- .../sales/order/create/totals/shipping.phtml | 2 +- .../sales/order/create/totals/subtotal.phtml | 2 +- .../sales/order/create/totals/tax.phtml | 2 +- .../sales/order/creditmemo/create/form.phtml | 2 +- .../sales/order/creditmemo/create/items.phtml | 2 +- .../create/items/renderer/configurable.phtml | 5 +- .../create/items/renderer/default.phtml | 3 +- .../create/totals/adjustments.phtml | 2 +- .../sales/order/creditmemo/view/form.phtml | 2 +- .../sales/order/creditmemo/view/items.phtml | 2 +- .../view/items/renderer/configurable.phtml | 5 +- .../view/items/renderer/default.phtml | 3 +- .../adminhtml/sales/order/giftoptions.phtml | 2 +- .../sales/order/giftoptions_tooltip.js | 2 +- .../sales/order/invoice/create/form.phtml | 2 +- .../sales/order/invoice/create/items.phtml | 2 +- .../create/items/renderer/configurable.phtml | 3 +- .../create/items/renderer/default.phtml | 3 +- .../sales/order/invoice/create/tracking.phtml | 4 +- .../sales/order/invoice/view/form.phtml | 2 +- .../sales/order/invoice/view/items.phtml | 2 +- .../view/items/renderer/configurable.phtml | 6 +- .../invoice/view/items/renderer/default.phtml | 3 +- .../sales/order/shipment/create/form.phtml | 2 +- .../sales/order/shipment/create/items.phtml | 2 +- .../create/items/renderer/configurable.phtml | 2 +- .../create/items/renderer/default.phtml | 2 +- .../order/shipment/create/tracking.phtml | 2 +- .../sales/order/shipment/packaging.js | 15 +- .../sales/order/shipment/packaging/grid.phtml | 4 +- .../order/shipment/packaging/packed.phtml | 4 +- .../order/shipment/packaging/popup.phtml | 14 +- .../sales/order/shipment/tracking/info.phtml | 2 +- .../sales/order/shipment/view/form.phtml | 2 +- .../sales/order/shipment/view/items.phtml | 2 +- .../view/items/renderer/configurable.phtml | 2 +- .../view/items/renderer/default.phtml | 2 +- .../sales/order/shipment/view/tracking.phtml | 4 +- .../view/adminhtml/sales/order/totalbar.phtml | 2 +- .../view/adminhtml/sales/order/totals.phtml | 40 +- .../sales/order/totals/discount.phtml | 2 +- .../adminhtml/sales/order/totals/due.phtml | 2 +- .../adminhtml/sales/order/totals/footer.phtml | 2 +- .../adminhtml/sales/order/totals/grand.phtml | 2 +- .../adminhtml/sales/order/totals/item.phtml | 2 +- .../adminhtml/sales/order/totals/main.phtml | 2 +- .../adminhtml/sales/order/totals/paid.phtml | 2 +- .../sales/order/totals/refunded.phtml | 2 +- .../sales/order/totals/shipping.phtml | 2 +- .../adminhtml/sales/order/totals/tax.phtml | 2 +- .../adminhtml/sales/order/view/form.phtml | 2 +- .../sales/order/view/giftmessage.phtml | 2 +- .../adminhtml/sales/order/view/history.phtml | 2 +- .../adminhtml/sales/order/view/info.phtml | 2 +- .../adminhtml/sales/order/view/items.phtml | 2 +- .../order/view/items/renderer/default.phtml | 2 +- .../sales/order/view/tab/history.phtml | 2 +- .../adminhtml/sales/order/view/tab/info.phtml | 2 +- .../adminhtml/sales/order/view/tracking.phtml | 23 +- .../adminhtml/sales/transactions/detail.phtml | 2 +- .../view/adminhtml/store/switcher.phtml | 5 +- .../adminhtml/store/switcher/enhanced.phtml | 5 +- .../switcher/form/renderer/fieldset.phtml | 61 + .../view/adminhtml/system/autocomplete.phtml | 2 +- .../adminhtml/system/cache/additional.phtml | 6 +- .../view/adminhtml/system/cache/edit.phtml | 6 +- .../system/cache/notifications.phtml | 2 +- .../view/adminhtml/system/config/edit.phtml | 2 +- .../system/config/form/field/array.phtml | 10 +- .../view/adminhtml/system/config/js.phtml | 7 +- .../adminhtml/system/config/switcher.phtml | 3 +- .../system/storage/media/synchronize.phtml | 2 +- .../view/adminhtml/system/config/tabs.phtml | 2 +- .../system/convert/profile/process.phtml | 2 +- .../system/convert/profile/run.phtml | 2 +- .../system/convert/profile/upload.phtml | 2 +- .../system/convert/profile/wizard.phtml | 2 +- .../system/currency/rate/matrix.phtml | 2 +- .../system/currency/rate/services.phtml | 2 +- .../adminhtml/system/currency/rates.phtml | 2 +- .../view/adminhtml/system/design/edit.phtml | 2 +- .../view/adminhtml/system/design/index.phtml | 2 +- .../system/email/template/edit.phtml | 2 +- .../system/email/template/list.phtml | 2 +- .../system/email/template/preview.phtml | 2 +- .../view/adminhtml/system/info.phtml | 2 +- .../system/shipping/applicable_country.phtml | 2 +- .../view/adminhtml/system/shipping/ups.phtml | 223 +- .../view/adminhtml/system/variable/js.phtml | 2 +- .../Mage/Adminhtml/view/adminhtml/tag.xml | 38 +- .../view/adminhtml/tag/edit/container.phtml | 2 +- .../Adminhtml/view/adminhtml/tag/index.phtml | 2 +- .../view/adminhtml/tax/class/page/edit.phtml | 2 +- .../view/adminhtml/tax/importExport.phtml | 2 +- .../view/adminhtml/tax/rate/form.phtml | 2 +- .../view/adminhtml/tax/rate/title.phtml | 2 +- .../adminhtml/tax/toolbar/class/add.phtml | 4 +- .../adminhtml/tax/toolbar/class/save.phtml | 2 +- .../view/adminhtml/tax/toolbar/rate/add.phtml | 2 +- .../adminhtml/tax/toolbar/rate/save.phtml | 2 +- .../view/adminhtml/tax/toolbar/rule/add.phtml | 4 +- .../adminhtml/tax/toolbar/rule/save.phtml | 2 +- .../adminhtml/urlrewrite/categories.phtml | 2 +- .../view/adminhtml/urlrewrite/edit.phtml | 2 +- .../view/adminhtml/urlrewrite/selector.phtml | 2 +- .../Adminhtml/view/adminhtml/variables.js | 2 +- .../view/adminhtml/widget/accordion.phtml | 6 +- .../view/adminhtml/widget/breadcrumbs.phtml | 2 +- .../view/adminhtml/widget/form.phtml | 2 +- .../adminhtml/widget/form/container.phtml | 2 +- .../view/adminhtml/widget/form/element.phtml | 2 +- .../widget/form/element/gallery.phtml | 2 +- .../widget/form/renderer/element.phtml | 2 +- .../widget/form/renderer/fieldset.phtml | 2 +- .../form/renderer/fieldset/element.phtml | 2 +- .../view/adminhtml/widget/grid.phtml | 2 +- .../adminhtml/widget/grid/container.phtml | 2 +- .../adminhtml/widget/grid/massaction.phtml | 6 +- .../adminhtml/widget/grid/serializer.phtml | 2 +- .../view/adminhtml/widget/tabs.phtml | 2 +- .../view/adminhtml/widget/tabshoriz.phtml | 2 +- .../view/adminhtml/widget/tabsleft.phtml | 2 +- .../adminhtml/widget/view/container.phtml | 2 +- app/code/core/Mage/Api/Controller/Action.php | 2 +- app/code/core/Mage/Api/Exception.php | 2 +- app/code/core/Mage/Api/Helper/Data.php | 2 +- app/code/core/Mage/Api/Model/Acl.php | 2 +- app/code/core/Mage/Api/Model/Acl/Resource.php | 2 +- app/code/core/Mage/Api/Model/Acl/Role.php | 2 +- .../core/Mage/Api/Model/Acl/Role/Generic.php | 2 +- .../core/Mage/Api/Model/Acl/Role/Group.php | 2 +- .../core/Mage/Api/Model/Acl/Role/Registry.php | 2 +- .../core/Mage/Api/Model/Acl/Role/User.php | 2 +- app/code/core/Mage/Api/Model/Config.php | 2 +- .../core/Mage/Api/Model/Resource/Abstract.php | 2 +- app/code/core/Mage/Api/Model/Resource/Acl.php | 2 +- .../core/Mage/Api/Model/Resource/Acl/Role.php | 2 +- .../Model/Resource/Acl/Role/Collection.php | 2 +- .../Model/Resource/Permissions/Collection.php | 2 +- .../core/Mage/Api/Model/Resource/Role.php | 2 +- .../Api/Model/Resource/Role/Collection.php | 2 +- .../core/Mage/Api/Model/Resource/Roles.php | 2 +- .../Api/Model/Resource/Roles/Collection.php | 2 +- .../Model/Resource/Roles/User/Collection.php | 2 +- .../core/Mage/Api/Model/Resource/Rules.php | 2 +- .../Api/Model/Resource/Rules/Collection.php | 2 +- .../core/Mage/Api/Model/Resource/User.php | 2 +- .../Api/Model/Resource/User/Collection.php | 2 +- app/code/core/Mage/Api/Model/Role.php | 2 +- app/code/core/Mage/Api/Model/Roles.php | 2 +- app/code/core/Mage/Api/Model/Rules.php | 2 +- app/code/core/Mage/Api/Model/Server.php | 2 +- .../Api/Model/Server/Adapter/Interface.php | 2 +- .../Mage/Api/Model/Server/Adapter/Soap.php | 2 +- .../Mage/Api/Model/Server/Adapter/Xmlrpc.php | 2 +- .../core/Mage/Api/Model/Server/Handler.php | 2 +- .../Api/Model/Server/Handler/Abstract.php | 2 +- .../Mage/Api/Model/Server/V2/Adapter/Soap.php | 2 +- .../core/Mage/Api/Model/Server/V2/Handler.php | 2 +- .../Api/Model/Server/Wsi/Adapter/Soap.php | 2 +- .../Mage/Api/Model/Server/Wsi/Handler.php | 2 +- app/code/core/Mage/Api/Model/Session.php | 2 +- app/code/core/Mage/Api/Model/User.php | 9 +- app/code/core/Mage/Api/Model/Wsdl/Config.php | 2 +- .../core/Mage/Api/Model/Wsdl/Config/Base.php | 2 +- .../Mage/Api/Model/Wsdl/Config/Element.php | 2 +- .../Mage/Api/controllers/IndexController.php | 2 +- .../Mage/Api/controllers/SoapController.php | 2 +- .../Api/controllers/V2/SoapController.php | 2 +- .../Mage/Api/controllers/XmlrpcController.php | 2 +- app/code/core/Mage/Api/etc/adminhtml.xml | 2 +- app/code/core/Mage/Api/etc/api.xml | 2 +- app/code/core/Mage/Api/etc/config.xml | 2 +- app/code/core/Mage/Api/etc/system.xml | 2 +- .../Api/sql/api_setup/install-1.6.0.0.php | 2 +- .../Authorizenet/Block/Directpost/Form.php | 2 +- .../Authorizenet/Block/Directpost/Iframe.php | 2 +- .../core/Mage/Authorizenet/Helper/Data.php | 2 +- .../Mage/Authorizenet/Model/Directpost.php | 2 +- .../Model/Directpost/Observer.php | 2 +- .../Authorizenet/Model/Directpost/Request.php | 2 +- .../Model/Directpost/Response.php | 2 +- .../Authorizenet/Model/Directpost/Session.php | 2 +- .../Directpost/PaymentController.php | 2 +- .../Directpost/PaymentController.php | 2 +- .../core/Mage/Authorizenet/etc/config.xml | 2 +- .../core/Mage/Authorizenet/etc/system.xml | 3 +- .../view/adminhtml/directpost/iframe.phtml | 2 +- .../view/adminhtml/directpost/info.phtml | 2 +- .../Authorizenet/view/adminhtml/layout.xml | 2 +- .../view/frontend/directpost/form.phtml | 2 +- .../view/frontend/directpost/iframe.phtml | 2 +- .../view/frontend/directpost/info.phtml | 2 +- .../Authorizenet/view/frontend/layout.xml | 2 +- app/code/core/Mage/Backup/Exception.php | 2 +- app/code/core/Mage/Backup/Helper/Data.php | 302 +- app/code/core/Mage/Backup/Model/Backup.php | 96 +- .../Mage/Backup/Model/Config/Backend/Cron.php | 89 + .../Mage/Backup/Model/Config/Source/Type.php | 52 + app/code/core/Mage/Backup/Model/Db.php | 6 +- .../core/Mage/Backup/Model/Fs/Collection.php | 12 +- app/code/core/Mage/Backup/Model/Observer.php | 95 + .../core/Mage/Backup/Model/Resource/Db.php | 43 +- .../Backup/Model/Resource/Helper/Mysql4.php | 53 +- app/code/core/Mage/Backup/etc/adminhtml.xml | 7 +- app/code/core/Mage/Backup/etc/config.xml | 11 +- app/code/core/Mage/Backup/etc/system.xml | 95 + .../Product/Composite/Fieldset/Bundle.php | 2 +- .../Fieldset/Options/Type/Checkbox.php | 2 +- .../Composite/Fieldset/Options/Type/Multi.php | 2 +- .../Composite/Fieldset/Options/Type/Radio.php | 2 +- .../Fieldset/Options/Type/Select.php | 2 +- .../Catalog/Product/Edit/Tab/Attributes.php | 11 +- .../Product/Edit/Tab/Attributes/Extend.php | 2 +- .../Product/Edit/Tab/Attributes/Special.php | 2 +- .../Catalog/Product/Edit/Tab/Bundle.php | 2 +- .../Product/Edit/Tab/Bundle/Option.php | 2 +- .../Product/Edit/Tab/Bundle/Option/Search.php | 2 +- .../Edit/Tab/Bundle/Option/Search/Grid.php | 2 +- .../Edit/Tab/Bundle/Option/Selection.php | 2 +- .../Adminhtml/Catalog/Product/Edit/Tabs.php | 2 +- .../Adminhtml/Sales/Order/Items/Renderer.php | 2 +- .../Sales/Order/View/Items/Renderer.php | 2 +- .../Bundle/Block/Catalog/Product/Price.php | 2 +- .../Bundle/Block/Catalog/Product/View.php | 2 +- .../Catalog/Product/View/Type/Bundle.php | 5 +- .../Product/View/Type/Bundle/Option.php | 7 +- .../View/Type/Bundle/Option/Checkbox.php | 2 +- .../Product/View/Type/Bundle/Option/Multi.php | 2 +- .../Product/View/Type/Bundle/Option/Radio.php | 2 +- .../View/Type/Bundle/Option/Select.php | 2 +- .../Block/Checkout/Cart/Item/Renderer.php | 2 +- .../Block/Sales/Order/Items/Renderer.php | 2 +- .../Helper/Catalog/Product/Configuration.php | 21 +- app/code/core/Mage/Bundle/Helper/Data.php | 2 +- app/code/core/Mage/Bundle/Model/Observer.php | 2 +- app/code/core/Mage/Bundle/Model/Option.php | 2 +- .../core/Mage/Bundle/Model/Price/Index.php | 2 +- .../Product/Attribute/Source/Price/View.php | 2 +- .../core/Mage/Bundle/Model/Product/Price.php | 207 +- .../core/Mage/Bundle/Model/Product/Type.php | 8 +- .../Mage/Bundle/Model/Resource/Bundle.php | 2 +- .../Bundle/Model/Resource/Indexer/Price.php | 173 +- .../Bundle/Model/Resource/Indexer/Stock.php | 2 +- .../Mage/Bundle/Model/Resource/Option.php | 2 +- .../Model/Resource/Option/Collection.php | 2 +- .../Bundle/Model/Resource/Price/Index.php | 2 +- .../Mage/Bundle/Model/Resource/Selection.php | 2 +- .../Model/Resource/Selection/Collection.php | 2 +- .../Model/Sales/Order/Pdf/Items/Abstract.php | 2 +- .../Sales/Order/Pdf/Items/Creditmemo.php | 2 +- .../Model/Sales/Order/Pdf/Items/Invoice.php | 2 +- .../Model/Sales/Order/Pdf/Items/Shipment.php | 2 +- app/code/core/Mage/Bundle/Model/Selection.php | 2 +- .../Source/Option/Selection/Price/Type.php | 2 +- .../Mage/Bundle/Model/Source/Option/Type.php | 2 +- .../Bundle/Product/EditController.php | 2 +- .../Adminhtml/Bundle/SelectionController.php | 2 +- .../bundle_setup/data-install-1.6.0.0.php | 2 +- app/code/core/Mage/Bundle/etc/config.xml | 4 +- app/code/core/Mage/Bundle/etc/fieldset.xml | 2 +- .../sql/bundle_setup/install-1.6.0.0.php | 2 +- .../mysql4-upgrade-1.6.0.0-1.6.0.0.1.php | 44 + .../upgrade-1.6.0.0-1.6.0.0.1.php | 84 + .../Mage/Bundle/view/adminhtml/layout.xml | 2 +- .../composite/fieldset/options/bundle.phtml | 2 +- .../fieldset/options/type/checkbox.phtml | 2 +- .../fieldset/options/type/multi.phtml | 2 +- .../fieldset/options/type/radio.phtml | 2 +- .../fieldset/options/type/select.phtml | 2 +- .../view/adminhtml/product/edit/bundle.phtml | 2 +- .../product/edit/bundle/option.phtml | 2 +- .../product/edit/bundle/option/search.phtml | 2 +- .../edit/bundle/option/selection.phtml | 2 +- .../creditmemo/create/items/renderer.phtml | 2 +- .../creditmemo/view/items/renderer.phtml | 2 +- .../sales/invoice/create/items/renderer.phtml | 2 +- .../sales/invoice/view/items/renderer.phtml | 2 +- .../sales/order/view/items/renderer.phtml | 2 +- .../shipment/create/items/renderer.phtml | 2 +- .../sales/shipment/view/items/renderer.phtml | 2 +- .../core/Mage/Bundle/view/frontend/bundle.js | 2 +- .../view/frontend/catalog/product/price.phtml | 15 +- .../catalog/product/view/options/notice.phtml | 2 +- .../frontend/catalog/product/view/price.phtml | 2 +- .../catalog/product/view/tierprices.phtml | 2 +- .../catalog/product/view/type/bundle.phtml | 2 +- .../view/type/bundle/option/checkbox.phtml | 2 +- .../view/type/bundle/option/multi.phtml | 2 +- .../view/type/bundle/option/radio.phtml | 2 +- .../view/type/bundle/option/select.phtml | 2 +- .../product/view/type/bundle/options.phtml | 2 +- .../order/items/creditmemo/default.phtml | 2 +- .../email/order/items/invoice/default.phtml | 2 +- .../email/order/items/order/default.phtml | 2 +- .../email/order/items/shipment/default.phtml | 2 +- .../core/Mage/Bundle/view/frontend/layout.xml | 2 +- .../frontend/rss/catalog/product/price.phtml | 2 +- .../order/creditmemo/items/renderer.phtml | 2 +- .../sales/order/invoice/items/renderer.phtml | 2 +- .../frontend/sales/order/items/renderer.phtml | 2 +- .../sales/order/shipment/items/renderer.phtml | 2 +- app/code/core/Mage/Captcha/Block/Captcha.php | 48 + .../core/Mage/Captcha/Block/Captcha/Zend.php | 87 + app/code/core/Mage/Captcha/Helper/Data.php | 138 + .../core/Mage/Captcha/Model/Config/Font.php | 49 + .../Captcha/Model/Config/Form/Abstract.php | 61 + .../Captcha/Model/Config/Form/Backend.php | 40 + .../Captcha/Model/Config/Form/Frontend.php | 40 + .../core/Mage/Captcha/Model/Config/Mode.php | 54 + .../core/Mage/Captcha/Model/Interface.php | 60 + app/code/core/Mage/Captcha/Model/Observer.php | 292 + .../core/Mage/Captcha/Model/Resource/Log.php | 156 + app/code/core/Mage/Captcha/Model/Zend.php | 504 ++ .../Adminhtml/RefreshController.php | 50 + .../Captcha/controllers/RefreshController.php | 50 + app/code/core/Mage/Captcha/etc/config.xml | 250 + app/code/core/Mage/Captcha/etc/system.xml | 250 + .../sql/captcha_setup/install-1.7.0.0.0.php | 52 + .../Mage/Captcha/view/adminhtml/layout.xml | 47 + .../Mage/Captcha/view/adminhtml/reload.png | Bin 0 -> 1538 bytes .../Mage/Captcha/view/adminhtml/zend.phtml | 57 + .../Mage/Captcha/view/frontend/layout.xml | 105 + .../Mage/Captcha/view/frontend/reload.png | Bin 0 -> 1538 bytes .../Mage/Captcha/view/frontend/zend.phtml | 52 + .../core/Mage/Catalog/Block/Breadcrumbs.php | 2 +- .../core/Mage/Catalog/Block/Category/View.php | 2 +- .../Catalog/Block/Category/Widget/Link.php | 2 +- .../Catalog/Block/Layer/Filter/Abstract.php | 2 +- .../Catalog/Block/Layer/Filter/Attribute.php | 2 +- .../Catalog/Block/Layer/Filter/Category.php | 2 +- .../Catalog/Block/Layer/Filter/Decimal.php | 2 +- .../Mage/Catalog/Block/Layer/Filter/Price.php | 2 +- .../core/Mage/Catalog/Block/Layer/State.php | 2 +- .../core/Mage/Catalog/Block/Layer/View.php | 12 +- .../core/Mage/Catalog/Block/Navigation.php | 2 +- app/code/core/Mage/Catalog/Block/Product.php | 2 +- .../Mage/Catalog/Block/Product/Abstract.php | 17 +- .../Block/Product/Compare/Abstract.php | 2 +- .../Catalog/Block/Product/Compare/List.php | 2 +- .../Catalog/Block/Product/Compare/Sidebar.php | 2 +- .../Mage/Catalog/Block/Product/Gallery.php | 2 +- .../core/Mage/Catalog/Block/Product/List.php | 2 +- .../Catalog/Block/Product/List/Crosssell.php | 2 +- .../Catalog/Block/Product/List/Promotion.php | 2 +- .../Catalog/Block/Product/List/Random.php | 2 +- .../Catalog/Block/Product/List/Related.php | 2 +- .../Catalog/Block/Product/List/Toolbar.php | 2 +- .../Catalog/Block/Product/List/Upsell.php | 2 +- .../core/Mage/Catalog/Block/Product/New.php | 15 +- .../core/Mage/Catalog/Block/Product/Price.php | 19 +- .../Catalog/Block/Product/Price/Template.php | 2 +- .../core/Mage/Catalog/Block/Product/Send.php | 2 +- .../core/Mage/Catalog/Block/Product/View.php | 6 +- .../Catalog/Block/Product/View/Abstract.php | 2 +- .../Catalog/Block/Product/View/Additional.php | 2 +- .../Catalog/Block/Product/View/Attributes.php | 2 +- .../Block/Product/View/Description.php | 2 +- .../Mage/Catalog/Block/Product/View/Media.php | 2 +- .../Catalog/Block/Product/View/Options.php | 30 +- .../Block/Product/View/Options/Abstract.php | 6 +- .../Block/Product/View/Options/Type/Date.php | 2 +- .../Product/View/Options/Type/Default.php | 2 +- .../Block/Product/View/Options/Type/File.php | 2 +- .../Product/View/Options/Type/Select.php | 37 +- .../Block/Product/View/Options/Type/Text.php | 2 +- .../Mage/Catalog/Block/Product/View/Price.php | 2 +- .../Mage/Catalog/Block/Product/View/Tabs.php | 2 +- .../Block/Product/View/Type/Configurable.php | 111 +- .../Block/Product/View/Type/Grouped.php | 2 +- .../Block/Product/View/Type/Simple.php | 2 +- .../Block/Product/View/Type/Virtual.php | 2 +- .../Catalog/Block/Product/Widget/Link.php | 2 +- .../Mage/Catalog/Block/Product/Widget/New.php | 2 +- .../Catalog/Block/Seo/Sitemap/Abstract.php | 2 +- .../Catalog/Block/Seo/Sitemap/Category.php | 2 +- .../Catalog/Block/Seo/Sitemap/Product.php | 2 +- .../Block/Seo/Sitemap/Tree/Category.php | 2 +- .../Catalog/Block/Seo/Sitemap/Tree/Pager.php | 2 +- .../core/Mage/Catalog/Block/Widget/Link.php | 2 +- .../Controller/Product/View/Interface.php | 2 +- app/code/core/Mage/Catalog/Exception.php | 2 +- .../core/Mage/Catalog/Helper/Category.php | 2 +- .../Mage/Catalog/Helper/Category/Flat.php | 2 +- app/code/core/Mage/Catalog/Helper/Data.php | 2 +- app/code/core/Mage/Catalog/Helper/Image.php | 201 +- app/code/core/Mage/Catalog/Helper/Map.php | 2 +- app/code/core/Mage/Catalog/Helper/Output.php | 2 +- app/code/core/Mage/Catalog/Helper/Product.php | 2 +- .../Mage/Catalog/Helper/Product/Compare.php | 2 +- .../Catalog/Helper/Product/Configuration.php | 2 +- .../Product/Configuration/Interface.php | 2 +- .../core/Mage/Catalog/Helper/Product/Flat.php | 2 +- .../Mage/Catalog/Helper/Product/Options.php | 2 +- .../core/Mage/Catalog/Helper/Product/Url.php | 2 +- .../core/Mage/Catalog/Helper/Product/View.php | 2 +- app/code/core/Mage/Catalog/Model/Abstract.php | 2 +- .../core/Mage/Catalog/Model/Api/Resource.php | 2 +- .../Attribute/Backend/Customlayoutupdate.php | 2 +- app/code/core/Mage/Catalog/Model/Category.php | 2 +- .../core/Mage/Catalog/Model/Category/Api.php | 2 +- .../Mage/Catalog/Model/Category/Api/V2.php | 2 +- .../Catalog/Model/Category/Attribute/Api.php | 2 +- .../Model/Category/Attribute/Api/V2.php | 2 +- .../Category/Attribute/Backend/Image.php | 2 +- .../Category/Attribute/Backend/Sortby.php | 2 +- .../Category/Attribute/Backend/Urlkey.php | 2 +- .../Category/Attribute/Source/Layout.php | 2 +- .../Model/Category/Attribute/Source/Mode.php | 2 +- .../Model/Category/Attribute/Source/Page.php | 2 +- .../Category/Attribute/Source/Sortby.php | 2 +- .../Catalog/Model/Category/Indexer/Flat.php | 2 +- .../Model/Category/Indexer/Product.php | 2 +- app/code/core/Mage/Catalog/Model/Config.php | 2 +- app/code/core/Mage/Catalog/Model/Convert.php | 2 +- .../Catalog/Model/Convert/Adapter/Catalog.php | 2 +- .../Catalog/Model/Convert/Adapter/Product.php | 34 +- .../Catalog/Model/Convert/Parser/Product.php | 2 +- app/code/core/Mage/Catalog/Model/Design.php | 2 +- .../Mage/Catalog/Model/Entity/Attribute.php | 2 +- .../Attribute/Design/Options/Container.php | 2 +- app/code/core/Mage/Catalog/Model/Index.php | 2 +- .../core/Mage/Catalog/Model/Indexer/Url.php | 2 +- app/code/core/Mage/Catalog/Model/Layer.php | 2 +- .../Catalog/Model/Layer/Filter/Abstract.php | 12 +- .../Catalog/Model/Layer/Filter/Attribute.php | 6 +- .../Catalog/Model/Layer/Filter/Category.php | 2 +- .../Catalog/Model/Layer/Filter/Decimal.php | 2 +- .../Mage/Catalog/Model/Layer/Filter/Item.php | 23 +- .../Mage/Catalog/Model/Layer/Filter/Price.php | 159 +- .../Model/Layer/Filter/Price/Algorithm.php | 387 +- .../core/Mage/Catalog/Model/Layer/State.php | 2 +- app/code/core/Mage/Catalog/Model/Observer.php | 2 +- app/code/core/Mage/Catalog/Model/Product.php | 24 +- .../Mage/Catalog/Model/Product/Action.php | 2 +- .../core/Mage/Catalog/Model/Product/Api.php | 19 +- .../Mage/Catalog/Model/Product/Api/V2.php | 23 +- .../Catalog/Model/Product/Attribute/Api.php | 2 +- .../Model/Product/Attribute/Api/V2.php | 2 +- .../Product/Attribute/Backend/Boolean.php | 2 +- .../Product/Attribute/Backend/Groupprice.php | 57 + .../Attribute/Backend/Groupprice/Abstract.php | 369 ++ .../Model/Product/Attribute/Backend/Media.php | 7 +- .../Model/Product/Attribute/Backend/Msrp.php | 2 +- .../Model/Product/Attribute/Backend/Price.php | 2 +- .../Product/Attribute/Backend/Recurring.php | 2 +- .../Model/Product/Attribute/Backend/Sku.php | 2 +- .../Product/Attribute/Backend/Startdate.php | 2 +- .../Product/Attribute/Backend/Tierprice.php | 279 +- .../Product/Attribute/Backend/Urlkey.php | 2 +- .../Product/Attribute/Frontend/Image.php | 2 +- .../Catalog/Model/Product/Attribute/Group.php | 2 +- .../Model/Product/Attribute/Media/Api.php | 2 +- .../Model/Product/Attribute/Media/Api/V2.php | 2 +- .../Model/Product/Attribute/Set/Api.php | 2 +- .../Model/Product/Attribute/Set/Api/V2.php | 2 +- .../Product/Attribute/Source/Boolean.php | 2 +- .../Attribute/Source/Countryofmanufacture.php | 2 +- .../Product/Attribute/Source/Inputtype.php | 2 +- .../Model/Product/Attribute/Source/Layout.php | 2 +- .../Product/Attribute/Source/Msrp/Type.php | 2 +- .../Attribute/Source/Msrp/Type/Enabled.php | 2 +- .../Attribute/Source/Msrp/Type/Price.php | 2 +- .../Model/Product/Attribute/Tierprice/Api.php | 2 +- .../Product/Attribute/Tierprice/Api/V2.php | 2 +- .../Catalog/Model/Product/Compare/Item.php | 2 +- .../Catalog/Model/Product/Compare/List.php | 2 +- .../Mage/Catalog/Model/Product/Condition.php | 2 +- .../Model/Product/Condition/Interface.php | 2 +- .../Product/Configuration/Item/Interface.php | 2 +- .../Product/Configuration/Item/Option.php | 2 +- .../Configuration/Item/Option/Interface.php | 2 +- .../Mage/Catalog/Model/Product/Flat/Flag.php | 2 +- .../Catalog/Model/Product/Flat/Indexer.php | 12 +- .../Catalog/Model/Product/Flat/Observer.php | 2 +- .../core/Mage/Catalog/Model/Product/Image.php | 2 +- .../Catalog/Model/Product/Indexer/Eav.php | 2 +- .../Catalog/Model/Product/Indexer/Flat.php | 23 +- .../Catalog/Model/Product/Indexer/Price.php | 2 +- .../core/Mage/Catalog/Model/Product/Link.php | 2 +- .../Mage/Catalog/Model/Product/Link/Api.php | 2 +- .../Catalog/Model/Product/Link/Api/V2.php | 2 +- .../Catalog/Model/Product/Media/Config.php | 2 +- .../Mage/Catalog/Model/Product/Option.php | 2 +- .../Mage/Catalog/Model/Product/Option/Api.php | 2 +- .../Catalog/Model/Product/Option/Api/V2.php | 2 +- .../Catalog/Model/Product/Option/Observer.php | 2 +- .../Model/Product/Option/Type/Date.php | 2 +- .../Model/Product/Option/Type/Default.php | 2 +- .../Model/Product/Option/Type/File.php | 18 +- .../Model/Product/Option/Type/Select.php | 2 +- .../Model/Product/Option/Type/Text.php | 2 +- .../Catalog/Model/Product/Option/Value.php | 2 +- .../Model/Product/Option/Value/Api.php | 2 +- .../Model/Product/Option/Value/Api/V2.php | 2 +- .../Mage/Catalog/Model/Product/Status.php | 2 +- .../core/Mage/Catalog/Model/Product/Type.php | 2 +- .../Catalog/Model/Product/Type/Abstract.php | 2 +- .../Mage/Catalog/Model/Product/Type/Api.php | 2 +- .../Catalog/Model/Product/Type/Api/V2.php | 2 +- .../Model/Product/Type/Configurable.php | 20 +- .../Product/Type/Configurable/Attribute.php | 2 +- .../Model/Product/Type/Configurable/Price.php | 43 +- .../Catalog/Model/Product/Type/Grouped.php | 2 +- .../Model/Product/Type/Grouped/Price.php | 2 +- .../Mage/Catalog/Model/Product/Type/Price.php | 128 +- .../Catalog/Model/Product/Type/Simple.php | 2 +- .../Catalog/Model/Product/Type/Virtual.php | 2 +- .../core/Mage/Catalog/Model/Product/Url.php | 2 +- .../Mage/Catalog/Model/Product/Visibility.php | 2 +- .../Mage/Catalog/Model/Product/Website.php | 2 +- .../Mage/Catalog/Model/Resource/Abstract.php | 4 +- .../Mage/Catalog/Model/Resource/Attribute.php | 2 +- .../Mage/Catalog/Model/Resource/Category.php | 2 +- .../Category/Attribute/Collection.php | 2 +- .../Category/Attribute/Frontend/Image.php | 2 +- .../Category/Attribute/Source/Layout.php | 2 +- .../Category/Attribute/Source/Mode.php | 2 +- .../Category/Attribute/Source/Page.php | 2 +- .../Model/Resource/Category/Collection.php | 2 +- .../Catalog/Model/Resource/Category/Flat.php | 2 +- .../Resource/Category/Flat/Collection.php | 2 +- .../Resource/Category/Indexer/Product.php | 2 +- .../Catalog/Model/Resource/Category/Tree.php | 2 +- .../Model/Resource/Collection/Abstract.php | 2 +- .../Mage/Catalog/Model/Resource/Config.php | 2 +- .../Catalog/Model/Resource/Eav/Attribute.php | 2 +- .../Catalog/Model/Resource/Helper/Mysql4.php | 2 +- .../Model/Resource/Layer/Filter/Attribute.php | 2 +- .../Model/Resource/Layer/Filter/Decimal.php | 7 +- .../Model/Resource/Layer/Filter/Price.php | 16 +- .../Mage/Catalog/Model/Resource/Product.php | 13 +- .../Catalog/Model/Resource/Product/Action.php | 2 +- .../Product/Attribute/Backend/Groupprice.php | 46 + .../Attribute/Backend/Groupprice/Abstract.php | 147 + .../Product/Attribute/Backend/Image.php | 2 +- .../Product/Attribute/Backend/Media.php | 2 +- .../Product/Attribute/Backend/Tierprice.php | 92 +- .../Product/Attribute/Backend/Urlkey.php | 2 +- .../Resource/Product/Attribute/Collection.php | 13 +- .../Model/Resource/Product/Collection.php | 24 +- .../Model/Resource/Product/Compare/Item.php | 2 +- .../Product/Compare/Item/Collection.php | 2 +- .../Catalog/Model/Resource/Product/Flat.php | 2 +- .../Model/Resource/Product/Flat/Indexer.php | 2630 +++++---- .../Resource/Product/Indexer/Abstract.php | 2 +- .../Model/Resource/Product/Indexer/Eav.php | 2 +- .../Resource/Product/Indexer/Eav/Abstract.php | 2 +- .../Resource/Product/Indexer/Eav/Decimal.php | 2 +- .../Resource/Product/Indexer/Eav/Source.php | 12 +- .../Model/Resource/Product/Indexer/Price.php | 59 +- .../Product/Indexer/Price/Configurable.php | 33 +- .../Product/Indexer/Price/Default.php | 75 +- .../Product/Indexer/Price/Grouped.php | 15 +- .../Product/Indexer/Price/Interface.php | 2 +- .../Catalog/Model/Resource/Product/Link.php | 2 +- .../Resource/Product/Link/Collection.php | 2 +- .../Product/Link/Product/Collection.php | 2 +- .../Catalog/Model/Resource/Product/Option.php | 2 +- .../Resource/Product/Option/Collection.php | 2 +- .../Model/Resource/Product/Option/Value.php | 2 +- .../Product/Option/Value/Collection.php | 2 +- .../Model/Resource/Product/Relation.php | 2 +- .../Catalog/Model/Resource/Product/Status.php | 2 +- .../Resource/Product/Type/Configurable.php | 2 +- .../Product/Type/Configurable/Attribute.php | 2 +- .../Configurable/Attribute/Collection.php | 2 +- .../Type/Configurable/Product/Collection.php | 2 +- .../Model/Resource/Product/Website.php | 2 +- .../Mage/Catalog/Model/Resource/Setup.php | 15 +- .../core/Mage/Catalog/Model/Resource/Url.php | 62 +- app/code/core/Mage/Catalog/Model/Session.php | 2 +- .../Config/Backend/Catalog/Category/Flat.php | 2 +- .../Config/Backend/Catalog/Product/Flat.php | 2 +- .../Backend/Catalog/Url/Rewrite/Suffix.php | 2 +- .../Mage/Catalog/Model/Template/Filter.php | 2 +- app/code/core/Mage/Catalog/Model/Url.php | 38 +- .../controllers/CategoryController.php | 2 +- .../Catalog/controllers/IndexController.php | 2 +- .../controllers/Product/CompareController.php | 2 +- .../Catalog/controllers/ProductController.php | 2 +- .../controllers/Seo/SitemapController.php | 2 +- .../catalog_setup/data-install-1.6.0.0.php | 2 +- .../data-upgrade-1.6.0.0.4-1.6.0.0.5.php | 2 +- .../data-upgrade-1.6.0.0.8-1.6.0.0.9.php | 36 + app/code/core/Mage/Catalog/etc/adminhtml.xml | 2 +- app/code/core/Mage/Catalog/etc/api.xml | 2 +- app/code/core/Mage/Catalog/etc/config.xml | 7 +- app/code/core/Mage/Catalog/etc/convert.xml | 32 +- app/code/core/Mage/Catalog/etc/fieldset.xml | 2 +- app/code/core/Mage/Catalog/etc/system.xml | 40 +- app/code/core/Mage/Catalog/etc/view.xml | 2 +- app/code/core/Mage/Catalog/etc/widget.xml | 2 +- .../sql/catalog_setup/install-1.6.0.0.php | 2 +- .../mysql4-upgrade-1.6.0.0.8-1.6.0.0.9.php | 53 + .../upgrade-1.6.0.0-1.6.0.0.1.php | 2 +- .../upgrade-1.6.0.0.1-1.6.0.0.2.php | 2 +- .../upgrade-1.6.0.0.10-1.6.0.0.11.php | 31 + .../upgrade-1.6.0.0.2-1.6.0.0.3.php | 2 +- .../upgrade-1.6.0.0.3-1.6.0.0.4.php | 2 +- .../upgrade-1.6.0.0.4-1.6.0.0.5.php | 2 +- .../upgrade-1.6.0.0.5-1.6.0.0.6.php | 2 +- .../upgrade-1.6.0.0.6-1.6.0.0.7.php | 2 +- .../upgrade-1.6.0.0.7-1.6.0.0.8.php | 2 +- .../upgrade-1.6.0.0.9-1.6.0.0.10.php | 214 + .../Catalog/view/frontend/category/view.phtml | 2 +- .../category/widget/link/link_block.phtml | 2 +- .../category/widget/link/link_inline.phtml | 2 +- .../Catalog/view/frontend/layer/filter.phtml | 2 +- .../Catalog/view/frontend/layer/state.phtml | 9 +- .../Catalog/view/frontend/layer/view.phtml | 5 +- .../Mage/Catalog/view/frontend/layout.xml | 2 +- .../core/Mage/Catalog/view/frontend/msrp.js | 2 +- .../core/Mage/Catalog/view/frontend/msrp.xml | 2 +- .../Catalog/view/frontend/msrp/popup.phtml | 2 +- .../view/frontend/navigation/left.phtml | 2 +- .../view/frontend/navigation/top.phtml | 2 +- .../view/frontend/product/compare/list.phtml | 6 +- .../frontend/product/compare/sidebar.phtml | 2 +- .../view/frontend/product/gallery.phtml | 2 +- .../Catalog/view/frontend/product/list.phtml | 2 +- .../view/frontend/product/list/related.phtml | 2 +- .../view/frontend/product/list/toolbar.phtml | 2 +- .../view/frontend/product/list/upsell.phtml | 2 +- .../Catalog/view/frontend/product/new.phtml | 2 +- .../Catalog/view/frontend/product/price.phtml | 21 +- .../view/frontend/product/price_msrp.phtml | 2 +- .../frontend/product/price_msrp_item.phtml | 2 +- .../frontend/product/price_msrp_noform.phtml | 2 +- .../frontend/product/price_msrp_rss.phtml | 2 +- .../Catalog/view/frontend/product/view.phtml | 2 +- .../frontend/product/view/additional.phtml | 2 +- .../view/frontend/product/view/addto.phtml | 2 +- .../frontend/product/view/addtocart.phtml | 2 +- .../frontend/product/view/attributes.phtml | 2 +- .../frontend/product/view/description.phtml | 2 +- .../view/frontend/product/view/media.phtml | 2 +- .../view/frontend/product/view/options.phtml | 60 +- .../frontend/product/view/options/js.phtml | 2 +- .../product/view/options/type/date.phtml | 2 +- .../product/view/options/type/default.phtml | 2 +- .../product/view/options/type/file.phtml | 2 +- .../product/view/options/type/select.phtml | 2 +- .../product/view/options/type/text.phtml | 2 +- .../product/view/options/wrapper.phtml | 2 +- .../product/view/options/wrapper/bottom.phtml | 2 +- .../frontend/product/view/price_clone.phtml | 2 +- .../frontend/product/view/tierprices.phtml | 2 +- .../frontend/product/view/type/default.phtml | 2 +- .../frontend/product/view/type/grouped.phtml | 2 +- .../view/type/options/configurable.phtml | 2 +- .../product/widget/link/link_block.phtml | 2 +- .../product/widget/link/link_inline.phtml | 2 +- .../widget/new/column/new_default_list.phtml | 2 +- .../widget/new/column/new_images_list.phtml | 2 +- .../widget/new/column/new_names_list.phtml | 2 +- .../product/widget/new/content/new_grid.phtml | 2 +- .../product/widget/new/content/new_list.phtml | 2 +- .../view/frontend/rss/product/price.phtml | 2 +- .../Catalog/view/frontend/seo/sitemap.phtml | 4 +- .../view/frontend/seo/sitemap/container.phtml | 2 +- .../Mage/Catalog/view/frontend/seo/tree.phtml | 2 +- .../Mage/Catalog/view/frontend/widgets.css | 2 +- .../Adminhtml/Form/Field/Customergroup.php | 2 +- .../Block/Adminhtml/Form/Field/Minsaleqty.php | 2 +- .../CatalogInventory/Block/Qtyincrements.php | 2 +- .../Block/Stockqty/Abstract.php | 2 +- .../Block/Stockqty/Composite.php | 2 +- .../Block/Stockqty/Default.php | 2 +- .../Block/Stockqty/Type/Configurable.php | 2 +- .../Block/Stockqty/Type/Grouped.php | 2 +- .../Mage/CatalogInventory/Helper/Data.php | 2 +- .../CatalogInventory/Helper/Minsaleqty.php | 2 +- .../CatalogInventory/Model/Indexer/Stock.php | 2 +- .../Mage/CatalogInventory/Model/Observer.php | 2 +- .../Model/Resource/Indexer/Stock.php | 2 +- .../Resource/Indexer/Stock/Configurable.php | 2 +- .../Model/Resource/Indexer/Stock/Default.php | 2 +- .../Model/Resource/Indexer/Stock/Grouped.php | 2 +- .../Resource/Indexer/Stock/Interface.php | 2 +- .../CatalogInventory/Model/Resource/Stock.php | 2 +- .../Model/Resource/Stock/Item.php | 2 +- .../Model/Resource/Stock/Item/Collection.php | 2 +- .../Model/Resource/Stock/Status.php | 2 +- .../Model/Source/Backorders.php | 2 +- .../CatalogInventory/Model/Source/Stock.php | 2 +- .../Mage/CatalogInventory/Model/Stock.php | 2 +- .../CatalogInventory/Model/Stock/Item.php | 125 +- .../CatalogInventory/Model/Stock/Item/Api.php | 2 +- .../Model/Stock/Item/Api/V2.php | 2 +- .../CatalogInventory/Model/Stock/Status.php | 2 +- .../Model/System/Config/Backend/Minqty.php | 2 +- .../System/Config/Backend/Minsaleqty.php | 2 +- .../System/Config/Backend/Qtyincrements.php | 2 +- .../Mage/CatalogInventory/etc/adminhtml.xml | 2 +- .../core/Mage/CatalogInventory/etc/api.xml | 2 +- .../core/Mage/CatalogInventory/etc/config.xml | 14 +- .../core/Mage/CatalogInventory/etc/system.xml | 2 +- .../install-1.6.0.0.php | 2 +- .../mysql4-upgrade-1.6.0.0-1.6.0.0.1.php | 34 + .../CatalogInventory/view/frontend/layout.xml | 2 +- .../view/frontend/qtyincrements.phtml | 2 +- .../view/frontend/stockqty/composite.phtml | 2 +- .../view/frontend/stockqty/default.phtml | 2 +- .../core/Mage/CatalogRule/Helper/Data.php | 2 +- .../core/Mage/CatalogRule/Model/Observer.php | 36 +- .../Mage/CatalogRule/Model/Resource/Rule.php | 207 +- .../Model/Resource/Rule/Collection.php | 46 +- .../Model/Resource/Rule/Product/Price.php | 2 +- .../Rule/Product/Price/Collection.php | 2 +- app/code/core/Mage/CatalogRule/Model/Rule.php | 223 +- .../Model/Rule/Action/Collection.php | 2 +- .../CatalogRule/Model/Rule/Action/Product.php | 2 +- .../Model/Rule/Condition/Combine.php | 6 +- .../Model/Rule/Condition/Product.php | 483 +- .../CatalogRule/Model/Rule/Product/Price.php | 2 +- .../core/Mage/CatalogRule/etc/adminhtml.xml | 2 +- app/code/core/Mage/CatalogRule/etc/config.xml | 4 +- .../sql/catalogrule_setup/install-1.6.0.0.php | 2 +- .../upgrade-1.6.0.0-1.6.0.1.php | 2 +- .../upgrade-1.6.0.1-1.6.0.2.php | 163 + .../CatalogSearch/Block/Advanced/Form.php | 49 +- .../CatalogSearch/Block/Advanced/Result.php | 2 +- .../Mage/CatalogSearch/Block/Autocomplete.php | 2 +- .../core/Mage/CatalogSearch/Block/Layer.php | 2 +- .../Block/Layer/Filter/Attribute.php | 2 +- .../core/Mage/CatalogSearch/Block/Result.php | 2 +- .../core/Mage/CatalogSearch/Block/Term.php | 2 +- .../core/Mage/CatalogSearch/Helper/Data.php | 22 +- .../Mage/CatalogSearch/Model/Advanced.php | 2 +- .../Mage/CatalogSearch/Model/Fulltext.php | 32 +- .../CatalogSearch/Model/Fulltext/Observer.php | 2 +- .../CatalogSearch/Model/Indexer/Fulltext.php | 2 +- .../core/Mage/CatalogSearch/Model/Layer.php | 2 +- .../Model/Layer/Filter/Attribute.php | 2 +- .../core/Mage/CatalogSearch/Model/Query.php | 2 +- .../CatalogSearch/Model/Resource/Advanced.php | 2 +- .../Model/Resource/Advanced/Collection.php | 2 +- .../CatalogSearch/Model/Resource/Fulltext.php | 230 +- .../Model/Resource/Fulltext/Collection.php | 2 +- .../Model/Resource/Fulltext/Engine.php | 15 +- .../Model/Resource/Helper/Mysql4.php | 2 +- .../Model/Resource/Indexer/Fulltext.php | 2 +- .../CatalogSearch/Model/Resource/Query.php | 2 +- .../Model/Resource/Query/Collection.php | 2 +- .../Model/Resource/Search/Collection.php | 2 +- .../core/Mage/CatalogSearch/Model/Session.php | 2 +- .../Model/System/Config/Backend/Sitemap.php | 2 +- .../controllers/AdvancedController.php | 2 +- .../controllers/AjaxController.php | 2 +- .../controllers/ResultController.php | 4 +- .../controllers/TermController.php | 2 +- .../core/Mage/CatalogSearch/etc/adminhtml.xml | 2 +- .../core/Mage/CatalogSearch/etc/config.xml | 2 +- .../core/Mage/CatalogSearch/etc/system.xml | 2 +- .../catalogsearch_setup/install-1.6.0.0.php | 2 +- .../view/frontend/advanced/form.phtml | 13 +- .../view/frontend/advanced/result.phtml | 2 +- .../view/frontend/form.mini.phtml | 2 +- .../CatalogSearch/view/frontend/layout.xml | 2 +- .../CatalogSearch/view/frontend/result.phtml | 2 +- .../CatalogSearch/view/frontend/term.phtml | 2 +- .../Centinel/Block/Adminhtml/Validation.php | 2 +- .../Block/Adminhtml/Validation/Form.php | 2 +- .../Mage/Centinel/Block/Authentication.php | 2 +- .../Block/Authentication/Complete.php | 2 +- .../Centinel/Block/Authentication/Start.php | 2 +- app/code/core/Mage/Centinel/Block/Logo.php | 2 +- app/code/core/Mage/Centinel/Helper/Data.php | 2 +- app/code/core/Mage/Centinel/Model/Api.php | 2 +- app/code/core/Mage/Centinel/Model/Config.php | 2 +- .../core/Mage/Centinel/Model/Observer.php | 2 +- app/code/core/Mage/Centinel/Model/Service.php | 2 +- app/code/core/Mage/Centinel/Model/Session.php | 2 +- .../core/Mage/Centinel/Model/State/Jcb.php | 2 +- .../Mage/Centinel/Model/State/Mastercard.php | 2 +- .../core/Mage/Centinel/Model/State/Visa.php | 2 +- .../Mage/Centinel/Model/StateAbstract.php | 2 +- .../Adminhtml/Centinel/IndexController.php | 2 +- .../Centinel/controllers/IndexController.php | 2 +- app/code/core/Mage/Centinel/etc/config.xml | 2 +- app/code/core/Mage/Centinel/etc/system.xml | 2 +- .../adminhtml/authentication/complete.phtml | 2 +- .../view/adminhtml/authentication/start.phtml | 2 +- .../Mage/Centinel/view/adminhtml/layout.xml | 2 +- .../Centinel/view/adminhtml/order_create.js | 2 +- .../view/adminhtml/validation/form.phtml | 4 +- .../view/frontend/authentication.phtml | 2 +- .../frontend/authentication/complete.phtml | 2 +- .../view/frontend/authentication/start.phtml | 2 +- .../Mage/Centinel/view/frontend/checkout.js | 2 +- .../Mage/Centinel/view/frontend/layout.xml | 2 +- .../Mage/Centinel/view/frontend/logo.phtml | 2 +- .../core/Mage/Checkout/Block/Agreements.php | 2 +- app/code/core/Mage/Checkout/Block/Cart.php | 2 +- .../Mage/Checkout/Block/Cart/Abstract.php | 2 +- .../core/Mage/Checkout/Block/Cart/Coupon.php | 2 +- .../Mage/Checkout/Block/Cart/Crosssell.php | 2 +- .../Checkout/Block/Cart/Item/Configure.php | 2 +- .../Checkout/Block/Cart/Item/Renderer.php | 13 +- .../Block/Cart/Item/Renderer/Configurable.php | 2 +- .../Block/Cart/Item/Renderer/Grouped.php | 2 +- .../Mage/Checkout/Block/Cart/Shipping.php | 90 +- .../core/Mage/Checkout/Block/Cart/Sidebar.php | 2 +- .../core/Mage/Checkout/Block/Cart/Totals.php | 2 +- app/code/core/Mage/Checkout/Block/Links.php | 2 +- .../Checkout/Block/Multishipping/Abstract.php | 2 +- .../Block/Multishipping/Address/Select.php | 2 +- .../Block/Multishipping/Addresses.php | 2 +- .../Checkout/Block/Multishipping/Billing.php | 2 +- .../Block/Multishipping/Billing/Items.php | 2 +- .../Checkout/Block/Multishipping/Link.php | 2 +- .../Checkout/Block/Multishipping/Overview.php | 2 +- .../Block/Multishipping/Payment/Info.php | 2 +- .../Checkout/Block/Multishipping/Shipping.php | 2 +- .../Checkout/Block/Multishipping/State.php | 2 +- .../Checkout/Block/Multishipping/Success.php | 2 +- app/code/core/Mage/Checkout/Block/Onepage.php | 15 +- .../Mage/Checkout/Block/Onepage/Abstract.php | 13 +- .../Mage/Checkout/Block/Onepage/Billing.php | 2 +- .../Mage/Checkout/Block/Onepage/Failure.php | 2 +- .../core/Mage/Checkout/Block/Onepage/Link.php | 2 +- .../Mage/Checkout/Block/Onepage/Login.php | 2 +- .../Mage/Checkout/Block/Onepage/Payment.php | 2 +- .../Checkout/Block/Onepage/Payment/Info.php | 2 +- .../Block/Onepage/Payment/Methods.php | 2 +- .../Mage/Checkout/Block/Onepage/Progress.php | 26 +- .../Mage/Checkout/Block/Onepage/Review.php | 2 +- .../Checkout/Block/Onepage/Review/Info.php | 2 +- .../Mage/Checkout/Block/Onepage/Shipping.php | 2 +- .../Block/Onepage/Shipping/Method.php | 2 +- .../Onepage/Shipping/Method/Additional.php | 2 +- .../Onepage/Shipping/Method/Available.php | 2 +- .../Mage/Checkout/Block/Onepage/Success.php | 2 +- app/code/core/Mage/Checkout/Block/Success.php | 2 +- .../Mage/Checkout/Block/Total/Default.php | 2 +- .../Mage/Checkout/Block/Total/Nominal.php | 2 +- .../core/Mage/Checkout/Block/Total/Tax.php | 2 +- .../core/Mage/Checkout/Controller/Action.php | 2 +- app/code/core/Mage/Checkout/Exception.php | 2 +- app/code/core/Mage/Checkout/Helper/Cart.php | 2 +- app/code/core/Mage/Checkout/Helper/Data.php | 2 +- app/code/core/Mage/Checkout/Helper/Url.php | 2 +- .../core/Mage/Checkout/Model/Agreement.php | 2 +- .../core/Mage/Checkout/Model/Api/Resource.php | 2 +- .../Checkout/Model/Api/Resource/Customer.php | 2 +- .../Checkout/Model/Api/Resource/Product.php | 2 +- app/code/core/Mage/Checkout/Model/Cart.php | 38 +- .../core/Mage/Checkout/Model/Cart/Api.php | 2 +- .../core/Mage/Checkout/Model/Cart/Api/V2.php | 2 +- .../Mage/Checkout/Model/Cart/Coupon/Api.php | 2 +- .../Checkout/Model/Cart/Coupon/Api/V2.php | 2 +- .../Mage/Checkout/Model/Cart/Customer/Api.php | 2 +- .../Checkout/Model/Cart/Customer/Api/V2.php | 2 +- .../Mage/Checkout/Model/Cart/Interface.php | 69 + .../Mage/Checkout/Model/Cart/Payment/Api.php | 2 +- .../Checkout/Model/Cart/Payment/Api/V2.php | 2 +- .../Mage/Checkout/Model/Cart/Product/Api.php | 2 +- .../Checkout/Model/Cart/Product/Api/V2.php | 2 +- .../Mage/Checkout/Model/Cart/Shipping/Api.php | 2 +- .../Checkout/Model/Cart/Shipping/Api/V2.php | 2 +- .../Model/Config/Source/Cart/Summary.php | 2 +- .../core/Mage/Checkout/Model/Observer.php | 2 +- .../Checkout/Model/Resource/Agreement.php | 2 +- .../Model/Resource/Agreement/Collection.php | 2 +- .../Mage/Checkout/Model/Resource/Cart.php | 2 +- .../Mage/Checkout/Model/Resource/Setup.php | 2 +- app/code/core/Mage/Checkout/Model/Session.php | 20 +- .../Mage/Checkout/Model/Type/Abstract.php | 2 +- .../Checkout/Model/Type/Multishipping.php | 13 +- .../Model/Type/Multishipping/State.php | 2 +- .../core/Mage/Checkout/Model/Type/Onepage.php | 53 +- .../Checkout/controllers/CartController.php | 57 +- .../Checkout/controllers/IndexController.php | 2 +- .../Multishipping/AddressController.php | 4 +- .../controllers/MultishippingController.php | 2 +- .../controllers/OnepageController.php | 29 +- app/code/core/Mage/Checkout/etc/adminhtml.xml | 2 +- app/code/core/Mage/Checkout/etc/api.xml | 2 +- app/code/core/Mage/Checkout/etc/config.xml | 2 +- app/code/core/Mage/Checkout/etc/fieldset.xml | 2 +- app/code/core/Mage/Checkout/etc/system.xml | 2 +- .../core/Mage/Checkout/etc/translater.xml | 46 + .../sql/checkout_setup/install-1.6.0.0.php | 2 +- .../Mage/Checkout/view/frontend/cart.phtml | 5 +- .../Checkout/view/frontend/cart/coupon.phtml | 2 +- .../view/frontend/cart/crosssell.phtml | 2 +- .../cart/item/configure/updatecart.phtml | 2 +- .../view/frontend/cart/item/default.phtml | 5 +- .../Checkout/view/frontend/cart/noItems.phtml | 4 +- .../view/frontend/cart/shipping.phtml | 2 +- .../Checkout/view/frontend/cart/sidebar.phtml | 2 +- .../view/frontend/cart/sidebar/default.phtml | 2 +- .../Checkout/view/frontend/cart/totals.phtml | 2 +- .../Mage/Checkout/view/frontend/layout.xml | 2 +- .../multishipping/address/select.phtml | 2 +- .../frontend/multishipping/addresses.phtml | 2 +- .../frontend/multishipping/agreements.phtml | 2 +- .../view/frontend/multishipping/billing.phtml | 2 +- .../multishipping/billing/items.phtml | 2 +- .../frontend/multishipping/item/default.phtml | 2 +- .../view/frontend/multishipping/link.phtml | 2 +- .../frontend/multishipping/overview.phtml | 2 +- .../multishipping/overview/item.phtml | 2 +- .../view/frontend/multishipping/payment.js | 2 +- .../frontend/multishipping/shipping.phtml | 2 +- .../view/frontend/multishipping/state.phtml | 2 +- .../view/frontend/multishipping/success.phtml | 2 +- .../Mage/Checkout/view/frontend/onepage.phtml | 2 +- .../view/frontend/onepage/accordion.js | 2 +- .../view/frontend/onepage/agreements.phtml | 2 +- .../view/frontend/onepage/billing.phtml | 9 +- .../view/frontend/onepage/failure.phtml | 2 +- .../Checkout/view/frontend/onepage/link.phtml | 2 +- .../view/frontend/onepage/login.phtml | 3 +- .../view/frontend/onepage/payment.phtml | 2 +- .../frontend/onepage/payment/methods.phtml | 2 +- .../view/frontend/onepage/progress.phtml | 23 +- .../view/frontend/onepage/review.phtml | 2 +- .../view/frontend/onepage/review/button.phtml | 2 +- .../view/frontend/onepage/review/info.phtml | 2 +- .../view/frontend/onepage/review/item.phtml | 2 +- .../view/frontend/onepage/review/totals.phtml | 2 +- .../view/frontend/onepage/shipping.phtml | 8 +- .../frontend/onepage/shipping_method.phtml | 2 +- .../onepage/shipping_method/additional.phtml | 2 +- .../onepage/shipping_method/available.phtml | 2 +- .../Mage/Checkout/view/frontend/opcheckout.js | 43 +- .../Mage/Checkout/view/frontend/success.phtml | 2 +- .../view/frontend/total/default.phtml | 4 +- .../view/frontend/total/nominal.phtml | 2 +- .../Checkout/view/frontend/total/tax.phtml | 2 +- app/code/core/Mage/Cms/Block/Block.php | 2 +- app/code/core/Mage/Cms/Block/Page.php | 4 +- app/code/core/Mage/Cms/Block/Widget/Block.php | 2 +- .../core/Mage/Cms/Block/Widget/Page/Link.php | 2 +- app/code/core/Mage/Cms/Controller/Router.php | 2 +- app/code/core/Mage/Cms/Helper/Data.php | 2 +- app/code/core/Mage/Cms/Helper/Page.php | 11 +- .../core/Mage/Cms/Helper/Wysiwyg/Images.php | 2 +- app/code/core/Mage/Cms/Model/Block.php | 2 +- app/code/core/Mage/Cms/Model/Observer.php | 2 +- app/code/core/Mage/Cms/Model/Page.php | 2 +- .../core/Mage/Cms/Model/Resource/Block.php | 2 +- .../Cms/Model/Resource/Block/Collection.php | 2 +- .../core/Mage/Cms/Model/Resource/Page.php | 2 +- .../Cms/Model/Resource/Page/Collection.php | 2 +- .../Mage/Cms/Model/Resource/Page/Service.php | 2 +- .../core/Mage/Cms/Model/Template/Filter.php | 2 +- .../core/Mage/Cms/Model/Wysiwyg/Config.php | 2 +- .../Mage/Cms/Model/Wysiwyg/Images/Storage.php | 2 +- .../Wysiwyg/Images/Storage/Collection.php | 2 +- .../Mage/Cms/controllers/IndexController.php | 2 +- .../Mage/Cms/controllers/PageController.php | 2 +- .../data/cms_setup/data-install-1.6.0.0.php | 2 +- app/code/core/Mage/Cms/etc/adminhtml.xml | 2 +- app/code/core/Mage/Cms/etc/config.xml | 2 +- app/code/core/Mage/Cms/etc/system.xml | 2 +- app/code/core/Mage/Cms/etc/widget.xml | 2 +- .../Cms/sql/cms_setup/install-1.6.0.0.php | 2 +- .../core/Mage/Cms/view/frontend/content.phtml | 2 +- .../Cms/view/frontend/content_heading.phtml | 2 +- .../Mage/Cms/view/frontend/default/home.phtml | 2 +- .../Cms/view/frontend/default/no-route.phtml | 2 +- .../core/Mage/Cms/view/frontend/layout.xml | 2 +- .../core/Mage/Cms/view/frontend/meta.phtml | 2 +- .../frontend/widget/link/link_block.phtml | 2 +- .../frontend/widget/link/link_inline.phtml | 2 +- .../widget/static_block/default.phtml | 2 +- .../core/Mage/Cms/view/frontend/widgets.css | 2 +- .../Block/Adminhtml/Extension/Custom/Edit.php | 2 +- .../Adminhtml/Extension/Custom/Edit/Form.php | 2 +- .../Extension/Custom/Edit/Tab/Abstract.php | 8 +- .../Extension/Custom/Edit/Tab/Authors.php | 2 +- .../Extension/Custom/Edit/Tab/Contents.php | 2 +- .../Extension/Custom/Edit/Tab/Depends.php | 2 +- .../Extension/Custom/Edit/Tab/Grid.php | 2 +- .../Extension/Custom/Edit/Tab/Load.php | 2 +- .../Extension/Custom/Edit/Tab/Local.php | 2 +- .../Extension/Custom/Edit/Tab/Package.php | 2 +- .../Extension/Custom/Edit/Tab/Release.php | 2 +- .../Adminhtml/Extension/Custom/Edit/Tabs.php | 2 +- app/code/core/Mage/Connect/Helper/Data.php | 2 +- .../core/Mage/Connect/Model/Extension.php | 2 +- .../Connect/Model/Extension/Collection.php | 2 +- app/code/core/Mage/Connect/Model/Session.php | 2 +- .../Adminhtml/Extension/CustomController.php | 2 +- .../Adminhtml/Extension/LocalController.php | 2 +- app/code/core/Mage/Connect/etc/adminhtml.xml | 2 +- app/code/core/Mage/Connect/etc/config.xml | 2 +- .../adminhtml/extension/custom/authors.phtml | 2 +- .../adminhtml/extension/custom/contents.phtml | 2 +- .../adminhtml/extension/custom/depends.phtml | 2 +- .../adminhtml/extension/custom/load.phtml | 2 +- .../adminhtml/extension/custom/package.phtml | 2 +- .../adminhtml/extension/custom/release.phtml | 2 +- .../Mage/Connect/view/adminhtml/layout.xml | 2 +- app/code/core/Mage/Contacts/Helper/Data.php | 2 +- .../Model/System/Config/Backend/Links.php | 2 +- .../Contacts/controllers/IndexController.php | 2 +- app/code/core/Mage/Contacts/etc/adminhtml.xml | 2 +- app/code/core/Mage/Contacts/etc/config.xml | 2 +- app/code/core/Mage/Contacts/etc/system.xml | 2 +- .../sql/contacts_setup/install-1.6.0.0.php | 2 +- .../Mage/Contacts/view/frontend/form.phtml | 2 +- .../Mage/Contacts/view/frontend/layout.xml | 2 +- app/code/core/Mage/Core/Block/Abstract.php | 2 +- app/code/core/Mage/Core/Block/Flush.php | 2 +- .../core/Mage/Core/Block/Html/Calendar.php | 2 +- app/code/core/Mage/Core/Block/Html/Date.php | 2 +- app/code/core/Mage/Core/Block/Html/Link.php | 2 +- app/code/core/Mage/Core/Block/Html/Select.php | 2 +- app/code/core/Mage/Core/Block/Messages.php | 2 +- .../core/Mage/Core/Block/Store/Switcher.php | 2 +- app/code/core/Mage/Core/Block/Template.php | 2 +- .../core/Mage/Core/Block/Template/Facade.php | 2 +- .../core/Mage/Core/Block/Template/Smarty.php | 2 +- .../core/Mage/Core/Block/Template/Zend.php | 2 +- app/code/core/Mage/Core/Block/Text.php | 2 +- app/code/core/Mage/Core/Block/Text/List.php | 2 +- .../core/Mage/Core/Block/Text/List/Item.php | 2 +- .../core/Mage/Core/Block/Text/List/Link.php | 2 +- .../Mage/Core/Controller/Front/Action.php | 4 +- .../Mage/Core/Controller/Front/Router.php | 2 +- .../Mage/Core/Controller/Request/Http.php | 2 +- .../Mage/Core/Controller/Response/Http.php | 2 +- .../Mage/Core/Controller/Varien/Action.php | 8 +- .../Mage/Core/Controller/Varien/Exception.php | 2 +- .../Mage/Core/Controller/Varien/Front.php | 2 +- .../Controller/Varien/Router/Abstract.php | 2 +- .../Core/Controller/Varien/Router/Admin.php | 2 +- .../Core/Controller/Varien/Router/Default.php | 2 +- .../Controller/Varien/Router/Standard.php | 2 +- app/code/core/Mage/Core/Exception.php | 2 +- app/code/core/Mage/Core/Helper/Abstract.php | 37 +- app/code/core/Mage/Core/Helper/Data.php | 56 +- .../core/Mage/Core/Helper/File/Storage.php | 2 +- .../Core/Helper/File/Storage/Database.php | 2 +- app/code/core/Mage/Core/Helper/Hint.php | 80 + app/code/core/Mage/Core/Helper/Http.php | 2 +- app/code/core/Mage/Core/Helper/Js.php | 151 +- app/code/core/Mage/Core/Helper/String.php | 12 +- app/code/core/Mage/Core/Helper/Translate.php | 26 +- app/code/core/Mage/Core/Helper/Url.php | 2 +- .../core/Mage/Core/Helper/Url/Rewrite.php | 2 +- app/code/core/Mage/Core/Model/Abstract.php | 2 +- app/code/core/Mage/Core/Model/App.php | 10 +- app/code/core/Mage/Core/Model/App/Area.php | 2 +- .../core/Mage/Core/Model/App/Emulation.php | 2 +- app/code/core/Mage/Core/Model/Cache.php | 12 +- app/code/core/Mage/Core/Model/Calculator.php | 87 + app/code/core/Mage/Core/Model/Config.php | 6 +- app/code/core/Mage/Core/Model/Config/Base.php | 2 +- app/code/core/Mage/Core/Model/Config/Data.php | 2 +- .../core/Mage/Core/Model/Config/Element.php | 2 +- .../core/Mage/Core/Model/Config/Fieldset.php | 2 +- .../core/Mage/Core/Model/Config/Options.php | 2 +- .../core/Mage/Core/Model/Config/System.php | 2 +- app/code/core/Mage/Core/Model/Convert.php | 2 +- app/code/core/Mage/Core/Model/Cookie.php | 3 +- app/code/core/Mage/Core/Model/Date.php | 2 +- app/code/core/Mage/Core/Model/Design.php | 2 +- .../Core/Model/Design/Backend/Exceptions.php | 2 +- .../Mage/Core/Model/Design/Backend/Theme.php | 2 +- .../core/Mage/Core/Model/Design/Package.php | 42 +- .../Mage/Core/Model/Design/Source/Design.php | 2 +- app/code/core/Mage/Core/Model/Email.php | 2 +- app/code/core/Mage/Core/Model/Email/Info.php | 2 +- .../core/Mage/Core/Model/Email/Template.php | 2 +- .../Mage/Core/Model/Email/Template/Filter.php | 2 +- .../Mage/Core/Model/Email/Template/Mailer.php | 2 +- .../core/Mage/Core/Model/Email/Transport.php | 2 +- app/code/core/Mage/Core/Model/Encryption.php | 2 +- .../core/Mage/Core/Model/File/Storage.php | 2 +- .../Mage/Core/Model/File/Storage/Abstract.php | 2 +- .../Mage/Core/Model/File/Storage/Database.php | 2 +- .../Model/File/Storage/Database/Abstract.php | 2 +- .../Model/File/Storage/Directory/Database.php | 2 +- .../Mage/Core/Model/File/Storage/File.php | 2 +- .../Mage/Core/Model/File/Storage/Flag.php | 2 +- .../core/Mage/Core/Model/File/Uploader.php | 2 +- .../Model/File/Validator/AvailablePath.php | 2 +- .../File/Validator/NotProtectedExtension.php | 7 +- app/code/core/Mage/Core/Model/Flag.php | 2 +- .../Core/Model/Input/Filter/MaliciousCode.php | 2 +- app/code/core/Mage/Core/Model/Layout.php | 4 +- app/code/core/Mage/Core/Model/Layout/Data.php | 2 +- .../core/Mage/Core/Model/Layout/Element.php | 2 +- .../core/Mage/Core/Model/Layout/Update.php | 39 +- app/code/core/Mage/Core/Model/Locale.php | 14 +- .../core/Mage/Core/Model/Locale/Config.php | 2 +- app/code/core/Mage/Core/Model/Log/Adapter.php | 2 +- app/code/core/Mage/Core/Model/Message.php | 2 +- .../core/Mage/Core/Model/Message/Abstract.php | 2 +- .../Mage/Core/Model/Message/Collection.php | 2 +- .../core/Mage/Core/Model/Message/Error.php | 2 +- .../core/Mage/Core/Model/Message/Notice.php | 2 +- .../core/Mage/Core/Model/Message/Success.php | 2 +- .../core/Mage/Core/Model/Message/Warning.php | 2 +- app/code/core/Mage/Core/Model/Observer.php | 2 +- app/code/core/Mage/Core/Model/Resource.php | 2 +- .../Mage/Core/Model/Resource/Abstract.php | 2 +- .../core/Mage/Core/Model/Resource/Cache.php | 2 +- .../core/Mage/Core/Model/Resource/Config.php | 2 +- .../Mage/Core/Model/Resource/Config/Data.php | 2 +- .../Model/Resource/Config/Data/Collection.php | 2 +- .../Mage/Core/Model/Resource/Db/Abstract.php | 2 +- .../Model/Resource/Db/Collection/Abstract.php | 2 +- .../core/Mage/Core/Model/Resource/Design.php | 2 +- .../Core/Model/Resource/Design/Collection.php | 2 +- .../Core/Model/Resource/Email/Template.php | 2 +- .../Resource/Email/Template/Collection.php | 2 +- .../Core/Model/Resource/Entity/Abstract.php | 2 +- .../Mage/Core/Model/Resource/Entity/Table.php | 2 +- .../Model/Resource/File/Storage/Abstract.php | 2 +- .../Model/Resource/File/Storage/Database.php | 2 +- .../File/Storage/Directory/Database.php | 2 +- .../Core/Model/Resource/File/Storage/File.php | 2 +- .../core/Mage/Core/Model/Resource/Flag.php | 2 +- .../Core/Model/Resource/Helper/Abstract.php | 2 +- .../Core/Model/Resource/Helper/Mysql4.php | 2 +- .../Mage/Core/Model/Resource/Iterator.php | 2 +- .../core/Mage/Core/Model/Resource/Layout.php | 2 +- .../Mage/Core/Model/Resource/Resource.php | 2 +- .../core/Mage/Core/Model/Resource/Session.php | 2 +- .../core/Mage/Core/Model/Resource/Setup.php | 2 +- .../Model/Resource/Setup/Query/Modifier.php | 2 +- .../core/Mage/Core/Model/Resource/Store.php | 2 +- .../Core/Model/Resource/Store/Collection.php | 2 +- .../Mage/Core/Model/Resource/Store/Group.php | 2 +- .../Model/Resource/Store/Group/Collection.php | 2 +- .../Mage/Core/Model/Resource/Transaction.php | 2 +- .../Mage/Core/Model/Resource/Translate.php | 2 +- .../Core/Model/Resource/Translate/String.php | 2 +- .../Core/Model/Resource/Type/Abstract.php | 2 +- .../core/Mage/Core/Model/Resource/Type/Db.php | 2 +- .../Core/Model/Resource/Type/Db/Mysqli.php | 2 +- .../Model/Resource/Type/Db/Mysqli/Setup.php | 2 +- .../Core/Model/Resource/Type/Db/Pdo/Mysql.php | 2 +- .../Mage/Core/Model/Resource/Url/Rewrite.php | 5 +- .../Model/Resource/Url/Rewrite/Collection.php | 2 +- .../Mage/Core/Model/Resource/Variable.php | 13 +- .../Model/Resource/Variable/Collection.php | 2 +- .../core/Mage/Core/Model/Resource/Website.php | 2 +- .../Model/Resource/Website/Collection.php | 2 +- app/code/core/Mage/Core/Model/Session.php | 2 +- .../core/Mage/Core/Model/Session/Abstract.php | 4 +- .../Core/Model/Session/Abstract/Varien.php | 6 +- .../Mage/Core/Model/Session/Abstract/Zend.php | 2 +- .../Mage/Core/Model/Session/Exception.php | 2 +- .../core/Mage/Core/Model/ShellAbstract.php | 2 +- .../Core/Model/Source/Email/Variables.php | 29 +- app/code/core/Mage/Core/Model/Store.php | 16 +- app/code/core/Mage/Core/Model/Store/Api.php | 2 +- .../core/Mage/Core/Model/Store/Api/V2.php | 2 +- .../core/Mage/Core/Model/Store/Exception.php | 2 +- app/code/core/Mage/Core/Model/Store/Group.php | 42 +- app/code/core/Mage/Core/Model/Template.php | 4 +- app/code/core/Mage/Core/Model/Translate.php | 2 +- .../core/Mage/Core/Model/Translate/Expr.php | 2 +- .../core/Mage/Core/Model/Translate/Inline.php | 347 +- .../core/Mage/Core/Model/Translate/String.php | 2 +- app/code/core/Mage/Core/Model/Url.php | 2 +- app/code/core/Mage/Core/Model/Url/Rewrite.php | 2 +- app/code/core/Mage/Core/Model/Variable.php | 2 +- .../core/Mage/Core/Model/Variable/Config.php | 2 +- .../Mage/Core/Model/Variable/Observer.php | 2 +- app/code/core/Mage/Core/Model/Website.php | 2 +- .../Mage/Core/controllers/AjaxController.php | 2 +- .../Mage/Core/controllers/IndexController.php | 2 +- app/code/core/Mage/Core/etc/api.xml | 2 +- app/code/core/Mage/Core/etc/config.xml | 5 +- app/code/core/Mage/Core/etc/system.xml | 30 +- app/code/core/Mage/Core/etc/translater.xml | 205 + app/code/core/Mage/Core/functions.php | 2 +- .../Core/sql/core_setup/install-1.6.0.0.php | 2 +- .../core_setup/upgrade-1.6.0.1-1.6.0.2.php | 2 +- .../Mage/Core/view/frontend/formkey.phtml | 2 +- .../core/Mage/Core/view/frontend/layout.xml | 2 +- .../core/Mage/Core/view/frontend/link.phtml | 2 +- .../Mage/Core/view/frontend/messages.phtml | 2 +- app/code/core/Mage/Cron/Exception.php | 2 +- app/code/core/Mage/Cron/Helper/Data.php | 2 +- app/code/core/Mage/Cron/Model/Observer.php | 2 +- .../Mage/Cron/Model/Resource/Schedule.php | 2 +- .../Model/Resource/Schedule/Collection.php | 2 +- app/code/core/Mage/Cron/Model/Schedule.php | 2 +- app/code/core/Mage/Cron/etc/config.xml | 2 +- app/code/core/Mage/Cron/etc/system.xml | 2 +- .../Cron/sql/cron_setup/install-1.6.0.0.php | 2 +- .../Mage/Customer/Block/Account/Dashboard.php | 2 +- .../Block/Account/Dashboard/Address.php | 2 +- .../Block/Account/Dashboard/Block.php | 2 +- .../Block/Account/Dashboard/Hello.php | 2 +- .../Customer/Block/Account/Dashboard/Info.php | 2 +- .../Block/Account/Dashboard/Newsletter.php | 2 +- .../Block/Account/Dashboard/Sidebar.php | 2 +- .../Customer/Block/Account/Forgotpassword.php | 2 +- .../Customer/Block/Account/Navigation.php | 2 +- .../Customer/Block/Account/Resetpassword.php | 2 +- .../core/Mage/Customer/Block/Address/Book.php | 2 +- .../core/Mage/Customer/Block/Address/Edit.php | 2 +- .../Block/Address/Renderer/Default.php | 2 +- .../Block/Address/Renderer/Interface.php | 2 +- .../core/Mage/Customer/Block/Form/Edit.php | 2 +- .../core/Mage/Customer/Block/Form/Login.php | 2 +- .../Mage/Customer/Block/Form/Register.php | 2 +- .../core/Mage/Customer/Block/Newsletter.php | 2 +- .../Mage/Customer/Block/Widget/Abstract.php | 2 +- .../core/Mage/Customer/Block/Widget/Dob.php | 2 +- .../Mage/Customer/Block/Widget/Gender.php | 2 +- .../core/Mage/Customer/Block/Widget/Name.php | 12 +- .../Mage/Customer/Block/Widget/Taxvat.php | 2 +- app/code/core/Mage/Customer/Exception.php | 2 +- .../core/Mage/Customer/Helper/Address.php | 53 +- app/code/core/Mage/Customer/Helper/Data.php | 258 +- app/code/core/Mage/Customer/Model/Address.php | 6 +- .../Mage/Customer/Model/Address/Abstract.php | 54 +- .../core/Mage/Customer/Model/Address/Api.php | 2 +- .../Mage/Customer/Model/Address/Api/V2.php | 2 +- .../Mage/Customer/Model/Address/Config.php | 2 +- .../core/Mage/Customer/Model/Api/Resource.php | 2 +- .../core/Mage/Customer/Model/Attribute.php | 2 +- .../Model/Attribute/Backend/Data/Boolean.php | 52 + .../Mage/Customer/Model/Attribute/Data.php | 2 +- .../Model/Attribute/Data/Abstract.php | 2 +- .../Customer/Model/Attribute/Data/Boolean.php | 2 +- .../Customer/Model/Attribute/Data/Date.php | 2 +- .../Customer/Model/Attribute/Data/File.php | 2 +- .../Customer/Model/Attribute/Data/Hidden.php | 2 +- .../Customer/Model/Attribute/Data/Image.php | 2 +- .../Model/Attribute/Data/Multiline.php | 2 +- .../Model/Attribute/Data/Multiselect.php | 2 +- .../Model/Attribute/Data/Postcode.php | 2 +- .../Customer/Model/Attribute/Data/Select.php | 2 +- .../Customer/Model/Attribute/Data/Text.php | 2 +- .../Model/Attribute/Data/Textarea.php | 2 +- .../core/Mage/Customer/Model/Config/Share.php | 2 +- .../Model/Convert/Adapter/Customer.php | 2 +- .../Model/Convert/Parser/Customer.php | 2 +- .../core/Mage/Customer/Model/Customer.php | 42 +- .../core/Mage/Customer/Model/Customer/Api.php | 2 +- .../Mage/Customer/Model/Customer/Api/V2.php | 2 +- .../Customer/Attribute/Backend/Billing.php | 2 +- .../Customer/Attribute/Backend/Password.php | 2 +- .../Customer/Attribute/Backend/Shipping.php | 2 +- .../Customer/Attribute/Backend/Store.php | 2 +- .../Customer/Attribute/Backend/Website.php | 2 +- .../Model/Customer/Attribute/Source/Group.php | 2 +- .../Model/Customer/Attribute/Source/Store.php | 2 +- .../Customer/Attribute/Source/Website.php | 2 +- app/code/core/Mage/Customer/Model/Form.php | 2 +- app/code/core/Mage/Customer/Model/Group.php | 2 +- .../core/Mage/Customer/Model/Group/Api.php | 2 +- .../core/Mage/Customer/Model/Group/Api/V2.php | 2 +- .../core/Mage/Customer/Model/Observer.php | 184 +- .../Mage/Customer/Model/Resource/Address.php | 2 +- .../Address/Attribute/Backend/Region.php | 2 +- .../Address/Attribute/Backend/Street.php | 2 +- .../Resource/Address/Attribute/Collection.php | 2 +- .../Address/Attribute/Source/Country.php | 2 +- .../Address/Attribute/Source/Region.php | 2 +- .../Model/Resource/Address/Collection.php | 2 +- .../Customer/Model/Resource/Attribute.php | 2 +- .../Model/Resource/Attribute/Collection.php | 2 +- .../Mage/Customer/Model/Resource/Customer.php | 4 +- .../Model/Resource/Customer/Collection.php | 15 +- .../Model/Resource/Form/Attribute.php | 2 +- .../Resource/Form/Attribute/Collection.php | 2 +- .../Mage/Customer/Model/Resource/Group.php | 5 +- .../Model/Resource/Group/Collection.php | 2 +- .../Mage/Customer/Model/Resource/Setup.php | 2 +- app/code/core/Mage/Customer/Model/Session.php | 13 +- .../controllers/AccountController.php | 26 +- .../controllers/AddressController.php | 2 +- .../Customer/controllers/ReviewController.php | 2 +- .../data-upgrade-1.6.1.0-1.6.2.0.php | 43 + app/code/core/Mage/Customer/etc/adminhtml.xml | 2 +- app/code/core/Mage/Customer/etc/api.xml | 2 +- app/code/core/Mage/Customer/etc/config.xml | 42 +- app/code/core/Mage/Customer/etc/fieldset.xml | 75 +- app/code/core/Mage/Customer/etc/system.xml | 123 +- .../sql/customer_setup/install-1.6.0.0.php | 2 +- .../mysql4-upgrade-1.6.0.0-1.6.1.0.php | 2 +- .../upgrade-1.6.0.0-1.6.1.0.php | 2 +- .../upgrade-1.6.1.0-1.6.2.0.php | 78 + .../upgrade-1.6.2.0-1.6.2.0.1.php | 36 + .../view/frontend/account/dashboard.phtml | 2 +- .../frontend/account/dashboard/address.phtml | 2 +- .../frontend/account/dashboard/hello.phtml | 2 +- .../frontend/account/dashboard/info.phtml | 2 +- .../account/dashboard/newsletter.phtml | 2 +- .../view/frontend/account/link/back.phtml | 2 +- .../view/frontend/account/navigation.phtml | 2 +- .../Mage/Customer/view/frontend/address.phtml | 2 +- .../Customer/view/frontend/address/book.phtml | 2 +- .../Customer/view/frontend/address/edit.phtml | 8 +- .../Mage/Customer/view/frontend/balance.phtml | 2 +- .../Customer/view/frontend/form/address.phtml | 2 +- .../view/frontend/form/changepassword.phtml | 2 +- .../view/frontend/form/confirmation.phtml | 2 +- .../Customer/view/frontend/form/edit.phtml | 2 +- .../view/frontend/form/forgotpassword.phtml | 3 +- .../Customer/view/frontend/form/login.phtml | 3 +- .../view/frontend/form/mini.login.phtml | 2 +- .../view/frontend/form/newsletter.phtml | 2 +- .../view/frontend/form/register.phtml | 3 +- .../form/resetforgottenpassword.phtml | 2 +- .../Mage/Customer/view/frontend/layout.xml | 8 +- .../Mage/Customer/view/frontend/logout.phtml | 2 +- .../Customer/view/frontend/widget/dob.phtml | 2 +- .../view/frontend/widget/gender.phtml | 2 +- .../Customer/view/frontend/widget/name.phtml | 9 +- .../view/frontend/widget/taxvat.phtml | 2 +- app/code/core/Mage/Dataflow/Helper/Data.php | 2 +- app/code/core/Mage/Dataflow/Model/Batch.php | 2 +- .../Mage/Dataflow/Model/Batch/Abstract.php | 2 +- .../core/Mage/Dataflow/Model/Batch/Export.php | 2 +- .../core/Mage/Dataflow/Model/Batch/Import.php | 2 +- .../core/Mage/Dataflow/Model/Batch/Io.php | 2 +- app/code/core/Mage/Dataflow/Model/Convert.php | 2 +- .../Mage/Dataflow/Model/Convert/Action.php | 2 +- .../Model/Convert/Action/Abstract.php | 2 +- .../Model/Convert/Action/Interface.php | 2 +- .../Model/Convert/Adapter/Abstract.php | 2 +- .../Model/Convert/Adapter/Db/Table.php | 2 +- .../Dataflow/Model/Convert/Adapter/Http.php | 2 +- .../Model/Convert/Adapter/Http/Curl.php | 2 +- .../Model/Convert/Adapter/Interface.php | 2 +- .../Dataflow/Model/Convert/Adapter/Io.php | 2 +- .../Dataflow/Model/Convert/Adapter/Soap.php | 2 +- .../Dataflow/Model/Convert/Adapter/Std.php | 2 +- .../Model/Convert/Adapter/Zend/Cache.php | 2 +- .../Model/Convert/Adapter/Zend/Db.php | 2 +- .../Model/Convert/Container/Abstract.php | 2 +- .../Model/Convert/Container/Collection.php | 2 +- .../Model/Convert/Container/Generic.php | 2 +- .../Model/Convert/Container/Interface.php | 2 +- .../Mage/Dataflow/Model/Convert/Exception.php | 2 +- .../Model/Convert/Iterator/Interface.php | 2 +- .../Model/Convert/Mapper/Abstract.php | 2 +- .../Dataflow/Model/Convert/Mapper/Column.php | 2 +- .../Model/Convert/Mapper/Interface.php | 2 +- .../Model/Convert/Parser/Abstract.php | 2 +- .../Dataflow/Model/Convert/Parser/Csv.php | 2 +- .../Model/Convert/Parser/Interface.php | 2 +- .../Model/Convert/Parser/Serialize.php | 2 +- .../Model/Convert/Parser/Xml/Excel.php | 2 +- .../Mage/Dataflow/Model/Convert/Profile.php | 2 +- .../Model/Convert/Profile/Abstract.php | 2 +- .../Model/Convert/Profile/Collection.php | 2 +- .../Model/Convert/Profile/Interface.php | 2 +- .../Model/Convert/Validator/Abstract.php | 2 +- .../Model/Convert/Validator/Column.php | 2 +- .../Model/Convert/Validator/Dryrun.php | 2 +- .../Model/Convert/Validator/Interface.php | 2 +- app/code/core/Mage/Dataflow/Model/Import.php | 2 +- app/code/core/Mage/Dataflow/Model/Profile.php | 8 +- .../Mage/Dataflow/Model/Profile/History.php | 2 +- .../Mage/Dataflow/Model/Resource/Batch.php | 2 +- .../Model/Resource/Batch/Abstract.php | 2 +- .../Model/Resource/Batch/Collection.php | 2 +- .../Dataflow/Model/Resource/Batch/Export.php | 2 +- .../Dataflow/Model/Resource/Batch/Import.php | 2 +- .../Mage/Dataflow/Model/Resource/Import.php | 2 +- .../Model/Resource/Import/Collection.php | 2 +- .../Mage/Dataflow/Model/Resource/Profile.php | 2 +- .../Model/Resource/Profile/Collection.php | 2 +- .../Model/Resource/Profile/History.php | 2 +- .../Resource/Profile/History/Collection.php | 2 +- .../Mage/Dataflow/Model/Resource/Session.php | 2 +- app/code/core/Mage/Dataflow/Model/Session.php | 2 +- .../Dataflow/Model/Session/Parser/Csv.php | 2 +- .../dataflow_setup/data-install-1.6.0.0.php | 2 +- app/code/core/Mage/Dataflow/etc/config.xml | 2 +- .../sql/dataflow_setup/install-1.6.0.0.php | 2 +- .../Adminhtml/Frontend/Currency/Base.php | 2 +- .../Adminhtml/Frontend/Region/Updater.php | 2 +- .../core/Mage/Directory/Block/Currency.php | 2 +- app/code/core/Mage/Directory/Block/Data.php | 2 +- app/code/core/Mage/Directory/Exception.php | 2 +- app/code/core/Mage/Directory/Helper/Data.php | 2 +- app/code/core/Mage/Directory/Helper/Url.php | 2 +- .../core/Mage/Directory/Model/Country.php | 2 +- .../core/Mage/Directory/Model/Country/Api.php | 2 +- .../Mage/Directory/Model/Country/Api/V2.php | 2 +- .../Mage/Directory/Model/Country/Format.php | 2 +- .../core/Mage/Directory/Model/Currency.php | 2 +- .../Mage/Directory/Model/Currency/Filter.php | 2 +- .../Model/Currency/Import/Abstract.php | 2 +- .../Model/Currency/Import/Webservicex.php | 2 +- .../core/Mage/Directory/Model/Observer.php | 2 +- app/code/core/Mage/Directory/Model/Region.php | 2 +- .../core/Mage/Directory/Model/Region/Api.php | 2 +- .../Mage/Directory/Model/Region/Api/V2.php | 2 +- .../Mage/Directory/Model/Resource/Country.php | 2 +- .../Model/Resource/Country/Collection.php | 2 +- .../Model/Resource/Country/Format.php | 2 +- .../Resource/Country/Format/Collection.php | 2 +- .../Directory/Model/Resource/Currency.php | 2 +- .../Mage/Directory/Model/Resource/Region.php | 2 +- .../Model/Resource/Region/Collection.php | 5 +- .../controllers/CurrencyController.php | 2 +- .../directory_setup/data-install-1.6.0.0.php | 2 +- app/code/core/Mage/Directory/etc/api.xml | 2 +- app/code/core/Mage/Directory/etc/config.xml | 2 +- app/code/core/Mage/Directory/etc/system.xml | 2 +- .../sql/directory_setup/install-1.6.0.0.php | 2 +- .../adminhtml/js/optional_zip_countries.phtml | 2 +- .../Directory/view/frontend/currency.phtml | 2 +- .../view/frontend/currency/switch.phtml | 2 +- .../frontend/js/optional_zip_countries.phtml | 2 +- .../Mage/Directory/view/frontend/layout.xml | 2 +- .../Composite/Fieldset/Downloadable.php | 2 +- .../Catalog/Product/Edit/Tab/Downloadable.php | 2 +- .../Product/Edit/Tab/Downloadable/Links.php | 2 +- .../Product/Edit/Tab/Downloadable/Samples.php | 2 +- .../Sales/Items/Column/Downloadable/Name.php | 2 +- .../Block/Catalog/Product/Links.php | 2 +- .../Block/Catalog/Product/Samples.php | 2 +- .../Block/Catalog/Product/View/Type.php | 2 +- .../Block/Checkout/Cart/Item/Renderer.php | 2 +- .../Downloadable/Block/Checkout/Success.php | 2 +- .../Block/Customer/Products/List.php | 2 +- .../Sales/Order/Email/Items/Downloadable.php | 2 +- .../Order/Email/Items/Order/Downloadable.php | 2 +- .../Order/Item/Renderer/Downloadable.php | 2 +- .../Helper/Catalog/Product/Configuration.php | 2 +- .../core/Mage/Downloadable/Helper/Data.php | 2 +- .../Mage/Downloadable/Helper/Download.php | 2 +- .../core/Mage/Downloadable/Helper/File.php | 2 +- .../core/Mage/Downloadable/Model/Link.php | 2 +- .../core/Mage/Downloadable/Model/Link/Api.php | 2 +- .../Downloadable/Model/Link/Api/Uploader.php | 2 +- .../Mage/Downloadable/Model/Link/Api/V2.php | 2 +- .../Downloadable/Model/Link/Api/Validator.php | 2 +- .../Downloadable/Model/Link/Purchased.php | 2 +- .../Model/Link/Purchased/Item.php | 2 +- .../core/Mage/Downloadable/Model/Observer.php | 8 +- .../Mage/Downloadable/Model/Product/Price.php | 2 +- .../Mage/Downloadable/Model/Product/Type.php | 7 +- .../Model/Resource/Indexer/Price.php | 10 +- .../Mage/Downloadable/Model/Resource/Link.php | 2 +- .../Model/Resource/Link/Collection.php | 2 +- .../Model/Resource/Link/Purchased.php | 2 +- .../Resource/Link/Purchased/Collection.php | 2 +- .../Model/Resource/Link/Purchased/Item.php | 2 +- .../Link/Purchased/Item/Collection.php | 2 +- .../Downloadable/Model/Resource/Sample.php | 2 +- .../Model/Resource/Sample/Collection.php | 2 +- .../Model/Sales/Order/Pdf/Items/Abstract.php | 2 +- .../Sales/Order/Pdf/Items/Creditmemo.php | 39 +- .../Model/Sales/Order/Pdf/Items/Invoice.php | 61 +- .../core/Mage/Downloadable/Model/Sample.php | 2 +- .../Config/Source/Contentdisposition.php | 2 +- .../System/Config/Source/Orderitemstatus.php | 2 +- .../Adminhtml/Downloadable/FileController.php | 8 +- .../Downloadable/Product/EditController.php | 2 +- .../controllers/CustomerController.php | 2 +- .../controllers/DownloadController.php | 9 +- .../data-install-1.6.0.0.php | 2 +- .../core/Mage/Downloadable/etc/adminhtml.xml | 16 +- app/code/core/Mage/Downloadable/etc/api.xml | 2 +- .../core/Mage/Downloadable/etc/config.xml | 4 +- .../core/Mage/Downloadable/etc/fieldset.xml | 2 +- .../core/Mage/Downloadable/etc/system.xml | 2 +- .../downloadable_setup/install-1.6.0.0.php | 2 +- .../mysql4-upgrade-1.6.0.0.1-1.6.0.0.2.php | 38 + .../upgrade-1.6.0.0-1.6.0.0.1.php | 2 +- .../upgrade-1.6.0.0.1-1.6.0.0.2.php | 34 + .../Downloadable/view/adminhtml/layout.xml | 2 +- .../composite/fieldset/downloadable.phtml | 2 +- .../adminhtml/product/edit/downloadable.phtml | 2 +- .../product/edit/downloadable/links.phtml | 4 +- .../product/edit/downloadable/samples.phtml | 4 +- .../column/downloadable/creditmemo/name.phtml | 2 +- .../column/downloadable/invoice/name.phtml | 2 +- .../items/column/downloadable/name.phtml | 2 +- .../create/items/renderer/downloadable.phtml | 2 +- .../view/items/renderer/downloadable.phtml | 2 +- .../create/items/renderer/downloadable.phtml | 2 +- .../view/items/renderer/downloadable.phtml | 2 +- .../view/items/renderer/downloadable.phtml | 2 +- .../view/frontend/catalog/product/links.phtml | 2 +- .../frontend/catalog/product/samples.phtml | 2 +- .../view/frontend/catalog/product/type.phtml | 2 +- .../frontend/checkout/cart/item/default.phtml | 2 +- .../multishipping/item/downloadable.phtml | 2 +- .../checkout/onepage/review/item.phtml | 2 +- .../view/frontend/checkout/success.phtml | 2 +- .../frontend/customer/products/list.phtml | 2 +- .../order/items/creditmemo/downloadable.phtml | 2 +- .../order/items/invoice/downloadable.phtml | 2 +- .../order/items/order/downloadable.phtml | 2 +- .../Downloadable/view/frontend/layout.xml | 2 +- .../items/renderer/downloadable.phtml | 2 +- .../invoice/items/renderer/downloadable.phtml | 2 +- .../order/items/renderer/downloadable.phtml | 2 +- .../Eav/Block/Adminhtml/Attribute/Edit/Js.php | 2 +- .../Attribute/Edit/Main/Abstract.php | 7 +- .../Attribute/Edit/Options/Abstract.php | 2 +- .../Adminhtml/Attribute/Grid/Abstract.php | 2 +- app/code/core/Mage/Eav/Exception.php | 2 +- app/code/core/Mage/Eav/Helper/Data.php | 2 +- .../System/Config/Source/Inputtype.php | 2 +- .../Config/Source/Inputtype/Validator.php | 2 +- app/code/core/Mage/Eav/Model/Attribute.php | 2 +- .../core/Mage/Eav/Model/Attribute/Data.php | 2 +- .../Eav/Model/Attribute/Data/Abstract.php | 2 +- .../Mage/Eav/Model/Attribute/Data/Boolean.php | 2 +- .../Mage/Eav/Model/Attribute/Data/Date.php | 18 +- .../Mage/Eav/Model/Attribute/Data/File.php | 2 +- .../Mage/Eav/Model/Attribute/Data/Hidden.php | 2 +- .../Mage/Eav/Model/Attribute/Data/Image.php | 2 +- .../Eav/Model/Attribute/Data/Multiline.php | 2 +- .../Eav/Model/Attribute/Data/Multiselect.php | 2 +- .../Mage/Eav/Model/Attribute/Data/Select.php | 2 +- .../Mage/Eav/Model/Attribute/Data/Text.php | 2 +- .../Eav/Model/Attribute/Data/Textarea.php | 2 +- app/code/core/Mage/Eav/Model/Config.php | 2 +- .../Mage/Eav/Model/Convert/Adapter/Entity.php | 2 +- .../Mage/Eav/Model/Convert/Adapter/Grid.php | 2 +- .../Eav/Model/Convert/Parser/Abstract.php | 2 +- app/code/core/Mage/Eav/Model/Entity.php | 2 +- .../core/Mage/Eav/Model/Entity/Abstract.php | 8 +- .../core/Mage/Eav/Model/Entity/Attribute.php | 2 +- .../Eav/Model/Entity/Attribute/Abstract.php | 2 +- .../Entity/Attribute/Backend/Abstract.php | 48 +- .../Model/Entity/Attribute/Backend/Array.php | 2 +- .../Entity/Attribute/Backend/Datetime.php | 2 +- .../Entity/Attribute/Backend/Default.php | 2 +- .../Entity/Attribute/Backend/Increment.php | 2 +- .../Entity/Attribute/Backend/Interface.php | 17 +- .../Entity/Attribute/Backend/Serialized.php | 2 +- .../Model/Entity/Attribute/Backend/Store.php | 2 +- .../Entity/Attribute/Backend/Time/Created.php | 2 +- .../Entity/Attribute/Backend/Time/Updated.php | 2 +- .../Eav/Model/Entity/Attribute/Exception.php | 2 +- .../Entity/Attribute/Frontend/Abstract.php | 2 +- .../Entity/Attribute/Frontend/Datetime.php | 2 +- .../Entity/Attribute/Frontend/Default.php | 2 +- .../Entity/Attribute/Frontend/Interface.php | 2 +- .../Mage/Eav/Model/Entity/Attribute/Group.php | 2 +- .../Eav/Model/Entity/Attribute/Interface.php | 2 +- .../Eav/Model/Entity/Attribute/Option.php | 2 +- .../Mage/Eav/Model/Entity/Attribute/Set.php | 8 +- .../Entity/Attribute/Source/Abstract.php | 6 +- .../Model/Entity/Attribute/Source/Boolean.php | 2 +- .../Model/Entity/Attribute/Source/Config.php | 2 +- .../Entity/Attribute/Source/Interface.php | 2 +- .../Model/Entity/Attribute/Source/Store.php | 2 +- .../Model/Entity/Attribute/Source/Table.php | 2 +- .../core/Mage/Eav/Model/Entity/Collection.php | 2 +- .../Eav/Model/Entity/Collection/Abstract.php | 2 +- .../Eav/Model/Entity/Increment/Abstract.php | 2 +- .../Eav/Model/Entity/Increment/Alphanum.php | 2 +- .../Eav/Model/Entity/Increment/Interface.php | 2 +- .../Eav/Model/Entity/Increment/Numeric.php | 2 +- .../core/Mage/Eav/Model/Entity/Interface.php | 2 +- app/code/core/Mage/Eav/Model/Entity/Setup.php | 20 +- app/code/core/Mage/Eav/Model/Entity/Store.php | 2 +- app/code/core/Mage/Eav/Model/Entity/Type.php | 2 +- app/code/core/Mage/Eav/Model/Form.php | 2 +- app/code/core/Mage/Eav/Model/Form/Element.php | 2 +- .../core/Mage/Eav/Model/Form/Fieldset.php | 2 +- app/code/core/Mage/Eav/Model/Form/Type.php | 2 +- .../Mage/Eav/Model/Resource/Attribute.php | 2 +- .../Model/Resource/Attribute/Collection.php | 8 +- .../core/Mage/Eav/Model/Resource/Config.php | 2 +- .../Eav/Model/Resource/Entity/Attribute.php | 2 +- .../Resource/Entity/Attribute/Collection.php | 2 +- .../Model/Resource/Entity/Attribute/Group.php | 2 +- .../Entity/Attribute/Group/Collection.php | 2 +- .../Resource/Entity/Attribute/Option.php | 2 +- .../Entity/Attribute/Option/Collection.php | 2 +- .../Model/Resource/Entity/Attribute/Set.php | 2 +- .../Entity/Attribute/Set/Collection.php | 2 +- .../Mage/Eav/Model/Resource/Entity/Store.php | 2 +- .../Mage/Eav/Model/Resource/Entity/Type.php | 2 +- .../Model/Resource/Entity/Type/Collection.php | 2 +- .../Eav/Model/Resource/Form/Attribute.php | 2 +- .../Resource/Form/Attribute/Collection.php | 2 +- .../Mage/Eav/Model/Resource/Form/Element.php | 2 +- .../Resource/Form/Element/Collection.php | 2 +- .../Mage/Eav/Model/Resource/Form/Fieldset.php | 2 +- .../Resource/Form/Fieldset/Collection.php | 2 +- .../Mage/Eav/Model/Resource/Form/Type.php | 2 +- .../Model/Resource/Form/Type/Collection.php | 2 +- .../Mage/Eav/Model/Resource/Helper/Mysql4.php | 2 +- app/code/core/Mage/Eav/etc/config.xml | 2 +- .../Eav/sql/eav_setup/install-1.6.0.0.php | 2 +- .../view/adminhtml/attribute/edit/js.phtml | 2 +- .../Adminhtml/Product/Helper/Form/Config.php | 2 +- .../Adminhtml/Sales/Order/Create/Form.php | 2 +- .../Sales/Order/Create/Giftoptions.php | 2 +- .../Adminhtml/Sales/Order/Create/Items.php | 2 +- .../Block/Adminhtml/Sales/Order/View/Form.php | 2 +- .../Sales/Order/View/Giftoptions.php | 2 +- .../Adminhtml/Sales/Order/View/Items.php | 2 +- .../Mage/GiftMessage/Block/Message/Inline.php | 2 +- .../core/Mage/GiftMessage/Helper/Data.php | 2 +- .../core/Mage/GiftMessage/Helper/Message.php | 2 +- app/code/core/Mage/GiftMessage/Helper/Url.php | 2 +- app/code/core/Mage/GiftMessage/Model/Api.php | 2 +- .../core/Mage/GiftMessage/Model/Api/V2.php | 2 +- .../core/Mage/GiftMessage/Model/Message.php | 2 +- .../core/Mage/GiftMessage/Model/Observer.php | 2 +- .../GiftMessage/Model/Resource/Message.php | 2 +- .../Model/Resource/Message/Collection.php | 2 +- .../Mage/GiftMessage/Model/Resource/Setup.php | 2 +- app/code/core/Mage/GiftMessage/etc/api.xml | 2 +- app/code/core/Mage/GiftMessage/etc/config.xml | 2 +- app/code/core/Mage/GiftMessage/etc/system.xml | 2 +- .../sql/giftmessage_setup/install-1.6.0.0.php | 2 +- .../GiftMessage/view/adminhtml/form.phtml | 2 +- .../view/adminhtml/giftoptionsform.phtml | 2 +- .../GiftMessage/view/adminhtml/helper.phtml | 2 +- .../GiftMessage/view/adminhtml/layout.xml | 2 +- .../GiftMessage/view/adminhtml/popup.phtml | 6 +- .../sales/order/create/giftoptions.phtml | 2 +- .../adminhtml/sales/order/create/items.phtml | 2 +- .../sales/order/view/giftoptions.phtml | 2 +- .../adminhtml/sales/order/view/items.phtml | 2 +- .../GiftMessage/view/frontend/inline.phtml | 2 +- .../core/Mage/GoogleAnalytics/Block/Ga.php | 2 +- .../core/Mage/GoogleAnalytics/Helper/Data.php | 2 +- .../Mage/GoogleAnalytics/Model/Observer.php | 2 +- .../Mage/GoogleAnalytics/etc/adminhtml.xml | 2 +- .../core/Mage/GoogleAnalytics/etc/config.xml | 2 +- .../core/Mage/GoogleAnalytics/etc/system.xml | 2 +- .../GoogleAnalytics/view/frontend/ga.phtml | 2 +- .../GoogleAnalytics/view/frontend/layout.xml | 2 +- .../Shipping/Applicable/Countries.php | 2 +- .../Block/Adminhtml/Shipping/Merchant.php | 2 +- .../core/Mage/GoogleCheckout/Block/Form.php | 2 +- .../core/Mage/GoogleCheckout/Block/Link.php | 2 +- .../Mage/GoogleCheckout/Block/Redirect.php | 2 +- .../core/Mage/GoogleCheckout/Exception.php | 2 +- .../core/Mage/GoogleCheckout/Helper/Data.php | 2 +- .../core/Mage/GoogleCheckout/Model/Api.php | 2 +- .../Mage/GoogleCheckout/Model/Api/Debug.php | 2 +- .../GoogleCheckout/Model/Api/Xml/Abstract.php | 2 +- .../Model/Api/Xml/Calculate.php | 2 +- .../GoogleCheckout/Model/Api/Xml/Callback.php | 7 +- .../GoogleCheckout/Model/Api/Xml/Checkout.php | 7 +- .../GoogleCheckout/Model/Api/Xml/Order.php | 2 +- .../GoogleCheckout/Model/Notification.php | 2 +- .../Mage/GoogleCheckout/Model/Observer.php | 16 +- .../Mage/GoogleCheckout/Model/Payment.php | 38 +- .../Model/Resource/Api/Debug.php | 2 +- .../Model/Resource/Api/Debug/Collection.php | 2 +- .../Model/Resource/Notification.php | 2 +- .../GoogleCheckout/Model/Resource/Setup.php | 2 +- .../Mage/GoogleCheckout/Model/Shipping.php | 2 +- .../Model/Source/Checkout/Image.php | 2 +- .../GoogleCheckout/Model/Source/Locale.php | 2 +- .../Model/Source/Shipping/Carrier.php | 45 +- .../Model/Source/Shipping/Category.php | 7 +- .../Model/Source/Shipping/Units.php | 5 +- .../Model/Source/Shipping/Virtual/Method.php | 9 +- .../Source/Shipping/Virtual/Schedule.php | 7 +- .../controllers/ApiController.php | 2 +- .../controllers/RedirectController.php | 2 +- .../Mage/GoogleCheckout/etc/adminhtml.xml | 2 +- .../core/Mage/GoogleCheckout/etc/config.xml | 2 +- .../core/Mage/GoogleCheckout/etc/system.xml | 2 +- .../googlecheckout_setup/install-1.6.0.0.php | 2 +- .../upgrade-1.6.0.0-1.6.0.1.php | 2 +- .../GoogleCheckout/view/frontend/form.phtml | 2 +- .../GoogleCheckout/view/frontend/layout.xml | 2 +- .../GoogleCheckout/view/frontend/link.phtml | 2 +- .../Category/Edit/Tab/Googleoptimizer.php | 2 +- .../Catalog/Form/Renderer/Import.php | 2 +- .../Product/Edit/Tab/Googleoptimizer.php | 2 +- .../Block/Adminhtml/Cms/Page/Edit/Enable.php | 2 +- .../Cms/Page/Edit/Renderer/Conversion.php | 2 +- .../Cms/Page/Edit/Tab/Googleoptimizer.php | 2 +- .../core/Mage/GoogleOptimizer/Block/Code.php | 2 +- .../GoogleOptimizer/Block/Code/Category.php | 2 +- .../GoogleOptimizer/Block/Code/Conversion.php | 2 +- .../Mage/GoogleOptimizer/Block/Code/Page.php | 2 +- .../GoogleOptimizer/Block/Code/Product.php | 2 +- .../core/Mage/GoogleOptimizer/Block/Js.php | 2 +- .../core/Mage/GoogleOptimizer/Helper/Data.php | 2 +- .../Googleoptimizer/Conversionpages.php | 2 +- .../core/Mage/GoogleOptimizer/Model/Code.php | 2 +- .../GoogleOptimizer/Model/Code/Category.php | 2 +- .../Mage/GoogleOptimizer/Model/Code/Page.php | 2 +- .../GoogleOptimizer/Model/Code/Product.php | 2 +- .../Mage/GoogleOptimizer/Model/Observer.php | 2 +- .../GoogleOptimizer/Model/Resource/Code.php | 2 +- .../Model/Resource/Code/Collection.php | 2 +- .../Googleoptimizer/IndexController.php | 2 +- .../core/Mage/GoogleOptimizer/etc/config.xml | 2 +- .../core/Mage/GoogleOptimizer/etc/system.xml | 2 +- .../googleoptimizer_setup/install-1.6.0.0.php | 2 +- .../catalog/form/renderer/import.phtml | 2 +- .../cms/edit/renderer/conversion.phtml | 2 +- .../GoogleOptimizer/view/adminhtml/js.phtml | 2 +- .../GoogleOptimizer/view/adminhtml/layout.xml | 2 +- .../GoogleOptimizer/view/frontend/layout.xml | 2 +- .../Block/Adminhtml/Captcha.php | 2 +- .../GoogleShopping/Block/Adminhtml/Items.php | 2 +- .../Block/Adminhtml/Items/Item.php | 2 +- .../Block/Adminhtml/Items/Product.php | 2 +- .../Block/Adminhtml/Items/Renderer/Id.php | 2 +- .../Block/Adminhtml/Store/Switcher.php | 2 +- .../GoogleShopping/Block/Adminhtml/Types.php | 2 +- .../Block/Adminhtml/Types/Edit.php | 2 +- .../Block/Adminhtml/Types/Edit/Attributes.php | 2 +- .../Block/Adminhtml/Types/Edit/Form.php | 2 +- .../Block/Adminhtml/Types/Edit/Select.php | 2 +- .../Block/Adminhtml/Types/Grid.php | 2 +- .../Adminhtml/Types/Renderer/Country.php | 2 +- .../Mage/GoogleShopping/Helper/Category.php | 4 +- .../core/Mage/GoogleShopping/Helper/Data.php | 2 +- .../core/Mage/GoogleShopping/Helper/Price.php | 4 +- .../Mage/GoogleShopping/Helper/Product.php | 2 +- .../Mage/GoogleShopping/Model/Attribute.php | 2 +- .../Model/Attribute/Availability.php | 2 +- .../Model/Attribute/Condition.php | 2 +- .../Model/Attribute/Content.php | 2 +- .../Model/Attribute/ContentLanguage.php | 2 +- .../Model/Attribute/Default.php | 9 +- .../Model/Attribute/Destinations.php | 2 +- .../Model/Attribute/GoogleProductCategory.php | 2 +- .../GoogleShopping/Model/Attribute/Id.php | 2 +- .../Model/Attribute/ImageLink.php | 2 +- .../GoogleShopping/Model/Attribute/Link.php | 2 +- .../GoogleShopping/Model/Attribute/Price.php | 10 +- .../Model/Attribute/ProductType.php | 2 +- .../Model/Attribute/Quantity.php | 2 +- .../Attribute/SalePriceEffectiveDate.php | 2 +- .../Model/Attribute/ShippingWeight.php | 2 +- .../Model/Attribute/TargetCountry.php | 2 +- .../GoogleShopping/Model/Attribute/Tax.php | 2 +- .../GoogleShopping/Model/Attribute/Title.php | 2 +- .../core/Mage/GoogleShopping/Model/Config.php | 2 +- .../core/Mage/GoogleShopping/Model/Item.php | 2 +- .../GoogleShopping/Model/MassOperations.php | 7 +- .../Mage/GoogleShopping/Model/Observer.php | 2 +- .../Model/Resource/Attribute.php | 2 +- .../Model/Resource/Attribute/Collection.php | 2 +- .../GoogleShopping/Model/Resource/Item.php | 2 +- .../Model/Resource/Item/Collection.php | 2 +- .../GoogleShopping/Model/Resource/Type.php | 2 +- .../Model/Resource/Type/Collection.php | 14 +- .../Mage/GoogleShopping/Model/Service.php | 2 +- .../GoogleShopping/Model/Service/Item.php | 2 +- .../Model/Source/Accounttype.php | 2 +- .../GoogleShopping/Model/Source/Authtype.php | 2 +- .../GoogleShopping/Model/Source/Country.php | 2 +- .../Model/Source/Destinationstates.php | 2 +- .../GoogleShopping/Model/Source/Statuses.php | 2 +- .../core/Mage/GoogleShopping/Model/Type.php | 2 +- .../Googleshopping/ItemsController.php | 4 +- .../Googleshopping/SelectionController.php | 2 +- .../Googleshopping/TypesController.php | 2 +- .../data-install-1.6.0.0.php | 2 +- .../Mage/GoogleShopping/etc/adminhtml.xml | 2 +- .../core/Mage/GoogleShopping/etc/config.xml | 2 +- .../core/Mage/GoogleShopping/etc/system.xml | 2 +- .../googleshopping_setup/install-1.6.0.0.php | 2 +- .../upgrade-1.6.0.0-1.6.0.0.1.php | 2 +- .../view/adminhtml/captcha.phtml | 2 +- .../GoogleShopping/view/adminhtml/items.phtml | 2 +- .../view/adminhtml/types/edit.phtml | 2 +- .../adminhtml/types/edit/attributes.phtml | 2 +- .../view/adminhtml/types/edit/select.phtml | 2 +- .../Block/Adminhtml/Export/Edit.php | 2 +- .../Block/Adminhtml/Export/Edit/Form.php | 2 +- .../Block/Adminhtml/Export/Filter.php | 19 +- .../Block/Adminhtml/Import/Edit.php | 2 +- .../Block/Adminhtml/Import/Edit/Form.php | 2 +- .../Block/Adminhtml/Import/Frame/Result.php | 4 +- .../core/Mage/ImportExport/Helper/Data.php | 2 +- .../core/Mage/ImportExport/Model/Abstract.php | 2 +- .../core/Mage/ImportExport/Model/Config.php | 2 +- .../core/Mage/ImportExport/Model/Export.php | 2 +- .../Model/Export/Adapter/Abstract.php | 2 +- .../ImportExport/Model/Export/Adapter/Csv.php | 2 +- .../Model/Export/Entity/Abstract.php | 2 +- .../Model/Export/Entity/Customer.php | 2 +- .../Model/Export/Entity/Product.php | 49 +- .../Export/Entity/Product/Type/Abstract.php | 2 +- .../Entity/Product/Type/Configurable.php | 2 +- .../Export/Entity/Product/Type/Grouped.php | 2 +- .../Export/Entity/Product/Type/Simple.php | 11 +- .../core/Mage/ImportExport/Model/Import.php | 2 +- .../ImportExport/Model/Import/Adapter.php | 2 +- .../Model/Import/Adapter/Abstract.php | 2 +- .../ImportExport/Model/Import/Adapter/Csv.php | 2 +- .../Model/Import/Entity/Abstract.php | 6 +- .../Model/Import/Entity/Customer.php | 2 +- .../Model/Import/Entity/Customer/Address.php | 2 +- .../Model/Import/Entity/Product.php | 121 +- .../Import/Entity/Product/Type/Abstract.php | 2 +- .../Entity/Product/Type/Configurable.php | 2 +- .../Import/Entity/Product/Type/Grouped.php | 2 +- .../Import/Entity/Product/Type/Simple.php | 2 +- .../Model/Import/Proxy/Product.php | 2 +- .../Model/Import/Proxy/Product/Resource.php | 2 +- .../ImportExport/Model/Import/Uploader.php | 2 +- .../Model/Resource/Helper/Mysql4.php | 2 +- .../Model/Resource/Import/Data.php | 2 +- .../ImportExport/Model/Resource/Setup.php | 2 +- .../Model/Source/Export/Entity.php | 2 +- .../Model/Source/Export/Format.php | 2 +- .../Model/Source/Import/Behavior.php | 2 +- .../Model/Source/Import/Entity.php | 2 +- .../Adminhtml/ExportController.php | 2 +- .../Adminhtml/ImportController.php | 2 +- .../core/Mage/ImportExport/etc/adminhtml.xml | 2 +- .../core/Mage/ImportExport/etc/config.xml | 2 +- .../importexport_setup/install-1.6.0.0.php | 2 +- .../mysql4-upgrade-1.6.0.1-1.6.0.2.php | 2 +- .../ImportExport/view/adminhtml/busy.phtml | 2 +- .../view/adminhtml/export/form/after.phtml | 4 +- .../view/adminhtml/export/form/before.phtml | 8 +- .../view/adminhtml/import/form/after.phtml | 2 +- .../view/adminhtml/import/form/before.phtml | 2 +- .../view/adminhtml/import/frame/result.phtml | 2 +- .../ImportExport/view/adminhtml/layout.xml | 2 +- .../Index/Block/Adminhtml/Notifications.php | 2 +- .../Mage/Index/Block/Adminhtml/Process.php | 2 +- .../Index/Block/Adminhtml/Process/Edit.php | 2 +- .../Block/Adminhtml/Process/Edit/Form.php | 2 +- .../Block/Adminhtml/Process/Edit/Tab/Main.php | 2 +- .../Block/Adminhtml/Process/Edit/Tabs.php | 2 +- .../Index/Block/Adminhtml/Process/Grid.php | 2 +- .../Adminhtml/Process/Grid/Massaction.php | 2 +- app/code/core/Mage/Index/Helper/Data.php | 2 +- app/code/core/Mage/Index/Model/Event.php | 103 +- app/code/core/Mage/Index/Model/Indexer.php | 25 +- .../Mage/Index/Model/Indexer/Abstract.php | 2 +- app/code/core/Mage/Index/Model/Observer.php | 2 +- app/code/core/Mage/Index/Model/Process.php | 20 +- .../Mage/Index/Model/Resource/Abstract.php | 2 +- .../core/Mage/Index/Model/Resource/Event.php | 5 +- .../Index/Model/Resource/Event/Collection.php | 2 +- .../Mage/Index/Model/Resource/Process.php | 12 +- .../Model/Resource/Process/Collection.php | 2 +- .../core/Mage/Index/Model/Resource/Setup.php | 2 +- app/code/core/Mage/Index/Model/Shell.php | 2 +- .../Adminhtml/ProcessController.php | 2 +- app/code/core/Mage/Index/etc/adminhtml.xml | 2 +- app/code/core/Mage/Index/etc/config.xml | 2 +- .../Index/sql/index_setup/install-1.6.0.0.php | 2 +- .../core/Mage/Index/view/adminhtml/layout.xml | 2 +- .../Index/view/adminhtml/notifications.phtml | 2 +- app/code/core/Mage/Install/Block/Abstract.php | 2 +- app/code/core/Mage/Install/Block/Admin.php | 2 +- app/code/core/Mage/Install/Block/Begin.php | 2 +- app/code/core/Mage/Install/Block/Config.php | 2 +- app/code/core/Mage/Install/Block/Db/Main.php | 2 +- app/code/core/Mage/Install/Block/Db/Type.php | 2 +- .../Mage/Install/Block/Db/Type/Mysql4.php | 2 +- app/code/core/Mage/Install/Block/Download.php | 2 +- app/code/core/Mage/Install/Block/End.php | 2 +- app/code/core/Mage/Install/Block/Locale.php | 2 +- app/code/core/Mage/Install/Block/State.php | 2 +- .../core/Mage/Install/Controller/Action.php | 2 +- app/code/core/Mage/Install/Helper/Data.php | 2 +- app/code/core/Mage/Install/Model/Config.php | 2 +- .../core/Mage/Install/Model/Installer.php | 2 +- .../Mage/Install/Model/Installer/Abstract.php | 2 +- .../Mage/Install/Model/Installer/Config.php | 2 +- .../Mage/Install/Model/Installer/Console.php | 2 +- .../Mage/Install/Model/Installer/Data.php | 2 +- .../core/Mage/Install/Model/Installer/Db.php | 24 +- .../Install/Model/Installer/Db/Abstract.php | 2 +- .../Install/Model/Installer/Db/Mysql4.php | 2 +- .../core/Mage/Install/Model/Installer/Env.php | 2 +- .../Install/Model/Installer/Filesystem.php | 2 +- .../Mage/Install/Model/Installer/Pear.php | 2 +- app/code/core/Mage/Install/Model/Observer.php | 2 +- app/code/core/Mage/Install/Model/Session.php | 2 +- app/code/core/Mage/Install/Model/Wizard.php | 2 +- .../Install/controllers/IndexController.php | 2 +- .../Install/controllers/WizardController.php | 2 +- app/code/core/Mage/Install/etc/config.xml | 2 +- app/code/core/Mage/Install/etc/install.xml | 2 +- .../Mage/Install/view/install/begin.phtml | 2 +- .../Mage/Install/view/install/config.phtml | 5 +- .../Install/view/install/create_admin.phtml | 2 +- .../Mage/Install/view/install/db/main.phtml | 2 +- .../Mage/Install/view/install/db/mysql4.phtml | 2 +- .../Mage/Install/view/install/download.phtml | 2 +- .../core/Mage/Install/view/install/end.phtml | 2 +- .../core/Mage/Install/view/install/layout.xml | 2 +- .../Mage/Install/view/install/locale.phtml | 2 +- .../core/Mage/Install/view/install/page.phtml | 2 +- .../Mage/Install/view/install/state.phtml | 2 +- app/code/core/Mage/Log/Helper/Data.php | 2 +- app/code/core/Mage/Log/Model/Aggregation.php | 2 +- app/code/core/Mage/Log/Model/Cron.php | 2 +- app/code/core/Mage/Log/Model/Customer.php | 2 +- app/code/core/Mage/Log/Model/Log.php | 2 +- .../Mage/Log/Model/Resource/Aggregation.php | 2 +- .../core/Mage/Log/Model/Resource/Customer.php | 2 +- .../Mage/Log/Model/Resource/Helper/Mysql4.php | 2 +- app/code/core/Mage/Log/Model/Resource/Log.php | 2 +- .../core/Mage/Log/Model/Resource/Shell.php | 2 +- .../core/Mage/Log/Model/Resource/Visitor.php | 22 +- .../Log/Model/Resource/Visitor/Collection.php | 2 +- .../Log/Model/Resource/Visitor/Online.php | 2 +- .../Resource/Visitor/Online/Collection.php | 2 +- app/code/core/Mage/Log/Model/Shell.php | 2 +- app/code/core/Mage/Log/Model/Visitor.php | 2 +- .../core/Mage/Log/Model/Visitor/Online.php | 2 +- .../data/log_setup/data-install-1.6.0.0.php | 2 +- app/code/core/Mage/Log/etc/config.xml | 2 +- app/code/core/Mage/Log/etc/system.xml | 2 +- .../Log/sql/log_setup/install-1.6.0.0.php | 2 +- app/code/core/Mage/Media/Helper/Data.php | 2 +- app/code/core/Mage/Media/Model/File/Image.php | 2 +- app/code/core/Mage/Media/Model/Image.php | 2 +- .../Media/Model/Image/Config/Interface.php | 2 +- app/code/core/Mage/Media/etc/config.xml | 2 +- .../core/Mage/Newsletter/Block/Subscribe.php | 2 +- app/code/core/Mage/Newsletter/Helper/Data.php | 2 +- .../core/Mage/Newsletter/Model/Message.php | 2 +- .../core/Mage/Newsletter/Model/Observer.php | 2 +- .../core/Mage/Newsletter/Model/Problem.php | 2 +- app/code/core/Mage/Newsletter/Model/Queue.php | 2 +- .../Newsletter/Model/Resource/Problem.php | 2 +- .../Model/Resource/Problem/Collection.php | 5 +- .../Mage/Newsletter/Model/Resource/Queue.php | 2 +- .../Model/Resource/Queue/Collection.php | 2 +- .../Newsletter/Model/Resource/Subscriber.php | 2 +- .../Model/Resource/Subscriber/Collection.php | 2 +- .../Newsletter/Model/Resource/Template.php | 2 +- .../Model/Resource/Template/Collection.php | 2 +- .../core/Mage/Newsletter/Model/Session.php | 2 +- .../core/Mage/Newsletter/Model/Subscriber.php | 2 +- .../core/Mage/Newsletter/Model/Template.php | 2 +- .../Mage/Newsletter/Model/Template/Filter.php | 2 +- .../controllers/ManageController.php | 2 +- .../controllers/SubscriberController.php | 2 +- .../data-upgrade-1.6.0.0-1.6.0.1.php | 2 +- .../core/Mage/Newsletter/etc/adminhtml.xml | 2 +- app/code/core/Mage/Newsletter/etc/config.xml | 2 +- app/code/core/Mage/Newsletter/etc/system.xml | 2 +- .../sql/newsletter_setup/install-1.6.0.0.php | 2 +- .../Mage/Newsletter/view/frontend/layout.xml | 2 +- .../Newsletter/view/frontend/subscribe.phtml | 7 +- app/code/core/Mage/Ogone/Block/Form.php | 2 +- app/code/core/Mage/Ogone/Block/Info.php | 2 +- app/code/core/Mage/Ogone/Block/Paypage.php | 2 +- app/code/core/Mage/Ogone/Block/Placeform.php | 2 +- app/code/core/Mage/Ogone/Helper/Data.php | 2 +- app/code/core/Mage/Ogone/Model/Api.php | 2 +- app/code/core/Mage/Ogone/Model/Config.php | 2 +- .../Mage/Ogone/Model/Source/PaymentAction.php | 2 +- .../core/Mage/Ogone/Model/Source/Pmlist.php | 2 +- .../core/Mage/Ogone/Model/Source/Template.php | 2 +- .../Mage/Ogone/controllers/ApiController.php | 2 +- app/code/core/Mage/Ogone/etc/config.xml | 2 +- app/code/core/Mage/Ogone/etc/system.xml | 2 +- .../Ogone/sql/ogone_setup/install-1.6.0.0.php | 2 +- .../core/Mage/Ogone/view/adminhtml/info.phtml | 2 +- .../core/Mage/Ogone/view/frontend/form.phtml | 2 +- .../core/Mage/Ogone/view/frontend/info.phtml | 2 +- .../core/Mage/Ogone/view/frontend/layout.xml | 2 +- .../Mage/Ogone/view/frontend/paypage.phtml | 2 +- .../Mage/Ogone/view/frontend/placeform.phtml | 2 +- app/code/core/Mage/Page/Block/Html.php | 2 +- .../core/Mage/Page/Block/Html/Breadcrumbs.php | 2 +- app/code/core/Mage/Page/Block/Html/Footer.php | 2 +- app/code/core/Mage/Page/Block/Html/Head.php | 5 +- app/code/core/Mage/Page/Block/Html/Header.php | 2 +- .../core/Mage/Page/Block/Html/Notices.php | 2 +- app/code/core/Mage/Page/Block/Html/Pager.php | 2 +- .../core/Mage/Page/Block/Html/Welcome.php | 2 +- .../core/Mage/Page/Block/Html/Wrapper.php | 2 +- app/code/core/Mage/Page/Block/Js/Cookie.php | 2 +- .../core/Mage/Page/Block/Js/Translate.php | 7 +- app/code/core/Mage/Page/Block/Redirect.php | 2 +- app/code/core/Mage/Page/Block/Switch.php | 21 +- .../Mage/Page/Block/Template/Container.php | 2 +- .../core/Mage/Page/Block/Template/Links.php | 2 +- .../Mage/Page/Block/Template/Links/Block.php | 2 +- app/code/core/Mage/Page/Helper/Data.php | 2 +- app/code/core/Mage/Page/Helper/Html.php | 2 +- app/code/core/Mage/Page/Helper/Layout.php | 2 +- app/code/core/Mage/Page/Model/Config.php | 2 +- .../core/Mage/Page/Model/Source/Layout.php | 2 +- app/code/core/Mage/Page/etc/config.xml | 2 +- app/code/core/Mage/Page/etc/system.xml | 2 +- .../Mage/Page/view/frontend/1column.phtml | 2 +- .../Page/view/frontend/2columns-left.phtml | 2 +- .../Page/view/frontend/2columns-right.phtml | 2 +- .../Mage/Page/view/frontend/3columns.phtml | 2 +- .../view/frontend/callouts/left_col.phtml | 2 +- .../view/frontend/callouts/right_col.phtml | 2 +- .../core/Mage/Page/view/frontend/empty.phtml | 2 +- .../Page/view/frontend/html/breadcrumbs.phtml | 2 +- .../Mage/Page/view/frontend/html/footer.phtml | 2 +- .../Mage/Page/view/frontend/html/head.phtml | 2 +- .../Mage/Page/view/frontend/html/header.phtml | 2 +- .../Page/view/frontend/html/notices.phtml | 4 +- .../Mage/Page/view/frontend/html/pager.phtml | 2 +- .../Mage/Page/view/frontend/js/calendar.phtml | 2 +- .../Mage/Page/view/frontend/js/cookie.phtml | 2 +- .../Mage/Page/view/frontend/js/cookies.js | 2 +- .../core/Mage/Page/view/frontend/layout.xml | 2 +- app/code/core/Mage/Page/view/frontend/menu.js | 2 +- .../core/Mage/Page/view/frontend/popup.phtml | 2 +- .../core/Mage/Page/view/frontend/print.phtml | 2 +- .../Mage/Page/view/frontend/redirect.phtml | 2 +- .../Page/view/frontend/switch/flags.phtml | 2 +- .../Page/view/frontend/switch/languages.phtml | 2 +- .../Page/view/frontend/switch/stores.phtml | 2 +- .../view/frontend/template/container.phtml | 2 +- .../Page/view/frontend/template/links.phtml | 2 +- .../view/frontend/template/linksblock.phtml | 2 +- .../Block/Adminhtml/Cache/Additional.php | 2 +- app/code/core/Mage/PageCache/Helper/Data.php | 2 +- .../PageCache/Model/Control/Interface.php | 2 +- .../Mage/PageCache/Model/Control/Zend.php | 2 +- .../core/Mage/PageCache/Model/Observer.php | 2 +- .../Model/System/Config/Source/Controls.php | 2 +- .../Adminhtml/PageCacheController.php | 2 +- .../core/Mage/PageCache/etc/adminhtml.xml | 2 +- app/code/core/Mage/PageCache/etc/config.xml | 2 +- app/code/core/Mage/PageCache/etc/system.xml | 2 +- .../view/adminhtml/cache/additional.phtml | 2 +- .../Mage/PageCache/view/adminhtml/layout.xml | 2 +- .../Mage/PageCache/view/frontend/cookie.phtml | 2 +- .../Mage/PageCache/view/frontend/layout.xml | 2 +- .../Paygate/Block/Authorizenet/Form/Cc.php | 2 +- .../Paygate/Block/Authorizenet/Info/Cc.php | 2 +- app/code/core/Mage/Paygate/Helper/Data.php | 12 +- .../core/Mage/Paygate/Model/Authorizenet.php | 7 +- .../Mage/Paygate/Model/Authorizenet/Cards.php | 2 +- .../Mage/Paygate/Model/Authorizenet/Debug.php | 2 +- .../Paygate/Model/Authorizenet/Request.php | 2 +- .../Paygate/Model/Authorizenet/Result.php | 2 +- .../Model/Authorizenet/Source/Cctype.php | 2 +- .../Authorizenet/Source/PaymentAction.php | 2 +- .../Model/Resource/Authorizenet/Debug.php | 2 +- .../Authorizenet/Debug/Collection.php | 2 +- .../Authorizenet/PaymentController.php | 2 +- .../Authorizenet/PaymentController.php | 2 +- app/code/core/Mage/Paygate/etc/config.xml | 2 +- app/code/core/Mage/Paygate/etc/system.xml | 2 +- .../sql/paygate_setup/install-1.6.0.0.php | 2 +- .../Mage/Paygate/view/adminhtml/form/cc.phtml | 2 +- .../Mage/Paygate/view/adminhtml/info/cc.phtml | 2 +- .../Paygate/view/adminhtml/info/pdf.phtml | 2 +- .../Mage/Paygate/view/frontend/form/cc.phtml | 2 +- .../Mage/Paygate/view/frontend/info/cc.phtml | 2 +- .../Block/Catalog/Product/View/Profile.php | 2 +- app/code/core/Mage/Payment/Block/Form.php | 2 +- app/code/core/Mage/Payment/Block/Form/Cc.php | 2 +- .../core/Mage/Payment/Block/Form/Ccsave.php | 2 +- .../core/Mage/Payment/Block/Form/Checkmo.php | 2 +- .../Mage/Payment/Block/Form/Container.php | 2 +- .../Mage/Payment/Block/Form/Purchaseorder.php | 2 +- app/code/core/Mage/Payment/Block/Info.php | 2 +- app/code/core/Mage/Payment/Block/Info/Cc.php | 2 +- .../core/Mage/Payment/Block/Info/Ccsave.php | 2 +- .../core/Mage/Payment/Block/Info/Checkmo.php | 2 +- .../Mage/Payment/Block/Info/Container.php | 2 +- .../Mage/Payment/Block/Info/Purchaseorder.php | 2 +- app/code/core/Mage/Payment/Exception.php | 2 +- app/code/core/Mage/Payment/Helper/Data.php | 2 +- .../Billing/Agreement/MethodInterface.php | 2 +- .../Model/Billing/AgreementAbstract.php | 2 +- app/code/core/Mage/Payment/Model/Config.php | 2 +- app/code/core/Mage/Payment/Model/Info.php | 2 +- .../Mage/Payment/Model/Info/Exception.php | 2 +- .../Mage/Payment/Model/Method/Abstract.php | 92 +- .../core/Mage/Payment/Model/Method/Cc.php | 52 +- .../core/Mage/Payment/Model/Method/Ccsave.php | 2 +- .../Mage/Payment/Model/Method/Checkmo.php | 2 +- .../core/Mage/Payment/Model/Method/Free.php | 4 +- .../Payment/Model/Method/Purchaseorder.php | 2 +- app/code/core/Mage/Payment/Model/Observer.php | 2 +- .../Mage/Payment/Model/Paygate/Result.php | 2 +- .../Mage/Payment/Model/Recurring/Profile.php | 2 +- .../Recurring/Profile/MethodInterface.php | 2 +- .../core/Mage/Payment/Model/Source/Cctype.php | 2 +- .../Mage/Payment/Model/Source/Invoice.php | 2 +- app/code/core/Mage/Payment/etc/adminhtml.xml | 2 +- app/code/core/Mage/Payment/etc/config.xml | 2 +- app/code/core/Mage/Payment/etc/system.xml | 9 +- .../Mage/Payment/view/adminhtml/form/cc.phtml | 2 +- .../Payment/view/adminhtml/form/ccsave.phtml | 2 +- .../Payment/view/adminhtml/form/checkmo.phtml | 2 +- .../view/adminhtml/form/purchaseorder.phtml | 2 +- .../Payment/view/adminhtml/info/checkmo.phtml | 2 +- .../Payment/view/adminhtml/info/default.phtml | 2 +- .../view/adminhtml/info/pdf/checkmo.phtml | 2 +- .../view/adminhtml/info/pdf/default.phtml | 2 +- .../adminhtml/info/pdf/purchaseorder.phtml | 2 +- .../view/adminhtml/info/purchaseorder.phtml | 2 +- .../product/view/profile/options.phtml | 2 +- .../product/view/profile/schedule.phtml | 2 +- .../Mage/Payment/view/frontend/form/cc.phtml | 2 +- .../Payment/view/frontend/form/ccsave.phtml | 2 +- .../Payment/view/frontend/form/checkmo.phtml | 2 +- .../view/frontend/form/purchaseorder.phtml | 2 +- .../Payment/view/frontend/info/checkmo.phtml | 2 +- .../Payment/view/frontend/info/default.phtml | 2 +- .../view/frontend/info/purchaseorder.phtml | 2 +- .../Mage/Payment/view/frontend/layout.xml | 2 +- .../Block/Adminhtml/Settlement/Details.php | 2 +- .../Adminhtml/Settlement/Details/Form.php | 2 +- .../Block/Adminhtml/Settlement/Report.php | 2 +- .../Adminhtml/Settlement/Report/Grid.php | 2 +- .../Adminhtml/System/Config/ApiWizard.php | 2 +- .../System/Config/Fieldset/Global.php | 2 +- .../Adminhtml/System/Config/Fieldset/Hint.php | 2 +- .../System/Config/Fieldset/Store.php | 2 +- .../System/Config/Payflowlink/Advanced.php | 2 +- .../System/Config/Payflowlink/Info.php | 2 +- .../core/Mage/Paypal/Block/Express/Form.php | 2 +- .../core/Mage/Paypal/Block/Express/Review.php | 2 +- .../Paypal/Block/Express/Review/Details.php | 2 +- .../Mage/Paypal/Block/Express/Shortcut.php | 2 +- .../Mage/Paypal/Block/Hosted/Pro/Form.php | 2 +- .../Mage/Paypal/Block/Hosted/Pro/Iframe.php | 2 +- .../Mage/Paypal/Block/Hosted/Pro/Info.php | 2 +- app/code/core/Mage/Paypal/Block/Iframe.php | 5 +- app/code/core/Mage/Paypal/Block/Logo.php | 2 +- .../Paypal/Block/Payflow/Advanced/Form.php | 4 +- .../Paypal/Block/Payflow/Advanced/Iframe.php | 11 +- .../Paypal/Block/Payflow/Advanced/Info.php | 2 +- .../Paypal/Block/Payflow/Advanced/Review.php | 3 +- .../Mage/Paypal/Block/Payflow/Link/Form.php | 4 +- .../Mage/Paypal/Block/Payflow/Link/Iframe.php | 29 +- .../Mage/Paypal/Block/Payflow/Link/Info.php | 2 +- .../Mage/Paypal/Block/Payflow/Link/Review.php | 10 +- .../core/Mage/Paypal/Block/Payment/Info.php | 2 +- .../core/Mage/Paypal/Block/Standard/Form.php | 2 +- .../Mage/Paypal/Block/Standard/Redirect.php | 2 +- .../Paypal/Controller/Express/Abstract.php | 4 +- app/code/core/Mage/Paypal/Exception.php | 2 +- app/code/core/Mage/Paypal/Helper/Data.php | 2 +- app/code/core/Mage/Paypal/Helper/Hss.php | 6 +- .../core/Mage/Paypal/Model/Api/Abstract.php | 2 +- app/code/core/Mage/Paypal/Model/Api/Nvp.php | 2 +- .../core/Mage/Paypal/Model/Api/Standard.php | 2 +- app/code/core/Mage/Paypal/Model/Cart.php | 2 +- app/code/core/Mage/Paypal/Model/Cert.php | 2 +- app/code/core/Mage/Paypal/Model/Config.php | 13 +- app/code/core/Mage/Paypal/Model/Direct.php | 2 +- app/code/core/Mage/Paypal/Model/Express.php | 2 +- .../Mage/Paypal/Model/Express/Checkout.php | 2 +- app/code/core/Mage/Paypal/Model/Hostedpro.php | 2 +- .../Mage/Paypal/Model/Hostedpro/Request.php | 2 +- app/code/core/Mage/Paypal/Model/Info.php | 2 +- app/code/core/Mage/Paypal/Model/Ipn.php | 9 +- .../Mage/Paypal/Model/Method/Agreement.php | 2 +- app/code/core/Mage/Paypal/Model/Observer.php | 29 +- .../Mage/Paypal/Model/Payflow/Request.php | 2 +- .../Mage/Paypal/Model/Payflowadvanced.php | 30 +- .../core/Mage/Paypal/Model/Payflowlink.php | 508 +- .../core/Mage/Paypal/Model/Payflowpro.php | 2 +- .../Mage/Paypal/Model/Payment/Transaction.php | 2 +- app/code/core/Mage/Paypal/Model/Pro.php | 2 +- .../Mage/Paypal/Model/Report/Settlement.php | 2 +- .../Paypal/Model/Report/Settlement/Row.php | 2 +- .../core/Mage/Paypal/Model/Resource/Cert.php | 2 +- .../Model/Resource/Payment/Transaction.php | 3 +- .../Payment/Transaction/Collection.php | 3 +- .../Model/Resource/Report/Settlement.php | 2 +- .../Model/Resource/Report/Settlement/Row.php | 2 +- .../Report/Settlement/Row/Collection.php | 2 +- .../core/Mage/Paypal/Model/Resource/Setup.php | 2 +- app/code/core/Mage/Paypal/Model/Session.php | 2 +- app/code/core/Mage/Paypal/Model/Standard.php | 2 +- .../Model/System/Config/Backend/Cert.php | 2 +- .../Model/System/Config/Backend/Cron.php | 2 +- .../System/Config/Backend/MerchantCountry.php | 2 +- .../Config/Source/AuthorizationAmounts.php | 11 +- .../System/Config/Source/BuyerCountry.php | 2 +- .../System/Config/Source/FetchingSchedule.php | 2 +- .../Model/System/Config/Source/Logo.php | 2 +- .../System/Config/Source/MerchantCountry.php | 2 +- .../System/Config/Source/PaymentActions.php | 2 +- .../Config/Source/PaymentActions/Express.php | 2 +- .../Adminhtml/Paypal/ReportsController.php | 2 +- .../Paypal/controllers/ExpressController.php | 2 +- .../controllers/HostedproController.php | 2 +- .../Mage/Paypal/controllers/IpnController.php | 2 +- .../Paypal/controllers/PayflowController.php | 145 +- .../controllers/PayflowadvancedController.php | 147 +- .../Paypal/controllers/StandardController.php | 2 +- app/code/core/Mage/Paypal/etc/adminhtml.xml | 2 +- app/code/core/Mage/Paypal/etc/config.xml | 10 +- app/code/core/Mage/Paypal/etc/system.xml | 24 +- .../sql/paypal_setup/install-1.6.0.0.php | 2 +- .../paypal_setup/upgrade-1.6.0.0-1.6.0.1.php | 2 +- .../paypal_setup/upgrade-1.6.0.1-1.6.0.2.php | 2 +- .../core/Mage/Paypal/view/adminhtml/boxes.css | 2 +- .../Mage/Paypal/view/adminhtml/layout.xml | 2 +- .../adminhtml/system/config/api_wizard.phtml | 6 +- .../system/config/fieldset/global.phtml | 2 +- .../system/config/fieldset/hint.phtml | 2 +- .../system/config/fieldset/store.phtml | 2 +- .../system/config/payflowlink/advanced.phtml | 8 +- .../system/config/payflowlink/info.phtml | 32 +- .../Paypal/view/frontend/express/review.phtml | 2 +- .../frontend/express/review/details.phtml | 2 +- .../view/frontend/express/shortcut.phtml | 2 +- .../Mage/Paypal/view/frontend/hss/form.phtml | 2 +- .../Paypal/view/frontend/hss/iframe.phtml | 2 +- .../Mage/Paypal/view/frontend/hss/info.phtml | 2 +- .../Mage/Paypal/view/frontend/hss/js.phtml | 2 +- .../Paypal/view/frontend/hss/redirect.phtml | 5 +- .../view/frontend/hss/review/button.phtml | 2 +- .../core/Mage/Paypal/view/frontend/layout.xml | 54 +- .../Paypal/view/frontend/partner/logo.phtml | 2 +- .../view/frontend/payflowadvanced/form.phtml | 2 +- .../frontend/payflowadvanced/iframe.phtml | 99 +- .../view/frontend/payflowadvanced/info.phtml | 20 +- .../frontend/payflowadvanced/redirect.phtml | 79 +- .../view/frontend/payflowlink/form.phtml | 2 +- .../view/frontend/payflowlink/iframe.phtml | 99 +- .../view/frontend/payflowlink/info.phtml | 20 +- .../view/frontend/payflowlink/redirect.phtml | 79 +- .../Paypal/view/frontend/payment/mark.phtml | 2 +- .../view/frontend/payment/redirect.phtml | 2 +- .../core/Mage/Paypal/view/frontend/review.js | 2 +- .../core/Mage/PaypalUk/Block/Express/Form.php | 2 +- .../Mage/PaypalUk/Block/Express/Shortcut.php | 2 +- app/code/core/Mage/PaypalUk/Helper/Data.php | 2 +- app/code/core/Mage/PaypalUk/Model/Api/Nvp.php | 87 +- app/code/core/Mage/PaypalUk/Model/Direct.php | 2 +- app/code/core/Mage/PaypalUk/Model/Express.php | 2 +- .../Mage/PaypalUk/Model/Express/Checkout.php | 2 +- app/code/core/Mage/PaypalUk/Model/Pro.php | 2 +- app/code/core/Mage/PaypalUk/Model/Session.php | 2 +- .../controllers/ExpressController.php | 2 +- app/code/core/Mage/PaypalUk/etc/config.xml | 2 +- .../sql/paypaluk_setup/install-1.6.0.0.php | 2 +- .../Mage/PaypalUk/view/frontend/layout.xml | 2 +- .../Mage/Persistent/Block/Form/Remember.php | 2 +- .../Persistent/Block/Header/Additional.php | 2 +- app/code/core/Mage/Persistent/Helper/Data.php | 2 +- .../core/Mage/Persistent/Helper/Session.php | 16 +- .../core/Mage/Persistent/Model/Observer.php | 10 +- .../Persistent/Model/Observer/Session.php | 2 +- .../Persistent/Model/Persistent/Config.php | 2 +- .../Persistent/Model/Resource/Session.php | 7 +- .../core/Mage/Persistent/Model/Session.php | 2 +- .../controllers/IndexController.php | 2 +- .../core/Mage/Persistent/etc/adminhtml.xml | 2 +- app/code/core/Mage/Persistent/etc/config.xml | 2 +- .../core/Mage/Persistent/etc/persistent.xml | 2 +- app/code/core/Mage/Persistent/etc/system.xml | 2 +- .../sql/persistent_setup/install-1.0.0.0.php | 2 +- .../frontend/checkout/onepage/billing.phtml | 9 +- .../frontend/checkout/onepage/login.phtml | 3 +- .../view/frontend/customer/form/login.phtml | 3 +- .../frontend/customer/form/register.phtml | 3 +- .../Mage/Persistent/view/frontend/layout.xml | 2 +- .../view/frontend/remember_me.phtml | 2 +- .../view/frontend/remember_me_tooltip.phtml | 2 +- app/code/core/Mage/Poll/Block/ActivePoll.php | 2 +- app/code/core/Mage/Poll/Helper/Data.php | 2 +- app/code/core/Mage/Poll/Model/Poll.php | 2 +- app/code/core/Mage/Poll/Model/Poll/Answer.php | 2 +- app/code/core/Mage/Poll/Model/Poll/Vote.php | 2 +- .../core/Mage/Poll/Model/Resource/Poll.php | 2 +- .../Mage/Poll/Model/Resource/Poll/Answer.php | 2 +- .../Model/Resource/Poll/Answer/Collection.php | 2 +- .../Poll/Model/Resource/Poll/Collection.php | 2 +- .../Mage/Poll/Model/Resource/Poll/Vote.php | 2 +- .../Mage/Poll/controllers/VoteController.php | 2 +- .../data/poll_setup/data-install-1.6.0.0.php | 2 +- app/code/core/Mage/Poll/etc/adminhtml.xml | 2 +- app/code/core/Mage/Poll/etc/config.xml | 2 +- app/code/core/Mage/Poll/etc/system.xml | 2 +- .../Poll/sql/poll_setup/install-1.6.0.0.php | 2 +- .../core/Mage/Poll/view/frontend/active.phtml | 2 +- .../core/Mage/Poll/view/frontend/layout.xml | 2 +- .../core/Mage/Poll/view/frontend/result.phtml | 2 +- .../ProductAlert/Block/Email/Abstract.php | 2 +- .../Mage/ProductAlert/Block/Email/Price.php | 2 +- .../Mage/ProductAlert/Block/Email/Stock.php | 2 +- .../Mage/ProductAlert/Block/Product/View.php | 2 +- .../core/Mage/ProductAlert/Helper/Data.php | 29 +- .../core/Mage/ProductAlert/Model/Email.php | 2 +- .../core/Mage/ProductAlert/Model/Observer.php | 2 +- .../core/Mage/ProductAlert/Model/Price.php | 2 +- .../ProductAlert/Model/Resource/Abstract.php | 2 +- .../ProductAlert/Model/Resource/Price.php | 2 +- .../Model/Resource/Price/Collection.php | 2 +- .../Resource/Price/Customer/Collection.php | 2 +- .../ProductAlert/Model/Resource/Stock.php | 2 +- .../Model/Resource/Stock/Collection.php | 2 +- .../Resource/Stock/Customer/Collection.php | 2 +- .../core/Mage/ProductAlert/Model/Stock.php | 2 +- .../controllers/AddController.php | 8 +- .../controllers/UnsubscribeController.php | 2 +- .../core/Mage/ProductAlert/etc/config.xml | 2 +- .../core/Mage/ProductAlert/etc/system.xml | 2 +- .../productalert_setup/install-1.6.0.0.php | 2 +- .../view/frontend/email/price.phtml | 2 +- .../view/frontend/email/stock.phtml | 2 +- .../ProductAlert/view/frontend/layout.xml | 2 +- .../view/frontend/product/view.phtml | 2 +- .../Mage/Rating/Block/Entity/Detailed.php | 2 +- app/code/core/Mage/Rating/Helper/Data.php | 2 +- app/code/core/Mage/Rating/Model/Observer.php | 2 +- app/code/core/Mage/Rating/Model/Rating.php | 2 +- .../core/Mage/Rating/Model/Rating/Entity.php | 2 +- .../core/Mage/Rating/Model/Rating/Option.php | 2 +- .../Mage/Rating/Model/Rating/Option/Vote.php | 2 +- .../Mage/Rating/Model/Resource/Rating.php | 2 +- .../Model/Resource/Rating/Collection.php | 2 +- .../Rating/Model/Resource/Rating/Entity.php | 2 +- .../Rating/Model/Resource/Rating/Option.php | 2 +- .../Resource/Rating/Option/Collection.php | 2 +- .../Model/Resource/Rating/Option/Vote.php | 2 +- .../Rating/Option/Vote/Collection.php | 2 +- .../rating_setup/data-install-1.6.0.0.php | 2 +- app/code/core/Mage/Rating/etc/adminhtml.xml | 2 +- app/code/core/Mage/Rating/etc/config.xml | 2 +- .../sql/rating_setup/install-1.6.0.0.php | 2 +- .../Mage/Rating/view/frontend/detailed.phtml | 2 +- .../Mage/Rating/view/frontend/empty.phtml | 2 +- .../Mage/Reports/Block/Product/Abstract.php | 2 +- .../Mage/Reports/Block/Product/Compared.php | 2 +- .../Mage/Reports/Block/Product/Viewed.php | 2 +- .../Reports/Block/Product/Widget/Compared.php | 2 +- .../Reports/Block/Product/Widget/Viewed.php | 2 +- app/code/core/Mage/Reports/Exception.php | 2 +- app/code/core/Mage/Reports/Helper/Data.php | 2 +- app/code/core/Mage/Reports/Model/Config.php | 2 +- app/code/core/Mage/Reports/Model/Event.php | 2 +- .../Mage/Reports/Model/Event/Observer.php | 2 +- .../core/Mage/Reports/Model/Event/Type.php | 2 +- app/code/core/Mage/Reports/Model/Flag.php | 3 +- .../Mage/Reports/Model/Grouped/Collection.php | 2 +- .../Reports/Model/Product/Index/Abstract.php | 2 +- .../Reports/Model/Product/Index/Compared.php | 2 +- .../Reports/Model/Product/Index/Viewed.php | 2 +- app/code/core/Mage/Reports/Model/Report.php | 2 +- .../Model/Resource/Accounts/Collection.php | 2 +- .../Model/Resource/Customer/Collection.php | 2 +- .../Resource/Customer/Orders/Collection.php | 2 +- .../Resource/Customer/Totals/Collection.php | 2 +- .../Entity/Summary/Collection/Abstract.php | 2 +- .../Mage/Reports/Model/Resource/Event.php | 2 +- .../Model/Resource/Event/Collection.php | 2 +- .../Reports/Model/Resource/Event/Type.php | 2 +- .../Model/Resource/Event/Type/Collection.php | 2 +- .../Model/Resource/Helper/Interface.php | 51 + .../Reports/Model/Resource/Helper/Mysql4.php | 70 +- .../Model/Resource/Order/Collection.php | 2 +- .../Model/Resource/Product/Collection.php | 2 +- .../Resource/Product/Downloads/Collection.php | 2 +- .../Model/Resource/Product/Index/Abstract.php | 2 +- .../Product/Index/Collection/Abstract.php | 2 +- .../Model/Resource/Product/Index/Compared.php | 2 +- .../Product/Index/Compared/Collection.php | 2 +- .../Model/Resource/Product/Index/Viewed.php | 2 +- .../Product/Index/Viewed/Collection.php | 2 +- .../Resource/Product/Lowstock/Collection.php | 2 +- .../Resource/Product/Ordered/Collection.php | 2 +- .../Resource/Product/Sold/Collection.php | 2 +- .../Resource/Product/Viewed/Collection.php | 2 +- .../Model/Resource/Quote/Collection.php | 2 +- .../Model/Resource/Report/Abstract.php | 14 +- .../Model/Resource/Report/Collection.php | 2 +- .../Resource/Report/Collection/Abstract.php | 287 + .../Model/Resource/Report/Product/Viewed.php | 212 + .../Report/Product/Viewed/Collection.php | 367 ++ .../Model/Resource/Review/Collection.php | 2 +- .../Resource/Review/Customer/Collection.php | 2 +- .../Resource/Review/Product/Collection.php | 2 +- .../Resource/Shopcart/Product/Collection.php | 2 +- .../Reports/Model/Resource/Tag/Collection.php | 7 +- .../Resource/Tag/Customer/Collection.php | 2 +- .../Model/Resource/Tag/Product/Collection.php | 2 +- .../Model/Resource/Wishlist/Collection.php | 2 +- .../Resource/Wishlist/Product/Collection.php | 2 +- app/code/core/Mage/Reports/Model/Session.php | 2 +- app/code/core/Mage/Reports/Model/Test.php | 2 +- app/code/core/Mage/Reports/Model/Totals.php | 2 +- .../reports_setup/data-install-1.6.0.0.php | 2 +- app/code/core/Mage/Reports/etc/adminhtml.xml | 6 +- app/code/core/Mage/Reports/etc/config.xml | 6 +- app/code/core/Mage/Reports/etc/system.xml | 2 +- app/code/core/Mage/Reports/etc/widget.xml | 2 +- .../sql/reports_setup/install-1.6.0.0.php | 2 +- .../reports_setup/mysql4-install-1.6.0.0.php | 2 +- .../upgrade-1.6.0.0-1.6.0.0.1.php | 99 + .../view/frontend/home_product_compared.phtml | 2 +- .../view/frontend/home_product_viewed.phtml | 2 +- .../Mage/Reports/view/frontend/layout.xml | 2 +- .../view/frontend/product_compared.phtml | 2 +- .../view/frontend/product_viewed.phtml | 2 +- .../column/compared_default_list.phtml | 2 +- .../column/compared_images_list.phtml | 2 +- .../compared/column/compared_names_list.phtml | 2 +- .../compared/content/compared_grid.phtml | 2 +- .../compared/content/compared_list.phtml | 2 +- .../viewed/column/viewed_default_list.phtml | 2 +- .../viewed/column/viewed_images_list.phtml | 2 +- .../viewed/column/viewed_names_list.phtml | 2 +- .../widget/viewed/content/viewed_grid.phtml | 2 +- .../widget/viewed/content/viewed_list.phtml | 2 +- .../Mage/Reports/view/frontend/widgets.css | 2 +- .../core/Mage/Review/Block/Customer/List.php | 58 +- .../Mage/Review/Block/Customer/Recent.php | 2 +- .../core/Mage/Review/Block/Customer/View.php | 2 +- app/code/core/Mage/Review/Block/Form.php | 2 +- app/code/core/Mage/Review/Block/Helper.php | 2 +- .../core/Mage/Review/Block/Product/View.php | 2 +- .../Mage/Review/Block/Product/View/List.php | 2 +- app/code/core/Mage/Review/Block/View.php | 2 +- app/code/core/Mage/Review/Helper/Data.php | 2 +- app/code/core/Mage/Review/Model/Observer.php | 2 +- .../Mage/Review/Model/Resource/Review.php | 2 +- .../Model/Resource/Review/Collection.php | 2 +- .../Resource/Review/Product/Collection.php | 7 +- .../Review/Model/Resource/Review/Status.php | 2 +- .../Resource/Review/Status/Collection.php | 2 +- .../Review/Model/Resource/Review/Summary.php | 2 +- .../Resource/Review/Summary/Collection.php | 2 +- app/code/core/Mage/Review/Model/Review.php | 10 +- .../core/Mage/Review/Model/Review/Status.php | 2 +- .../core/Mage/Review/Model/Review/Summary.php | 2 +- app/code/core/Mage/Review/Model/Session.php | 2 +- .../Review/controllers/CustomerController.php | 2 +- .../Review/controllers/ProductController.php | 10 +- .../review_setup/data-install-1.6.0.0.php | 2 +- app/code/core/Mage/Review/etc/adminhtml.xml | 2 +- app/code/core/Mage/Review/etc/config.xml | 2 +- app/code/core/Mage/Review/etc/system.xml | 2 +- .../sql/review_setup/install-1.6.0.0.php | 2 +- .../Review/view/frontend/customer/list.phtml | 2 +- .../view/frontend/customer/recent.phtml | 2 +- .../Review/view/frontend/customer/view.phtml | 2 +- .../core/Mage/Review/view/frontend/form.phtml | 2 +- .../Review/view/frontend/helper/summary.phtml | 2 +- .../view/frontend/helper/summary_short.phtml | 2 +- .../core/Mage/Review/view/frontend/layout.xml | 2 +- .../view/frontend/product/view/count.phtml | 2 +- .../view/frontend/product/view/list.phtml | 2 +- .../view/frontend/product/view/other.phtml | 2 +- .../core/Mage/Review/view/frontend/view.phtml | 2 +- app/code/core/Mage/Rss/Block/Abstract.php | 2 +- .../core/Mage/Rss/Block/Catalog/Abstract.php | 2 +- .../core/Mage/Rss/Block/Catalog/Category.php | 2 +- app/code/core/Mage/Rss/Block/Catalog/New.php | 31 +- .../Mage/Rss/Block/Catalog/NotifyStock.php | 8 +- .../core/Mage/Rss/Block/Catalog/Review.php | 8 +- .../core/Mage/Rss/Block/Catalog/Salesrule.php | 74 +- .../core/Mage/Rss/Block/Catalog/Special.php | 2 +- app/code/core/Mage/Rss/Block/Catalog/Tag.php | 2 +- app/code/core/Mage/Rss/Block/List.php | 2 +- .../core/Mage/Rss/Block/Order/Details.php | 2 +- app/code/core/Mage/Rss/Block/Order/New.php | 2 +- app/code/core/Mage/Rss/Block/Order/Status.php | 2 +- app/code/core/Mage/Rss/Block/Wishlist.php | 2 +- app/code/core/Mage/Rss/Helper/Catalog.php | 2 +- app/code/core/Mage/Rss/Helper/Data.php | 2 +- app/code/core/Mage/Rss/Helper/Order.php | 2 +- app/code/core/Mage/Rss/Model/Observer.php | 2 +- .../core/Mage/Rss/Model/Resource/Order.php | 2 +- app/code/core/Mage/Rss/Model/Rss.php | 2 +- app/code/core/Mage/Rss/Model/Session.php | 2 +- .../Rss/Model/System/Config/Backend/Links.php | 2 +- .../Rss/controllers/CatalogController.php | 2 +- .../Mage/Rss/controllers/IndexController.php | 2 +- .../Mage/Rss/controllers/OrderController.php | 2 +- app/code/core/Mage/Rss/etc/adminhtml.xml | 2 +- app/code/core/Mage/Rss/etc/config.xml | 10 +- app/code/core/Mage/Rss/etc/system.xml | 2 +- .../core/Mage/Rss/view/adminhtml/layout.xml | 2 +- .../core/Mage/Rss/view/frontend/layout.xml | 2 +- .../core/Mage/Rss/view/frontend/list.phtml | 2 +- .../core/Mage/Rss/view/frontend/nofeed.phtml | 2 +- .../Rss/view/frontend/order/details.phtml | 2 +- app/code/core/Mage/Rule/Block/Actions.php | 2 +- app/code/core/Mage/Rule/Block/Conditions.php | 2 +- app/code/core/Mage/Rule/Block/Editable.php | 2 +- app/code/core/Mage/Rule/Block/Newchild.php | 2 +- app/code/core/Mage/Rule/Block/Rule.php | 2 +- app/code/core/Mage/Rule/Helper/Data.php | 2 +- app/code/core/Mage/Rule/Model/Abstract.php | 502 ++ .../core/Mage/Rule/Model/Action/Abstract.php | 6 +- .../Mage/Rule/Model/Action/Collection.php | 2 +- .../core/Mage/Rule/Model/Action/Interface.php | 2 +- .../Mage/Rule/Model/Condition/Abstract.php | 12 +- .../Mage/Rule/Model/Condition/Combine.php | 9 +- .../Mage/Rule/Model/Condition/Interface.php | 2 +- .../Rule/Model/Condition/Product/Abstract.php | 513 ++ .../core/Mage/Rule/Model/Renderer/Actions.php | 2 +- .../Mage/Rule/Model/Renderer/Conditions.php | 2 +- .../Mage/Rule/Model/Resource/Abstract.php | 250 + .../Resource/Rule/Collection/Abstract.php | 236 + app/code/core/Mage/Rule/Model/Rule.php | 335 +- app/code/core/Mage/Rule/etc/config.xml | 2 +- .../Block/Adminhtml/Billing/Agreement.php | 2 +- .../Adminhtml/Billing/Agreement/Grid.php | 2 +- .../Adminhtml/Billing/Agreement/View.php | 2 +- .../Adminhtml/Billing/Agreement/View/Form.php | 2 +- .../Billing/Agreement/View/Tab/Info.php | 2 +- .../Billing/Agreement/View/Tab/Orders.php | 2 +- .../Adminhtml/Billing/Agreement/View/Tabs.php | 2 +- .../Adminhtml/Customer/Edit/Tab/Agreement.php | 2 +- .../Customer/Edit/Tab/Recurring/Profile.php | 2 +- .../Block/Adminhtml/Recurring/Profile.php | 2 +- .../Adminhtml/Recurring/Profile/Edit/Form.php | 2 +- .../Adminhtml/Recurring/Profile/Grid.php | 2 +- .../Adminhtml/Recurring/Profile/View.php | 2 +- .../Recurring/Profile/View/Getawayinfo.php | 2 +- .../Adminhtml/Recurring/Profile/View/Info.php | 2 +- .../Recurring/Profile/View/Items.php | 2 +- .../Recurring/Profile/View/Tab/Info.php | 2 +- .../Recurring/Profile/View/Tab/Orders.php | 2 +- .../Block/Adminhtml/Report/Filter/Form.php | 2 +- .../Adminhtml/Report/Filter/Form/Coupon.php | 89 + .../Adminhtml/Report/Filter/Form/Order.php | 2 +- .../Sales/Block/Billing/Agreement/View.php | 2 +- .../Mage/Sales/Block/Billing/Agreements.php | 2 +- .../core/Mage/Sales/Block/Guest/Links.php | 2 +- .../core/Mage/Sales/Block/Items/Abstract.php | 2 +- .../core/Mage/Sales/Block/Order/Comments.php | 2 +- .../Mage/Sales/Block/Order/Creditmemo.php | 2 +- .../Sales/Block/Order/Creditmemo/Items.php | 2 +- .../Sales/Block/Order/Creditmemo/Totals.php | 2 +- .../Block/Order/Email/Creditmemo/Items.php | 2 +- .../Sales/Block/Order/Email/Invoice/Items.php | 2 +- .../Mage/Sales/Block/Order/Email/Items.php | 2 +- .../Sales/Block/Order/Email/Items/Default.php | 2 +- .../Block/Order/Email/Items/Order/Default.php | 2 +- .../Block/Order/Email/Items/Order/Grouped.php | 2 +- .../Block/Order/Email/Shipment/Items.php | 2 +- .../core/Mage/Sales/Block/Order/History.php | 2 +- app/code/core/Mage/Sales/Block/Order/Info.php | 2 +- .../Mage/Sales/Block/Order/Info/Buttons.php | 2 +- .../core/Mage/Sales/Block/Order/Invoice.php | 2 +- .../Mage/Sales/Block/Order/Invoice/Items.php | 2 +- .../Mage/Sales/Block/Order/Invoice/Totals.php | 2 +- .../Block/Order/Item/Renderer/Default.php | 2 +- .../Block/Order/Item/Renderer/Grouped.php | 2 +- .../core/Mage/Sales/Block/Order/Items.php | 2 +- .../core/Mage/Sales/Block/Order/Print.php | 2 +- .../Sales/Block/Order/Print/Creditmemo.php | 2 +- .../Mage/Sales/Block/Order/Print/Invoice.php | 2 +- .../Mage/Sales/Block/Order/Print/Shipment.php | 2 +- .../core/Mage/Sales/Block/Order/Recent.php | 2 +- .../core/Mage/Sales/Block/Order/Shipment.php | 2 +- .../Mage/Sales/Block/Order/Shipment/Items.php | 2 +- .../core/Mage/Sales/Block/Order/Totals.php | 2 +- app/code/core/Mage/Sales/Block/Order/View.php | 2 +- .../Block/Payment/Form/Billing/Agreement.php | 2 +- .../Block/Payment/Info/Billing/Agreement.php | 2 +- .../Sales/Block/Recurring/Profile/View.php | 2 +- .../Mage/Sales/Block/Recurring/Profiles.php | 2 +- .../core/Mage/Sales/Block/Reorder/Sidebar.php | 32 +- .../Mage/Sales/Block/Widget/Guest/Form.php | 2 +- .../core/Mage/Sales/Controller/Abstract.php | 2 +- app/code/core/Mage/Sales/Exception.php | 2 +- app/code/core/Mage/Sales/Helper/Data.php | 2 +- app/code/core/Mage/Sales/Helper/Guest.php | 2 +- app/code/core/Mage/Sales/Helper/Reorder.php | 2 +- app/code/core/Mage/Sales/Model/Abstract.php | 2 +- .../core/Mage/Sales/Model/Api/Resource.php | 2 +- .../Mage/Sales/Model/Billing/Agreement.php | 2 +- app/code/core/Mage/Sales/Model/Config.php | 2 +- .../core/Mage/Sales/Model/Convert/Order.php | 2 +- .../core/Mage/Sales/Model/Convert/Quote.php | 2 +- .../core/Mage/Sales/Model/Email/Template.php | 2 +- app/code/core/Mage/Sales/Model/Observer.php | 186 +- app/code/core/Mage/Sales/Model/Order.php | 2 +- .../core/Mage/Sales/Model/Order/Address.php | 2 +- app/code/core/Mage/Sales/Model/Order/Api.php | 2 +- .../core/Mage/Sales/Model/Order/Api/V2.php | 2 +- .../core/Mage/Sales/Model/Order/Config.php | 8 +- .../Mage/Sales/Model/Order/Creditmemo.php | 32 +- .../Mage/Sales/Model/Order/Creditmemo/Api.php | 2 +- .../Sales/Model/Order/Creditmemo/Api/V2.php | 2 +- .../Sales/Model/Order/Creditmemo/Comment.php | 2 +- .../Sales/Model/Order/Creditmemo/Config.php | 2 +- .../Sales/Model/Order/Creditmemo/Item.php | 60 +- .../Model/Order/Creditmemo/Total/Abstract.php | 2 +- .../Model/Order/Creditmemo/Total/Cost.php | 2 +- .../Model/Order/Creditmemo/Total/Discount.php | 30 +- .../Model/Order/Creditmemo/Total/Grand.php | 2 +- .../Model/Order/Creditmemo/Total/Shipping.php | 2 +- .../Model/Order/Creditmemo/Total/Subtotal.php | 6 +- .../Model/Order/Creditmemo/Total/Tax.php | 69 +- .../core/Mage/Sales/Model/Order/Invoice.php | 28 +- .../Mage/Sales/Model/Order/Invoice/Api.php | 2 +- .../Mage/Sales/Model/Order/Invoice/Api/V2.php | 2 +- .../Sales/Model/Order/Invoice/Comment.php | 2 +- .../Mage/Sales/Model/Order/Invoice/Config.php | 2 +- .../Mage/Sales/Model/Order/Invoice/Item.php | 27 +- .../Model/Order/Invoice/Total/Abstract.php | 2 +- .../Sales/Model/Order/Invoice/Total/Cost.php | 2 +- .../Model/Order/Invoice/Total/Discount.php | 19 +- .../Sales/Model/Order/Invoice/Total/Grand.php | 2 +- .../Model/Order/Invoice/Total/Shipping.php | 2 +- .../Model/Order/Invoice/Total/Subtotal.php | 31 +- .../Sales/Model/Order/Invoice/Total/Tax.php | 33 +- app/code/core/Mage/Sales/Model/Order/Item.php | 8 +- .../core/Mage/Sales/Model/Order/Payment.php | 9 +- .../Sales/Model/Order/Payment/Transaction.php | 2 +- .../Mage/Sales/Model/Order/Pdf/Abstract.php | 6 +- .../Mage/Sales/Model/Order/Pdf/Creditmemo.php | 2 +- .../Mage/Sales/Model/Order/Pdf/Invoice.php | 2 +- .../Sales/Model/Order/Pdf/Items/Abstract.php | 44 +- .../Order/Pdf/Items/Creditmemo/Default.php | 36 +- .../Order/Pdf/Items/Creditmemo/Grouped.php | 2 +- .../Model/Order/Pdf/Items/Invoice/Default.php | 58 +- .../Model/Order/Pdf/Items/Invoice/Grouped.php | 2 +- .../Order/Pdf/Items/Shipment/Default.php | 2 +- .../Mage/Sales/Model/Order/Pdf/Shipment.php | 2 +- .../Model/Order/Pdf/Shipment/Packaging.php | 2 +- .../Sales/Model/Order/Pdf/Total/Default.php | 2 +- .../core/Mage/Sales/Model/Order/Shipment.php | 2 +- .../Mage/Sales/Model/Order/Shipment/Api.php | 2 +- .../Sales/Model/Order/Shipment/Api/V2.php | 2 +- .../Sales/Model/Order/Shipment/Comment.php | 2 +- .../Mage/Sales/Model/Order/Shipment/Item.php | 2 +- .../Mage/Sales/Model/Order/Shipment/Track.php | 2 +- .../core/Mage/Sales/Model/Order/Status.php | 2 +- .../Mage/Sales/Model/Order/Status/History.php | 2 +- app/code/core/Mage/Sales/Model/Order/Tax.php | 2 +- .../core/Mage/Sales/Model/Order/Total.php | 2 +- .../Method/Billing/AgreementAbstract.php | 2 +- app/code/core/Mage/Sales/Model/Quote.php | 98 +- .../core/Mage/Sales/Model/Quote/Address.php | 19 +- .../Mage/Sales/Model/Quote/Address/Item.php | 2 +- .../Mage/Sales/Model/Quote/Address/Rate.php | 2 +- .../Mage/Sales/Model/Quote/Address/Total.php | 2 +- .../Model/Quote/Address/Total/Abstract.php | 2 +- .../Model/Quote/Address/Total/Collector.php | 2 +- .../Model/Quote/Address/Total/Custbalance.php | 2 +- .../Model/Quote/Address/Total/Discount.php | 7 +- .../Sales/Model/Quote/Address/Total/Grand.php | 4 +- .../Sales/Model/Quote/Address/Total/Msrp.php | 2 +- .../Model/Quote/Address/Total/Nominal.php | 2 +- .../Quote/Address/Total/Nominal/Collector.php | 2 +- .../Total/Nominal/Recurring/Initial.php | 2 +- .../Address/Total/Nominal/Recurring/Trial.php | 2 +- .../Total/Nominal/RecurringAbstract.php | 2 +- .../Quote/Address/Total/Nominal/Shipping.php | 2 +- .../Quote/Address/Total/Nominal/Subtotal.php | 2 +- .../Model/Quote/Address/Total/Shipping.php | 2 +- .../Model/Quote/Address/Total/Subtotal.php | 2 +- .../Sales/Model/Quote/Address/Total/Tax.php | 2 +- .../core/Mage/Sales/Model/Quote/Config.php | 2 +- app/code/core/Mage/Sales/Model/Quote/Item.php | 2 +- .../Mage/Sales/Model/Quote/Item/Abstract.php | 2 +- .../Mage/Sales/Model/Quote/Item/Option.php | 2 +- .../core/Mage/Sales/Model/Quote/Payment.php | 2 +- .../Mage/Sales/Model/Recurring/Profile.php | 2 +- .../Mage/Sales/Model/Resource/Abstract.php | 2 +- .../Model/Resource/Billing/Agreement.php | 2 +- .../Resource/Billing/Agreement/Collection.php | 2 +- .../Model/Resource/Collection/Abstract.php | 2 +- .../Sales/Model/Resource/Helper/Interface.php | 49 + .../Sales/Model/Resource/Helper/Mysql4.php | 56 +- .../core/Mage/Sales/Model/Resource/Order.php | 2 +- .../Sales/Model/Resource/Order/Abstract.php | 31 +- .../Sales/Model/Resource/Order/Address.php | 31 +- .../Resource/Order/Address/Collection.php | 2 +- .../Order/Attribute/Backend/Billing.php | 2 +- .../Order/Attribute/Backend/Child.php | 2 +- .../Order/Attribute/Backend/Parent.php | 2 +- .../Order/Attribute/Backend/Shipping.php | 2 +- .../Sales/Model/Resource/Order/Collection.php | 2 +- .../Resource/Order/Collection/Abstract.php | 2 +- .../Order/Comment/Collection/Abstract.php | 2 +- .../Sales/Model/Resource/Order/Creditmemo.php | 2 +- .../Creditmemo/Attribute/Backend/Child.php | 2 +- .../Creditmemo/Attribute/Backend/Parent.php | 2 +- .../Resource/Order/Creditmemo/Collection.php | 2 +- .../Resource/Order/Creditmemo/Comment.php | 2 +- .../Order/Creditmemo/Comment/Collection.php | 2 +- .../Order/Creditmemo/Grid/Collection.php | 2 +- .../Model/Resource/Order/Creditmemo/Item.php | 2 +- .../Order/Creditmemo/Item/Collection.php | 2 +- .../Model/Resource/Order/Grid/Collection.php | 2 +- .../Sales/Model/Resource/Order/Invoice.php | 2 +- .../Order/Invoice/Attribute/Backend/Child.php | 2 +- .../Order/Invoice/Attribute/Backend/Item.php | 2 +- .../Order/Invoice/Attribute/Backend/Order.php | 2 +- .../Invoice/Attribute/Backend/Parent.php | 2 +- .../Resource/Order/Invoice/Collection.php | 2 +- .../Model/Resource/Order/Invoice/Comment.php | 2 +- .../Order/Invoice/Comment/Collection.php | 2 +- .../Order/Invoice/Grid/Collection.php | 2 +- .../Model/Resource/Order/Invoice/Item.php | 2 +- .../Order/Invoice/Item/Collection.php | 2 +- .../Mage/Sales/Model/Resource/Order/Item.php | 2 +- .../Model/Resource/Order/Item/Collection.php | 2 +- .../Sales/Model/Resource/Order/Payment.php | 2 +- .../Resource/Order/Payment/Collection.php | 2 +- .../Resource/Order/Payment/Transaction.php | 2 +- .../Order/Payment/Transaction/Collection.php | 2 +- .../Sales/Model/Resource/Order/Shipment.php | 2 +- .../Shipment/Attribute/Backend/Child.php | 2 +- .../Shipment/Attribute/Backend/Parent.php | 2 +- .../Resource/Order/Shipment/Collection.php | 2 +- .../Model/Resource/Order/Shipment/Comment.php | 2 +- .../Order/Shipment/Comment/Collection.php | 2 +- .../Order/Shipment/Grid/Collection.php | 2 +- .../Model/Resource/Order/Shipment/Item.php | 2 +- .../Order/Shipment/Item/Collection.php | 2 +- .../Model/Resource/Order/Shipment/Track.php | 2 +- .../Order/Shipment/Track/Collection.php | 2 +- .../Sales/Model/Resource/Order/Status.php | 2 +- .../Resource/Order/Status/Collection.php | 2 +- .../Model/Resource/Order/Status/History.php | 2 +- .../Order/Status/History/Collection.php | 2 +- .../Mage/Sales/Model/Resource/Order/Tax.php | 2 +- .../Model/Resource/Order/Tax/Collection.php | 2 +- .../core/Mage/Sales/Model/Resource/Quote.php | 2 +- .../Sales/Model/Resource/Quote/Address.php | 2 +- .../Quote/Address/Attribute/Backend.php | 2 +- .../Quote/Address/Attribute/Backend/Child.php | 2 +- .../Address/Attribute/Backend/Parent.php | 2 +- .../Address/Attribute/Backend/Region.php | 2 +- .../Quote/Address/Attribute/Frontend.php | 2 +- .../Attribute/Frontend/Custbalance.php | 2 +- .../Address/Attribute/Frontend/Discount.php | 9 +- .../Address/Attribute/Frontend/Grand.php | 2 +- .../Address/Attribute/Frontend/Shipping.php | 2 +- .../Address/Attribute/Frontend/Subtotal.php | 2 +- .../Quote/Address/Attribute/Frontend/Tax.php | 2 +- .../Resource/Quote/Address/Collection.php | 2 +- .../Model/Resource/Quote/Address/Item.php | 2 +- .../Quote/Address/Item/Collection.php | 2 +- .../Model/Resource/Quote/Address/Rate.php | 2 +- .../Quote/Address/Rate/Collection.php | 2 +- .../Sales/Model/Resource/Quote/Collection.php | 2 +- .../Mage/Sales/Model/Resource/Quote/Item.php | 2 +- .../Model/Resource/Quote/Item/Collection.php | 2 +- .../Model/Resource/Quote/Item/Option.php | 2 +- .../Resource/Quote/Item/Option/Collection.php | 2 +- .../Sales/Model/Resource/Quote/Payment.php | 2 +- .../Resource/Quote/Payment/Collection.php | 2 +- .../Model/Resource/Recurring/Profile.php | 2 +- .../Resource/Recurring/Profile/Collection.php | 2 +- .../core/Mage/Sales/Model/Resource/Report.php | 2 +- .../Sales/Model/Resource/Report/Abstract.php | 2 +- .../Model/Resource/Report/Bestsellers.php | 2 +- .../Report/Bestsellers/Collection.php | 7 +- .../Resource/Report/Collection/Abstract.php | 244 +- .../Sales/Model/Resource/Report/Invoiced.php | 2 +- .../Report/Invoiced/Collection/Invoiced.php | 2 +- .../Report/Invoiced/Collection/Order.php | 2 +- .../Sales/Model/Resource/Report/Order.php | 2 +- .../Resource/Report/Order/Collection.php | 2 +- .../Model/Resource/Report/Order/Createdat.php | 2 +- .../Model/Resource/Report/Order/Updatedat.php | 2 +- .../Report/Order/Updatedat/Collection.php | 2 +- .../Sales/Model/Resource/Report/Refunded.php | 2 +- .../Report/Refunded/Collection/Order.php | 2 +- .../Report/Refunded/Collection/Refunded.php | 2 +- .../Sales/Model/Resource/Report/Shipping.php | 2 +- .../Report/Shipping/Collection/Order.php | 2 +- .../Report/Shipping/Collection/Shipment.php | 2 +- .../Sales/Model/Resource/Sale/Collection.php | 2 +- .../core/Mage/Sales/Model/Resource/Setup.php | 2 +- .../core/Mage/Sales/Model/Service/Order.php | 2 +- .../core/Mage/Sales/Model/Service/Quote.php | 11 +- .../core/Mage/Sales/Model/Status/List.php | 2 +- .../Billing/AgreementController.php | 2 +- .../Sales/controllers/DownloadController.php | 2 +- .../Sales/controllers/GuestController.php | 2 +- .../Sales/controllers/OrderController.php | 2 +- .../Recurring/ProfileController.php | 2 +- .../data/sales_setup/data-install-1.6.0.0.php | 2 +- .../data-upgrade-1.6.0.4-1.6.0.5.php | 76 + app/code/core/Mage/Sales/etc/adminhtml.xml | 2 +- app/code/core/Mage/Sales/etc/api.xml | 2 +- app/code/core/Mage/Sales/etc/config.xml | 30 +- app/code/core/Mage/Sales/etc/fieldset.xml | 2 +- app/code/core/Mage/Sales/etc/system.xml | 2 +- app/code/core/Mage/Sales/etc/widget.xml | 2 +- .../Sales/sql/sales_setup/install-1.6.0.0.php | 2 +- .../sales_setup/upgrade-1.6.0.0-1.6.0.1.php | 2 +- .../sales_setup/upgrade-1.6.0.1-1.6.0.2.php | 2 +- .../sales_setup/upgrade-1.6.0.2-1.6.0.3.php | 2 +- .../sales_setup/upgrade-1.6.0.3-1.6.0.4.php | 2 +- .../sales_setup/upgrade-1.6.0.4-1.6.0.5.php | 49 + .../sales_setup/upgrade-1.6.0.5-1.6.0.6.php | 47 + .../sales_setup/upgrade-1.6.0.6-1.6.0.7.php | 36 + .../adminhtml/billing/agreement/form.phtml | 2 +- .../billing/agreement/view/form.phtml | 2 +- .../billing/agreement/view/tab/info.phtml | 2 +- .../payment/form/billing/agreement.phtml | 2 +- .../adminhtml/recurring/profile/view.phtml | 2 +- .../recurring/profile/view/info.phtml | 2 +- .../frontend/billing/agreement/view.phtml | 2 +- .../view/frontend/billing/agreements.phtml | 2 +- .../Sales/view/frontend/billing_agreement.xml | 2 +- .../frontend/email/creditmemo/items.phtml | 2 +- .../view/frontend/email/invoice/items.phtml | 2 +- .../Sales/view/frontend/email/items.phtml | 2 +- .../email/items/creditmemo/default.phtml | 2 +- .../email/items/invoice/default.phtml | 2 +- .../frontend/email/items/order/default.phtml | 2 +- .../email/items/shipment/default.phtml | 2 +- .../view/frontend/email/shipment/items.phtml | 2 +- .../view/frontend/email/shipment/track.phtml | 2 +- .../Mage/Sales/view/frontend/guest/form.phtml | 2 +- .../core/Mage/Sales/view/frontend/layout.xml | 2 +- .../Sales/view/frontend/order/comments.phtml | 2 +- .../view/frontend/order/creditmemo.phtml | 2 +- .../frontend/order/creditmemo/items.phtml | 2 +- .../creditmemo/items/renderer/default.phtml | 2 +- .../Sales/view/frontend/order/history.phtml | 2 +- .../Mage/Sales/view/frontend/order/info.phtml | 2 +- .../view/frontend/order/info/buttons.phtml | 2 +- .../Sales/view/frontend/order/invoice.phtml | 2 +- .../view/frontend/order/invoice/items.phtml | 2 +- .../invoice/items/renderer/default.phtml | 2 +- .../Sales/view/frontend/order/items.phtml | 2 +- .../order/items/renderer/default.phtml | 2 +- .../Sales/view/frontend/order/print.phtml | 2 +- .../frontend/order/print/creditmemo.phtml | 2 +- .../view/frontend/order/print/invoice.phtml | 2 +- .../view/frontend/order/print/shipment.phtml | 2 +- .../Sales/view/frontend/order/recent.phtml | 2 +- .../Sales/view/frontend/order/shipment.phtml | 2 +- .../view/frontend/order/shipment/items.phtml | 2 +- .../shipment/items/renderer/default.phtml | 2 +- .../Sales/view/frontend/order/totals.phtml | 6 +- .../view/frontend/order/trackinginfo.phtml | 2 +- .../Mage/Sales/view/frontend/order/view.phtml | 2 +- .../payment/form/billing/agreement.phtml | 2 +- .../Sales/view/frontend/recurring/grid.phtml | 2 +- .../frontend/recurring/profile/view.phtml | 2 +- .../recurring/profile/view/info.phtml | 2 +- .../view/frontend/recurring/profiles.phtml | 2 +- .../Sales/view/frontend/recurring_profile.xml | 2 +- .../Sales/view/frontend/reorder/sidebar.phtml | 2 +- .../view/frontend/widget/guest/form.phtml | 2 +- app/code/core/Mage/SalesRule/Exception.php | 2 +- .../core/Mage/SalesRule/Helper/Coupon.php | 147 + app/code/core/Mage/SalesRule/Helper/Data.php | 2 +- app/code/core/Mage/SalesRule/Model/Coupon.php | 19 +- .../SalesRule/Model/Coupon/Codegenerator.php | 2 +- .../Model/Coupon/CodegeneratorInterface.php | 2 +- .../SalesRule/Model/Coupon/Massgenerator.php | 194 + .../core/Mage/SalesRule/Model/Observer.php | 40 +- .../Mage/SalesRule/Model/Quote/Discount.php | 6 +- .../SalesRule/Model/Quote/Freeshipping.php | 2 +- .../Model/Quote/Nominal/Discount.php | 2 +- .../Mage/SalesRule/Model/Resource/Coupon.php | 69 +- .../Model/Resource/Coupon/Collection.php | 28 +- .../SalesRule/Model/Resource/Coupon/Usage.php | 2 +- .../Model/Resource/Report/Collection.php | 59 +- .../SalesRule/Model/Resource/Report/Rule.php | 31 +- .../Model/Resource/Report/Rule/Createdat.php | 9 +- .../Model/Resource/Report/Rule/Updatedat.php | 2 +- .../Resource/Report/Updatedat/Collection.php | 2 +- .../Mage/SalesRule/Model/Resource/Rule.php | 186 +- .../Model/Resource/Rule/Collection.php | 153 +- .../Model/Resource/Rule/Customer.php | 2 +- .../Resource/Rule/Customer/Collection.php | 2 +- app/code/core/Mage/SalesRule/Model/Rule.php | 336 +- .../Model/Rule/Action/Collection.php | 2 +- .../SalesRule/Model/Rule/Action/Product.php | 2 +- .../Model/Rule/Condition/Address.php | 2 +- .../Model/Rule/Condition/Combine.php | 2 +- .../Model/Rule/Condition/Product.php | 18 +- .../Model/Rule/Condition/Product/Combine.php | 2 +- .../Model/Rule/Condition/Product/Found.php | 12 +- .../Rule/Condition/Product/Subselect.php | 37 +- .../Mage/SalesRule/Model/Rule/Customer.php | 2 +- .../System/Config/Source/Coupon/Format.php | 54 + .../core/Mage/SalesRule/Model/Validator.php | 10 +- .../core/Mage/SalesRule/etc/adminhtml.xml | 16 +- app/code/core/Mage/SalesRule/etc/config.xml | 30 +- app/code/core/Mage/SalesRule/etc/fieldset.xml | 2 +- app/code/core/Mage/SalesRule/etc/system.xml | 95 + .../sql/salesrule_setup/install-1.6.0.0.php | 2 +- .../upgrade-1.6.0.0-1.6.0.1.php | 2 +- .../upgrade-1.6.0.1-1.6.0.2.php | 145 + .../upgrade-1.6.0.2-1.6.0.3.php | 182 + app/code/core/Mage/Sendfriend/Block/Send.php | 2 +- app/code/core/Mage/Sendfriend/Helper/Data.php | 2 +- .../core/Mage/Sendfriend/Model/Observer.php | 2 +- .../Sendfriend/Model/Resource/Sendfriend.php | 2 +- .../Model/Resource/Sendfriend/Collection.php | 2 +- .../Mage/Sendfriend/Model/Resource/Setup.php | 2 +- .../core/Mage/Sendfriend/Model/Sendfriend.php | 2 +- .../controllers/ProductController.php | 2 +- app/code/core/Mage/Sendfriend/etc/config.xml | 2 +- app/code/core/Mage/Sendfriend/etc/system.xml | 2 +- .../sql/sendfriend_setup/install-1.6.0.0.php | 2 +- .../Mage/Sendfriend/view/frontend/layout.xml | 2 +- .../Mage/Sendfriend/view/frontend/send.phtml | 2 +- .../Mage/Shipping/Block/Tracking/Ajax.php | 2 +- .../Mage/Shipping/Block/Tracking/Popup.php | 2 +- app/code/core/Mage/Shipping/Exception.php | 2 +- app/code/core/Mage/Shipping/Helper/Data.php | 2 +- .../Mage/Shipping/Model/Carrier/Abstract.php | 89 +- .../Mage/Shipping/Model/Carrier/Flatrate.php | 2 +- .../Shipping/Model/Carrier/Freeshipping.php | 12 +- .../Mage/Shipping/Model/Carrier/Interface.php | 2 +- .../Mage/Shipping/Model/Carrier/Pickup.php | 2 +- .../Mage/Shipping/Model/Carrier/Tablerate.php | 2 +- app/code/core/Mage/Shipping/Model/Config.php | 2 +- app/code/core/Mage/Shipping/Model/Info.php | 2 +- .../Mage/Shipping/Model/Rate/Abstract.php | 2 +- .../core/Mage/Shipping/Model/Rate/Request.php | 2 +- .../core/Mage/Shipping/Model/Rate/Result.php | 2 +- .../Shipping/Model/Rate/Result/Abstract.php | 2 +- .../Mage/Shipping/Model/Rate/Result/Error.php | 2 +- .../Shipping/Model/Rate/Result/Method.php | 2 +- .../Model/Resource/Carrier/Tablerate.php | 23 +- .../Resource/Carrier/Tablerate/Collection.php | 2 +- .../Mage/Shipping/Model/Shipment/Request.php | 2 +- .../Mage/Shipping/Model/Shipment/Return.php | 2 +- .../core/Mage/Shipping/Model/Shipping.php | 6 +- .../Shipping/Model/Source/HandlingAction.php | 2 +- .../Shipping/Model/Source/HandlingType.php | 2 +- .../Mage/Shipping/Model/Tracking/Result.php | 2 +- .../Model/Tracking/Result/Abstract.php | 2 +- .../Shipping/Model/Tracking/Result/Error.php | 2 +- .../Shipping/Model/Tracking/Result/Status.php | 2 +- .../controllers/TrackingController.php | 2 +- app/code/core/Mage/Shipping/etc/adminhtml.xml | 2 +- app/code/core/Mage/Shipping/etc/config.xml | 2 +- app/code/core/Mage/Shipping/etc/system.xml | 2 +- .../sql/shipping_setup/install-1.6.0.0.php | 2 +- .../Mage/Shipping/view/frontend/layout.xml | 2 +- .../view/frontend/tracking/ajax.phtml | 2 +- .../view/frontend/tracking/popup.phtml | 2 +- app/code/core/Mage/Sitemap/Helper/Data.php | 2 +- app/code/core/Mage/Sitemap/Model/Observer.php | 2 +- .../Model/Resource/Catalog/Category.php | 2 +- .../Model/Resource/Catalog/Product.php | 2 +- .../Mage/Sitemap/Model/Resource/Cms/Page.php | 2 +- .../Mage/Sitemap/Model/Resource/Sitemap.php | 2 +- .../Model/Resource/Sitemap/Collection.php | 2 +- app/code/core/Mage/Sitemap/Model/Sitemap.php | 2 +- app/code/core/Mage/Sitemap/etc/adminhtml.xml | 2 +- app/code/core/Mage/Sitemap/etc/config.xml | 2 +- app/code/core/Mage/Sitemap/etc/system.xml | 2 +- .../sql/sitemap_setup/install-1.6.0.0.php | 2 +- app/code/core/Mage/Tag/Block/All.php | 2 +- .../core/Mage/Tag/Block/Customer/Recent.php | 2 +- .../core/Mage/Tag/Block/Customer/Tags.php | 2 +- .../core/Mage/Tag/Block/Customer/View.php | 2 +- app/code/core/Mage/Tag/Block/Popular.php | 2 +- app/code/core/Mage/Tag/Block/Product/List.php | 2 +- .../core/Mage/Tag/Block/Product/Result.php | 2 +- app/code/core/Mage/Tag/Helper/Data.php | 2 +- app/code/core/Mage/Tag/Model/Api.php | 2 +- app/code/core/Mage/Tag/Model/Api/V2.php | 2 +- .../Tag/Model/Entity/Customer/Collection.php | 2 +- .../core/Mage/Tag/Model/Indexer/Summary.php | 2 +- .../Model/Resource/Customer/Collection.php | 2 +- .../Tag/Model/Resource/Indexer/Summary.php | 10 +- .../Tag/Model/Resource/Popular/Collection.php | 2 +- .../Tag/Model/Resource/Product/Collection.php | 2 +- app/code/core/Mage/Tag/Model/Resource/Tag.php | 4 +- .../Tag/Model/Resource/Tag/Collection.php | 2 +- .../Mage/Tag/Model/Resource/Tag/Relation.php | 6 +- app/code/core/Mage/Tag/Model/Session.php | 2 +- app/code/core/Mage/Tag/Model/Tag.php | 2 +- app/code/core/Mage/Tag/Model/Tag/Relation.php | 2 +- .../Tag/controllers/CustomerController.php | 2 +- .../Mage/Tag/controllers/IndexController.php | 21 +- .../Mage/Tag/controllers/ListController.php | 2 +- .../Tag/controllers/ProductController.php | 2 +- app/code/core/Mage/Tag/etc/adminhtml.xml | 2 +- app/code/core/Mage/Tag/etc/api.xml | 2 +- app/code/core/Mage/Tag/etc/config.xml | 2 +- app/code/core/Mage/Tag/etc/view.xml | 2 +- .../Tag/sql/tag_setup/install-1.6.0.0.php | 2 +- .../core/Mage/Tag/view/frontend/cloud.phtml | 2 +- .../Tag/view/frontend/customer/recent.phtml | 2 +- .../Tag/view/frontend/customer/tags.phtml | 2 +- .../Tag/view/frontend/customer/view.phtml | 2 +- .../core/Mage/Tag/view/frontend/layout.xml | 2 +- .../core/Mage/Tag/view/frontend/list.phtml | 2 +- .../core/Mage/Tag/view/frontend/popular.phtml | 2 +- .../Adminhtml/Frontend/Region/Updater.php | 2 +- .../core/Mage/Tax/Block/Checkout/Discount.php | 2 +- .../Mage/Tax/Block/Checkout/Grandtotal.php | 2 +- .../core/Mage/Tax/Block/Checkout/Shipping.php | 2 +- .../core/Mage/Tax/Block/Checkout/Subtotal.php | 2 +- app/code/core/Mage/Tax/Block/Checkout/Tax.php | 2 +- .../core/Mage/Tax/Block/Sales/Order/Tax.php | 2 +- app/code/core/Mage/Tax/Exception.php | 2 +- app/code/core/Mage/Tax/Helper/Data.php | 2 +- app/code/core/Mage/Tax/Model/Calculation.php | 4 +- .../core/Mage/Tax/Model/Calculation/Rate.php | 2 +- .../Mage/Tax/Model/Calculation/Rate/Title.php | 2 +- .../core/Mage/Tax/Model/Calculation/Rule.php | 2 +- app/code/core/Mage/Tax/Model/Class.php | 2 +- .../Mage/Tax/Model/Class/Source/Customer.php | 2 +- .../Mage/Tax/Model/Class/Source/Product.php | 2 +- app/code/core/Mage/Tax/Model/Config.php | 2 +- .../Mage/Tax/Model/Config/Price/Include.php | 2 +- app/code/core/Mage/Tax/Model/Observer.php | 2 +- .../Mage/Tax/Model/Resource/Calculation.php | 2 +- .../Model/Resource/Calculation/Collection.php | 2 +- .../Tax/Model/Resource/Calculation/Rate.php | 2 +- .../Resource/Calculation/Rate/Collection.php | 2 +- .../Model/Resource/Calculation/Rate/Title.php | 2 +- .../Calculation/Rate/Title/Collection.php | 2 +- .../Tax/Model/Resource/Calculation/Rule.php | 2 +- .../Resource/Calculation/Rule/Collection.php | 2 +- .../core/Mage/Tax/Model/Resource/Class.php | 2 +- .../Tax/Model/Resource/Class/Collection.php | 2 +- .../Tax/Model/Resource/Report/Collection.php | 2 +- .../Mage/Tax/Model/Resource/Report/Tax.php | 2 +- .../Model/Resource/Report/Tax/Createdat.php | 2 +- .../Model/Resource/Report/Tax/Updatedat.php | 2 +- .../Resource/Report/Updatedat/Collection.php | 2 +- .../Tax/Model/Resource/Sales/Order/Tax.php | 2 +- .../Resource/Sales/Order/Tax/Collection.php | 2 +- .../Model/Resource/Sales/Order/Tax/Item.php | 2 +- .../Sales/Order/Tax/Item/Collection.php | 2 +- .../core/Mage/Tax/Model/Resource/Setup.php | 2 +- .../core/Mage/Tax/Model/Sales/Order/Tax.php | 2 +- .../Mage/Tax/Model/Sales/Order/Tax/Item.php | 2 +- .../Mage/Tax/Model/Sales/Pdf/Grandtotal.php | 2 +- .../Mage/Tax/Model/Sales/Pdf/Shipping.php | 2 +- .../Mage/Tax/Model/Sales/Pdf/Subtotal.php | 2 +- .../core/Mage/Tax/Model/Sales/Pdf/Tax.php | 2 +- .../Tax/Model/Sales/Total/Quote/Discount.php | 2 +- .../Sales/Total/Quote/Nominal/Subtotal.php | 2 +- .../Model/Sales/Total/Quote/Nominal/Tax.php | 2 +- .../Tax/Model/Sales/Total/Quote/Shipping.php | 2 +- .../Tax/Model/Sales/Total/Quote/Subtotal.php | 22 +- .../Mage/Tax/Model/Sales/Total/Quote/Tax.php | 12 +- .../Model/System/Config/Source/Algorithm.php | 2 +- .../Tax/Model/System/Config/Source/Apply.php | 2 +- .../Model/System/Config/Source/PriceType.php | 2 +- .../System/Config/Source/Tax/Country.php | 2 +- .../System/Config/Source/Tax/Display/Type.php | 2 +- .../Model/System/Config/Source/Tax/Region.php | 2 +- .../data/tax_setup/data-install-1.6.0.0.php | 2 +- app/code/core/Mage/Tax/etc/adminhtml.xml | 2 +- app/code/core/Mage/Tax/etc/config.xml | 2 +- app/code/core/Mage/Tax/etc/fieldset.xml | 2 +- app/code/core/Mage/Tax/etc/system.xml | 2 +- .../Tax/sql/tax_setup/install-1.6.0.0.php | 2 +- .../sql/tax_setup/upgrade-1.6.0.0-1.6.0.1.php | 2 +- .../sql/tax_setup/upgrade-1.6.0.1-1.6.0.2.php | 2 +- .../sql/tax_setup/upgrade-1.6.0.2-1.6.0.3.php | 2 +- .../Tax/view/frontend/checkout/discount.phtml | 2 +- .../view/frontend/checkout/grandtotal.phtml | 2 +- .../Tax/view/frontend/checkout/shipping.phtml | 2 +- .../Tax/view/frontend/checkout/subtotal.phtml | 2 +- .../Mage/Tax/view/frontend/checkout/tax.phtml | 2 +- .../Mage/Tax/view/frontend/order/tax.phtml | 2 +- .../Usa/Block/Adminhtml/Dhl/Unitofmeasure.php | 82 + app/code/core/Mage/Usa/Helper/Data.php | 2 +- .../Usa/Model/Shipping/Carrier/Abstract.php | 6 +- .../Mage/Usa/Model/Shipping/Carrier/Dhl.php | 19 +- .../Shipping/Carrier/Dhl/International.php | 1646 ++++++ .../Dhl/International/Source/Contenttype.php | 50 + .../International/Source/Method/Abstract.php | 72 + .../Dhl/International/Source/Method/Doc.php | 43 + .../International/Source/Method/Freedoc.php | 50 + .../Source/Method/Freenondoc.php | 50 + .../International/Source/Method/Nondoc.php | 43 + .../Dhl/International/Source/Method/Size.php | 51 + .../Source/Method/Unitofmeasure.php | 51 + .../Model/Shipping/Carrier/Dhl/Label/Pdf.php | 104 + .../Shipping/Carrier/Dhl/Label/Pdf/Page.php | 150 + .../Carrier/Dhl/Label/Pdf/PageBuilder.php | 627 +++ .../Carrier/Dhl/Source/Dutypaymenttype.php | 2 +- .../Carrier/Dhl/Source/Freemethod.php | 2 +- .../Shipping/Carrier/Dhl/Source/Method.php | 2 +- .../Dhl/Source/Protection/Rounding.php | 2 +- .../Carrier/Dhl/Source/Protection/Value.php | 2 +- .../Carrier/Dhl/Source/Shipmenttype.php | 2 +- .../Mage/Usa/Model/Shipping/Carrier/Fedex.php | 46 +- .../Shipping/Carrier/Fedex/Source/Dropoff.php | 2 +- .../Carrier/Fedex/Source/Freemethod.php | 2 +- .../Shipping/Carrier/Fedex/Source/Method.php | 2 +- .../Carrier/Fedex/Source/Packaging.php | 2 +- .../Mage/Usa/Model/Shipping/Carrier/Ups.php | 11 +- .../Shipping/Carrier/Ups/Source/Container.php | 2 +- .../Shipping/Carrier/Ups/Source/DestType.php | 2 +- .../Carrier/Ups/Source/Freemethod.php | 2 +- .../Shipping/Carrier/Ups/Source/Method.php | 2 +- .../Shipping/Carrier/Ups/Source/Mode.php | 2 +- .../Carrier/Ups/Source/OriginShipment.php | 2 +- .../Shipping/Carrier/Ups/Source/Pickup.php | 2 +- .../Shipping/Carrier/Ups/Source/Type.php | 2 +- .../Carrier/Ups/Source/Unitofmeasure.php | 2 +- .../Mage/Usa/Model/Shipping/Carrier/Usps.php | 8 +- .../Carrier/Usps/Source/Container.php | 2 +- .../Carrier/Usps/Source/Freemethod.php | 2 +- .../Carrier/Usps/Source/Machinable.php | 2 +- .../Shipping/Carrier/Usps/Source/Method.php | 2 +- .../Shipping/Carrier/Usps/Source/Size.php | 2 +- app/code/core/Mage/Usa/etc/config.xml | 26 +- .../Usa/etc/dhl/international/countries.xml | 1553 +++++ app/code/core/Mage/Usa/etc/system.xml | 287 +- .../Usa/sql/usa_setup/install-1.6.0.0.php | 2 +- .../sql/usa_setup/upgrade-1.6.0.0-1.6.0.1.php | 2 +- .../core/Mage/Usa/view/adminhtml/dhl/logo.jpg | Bin 0 -> 9166 bytes .../view/adminhtml/dhl/unitofmeasure.phtml | 53 + .../core/Mage/Weee/Block/Element/Weee/Tax.php | 2 +- .../Mage/Weee/Block/Renderer/Weee/Tax.php | 2 +- app/code/core/Mage/Weee/Helper/Data.php | 2 +- .../Weee/Model/Attribute/Backend/Weee/Tax.php | 2 +- .../Mage/Weee/Model/Config/Source/Display.php | 2 +- app/code/core/Mage/Weee/Model/Observer.php | 32 +- .../Resource/Attribute/Backend/Weee/Tax.php | 2 +- .../core/Mage/Weee/Model/Resource/Setup.php | 2 +- .../core/Mage/Weee/Model/Resource/Tax.php | 2 +- app/code/core/Mage/Weee/Model/Tax.php | 25 +- .../Mage/Weee/Model/Total/Creditmemo/Weee.php | 2 +- .../Mage/Weee/Model/Total/Invoice/Weee.php | 2 +- .../Weee/Model/Total/Quote/Nominal/Weee.php | 2 +- .../core/Mage/Weee/Model/Total/Quote/Weee.php | 2 +- app/code/core/Mage/Weee/etc/config.xml | 2 +- app/code/core/Mage/Weee/etc/fieldset.xml | 2 +- app/code/core/Mage/Weee/etc/system.xml | 2 +- .../Weee/sql/weee_setup/install-1.6.0.0.php | 2 +- .../Weee/view/adminhtml/renderer/tax.phtml | 4 +- .../core/Mage/Weee/view/frontend/layout.xml | 2 +- .../Mage/Weee/view/frontend/tax_toggle.js | 2 +- .../Mage/Widget/Block/Adminhtml/Widget.php | 9 +- .../Widget/Block/Adminhtml/Widget/Chooser.php | 29 +- .../Widget/Block/Adminhtml/Widget/Form.php | 2 +- .../Block/Adminhtml/Widget/Instance.php | 2 +- .../Block/Adminhtml/Widget/Instance/Edit.php | 2 +- .../Widget/Instance/Edit/Chooser/Block.php | 9 +- .../Widget/Instance/Edit/Chooser/Layout.php | 2 +- .../Widget/Instance/Edit/Chooser/Template.php | 2 +- .../Adminhtml/Widget/Instance/Edit/Form.php | 2 +- .../Widget/Instance/Edit/Tab/Main.php | 2 +- .../Widget/Instance/Edit/Tab/Main/Layout.php | 2 +- .../Widget/Instance/Edit/Tab/Properties.php | 2 +- .../Widget/Instance/Edit/Tab/Settings.php | 2 +- .../Adminhtml/Widget/Instance/Edit/Tabs.php | 2 +- .../Block/Adminhtml/Widget/Instance/Grid.php | 2 +- .../Widget/Block/Adminhtml/Widget/Options.php | 2 +- app/code/core/Mage/Widget/Block/Interface.php | 2 +- app/code/core/Mage/Widget/Helper/Data.php | 2 +- app/code/core/Mage/Widget/Model/Observer.php | 2 +- .../Mage/Widget/Model/Resource/Widget.php | 2 +- .../Widget/Model/Resource/Widget/Instance.php | 2 +- .../Resource/Widget/Instance/Collection.php | 10 +- .../Mage/Widget/Model/Template/Filter.php | 2 +- app/code/core/Mage/Widget/Model/Widget.php | 2 +- .../core/Mage/Widget/Model/Widget/Config.php | 2 +- .../Mage/Widget/Model/Widget/Instance.php | 4 +- .../Adminhtml/Widget/InstanceController.php | 25 +- .../Adminhtml/WidgetController.php | 2 +- app/code/core/Mage/Widget/etc/adminhtml.xml | 2 +- app/code/core/Mage/Widget/etc/config.xml | 2 +- app/code/core/Mage/Widget/etc/translater.xml | 34 + .../sql/widget_setup/install-1.6.0.0.php | 2 +- .../view/adminhtml/instance/edit/layout.phtml | 52 +- .../Widget/view/adminhtml/instance/js.phtml | 2 +- .../Mage/Widget/view/adminhtml/layout.xml | 2 +- .../core/Mage/Widget/view/frontend/layout.xml | 2 +- .../Mage/Widget/view/frontend/widgets.css | 2 +- .../core/Mage/Wishlist/Block/Abstract.php | 2 +- .../Mage/Wishlist/Block/Customer/Sharing.php | 2 +- .../Mage/Wishlist/Block/Customer/Sidebar.php | 2 +- .../Mage/Wishlist/Block/Customer/Wishlist.php | 2 +- .../Block/Customer/Wishlist/Item/Options.php | 2 +- .../Mage/Wishlist/Block/Item/Configure.php | 2 +- app/code/core/Mage/Wishlist/Block/Links.php | 2 +- .../Mage/Wishlist/Block/Render/Item/Price.php | 2 +- .../Mage/Wishlist/Block/Share/Email/Items.php | 2 +- .../Mage/Wishlist/Block/Share/Email/Rss.php | 2 +- .../Mage/Wishlist/Block/Share/Wishlist.php | 2 +- .../Mage/Wishlist/Controller/Abstract.php | 2 +- app/code/core/Mage/Wishlist/Helper/Data.php | 2 +- app/code/core/Mage/Wishlist/Model/Config.php | 2 +- .../Wishlist/Model/Config/Source/Summary.php | 2 +- app/code/core/Mage/Wishlist/Model/Item.php | 16 +- .../core/Mage/Wishlist/Model/Item/Option.php | 2 +- .../core/Mage/Wishlist/Model/Observer.php | 2 +- .../Mage/Wishlist/Model/Resource/Item.php | 2 +- .../Model/Resource/Item/Collection.php | 2 +- .../Wishlist/Model/Resource/Item/Option.php | 2 +- .../Model/Resource/Item/Option/Collection.php | 2 +- .../Mage/Wishlist/Model/Resource/Wishlist.php | 2 +- .../Model/Resource/Wishlist/Collection.php | 2 +- app/code/core/Mage/Wishlist/Model/Session.php | 2 +- .../core/Mage/Wishlist/Model/Wishlist.php | 2 +- .../Wishlist/controllers/IndexController.php | 6 +- .../Wishlist/controllers/SharedController.php | 2 +- app/code/core/Mage/Wishlist/etc/adminhtml.xml | 2 +- app/code/core/Mage/Wishlist/etc/config.xml | 2 +- app/code/core/Mage/Wishlist/etc/system.xml | 2 +- app/code/core/Mage/Wishlist/etc/view.xml | 2 +- .../sql/wishlist_setup/install-1.6.0.0.php | 2 +- .../Wishlist/view/frontend/email/items.phtml | 2 +- .../Wishlist/view/frontend/email/rss.phtml | 2 +- .../view/frontend/item/configure/addto.phtml | 2 +- .../Mage/Wishlist/view/frontend/layout.xml | 2 +- .../Wishlist/view/frontend/options_list.phtml | 2 +- .../view/frontend/render/item/price.phtml | 2 +- .../render/item/price_msrp_item.phtml | 2 +- .../frontend/render/item/price_msrp_rss.phtml | 2 +- .../Mage/Wishlist/view/frontend/shared.phtml | 2 +- .../Mage/Wishlist/view/frontend/sharing.phtml | 2 +- .../Mage/Wishlist/view/frontend/sidebar.phtml | 2 +- .../Mage/Wishlist/view/frontend/view.phtml | 2 +- .../XmlConnect/Block/Adminhtml/History.php | 2 +- .../Block/Adminhtml/History/Grid.php | 2 +- .../XmlConnect/Block/Adminhtml/Mobile.php | 2 +- .../Block/Adminhtml/Mobile/Edit.php | 2 +- .../Block/Adminhtml/Mobile/Edit/Form.php | 2 +- .../Adminhtml/Mobile/Edit/Submission.php | 2 +- .../Block/Adminhtml/Mobile/Edit/Tab/Cache.php | 2 +- .../Adminhtml/Mobile/Edit/Tab/Content.php | 2 +- .../Adminhtml/Mobile/Edit/Tab/Design.php | 2 +- .../Mobile/Edit/Tab/Design/Accordion.php | 2 +- .../Edit/Tab/Design/Accordion/Images.php | 2 +- .../Mobile/Edit/Tab/Design/Accordion/Tabs.php | 2 +- .../Edit/Tab/Design/Accordion/Themes.php | 2 +- .../Mobile/Edit/Tab/Design/Preview.php | 2 +- .../Mobile/Edit/Tab/Design/Themes.php | 2 +- .../Mobile/Edit/Tab/Flurryanalytics.php | 2 +- .../Adminhtml/Mobile/Edit/Tab/General.php | 2 +- .../Mobile/Edit/Tab/Notification.php | 2 +- .../Adminhtml/Mobile/Edit/Tab/Payment.php | 2 +- .../Adminhtml/Mobile/Edit/Tab/Settings.php | 2 +- .../Adminhtml/Mobile/Edit/Tab/Social.php | 2 +- .../Mobile/Edit/Tab/Submission/History.php | 2 +- .../Block/Adminhtml/Mobile/Edit/Tabs.php | 2 +- .../Adminhtml/Mobile/Form/Element/Addrow.php | 6 +- .../Adminhtml/Mobile/Form/Element/Color.php | 2 +- .../Adminhtml/Mobile/Form/Element/Country.php | 2 +- .../Mobile/Form/Element/Datetime.php | 2 +- .../Adminhtml/Mobile/Form/Element/Font.php | 2 +- .../Adminhtml/Mobile/Form/Element/Image.php | 2 +- .../Adminhtml/Mobile/Form/Element/Page.php | 6 +- .../Adminhtml/Mobile/Form/Element/Tabs.php | 2 +- .../Adminhtml/Mobile/Form/Element/Theme.php | 2 +- .../Block/Adminhtml/Mobile/Grid.php | 2 +- .../Adminhtml/Mobile/Grid/Renderer/Bool.php | 2 +- .../Adminhtml/Mobile/Grid/Renderer/Type.php | 2 +- .../Adminhtml/Mobile/Preview/Content.php | 2 +- .../Adminhtml/Mobile/Preview/Tabitems.php | 2 +- .../Block/Adminhtml/Mobile/Submission.php | 2 +- .../Adminhtml/Mobile/Submission/Form.php | 2 +- .../Renderer/Country/Androidmarket.php | 2 +- .../Submission/Renderer/Country/Istore.php | 2 +- .../Mobile/Submission/Tab/Container.php | 2 +- .../Submission/Tab/Container/Submission.php | 2 +- .../Adminhtml/Mobile/Submission/Tabs.php | 2 +- .../Block/Adminhtml/Mobile/Widget/Form.php | 2 +- .../Mage/XmlConnect/Block/Adminhtml/Queue.php | 2 +- .../XmlConnect/Block/Adminhtml/Queue/Edit.php | 2 +- .../Block/Adminhtml/Queue/Edit/Form.php | 2 +- .../XmlConnect/Block/Adminhtml/Queue/Grid.php | 2 +- .../Adminhtml/Queue/Grid/Renderer/Action.php | 2 +- .../Queue/Grid/Renderer/Application.php | 2 +- .../Adminhtml/Queue/Grid/Renderer/Id.php | 2 +- .../Queue/Grid/Renderer/Msgtitle.php | 2 +- .../Queue/Grid/Renderer/Pushtitle.php | 2 +- .../Adminhtml/Queue/Grid/Renderer/Status.php | 2 +- .../Queue/Grid/Renderer/Template.php | 2 +- .../XmlConnect/Block/Adminhtml/Template.php | 2 +- .../Block/Adminhtml/Template/Edit.php | 2 +- .../Block/Adminhtml/Template/Edit/Form.php | 2 +- .../Block/Adminhtml/Template/Grid.php | 2 +- .../Template/Grid/Renderer/Application.php | 2 +- .../Adminhtml/Template/Grid/Renderer/Name.php | 2 +- .../Block/Adminhtml/Template/Preview.php | 2 +- .../Block/Adminhtml/Template/Preview/Form.php | 2 +- app/code/core/Mage/XmlConnect/Block/Cart.php | 16 +- .../Mage/XmlConnect/Block/Cart/Crosssell.php | 11 +- .../core/Mage/XmlConnect/Block/Cart/Info.php | 2 +- .../XmlConnect/Block/Cart/Item/Renderer.php | 17 +- .../Block/Cart/Item/Renderer/Configurable.php | 2 +- .../Block/Cart/Item/Renderer/Grouped.php | 2 +- .../Block/Cart/Paypal/Mecl/Details.php | 2 +- .../Block/Cart/Paypal/Mecl/Review.php | 2 +- .../Cart/Paypal/Mecl/Shippingmethods.php | 2 +- .../Block/Cart/Paypal/Mep/Totals.php | 2 +- .../Mage/XmlConnect/Block/Cart/Totals.php | 6 +- .../core/Mage/XmlConnect/Block/Catalog.php | 4 +- .../XmlConnect/Block/Catalog/Category.php | 4 +- .../Block/Catalog/Category/Info.php | 4 +- .../Mage/XmlConnect/Block/Catalog/Filters.php | 10 +- .../Mage/XmlConnect/Block/Catalog/Product.php | 11 +- .../Block/Catalog/Product/Attributes.php | 2 +- .../Block/Catalog/Product/Gallery.php | 2 +- .../XmlConnect/Block/Catalog/Product/List.php | 2 +- .../Block/Catalog/Product/Options.php | 6 +- .../Block/Catalog/Product/Options/Bundle.php | 6 +- .../Catalog/Product/Options/Configurable.php | 8 +- .../Catalog/Product/Options/Giftcard.php | 2 +- .../Block/Catalog/Product/Options/Grouped.php | 4 +- .../Block/Catalog/Product/Options/Simple.php | 2 +- .../Block/Catalog/Product/Options/Virtual.php | 2 +- .../Block/Catalog/Product/Price.php | 2 +- .../Block/Catalog/Product/Price/Bundle.php | 18 +- .../Block/Catalog/Product/Price/Default.php | 20 +- .../Block/Catalog/Product/Price/Giftcard.php | 2 +- .../Block/Catalog/Product/Related.php | 2 +- .../Block/Catalog/Product/Review.php | 8 +- .../Block/Catalog/Product/Review/List.php | 2 +- .../Mage/XmlConnect/Block/Catalog/Search.php | 8 +- .../Block/Catalog/Search/Suggest.php | 4 +- .../Block/Checkout/Address/Billing.php | 4 +- .../Block/Checkout/Address/Form.php | 2 +- .../Block/Checkout/Address/Shipping.php | 4 +- .../XmlConnect/Block/Checkout/Agreements.php | 11 +- .../Block/Checkout/Order/Review.php | 2 +- .../Block/Checkout/Order/Review/Info.php | 13 +- .../Checkout/Payment/Method/Authorizenet.php | 2 +- .../Block/Checkout/Payment/Method/Ccsave.php | 2 +- .../Block/Checkout/Payment/Method/Checkmo.php | 2 +- .../Payment/Method/Info/Authorizenet.php | 2 +- .../Checkout/Payment/Method/Info/Ccsave.php | 2 +- .../Checkout/Payment/Method/Info/Checkmo.php | 2 +- .../Checkout/Payment/Method/Info/Free.php | 2 +- .../Payment/Method/Info/Paypal/Abstract.php | 2 +- .../Payment/Method/Info/Paypal/Express.php | 2 +- .../Payment/Method/Info/Paypal/Mecl.php | 2 +- .../Method/Info/Pbridge/Authorizenet.php | 2 +- .../Method/Info/Pbridge/Paypal/Direct.php | 2 +- .../Method/Info/Pbridge/Paypaluk/Direct.php | 2 +- .../Payment/Method/Info/Pbridge/Verisign.php | 2 +- .../Payment/Method/Info/Purchaseorder.php | 2 +- .../Block/Checkout/Payment/Method/List.php | 4 +- .../Checkout/Payment/Method/Paypal/Direct.php | 2 +- .../Payment/Method/Paypal/Payflow.php | 2 +- .../Payment/Method/Pbridge/Abstract.php | 2 +- .../Checkout/Payment/Method/Purchaseorder.php | 2 +- .../Block/Checkout/Pbridge/Result.php | 2 +- .../Checkout/Shipping/Method/Available.php | 8 +- .../core/Mage/XmlConnect/Block/Cms/Page.php | 2 +- .../Mage/XmlConnect/Block/Configuration.php | 2 +- .../Block/Customer/Address/Form.php | 12 +- .../Block/Customer/Address/List.php | 10 +- .../Mage/XmlConnect/Block/Customer/Form.php | 32 +- .../Block/Customer/GiftcardCheck.php | 2 +- .../Block/Customer/Order/Details.php | 2 +- .../Customer/Order/Item/Renderer/Bundle.php | 2 +- .../Customer/Order/Item/Renderer/Default.php | 2 +- .../Order/Item/Renderer/Downloadable.php | 2 +- .../Customer/Order/Item/Renderer/Grouped.php | 2 +- .../XmlConnect/Block/Customer/Order/Items.php | 2 +- .../XmlConnect/Block/Customer/Order/List.php | 4 +- .../Block/Customer/Order/Totals.php | 2 +- .../Block/Customer/Order/Totals/Tax.php | 2 +- .../XmlConnect/Block/Customer/Storecredit.php | 18 +- app/code/core/Mage/XmlConnect/Block/Home.php | 4 +- .../Mage/XmlConnect/Block/Review/Form.php | 4 +- .../core/Mage/XmlConnect/Block/Wishlist.php | 13 +- .../Mage/XmlConnect/Controller/Action.php | 2 +- .../core/Mage/XmlConnect/Helper/Android.php | 2 +- .../Helper/Catalog/Category/Image.php | 2 +- .../Helper/Customer/Form/Renderer.php | 6 +- .../Mage/XmlConnect/Helper/Customer/Order.php | 14 +- app/code/core/Mage/XmlConnect/Helper/Data.php | 61 +- .../core/Mage/XmlConnect/Helper/Image.php | 2 +- app/code/core/Mage/XmlConnect/Helper/Ipad.php | 2 +- .../core/Mage/XmlConnect/Helper/Iphone.php | 2 +- .../core/Mage/XmlConnect/Helper/Theme.php | 2 +- .../System/Config/Backend/Baseurl.php | 2 +- .../Config/Backend/Currency/Default.php | 2 +- .../Mage/XmlConnect/Model/Application.php | 2 +- .../Model/Catalog/Category/Image.php | 2 +- .../Model/Catalog/Category/Media/Config.php | 2 +- .../core/Mage/XmlConnect/Model/ConfigData.php | 2 +- .../core/Mage/XmlConnect/Model/History.php | 2 +- .../core/Mage/XmlConnect/Model/Observer.php | 5 +- .../Model/Payment/Method/Paypal/Config.php | 2 +- .../Model/Payment/Method/Paypal/Mecl.php | 2 +- .../Model/Payment/Method/Paypal/Mep.php | 2 +- .../XmlConnect/Model/Paypal/Mecl/Checkout.php | 2 +- .../XmlConnect/Model/Paypal/Mep/Checkout.php | 2 +- .../XmlConnect/Model/Preview/Abstract.php | 2 +- .../Mage/XmlConnect/Model/Preview/Android.php | 2 +- .../Mage/XmlConnect/Model/Preview/Ipad.php | 2 +- .../Mage/XmlConnect/Model/Preview/Iphone.php | 2 +- app/code/core/Mage/XmlConnect/Model/Queue.php | 2 +- .../XmlConnect/Model/Resource/Application.php | 2 +- .../Model/Resource/Application/Collection.php | 2 +- .../Model/Resource/Cms/Page/Collection.php | 2 +- .../XmlConnect/Model/Resource/ConfigData.php | 2 +- .../Model/Resource/ConfigData/Collection.php | 2 +- .../Model/Resource/Filter/Collection.php | 2 +- .../XmlConnect/Model/Resource/History.php | 2 +- .../Model/Resource/History/Collection.php | 2 +- .../Mage/XmlConnect/Model/Resource/Queue.php | 2 +- .../Model/Resource/Queue/Collection.php | 2 +- .../Mage/XmlConnect/Model/Resource/Setup.php | 2 +- .../XmlConnect/Model/Resource/Template.php | 2 +- .../Model/Resource/Template/Collection.php | 2 +- .../XmlConnect/Model/Simplexml/Element.php | 41 +- .../Mage/XmlConnect/Model/Simplexml/Form.php | 2 +- .../Model/Simplexml/Form/Abstract.php | 4 +- .../Model/Simplexml/Form/Element/Abstract.php | 2 +- .../Model/Simplexml/Form/Element/Checkbox.php | 2 +- .../Simplexml/Form/Element/Collection.php | 2 +- .../Form/Element/CountryListSelect.php | 2 +- .../Model/Simplexml/Form/Element/Date.php | 2 +- .../Model/Simplexml/Form/Element/Email.php | 2 +- .../Model/Simplexml/Form/Element/Fieldset.php | 2 +- .../Model/Simplexml/Form/Element/File.php | 2 +- .../Model/Simplexml/Form/Element/Image.php | 2 +- .../Simplexml/Form/Element/Multiline.php | 2 +- .../Simplexml/Form/Element/Multiselect.php | 2 +- .../Form/Element/Renderer/Interface.php | 2 +- .../Model/Simplexml/Form/Element/Select.php | 2 +- .../Model/Simplexml/Form/Element/Text.php | 2 +- .../Model/Simplexml/Form/Element/Textarea.php | 2 +- .../Simplexml/Form/Element/Validator.php | 2 +- .../Form/Element/Validator/Abstract.php | 31 +- .../Simplexml/Form/Element/Validator/Rule.php | 2 +- app/code/core/Mage/XmlConnect/Model/Tabs.php | 2 +- .../core/Mage/XmlConnect/Model/Template.php | 2 +- app/code/core/Mage/XmlConnect/Model/Theme.php | 2 +- .../Adminhtml/MobileController.php | 40 +- .../XmlConnect/controllers/CartController.php | 2 +- .../controllers/CatalogController.php | 11 +- .../controllers/CheckoutController.php | 8 +- .../XmlConnect/controllers/CmsController.php | 2 +- .../controllers/ConfigurationController.php | 2 +- .../controllers/CustomerController.php | 3 +- .../controllers/IndexController.php | 2 +- .../controllers/Paypal/MeclController.php | 2 +- .../controllers/Paypal/MepController.php | 2 +- .../controllers/PbridgeController.php | 6 +- .../controllers/ReviewController.php | 2 +- .../controllers/WishlistController.php | 2 +- .../core/Mage/XmlConnect/etc/adminhtml.xml | 2 +- app/code/core/Mage/XmlConnect/etc/config.xml | 5 +- app/code/core/Mage/XmlConnect/etc/system.xml | 2 +- .../Mage/XmlConnect/etc/themes/custom.xml | 2 +- .../Mage/XmlConnect/etc/themes/default.xml | 2 +- .../Mage/XmlConnect/etc/themes/funk_leaf.xml | 2 +- .../Mage/XmlConnect/etc/themes/hot_red.xml | 2 +- .../Mage/XmlConnect/etc/themes/sky_blue.xml | 2 +- .../sql/xmlconnect_setup/install-1.6.0.0.php | 2 +- .../XmlConnect/view/adminhtml/css/boxes.css | 2 +- .../view/adminhtml/css/dropdown.css | 2 +- .../view/adminhtml/css/mobile-android.css | 2 +- .../view/adminhtml/css/mobile-catalog.css | 2 +- .../view/adminhtml/css/mobile-home.css | 2 +- .../adminhtml/css/mobile-ipad-catalog.css | 2 +- .../view/adminhtml/css/mobile-ipad-home.css | 2 +- .../XmlConnect/view/adminhtml/css/styles.css | 2 +- .../view/adminhtml/edit/tab/design.phtml | 2 +- .../tab/design/preview/catalog_android.phtml | 2 +- .../tab/design/preview/catalog_hor_ipad.phtml | 2 +- .../tab/design/preview/catalog_ipad.phtml | 2 +- .../tab/design/preview/catalog_iphone.phtml | 2 +- .../tab/design/preview/home_android.phtml | 2 +- .../tab/design/preview/home_hor_ipad.phtml | 2 +- .../edit/tab/design/preview/home_ipad.phtml | 2 +- .../edit/tab/design/preview/home_iphone.phtml | 2 +- .../design/preview/productinfo_iphone.phtml | 2 +- .../design/preview/tab_items_android.phtml | 2 +- .../tab/design/preview/tab_items_ipad.phtml | 2 +- .../tab/design/preview/tab_items_iphone.phtml | 2 +- .../edit/tab/design/preview_android.phtml | 4 +- .../edit/tab/design/preview_ipad.phtml | 6 +- .../edit/tab/design/preview_iphone.phtml | 4 +- .../view/adminhtml/form/element/addrow.phtml | 6 +- .../form/element/app_tabs_android.phtml | 2 +- .../form/element/app_tabs_ipad.phtml | 2 +- .../form/element/app_tabs_iphone.phtml | 2 +- .../form/element/country/androidmarket.phtml | 2 +- .../form/element/country/istore.phtml | 2 +- .../view/adminhtml/form/element/themes.phtml | 14 +- .../images/mobile_preview/mobile-catalog.css | 2 +- .../images/mobile_preview/mobile-home.css | 2 +- .../Mage/XmlConnect/view/adminhtml/layout.xml | 2 +- .../mobile/notification_helper.phtml | 2 +- .../submission/app_icons_preview.phtml | 2 +- .../view/adminhtml/submission/container.phtml | 2 +- .../view/adminhtml/template/preview.phtml | 2 +- .../Mage/XmlConnect/view/frontend/layout.xml | 2 +- .../view/frontend/pbridge/result.phtml | 2 +- app/code/core/Zend/Date.php | 5008 +++++++++++++++++ .../adminhtml/default/default/local.xml | 2 +- .../default/skin/default/below_ie7.css | 2 +- .../default/default/skin/default/boxes.css | 77 +- .../default/default/skin/default/custom.css | 2 +- .../default/default/skin/default/ie7.css | 2 +- .../default/default/skin/default/iestyles.css | 8 +- .../default/skin/default/images/btn_gr_bg.gif | Bin 0 -> 148 bytes .../default/skin/default/images/btn_gr_on.gif | Bin 0 -> 137 bytes .../skin/default/images/btn_gr_over.gif | Bin 0 -> 147 bytes .../skin/default/images/i_question-mark.png | Bin 0 -> 1654 bytes .../default/default/skin/default/menu.css | 2 +- .../default/default/skin/default/print.css | 2 +- .../default/default/skin/default/reset.css | 2 +- .../adminhtml/default/default/theme.xml | 2 +- app/design/frontend/default/default/local.xml | 2 +- .../default/default/skin/blank/css/print.css | 2 +- .../default/skin/blank/css/styles-ie.css | 2 +- .../default/default/skin/blank/css/styles.css | 27 +- .../default/skin/blue/css/styles-ie.css | 2 +- .../default/default/skin/blue/css/styles.css | 28 +- .../default/skin/default/css/print.css | 2 +- .../default/skin/default/css/styles-ie.css | 2 +- .../default/skin/default/css/styles.css | 29 +- app/design/frontend/default/default/theme.xml | 2 +- .../sales/order/items/renderer.phtml | 2 +- .../iphone/Mage_Catalog/layer/view.phtml | 2 +- .../default/iphone/Mage_Catalog/layout.xml | 2 +- .../iphone/Mage_Catalog/navigation/top.phtml | 2 +- .../Mage_Catalog/product/compare/list.phtml | 115 +- .../product/compare/sidebar.phtml | 2 +- .../iphone/Mage_Catalog/product/gallery.phtml | 2 +- .../iphone/Mage_Catalog/product/list.phtml | 2 +- .../Mage_Catalog/product/list/toolbar.phtml | 2 +- .../Mage_Catalog/product/list/upsell.phtml | 2 +- .../iphone/Mage_Catalog/product/price.phtml | 2 +- .../iphone/Mage_Catalog/product/view.phtml | 4 +- .../Mage_Catalog/product/view/addto.phtml | 2 +- .../Mage_Catalog/product/view/addtocart.phtml | 2 +- .../product/view/addtowishlist.phtml | 2 +- .../Mage_Catalog/product/view/media.phtml | 2 +- .../product/view/type/grouped.phtml | 2 +- .../product/view/type/grouped_grid.phtml | 2 +- .../iphone/Mage_CatalogSearch/form.mini.phtml | 2 +- .../iphone/Mage_CatalogSearch/layout.xml | 2 +- .../iphone/Mage_CatalogSearch/result.phtml | 2 +- .../default/iphone/Mage_Checkout/cart.phtml | 2 +- .../Mage_Checkout/cart/item/default.phtml | 2 +- .../Mage_Checkout/cart/no_items_header.phtml | 2 +- .../iphone/Mage_Checkout/cart/sidebar.phtml | 2 +- .../iphone/Mage_Checkout/cartheader.phtml | 2 +- .../default/iphone/Mage_Checkout/layout.xml | 2 +- .../iphone/Mage_Checkout/onepage/login.phtml | 3 +- .../default/iphone/Mage_Cms/layout.xml | 2 +- .../default/iphone/Mage_Contacts/layout.xml | 2 +- .../iphone/Mage_Customer/form/edit.phtml | 2 +- .../Mage_Customer/form/forgotpassword.phtml | 2 +- .../iphone/Mage_Customer/form/login.phtml | 3 +- .../iphone/Mage_Customer/form/register.phtml | 3 +- .../default/iphone/Mage_Customer/layout.xml | 4 +- .../default/iphone/Mage_Page/1column.phtml | 2 +- .../iphone/Mage_Page/html/footer.phtml | 2 +- .../default/iphone/Mage_Page/html/head.phtml | 4 +- .../iphone/Mage_Page/html/header.phtml | 2 +- .../default/iphone/Mage_Page/html/pager.phtml | 2 +- .../default/iphone/Mage_Page/layout.xml | 2 +- .../iphone/Mage_Page/switch/languages.phtml | 2 +- .../iphone/Mage_Page/switch/stores.phtml | 2 +- .../checkout/onepage/login.phtml | 3 +- .../Mage_Persistent/customer/form/login.phtml | 3 +- .../customer/form/register.phtml | 3 +- .../default/iphone/Mage_Persistent/layout.xml | 2 +- .../default/iphone/Mage_Review/layout.xml | 2 +- .../iphone/Mage_Sales/order/history.phtml | 2 +- .../iphone/Mage_Sales/order/items.phtml | 2 +- .../iphone/Mage_Sales/order/recent.phtml | 2 +- .../iphone/Mage_Sales/order/totals.phtml | 2 +- .../default/iphone/Mage_Sendfriend/layout.xml | 2 +- .../default/iphone/Mage_Sendfriend/send.phtml | 2 +- .../iphone/Mage_Shipping/tracking/ajax.phtml | 2 +- .../iphone/Mage_Shipping/tracking/popup.phtml | 2 +- .../default/iphone/Mage_Tag/layout.xml | 2 +- .../default/iphone/Mage_Tag/list.phtml | 2 +- .../default/iphone/Mage_Wishlist/view.phtml | 2 +- app/design/frontend/default/iphone/local.xml | 2 +- .../iphone/skin/default/css/iphone.css | 154 +- .../skin/default/images/i_star_black.png | Bin 0 -> 3540 bytes .../default/iphone/skin/default/js/iphone.js | 39 +- app/design/frontend/default/iphone/theme.xml | 2 +- app/design/frontend/default/iphone/view.xml | 2 +- .../default/modern/Mage_Catalog/layout.xml | 2 +- .../modern/Mage_Catalog/product/list.phtml | 2 +- .../Mage_Catalog/product/list/upsell.phtml | 2 +- .../modern/Mage_Catalog/product/view.phtml | 2 +- .../Mage_Catalog/product/view/media.phtml | 2 +- .../Mage_Catalog/product/view/tabs.phtml | 2 +- .../modern/Mage_CatalogSearch/form.mini.phtml | 2 +- .../modern/Mage_CatalogSearch/layout.xml | 2 +- .../default/modern/Mage_Checkout/cart.phtml | 5 +- .../default/modern/Mage_Checkout/layout.xml | 2 +- .../default/modern/Mage_Contacts/layout.xml | 2 +- .../default/modern/Mage_Customer/layout.xml | 4 +- .../default/modern/Mage_Newsletter/layout.xml | 2 +- .../modern/Mage_Newsletter/subscribe.phtml | 7 +- .../default/modern/Mage_Page/3columns.phtml | 2 +- .../modern/Mage_Page/html/footer.phtml | 2 +- .../modern/Mage_Page/html/header.phtml | 2 +- .../default/modern/Mage_Page/layout.xml | 2 +- .../default/modern/Mage_Payment/layout.xml | 2 +- .../default/modern/Mage_Persistent/layout.xml | 2 +- .../default/modern/Mage_Review/layout.xml | 2 +- .../default/modern/Mage_Rss/layout.xml | 2 +- .../default/modern/Mage_Sales/layout.xml | 2 +- .../default/modern/Mage_Sendfriend/layout.xml | 2 +- .../default/modern/Mage_Tag/layout.xml | 2 +- .../default/modern/Mage_Wishlist/layout.xml | 2 +- .../skin/default/Mage_Catalog/widgets.css | 2 +- .../modern/skin/default/Mage_Cms/widgets.css | 2 +- .../skin/default/Mage_Reports/widgets.css | 2 +- .../default/modern/skin/default/css/print.css | 2 +- .../modern/skin/default/css/styles-ie.css | 2 +- .../modern/skin/default/css/styles.css | 26 +- app/design/frontend/default/modern/theme.xml | 2 +- app/design/frontend/default/modern/view.xml | 2 +- .../default/skin/default/css/boxes.css | 2 +- .../default/skin/default/css/clears.css | 2 +- .../default/skin/default/css/ie7minus.css | 2 +- .../default/skin/default/css/iestyles.css | 2 +- .../default/skin/default/css/reset.css | 2 +- app/design/install/default/default/theme.xml | 2 +- app/etc/config.xml | 2 +- app/etc/local.xml.additional | 2 +- app/etc/local.xml.template | 2 +- app/etc/modules/Mage_All.xml | 2 +- app/etc/modules/Mage_Api.xml | 2 +- app/etc/modules/Mage_Authorizenet.xml | 2 +- app/etc/modules/Mage_Bundle.xml | 2 +- app/etc/modules/Mage_Captcha.xml | 39 + app/etc/modules/Mage_Centinel.xml | 2 +- app/etc/modules/Mage_Connect.xml | 2 +- app/etc/modules/Mage_Downloadable.xml | 2 +- app/etc/modules/Mage_GoogleOptimizer.xml | 2 +- app/etc/modules/Mage_GoogleShopping.xml | 2 +- app/etc/modules/Mage_ImportExport.xml | 2 +- app/etc/modules/Mage_LoadTest.xml | 2 +- app/etc/modules/Mage_Ogone.xml | 2 +- app/etc/modules/Mage_PageCache.xml | 2 +- app/etc/modules/Mage_Persistent.xml | 2 +- app/etc/modules/Mage_Weee.xml | 2 +- app/etc/modules/Mage_Widget.xml | 2 +- app/etc/modules/Mage_XmlConnect.xml | 2 +- app/etc/modules/Phoenix_Moneybookers.xml | 2 +- dev/shell/indexer.php | 2 +- dev/shell/install.php | 2 +- dev/shell/log.php | 2 +- .../etc/integration-tests-config.xml | 2 +- .../integration/etc/local-mysql.xml.dist | 2 +- .../framework/Magento/Test/Bootstrap.php | 38 +- .../framework/Magento/Test/Db/DbAbstract.php | 9 +- .../framework/Magento/Test/Db/Mysql.php | 2 +- .../framework/Magento/Test/Entity.php | 2 +- .../framework/Magento/Test/Helper/Config.php | 2 +- .../framework/Magento/Test/Helper/Factory.php | 2 +- .../framework/Magento/Test/Listener.php | 2 +- .../Test/Listener/Annotation/Config.php | 2 +- .../Test/Listener/Annotation/Fixture.php | 9 +- .../Test/Listener/Annotation/Isolation.php | 8 +- .../Magento/Test/Profiler/OutputBamboo.php | 2 +- .../framework/Magento/Test/Request.php | 2 +- .../framework/Magento/Test/Response.php | 2 +- .../Test/TestCase/ControllerAbstract.php | 2 +- .../Test/TestCase/IntegrityAbstract.php | 2 +- .../Magento/Test/TestSuite/ModuleGroups.php | 2 +- dev/tests/integration/framework/bootstrap.php | 2 +- .../tests/unit/framework/bootstrap.php | 2 +- .../framework/tests/unit/phpunit.xml.dist | 2 +- .../Test/Bootstrap/_files/local-custom.xml | 2 +- .../Test/Bootstrap/_files/local-invalid.xml | 2 +- .../testsuite/Magento/Test/BootstrapTest.php | 18 +- .../testsuite/Magento/Test/Db/MysqlTest.php | 2 +- .../testsuite/Magento/Test/EntityTest.php | 8 +- .../Magento/Test/Helper/FactoryTest.php | 2 +- .../Test/Listener/Annotation/ConfigTest.php | 2 +- .../Test/Listener/Annotation/FixtureTest.php | 11 +- .../Listener/Annotation/IsolationTest.php | 14 +- .../_files/sample_fixture_two_rollback.php | 2 +- .../testsuite/Magento/Test/ListenerTest.php | 2 +- .../Test/Profiler/OutputBambooTest.php | 2 +- .../testsuite/Magento/Test/RequestTest.php | 2 +- .../testsuite/Magento/Test/ResponseTest.php | 2 +- .../Test/TestCase/ControllerAbstractTest.php | 2 +- .../Test/TestSuite/ModuleGroupsTest.php | 7 +- .../_files/ModuleGroups/Mg_Author_Module.php | 2 +- .../_files/ModuleGroups/Mg_Integrity.php | 2 +- .../_files/ModuleGroups/Mg_Mage_Catalog.php | 2 +- .../_files/ModuleGroups/Mg_Mage_Core.php | 2 +- .../ModuleGroups/Mg_Mage_Core_Mage_Eav.php | 2 +- dev/tests/integration/phpunit-ce.xml.dist | 2 +- dev/tests/integration/phpunit.xml.dist | 2 +- .../testsuite/AllRelevantTests.php | 5 +- .../testsuite/Mage/Admin/Model/UserTest.php | 54 + .../testsuite/Mage/Admin/_files/user.php | 50 + .../Report/Sales/Bestsellers/GridTest.php | 2 +- .../Block/Report/Sales/Coupons/GridTest.php | 2 +- .../Block/Report/Sales/Invoiced/GridTest.php | 2 +- .../Block/Report/Sales/Refunded/GridTest.php | 2 +- .../Block/Report/Sales/Sales/GridTest.php | 2 +- .../Block/Report/Sales/Shipping/GridTest.php | 2 +- .../Block/Report/Sales/Tax/GridTest.php | 2 +- .../Mage/Bundle/Model/ProductTest.php | 2 +- .../Catalog/Block/Product/AbstractTest.php | 2 +- .../Block/Product/List/CrosssellTest.php | 2 +- .../Block/Product/List/RelatedTest.php | 2 +- .../Mage/Catalog/Block/Product/ListTest.php | 2 +- .../Mage/Catalog/Block/Product/NewTest.php | 2 +- .../Block/Product/View/OptionsTest.php | 2 +- .../Product/View/Type/ConfigurableTest.php | 2 +- .../Mage/Catalog/Block/Product/ViewTest.php | 2 +- .../Mage/Catalog/Helper/Category/FlatTest.php | 2 +- .../Mage/Catalog/Helper/CategoryTest.php | 2 +- .../Mage/Catalog/Helper/DataTest.php | 2 +- .../Mage/Catalog/Helper/ImageTest.php | 2 +- .../testsuite/Mage/Catalog/Helper/MapTest.php | 2 +- .../Mage/Catalog/Helper/OutputTest.php | 2 +- .../Catalog/Helper/Product/CompareTest.php | 2 +- .../Mage/Catalog/Helper/Product/FlatTest.php | 2 +- .../Mage/Catalog/Helper/Product/UrlTest.php | 2 +- .../Mage/Catalog/Helper/Product/ViewTest.php | 2 +- .../Mage/Catalog/Helper/ProductTest.php | 2 +- .../Mage/Catalog/Model/AbstractTest.php | 2 +- .../Catalog/Model/Category/Api/V2Test.php | 2 +- .../Mage/Catalog/Model/Category/ApiTest.php | 2 +- .../Model/Category/Attribute/ApiTest.php | 2 +- .../Mage/Catalog/Model/CategoryTest.php | 2 +- .../Mage/Catalog/Model/CategoryTreeTest.php | 2 +- .../Model/Convert/Adapter/ProductTest.php | 2 +- .../Mage/Catalog/Model/DesignTest.php | 2 +- .../Model/Layer/Filter/AttributeTest.php | 2 +- .../Model/Layer/Filter/CategoryTest.php | 2 +- .../Model/Layer/Filter/DecimalTest.php | 2 +- .../Catalog/Model/Layer/Filter/ItemTest.php | 2 +- .../Catalog/Model/Layer/Filter/PriceTest.php | 3 +- .../_files/attribute_weight_filterable.php | 2 +- .../Filter/_files/attribute_with_option.php | 2 +- .../Mage/Catalog/Model/LayerTest.php | 2 +- .../Model/Product/Attribute/ApiTest.php | 2 +- .../Product/Attribute/Backend/MediaTest.php | 2 +- .../Product/Attribute/Backend/PriceTest.php | 2 +- .../Attribute/Backend/TierpriceTest.php | 2 +- .../Model/Product/Attribute/Media/ApiTest.php | 2 +- .../Attribute/Tierprice/Api/V2Test.php | 2 +- .../Product/Attribute/Tierprice/ApiTest.php | 2 +- .../Mage/Catalog/Model/Product/ImageTest.php | 2 +- .../Model/Product/Type/AbstractTest.php | 2 +- .../Catalog/Model/Product/Type/ApiTest.php | 2 +- .../Type/Configurable/AttributeTest.php | 2 +- .../Product/Type/Configurable/PriceTest.php | 2 +- .../Model/Product/Type/ConfigurableTest.php | 2 +- .../Catalog/Model/Product/Type/PriceTest.php | 2 +- .../Model/Product/Type/VirtualTest.php | 2 +- .../Mage/Catalog/Model/Product/TypeTest.php | 2 +- .../Mage/Catalog/Model/Product/UrlTest.php | 2 +- .../Catalog/Model/ProductExternalTest.php | 2 +- .../Mage/Catalog/Model/ProductGettersTest.php | 2 +- .../Mage/Catalog/Model/ProductPriceTest.php | 2 +- .../Mage/Catalog/Model/ProductTest.php | 2 +- .../Model/Resource/Eav/AttributeTest.php | 2 +- .../Model/Resource/Product/CollectionTest.php | 2 +- .../Mage/Catalog/Model/Resource/UrlTest.php | 51 + .../Model/Resource/_files/url_rewrites.php | 67 + .../testsuite/Mage/Catalog/Model/UrlTest.php | 2 +- .../testsuite/Mage/Catalog/WidgetTest.php | 2 +- .../Mage/Catalog/_files/categories.php | 2 +- .../Catalog/_files/product_configurable.php | 2 +- .../Mage/Catalog/_files/product_image.php | 2 +- .../Catalog/_files/product_image_rollback.php | 2 +- .../Mage/Catalog/_files/product_simple.php | 2 +- .../Catalog/_files/product_with_image.php | 2 +- .../_files/product_with_image_rollback.php | 2 +- .../Mage/Catalog/_files/products.php | 2 +- .../Catalog/_files/products_crosssell.php | 2 +- .../Mage/Catalog/_files/products_new.php | 2 +- .../Mage/Catalog/_files/products_related.php | 2 +- .../Mage/Catalog/_files/two_products.php | 2 +- .../Mage/Catalog/_files/url_rewrites.php | 2 +- .../Catalog/_files/url_rewrites_invalid.php | 2 +- .../controllers/CategoryControllerTest.php | 2 +- .../controllers/IndexControllerTest.php | 2 +- .../Product/CompareControllerTest.php | 2 +- .../controllers/ProductControllerTest.php | 2 +- .../controllers/Seo/SitemapControllerTest.php | 2 +- .../Catalog/controllers/_files/products.php | 2 +- .../CatalogInventory/Model/Stock/ItemTest.php | 2 +- .../Mage/CatalogSearch/Block/TermTest.php | 2 +- .../Mage/CatalogSearch/Helper/DataTest.php | 2 +- .../Checkout/Block/Cart/Item/RendererTest.php | 2 +- .../testsuite/Mage/Cms/Block/BlockTest.php | 2 +- .../Mage/Cms/Block/Widget/BlockTest.php | 2 +- .../testsuite/Mage/Cms/Helper/PageTest.php | 2 +- .../Mage/Cms/Model/Wysiwyg/ConfigTest.php | 2 +- .../Cms/Model/Wysiwyg/Images/StorageTest.php | 2 +- .../testsuite/Mage/Cms/_files/block.php | 2 +- .../testsuite/Mage/Cms/_files/pages.php | 2 +- .../Cms/controllers/PageControllerTest.php | 2 +- .../Mage/Core/Block/AbstractTest.php | 2 +- .../Mage/Core/Block/TemplateTest.php | 2 +- .../testsuite/Mage/Core/Block/TextTest.php | 2 +- .../default/default/Mage_Core/dummy.phtml | 2 +- .../default/default/Mage_Core/dummy.phtml | 2 +- .../Block/_files/template_test_assign.phtml | 2 +- .../Mage/Core/Controller/RequestHttpTest.php | 2 +- .../Core/Controller/Varien/ActionTest.php | 2 +- .../Mage/Core/Controller/Varien/FrontTest.php | 2 +- .../Controller/Varien/Router/StandardTest.php | 2 +- .../Mage/Core/Helper/AbstractTest.php | 16 +- .../testsuite/Mage/Core/Helper/DataTest.php | 4 +- .../testsuite/Mage/Core/Helper/HttpTest.php | 2 +- .../testsuite/Mage/Core/Helper/JsTest.php | 4 +- .../testsuite/Mage/Core/Helper/StringTest.php | 2 +- .../Mage/Core/Helper/Url/RewriteTest.php | 2 +- .../testsuite/Mage/Core/Helper/UrlTest.php | 2 +- .../Mage/Core/Model/App/AreaTest.php | 2 +- .../testsuite/Mage/Core/Model/AppTest.php | 2 +- .../testsuite/Mage/Core/Model/CacheTest.php | 31 +- .../Mage/Core/Model/Config/BaseTest.php | 2 +- .../Mage/Core/Model/Config/DataTest.php | 2 +- .../Mage/Core/Model/Config/ElementTest.php | 2 +- .../Mage/Core/Model/Config/FieldsetTest.php | 2 +- .../Mage/Core/Model/Config/OptionsTest.php | 4 +- .../Mage/Core/Model/Config/SystemTest.php | 2 +- .../Mage/Core/Model/ConfigFactoryTest.php | 2 +- .../testsuite/Mage/Core/Model/ConfigTest.php | 2 +- .../Model/Design/Backend/ExceptionsTest.php | 2 +- .../Core/Model/Design/PackageMergingTest.php | 4 +- .../Mage/Core/Model/Design/PackageTest.php | 20 +- .../Core/Model/Design/Source/DesignTest.php | 2 +- .../_files/design/frontend/a/d/theme.xml | 2 +- .../_files/design/frontend/b/e/theme.xml | 2 +- .../design/frontend/default/default/theme.xml | 2 +- .../testsuite/Mage/Core/Model/DesignTest.php | 2 +- .../Core/Model/Email/Template/FilterTest.php | 2 +- .../Mage/Core/Model/Email/TemplateTest.php | 2 +- .../Mage/Core/Model/EncryptionTest.php | 2 +- .../Mage/Core/Model/Layout/DataTest.php | 2 +- .../Mage/Core/Model/Layout/ElementTest.php | 2 +- .../Mage/Core/Model/Layout/UpdateTest.php | 4 +- .../testsuite/Mage/Core/Model/LayoutTest.php | 2 +- .../Mage/Core/Model/Resource/CacheTest.php | 2 +- .../Mage/Core/Model/Resource/ConfigTest.php | 2 +- .../Core/Model/Resource/Db/AbstractTest.php | 2 +- .../Core/Model/Resource/Entity/TableTest.php | 2 +- .../Core/Model/Resource/Helper/Mysql4Test.php | 2 +- .../Mage/Core/Model/Resource/IteratorTest.php | 2 +- .../Mage/Core/Model/Resource/LayoutTest.php | 2 +- .../Mage/Core/Model/Resource/SessionTest.php | 2 +- .../Mage/Core/Model/Resource/SetupTest.php | 2 +- .../Model/Resource/Store/CollectionTest.php | 2 +- .../Core/Model/Resource/TransactionTest.php | 2 +- .../Mage/Core/Model/ResourceMysqlTest.php | 2 +- .../Mage/Core/Model/ResourceTest.php | 2 +- .../Model/Session/Abstract/VarienTest.php | 72 + .../testsuite/Mage/Core/Model/StoreTest.php | 2 +- .../Mage/Core/Model/TemplateTest.php | 4 +- .../Mage/Core/Model/Translate/ExprTest.php | 2 +- .../Mage/Core/Model/Translate/InlineTest.php | 3 +- .../Mage/Core/Model/Translate/StringTest.php | 2 +- .../Translate/_files/_translation_data.php | 2 +- .../Mage/Core/Model/TranslateTest.php | 2 +- .../Mage/Core/Model/Url/RewriteTest.php | 2 +- .../testsuite/Mage/Core/Model/UrlTest.php | 2 +- .../Mage/Core/Model/Variable/ConfigTest.php | 2 +- .../Mage/Core/Model/VariableTest.php | 2 +- .../testsuite/Mage/Core/Model/WebsiteTest.php | 2 +- .../Mage/Core/Model/_files/_layout_update.xml | 2 +- .../design/adminhtml/package/test/theme.xml | 2 +- .../design/frontend/default/default/theme.xml | 2 +- .../skin/default/fixture_script_two.js | 2 +- .../Fixture_Module/fixture_script.js | 2 +- .../skin/theme_nested_skin/fixture_script.js | 2 +- .../jquery-no-conflict.js} | 2 +- .../ru_RU/Fixture_Module/fixture_script.js | 2 +- .../locale/ru_RU/fixture_script.js | 2 +- .../frontend/package/custom_theme/theme.xml | 2 +- .../frontend/package/default/fallback.phtml | 2 +- .../package/default/skin/access_violation.php | 2 +- .../skin/default/fixture_script_four.js | 2 +- .../skin/default/fixture_script_three.js | 2 +- .../skin/default/fixture_script_two.js | 2 +- .../package/default/skin/default/scripts.js | 2 +- .../default/skin/theme/css/deep/recursive.css | 2 +- .../default/skin/theme/css/exception.css | 2 +- .../package/default/skin/theme/css/file.css | 2 +- .../package/default/skin/theme/recursive.css | 2 +- .../theme_nested_skin/fixture_script_three.js | 2 +- .../theme_nested_skin/fixture_script_two.js | 2 +- .../test/default/Mage_Catalog/layout.xml | 2 +- .../default/Mage_Catalog/theme_template.phtml | 2 +- .../frontend/test/default/Mage_Cms/layout.xml | 2 +- .../test/default/Mage_Core/layout.xml | 2 +- .../test/default/skin/default/css/styles.css | 2 +- .../test/default/skin/default/js/tabs.js | 2 +- .../design/frontend/test/default/view.xml | 2 +- .../Mage/Core/Model/_files/jslib/calendar.css | 2 +- .../Mage/Core/Model/_files/jslib/calendar.js | 2 +- .../skin/_merged/case_2_merged_css_files.css | 2 +- .../skin/_merged/case_2_merged_js_files.js | 2 +- .../Mage/Core/Model/_files/skin/file.css | 2 +- .../Mage/Core/Model/_files/skin/script.js | 2 +- .../Mage/Core/_files/design_change.php | 2 +- .../Core/_files/design_change_timezone.php | 2 +- .../testsuite/Mage/Core/_files/store.php | 2 +- .../testsuite/Mage/Core/_files/variable.php | 2 +- .../Core/controllers/AjaxControllerTest.php | 2 +- .../Core/controllers/IndexControllerTest.php | 2 +- .../Mage/Cron/Model/ObserverTest.php | 2 +- .../Block/Account/Dashboard/InfoTest.php | 2 +- .../Mage/Customer/Block/Widget/GenderTest.php | 2 +- .../Customer/Model/Address/ConfigTest.php | 2 +- .../Model/Convert/Adapter/CustomerTest.php | 2 +- .../Mage/Customer/Model/FormTest.php | 2 +- .../Mage/Customer/Model/GroupTest.php | 2 +- .../Mage/Customer/_files/address_formats.php | 2 +- .../Entity/Attribute/CollectionTest.php | 2 +- .../GiftMessage/Block/Message/InlineTest.php | 2 +- .../testsuite/Mage/Index/Model/ShellTest.php | 2 +- .../Mage/Log/Model/Resource/ShellTest.php | 2 +- .../testsuite/Mage/Log/Model/ShellTest.php | 2 +- .../Mage/Newsletter/Model/QueueTest.php | 2 +- .../Mage/Newsletter/Model/TemplateTest.php | 2 +- .../Mage/Newsletter/_files/queue.php | 2 +- .../Mage/Newsletter/_files/subscribers.php | 2 +- .../Mage/Newsletter/_files/template.php | 2 +- .../Mage/Page/Block/Html/BreadcrumbsTest.php | 2 +- .../Mage/Page/Block/Html/FooterTest.php | 2 +- .../Mage/Page/Block/Html/HeadTest.php | 4 +- .../ProductAlert/Block/Email/StockTest.php | 2 +- .../testsuite/Mage/Report/WidgetTest.php | 2 +- .../controllers/ProductControllerTest.php | 2 +- .../Mage/Sales/Block/Order/CommentsTest.php | 2 +- .../Sales/Model/Order/Shipment/TrackTest.php | 2 +- .../Mage/Shipping/Helper/DataTest.php | 2 +- .../Mage/Tag/Block/Customer/ViewTest.php | 2 +- .../testsuite/Mage/Tag/Model/TagTest.php | 2 +- .../Widget/Instance/Edit/Tab/MainTest.php | 2 +- .../Widget/Instance/Edit/Tab/SettingsTest.php | 2 +- .../Mage/Widget/Model/Widget/ConfigTest.php | 2 +- .../Mage/Widget/Model/Widget/InstanceTest.php | 2 +- .../Mage/Widget/Model/WidgetTest.php | 2 +- .../Mage/Wishlist/Block/AbstractTest.php | 2 +- .../XmlConnect/Helper/Catalog/ImageTest.php | 2 +- .../Mage/XmlConnect/Helper/DataTest.php | 2 +- .../Mage/XmlConnect/Helper/ImageTest.php | 2 +- .../Model/Catalog/Category/ImageTest.php | 2 +- .../Mage/XmlConnect/Model/TabsTest.php | 2 +- dev/tests/integration/testsuite/MageTest.php | 36 +- .../Phoenix/Moneybookers/Block/FormTest.php | 2 +- .../Moneybookers/Block/PaymentTest.php | 2 +- .../integrity/Mage/Widget/SkinFilesTest.php | 2 +- .../Mage/Widget/TemplateFilesTest.php | 2 +- .../Mage/XmlConnect/SkinFilesTest.php | 2 +- .../modular/Email/TemplateFilesTest.php | 2 +- .../integrity/modular/LayoutFilesTest.php | 2 +- .../integrity/modular/TemplateFilesTest.php | 2 +- .../integrity/modular/ViewConfigFilesTest.php | 2 +- .../integrity/theme/SkinFilesTest.php | 15 +- .../integrity/theme/TemplateFilesTest.php | 2 +- .../integrity/theme/XmlFilesTest.php | 2 +- .../Inspection/CodeSniffer/Command.php | 2 +- .../framework/Inspection/CommandAbstract.php | 20 +- .../Inspection/CopyPasteDetector/Command.php | 22 +- .../Inspection/MessDetector/Command.php | 2 +- dev/tests/static/framework/bootstrap.php | 2 +- .../framework/tests/unit/phpunit.xml.dist | 2 +- .../Inspection/CodeSniffer/CommandTest.php | 17 +- .../CopyPasteDetector/CommandTest.php | 61 +- .../Inspection/MessDetector/CommandTest.php | 33 +- dev/tests/static/phpunit-all.xml.dist | 2 +- dev/tests/static/phpunit.xml.dist | 2 +- .../testsuite/Integrity/ClassesTest.php | 144 +- .../static/testsuite/Legacy/ClassesTest.php | 211 +- .../static/testsuite/Legacy/ConfigTest.php | 4 +- .../testsuite/Legacy/EmailTemplateTest.php | 4 +- .../testsuite/Legacy/FilesystemTest.php | 53 + .../static/testsuite/Legacy/LayoutTest.php | 4 +- .../static/testsuite/Legacy/LicenseTest.php | 2 +- .../testsuite/Legacy/ObsoleteCodeTest.php | 20 +- .../static/testsuite/Legacy/TableTest.php | 17 +- .../Legacy/_files/obsolete_classes.php | 3 +- .../Legacy/_files/obsolete_constants.php | 2 +- .../Legacy/_files/obsolete_methods.php | 2 +- .../Legacy/_files/obsolete_properties.php | 2 +- .../testsuite/Php/Exemplar/CodeMessTest.php | 83 +- .../testsuite/Php/Exemplar/CodeStyleTest.php | 7 +- .../Php/Exemplar/_files/phpmd/data.php | 125 + .../Exemplar/_files/phpmd/output/coupling.xml | 8 - .../phpmd/output/cyclomatic_complexity.xml | 8 - .../_files/phpmd/output/descendant_count.xml | 8 - .../_files/phpmd/output/field_count.xml | 8 - .../_files/phpmd/output/inheritance_depth.xml | 8 - .../_files/phpmd/output/method_count.xml | 8 - .../_files/phpmd/output/method_length.xml | 8 - .../Exemplar/_files/phpmd/output/naming.xml | 35 - .../_files/phpmd/output/parameter_list.xml | 8 - .../phpmd/output/prohibited_statement.xml | 11 - .../output/prohibited_statement_goto.xml | 8 - .../_files/phpmd/output/public_count.xml | 8 - .../Exemplar/_files/phpmd/output/unused.xml | 17 - .../Php/Exemplar/_files/phpmd_ruleset.xsd | 132 + .../static/testsuite/Php/LiveCodeTest.php | 7 +- .../testsuite/Php/_files/phpcs/ruleset.xml | 6 +- .../testsuite/Php/_files/phpmd/ruleset.xml | 8 +- dev/tests/static/testsuite/Util/Classes.php | 154 + .../{FileDataProvider.php => Util/Files.php} | 13 +- dev/tests/unit/framework/bootstrap.php | 2 +- dev/tests/unit/phpunit.xml.dist | 2 +- dev/tests/unit/testsuite/AllTests.php | 2 +- .../Layer/Filter/Price/AlgorithmTest.php | 19 +- .../Filter/Price/_files/_algorithm_data.php | 101 +- dev/tests/unit/testsuite/Magento/AllTests.php | 2 +- .../Magento/Autoload/Ns/TestClass.php | 2 +- .../testsuite/Magento/Autoload/TestClass.php | 2 +- .../Magento/Autoload/TestClassExists.php | 2 +- .../Magento/Autoload/TestClassMapInFile.php | 2 +- .../testsuite/Magento/Autoload/TestMap.php | 2 +- .../unit/testsuite/Magento/AutoloadTest.php | 6 +- .../testsuite/Magento/Config/AllTests.php | 2 +- .../unit/testsuite/Magento/Config/DomTest.php | 4 +- .../testsuite/Magento/Config/ThemeTest.php | 6 +- .../testsuite/Magento/Config/ViewTest.php | 2 +- .../unit/testsuite/Magento/Config/XsdTest.php | 2 +- .../Config/_files/dom/ambiguous_merged.xml | 2 +- .../Config/_files/dom/ambiguous_new_one.xml | 2 +- .../Config/_files/dom/ambiguous_new_two.xml | 2 +- .../Config/_files/dom/ambiguous_one.xml | 2 +- .../Config/_files/dom/ambiguous_two.xml | 2 +- .../Magento/Config/_files/dom/ids.xml | 2 +- .../Magento/Config/_files/dom/ids_merged.xml | 2 +- .../Magento/Config/_files/dom/ids_new.xml | 2 +- .../Magento/Config/_files/dom/no_ids.xml | 2 +- .../Config/_files/dom/no_ids_merged.xml | 2 +- .../Magento/Config/_files/dom/no_ids_new.xml | 2 +- .../_files/packages/default/default/theme.xml | 2 +- .../_files/packages/default/test/theme.xml | 2 +- .../_files/packages/default/test2/theme.xml | 2 +- .../_files/packages/test/default/theme.xml | 2 +- .../Magento/Config/_files/sample.xsd | 2 +- .../Magento/Config/_files/theme_invalid.xml | 2 +- .../Magento/Config/_files/view_invalid.xml | 2 +- .../Magento/Config/_files/view_one.xml | 2 +- .../Magento/Config/_files/view_two.xml | 2 +- .../testsuite/Magento/Convert/AllTests.php | 2 +- .../testsuite/Magento/Convert/ExcelTest.php | 2 +- .../Magento/Crypt/_files/_cipher_info.php | 2 +- .../Magento/Crypt/_files/_crypt_fixtures.php | 2 +- .../unit/testsuite/Magento/CryptTest.php | 2 +- .../testsuite/Magento/Profiler/AllTests.php | 2 +- .../Magento/Profiler/Output/AllTests.php | 2 +- .../Magento/Profiler/Output/CsvfileTest.php | 2 +- .../Magento/Profiler/Output/FirebugTest.php | 2 +- .../Magento/Profiler/Output/HtmlTest.php | 2 +- .../Magento/Profiler/OutputAbstractTest.php | 2 +- .../Magento/Profiler/_files/timers.php | 2 +- .../unit/testsuite/Magento/ProfilerTest.php | 2 +- dev/tests/unit/testsuite/Varien/AllTests.php | 2 +- .../Varien/Data/Collection/DbTest.php | 79 +- .../Varien/Db/Adapter/Pdo/MysqlTest.php | 91 + .../unit/testsuite/Varien/ObjectTest.php | 2 +- dev/tools/batch_tests/batch.php | 2 +- dev/tools/classmap/fs_generator.php | 2 +- dev/tools/classmap/log_generator.php | 2 +- dev/tools/classmap/logger.php | 2 +- dev/tools/migration/factory_names.php | 114 + downloader/Maged/Connect.php | 262 +- downloader/Maged/Connect/Frontend.php | 2 +- downloader/Maged/Controller.php | 107 +- downloader/Maged/Exception.php | 2 +- downloader/Maged/Model.php | 2 +- downloader/Maged/Model/Config.php | 2 +- downloader/Maged/Model/Config/Abstract.php | 2 +- downloader/Maged/Model/Config/Community.php | 2 +- downloader/Maged/Model/Config/Interface.php | 2 +- downloader/Maged/Model/Connect.php | 2 +- downloader/Maged/Model/Connect/Request.php | 2 +- downloader/Maged/Model/Dowloader.php | 2 +- downloader/Maged/Model/Session.php | 2 +- downloader/Maged/View.php | 2 +- downloader/index.php | 2 +- downloader/lib/Mage/Archive.php | 12 +- downloader/lib/Mage/Archive/Abstract.php | 11 +- downloader/lib/Mage/Archive/Bz.php | 40 +- downloader/lib/Mage/Archive/Gz.php | 40 +- downloader/lib/Mage/Archive/Helper/File.php | 274 + .../lib/Mage/Archive/Helper/File/Bz.php | 92 + .../lib/Mage/Archive/Helper/File/Gz.php | 83 + downloader/lib/Mage/Archive/Interface.php | 2 +- downloader/lib/Mage/Archive/Tar.php | 416 +- downloader/lib/Mage/Autoload/Simple.php | 2 +- downloader/lib/Mage/Backup.php | 59 + downloader/lib/Mage/Backup/Abstract.php | 318 ++ downloader/lib/Mage/Backup/Archive/Tar.php | 82 + downloader/lib/Mage/Backup/Db.php | 129 + downloader/lib/Mage/Backup/Exception.php | 36 + .../Backup/Exception/CantLoadSnapshot.php | 36 + .../Backup/Exception/FtpConnectionFailed.php | 36 + .../Backup/Exception/FtpValidationFailed.php | 36 + .../Backup/Exception/NotEnoughFreeSpace.php | 36 + .../Backup/Exception/NotEnoughPermissions.php | 36 + downloader/lib/Mage/Backup/Filesystem.php | 283 + .../lib/Mage/Backup/Filesystem/Helper.php | 137 + .../Backup/Filesystem/Iterator/Filter.php | 77 + .../Backup/Filesystem/Rollback/Abstract.php | 57 + .../Mage/Backup/Filesystem/Rollback/Fs.php | 78 + .../Mage/Backup/Filesystem/Rollback/Ftp.php | 194 + downloader/lib/Mage/Backup/Interface.php | 88 + downloader/lib/Mage/Backup/Media.php | 99 + downloader/lib/Mage/Backup/Nomedia.php | 82 + downloader/lib/Mage/Backup/Snapshot.php | 140 + .../lib/Mage/Connect/Channel/Generator.php | 2 +- .../lib/Mage/Connect/Channel/Parser.php | 2 +- downloader/lib/Mage/Connect/Channel/VO.php | 2 +- downloader/lib/Mage/Connect/Command.php | 2 +- .../lib/Mage/Connect/Command/Channels.php | 2 +- .../Mage/Connect/Command/Channels_Header.php | 2 +- .../lib/Mage/Connect/Command/Config.php | 23 +- .../Mage/Connect/Command/Config_Header.php | 2 +- .../lib/Mage/Connect/Command/Install.php | 157 +- .../Mage/Connect/Command/Install_Header.php | 2 +- .../lib/Mage/Connect/Command/Package.php | 2 +- .../Mage/Connect/Command/Package_Header.php | 2 +- .../lib/Mage/Connect/Command/Registry.php | 2 +- .../Mage/Connect/Command/Registry_Header.php | 2 +- .../lib/Mage/Connect/Command/Remote.php | 2 +- .../Mage/Connect/Command/Remote_Header.php | 2 +- downloader/lib/Mage/Connect/Config.php | 181 +- downloader/lib/Mage/Connect/Converter.php | 2 +- downloader/lib/Mage/Connect/Frontend.php | 2 +- downloader/lib/Mage/Connect/Frontend/CLI.php | 2 +- downloader/lib/Mage/Connect/Ftp.php | 2 +- downloader/lib/Mage/Connect/Loader.php | 9 +- downloader/lib/Mage/Connect/Loader/Ftp.php | 2 +- downloader/lib/Mage/Connect/Package.php | 2 +- .../lib/Mage/Connect/Package/Hotfix.php | 2 +- .../lib/Mage/Connect/Package/Reader.php | 2 +- .../lib/Mage/Connect/Package/Target.php | 2 +- downloader/lib/Mage/Connect/Package/VO.php | 2 +- .../lib/Mage/Connect/Package/Writer.php | 2 +- downloader/lib/Mage/Connect/Packager.php | 85 +- downloader/lib/Mage/Connect/Rest.php | 146 +- downloader/lib/Mage/Connect/Singleconfig.php | 2 +- .../lib/Mage/Connect/Structures/Graph.php | 2 +- .../lib/Mage/Connect/Structures/Node.php | 2 +- downloader/lib/Mage/Connect/Validator.php | 171 +- downloader/lib/Mage/DB/Exception.php | 2 +- downloader/lib/Mage/DB/Mysqli.php | 2 +- downloader/lib/Mage/Exception.php | 6 +- downloader/lib/Mage/HTTP/Client.php | 22 +- downloader/lib/Mage/HTTP/Client/Curl.php | 2 +- downloader/lib/Mage/HTTP/Client/Socket.php | 2 +- downloader/lib/Mage/HTTP/IClient.php | 2 +- downloader/lib/Mage/System/Args.php | 10 +- downloader/lib/Mage/System/Dirs.php | 34 +- downloader/lib/Mage/System/Ftp.php | 509 ++ downloader/lib/Mage/Xml/Generator.php | 2 +- downloader/lib/Mage/Xml/Parser.php | 2 +- downloader/mage.php | 2 +- downloader/skin/boxes.css | 2 +- downloader/skin/ie7boxes.css | 2 +- downloader/skin/ieboxes.css | 2 +- downloader/skin/install/boxes.css | 2 +- downloader/skin/install/clears.css | 2 +- downloader/skin/install/ie7minus.css | 2 +- downloader/skin/install/iestyles.css | 2 +- downloader/skin/install/reset.css | 2 +- downloader/target.xml | 2 +- downloader/template/connect/iframe.phtml | 8 +- downloader/template/connect/packages.phtml | 49 +- .../template/connect/packages_prepare.phtml | 2 +- downloader/template/exception.phtml | 2 +- downloader/template/footer.phtml | 2 +- downloader/template/header.phtml | 2 +- downloader/template/index.phtml | 2 +- downloader/template/install/download.phtml | 24 +- downloader/template/install/footer.phtml | 2 +- downloader/template/install/header.phtml | 2 +- downloader/template/install/writable.phtml | 2 +- downloader/template/login.phtml | 2 +- downloader/template/messages.phtml | 2 +- downloader/template/noroute.phtml | 2 +- downloader/template/settings.phtml | 2 +- downloader/template/writable.phtml | 2 +- index.php | 2 +- index.php.sample | 2 +- lib/Mage/Archive.php | 12 +- lib/Mage/Archive/Abstract.php | 13 +- lib/Mage/Archive/Bz.php | 40 +- lib/Mage/Archive/Gz.php | 40 +- lib/Mage/Archive/Helper/File.php | 274 + lib/Mage/Archive/Helper/File/Bz.php | 92 + lib/Mage/Archive/Helper/File/Gz.php | 83 + lib/Mage/Archive/Interface.php | 2 +- lib/Mage/Archive/Tar.php | 416 +- lib/Mage/Autoload/Simple.php | 2 +- lib/Mage/Backup.php | 59 + lib/Mage/Backup/Abstract.php | 317 ++ lib/Mage/Backup/Archive/Tar.php | 82 + lib/Mage/Backup/Db.php | 129 + lib/Mage/Backup/Exception.php | 36 + .../Backup/Exception/CantLoadSnapshot.php | 36 + .../Backup/Exception/FtpConnectionFailed.php | 36 + .../Backup/Exception/FtpValidationFailed.php | 36 + .../Backup/Exception/NotEnoughFreeSpace.php | 36 + .../Backup/Exception/NotEnoughPermissions.php | 36 + lib/Mage/Backup/Filesystem.php | 284 + lib/Mage/Backup/Filesystem/Helper.php | 137 + .../Backup/Filesystem/Iterator/Filter.php | 77 + .../Backup/Filesystem/Rollback/Abstract.php | 57 + lib/Mage/Backup/Filesystem/Rollback/Fs.php | 78 + lib/Mage/Backup/Filesystem/Rollback/Ftp.php | 198 + lib/Mage/Backup/Interface.php | 88 + lib/Mage/Backup/Media.php | 99 + lib/Mage/Backup/Nomedia.php | 82 + lib/Mage/Backup/Snapshot.php | 140 + lib/Mage/Connect/Channel/Generator.php | 2 +- lib/Mage/Connect/Channel/Parser.php | 2 +- lib/Mage/Connect/Channel/VO.php | 2 +- lib/Mage/Connect/Command.php | 2 +- lib/Mage/Connect/Command/Channels.php | 2 +- lib/Mage/Connect/Command/Channels_Header.php | 2 +- lib/Mage/Connect/Command/Config.php | 2 +- lib/Mage/Connect/Command/Config_Header.php | 2 +- lib/Mage/Connect/Command/Install.php | 2 +- lib/Mage/Connect/Command/Install_Header.php | 2 +- lib/Mage/Connect/Command/Package.php | 2 +- lib/Mage/Connect/Command/Package_Header.php | 2 +- lib/Mage/Connect/Command/Registry.php | 2 +- lib/Mage/Connect/Command/Registry_Header.php | 2 +- lib/Mage/Connect/Command/Remote.php | 2 +- lib/Mage/Connect/Command/Remote_Header.php | 2 +- lib/Mage/Connect/Config.php | 2 +- lib/Mage/Connect/Converter.php | 2 +- lib/Mage/Connect/Frontend.php | 2 +- lib/Mage/Connect/Frontend/CLI.php | 2 +- lib/Mage/Connect/Ftp.php | 464 +- lib/Mage/Connect/Loader.php | 2 +- lib/Mage/Connect/Loader/Ftp.php | 2 +- lib/Mage/Connect/Package.php | 2 +- lib/Mage/Connect/Package/Hotfix.php | 2 +- lib/Mage/Connect/Package/Reader.php | 2 +- lib/Mage/Connect/Package/Target.php | 2 +- lib/Mage/Connect/Package/VO.php | 2 +- lib/Mage/Connect/Package/Writer.php | 2 +- lib/Mage/Connect/Packager.php | 2 +- lib/Mage/Connect/Rest.php | 2 +- lib/Mage/Connect/Singleconfig.php | 2 +- lib/Mage/Connect/Structures/Graph.php | 2 +- lib/Mage/Connect/Structures/Node.php | 2 +- lib/Mage/Connect/Validator.php | 2 +- lib/Mage/DB/Exception.php | 2 +- lib/Mage/DB/Mysqli.php | 2 +- lib/Mage/Exception.php | 5 +- lib/Mage/HTTP/Client.php | 2 +- lib/Mage/HTTP/Client/Curl.php | 2 +- lib/Mage/HTTP/Client/Socket.php | 2 +- lib/Mage/HTTP/IClient.php | 2 +- lib/Mage/System/Args.php | 6 +- lib/Mage/System/Dirs.php | 4 +- lib/Mage/System/Ftp.php | 509 ++ lib/Mage/Xml/Generator.php | 2 +- lib/Mage/Xml/Parser.php | 2 +- lib/Magento/Autoload.php | 8 +- lib/Magento/Config/Dom.php | 6 +- lib/Magento/Config/Theme.php | 6 +- lib/Magento/Config/View.php | 2 +- lib/Magento/Config/XmlAbstract.php | 12 +- lib/Magento/Config/theme.xsd | 2 +- lib/Magento/Config/view.xsd | 2 +- lib/Magento/Convert/Excel.php | 2 +- lib/Magento/Crypt.php | 2 +- lib/Magento/Exception.php | 2 +- lib/Magento/Profiler.php | 2 +- lib/Magento/Profiler/Output/Csvfile.php | 2 +- lib/Magento/Profiler/Output/Firebug.php | 2 +- lib/Magento/Profiler/Output/Html.php | 2 +- lib/Magento/Profiler/OutputAbstract.php | 2 +- lib/Varien/Cache/Backend/Database.php | 2 +- lib/Varien/Cache/Backend/Eaccelerator.php | 2 +- lib/Varien/Cache/Backend/Memcached.php | 2 +- lib/Varien/Cache/Core.php | 2 +- lib/Varien/Convert/Container/Abstract.php | 2 +- lib/Varien/Convert/Exception.php | 2 +- lib/Varien/Convert/Mapper/Column.php | 2 +- lib/Varien/Convert/Mapper/Interface.php | 2 +- lib/Varien/Data/Collection.php | 2 +- lib/Varien/Data/Collection/Db.php | 76 +- lib/Varien/Data/Collection/Filesystem.php | 4 +- lib/Varien/Data/Form.php | 2 +- lib/Varien/Data/Form/Abstract.php | 17 +- lib/Varien/Data/Form/Element/Abstract.php | 2 +- lib/Varien/Data/Form/Element/Button.php | 2 +- lib/Varien/Data/Form/Element/Checkbox.php | 2 +- lib/Varien/Data/Form/Element/Checkboxes.php | 2 +- lib/Varien/Data/Form/Element/Collection.php | 9 +- lib/Varien/Data/Form/Element/Column.php | 2 +- lib/Varien/Data/Form/Element/Date.php | 2 +- lib/Varien/Data/Form/Element/Editor.php | 4 +- lib/Varien/Data/Form/Element/Fieldset.php | 2 +- lib/Varien/Data/Form/Element/File.php | 2 +- lib/Varien/Data/Form/Element/Gallery.php | 2 +- lib/Varien/Data/Form/Element/Hidden.php | 2 +- lib/Varien/Data/Form/Element/Image.php | 2 +- lib/Varien/Data/Form/Element/Imagefile.php | 2 +- lib/Varien/Data/Form/Element/Label.php | 27 +- lib/Varien/Data/Form/Element/Link.php | 2 +- lib/Varien/Data/Form/Element/Multiline.php | 2 +- lib/Varien/Data/Form/Element/Multiselect.php | 2 +- lib/Varien/Data/Form/Element/Note.php | 2 +- lib/Varien/Data/Form/Element/Obscure.php | 2 +- lib/Varien/Data/Form/Element/Password.php | 2 +- lib/Varien/Data/Form/Element/Radio.php | 2 +- lib/Varien/Data/Form/Element/Radios.php | 2 +- .../Data/Form/Element/Renderer/Interface.php | 2 +- lib/Varien/Data/Form/Element/Reset.php | 2 +- lib/Varien/Data/Form/Element/Select.php | 2 +- lib/Varien/Data/Form/Element/Submit.php | 2 +- lib/Varien/Data/Form/Element/Text.php | 2 +- lib/Varien/Data/Form/Element/Textarea.php | 2 +- lib/Varien/Data/Form/Element/Time.php | 2 +- lib/Varien/Data/Form/Filter/Date.php | 2 +- lib/Varien/Data/Form/Filter/Escapehtml.php | 2 +- lib/Varien/Data/Form/Filter/Interface.php | 2 +- lib/Varien/Data/Form/Filter/Striptags.php | 2 +- lib/Varien/Data/Tree.php | 2 +- lib/Varien/Data/Tree/Db.php | 2 +- lib/Varien/Data/Tree/Dbp.php | 2 +- lib/Varien/Data/Tree/Node.php | 2 +- lib/Varien/Data/Tree/Node/Collection.php | 2 +- lib/Varien/Date.php | 2 +- lib/Varien/Db/Adapter/Interface.php | 12 +- lib/Varien/Db/Adapter/Mysqli.php | 2 +- lib/Varien/Db/Adapter/Pdo/Mysql.php | 69 +- lib/Varien/Db/Ddl/Table.php | 2 +- lib/Varien/Db/Exception.php | 2 +- lib/Varien/Db/Helper.php | 2 +- lib/Varien/Db/Select.php | 2 +- lib/Varien/Db/Statement/Parameter.php | 2 +- lib/Varien/Db/Statement/Pdo/Mysql.php | 2 +- lib/Varien/Db/Statement/Sqlsrv.php | 2 +- lib/Varien/Db/Tree.php | 2 +- lib/Varien/Db/Tree/Exception.php | 2 +- lib/Varien/Db/Tree/Node.php | 2 +- lib/Varien/Db/Tree/Node/Exception.php | 2 +- lib/Varien/Db/Tree/NodeSet.php | 2 +- lib/Varien/Db/Tree/NodeSet/Exception.php | 2 +- lib/Varien/Debug.php | 2 +- lib/Varien/Directory/Collection.php | 2 +- lib/Varien/Directory/Factory.php | 2 +- lib/Varien/Directory/IFactory.php | 2 +- lib/Varien/Event.php | 2 +- lib/Varien/Event/Collection.php | 2 +- lib/Varien/Event/Observer.php | 2 +- lib/Varien/Event/Observer/Collection.php | 2 +- lib/Varien/Event/Observer/Cron.php | 2 +- lib/Varien/Event/Observer/Regex.php | 2 +- lib/Varien/Exception.php | 2 +- lib/Varien/File/Csv.php | 2 +- lib/Varien/File/CsvMulty.php | 2 +- lib/Varien/File/Object.php | 2 +- lib/Varien/File/Transfer/Adapter/Http.php | 2 +- lib/Varien/File/Uploader.php | 2 +- lib/Varien/Filter/Array.php | 2 +- lib/Varien/Filter/Array/Grid.php | 2 +- lib/Varien/Filter/Email.php | 2 +- lib/Varien/Filter/Money.php | 2 +- lib/Varien/Filter/Object.php | 2 +- lib/Varien/Filter/Object/Grid.php | 2 +- lib/Varien/Filter/Sprintf.php | 2 +- lib/Varien/Filter/Template.php | 2 +- lib/Varien/Filter/Template/Simple.php | 2 +- .../Filter/Template/Tokenizer/Abstract.php | 2 +- .../Filter/Template/Tokenizer/Parameter.php | 2 +- .../Filter/Template/Tokenizer/Variable.php | 2 +- lib/Varien/Gdata/Gshopping/Content.php | 2 +- lib/Varien/Gdata/Gshopping/Entry.php | 2 +- .../Gdata/Gshopping/Extension/Attribute.php | 2 +- .../Gdata/Gshopping/Extension/Control.php | 2 +- .../Gdata/Gshopping/Extension/Shipping.php | 2 +- lib/Varien/Gdata/Gshopping/Extension/Tax.php | 2 +- lib/Varien/Gdata/Gshopping/HttpException.php | 2 +- lib/Varien/Gdata/Gshopping/ItemQuery.php | 2 +- lib/Varien/Http/Adapter/Curl.php | 81 +- lib/Varien/Http/Client.php | 2 +- lib/Varien/Image.php | 2 +- lib/Varien/Image/Adapter.php | 2 +- lib/Varien/Image/Adapter/Abstract.php | 2 +- lib/Varien/Image/Adapter/Gd2.php | 2 +- lib/Varien/Io/Abstract.php | 2 +- lib/Varien/Io/Exception.php | 2 +- lib/Varien/Io/File.php | 2 +- lib/Varien/Io/Ftp.php | 2 +- lib/Varien/Io/Interface.php | 2 +- lib/Varien/Io/Sftp.php | 2 +- lib/Varien/Object.php | 2 +- lib/Varien/Object/Cache.php | 2 +- lib/Varien/Object/Mapper.php | 2 +- lib/Varien/Pear.php | 2 +- lib/Varien/Pear/Frontend.php | 2 +- lib/Varien/Pear/Package.php | 2 +- lib/Varien/Pear/Registry.php | 2 +- lib/Varien/Simplexml/Config.php | 2 +- .../Simplexml/Config/Cache/Abstract.php | 2 +- lib/Varien/Simplexml/Config/Cache/File.php | 2 +- lib/Varien/Simplexml/Element.php | 2 +- lib/Zend/Captcha/Word.php | 16 +- lib/flex/uploader/uploader.mxml | 2 +- lib/flex/uploader/uploaderSingle.mxml | 2 +- lib/flex/varien/varien/upload/Uploader.as | 2 +- .../varien/varien/upload/UploaderEvent.as | 2 +- .../varien/varien/upload/UploaderSingle.as | 2 +- pub/cron.php | 2 +- pub/errors/404.php | 2 +- pub/errors/503.php | 2 +- pub/errors/default/404.phtml | 2 +- pub/errors/default/503.phtml | 2 +- pub/errors/default/css/styles.css | 2 +- pub/errors/default/page.phtml | 2 +- pub/errors/default/report.phtml | 2 +- pub/errors/design.xml | 2 +- pub/errors/local.xml.sample | 2 +- pub/errors/processor.php | 2 +- pub/errors/report.php | 2 +- pub/get.php | 2 +- pub/index.php | 2 +- pub/js/jquery/jquery-1.7.1.min.js | 4 + pub/js/jquery/jquery-no-conflict.js | 26 + pub/js/lib/dropdown.js | 2 +- pub/js/lib/flex.js | 2 +- pub/js/mage/adminhtml/accordion.js | 2 +- pub/js/mage/adminhtml/backup.js | 189 + pub/js/mage/adminhtml/browser.js | 2 +- pub/js/mage/adminhtml/events.js | 2 +- .../mage/adminhtml/fix-extjs-defer-before.js | 42 + pub/js/mage/adminhtml/fix-extjs-defer.js | 8 +- pub/js/mage/adminhtml/flexuploader.js | 2 +- pub/js/mage/adminhtml/form.js | 17 +- pub/js/mage/adminhtml/grid.js | 24 +- pub/js/mage/adminhtml/image.js | 2 +- pub/js/mage/adminhtml/loader.js | 2 +- pub/js/mage/adminhtml/tabs.js | 2 +- pub/js/mage/adminhtml/tools.js | 2 +- pub/js/mage/adminhtml/uploader.js | 2 +- .../plugins/magentovariable/editor_plugin.js | 2 +- .../plugins/magentowidget/editor_plugin.js | 2 +- .../mage/adminhtml/wysiwyg/tiny_mce/setup.js | 2 +- .../themes/advanced/skins/default/content.css | 2 +- .../themes/advanced/skins/default/dialog.css | 2 +- pub/js/mage/adminhtml/wysiwyg/widget.js | 16 +- pub/js/mage/captcha.js | 87 + pub/js/mage/directpost.js | 2 +- pub/js/mage/translate.js | 2 +- pub/js/mage/translate_inline.css | 6 +- pub/js/mage/translate_inline.js | 20 +- pub/js/prototype/prototype.js | 2 +- pub/js/prototype/validation.js | 47 +- pub/js/varien/configurable.js | 2 +- pub/js/varien/form.js | 5 +- pub/js/varien/js.js | 23 +- pub/js/varien/product.js | 37 +- 5730 files changed, 48625 insertions(+), 15554 deletions(-) create mode 100644 app/code/core/Mage/Adminhtml/Block/Backup/Dialogs.php create mode 100644 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Group.php create mode 100644 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Group/Abstract.php create mode 100644 app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Weight.php create mode 100644 app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Attribute/Group.php create mode 100644 app/code/core/Mage/Adminhtml/Block/Customer/Sales/Order/Address/Form/Renderer/Vat.php create mode 100644 app/code/core/Mage/Adminhtml/Block/Customer/System/Config/Validatevat.php create mode 100644 app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons.php create mode 100644 app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Form.php create mode 100644 app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid.php create mode 100755 app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid/Column/Renderer/Used.php create mode 100644 app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Main/Renderer/Checkbox.php create mode 100644 app/code/core/Mage/Adminhtml/Block/Store/Switcher/Form/Renderer/Fieldset.php create mode 100644 app/code/core/Mage/Adminhtml/Controller/Report/Abstract.php create mode 100644 app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/GroupAutoAssign.php create mode 100644 app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Address/Type.php create mode 100644 app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Group/Multiselect.php create mode 100644 app/code/core/Mage/Adminhtml/controllers/Customer/System/Config/ValidatevatController.php create mode 100644 app/code/core/Mage/Adminhtml/etc/translater.xml create mode 100644 app/code/core/Mage/Adminhtml/view/adminhtml/backup/dialogs.phtml create mode 100644 app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/price/group.phtml create mode 100644 app/code/core/Mage/Adminhtml/view/adminhtml/customer/edit/tab/account/form/renderer/group.phtml create mode 100644 app/code/core/Mage/Adminhtml/view/adminhtml/customer/sales/order/create/address/form/renderer/vat.phtml create mode 100644 app/code/core/Mage/Adminhtml/view/adminhtml/customer/system/config/validatevat.phtml create mode 100644 app/code/core/Mage/Adminhtml/view/adminhtml/promo/salesrulejs.phtml create mode 100644 app/code/core/Mage/Adminhtml/view/adminhtml/store/switcher/form/renderer/fieldset.phtml create mode 100644 app/code/core/Mage/Backup/Model/Config/Backend/Cron.php create mode 100644 app/code/core/Mage/Backup/Model/Config/Source/Type.php create mode 100644 app/code/core/Mage/Backup/Model/Observer.php create mode 100644 app/code/core/Mage/Backup/etc/system.xml create mode 100644 app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-1.6.0.0-1.6.0.0.1.php create mode 100644 app/code/core/Mage/Bundle/sql/bundle_setup/upgrade-1.6.0.0-1.6.0.0.1.php create mode 100755 app/code/core/Mage/Captcha/Block/Captcha.php create mode 100755 app/code/core/Mage/Captcha/Block/Captcha/Zend.php create mode 100755 app/code/core/Mage/Captcha/Helper/Data.php create mode 100755 app/code/core/Mage/Captcha/Model/Config/Font.php create mode 100755 app/code/core/Mage/Captcha/Model/Config/Form/Abstract.php create mode 100755 app/code/core/Mage/Captcha/Model/Config/Form/Backend.php create mode 100755 app/code/core/Mage/Captcha/Model/Config/Form/Frontend.php create mode 100755 app/code/core/Mage/Captcha/Model/Config/Mode.php create mode 100755 app/code/core/Mage/Captcha/Model/Interface.php create mode 100755 app/code/core/Mage/Captcha/Model/Observer.php create mode 100755 app/code/core/Mage/Captcha/Model/Resource/Log.php create mode 100755 app/code/core/Mage/Captcha/Model/Zend.php create mode 100755 app/code/core/Mage/Captcha/controllers/Adminhtml/RefreshController.php create mode 100755 app/code/core/Mage/Captcha/controllers/RefreshController.php create mode 100755 app/code/core/Mage/Captcha/etc/config.xml create mode 100755 app/code/core/Mage/Captcha/etc/system.xml create mode 100644 app/code/core/Mage/Captcha/sql/captcha_setup/install-1.7.0.0.0.php create mode 100644 app/code/core/Mage/Captcha/view/adminhtml/layout.xml create mode 100644 app/code/core/Mage/Captcha/view/adminhtml/reload.png create mode 100644 app/code/core/Mage/Captcha/view/adminhtml/zend.phtml create mode 100644 app/code/core/Mage/Captcha/view/frontend/layout.xml create mode 100644 app/code/core/Mage/Captcha/view/frontend/reload.png create mode 100644 app/code/core/Mage/Captcha/view/frontend/zend.phtml create mode 100644 app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Groupprice.php create mode 100644 app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Groupprice/Abstract.php create mode 100755 app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Groupprice.php create mode 100644 app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Groupprice/Abstract.php create mode 100644 app/code/core/Mage/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.8-1.6.0.0.9.php create mode 100644 app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.6.0.0.8-1.6.0.0.9.php create mode 100644 app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.10-1.6.0.0.11.php create mode 100644 app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.9-1.6.0.0.10.php create mode 100644 app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-1.6.0.0-1.6.0.0.1.php create mode 100644 app/code/core/Mage/CatalogRule/sql/catalogrule_setup/upgrade-1.6.0.1-1.6.0.2.php create mode 100644 app/code/core/Mage/Checkout/Model/Cart/Interface.php create mode 100644 app/code/core/Mage/Checkout/etc/translater.xml create mode 100644 app/code/core/Mage/Core/Helper/Hint.php create mode 100644 app/code/core/Mage/Core/Model/Calculator.php create mode 100644 app/code/core/Mage/Core/etc/translater.xml create mode 100644 app/code/core/Mage/Customer/Model/Attribute/Backend/Data/Boolean.php create mode 100644 app/code/core/Mage/Customer/data/customer_setup/data-upgrade-1.6.1.0-1.6.2.0.php create mode 100644 app/code/core/Mage/Customer/sql/customer_setup/upgrade-1.6.1.0-1.6.2.0.php create mode 100644 app/code/core/Mage/Customer/sql/customer_setup/upgrade-1.6.2.0-1.6.2.0.1.php create mode 100644 app/code/core/Mage/Downloadable/sql/downloadable_setup/mysql4-upgrade-1.6.0.0.1-1.6.0.0.2.php create mode 100644 app/code/core/Mage/Downloadable/sql/downloadable_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php create mode 100644 app/code/core/Mage/Reports/Model/Resource/Helper/Interface.php create mode 100644 app/code/core/Mage/Reports/Model/Resource/Report/Collection/Abstract.php create mode 100644 app/code/core/Mage/Reports/Model/Resource/Report/Product/Viewed.php create mode 100644 app/code/core/Mage/Reports/Model/Resource/Report/Product/Viewed/Collection.php create mode 100644 app/code/core/Mage/Reports/sql/reports_setup/upgrade-1.6.0.0-1.6.0.0.1.php create mode 100644 app/code/core/Mage/Rule/Model/Abstract.php create mode 100644 app/code/core/Mage/Rule/Model/Condition/Product/Abstract.php create mode 100644 app/code/core/Mage/Rule/Model/Resource/Abstract.php create mode 100644 app/code/core/Mage/Rule/Model/Resource/Rule/Collection/Abstract.php create mode 100644 app/code/core/Mage/Sales/Block/Adminhtml/Report/Filter/Form/Coupon.php create mode 100644 app/code/core/Mage/Sales/Model/Resource/Helper/Interface.php create mode 100644 app/code/core/Mage/Sales/data/sales_setup/data-upgrade-1.6.0.4-1.6.0.5.php create mode 100644 app/code/core/Mage/Sales/sql/sales_setup/upgrade-1.6.0.4-1.6.0.5.php create mode 100644 app/code/core/Mage/Sales/sql/sales_setup/upgrade-1.6.0.5-1.6.0.6.php create mode 100644 app/code/core/Mage/Sales/sql/sales_setup/upgrade-1.6.0.6-1.6.0.7.php create mode 100644 app/code/core/Mage/SalesRule/Helper/Coupon.php create mode 100644 app/code/core/Mage/SalesRule/Model/Coupon/Massgenerator.php create mode 100755 app/code/core/Mage/SalesRule/Model/System/Config/Source/Coupon/Format.php create mode 100644 app/code/core/Mage/SalesRule/etc/system.xml create mode 100644 app/code/core/Mage/SalesRule/sql/salesrule_setup/upgrade-1.6.0.1-1.6.0.2.php create mode 100644 app/code/core/Mage/SalesRule/sql/salesrule_setup/upgrade-1.6.0.2-1.6.0.3.php create mode 100644 app/code/core/Mage/Usa/Block/Adminhtml/Dhl/Unitofmeasure.php create mode 100644 app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International.php create mode 100644 app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International/Source/Contenttype.php create mode 100644 app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International/Source/Method/Abstract.php create mode 100644 app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International/Source/Method/Doc.php create mode 100644 app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International/Source/Method/Freedoc.php create mode 100644 app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International/Source/Method/Freenondoc.php create mode 100644 app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International/Source/Method/Nondoc.php create mode 100644 app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International/Source/Method/Size.php create mode 100644 app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/International/Source/Method/Unitofmeasure.php create mode 100644 app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf.php create mode 100644 app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf/Page.php create mode 100644 app/code/core/Mage/Usa/Model/Shipping/Carrier/Dhl/Label/Pdf/PageBuilder.php create mode 100644 app/code/core/Mage/Usa/etc/dhl/international/countries.xml create mode 100644 app/code/core/Mage/Usa/view/adminhtml/dhl/logo.jpg create mode 100644 app/code/core/Mage/Usa/view/adminhtml/dhl/unitofmeasure.phtml create mode 100644 app/code/core/Mage/Widget/etc/translater.xml create mode 100644 app/code/core/Zend/Date.php create mode 100644 app/design/adminhtml/default/default/skin/default/images/btn_gr_bg.gif create mode 100644 app/design/adminhtml/default/default/skin/default/images/btn_gr_on.gif create mode 100644 app/design/adminhtml/default/default/skin/default/images/btn_gr_over.gif create mode 100644 app/design/adminhtml/default/default/skin/default/images/i_question-mark.png create mode 100644 app/design/frontend/default/iphone/skin/default/images/i_star_black.png create mode 100755 app/etc/modules/Mage_Captcha.xml create mode 100644 dev/tests/integration/testsuite/Mage/Admin/Model/UserTest.php create mode 100644 dev/tests/integration/testsuite/Mage/Admin/_files/user.php create mode 100644 dev/tests/integration/testsuite/Mage/Catalog/Model/Resource/UrlTest.php create mode 100644 dev/tests/integration/testsuite/Mage/Catalog/Model/Resource/_files/url_rewrites.php create mode 100644 dev/tests/integration/testsuite/Mage/Core/Model/Session/Abstract/VarienTest.php rename dev/tests/integration/testsuite/Mage/Core/Model/_files/design/frontend/package/custom_theme/skin/theme_nested_skin/{varien/product.js => jquery/jquery-no-conflict.js} (93%) create mode 100644 dev/tests/static/testsuite/Legacy/FilesystemTest.php create mode 100644 dev/tests/static/testsuite/Php/Exemplar/_files/phpmd/data.php delete mode 100644 dev/tests/static/testsuite/Php/Exemplar/_files/phpmd/output/coupling.xml delete mode 100644 dev/tests/static/testsuite/Php/Exemplar/_files/phpmd/output/cyclomatic_complexity.xml delete mode 100644 dev/tests/static/testsuite/Php/Exemplar/_files/phpmd/output/descendant_count.xml delete mode 100644 dev/tests/static/testsuite/Php/Exemplar/_files/phpmd/output/field_count.xml delete mode 100644 dev/tests/static/testsuite/Php/Exemplar/_files/phpmd/output/inheritance_depth.xml delete mode 100644 dev/tests/static/testsuite/Php/Exemplar/_files/phpmd/output/method_count.xml delete mode 100644 dev/tests/static/testsuite/Php/Exemplar/_files/phpmd/output/method_length.xml delete mode 100644 dev/tests/static/testsuite/Php/Exemplar/_files/phpmd/output/naming.xml delete mode 100644 dev/tests/static/testsuite/Php/Exemplar/_files/phpmd/output/parameter_list.xml delete mode 100644 dev/tests/static/testsuite/Php/Exemplar/_files/phpmd/output/prohibited_statement.xml delete mode 100644 dev/tests/static/testsuite/Php/Exemplar/_files/phpmd/output/prohibited_statement_goto.xml delete mode 100644 dev/tests/static/testsuite/Php/Exemplar/_files/phpmd/output/public_count.xml delete mode 100644 dev/tests/static/testsuite/Php/Exemplar/_files/phpmd/output/unused.xml create mode 100644 dev/tests/static/testsuite/Php/Exemplar/_files/phpmd_ruleset.xsd create mode 100644 dev/tests/static/testsuite/Util/Classes.php rename dev/tests/static/testsuite/{FileDataProvider.php => Util/Files.php} (97%) rename dev/tests/{integration => unit}/testsuite/Mage/Catalog/Model/Layer/Filter/Price/AlgorithmTest.php (76%) rename dev/tests/{integration => unit}/testsuite/Mage/Catalog/Model/Layer/Filter/Price/_files/_algorithm_data.php (74%) create mode 100644 dev/tests/unit/testsuite/Varien/Db/Adapter/Pdo/MysqlTest.php create mode 100644 dev/tools/migration/factory_names.php create mode 100755 downloader/lib/Mage/Archive/Helper/File.php create mode 100755 downloader/lib/Mage/Archive/Helper/File/Bz.php create mode 100755 downloader/lib/Mage/Archive/Helper/File/Gz.php create mode 100755 downloader/lib/Mage/Backup.php create mode 100755 downloader/lib/Mage/Backup/Abstract.php create mode 100644 downloader/lib/Mage/Backup/Archive/Tar.php create mode 100755 downloader/lib/Mage/Backup/Db.php create mode 100755 downloader/lib/Mage/Backup/Exception.php create mode 100755 downloader/lib/Mage/Backup/Exception/CantLoadSnapshot.php create mode 100755 downloader/lib/Mage/Backup/Exception/FtpConnectionFailed.php create mode 100755 downloader/lib/Mage/Backup/Exception/FtpValidationFailed.php create mode 100755 downloader/lib/Mage/Backup/Exception/NotEnoughFreeSpace.php create mode 100755 downloader/lib/Mage/Backup/Exception/NotEnoughPermissions.php create mode 100755 downloader/lib/Mage/Backup/Filesystem.php create mode 100755 downloader/lib/Mage/Backup/Filesystem/Helper.php create mode 100755 downloader/lib/Mage/Backup/Filesystem/Iterator/Filter.php create mode 100755 downloader/lib/Mage/Backup/Filesystem/Rollback/Abstract.php create mode 100755 downloader/lib/Mage/Backup/Filesystem/Rollback/Fs.php create mode 100755 downloader/lib/Mage/Backup/Filesystem/Rollback/Ftp.php create mode 100755 downloader/lib/Mage/Backup/Interface.php create mode 100644 downloader/lib/Mage/Backup/Media.php create mode 100755 downloader/lib/Mage/Backup/Nomedia.php create mode 100755 downloader/lib/Mage/Backup/Snapshot.php create mode 100755 downloader/lib/Mage/System/Ftp.php create mode 100644 lib/Mage/Archive/Helper/File.php create mode 100644 lib/Mage/Archive/Helper/File/Bz.php create mode 100644 lib/Mage/Archive/Helper/File/Gz.php create mode 100644 lib/Mage/Backup.php create mode 100644 lib/Mage/Backup/Abstract.php create mode 100644 lib/Mage/Backup/Archive/Tar.php create mode 100644 lib/Mage/Backup/Db.php create mode 100644 lib/Mage/Backup/Exception.php create mode 100644 lib/Mage/Backup/Exception/CantLoadSnapshot.php create mode 100644 lib/Mage/Backup/Exception/FtpConnectionFailed.php create mode 100644 lib/Mage/Backup/Exception/FtpValidationFailed.php create mode 100644 lib/Mage/Backup/Exception/NotEnoughFreeSpace.php create mode 100644 lib/Mage/Backup/Exception/NotEnoughPermissions.php create mode 100644 lib/Mage/Backup/Filesystem.php create mode 100644 lib/Mage/Backup/Filesystem/Helper.php create mode 100644 lib/Mage/Backup/Filesystem/Iterator/Filter.php create mode 100644 lib/Mage/Backup/Filesystem/Rollback/Abstract.php create mode 100644 lib/Mage/Backup/Filesystem/Rollback/Fs.php create mode 100644 lib/Mage/Backup/Filesystem/Rollback/Ftp.php create mode 100644 lib/Mage/Backup/Interface.php create mode 100644 lib/Mage/Backup/Media.php create mode 100644 lib/Mage/Backup/Nomedia.php create mode 100644 lib/Mage/Backup/Snapshot.php create mode 100644 lib/Mage/System/Ftp.php create mode 100644 pub/js/jquery/jquery-1.7.1.min.js create mode 100644 pub/js/jquery/jquery-no-conflict.js create mode 100644 pub/js/mage/adminhtml/backup.js create mode 100644 pub/js/mage/adminhtml/fix-extjs-defer-before.js create mode 100644 pub/js/mage/captcha.js diff --git a/.gitignore b/.gitignore index 813e4da6fb237..181608b1714cd 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,6 @@ /app/etc/local.xml /app/etc/local.xml.* /app/etc/modules/XEnterprise_Enabler.xml -/app/locale/en_US_org /downloader/.cache /downloader/cache.cfg /downloader/connect.cfg diff --git a/app/Mage.php b/app/Mage.php index 2c15fe09506ec..60df8c62a1405 100644 --- a/app/Mage.php +++ b/app/Mage.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Core - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -397,7 +397,7 @@ public static function dispatchEvent($name, array $data = array()) * * @link Mage_Core_Model_Config::getModelInstance * @param string $modelClass - * @param array $arguments + * @param array|object $arguments * @return Mage_Core_Model_Abstract */ public static function getModel($modelClass = '', $arguments = array()) @@ -497,7 +497,7 @@ public static function helper($name) } /** - * Retreive resource helper object + * Retrieve resource helper object * * @param string $moduleName * @return Mage_Core_Model_Resource_Helper_Abstract @@ -555,7 +555,8 @@ public static function app($code = '', $type = 'store', $options = array()) self::$_app = new Mage_Core_Model_App(); self::setRoot(); self::$_events = new Varien_Event_Collection(); - self::$_config = new Mage_Core_Model_Config($options); + self::setIsInstalled($options); + self::setConfigModel($options); Magento_Profiler::start('self::app::init'); self::$_app->init($code, $type, $options); @@ -577,7 +578,8 @@ public static function init($code = '', $type = 'store', $options = array(), $mo try { self::setRoot(); self::$_app = new Mage_Core_Model_App(); - self::$_config = new Mage_Core_Model_Config(); + self::setIsInstalled($options); + self::setConfigModel($options); if (!empty($modules)) { self::$_app->initSpecified($code, $type, $options, $modules); @@ -616,7 +618,8 @@ public static function run($code = '', $type = 'store', $options = array()) self::$_app->setResponse($options['response']); } self::$_events = new Varien_Event_Collection(); - self::$_config = new Mage_Core_Model_Config($options); + self::setIsInstalled($options); + self::setConfigModel($options); self::$_app->run(array( 'scope_code' => $code, 'scope_type' => $type, @@ -647,6 +650,40 @@ public static function run($code = '', $type = 'store', $options = array()) } } + /** + * Set application isInstalled flag based on given options + * + * @param array $options + */ + public static function setIsInstalled($options = array()) + { + if (isset($options['is_installed']) && $options['is_installed']) { + self::$_isInstalled = true; + } + } + + /** + * Set application Config model + * + * @param array $options + */ + public static function setConfigModel($options = array()) + { + if (isset($options['config_model']) && Magento_Autoload::getInstance()->classExists($options['config_model'])) { + $alternativeConfigModelName = $options['config_model']; + unset($options['config_model']); + $alternativeConfigModel = new $alternativeConfigModelName($options); + } else { + $alternativeConfigModel = null; + } + + if (!is_null($alternativeConfigModel) && ($alternativeConfigModel instanceof Mage_Core_Model_Config)) { + self::$_config = $alternativeConfigModel; + } else { + self::$_config = new Mage_Core_Model_Config($options); + } + } + /** * Retrieve application installation flag * diff --git a/app/bootstrap.php b/app/bootstrap.php index cb2098ccc96a0..5f431e8380777 100644 --- a/app/bootstrap.php +++ b/app/bootstrap.php @@ -19,7 +19,7 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Magento - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/community/Phoenix/Moneybookers/Block/Form.php b/app/code/community/Phoenix/Moneybookers/Block/Form.php index 78940d79cece5..e47da3411e118 100644 --- a/app/code/community/Phoenix/Moneybookers/Block/Form.php +++ b/app/code/community/Phoenix/Moneybookers/Block/Form.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Block_Form extends Mage_Payment_Block_Form diff --git a/app/code/community/Phoenix/Moneybookers/Block/Info.php b/app/code/community/Phoenix/Moneybookers/Block/Info.php index 61ed815305cdd..d418a6828c0c4 100644 --- a/app/code/community/Phoenix/Moneybookers/Block/Info.php +++ b/app/code/community/Phoenix/Moneybookers/Block/Info.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Block_Info extends Mage_Payment_Block_Info diff --git a/app/code/community/Phoenix/Moneybookers/Block/Jsinit.php b/app/code/community/Phoenix/Moneybookers/Block/Jsinit.php index fb0d5b316eb10..b408034982273 100644 --- a/app/code/community/Phoenix/Moneybookers/Block/Jsinit.php +++ b/app/code/community/Phoenix/Moneybookers/Block/Jsinit.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Block_Jsinit extends Mage_Adminhtml_Block_Template diff --git a/app/code/community/Phoenix/Moneybookers/Block/Payment.php b/app/code/community/Phoenix/Moneybookers/Block/Payment.php index 48bb8b9f17f1b..870db6ad7f0f1 100644 --- a/app/code/community/Phoenix/Moneybookers/Block/Payment.php +++ b/app/code/community/Phoenix/Moneybookers/Block/Payment.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Block_Payment extends Mage_Core_Block_Template diff --git a/app/code/community/Phoenix/Moneybookers/Block/Placeform.php b/app/code/community/Phoenix/Moneybookers/Block/Placeform.php index 025fe292bcb46..6d02bbad043a6 100644 --- a/app/code/community/Phoenix/Moneybookers/Block/Placeform.php +++ b/app/code/community/Phoenix/Moneybookers/Block/Placeform.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Block_Placeform extends Mage_Core_Block_Template diff --git a/app/code/community/Phoenix/Moneybookers/Block/Redirect.php b/app/code/community/Phoenix/Moneybookers/Block/Redirect.php index 362da4b589010..418f6d7114047 100644 --- a/app/code/community/Phoenix/Moneybookers/Block/Redirect.php +++ b/app/code/community/Phoenix/Moneybookers/Block/Redirect.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Block_Redirect extends Mage_Core_Block_Template diff --git a/app/code/community/Phoenix/Moneybookers/Helper/Data.php b/app/code/community/Phoenix/Moneybookers/Helper/Data.php index 83be78bf166a0..75fcb1d3ce9ba 100644 --- a/app/code/community/Phoenix/Moneybookers/Helper/Data.php +++ b/app/code/community/Phoenix/Moneybookers/Helper/Data.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Helper_Data extends Mage_Payment_Helper_Data diff --git a/app/code/community/Phoenix/Moneybookers/Model/Abstract.php b/app/code/community/Phoenix/Moneybookers/Model/Abstract.php index 74c8fcded236b..80f4eff14c341 100644 --- a/app/code/community/Phoenix/Moneybookers/Model/Abstract.php +++ b/app/code/community/Phoenix/Moneybookers/Model/Abstract.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ abstract class Phoenix_Moneybookers_Model_Abstract extends Mage_Payment_Model_Method_Abstract diff --git a/app/code/community/Phoenix/Moneybookers/Model/Acc.php b/app/code/community/Phoenix/Moneybookers/Model/Acc.php index 2be5714cdd40a..22a2df45016ae 100644 --- a/app/code/community/Phoenix/Moneybookers/Model/Acc.php +++ b/app/code/community/Phoenix/Moneybookers/Model/Acc.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Model_Acc extends Phoenix_Moneybookers_Model_Abstract diff --git a/app/code/community/Phoenix/Moneybookers/Model/Csi.php b/app/code/community/Phoenix/Moneybookers/Model/Csi.php index c6bdd49779468..4b19d99d23e92 100644 --- a/app/code/community/Phoenix/Moneybookers/Model/Csi.php +++ b/app/code/community/Phoenix/Moneybookers/Model/Csi.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Model_Csi extends Phoenix_Moneybookers_Model_Abstract diff --git a/app/code/community/Phoenix/Moneybookers/Model/Did.php b/app/code/community/Phoenix/Moneybookers/Model/Did.php index f0f1c7554ff85..842b6b26015b3 100644 --- a/app/code/community/Phoenix/Moneybookers/Model/Did.php +++ b/app/code/community/Phoenix/Moneybookers/Model/Did.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Model_Did extends Phoenix_Moneybookers_Model_Abstract diff --git a/app/code/community/Phoenix/Moneybookers/Model/Dnk.php b/app/code/community/Phoenix/Moneybookers/Model/Dnk.php index 9caee9881d96e..7e0a130b64bef 100644 --- a/app/code/community/Phoenix/Moneybookers/Model/Dnk.php +++ b/app/code/community/Phoenix/Moneybookers/Model/Dnk.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Model_Dnk extends Phoenix_Moneybookers_Model_Abstract diff --git a/app/code/community/Phoenix/Moneybookers/Model/Ebt.php b/app/code/community/Phoenix/Moneybookers/Model/Ebt.php index f04d5b93fb51b..26ef8296aad0f 100644 --- a/app/code/community/Phoenix/Moneybookers/Model/Ebt.php +++ b/app/code/community/Phoenix/Moneybookers/Model/Ebt.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Model_Ebt extends Phoenix_Moneybookers_Model_Abstract diff --git a/app/code/community/Phoenix/Moneybookers/Model/Ent.php b/app/code/community/Phoenix/Moneybookers/Model/Ent.php index f57f433d81cc3..051378fdadaa9 100644 --- a/app/code/community/Phoenix/Moneybookers/Model/Ent.php +++ b/app/code/community/Phoenix/Moneybookers/Model/Ent.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Model_Ent extends Phoenix_Moneybookers_Model_Abstract diff --git a/app/code/community/Phoenix/Moneybookers/Model/Event.php b/app/code/community/Phoenix/Moneybookers/Model/Event.php index 32c144b1e2625..ad043de07b2f9 100644 --- a/app/code/community/Phoenix/Moneybookers/Model/Event.php +++ b/app/code/community/Phoenix/Moneybookers/Model/Event.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/community/Phoenix/Moneybookers/Model/Gcb.php b/app/code/community/Phoenix/Moneybookers/Model/Gcb.php index 62b60426ce485..3b46d2b686ac6 100644 --- a/app/code/community/Phoenix/Moneybookers/Model/Gcb.php +++ b/app/code/community/Phoenix/Moneybookers/Model/Gcb.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Model_Gcb extends Phoenix_Moneybookers_Model_Abstract diff --git a/app/code/community/Phoenix/Moneybookers/Model/Gir.php b/app/code/community/Phoenix/Moneybookers/Model/Gir.php index af91eb7a10410..5617cdff9036c 100644 --- a/app/code/community/Phoenix/Moneybookers/Model/Gir.php +++ b/app/code/community/Phoenix/Moneybookers/Model/Gir.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Model_Gir extends Phoenix_Moneybookers_Model_Abstract diff --git a/app/code/community/Phoenix/Moneybookers/Model/Idl.php b/app/code/community/Phoenix/Moneybookers/Model/Idl.php index 36fc568d9aacc..c8246a3a10450 100644 --- a/app/code/community/Phoenix/Moneybookers/Model/Idl.php +++ b/app/code/community/Phoenix/Moneybookers/Model/Idl.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Model_Idl extends Phoenix_Moneybookers_Model_Abstract diff --git a/app/code/community/Phoenix/Moneybookers/Model/Lsr.php b/app/code/community/Phoenix/Moneybookers/Model/Lsr.php index f9ea17b4c7942..e134116d4e157 100644 --- a/app/code/community/Phoenix/Moneybookers/Model/Lsr.php +++ b/app/code/community/Phoenix/Moneybookers/Model/Lsr.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Model_Lsr extends Phoenix_Moneybookers_Model_Abstract diff --git a/app/code/community/Phoenix/Moneybookers/Model/Mae.php b/app/code/community/Phoenix/Moneybookers/Model/Mae.php index 37c6780408bf6..1f45ad5c92512 100644 --- a/app/code/community/Phoenix/Moneybookers/Model/Mae.php +++ b/app/code/community/Phoenix/Moneybookers/Model/Mae.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Model_Mae extends Phoenix_Moneybookers_Model_Abstract diff --git a/app/code/community/Phoenix/Moneybookers/Model/Npy.php b/app/code/community/Phoenix/Moneybookers/Model/Npy.php index b0351157b27c3..b975c5f2fb83f 100644 --- a/app/code/community/Phoenix/Moneybookers/Model/Npy.php +++ b/app/code/community/Phoenix/Moneybookers/Model/Npy.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Model_Npy extends Phoenix_Moneybookers_Model_Abstract diff --git a/app/code/community/Phoenix/Moneybookers/Model/Obt.php b/app/code/community/Phoenix/Moneybookers/Model/Obt.php index a236c4eb7e133..90226f2a903b5 100644 --- a/app/code/community/Phoenix/Moneybookers/Model/Obt.php +++ b/app/code/community/Phoenix/Moneybookers/Model/Obt.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Model_Obt extends Phoenix_Moneybookers_Model_Abstract diff --git a/app/code/community/Phoenix/Moneybookers/Model/Pli.php b/app/code/community/Phoenix/Moneybookers/Model/Pli.php index 4809302e76bed..31381dd9d891e 100644 --- a/app/code/community/Phoenix/Moneybookers/Model/Pli.php +++ b/app/code/community/Phoenix/Moneybookers/Model/Pli.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Model_Pli extends Phoenix_Moneybookers_Model_Abstract diff --git a/app/code/community/Phoenix/Moneybookers/Model/Psp.php b/app/code/community/Phoenix/Moneybookers/Model/Psp.php index 3ebb011f5bb70..e7e502dbebfdc 100644 --- a/app/code/community/Phoenix/Moneybookers/Model/Psp.php +++ b/app/code/community/Phoenix/Moneybookers/Model/Psp.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Model_Psp extends Phoenix_Moneybookers_Model_Abstract diff --git a/app/code/community/Phoenix/Moneybookers/Model/Pwy.php b/app/code/community/Phoenix/Moneybookers/Model/Pwy.php index f70fe7b809074..457421c779a51 100644 --- a/app/code/community/Phoenix/Moneybookers/Model/Pwy.php +++ b/app/code/community/Phoenix/Moneybookers/Model/Pwy.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Model_Pwy extends Phoenix_Moneybookers_Model_Abstract diff --git a/app/code/community/Phoenix/Moneybookers/Model/Sft.php b/app/code/community/Phoenix/Moneybookers/Model/Sft.php index c8600a6029572..c0d204059555a 100644 --- a/app/code/community/Phoenix/Moneybookers/Model/Sft.php +++ b/app/code/community/Phoenix/Moneybookers/Model/Sft.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Model_Sft extends Phoenix_Moneybookers_Model_Abstract diff --git a/app/code/community/Phoenix/Moneybookers/Model/So2.php b/app/code/community/Phoenix/Moneybookers/Model/So2.php index 589c2ed3b0605..dc687e6d98705 100644 --- a/app/code/community/Phoenix/Moneybookers/Model/So2.php +++ b/app/code/community/Phoenix/Moneybookers/Model/So2.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Model_So2 extends Phoenix_Moneybookers_Model_Abstract diff --git a/app/code/community/Phoenix/Moneybookers/Model/Wlt.php b/app/code/community/Phoenix/Moneybookers/Model/Wlt.php index d5afa6c617ef8..7f62412eef17e 100644 --- a/app/code/community/Phoenix/Moneybookers/Model/Wlt.php +++ b/app/code/community/Phoenix/Moneybookers/Model/Wlt.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_Model_Wlt extends Phoenix_Moneybookers_Model_Abstract diff --git a/app/code/community/Phoenix/Moneybookers/controllers/MoneybookersController.php b/app/code/community/Phoenix/Moneybookers/controllers/MoneybookersController.php index 8fb226f56f713..d71c3f7ff274a 100644 --- a/app/code/community/Phoenix/Moneybookers/controllers/MoneybookersController.php +++ b/app/code/community/Phoenix/Moneybookers/controllers/MoneybookersController.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_MoneybookersController extends Mage_Adminhtml_Controller_Action diff --git a/app/code/community/Phoenix/Moneybookers/controllers/ProcessingController.php b/app/code/community/Phoenix/Moneybookers/controllers/ProcessingController.php index 187e593372168..2bb4d8ba3d901 100644 --- a/app/code/community/Phoenix/Moneybookers/controllers/ProcessingController.php +++ b/app/code/community/Phoenix/Moneybookers/controllers/ProcessingController.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Phoenix_Moneybookers_ProcessingController extends Mage_Core_Controller_Front_Action diff --git a/app/code/community/Phoenix/Moneybookers/etc/adminhtml.xml b/app/code/community/Phoenix/Moneybookers/etc/adminhtml.xml index 36afe10c99d3b..2a2b02f59c6f3 100644 --- a/app/code/community/Phoenix/Moneybookers/etc/adminhtml.xml +++ b/app/code/community/Phoenix/Moneybookers/etc/adminhtml.xml @@ -21,7 +21,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ --> diff --git a/app/code/community/Phoenix/Moneybookers/etc/config.xml b/app/code/community/Phoenix/Moneybookers/etc/config.xml index e1811b93186e8..9d6fa55ad6e2d 100644 --- a/app/code/community/Phoenix/Moneybookers/etc/config.xml +++ b/app/code/community/Phoenix/Moneybookers/etc/config.xml @@ -21,7 +21,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ --> diff --git a/app/code/community/Phoenix/Moneybookers/etc/system.xml b/app/code/community/Phoenix/Moneybookers/etc/system.xml index d9099c6ede7bc..d2dae0a0ccdfe 100644 --- a/app/code/community/Phoenix/Moneybookers/etc/system.xml +++ b/app/code/community/Phoenix/Moneybookers/etc/system.xml @@ -21,7 +21,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ --> diff --git a/app/code/community/Phoenix/Moneybookers/sql/moneybookers_setup/install-1.6.0.0.php b/app/code/community/Phoenix/Moneybookers/sql/moneybookers_setup/install-1.6.0.0.php index 7614447e1e03f..6d1346ecfed8f 100644 --- a/app/code/community/Phoenix/Moneybookers/sql/moneybookers_setup/install-1.6.0.0.php +++ b/app/code/community/Phoenix/Moneybookers/sql/moneybookers_setup/install-1.6.0.0.php @@ -20,7 +20,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/community/Phoenix/Moneybookers/view/adminhtml/activation.js b/app/code/community/Phoenix/Moneybookers/view/adminhtml/activation.js index 441181a328c9e..fc30ee9a748c5 100644 --- a/app/code/community/Phoenix/Moneybookers/view/adminhtml/activation.js +++ b/app/code/community/Phoenix/Moneybookers/view/adminhtml/activation.js @@ -19,7 +19,7 @@ * * @category Phoenix * @package Phoenix_Moneybookers - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/community/Phoenix/Moneybookers/view/adminhtml/info.phtml b/app/code/community/Phoenix/Moneybookers/view/adminhtml/info.phtml index 6e0b9e6e43db4..8c3625a0ef44c 100644 --- a/app/code/community/Phoenix/Moneybookers/view/adminhtml/info.phtml +++ b/app/code/community/Phoenix/Moneybookers/view/adminhtml/info.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ ?> diff --git a/app/code/community/Phoenix/Moneybookers/view/adminhtml/jsinit.phtml b/app/code/community/Phoenix/Moneybookers/view/adminhtml/jsinit.phtml index 716755ef0d74a..80a78fcfbb9f9 100644 --- a/app/code/community/Phoenix/Moneybookers/view/adminhtml/jsinit.phtml +++ b/app/code/community/Phoenix/Moneybookers/view/adminhtml/jsinit.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ ?> diff --git a/app/code/community/Phoenix/Moneybookers/view/adminhtml/layout.xml b/app/code/community/Phoenix/Moneybookers/view/adminhtml/layout.xml index 4ee3351f27f2f..29b7b0d40c283 100644 --- a/app/code/community/Phoenix/Moneybookers/view/adminhtml/layout.xml +++ b/app/code/community/Phoenix/Moneybookers/view/adminhtml/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ --> diff --git a/app/code/community/Phoenix/Moneybookers/view/adminhtml/pdf/info.phtml b/app/code/community/Phoenix/Moneybookers/view/adminhtml/pdf/info.phtml index 16fe5c4531a8b..e2f9ad7ae9d84 100644 --- a/app/code/community/Phoenix/Moneybookers/view/adminhtml/pdf/info.phtml +++ b/app/code/community/Phoenix/Moneybookers/view/adminhtml/pdf/info.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ ?> diff --git a/app/code/community/Phoenix/Moneybookers/view/frontend/blank.phtml b/app/code/community/Phoenix/Moneybookers/view/frontend/blank.phtml index c56c42610c944..1752c9c4b302a 100644 --- a/app/code/community/Phoenix/Moneybookers/view/frontend/blank.phtml +++ b/app/code/community/Phoenix/Moneybookers/view/frontend/blank.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ ?> diff --git a/app/code/community/Phoenix/Moneybookers/view/frontend/form.phtml b/app/code/community/Phoenix/Moneybookers/view/frontend/form.phtml index fc81acd03c95c..8484c1e2b6d6b 100644 --- a/app/code/community/Phoenix/Moneybookers/view/frontend/form.phtml +++ b/app/code/community/Phoenix/Moneybookers/view/frontend/form.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ ?> diff --git a/app/code/community/Phoenix/Moneybookers/view/frontend/info.phtml b/app/code/community/Phoenix/Moneybookers/view/frontend/info.phtml index 2e1aa28623ef0..8e03475a7f961 100644 --- a/app/code/community/Phoenix/Moneybookers/view/frontend/info.phtml +++ b/app/code/community/Phoenix/Moneybookers/view/frontend/info.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ ?> diff --git a/app/code/community/Phoenix/Moneybookers/view/frontend/layout.xml b/app/code/community/Phoenix/Moneybookers/view/frontend/layout.xml index 78315e278f236..aff28c1b59d08 100644 --- a/app/code/community/Phoenix/Moneybookers/view/frontend/layout.xml +++ b/app/code/community/Phoenix/Moneybookers/view/frontend/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/community/Phoenix/Moneybookers/view/frontend/payment.phtml b/app/code/community/Phoenix/Moneybookers/view/frontend/payment.phtml index 598648a66f033..a1f13e95623db 100644 --- a/app/code/community/Phoenix/Moneybookers/view/frontend/payment.phtml +++ b/app/code/community/Phoenix/Moneybookers/view/frontend/payment.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ ?> diff --git a/app/code/community/Phoenix/Moneybookers/view/frontend/placeform.phtml b/app/code/community/Phoenix/Moneybookers/view/frontend/placeform.phtml index 4314c9f3aae2f..0a0c2457ab060 100644 --- a/app/code/community/Phoenix/Moneybookers/view/frontend/placeform.phtml +++ b/app/code/community/Phoenix/Moneybookers/view/frontend/placeform.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ ?> diff --git a/app/code/community/Phoenix/Moneybookers/view/frontend/redirect.phtml b/app/code/community/Phoenix/Moneybookers/view/frontend/redirect.phtml index 5278afd266037..5ce2ebdf968d4 100644 --- a/app/code/community/Phoenix/Moneybookers/view/frontend/redirect.phtml +++ b/app/code/community/Phoenix/Moneybookers/view/frontend/redirect.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) + * @copyright Copyright (c) 2012 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ ?> diff --git a/app/code/core/Mage/Admin/Helper/Data.php b/app/code/core/Mage/Admin/Helper/Data.php index 0bc10b5f8b316..16efad6d99475 100644 --- a/app/code/core/Mage/Admin/Helper/Data.php +++ b/app/code/core/Mage/Admin/Helper/Data.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Customer - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Admin/Model/Acl.php b/app/code/core/Mage/Admin/Model/Acl.php index aa5a2da69981b..57ad0e01ff731 100644 --- a/app/code/core/Mage/Admin/Model/Acl.php +++ b/app/code/core/Mage/Admin/Model/Acl.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Admin/Model/Acl/Resource.php b/app/code/core/Mage/Admin/Model/Acl/Resource.php index c0b6542a52cab..54ce97615e0ce 100644 --- a/app/code/core/Mage/Admin/Model/Acl/Resource.php +++ b/app/code/core/Mage/Admin/Model/Acl/Resource.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Admin/Model/Acl/Role/Generic.php b/app/code/core/Mage/Admin/Model/Acl/Role/Generic.php index 83b0d9f6b21e1..232e528f4c6b2 100644 --- a/app/code/core/Mage/Admin/Model/Acl/Role/Generic.php +++ b/app/code/core/Mage/Admin/Model/Acl/Role/Generic.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Admin/Model/Acl/Role/Group.php b/app/code/core/Mage/Admin/Model/Acl/Role/Group.php index 5bf94647c9c46..4afcea59df50e 100644 --- a/app/code/core/Mage/Admin/Model/Acl/Role/Group.php +++ b/app/code/core/Mage/Admin/Model/Acl/Role/Group.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Admin/Model/Acl/Role/Registry.php b/app/code/core/Mage/Admin/Model/Acl/Role/Registry.php index e3e8f2086db63..41c56f9d4d398 100644 --- a/app/code/core/Mage/Admin/Model/Acl/Role/Registry.php +++ b/app/code/core/Mage/Admin/Model/Acl/Role/Registry.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Admin/Model/Acl/Role/User.php b/app/code/core/Mage/Admin/Model/Acl/Role/User.php index f68c266be4e38..728b20b199b9e 100644 --- a/app/code/core/Mage/Admin/Model/Acl/Role/User.php +++ b/app/code/core/Mage/Admin/Model/Acl/Role/User.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Admin/Model/Config.php b/app/code/core/Mage/Admin/Model/Config.php index 04830f2cb9710..6dcd1c41f5087 100644 --- a/app/code/core/Mage/Admin/Model/Config.php +++ b/app/code/core/Mage/Admin/Model/Config.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -101,6 +101,9 @@ public function loadAclResources(Mage_Admin_Model_Acl $acl, $resource = null, $p } foreach ($children as $res) { + if (1 == $res->disabled) { + continue; + } $this->loadAclResources($acl, $res, $resourceName); } return $this; diff --git a/app/code/core/Mage/Admin/Model/Observer.php b/app/code/core/Mage/Admin/Model/Observer.php index 1a6742665f1e8..89de6db9211af 100644 --- a/app/code/core/Mage/Admin/Model/Observer.php +++ b/app/code/core/Mage/Admin/Model/Observer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -33,6 +33,7 @@ */ class Mage_Admin_Model_Observer { + const FLAG_NO_LOGIN = 'no-login'; /** * Handler for controller_action_predispatch event * @@ -51,7 +52,8 @@ public function actionPreDispatchAdmin($observer) 'forgotpassword', 'resetpassword', 'resetpasswordpost', - 'logout' + 'logout', + 'refresh' // captcha refresh ); if (in_array($requestedActionName, $openActions)) { $request->setDispatched(true); @@ -64,7 +66,7 @@ public function actionPreDispatchAdmin($observer) $postLogin = $request->getPost('login'); $username = isset($postLogin['username']) ? $postLogin['username'] : ''; $password = isset($postLogin['password']) ? $postLogin['password'] : ''; - $user = $session->login($username, $password, $request); + $session->login($username, $password, $request); $request->setPost('login', null); } if (!$request->getParam('forwarded')) { diff --git a/app/code/core/Mage/Admin/Model/Resource/Acl.php b/app/code/core/Mage/Admin/Model/Resource/Acl.php index 92d45d22cc17a..c5b8d578521fa 100755 --- a/app/code/core/Mage/Admin/Model/Resource/Acl.php +++ b/app/code/core/Mage/Admin/Model/Resource/Acl.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Admin/Model/Resource/Permissions/Collection.php b/app/code/core/Mage/Admin/Model/Resource/Permissions/Collection.php index c4222f94a152a..1781a2294cd4c 100755 --- a/app/code/core/Mage/Admin/Model/Resource/Permissions/Collection.php +++ b/app/code/core/Mage/Admin/Model/Resource/Permissions/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Admin/Model/Resource/Role.php b/app/code/core/Mage/Admin/Model/Resource/Role.php index 73728a22db222..3e8112bf3fbe8 100755 --- a/app/code/core/Mage/Admin/Model/Resource/Role.php +++ b/app/code/core/Mage/Admin/Model/Resource/Role.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Admin/Model/Resource/Role/Collection.php b/app/code/core/Mage/Admin/Model/Resource/Role/Collection.php index 2fef922f2cd94..5e5191981b8ca 100755 --- a/app/code/core/Mage/Admin/Model/Resource/Role/Collection.php +++ b/app/code/core/Mage/Admin/Model/Resource/Role/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Admin/Model/Resource/Roles.php b/app/code/core/Mage/Admin/Model/Resource/Roles.php index 7241563db2cd4..eef0f4cf72434 100755 --- a/app/code/core/Mage/Admin/Model/Resource/Roles.php +++ b/app/code/core/Mage/Admin/Model/Resource/Roles.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Admin/Model/Resource/Roles/Collection.php b/app/code/core/Mage/Admin/Model/Resource/Roles/Collection.php index 5d856ed1a1ff1..08b07eead7bc9 100755 --- a/app/code/core/Mage/Admin/Model/Resource/Roles/Collection.php +++ b/app/code/core/Mage/Admin/Model/Resource/Roles/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Admin/Model/Resource/Roles/User/Collection.php b/app/code/core/Mage/Admin/Model/Resource/Roles/User/Collection.php index e5dab9a4a5194..1ee78cdfba988 100755 --- a/app/code/core/Mage/Admin/Model/Resource/Roles/User/Collection.php +++ b/app/code/core/Mage/Admin/Model/Resource/Roles/User/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Admin/Model/Resource/Rules.php b/app/code/core/Mage/Admin/Model/Resource/Rules.php index c636ba0740ca8..ea4d214939418 100755 --- a/app/code/core/Mage/Admin/Model/Resource/Rules.php +++ b/app/code/core/Mage/Admin/Model/Resource/Rules.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Admin/Model/Resource/Rules/Collection.php b/app/code/core/Mage/Admin/Model/Resource/Rules/Collection.php index 16f498807696a..ece1b0dc1b09c 100755 --- a/app/code/core/Mage/Admin/Model/Resource/Rules/Collection.php +++ b/app/code/core/Mage/Admin/Model/Resource/Rules/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Admin/Model/Resource/User.php b/app/code/core/Mage/Admin/Model/Resource/User.php index 04d52fac1fdac..274db25183a62 100755 --- a/app/code/core/Mage/Admin/Model/Resource/User.php +++ b/app/code/core/Mage/Admin/Model/Resource/User.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Admin/Model/Resource/User/Collection.php b/app/code/core/Mage/Admin/Model/Resource/User/Collection.php index 37ba2c50a7ca1..07065b0c03fcb 100755 --- a/app/code/core/Mage/Admin/Model/Resource/User/Collection.php +++ b/app/code/core/Mage/Admin/Model/Resource/User/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Admin/Model/Role.php b/app/code/core/Mage/Admin/Model/Role.php index ff22a35b0718c..c2f8d283cb07a 100644 --- a/app/code/core/Mage/Admin/Model/Role.php +++ b/app/code/core/Mage/Admin/Model/Role.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Admin/Model/Roles.php b/app/code/core/Mage/Admin/Model/Roles.php index 90386a9afc13e..62ebfcfadc527 100644 --- a/app/code/core/Mage/Admin/Model/Roles.php +++ b/app/code/core/Mage/Admin/Model/Roles.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -53,42 +53,86 @@ class Mage_Admin_Model_Roles extends Mage_Core_Model_Abstract */ protected $_eventPrefix = 'admin_roles'; + /** + * Constructor + */ protected function _construct() { $this->_init('Mage_Admin_Model_Resource_Roles'); } + /** + * Update object into database + * + * @return Mage_Admin_Model_Roles + */ public function update() { $this->getResource()->update($this); return $this; } + /** + * Retrieve users collection + * + * @return Mage_Admin_Model_Resource_Roles_User_Collection + */ public function getUsersCollection() { return Mage::getResourceModel('Mage_Admin_Model_Resource_Roles_User_Collection'); } + /** + * Return tree of acl resources + * + * @return array|null|Varien_Simplexml_Element + */ public function getResourcesTree() { return $this->_buildResourcesArray(null, null, null, null, true); } + /** + * Return list of acl resources + * + * @return array|null|Varien_Simplexml_Element + */ public function getResourcesList() { return $this->_buildResourcesArray(); } + /** + * Return list of acl resources in 2D format + * + * @return array|null|Varien_Simplexml_Element + */ public function getResourcesList2D() { return $this->_buildResourcesArray(null, null, null, true); } + /** + * Return users for role + * + * @return array|false + */ public function getRoleUsers() { return $this->getResource()->getRoleUsers($this); } + /** + * Build resources array process + * + * @param null|Varien_Simplexml_Element $resource + * @param null $parentName + * @param int $level + * @param null $represent2Darray + * @param bool $rawNodes + * @param string $module + * @return array|null|Varien_Simplexml_Element + */ protected function _buildResourcesArray(Varien_Simplexml_Element $resource = null, $parentName = null, $level = 0, $represent2Darray = null, $rawNodes = false, $module = 'Mage_Adminhtml') { @@ -99,7 +143,7 @@ protected function _buildResourcesArray(Varien_Simplexml_Element $resource = nul $level = -1; } else { $resourceName = $parentName; - if ($resource->getName() != 'title' && $resource->getName() != 'sort_order' && $resource->getName() != 'children') { + if (!in_array($resource->getName(), array('title', 'sort_order', 'children', 'disabled'))) { $resourceName = (is_null($parentName) ? '' : $parentName . '/') . $resource->getName(); //assigning module for its' children nodes @@ -121,22 +165,20 @@ protected function _buildResourcesArray(Varien_Simplexml_Element $resource = nul } } + //check children and run recursion if they exists $children = $resource->children(); - if (empty($children)) { - if ($rawNodes) { - return $resource; - } else { - return $result; + foreach ($children as $key => $child) { + if (1 == $child->disabled) { + $resource->{$key} = null; + continue; } - } - foreach ($children as $child) { $this->_buildResourcesArray($child, $resourceName, $level + 1, $represent2Darray, $rawNodes, $module); } + if ($rawNodes) { return $resource; } else { return $result; } } - } diff --git a/app/code/core/Mage/Admin/Model/Rules.php b/app/code/core/Mage/Admin/Model/Rules.php index 98c4572c5acdd..18510a626481f 100644 --- a/app/code/core/Mage/Admin/Model/Rules.php +++ b/app/code/core/Mage/Admin/Model/Rules.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Admin/Model/Session.php b/app/code/core/Mage/Admin/Model/Session.php index 21e6eeb370dc6..87b119e050c2a 100644 --- a/app/code/core/Mage/Admin/Model/Session.php +++ b/app/code/core/Mage/Admin/Model/Session.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Admin/Model/User.php b/app/code/core/Mage/Admin/Model/User.php index 5d5107adb3575..68f3d61bbf9ad 100644 --- a/app/code/core/Mage/Admin/Model/User.php +++ b/app/code/core/Mage/Admin/Model/User.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -317,6 +317,10 @@ public function authenticate($username, $password) $result = false; try { + Mage::dispatchEvent('admin_user_authenticate_before', array( + 'username' => $username, + 'user' => $this + )); $this->loadByUsername($username); $sensitive = ($config) ? $username == $this->getUsername() : true; @@ -384,7 +388,10 @@ public function reload() */ public function loadByUsername($username) { - $this->setData($this->getResource()->loadByUsername($username)); + $data = $this->getResource()->loadByUsername($username); + if ($data !== false) { + $this->setData($data); + } return $this; } @@ -533,7 +540,7 @@ public function changeResetPasswordLinkToken($newResetPasswordLinkToken) { throw Mage::exception('Mage_Core', Mage::helper('Mage_Adminhtml_Helper_Data')->__('Invalid password reset token.')); } $this->setRpToken($newResetPasswordLinkToken); - $currentDate = Varien_Date::now(true); + $currentDate = Varien_Date::now(); $this->setRpTokenCreatedAt($currentDate); return $this; @@ -555,7 +562,7 @@ public function isResetPasswordLinkTokenExpired() $tokenExpirationPeriod = Mage::helper('Mage_Admin_Helper_Data')->getResetPasswordLinkExpirationPeriod(); - $currentDate = Varien_Date::now(true); + $currentDate = Varien_Date::now(); $currentTimestamp = Varien_Date::toTimestamp($currentDate); $tokenTimestamp = Varien_Date::toTimestamp($resetPasswordLinkTokenCreatedAt); if ($tokenTimestamp > $currentTimestamp) { diff --git a/app/code/core/Mage/Admin/data/admin_setup/data-install-1.6.0.0.php b/app/code/core/Mage/Admin/data/admin_setup/data-install-1.6.0.0.php index 235194f62aa19..e72af399b2c8b 100644 --- a/app/code/core/Mage/Admin/data/admin_setup/data-install-1.6.0.0.php +++ b/app/code/core/Mage/Admin/data/admin_setup/data-install-1.6.0.0.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Admin/etc/config.xml b/app/code/core/Mage/Admin/etc/config.xml index cf108ed6cae85..94990102f3dfd 100644 --- a/app/code/core/Mage/Admin/etc/config.xml +++ b/app/code/core/Mage/Admin/etc/config.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Admin/sql/admin_setup/install-1.6.0.0.php b/app/code/core/Mage/Admin/sql/admin_setup/install-1.6.0.0.php index ed2bbfe49f6f7..139bdb89320ab 100644 --- a/app/code/core/Mage/Admin/sql/admin_setup/install-1.6.0.0.php +++ b/app/code/core/Mage/Admin/sql/admin_setup/install-1.6.0.0.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Admin/sql/admin_setup/mysql4-upgrade-1.6.0.0-1.6.1.0.php b/app/code/core/Mage/Admin/sql/admin_setup/mysql4-upgrade-1.6.0.0-1.6.1.0.php index 9333601b894f6..e859d61215945 100644 --- a/app/code/core/Mage/Admin/sql/admin_setup/mysql4-upgrade-1.6.0.0-1.6.1.0.php +++ b/app/code/core/Mage/Admin/sql/admin_setup/mysql4-upgrade-1.6.0.0-1.6.1.0.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Admin - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/AdminNotification/Helper/Data.php b/app/code/core/Mage/AdminNotification/Helper/Data.php index 739dfb2ca1bb4..03c809d472051 100644 --- a/app/code/core/Mage/AdminNotification/Helper/Data.php +++ b/app/code/core/Mage/AdminNotification/Helper/Data.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_AdminNotification - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/AdminNotification/Model/Feed.php b/app/code/core/Mage/AdminNotification/Model/Feed.php index c31860923d03d..8abf3a6a85a35 100644 --- a/app/code/core/Mage/AdminNotification/Model/Feed.php +++ b/app/code/core/Mage/AdminNotification/Model/Feed.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_AdminNotification - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/AdminNotification/Model/Inbox.php b/app/code/core/Mage/AdminNotification/Model/Inbox.php index 5bf8eac748619..ad0388bfa1b2b 100644 --- a/app/code/core/Mage/AdminNotification/Model/Inbox.php +++ b/app/code/core/Mage/AdminNotification/Model/Inbox.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_AdminNotification - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/AdminNotification/Model/Observer.php b/app/code/core/Mage/AdminNotification/Model/Observer.php index a8889e2efeee1..23eaea6dbcfb4 100644 --- a/app/code/core/Mage/AdminNotification/Model/Observer.php +++ b/app/code/core/Mage/AdminNotification/Model/Observer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_AdminNotification - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/AdminNotification/Model/Resource/Inbox.php b/app/code/core/Mage/AdminNotification/Model/Resource/Inbox.php index bc063aaa82111..4cda51102758a 100755 --- a/app/code/core/Mage/AdminNotification/Model/Resource/Inbox.php +++ b/app/code/core/Mage/AdminNotification/Model/Resource/Inbox.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_AdminNotification - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/AdminNotification/Model/Resource/Inbox/Collection.php b/app/code/core/Mage/AdminNotification/Model/Resource/Inbox/Collection.php index 27e3efb566046..e6a25b0bfb49e 100755 --- a/app/code/core/Mage/AdminNotification/Model/Resource/Inbox/Collection.php +++ b/app/code/core/Mage/AdminNotification/Model/Resource/Inbox/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_AdminNotification - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/AdminNotification/Model/Survey.php b/app/code/core/Mage/AdminNotification/Model/Survey.php index 727e2ae957700..60c9c050a77c3 100644 --- a/app/code/core/Mage/AdminNotification/Model/Survey.php +++ b/app/code/core/Mage/AdminNotification/Model/Survey.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_AdminNotification - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/AdminNotification/etc/adminhtml.xml b/app/code/core/Mage/AdminNotification/etc/adminhtml.xml index fcbccd651f364..5b832ebd0e77f 100644 --- a/app/code/core/Mage/AdminNotification/etc/adminhtml.xml +++ b/app/code/core/Mage/AdminNotification/etc/adminhtml.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_AdminNotification - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/AdminNotification/etc/config.xml b/app/code/core/Mage/AdminNotification/etc/config.xml index 48f895a52c271..ca235e0c651e1 100644 --- a/app/code/core/Mage/AdminNotification/etc/config.xml +++ b/app/code/core/Mage/AdminNotification/etc/config.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_AdminNotification - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/AdminNotification/etc/system.xml b/app/code/core/Mage/AdminNotification/etc/system.xml index 1b84bb524e11f..25c3d665814b6 100644 --- a/app/code/core/Mage/AdminNotification/etc/system.xml +++ b/app/code/core/Mage/AdminNotification/etc/system.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_AdminNotification - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/AdminNotification/sql/adminnotification_setup/install-1.6.0.0.php b/app/code/core/Mage/AdminNotification/sql/adminnotification_setup/install-1.6.0.0.php index 4cab117cbdd81..ddf4acb5a0a9d 100644 --- a/app/code/core/Mage/AdminNotification/sql/adminnotification_setup/install-1.6.0.0.php +++ b/app/code/core/Mage/AdminNotification/sql/adminnotification_setup/install-1.6.0.0.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_AdminNotification - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Abstract.php index 8f35c49e5405d..6c74c6351c234 100644 --- a/app/code/core/Mage/Adminhtml/Block/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Api/Buttons.php b/app/code/core/Mage/Adminhtml/Block/Api/Buttons.php index 46e025c8f5abf..4211fcf00ca2c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Api/Buttons.php +++ b/app/code/core/Mage/Adminhtml/Block/Api/Buttons.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Api/Editroles.php b/app/code/core/Mage/Adminhtml/Block/Api/Editroles.php index d8efed8297791..35fda6fe972bb 100644 --- a/app/code/core/Mage/Adminhtml/Block/Api/Editroles.php +++ b/app/code/core/Mage/Adminhtml/Block/Api/Editroles.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Api/Grid/Role.php b/app/code/core/Mage/Adminhtml/Block/Api/Grid/Role.php index eb8427e7bb305..a1c429c4c3db4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Api/Grid/Role.php +++ b/app/code/core/Mage/Adminhtml/Block/Api/Grid/Role.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Api/Role.php b/app/code/core/Mage/Adminhtml/Block/Api/Role.php index 5ca3f0389ad5c..233c1cb740344 100644 --- a/app/code/core/Mage/Adminhtml/Block/Api/Role.php +++ b/app/code/core/Mage/Adminhtml/Block/Api/Role.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Api/Role/Grid/User.php b/app/code/core/Mage/Adminhtml/Block/Api/Role/Grid/User.php index 475dfcb11cd82..2631695500ace 100644 --- a/app/code/core/Mage/Adminhtml/Block/Api/Role/Grid/User.php +++ b/app/code/core/Mage/Adminhtml/Block/Api/Role/Grid/User.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Api/Roles.php b/app/code/core/Mage/Adminhtml/Block/Api/Roles.php index db7a76b33ed08..808487f9f4865 100644 --- a/app/code/core/Mage/Adminhtml/Block/Api/Roles.php +++ b/app/code/core/Mage/Adminhtml/Block/Api/Roles.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Api/Tab/Roleinfo.php b/app/code/core/Mage/Adminhtml/Block/Api/Tab/Roleinfo.php index 02f01cc3263c0..e44c43ebfb16a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Api/Tab/Roleinfo.php +++ b/app/code/core/Mage/Adminhtml/Block/Api/Tab/Roleinfo.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesedit.php b/app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesedit.php index aa6b9d0ec9bdb..2975b5b897072 100644 --- a/app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesedit.php +++ b/app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesedit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesusers.php b/app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesusers.php index 7171f0dcae7a0..b807d26da58c7 100644 --- a/app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesusers.php +++ b/app/code/core/Mage/Adminhtml/Block/Api/Tab/Rolesusers.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Api/User.php b/app/code/core/Mage/Adminhtml/Block/Api/User.php index 4867b31b716f5..f7178573d2f3f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Api/User.php +++ b/app/code/core/Mage/Adminhtml/Block/Api/User.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -42,4 +42,14 @@ public function __construct() parent::__construct(); } + /** + * Prepare output HTML + * + * @return string + */ + protected function _toHtml() + { + Mage::dispatchEvent('api_user_html_before', array('block' => $this)); + return parent::_toHtml(); + } } diff --git a/app/code/core/Mage/Adminhtml/Block/Api/User/Edit.php b/app/code/core/Mage/Adminhtml/Block/Api/User/Edit.php index b03c2e10f4052..4a16f75a3a7d0 100644 --- a/app/code/core/Mage/Adminhtml/Block/Api/User/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Api/User/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Form.php index 273d8308dba99..0b379121b3053 100644 --- a/app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Main.php b/app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Main.php index 1526533aefb01..23d6191bb277b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Main.php +++ b/app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Main.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Roles.php b/app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Roles.php index e26862298e441..24540a34d6ff5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Roles.php +++ b/app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tab/Roles.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tabs.php index 5fb0a9b5f01c6..2b8da75ce3824 100644 --- a/app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Api/User/Edit/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Api/User/Grid.php b/app/code/core/Mage/Adminhtml/Block/Api/User/Grid.php index 16c5bea7c0c0c..97f58f6afe422 100644 --- a/app/code/core/Mage/Adminhtml/Block/Api/User/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Api/User/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Backup.php b/app/code/core/Mage/Adminhtml/Block/Backup.php index 6f4423b08ff35..18b3a26f74164 100644 --- a/app/code/core/Mage/Adminhtml/Block/Backup.php +++ b/app/code/core/Mage/Adminhtml/Block/Backup.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -31,14 +31,14 @@ * @package Mage_Adminhtml * @author Magento Core Team */ - class Mage_Adminhtml_Block_Backup extends Mage_Adminhtml_Block_Template { - public function __construct() - { - parent::__construct(); - $this->setTemplate('backup/list.phtml'); - } + /** + * Block's template + * + * @var string + */ + protected $_template = 'backup/list.phtml'; protected function _prepareLayout() { @@ -46,14 +46,32 @@ protected function _prepareLayout() $this->setChild('createButton', $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button') ->setData(array( - 'label' => Mage::helper('Mage_Backup_Helper_Data')->__('Create Backup'), - 'onclick' => "window.location.href='" . $this->getUrl('*/*/create') . "'", + 'label' => Mage::helper('Mage_Backup_Helper_Data')->__('Database Backup'), + 'onclick' => "return backup.backup('" . Mage_Backup_Helper_Data::TYPE_DB . "')", 'class' => 'task' )) ); + $this->setChild('createSnapshotButton', + $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button') + ->setData(array( + 'label' => Mage::helper('Mage_Backup_Helper_Data')->__('System Backup'), + 'onclick' => "return backup.backup('" . Mage_Backup_Helper_Data::TYPE_SYSTEM_SNAPSHOT . "')", + 'class' => '' + )) + ); + $this->setChild('createMediaBackupButton', + $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button') + ->setData(array( + 'label' => Mage::helper('Mage_Backup_Helper_Data')->__('Database and Media Backup'), + 'onclick' => "return backup.backup('" . Mage_Backup_Helper_Data::TYPE_MEDIA . "')", + 'class' => '' + )) + ); $this->setChild('backupsGrid', $this->getLayout()->createBlock('Mage_Adminhtml_Block_Backup_Grid') ); + + $this->setChild('dialogs', $this->getLayout()->createBlock('Mage_Adminhtml_Block_Backup_Dialogs')); } public function getCreateButtonHtml() @@ -61,8 +79,38 @@ public function getCreateButtonHtml() return $this->getChildHtml('createButton'); } + /** + * Generate html code for "Create System Snapshot" button + * + * @return string + */ + public function getCreateSnapshotButtonHtml() + { + return $this->getChildHtml('createSnapshotButton'); + } + + /** + * Generate html code for "Create Media Backup" button + * + * @return string + */ + public function getCreateMediaBackupButtonHtml() + { + return $this->getChildHtml('createMediaBackupButton'); + } + public function getGridHtml() { return $this->getChildHtml('backupsGrid'); } + + /** + * Generate html code for pop-up messages that will appear when user click on "Rollback" link + * + * @return string + */ + public function getDialogsHtml() + { + return $this->getChildHtml('dialogs'); + } } diff --git a/app/code/core/Mage/Adminhtml/Block/Backup/Dialogs.php b/app/code/core/Mage/Adminhtml/Block/Backup/Dialogs.php new file mode 100644 index 0000000000000..bb8dd2029bfa1 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Backup/Dialogs.php @@ -0,0 +1,53 @@ + + */ +class Mage_Adminhtml_Block_Backup_Dialogs extends Mage_Adminhtml_Block_Template +{ + /** + * Block's template + * + * @var string + */ + protected $_template = 'backup/dialogs.phtml'; + + /** + * Include backup.js file in page before rendering + * + * @see Mage_Core_Block_Abstract::_prepareLayout() + */ + protected function _prepareLayout() + { + $this->getLayout()->getBlock('head')->addJs('mage/adminhtml/backup.js'); + parent::_prepareLayout(); + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Backup/Grid.php b/app/code/core/Mage/Adminhtml/Block/Backup/Grid.php index 9c1970073bf86..dad58e2aa4797 100644 --- a/app/code/core/Mage/Adminhtml/Block/Backup/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Backup/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -51,8 +51,29 @@ protected function _prepareCollection() return parent::_prepareCollection(); } + /** + * Prepare mass action controls + * + * @return Mage_Adminhtml_Block_Backup_Grid + */ + protected function _prepareMassaction() + { + $this->setMassactionIdField('id'); + $this->getMassactionBlock()->setFormFieldName('ids'); + + $this->getMassactionBlock()->addItem('delete', array( + 'label'=> Mage::helper('Mage_Adminhtml_Helper_Data')->__('Delete'), + 'url' => $this->getUrl('*/*/massDelete'), + 'confirm' => Mage::helper('Mage_Backup_Helper_Data')->__('Are you sure you want to delete the selected backup(s)?') + )); + + return $this; + } + /** * Configuration of grid + * + * @return Mage_Adminhtml_Block_Backup_Grid */ protected function _prepareColumns() { @@ -62,45 +83,58 @@ protected function _prepareColumns() 'header' => Mage::helper('Mage_Backup_Helper_Data')->__('Time'), 'index' => 'date_object', 'type' => 'datetime', + 'width' => 200 + )); + + $this->addColumn('display_name', array( + 'header' => Mage::helper('Mage_Backup_Helper_Data')->__('Name'), + 'index' => 'display_name', + 'filter' => false, + 'sortable' => true, + 'width' => 350 )); $this->addColumn('size', array( 'header' => Mage::helper('Mage_Backup_Helper_Data')->__('Size, Bytes'), 'index' => 'size', 'type' => 'number', - 'sortable' => false, + 'sortable' => true, 'filter' => false )); $this->addColumn('type', array( 'header' => Mage::helper('Mage_Backup_Helper_Data')->__('Type'), 'type' => 'options', - 'options' => array('db' => Mage::helper('Mage_Backup_Helper_Data')->__('DB')), - 'index' =>'type' + 'options' => Mage::helper('Mage_Backup_Helper_Data')->getBackupTypes(), + 'index' => 'type', + 'width' => 300 )); $this->addColumn('download', array( 'header' => Mage::helper('Mage_Backup_Helper_Data')->__('Download'), - 'format' => 'gz   ('.$url7zip.')', + 'format' => '$extension   ('.$url7zip.')', 'index' => 'type', 'sortable' => false, 'filter' => false )); - $this->addColumn('action', array( - 'header' => Mage::helper('Mage_Backup_Helper_Data')->__('Action'), - 'type' => 'action', - 'width' => '80px', - 'filter' => false, - 'sortable' => false, - 'actions' => array(array( - 'url' => $this->getUrl('*/*/delete', array('time' => '$time', 'type' => '$type')), - 'caption' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Delete'), - 'confirm' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Are you sure you want to do this?') - )), - 'index' => 'type', - 'sortable' => false - )); + if (Mage::helper('Mage_Backup_Helper_Data')->isRollbackAllowed()){ + $this->addColumn('action', array( + 'header' => Mage::helper('Mage_Backup_Helper_Data')->__('Action'), + 'type' => 'action', + 'width' => '80px', + 'filter' => false, + 'sortable' => false, + 'actions' => array(array( + 'url' => '#', + 'caption' => Mage::helper('Mage_Backup_Helper_Data')->__('Rollback'), + 'onclick' => 'return backup.rollback(\'$type\', \'$time\');' + )), + 'index' => 'type', + 'sortable' => false + )); + } return $this; } diff --git a/app/code/core/Mage/Adminhtml/Block/Cache.php b/app/code/core/Mage/Adminhtml/Block/Cache.php index 7e91468d7c353..cd98aacd9c520 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cache.php +++ b/app/code/core/Mage/Adminhtml/Block/Cache.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Cache/Additional.php b/app/code/core/Mage/Adminhtml/Block/Cache/Additional.php index e22931a1d980a..45838b407d01d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cache/Additional.php +++ b/app/code/core/Mage/Adminhtml/Block/Cache/Additional.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Cache/Grid.php b/app/code/core/Mage/Adminhtml/Block/Cache/Grid.php index a4c14debd7975..bf74757f6de97 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cache/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Cache/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Cache/Notifications.php b/app/code/core/Mage/Adminhtml/Block/Cache/Notifications.php index 3cb64e2862ca7..6fc5c8f9d2e1b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cache/Notifications.php +++ b/app/code/core/Mage/Adminhtml/Block/Cache/Notifications.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Abstract.php index a804a383b62d1..d1f31abad59e8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Checkboxes/Tree.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Checkboxes/Tree.php index 2277c4f821652..0db2e8028ddf3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Checkboxes/Tree.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Checkboxes/Tree.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit.php index 1eb19e60428c5..9b42349804a6c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit/Form.php index 2c04e2c035038..99fbb442e5156 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Image.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Image.php index 19ddf2b64c60d..c29d1eb4ce7a2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Image.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Image.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Pricestep.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Pricestep.php index 8359777215501..addd5efdf4df1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Pricestep.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Pricestep.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Sortby/Available.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Sortby/Available.php index ba9543926d3ff..77723bca79256 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Sortby/Available.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Sortby/Available.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Sortby/Default.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Sortby/Default.php index 012e84e3c6ff6..8b32d7a5f390c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Sortby/Default.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Helper/Sortby/Default.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Attributes.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Attributes.php index 3f7f5f3ff2235..f95592d9cfab4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Attributes.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Attributes.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -158,6 +158,8 @@ protected function _prepareForm() { $form->addValues($this->getCategory()->getData()); + Mage::dispatchEvent('adminhtml_catalog_category_edit_prepare_form', array('form'=>$form)); + $form->setFieldNameSuffix('general'); $this->setForm($form); diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Design.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Design.php index f60c209cdafdb..223c90e8a69b6 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Design.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Design.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Adminhtml_Block_Catalog_Category_Tab_Design extends Mage_Adminhtml_Block_Catalog_Form diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/General.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/General.php index 3f0ab2aab8841..866972f700c69 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/General.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/General.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Product.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Product.php index a826bb636f548..0645b1182b24f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Product.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tab/Product.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tabs.php index f0ebc3ceb407f..690df6c4f3a59 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php index 218836465ef8a..09c1c33fb2943 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Tree.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Widget/Chooser.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Widget/Chooser.php index 63fb88bf90631..8795d35ed9b2c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Widget/Chooser.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Widget/Chooser.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Form.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Form.php index 4beeda55020cf..3258b54b0e196 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Attribute/Urlkey.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Attribute/Urlkey.php index a2c60ba726773..d6620f5a61d02 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Attribute/Urlkey.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Attribute/Urlkey.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/DateFieldsOrder.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/DateFieldsOrder.php index b6e94bcf59293..1c3f91607f8d2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/DateFieldsOrder.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/DateFieldsOrder.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -31,7 +31,8 @@ * @package Mage_Adminhtml * @author Magento Core Team */ -class Mage_Adminhtml_Block_Catalog_Form_Renderer_Config_DateFieldsOrder extends Mage_Adminhtml_Block_System_Config_Form_Field +class Mage_Adminhtml_Block_Catalog_Form_Renderer_Config_DateFieldsOrder + extends Mage_Adminhtml_Block_System_Config_Form_Field { protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) @@ -43,7 +44,7 @@ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) ); $element->setValues($_options) - ->setStyle('width:70px;') + ->setClass('select-date') ->setName($element->getName() . '[]'); if ($element->getValue()) { $values = explode(',', $element->getValue()); @@ -56,6 +57,6 @@ protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) $_parts[] = $element->setValue(isset($values[1]) ? $values[1] : null)->getElementHtml(); $_parts[] = $element->setValue(isset($values[2]) ? $values[2] : null)->getElementHtml(); - return implode(' / ', $_parts); + return implode(' / ', $_parts); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/YearRange.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/YearRange.php index 01825609f052b..1cb3b55ec428d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/YearRange.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Config/YearRange.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Fieldset/Element.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Fieldset/Element.php index c1c037356ab47..64d9bf059cdeb 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Fieldset/Element.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Form/Renderer/Fieldset/Element.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg.php index d787548682775..98758aa32b9b1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg/Content.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg/Content.php index 09b672c08ad2a..3771e6d50fa30 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg/Content.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Helper/Form/Wysiwyg/Content.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product.php index dfa9b2a816467..0c4d72eb06a74 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute.php index d74d8b1684b48..f8394342e0527 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit.php index 536d128f609ae..10dbbc8aca748 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Form.php index 2cce45dc082e4..33d804ea8e347 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Front.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Front.php index 705bf5a830438..37716de504ea8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Front.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Front.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Main.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Main.php index e2669552a2c4f..2ef8b05f4e167 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Main.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Main.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Options.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Options.php index cd27d2dac698d..3af4de122652f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Options.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/Options.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/System.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/System.php index cbcc14110ff84..eddd31325e395 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/System.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tab/System.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tabs.php index 27608d7c7c63b..5be21368edc86 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Edit/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Grid.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Grid.php index dd4813e5d9ace..f2545cfbf041a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/New/Product/Attributes.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/New/Product/Attributes.php index 65343384a0edf..a8ee27db74a4c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/New/Product/Attributes.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/New/Product/Attributes.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/New/Product/Created.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/New/Product/Created.php index d60eb01f09760..f2d709176c306 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/New/Product/Created.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/New/Product/Created.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Grid.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Grid.php index a3ecc79ecfdaa..906047aed0f77 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main.php index eeaa644fb29a7..32446600eb7f9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formattribute.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formattribute.php index 41b54c51ecaf0..9f4d406311284 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formattribute.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formattribute.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formgroup.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formgroup.php index 22e9480aef769..99bc887bd0096 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formgroup.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formgroup.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formset.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formset.php index e2fc74ccb4975..9bc9872ebfebe 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formset.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Formset.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Tree/Attribute.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Tree/Attribute.php index 5f3a8e7b4a48d..f8076dbd39394 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Tree/Attribute.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Tree/Attribute.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Tree/Group.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Tree/Group.php index a1709c68a239e..64054a1d636bf 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Tree/Group.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Main/Tree/Group.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Add.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Add.php index d01770f7668d5..f88d94ad34468 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Add.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Add.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Main.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Main.php index d2d6e64a93eb8..35249d1728d7a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Main.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Main.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Main/Filter.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Main/Filter.php index 18be72a97d650..f7ccf2cc16c16 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Main/Filter.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Attribute/Set/Toolbar/Main/Filter.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Configure.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Configure.php index 04a3a2f8841b0..9c0d3e22610f5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Configure.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Configure.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Error.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Error.php index 8ce3965558a95..16e3e24342ed1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Error.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Error.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset.php index ad622feda89a0..09707c6d161ad 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Configurable.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Configurable.php index 38b89043664a6..55a1ef946e72d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Configurable.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Configurable.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Grouped.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Grouped.php index d2134ed7f3377..518e2e55a32c8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Grouped.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Grouped.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Options.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Options.php index 018e84473db59..4c0ed1e572c1a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Options.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Options.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Qty.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Qty.php index fd9bc26c04d9a..9f713afe29a55 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Qty.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Fieldset/Qty.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Update/Result.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Update/Result.php index f1ddbd71e0181..587a64a09d576 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Update/Result.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Composite/Update/Result.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Created.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Created.php index 6bbd6f9925422..07e298ef37952 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Created.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Created.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php index 8a68f84cda928..3de983aff69b1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute.php index 5c50466e3cdd8..86c497318117f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Attributes.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Attributes.php index 308e37495314e..5249a57b00edb 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Attributes.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Attributes.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -44,7 +44,9 @@ protected function _construct() protected function _prepareForm() { - $this->setFormExcludedFieldList(array('tier_price','gallery', 'media_gallery', 'recurring_profile')); + $this->setFormExcludedFieldList(array( + 'tier_price','gallery', 'media_gallery', 'recurring_profile', 'group_price' + )); Mage::dispatchEvent('adminhtml_catalog_product_form_prepare_excluded_field_list', array('object'=>$this)); $form = new Varien_Data_Form(); @@ -79,9 +81,9 @@ protected function _getAdditionalElementTypes() { return array( 'price' => Mage::getConfig()->getBlockClassName('Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Price'), + 'weight' => Mage::getConfig()->getBlockClassName('Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Weight'), 'image' => Mage::getConfig()->getBlockClassName('Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Image'), - 'boolean' => Mage::getConfig() - ->getBlockClassName('Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Boolean') + 'boolean' => Mage::getConfig()->getBlockClassName('Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Boolean') ); } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Inventory.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Inventory.php index a4629d51677b6..cce1db62b87b9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Inventory.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Inventory.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Websites.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Websites.php index 90b73bc9e38f5..37df2746433d8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Websites.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tab/Websites.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tabs.php index f4a9020de8579..73084ceeffe1a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Action/Attribute/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Js.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Js.php index ee9a816bca61b..902c4aa8ae8cd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Js.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Js.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Ajax/Serializer.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Ajax/Serializer.php index a053a3455bb4c..f76b8583faa6a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Ajax/Serializer.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Ajax/Serializer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts.php index 52e84df03cfe3..7cd8cadd3b605 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Price.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Price.php index 907dbcf673593..816c19d7c05f3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Price.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Stock.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Stock.php index 368b490ea3ea4..3f7dc31b18995 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Stock.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Alerts/Stock.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php index 4ce3b4631823e..6f843771fea53 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,69 +29,79 @@ * * @category Mage * @package Mage_Adminhtml - * @author Magento Core Team + * @author Magento Core Team */ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes extends Mage_Adminhtml_Block_Catalog_Form { /** - * Load Wysiwyg on demand and Prepare layout + * Load Wysiwyg on demand and prepare layout */ protected function _prepareLayout() { parent::_prepareLayout(); - if (Mage::helper('Mage_Catalog_Helper_Data')->isModuleEnabled('Mage_Cms')) { - if (Mage::getSingleton('Mage_Cms_Model_Wysiwyg_Config')->isEnabled()) { - $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true); - } + if (Mage::helper('Mage_Catalog_Helper_Data')->isModuleEnabled('Mage_Cms') + && Mage::getSingleton('Mage_Cms_Model_Wysiwyg_Config')->isEnabled() + ) { + $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true); } } + /** + * Prepare attributes form + * + * @return null + */ protected function _prepareForm() { - if ($group = $this->getGroup()) { + $group = $this->getGroup(); + if ($group) { $form = new Varien_Data_Form(); - /** - * Initialize product object as form property - * for using it in elements generation - */ + + // Initialize product object as form property to use it during elements generation $form->setDataObject(Mage::registry('product')); - $fieldset = $form->addFieldset('group_fields'.$group->getId(), - array( - 'legend'=>Mage::helper('Mage_Catalog_Helper_Data')->__($group->getAttributeGroupName()), - 'class'=>'fieldset-wide', + $fieldset = $form->addFieldset('group_fields' . $group->getId(), array( + 'legend' => Mage::helper('Mage_Catalog_Helper_Data')->__($group->getAttributeGroupName()), + 'class' => 'fieldset-wide' )); $attributes = $this->getGroupAttributes(); $this->_setFieldset($attributes, $fieldset, array('gallery')); - if ($urlKey = $form->getElement('url_key')) { + $urlKey = $form->getElement('url_key'); + if ($urlKey) { $urlKey->setRenderer( $this->getLayout()->createBlock('Mage_Adminhtml_Block_Catalog_Form_Renderer_Attribute_Urlkey') ); } - if ($tierPrice = $form->getElement('tier_price')) { + $tierPrice = $form->getElement('tier_price'); + if ($tierPrice) { $tierPrice->setRenderer( $this->getLayout()->createBlock('Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Tier') ); } - if ($recurringProfile = $form->getElement('recurring_profile')) { + $groupPrice = $form->getElement('group_price'); + if ($groupPrice) { + $groupPrice->setRenderer( + $this->getLayout()->createBlock('Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Group') + ); + } + + $recurringProfile = $form->getElement('recurring_profile'); + if ($recurringProfile) { $recurringProfile->setRenderer( $this->getLayout()->createBlock('Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Recurring') ); } - /** - * Add new attribute button if not image tab - */ + // Add new attribute button if it is not an image tab if (!$form->getElement('media_gallery') - && Mage::getSingleton('Mage_Admin_Model_Session')->isAllowed('catalog/attributes/attributes')) { - $headerBar = $this->getLayout()->createBlock( - 'Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes_Create' - ); + && Mage::getSingleton('Mage_Admin_Model_Session')->isAllowed('catalog/attributes/attributes') + ) { + $headerBar = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes_Create'); $headerBar->getConfig() ->setTabId('group_' . $group->getId()) @@ -101,9 +111,7 @@ protected function _prepareForm() ->setTypeId($form->getDataObject()->getTypeId()) ->setProductId($form->getDataObject()->getId()); - $fieldset->setHeaderBar( - $headerBar->toHtml() - ); + $fieldset->setHeaderBar($headerBar->toHtml()); } if ($form->getElement('meta_description')) { @@ -111,9 +119,8 @@ protected function _prepareForm() } $values = Mage::registry('product')->getData(); - /** - * Set attribute default values for new product - */ + + // Set default attribute values for new product if (!Mage::registry('product')->getId()) { foreach ($attributes as $attribute) { if (!isset($values[$attribute->getAttributeCode()])) { @@ -124,7 +131,8 @@ protected function _prepareForm() if (Mage::registry('product')->hasLockedAttributes()) { foreach (Mage::registry('product')->getLockedAttributes() as $attribute) { - if ($element = $form->getElement($attribute)) { + $element = $form->getElement($attribute); + if ($element) { $element->setReadonly(true, true); } } @@ -132,32 +140,33 @@ protected function _prepareForm() $form->addValues($values); $form->setFieldNameSuffix('product'); - Mage::dispatchEvent('adminhtml_catalog_product_edit_prepare_form', array('form'=>$form)); + Mage::dispatchEvent('adminhtml_catalog_product_edit_prepare_form', array('form' => $form)); $this->setForm($form); } } + /** + * Retrieve additional element types + * + * @return array + */ protected function _getAdditionalElementTypes() { $result = array( - 'price' => Mage::getConfig() - ->getBlockClassName('Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Price'), - 'gallery' => Mage::getConfig() - ->getBlockClassName('Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Gallery'), - 'image' => Mage::getConfig() - ->getBlockClassName('Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Image'), - 'boolean' => Mage::getConfig() - ->getBlockClassName('Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Boolean'), - 'textarea' => Mage::getConfig() - ->getBlockClassName('Mage_Adminhtml_Block_Catalog_Helper_Form_Wysiwyg') + 'price' => Mage::getConfig()->getBlockClassName('Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Price'), + 'weight' => Mage::getConfig()->getBlockClassName('Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Weight'), + 'gallery' => Mage::getConfig()->getBlockClassName('Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Gallery'), + 'image' => Mage::getConfig()->getBlockClassName('Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Image'), + 'boolean' => Mage::getConfig()->getBlockClassName('Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Boolean'), + 'textarea' => Mage::getConfig()->getBlockClassName('Mage_Adminhtml_Block_Catalog_Helper_Form_Wysiwyg') ); $response = new Varien_Object(); $response->setTypes(array()); - Mage::dispatchEvent('adminhtml_catalog_product_edit_element_types', array('response'=>$response)); + Mage::dispatchEvent('adminhtml_catalog_product_edit_element_types', array('response' => $response)); - foreach ($response->getTypes() as $typeName=>$typeClass) { + foreach ($response->getTypes() as $typeName => $typeClass) { $result[$typeName] = $typeClass; } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes/Create.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes/Create.php index be4631cef2186..7af6caf9c0339 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes/Create.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Attributes/Create.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Categories.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Categories.php index 407652c13a9dd..a3584bac8d2a7 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Categories.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Categories.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Crosssell.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Crosssell.php index 1ba22bc77f639..aa7cdacd65e93 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Crosssell.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Crosssell.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Inventory.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Inventory.php index ff16577268c9c..76bc7d6ca2ef8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Inventory.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Inventory.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options.php index 4533d5aa59e21..0983514907065 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php index 6e34b95280f42..4317e806088f6 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Abstract.php index ae56830fc11ce..adc6187f6c18d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Date.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Date.php index 2f15647420dcc..1c589e59ea7b4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Date.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Date.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/File.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/File.php index d9cc45812b448..0ed86370b05d0 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/File.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/File.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Select.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Select.php index 6833acc351a2b..0b54dcafd143e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Select.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Select.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Text.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Text.php index 6f90cddf78dc8..6692161ea78c2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Text.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Type/Text.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price.php index 64cc63ca24cf2..93efce32f226d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Group.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Group.php new file mode 100644 index 0000000000000..289b2fc9de5bc --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Group.php @@ -0,0 +1,97 @@ + + */ +class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Group + extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Group_Abstract +{ + /** + * Initialize block + */ + public function __construct() + { + $this->setTemplate('catalog/product/edit/price/group.phtml'); + } + + /** + * Sort values + * + * @param array $data + * @return array + */ + protected function _sortValues($data) + { + usort($data, array($this, '_sortGroupPrices')); + return $data; + } + + /** + * Sort group price values callback method + * + * @param array $a + * @param array $b + * @return int + */ + protected function _sortGroupPrices($a, $b) + { + if ($a['website_id'] != $b['website_id']) { + return $a['website_id'] < $b['website_id'] ? -1 : 1; + } + if ($a['cust_group'] != $b['cust_group']) { + return $this->getCustomerGroups($a['cust_group']) < $this->getCustomerGroups($b['cust_group']) ? -1 : 1; + } + return 0; + } + + /** + * Prepare global layout + * + * Add "Add Group Price" button to layout + * + * @return Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Group + */ + protected function _prepareLayout() + { + $button = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button') + ->setData(array( + 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Add Group Price'), + 'onclick' => 'return groupPriceControl.addItem()', + 'class' => 'add' + )); + $button->setName('add_group_price_item_button'); + + $this->setChild('add_button', $button); + return parent::_prepareLayout(); + } + +} diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Group/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Group/Abstract.php new file mode 100644 index 0000000000000..520c7140fdaa4 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Group/Abstract.php @@ -0,0 +1,348 @@ + + */ +abstract class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Group_Abstract + extends Mage_Adminhtml_Block_Widget + implements Varien_Data_Form_Element_Renderer_Interface +{ + /** + * Form element instance + * + * @var Varien_Data_Form_Element_Abstract + */ + protected $_element; + + /** + * Customer groups cache + * + * @var array + */ + protected $_customerGroups; + + /** + * Websites cache + * + * @var array + */ + protected $_websites; + + /** + * Retrieve current product instance + * + * @return Mage_Catalog_Model_Product + */ + public function getProduct() + { + return Mage::registry('product'); + } + + /** + * Render HTML + * + * @param Varien_Data_Form_Element_Abstract $element + * @return string + */ + public function render(Varien_Data_Form_Element_Abstract $element) + { + $this->setElement($element); + return $this->toHtml(); + } + + /** + * Set form element instance + * + * @param Varien_Data_Form_Element_Abstract $element + * @return Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Group_Abstract + */ + public function setElement(Varien_Data_Form_Element_Abstract $element) + { + $this->_element = $element; + return $this; + } + + /** + * Retrieve form element instance + * + * @return Varien_Data_Form_Element_Abstract + */ + public function getElement() + { + return $this->_element; + } + + /** + * Prepare group price values + * + * @return array + */ + public function getValues() + { + $values = array(); + $data = $this->getElement()->getValue(); + + if (is_array($data)) { + $values = $this->_sortValues($data); + } + + foreach ($values as &$value) { + $value['readonly'] = ($value['website_id'] == 0) + && $this->isShowWebsiteColumn() + && !$this->isAllowChangeWebsite(); + } + + return $values; + } + + /** + * Sort values + * + * @param array $data + * @return array + */ + protected function _sortValues($data) + { + return $data; + } + + /** + * Retrieve allowed customer groups + * + * @param int|null $groupId return name by customer group id + * @return array|string + */ + public function getCustomerGroups($groupId = null) + { + if ($this->_customerGroups === null) { + if (!Mage::helper('Mage_Catalog_Helper_Data')->isModuleEnabled('Mage_Customer')) { + return array(); + } + $collection = Mage::getModel('Mage_Customer_Model_Group')->getCollection(); + $this->_customerGroups = $this->_getInitialCustomerGroups(); + + foreach ($collection as $item) { + /** @var $item Mage_Customer_Model_Group */ + $this->_customerGroups[$item->getId()] = $item->getCustomerGroupCode(); + } + } + + if ($groupId !== null) { + return isset($this->_customerGroups[$groupId]) ? $this->_customerGroups[$groupId] : array(); + } + + return $this->_customerGroups; + } + + /** + * Retrieve list of initial customer groups + * + * @return array + */ + protected function _getInitialCustomerGroups() + { + return array(); + } + + /** + * Retrieve number of websites + * + * @return int + */ + public function getWebsiteCount() + { + return count($this->getWebsites()); + } + + /** + * Show website column and switcher for group price table + * + * @return bool + */ + public function isMultiWebsites() + { + return !Mage::app()->isSingleStoreMode(); + } + + /** + * Retrieve allowed for edit websites + * + * @return array + */ + public function getWebsites() + { + if (!is_null($this->_websites)) { + return $this->_websites; + } + + $this->_websites = array( + 0 => array( + 'name' => Mage::helper('Mage_Catalog_Helper_Data')->__('All Websites'), + 'currency' => Mage::app()->getBaseCurrencyCode() + ) + ); + + if (!$this->isScopeGlobal() && $this->getProduct()->getStoreId()) { + /** @var $website Mage_Core_Model_Website */ + $website = Mage::app()->getStore($this->getProduct()->getStoreId())->getWebsite(); + + $this->_websites[$website->getId()] = array( + 'name' => $website->getName(), + 'currency' => $website->getBaseCurrencyCode() + ); + } elseif (!$this->isScopeGlobal()) { + $websites = Mage::app()->getWebsites(false); + $productWebsiteIds = $this->getProduct()->getWebsiteIds(); + foreach ($websites as $website) { + /** @var $website Mage_Core_Model_Website */ + if (!in_array($website->getId(), $productWebsiteIds)) { + continue; + } + $this->_websites[$website->getId()] = array( + 'name' => $website->getName(), + 'currency' => $website->getBaseCurrencyCode() + ); + } + } + + return $this->_websites; + } + + /** + * Retrieve default value for customer group + * + * @return int + */ + public function getDefaultCustomerGroup() + { + return Mage_Customer_Model_Group::CUST_GROUP_ALL; + } + + /** + * Retrieve default value for website + * + * @return int + */ + public function getDefaultWebsite() + { + if ($this->isShowWebsiteColumn() && !$this->isAllowChangeWebsite()) { + return Mage::app()->getStore($this->getProduct()->getStoreId())->getWebsiteId(); + } + return 0; + } + + /** + * Retrieve 'add group price item' button HTML + * + * @return string + */ + public function getAddButtonHtml() + { + return $this->getChildHtml('add_button'); + } + + /** + * Retrieve customized price column header + * + * @param string $default + * @return string + */ + public function getPriceColumnHeader($default) + { + if ($this->hasData('price_column_header')) { + return $this->getData('price_column_header'); + } else { + return $default; + } + } + + /** + * Retrieve customized price column header + * + * @param string $default + * @return string + */ + public function getPriceValidation($default) + { + if ($this->hasData('price_validation')) { + return $this->getData('price_validation'); + } else { + return $default; + } + } + + /** + * Retrieve Group Price entity attribute + * + * @return Mage_Catalog_Model_Resource_Eav_Attribute + */ + public function getAttribute() + { + return $this->getElement()->getEntityAttribute(); + } + + /** + * Check group price attribute scope is global + * + * @return bool + */ + public function isScopeGlobal() + { + return $this->getAttribute()->isScopeGlobal(); + } + + /** + * Show group prices grid website column + * + * @return bool + */ + public function isShowWebsiteColumn() + { + if ($this->isScopeGlobal() || Mage::app()->isSingleStoreMode()) { + return false; + } + return true; + } + + /** + * Check is allow change website value for combination + * + * @return bool + */ + public function isAllowChangeWebsite() + { + if (!$this->isShowWebsiteColumn() || $this->getProduct()->getStoreId()) { + return false; + } + return true; + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Recurring.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Recurring.php index 4f05528eafab0..9c4a89597f727 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Recurring.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Recurring.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Tier.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Tier.php index e442a00b86673..a663bb93d4eca 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Tier.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Price/Tier.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -32,33 +32,11 @@ * @author Magento Core Team */ class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Tier - extends Mage_Adminhtml_Block_Widget - implements Varien_Data_Form_Element_Renderer_Interface + extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Group_Abstract { - /** - * Form element instance - * - * @var Varien_Data_Form_Element - */ - protected $_element; /** - * Customer Groups cache - * - * @var array - */ - protected $_customerGroups; - - /** - * Websites cache - * - * @var array - */ - protected $_websites; - - /** - * Define tier price template file - * + * Initialize block */ public function __construct() { @@ -66,69 +44,25 @@ public function __construct() } /** - * Retrieve current edit product instance - * - * @return Mage_Catalog_Model_Product - */ - public function getProduct() - { - return Mage::registry('product'); - } - - /** - * Render HTML + * Retrieve list of initial customer groups * - * @param Varien_Data_Form_Element_Abstract $element - * @return string - */ - public function render(Varien_Data_Form_Element_Abstract $element) - { - $this->setElement($element); - return $this->toHtml(); - } - - /** - * Set form element instance - * - * @param Varien_Data_Form_Element_Abstract $element - * @return Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Tier - */ - public function setElement(Varien_Data_Form_Element_Abstract $element) - { - $this->_element = $element; - return $this; - } - - /** - * Retrieve form element instance - * - * @return Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Tier + * @return array */ - public function getElement() + protected function _getInitialCustomerGroups() { - return $this->_element; + return array(Mage_Customer_Model_Group::CUST_GROUP_ALL => Mage::helper('Mage_Catalog_Helper_Data')->__('ALL GROUPS')); } /** - * Prepare Tier Price values + * Sort values * + * @param array $data * @return array */ - public function getValues() + protected function _sortValues($data) { - $values = array(); - $data = $this->getElement()->getValue(); - - if (is_array($data)) { - usort($data, array($this, '_sortTierPrices')); - $values = $data; - } - - foreach ($values as &$v) { - $v['readonly'] = $v['website_id'] == 0 && $this->isShowWebsiteColumn() && !$this->isAllowChangeWebsite(); - } - - return $values; + usort($data, array($this, '_sortTierPrices')); + return $data; } /** @@ -153,123 +87,6 @@ protected function _sortTierPrices($a, $b) return 0; } - /** - * Retrieve allowed customer groups - * - * @param int $groupId return name by customer group id - * @return array|string - */ - public function getCustomerGroups($groupId = null) - { - if ($this->_customerGroups === null) { - if (!Mage::helper('Mage_Catalog_Helper_Data')->isModuleEnabled('Mage_Customer')) { - return array(); - } - $collection = Mage::getModel('Mage_Customer_Model_Group')->getCollection(); - $this->_customerGroups = array( - Mage_Customer_Model_Group::CUST_GROUP_ALL => Mage::helper('Mage_Catalog_Helper_Data')->__('ALL GROUPS') - ); - - foreach ($collection as $item) { - /* @var $item Mage_Customer_Model_Group */ - $this->_customerGroups[$item->getId()] = $item->getCustomerGroupCode(); - } - } - - if ($groupId !== null) { - return isset($this->_customerGroups[$groupId]) ? $this->_customerGroups[$groupId] : array(); - } - - return $this->_customerGroups; - } - - /** - * Retrieve count of websites - * - * @return int - */ - public function getWebsiteCount() - { - return count($this->getWebsites()); - } - - /** - * Show Website column and switcher for tier price table - * - * @return bool - */ - public function isMultiWebsites() - { - return !Mage::app()->isSingleStoreMode(); - } - - /** - * Retrieve allowed for edit websites - * - * @return array - */ - public function getWebsites() - { - if (!is_null($this->_websites)) { - return $this->_websites; - } - - $this->_websites = array( - 0 => array( - 'name' => Mage::helper('Mage_Catalog_Helper_Data')->__('All Websites'), - 'currency' => Mage::app()->getBaseCurrencyCode() - ) - ); - - if (!$this->isScopeGlobal() && $this->getProduct()->getStoreId()) { - /* @var $website Mage_Core_Model_Website */ - $website = Mage::app()->getStore($this->getProduct()->getStoreId())->getWebsite(); - - $this->_websites[$website->getId()] = array( - 'name' => $website->getName(), - 'currency' => $website->getBaseCurrencyCode() - ); - } else if (!$this->isScopeGlobal()) { - $websites = Mage::app()->getWebsites(false); - $productWebsiteIds = $this->getProduct()->getWebsiteIds(); - foreach ($websites as $website) { - /* @var $website Mage_Core_Model_Website */ - if (!in_array($website->getId(), $productWebsiteIds)) { - continue; - } - $this->_websites[$website->getId()] = array( - 'name' => $website->getName(), - 'currency' => $website->getBaseCurrencyCode() - ); - } - } - - return $this->_websites; - } - - /** - * Retrieve default value for customer group - * - * @return int - */ - public function getDefaultCustomerGroup() - { - return Mage_Customer_Model_Group::CUST_GROUP_ALL; - } - - /** - * Retrieve default value for website - * - * @return int - */ - public function getDefaultWebsite() - { - if ($this->isShowWebsiteColumn() && !$this->isAllowChangeWebsite()) { - return Mage::app()->getStore($this->getProduct()->getStoreId())->getWebsiteId(); - } - return 0; - } - /** * Prepare global layout * Add "Add tier" button to layout @@ -280,9 +97,9 @@ protected function _prepareLayout() { $button = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button') ->setData(array( - 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Add Tier'), - 'onclick' => 'return tierPriceControl.addItem()', - 'class' => 'add' + 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Add Tier'), + 'onclick' => 'return tierPriceControl.addItem()', + 'class' => 'add' )); $button->setName('add_tier_price_item_button'); @@ -290,93 +107,4 @@ protected function _prepareLayout() return parent::_prepareLayout(); } - /** - * Retrieve Add Tier Price Item button HTML - * - * @return string - */ - public function getAddButtonHtml() - { - return $this->getChildHtml('add_button'); - } - - /** - * Returns customized price column header - * that was seted through set... - * - * @param string $default - * @return string - */ - public function getPriceColumnHeader($default) - { - if ($this->hasData('price_column_header')) { - return $this->getData('price_column_header'); - } else { - return $default; - } - } - - /** - * Returns customized price column header - * that was seted through set... - * - * @param string $default - * @return string - */ - public function getPriceValidation($default) - { - if ($this->hasData('price_validation')) { - return $this->getData('price_validation'); - } else { - return $default; - } - } - - /** - * Retrieve Tier Price entity attribute - * - * @return Mage_Catalog_Model_Resource_Eav_Attribute - */ - public function getAttribute() - { - return $this->getElement()->getEntityAttribute(); - } - - /** - * Check tier price attribute scope is global - * - * @return bool - */ - public function isScopeGlobal() - { - return $this->getAttribute()->isScopeGlobal(); - } - - /** - * Show tier prices grid website column - * - * @return bool - */ - public function isShowWebsiteColumn() - { - if ($this->isScopeGlobal()) { - return false; - } else if (Mage::app()->isSingleStoreMode()) { - return false; - } - return true; - } - - /** - * Check is allow change website value for combination - * - * @return bool - */ - public function isAllowChangeWebsite() - { - if (!$this->isShowWebsiteColumn() || $this->getProduct()->getStoreId()) { - return false; - } - return true; - } } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Related.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Related.php index f8762fa05c6d8..d08609e190363 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Related.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Related.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Reviews.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Reviews.php index 5028c63a45b4c..bbab4ff9c1210 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Reviews.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Reviews.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Settings.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Settings.php index c55c28a3c3212..3708c2cc69b9d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Settings.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Settings.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php index 7b90c9308ebad..12d2d5d8f6c6c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -66,7 +66,28 @@ public function getTabClass() */ public function isReadonly() { - return $this->_getProduct()->getCompositeReadonly(); + return (bool) $this->_getProduct()->getCompositeReadonly(); + } + + /** + * Check whether attributes of configurable products can be editable + * + * @return boolean + */ + public function isAttributesConfigurationReadonly() + { + return (bool) $this->_getProduct()->getAttributesConfigurationReadonly(); + } + + /** + * Check whether prices of configurable products can be editable + * + * @return boolean + */ + public function isAttributesPricesReadonly() + { + return $this->_getProduct()->getAttributesConfigurationReadonly() || + (Mage::helper('Mage_Catalog_Helper_Data')->isPriceGlobal() && $this->isReadonly()); } /** diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid.php index c67361f2b38fe..50e98d66eee72 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Filter/Inventory.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Filter/Inventory.php index 872b1b4f03d52..152a028ada55e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Filter/Inventory.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Filter/Inventory.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Renderer/Checkbox.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Renderer/Checkbox.php index 142b3e5892f43..68d0e03732500 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Renderer/Checkbox.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Renderer/Checkbox.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Renderer/Inventory.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Renderer/Inventory.php index 94657b2ba9f58..41ef013c12bce 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Renderer/Inventory.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Grid/Renderer/Inventory.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Simple.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Simple.php index 94ee9b249aece..a64d57ac00bc0 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Simple.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Config/Simple.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -31,7 +31,8 @@ * @package Mage_Adminhtml * @author Magento Core Team */ -class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Simple extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes +class Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Simple + extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Attributes { /** * Link to currently editing product @@ -56,7 +57,7 @@ protected function _prepareForm() 'additional' => array('name', 'sku', 'visibility', 'status') ); - $availableTypes = array('text', 'select', 'multiselect', 'textarea', 'price'); + $availableTypes = array('text', 'select', 'multiselect', 'textarea', 'price', 'weight'); $attributes = Mage::getModel('Mage_Catalog_Model_Product') ->setTypeId(Mage_Catalog_Model_Product_Type::TYPE_SIMPLE) @@ -70,10 +71,12 @@ protected function _prepareForm() // If not applied to configurable && !in_array(Mage_Catalog_Model_Product_Type::TYPE_CONFIGURABLE, $attribute->getApplyTo()) // If not used in configurable - && !in_array($attribute->getId(),$this->_getProduct()->getTypeInstance()->getUsedProductAttributeIds($this->_getProduct()))) + && !in_array($attribute->getId(), + $this->_getProduct()->getTypeInstance()->getUsedProductAttributeIds($this->_getProduct())) + ) // Or in additional - || in_array($attribute->getAttributeCode(), $attributesConfig['additional'])) { - + || in_array($attribute->getAttributeCode(), $attributesConfig['additional']) + ) { $inputType = $attribute->getFrontend()->getInputType(); if (!in_array($inputType, $availableTypes)) { continue; @@ -112,8 +115,8 @@ protected function _prepareForm() } /* Configurable attributes */ - $product = $this->_getProduct(); - foreach ($product->getTypeInstance()->getUsedProductAttributes($product) as $attribute) { + $usedAttributes = $this->_getProduct()->getTypeInstance()->getUsedProductAttributes($this->_getProduct()); + foreach ($usedAttributes as $attribute) { $attributeCode = $attribute->getAttributeCode(); $fieldset->addField( 'simple_product_' . $attributeCode, 'select', array( 'label' => $attribute->getFrontend()->getLabel(), @@ -177,8 +180,6 @@ protected function _prepareForm() ) )); - - $this->setForm($form); } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Group.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Group.php index 0d70649d9a3cc..4633b7522709d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Group.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Group.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Settings.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Settings.php index 40bb1d39907d3..09f400bd3743a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Settings.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Super/Settings.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Tag.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Tag.php index c334f4f9a46d3..49a246f592dac 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Tag.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Tag.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Tag/Customer.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Tag/Customer.php index fcb99623cf833..c4b190ffce573 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Tag/Customer.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Tag/Customer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Upsell.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Upsell.php index 17574602866ff..561657d2f991d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Upsell.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Upsell.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Websites.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Websites.php index 7fde6fc37f2c9..a767c223c5a1f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Websites.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Websites.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php index 0c397e3299a42..50212c276639f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Configurable.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Configurable.php index bf4042a49b320..e8c6e29e6ebff 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Configurable.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Configurable.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Grouped.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Grouped.php index 7928edc7ffc7e..e2c4c92ec0d35 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Grouped.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tabs/Grouped.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Frontend/Product/Watermark.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Frontend/Product/Watermark.php index 977647226aac2..03219a6c5ccef 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Frontend/Product/Watermark.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Frontend/Product/Watermark.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php index 655beefc602cc..a29eb868e898c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Apply.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Apply.php index b112559572de5..70afc08ccaa68 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Apply.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Apply.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Boolean.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Boolean.php index 4018eeaac59bb..c5e7c79daccbf 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Boolean.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Boolean.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Config.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Config.php index 340a8482d7353..22030ded81710 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Config.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Config.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery.php index 472b0ea5b80fe..6d045fe039176 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery/Content.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery/Content.php index 1b392e63d7ef1..ce96be325c0ab 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery/Content.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Gallery/Content.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -57,6 +57,8 @@ protected function _prepareLayout() ) )); + Mage::dispatchEvent('catalog_product_gallery_prepare_layout', array('block' => $this)); + return parent::_prepareLayout(); } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Image.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Image.php index 2397aadeab0fe..9116ea3b197de 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Image.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Image.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Enabled.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Enabled.php index 02358d5e42aee..4e7538b607ea9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Enabled.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Enabled.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Price.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Price.php index af67119cdfdb7..708476ca2daa3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Price.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Msrp/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Price.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Price.php index 395c1162969e3..1f6a85c983630 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Price.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Weight.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Weight.php new file mode 100644 index 0000000000000..fe682362a6213 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Helper/Form/Weight.php @@ -0,0 +1,46 @@ + + */ +class Mage_Adminhtml_Block_Catalog_Product_Helper_Form_Weight extends Varien_Data_Form_Element_Text +{ + /** + * Validation classes for weight field which corresponds to DECIMAL(12,4) SQL type + * + * @param array $attributes + */ + public function __construct(array $attributes = array()) + { + parent::__construct($attributes); + $this->addClass('validate-number validate-zero-or-greater validate-number-range number-range-0-99999999.9999'); + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Price.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Price.php index 6c5f8a7ee4ea9..198960c3b147e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Price.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Widget/Chooser.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Widget/Chooser.php index 212f42ea188e4..ac05ed6a54f3c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Widget/Chooser.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Widget/Chooser.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -100,8 +100,8 @@ public function prepareElementHtml(Varien_Data_Form_Element_Abstract $element) public function getCheckboxCheckCallback() { if ($this->getUseMassaction()) { - return "function (grid, event) { - $(grid.containerId).fire('product:changed', {}); + return "function (grid, element) { + $(grid.containerId).fire('product:changed', {element: element}); }"; } } diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Widget/Chooser/Container.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Widget/Chooser/Container.php index 66aac1d76d256..d5b5f47ea2e27 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Widget/Chooser/Container.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Widget/Chooser/Container.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Search.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Search.php index 8f7e48fa9ecbc..b4fc9e5971f87 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Search.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Search.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit.php index e1554378fcbc9..8f74dc337ee34 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit/Form.php index c6bf3ee9bed71..f40c59fda372b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -93,6 +93,7 @@ protected function _prepareForm() 'title' => Mage::helper('Mage_Catalog_Helper_Data')->__('Store'), 'values' => Mage::getSingleton('Mage_Adminhtml_Model_System_Store')->getStoreValuesForForm(true, false), 'required' => true, + 'after_element_html' => Mage::getBlockSingleton('Mage_Adminhtml_Block_Store_Switcher')->getHintHtml() )); } else { @@ -104,48 +105,41 @@ protected function _prepareForm() if ($model->getId()) { $fieldset->addField('num_results', 'text', array( - 'name' => 'num_results', - 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Number of results
(For the last time placed)'), - 'title' => Mage::helper('Mage_Catalog_Helper_Data')->__('Number of results
(For the last time placed)'), - 'required' => true, + 'name' => 'num_results', + 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Number of results'), + 'title' => Mage::helper('Mage_Catalog_Helper_Data')->__('Number of results (For the last time placed)'), + 'note' => Mage::helper('Mage_Catalog_Helper_Data')->__('For the last time placed.'), + 'required' => true, )); $fieldset->addField('popularity', 'text', array( - 'name' => 'popularity', - 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Number of Uses'), - 'title' => Mage::helper('Mage_Catalog_Helper_Data')->__('Number of Uses'), - 'required' => true, + 'name' => 'popularity', + 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Number of Uses'), + 'title' => Mage::helper('Mage_Catalog_Helper_Data')->__('Number of Uses'), + 'required' => true, )); } - $afterElementHtml = '

' - . Mage::helper('Mage_Catalog_Helper_Data')->__('(Will make search for the query above return results for this search.)') - . '

'; - $fieldset->addField('synonym_for', 'text', array( - 'name' => 'synonym_for', - 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Synonym For'), - 'title' => Mage::helper('Mage_Catalog_Helper_Data')->__('Synonym For'), - 'after_element_html' => $afterElementHtml, + 'name' => 'synonym_for', + 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Synonym For'), + 'title' => Mage::helper('Mage_Catalog_Helper_Data')->__('Synonym For'), + 'note' => Mage::helper('Mage_Catalog_Helper_Data')->__('Will make search for the query above return results for this search.'), )); - $afterElementHtml = '

' - . Mage::helper('Mage_Catalog_Helper_Data')->__('ex. http://domain.com') - . '

'; - $fieldset->addField('redirect', 'text', array( - 'name' => 'redirect', - 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Redirect URL'), - 'title' => Mage::helper('Mage_Catalog_Helper_Data')->__('Redirect URL'), - 'class' => 'validate-url', - 'after_element_html' => $afterElementHtml, + 'name' => 'redirect', + 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Redirect URL'), + 'title' => Mage::helper('Mage_Catalog_Helper_Data')->__('Redirect URL'), + 'class' => 'validate-url', + 'note' => Mage::helper('Mage_Catalog_Helper_Data')->__('ex. http://domain.com'), )); $fieldset->addField('display_in_terms', 'select', array( - 'name' => 'display_in_terms', - 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Display in Suggested Terms'), - 'title' => Mage::helper('Mage_Catalog_Helper_Data')->__('Display in Suggested Terms'), - 'values' => $yesno, + 'name' => 'display_in_terms', + 'label' => Mage::helper('Mage_Catalog_Helper_Data')->__('Display in Suggested Terms'), + 'title' => Mage::helper('Mage_Catalog_Helper_Data')->__('Display in Suggested Terms'), + 'values' => $yesno, )); $form->setValues($model->getData()); diff --git a/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Grid.php b/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Grid.php index 9314dd373d4c2..50fcd748bdb5e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Search/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Checkout/Agreement.php b/app/code/core/Mage/Adminhtml/Block/Checkout/Agreement.php index fd67f8e45c80c..285182d782a87 100644 --- a/app/code/core/Mage/Adminhtml/Block/Checkout/Agreement.php +++ b/app/code/core/Mage/Adminhtml/Block/Checkout/Agreement.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -37,7 +37,7 @@ class Mage_Adminhtml_Block_Checkout_Agreement extends Mage_Adminhtml_Block_Widge public function __construct() { $this->_controller = 'checkout_agreement'; - $this->_headerText = Mage::helper('Mage_Checkout_Helper_Data')->__('Manage Checkout Terms and Conditions'); + $this->_headerText = Mage::helper('Mage_Checkout_Helper_Data')->__('Manage Terms and Conditions'); $this->_addButtonLabel = Mage::helper('Mage_Checkout_Helper_Data')->__('Add New Condition'); parent::__construct(); } diff --git a/app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit.php b/app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit.php index f2027f3bfd18f..c3d82f468fbaf 100644 --- a/app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -60,7 +60,7 @@ public function getHeaderText() return Mage::helper('Mage_Checkout_Helper_Data')->__('Edit Terms and Conditions'); } else { - return Mage::helper('Mage_Checkout_Helper_Data')->__('New Condition'); + return Mage::helper('Mage_Checkout_Helper_Data')->__('New Terms and Conditions'); } } } diff --git a/app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit/Form.php index 2aa29468c446e..2c31643f7235e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -105,6 +105,7 @@ protected function _prepareForm() 'title' => Mage::helper('Mage_Checkout_Helper_Data')->__('Store View'), 'required' => true, 'values' => Mage::getSingleton('Mage_Adminhtml_Model_System_Store')->getStoreValuesForForm(false, true), + 'after_element_html' => Mage::getBlockSingleton('Mage_Adminhtml_Block_Store_Switcher')->getHintHtml() )); } else { diff --git a/app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Grid.php b/app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Grid.php index e281739c5d91a..60b18d512988a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Checkout/Agreement/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Adminhtml_Block_Checkout_Agreement_Grid extends Mage_Adminhtml_Block_Widget_Grid diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Block.php b/app/code/core/Mage/Adminhtml/Block/Cms/Block.php index 49accfc467765..98817622fbad9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Block.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Block.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit.php b/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit.php index 47c90aff5a37a..74105ce18fdf6 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit/Form.php index c1b19e9724b84..692aa99419f39 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Block/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -60,7 +60,9 @@ protected function _prepareForm() { $model = Mage::registry('cms_block'); - $form = new Varien_Data_Form(array('id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post')); + $form = new Varien_Data_Form( + array('id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post') + ); $form->setHtmlIdPrefix('block_'); @@ -97,6 +99,7 @@ protected function _prepareForm() 'title' => Mage::helper('Mage_Cms_Helper_Data')->__('Store View'), 'required' => true, 'values' => Mage::getSingleton('Mage_Adminhtml_Model_System_Store')->getStoreValuesForForm(false, true), + 'after_element_html' => Mage::getBlockSingleton('Mage_Adminhtml_Block_Store_Switcher')->getHintHtml() )); } else { diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Block/Grid.php b/app/code/core/Mage/Adminhtml/Block/Cms/Block/Grid.php index 6e20ce047d7ad..f536fc6958902 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Block/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Block/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Block/Widget/Chooser.php b/app/code/core/Mage/Adminhtml/Block/Cms/Block/Widget/Chooser.php index 549458253b818..64d196d5a5552 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Block/Widget/Chooser.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Block/Widget/Chooser.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Page.php b/app/code/core/Mage/Adminhtml/Block/Cms/Page.php index c7d8f665b1a3e..e0aba177d7a02 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Page.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Page.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit.php b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit.php index 1ed1213f18b02..e8a68e02e33a6 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Form.php index e8a169b96d9e9..da6406743521a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Content.php b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Content.php index b1bacfe1d7ece..6cc4f6b7463da 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Content.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Content.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php index 659ebc1847476..ef65d01fb639a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Design.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Adminhtml_Block_Cms_Page_Edit_Tab_Design diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Main.php b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Main.php index ed971e140ab79..9ad0f0705526e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Main.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Main.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -91,7 +91,8 @@ protected function _prepareForm() 'title' => Mage::helper('Mage_Cms_Helper_Data')->__('Store View'), 'required' => true, 'values' => Mage::getSingleton('Mage_Adminhtml_Model_System_Store')->getStoreValuesForForm(false, true), - 'disabled' => $isElementDisabled + 'disabled' => $isElementDisabled, + 'after_element_html' => Mage::getBlockSingleton('Mage_Adminhtml_Block_Store_Switcher')->getHintHtml() )); } else { diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Meta.php b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Meta.php index ec7f5b9797476..c03cb54f4ba0e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Meta.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tab/Meta.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tabs.php index 11e9214a3272c..b75241e2dbb9a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Edit/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid.php b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid.php index 80a3ad6837071..b3694b8d1fd3f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid/Renderer/Action.php b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid/Renderer/Action.php index e609ad1cd0aad..fefdff0aadfdd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid/Renderer/Action.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Grid/Renderer/Action.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Widget/Chooser.php b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Widget/Chooser.php index 1d50d2fc86eb2..cfc1c1cf5a3c8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Page/Widget/Chooser.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Page/Widget/Chooser.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content.php b/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content.php index 2079f2dd91d3a..12049ea816364 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Files.php b/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Files.php index 7479c76f52e1d..5fea94f344c1c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Files.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Files.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Newfolder.php b/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Newfolder.php index 1d1f906a80da1..6b8c2418dd6b2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Newfolder.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Newfolder.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Uploader.php b/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Uploader.php index cca705291ba1c..e166fc285bd8a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Uploader.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Content/Uploader.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Tree.php b/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Tree.php index 677dba04f836f..c952baebbf517 100644 --- a/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Tree.php +++ b/app/code/core/Mage/Adminhtml/Block/Cms/Wysiwyg/Images/Tree.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer.php b/app/code/core/Mage/Adminhtml/Block/Customer.php index 3b60b571a7d7b..055c081bc411d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit.php index e18527704291e..64e61a605eb00 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Form.php index 8501358f2ad87..9041686ab5a2c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Attribute/Group.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Attribute/Group.php new file mode 100644 index 0000000000000..335b153fd910a --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Attribute/Group.php @@ -0,0 +1,105 @@ + + */ +class Mage_Adminhtml_Block_Customer_Edit_Renderer_Attribute_Group + extends Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element +{ + /** + * Override parent constructor just for setting custom template + */ + protected function _construct() + { + parent::_construct(); + $this->setTemplate('customer/edit/tab/account/form/renderer/group.phtml'); + } + + /** + * Retrieve disable auto group change element HTML ID + * + * @return string + */ + protected function _getDisableAutoGroupChangeElementHtmlId() + { + return $this->getDisableAutoGroupChangeAttribute()->getAttributeCode(); + } + + /** + * Retrieve disable auto group change checkbox label text + * + * @return string + */ + public function getDisableAutoGroupChangeCheckboxLabel() + { + return Mage::helper('Mage_Customer_Helper_Data')->__($this->getDisableAutoGroupChangeAttribute()->getFrontend()->getLabel()); + } + + /** + * Retrieve disable auto group change checkbox state + * + * @return string + */ + public function getDisableAutoGroupChangeCheckboxState() + { + $customer = Mage::registry('current_customer'); + $checkedByDefault = ($customer && $customer->getId()) + ? false : Mage::helper('Mage_Customer_Helper_Address')->getDisableAutoGroupAssignDefaultValue(); + + $value = $this->getDisableAutoGroupChangeAttributeValue(); + $state = ''; + if (!empty($value) || $checkedByDefault) { + $state = 'checked'; + } + return $state; + } + + /** + * Retrieve disable auto group change checkbox element HTML NAME + * + * @return string + */ + public function getDisableAutoGroupChangeCheckboxElementName() + { + return $this->getElement()->getForm()->getFieldNameSuffix() + . '[' . $this->_getDisableAutoGroupChangeElementHtmlId() . ']'; + } + + /** + * Retrieve disable auto group change checkbox element HTML ID + * + * @return string + */ + public function getDisableAutoGroupChangeCheckboxElementId() + { + return $this->_getDisableAutoGroupChangeElementHtmlId(); + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Newpass.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Newpass.php index dacc11ac68671..3469e23b68651 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Newpass.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Newpass.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Region.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Region.php index dccb8100a2ee2..f20ca90f20ffa 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Region.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Renderer/Region.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php index f39b7938deb70..b247209c9688f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Account.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -33,11 +33,19 @@ */ class Mage_Adminhtml_Block_Customer_Edit_Tab_Account extends Mage_Adminhtml_Block_Widget_Form { + /** + * Initialize block + */ public function __construct() { parent::__construct(); } + /** + * Initialize form + * + * @return Mage_Adminhtml_Block_Customer_Edit_Tab_Account + */ public function initForm() { $form = new Varien_Data_Form(); @@ -46,36 +54,62 @@ public function initForm() $customer = Mage::registry('current_customer'); - /* @var $customerForm Mage_Customer_Model_Form */ + /** @var $customerForm Mage_Customer_Model_Form */ $customerForm = Mage::getModel('Mage_Customer_Model_Form'); $customerForm->setEntity($customer) ->setFormCode('adminhtml_customer') ->initDefaultValues(); - $fieldset = $form->addFieldset('base_fieldset', - array('legend'=>Mage::helper('Mage_Customer_Helper_Data')->__('Account Information')) - ); + $fieldset = $form->addFieldset('base_fieldset', array( + 'legend' => Mage::helper('Mage_Customer_Helper_Data')->__('Account Information') + )); $attributes = $customerForm->getAttributes(); foreach ($attributes as $attribute) { + /* @var $attribute Mage_Eav_Model_Entity_Attribute */ + $attribute->setFrontendLabel(Mage::helper('Mage_Customer_Helper_Data')->__($attribute->getFrontend()->getLabel())); $attribute->unsIsVisible(); } - $this->_setFieldset($attributes, $fieldset); + + $disableAutoGroupChangeAttributeName = 'disable_auto_group_change'; + $this->_setFieldset($attributes, $fieldset, array($disableAutoGroupChangeAttributeName)); + + $form->getElement('group_id')->setRenderer($this->getLayout() + ->createBlock('Mage_Adminhtml_Block_Customer_Edit_Renderer_Attribute_Group') + ->setDisableAutoGroupChangeAttribute($customerForm->getAttribute($disableAutoGroupChangeAttributeName)) + ->setDisableAutoGroupChangeAttributeValue($customer->getData($disableAutoGroupChangeAttributeName))); if ($customer->getId()) { $form->getElement('website_id')->setDisabled('disabled'); $form->getElement('created_in')->setDisabled('disabled'); } else { $fieldset->removeField('created_in'); - } + $form->getElement('website_id')->addClass('validate-website-has-store'); -// if (Mage::app()->isSingleStoreMode()) { -// $fieldset->removeField('website_id'); -// $fieldset->addField('website_id', 'hidden', array( -// 'name' => 'website_id' -// )); -// $customer->setWebsiteId(Mage::app()->getStore(true)->getWebsiteId()); -// } + $websites = array(); + foreach (Mage::app()->getWebsites(true) as $website) { + $websites[$website->getId()] = !is_null($website->getDefaultStore()); + } + $prefix = $form->getHtmlIdPrefix(); + + $form->getElement('website_id')->setAfterElementHtml( + '' + ); + } $customerStoreId = null; if ($customer->getId()) { @@ -119,10 +153,10 @@ public function initForm() if ($customer->getId()) { if (!$customer->isReadonly()) { - // add password management fieldset + // Add password management fieldset $newFieldset = $form->addFieldset( 'password_fieldset', - array('legend'=>Mage::helper('Mage_Customer_Helper_Data')->__('Password Management')) + array('legend' => Mage::helper('Mage_Customer_Helper_Data')->__('Password Management')) ); // New customer password $field = $newFieldset->addField('new_password', 'text', @@ -136,7 +170,7 @@ public function initForm() $this->getLayout()->createBlock('Mage_Adminhtml_Block_Customer_Edit_Renderer_Newpass') ); - // prepare customer confirmation control (only for existing customers) + // Prepare customer confirmation control (only for existing customers) $confirmationKey = $customer->getConfirmation(); if ($confirmationKey || $customer->isConfirmationRequired()) { $confirmationAttribute = $customer->getAttribute('confirmation'); @@ -149,8 +183,8 @@ public function initForm() ))->setEntityAttribute($confirmationAttribute) ->setValues(array('' => 'Confirmed', $confirmationKey => 'Not confirmed')); - // prepare send welcome email checkbox, if customer is not confirmed - // no need to add it, if website id is empty + // Prepare send welcome email checkbox if customer is not confirmed + // no need to add it, if website ID is empty if ($customer->getConfirmation() && $customer->getWebsiteId()) { $fieldset->addField('sendemail', 'checkbox', array( 'name' => 'sendemail', @@ -175,7 +209,7 @@ public function initForm() ); $field->setRenderer($this->getLayout()->createBlock('Mage_Adminhtml_Block_Customer_Edit_Renderer_Newpass')); - // prepare send welcome email checkbox + // Prepare send welcome email checkbox $fieldset->addField('sendemail', 'checkbox', array( 'label' => Mage::helper('Mage_Customer_Helper_Data')->__('Send Welcome Email'), 'name' => 'sendemail', @@ -191,7 +225,7 @@ public function initForm() } } - // make sendemail and sendmail_store_id disabled, if website_id has empty value + // Make sendemail and sendmail_store_id disabled if website_id has empty value $isSingleMode = Mage::app()->isSingleStoreMode(); $sendEmailId = $isSingleMode ? 'sendemail' : 'sendemail_store_id'; $sendEmail = $form->getElement($sendEmailId); diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Addresses.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Addresses.php index 5e9c7b6ee3165..fe00e65c877d0 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Addresses.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Addresses.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -128,6 +128,8 @@ public function initForm() ->processStreetAttribute($attributes['street']); } foreach ($attributes as $attribute) { + /* @var $attribute Mage_Eav_Model_Entity_Attribute */ + $attribute->setFrontendLabel(Mage::helper('Mage_Customer_Helper_Data')->__($attribute->getFrontend()->getLabel())); $attribute->unsIsVisible(); } $this->_setFieldset($attributes, $fieldset); diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Cart.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Cart.php index 5ea7e00bf9312..1eb4a4fefbfad 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Cart.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Cart.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -37,12 +37,22 @@ class Mage_Adminhtml_Block_Customer_Edit_Tab_Cart extends Mage_Adminhtml_Block_W public function __construct($attributes=array()) { parent::__construct($attributes); - $this->setId('customer_cart_grid'.$this->getWebsiteId()); $this->setUseAjax(true); $this->_parentTemplate = $this->getTemplate(); $this->setTemplate('customer/tab/cart.phtml'); } + /** + * Prepare grid + * + * @return void + */ + protected function _prepareGrid() + { + $this->setId('customer_cart_grid' . $this->getWebsiteId()); + parent::_prepareGrid(); + } + protected function _prepareCollection() { $customer = Mage::registry('current_customer'); diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Carts.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Carts.php index 3ad7c84cebd76..e71cc9a2c9f80 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Carts.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Carts.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter.php index 9cb071e4417e6..a89fa69e28723 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid.php index f5f7a75558f54..7cd5e2656dda6 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Filter/Status.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Filter/Status.php index 5533d2ab7b8c2..d8d3925f416cb 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Filter/Status.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Filter/Status.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Renderer/Action.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Renderer/Action.php index ee732c60a0ba4..c5339919cc722 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Renderer/Action.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Renderer/Action.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Renderer/Status.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Renderer/Status.php index 96188255fb90b..faa9f535f3224 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Renderer/Status.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Newsletter/Grid/Renderer/Status.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Orders.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Orders.php index 220f9ff656e34..f59e6312901db 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Orders.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Orders.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Reviews.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Reviews.php index c07a0e60fd27d..c3f6db5427362 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Reviews.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Reviews.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Tag.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Tag.php index 2a6d75dced07b..d4a540ea94402 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Tag.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Tag.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Tags.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Tags.php index 2f880f81621ea..34a5c15acc70e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Tags.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Tags.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View.php index d1766cd7a45d8..7d38b8c7033c2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Accordion.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Accordion.php index 829aac5863a97..1fa39a2597fab 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Accordion.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Accordion.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -58,9 +58,7 @@ protected function _prepareLayout() // prepare title for cart $title = Mage::helper('Mage_Customer_Helper_Data')->__('Shopping Cart - %d item(s)', $cartItemsCount); if (count($customer->getSharedWebsiteIds()) > 1) { - $title = Mage::helper('Mage_Customer_Helper_Data')->__('Shopping Cart of %1$s - %2$d item(s)', - $website->getName(), $cartItemsCount - ); + $title = Mage::helper('Mage_Customer_Helper_Data')->__('Shopping Cart of %1$s - %2$d item(s)', $website->getName(), $cartItemsCount); } // add cart ajax accordion diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Cart.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Cart.php index 30e8d1abdb36b..8d3db643da2d5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Cart.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Cart.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Grid/Renderer/Item.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Grid/Renderer/Item.php index 7291c25e26ffc..739fcc0b490dd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Grid/Renderer/Item.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Grid/Renderer/Item.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Orders.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Orders.php index 80b6fa1951518..54852514128d0 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Orders.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Orders.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Sales.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Sales.php index 7bb95072bc222..24d3387ff4e52 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Sales.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Sales.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Wishlist.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Wishlist.php index d5034784cc90e..17c02c167a176 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Wishlist.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/View/Wishlist.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Wishlist.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Wishlist.php index 5fbe1d7295ca6..bcbb23b30803f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Wishlist.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Wishlist.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Wishlist/Grid/Renderer/Description.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Wishlist/Grid/Renderer/Description.php index 677449514d7f4..3b9d22ee2646f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Wishlist/Grid/Renderer/Description.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tab/Wishlist/Grid/Renderer/Description.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php index aecd88f1cb533..74d90c4fc3c00 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Edit/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/Boolean.php b/app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/Boolean.php index 0d8de4a8b43ab..e296fec73ca76 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/Boolean.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/Boolean.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/File.php b/app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/File.php index 0217933433b0c..02b71d3804d92 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/File.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/File.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/Image.php b/app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/Image.php index 2492a542894e1..52de6839e34c7 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/Image.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Form/Element/Image.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Grid.php b/app/code/core/Mage/Adminhtml/Block/Customer/Grid.php index 587f4625388ea..7986d9c77032a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Grid/Filter/Country.php b/app/code/core/Mage/Adminhtml/Block/Customer/Grid/Filter/Country.php index f78530258c88a..cf77d4cccfbad 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Grid/Filter/Country.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Grid/Filter/Country.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Grid/Renderer/Multiaction.php b/app/code/core/Mage/Adminhtml/Block/Customer/Grid/Renderer/Multiaction.php index 8663e9dae6c5b..9d0bb5d53fff0 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Grid/Renderer/Multiaction.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Grid/Renderer/Multiaction.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Group.php b/app/code/core/Mage/Adminhtml/Block/Customer/Group.php index f94b7cb929c2e..a681e699e3357 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Group.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Group.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Group/Edit.php b/app/code/core/Mage/Adminhtml/Block/Customer/Group/Edit.php index 422f16dd09363..0db3c67f36908 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Group/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Group/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Group/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Customer/Group/Edit/Form.php index aa8e2ba81d977..6a046ca73e3a1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Group/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Group/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -51,8 +51,7 @@ protected function _prepareLayout() 'name' => 'code', 'label' => Mage::helper('Mage_Customer_Helper_Data')->__('Group Name'), 'title' => Mage::helper('Mage_Customer_Helper_Data')->__('Group Name'), - 'note' => Mage::helper('Mage_Customer_Helper_Data')->__('Maximum length must be less then %s symbols', - Mage_Customer_Model_Group::GROUP_CODE_MAX_LENGTH), + 'note' => Mage::helper('Mage_Customer_Helper_Data')->__('Maximum length must be less then %s symbols', Mage_Customer_Model_Group::GROUP_CODE_MAX_LENGTH), 'class' => $validateClass, 'required' => true, ) diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Group/Grid.php b/app/code/core/Mage/Adminhtml/Block/Customer/Group/Grid.php index 8114257a017c8..f343754b86fd6 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Group/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Group/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Online.php b/app/code/core/Mage/Adminhtml/Block/Customer/Online.php index bdc1092695f8d..a780c57a80751 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Online.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Online.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Online/Filter.php b/app/code/core/Mage/Adminhtml/Block/Customer/Online/Filter.php index cdbcac97d3205..95e7e382f34f9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Online/Filter.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Online/Filter.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid.php b/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid.php index 12bc28285d756..b25f28c027320 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Ip.php b/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Ip.php index a86421137a8d3..de30d6d84e093 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Ip.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Ip.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Type.php b/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Type.php index 70200957b84f5..45b0cb70073b0 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Type.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Type.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Url.php b/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Url.php index 1cb7bab9efbb1..70853370d70df 100644 --- a/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Url.php +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Online/Grid/Renderer/Url.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/Sales/Order/Address/Form/Renderer/Vat.php b/app/code/core/Mage/Adminhtml/Block/Customer/Sales/Order/Address/Form/Renderer/Vat.php new file mode 100644 index 0000000000000..9847fc918dc85 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Customer/Sales/Order/Address/Form/Renderer/Vat.php @@ -0,0 +1,93 @@ + + */ +class Mage_Adminhtml_Block_Customer_Sales_Order_Address_Form_Renderer_Vat + extends Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element +{ + /** + * Validate button block + * + * @var null|Mage_Adminhtml_Block_Widget_Button + */ + protected $_validateButton = null; + + /** + * Set custom template for 'VAT number' + */ + protected function _construct() + { + $this->setTemplate('customer/sales/order/create/address/form/renderer/vat.phtml'); + } + + /** + * Retrieve validate button block + * + * @return Mage_Adminhtml_Block_Widget_Button + */ + public function getValidateButton() + { + if (is_null($this->_validateButton)) { + /** @var $form Varien_Data_Form */ + $form = $this->_element->getForm(); + + $vatElementId = $this->_element->getHtmlId(); + + $countryElementId = $form->getElement('country_id')->getHtmlId(); + $validateUrl = Mage::getSingleton('Mage_Adminhtml_Model_Url') + ->getUrl('*/customer_system_config_validatevat/validateAdvanced'); + + $vatValidateOptions = Mage::helper('Mage_Core_Helper_Data')->jsonEncode(array( + 'vatElementId' => $vatElementId, + 'countryElementId' => $countryElementId, + 'groupIdHtmlId' => 'group_id', + 'validateUrl' => $validateUrl, + 'vatValidMessage' => Mage::helper('Mage_Customer_Helper_Data')->__('The VAT ID is valid. The current Customer Group will be used.'), + 'vatValidAndGroupChangeMessage' => Mage::helper('Mage_Customer_Helper_Data')->__('Based on the VAT ID, the customer would belong to the Customer Group %s.') . "\n" + . Mage::helper('Mage_Customer_Helper_Data')->__('The customer is currently assigned to Customer Group %s.') . ' ' + . Mage::helper('Mage_Customer_Helper_Data')->__('Would you like to change the Customer Group for this order?'), + 'vatInvalidMessage' => Mage::helper('Mage_Customer_Helper_Data')->__('The VAT ID entered (%s) is not a valid VAT ID.'), + 'vatValidationFailedMessage' => Mage::helper('Mage_Customer_Helper_Data')->__('There was an error validating the VAT ID. Please try again later.'), + )); + + $optionsVarName = $this->getJsVariablePrefix() . 'VatParameters'; + $beforeHtml = ''; + $this->_validateButton = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')->setData(array( + 'label' => Mage::helper('Mage_Customer_Helper_Data')->__('Validate VAT Number'), + 'before_html' => $beforeHtml, + 'onclick' => 'order.validateVat(' . $optionsVarName . ')' + )); + } + return $this->_validateButton; + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Customer/System/Config/Validatevat.php b/app/code/core/Mage/Adminhtml/Block/Customer/System/Config/Validatevat.php new file mode 100644 index 0000000000000..215fec693317c --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Customer/System/Config/Validatevat.php @@ -0,0 +1,79 @@ + + */ +class Mage_Adminhtml_Block_Customer_System_Config_Validatevat extends Mage_Adminhtml_Block_System_Config_Form_Field +{ + /** + * Set template to itself + * + * @return Mage_Adminhtml_Block_Customer_System_Config_Validatevat + */ + protected function _prepareLayout() + { + parent::_prepareLayout(); + if (!$this->getTemplate()) { + $this->setTemplate('customer/system/config/validatevat.phtml'); + } + return $this; + } + + /** + * Unset some non-related element parameters + * + * @param Varien_Data_Form_Element_Abstract $element + * @return string + */ + public function render(Varien_Data_Form_Element_Abstract $element) + { + $element->unsScope()->unsCanUseWebsiteValue()->unsCanUseDefaultValue(); + return parent::render($element); + } + + /** + * Get the button and scripts contents + * + * @param Varien_Data_Form_Element_Abstract $element + * @return string + */ + protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) + { + $originalData = $element->getOriginalData(); + $this->addData(array( + 'button_label' => Mage::helper('Mage_Customer_Helper_Data')->__($originalData['button_label']), + 'html_id' => $element->getHtmlId(), + 'ajax_url' => Mage::getSingleton('Mage_Adminhtml_Model_Url')->getUrl('*/customer_system_config_validatevat/validate') + )); + + return $this->_toHtml(); + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Dashboard.php b/app/code/core/Mage/Adminhtml/Block/Dashboard.php index 9c750ff650025..d3ca02a9933ed 100644 --- a/app/code/core/Mage/Adminhtml/Block/Dashboard.php +++ b/app/code/core/Mage/Adminhtml/Block/Dashboard.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Dashboard/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Dashboard/Abstract.php index 93ccbd1bd4a54..1f134e5e0c179 100644 --- a/app/code/core/Mage/Adminhtml/Block/Dashboard/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Dashboard/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Dashboard/Bar.php b/app/code/core/Mage/Adminhtml/Block/Dashboard/Bar.php index 9117b436bd9b2..27440af494974 100644 --- a/app/code/core/Mage/Adminhtml/Block/Dashboard/Bar.php +++ b/app/code/core/Mage/Adminhtml/Block/Dashboard/Bar.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Dashboard/Diagrams.php b/app/code/core/Mage/Adminhtml/Block/Dashboard/Diagrams.php index 390e2704fe21a..0de6169097d4d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Dashboard/Diagrams.php +++ b/app/code/core/Mage/Adminhtml/Block/Dashboard/Diagrams.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php b/app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php index fff9a3a967b14..c57342332369b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php +++ b/app/code/core/Mage/Adminhtml/Block/Dashboard/Graph.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Dashboard/Grid.php b/app/code/core/Mage/Adminhtml/Block/Dashboard/Grid.php index f101d7440dad2..17abc4ddcb73b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Dashboard/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Dashboard/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Dashboard/Grids.php b/app/code/core/Mage/Adminhtml/Block/Dashboard/Grids.php index 5df46ebdb36e5..09f70ee1028fa 100644 --- a/app/code/core/Mage/Adminhtml/Block/Dashboard/Grids.php +++ b/app/code/core/Mage/Adminhtml/Block/Dashboard/Grids.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Dashboard/Orders/Grid.php b/app/code/core/Mage/Adminhtml/Block/Dashboard/Orders/Grid.php index cb81cb0c63dbf..9df2dc29f336b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Dashboard/Orders/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Dashboard/Orders/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Dashboard/Sales.php b/app/code/core/Mage/Adminhtml/Block/Dashboard/Sales.php index 687cb6975e32b..76cc1dc213407 100644 --- a/app/code/core/Mage/Adminhtml/Block/Dashboard/Sales.php +++ b/app/code/core/Mage/Adminhtml/Block/Dashboard/Sales.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Dashboard/Searches/Last.php b/app/code/core/Mage/Adminhtml/Block/Dashboard/Searches/Last.php index 528d24b17b420..531ad5a8731fa 100644 --- a/app/code/core/Mage/Adminhtml/Block/Dashboard/Searches/Last.php +++ b/app/code/core/Mage/Adminhtml/Block/Dashboard/Searches/Last.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Dashboard/Searches/Renderer/Searchquery.php b/app/code/core/Mage/Adminhtml/Block/Dashboard/Searches/Renderer/Searchquery.php index 6b89b01c5ef70..932bd74e6ad4b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Dashboard/Searches/Renderer/Searchquery.php +++ b/app/code/core/Mage/Adminhtml/Block/Dashboard/Searches/Renderer/Searchquery.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Dashboard/Searches/Top.php b/app/code/core/Mage/Adminhtml/Block/Dashboard/Searches/Top.php index 6827c49a2fb5c..4f18eaa23fecb 100644 --- a/app/code/core/Mage/Adminhtml/Block/Dashboard/Searches/Top.php +++ b/app/code/core/Mage/Adminhtml/Block/Dashboard/Searches/Top.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Amounts.php b/app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Amounts.php index c55c472b55359..ad5169c640cf7 100644 --- a/app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Amounts.php +++ b/app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Amounts.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Customers/Most.php b/app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Customers/Most.php index 0910b9d287350..61e93f6d1aef7 100644 --- a/app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Customers/Most.php +++ b/app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Customers/Most.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Customers/Newest.php b/app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Customers/Newest.php index f10f8013b3f31..38ef358038f91 100644 --- a/app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Customers/Newest.php +++ b/app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Customers/Newest.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Orders.php b/app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Orders.php index 1310b90ab593e..89cd862654941 100644 --- a/app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Orders.php +++ b/app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Orders.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Products/Ordered.php b/app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Products/Ordered.php index d5cf584e8e3dc..f5ff92b2682f4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Products/Ordered.php +++ b/app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Products/Ordered.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Products/Viewed.php b/app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Products/Viewed.php index b458d4f506b8b..0a1eef69dd862 100644 --- a/app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Products/Viewed.php +++ b/app/code/core/Mage/Adminhtml/Block/Dashboard/Tab/Products/Viewed.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Dashboard/Totals.php b/app/code/core/Mage/Adminhtml/Block/Dashboard/Totals.php index e43b36db65e34..3c24ab0e44bb1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Dashboard/Totals.php +++ b/app/code/core/Mage/Adminhtml/Block/Dashboard/Totals.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Denied.php b/app/code/core/Mage/Adminhtml/Block/Denied.php index eeeb652814da3..e0b9db466090c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Denied.php +++ b/app/code/core/Mage/Adminhtml/Block/Denied.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Html/Date.php b/app/code/core/Mage/Adminhtml/Block/Html/Date.php index 7f07527f76d27..f946792abc7dd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Html/Date.php +++ b/app/code/core/Mage/Adminhtml/Block/Html/Date.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Html/Select.php b/app/code/core/Mage/Adminhtml/Block/Html/Select.php index dab8a3ca2e21f..6ab1974691d22 100644 --- a/app/code/core/Mage/Adminhtml/Block/Html/Select.php +++ b/app/code/core/Mage/Adminhtml/Block/Html/Select.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Media/Editor.php b/app/code/core/Mage/Adminhtml/Block/Media/Editor.php index ad90e5c413c92..84765e872207b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Media/Editor.php +++ b/app/code/core/Mage/Adminhtml/Block/Media/Editor.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Media/Uploader.php b/app/code/core/Mage/Adminhtml/Block/Media/Uploader.php index 061a8c0f922ce..7835decad2a00 100644 --- a/app/code/core/Mage/Adminhtml/Block/Media/Uploader.php +++ b/app/code/core/Mage/Adminhtml/Block/Media/Uploader.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -195,11 +195,12 @@ public function getDataMaxSizeInBytes() } /** - * Retrive full uploader SWF's file URL + * Retrieve full uploader SWF's file URL * Implemented to solve problem with cross domain SWFs * Now uploader can be only in the same URL where backend located * - * @param string url to uploader in current theme + * @param string $url url to uploader in current theme + * * @return string full URL */ public function getUploaderUrl($url) diff --git a/app/code/core/Mage/Adminhtml/Block/Messages.php b/app/code/core/Mage/Adminhtml/Block/Messages.php index 06dffe7f0a5c6..0ff5da661b805 100644 --- a/app/code/core/Mage/Adminhtml/Block/Messages.php +++ b/app/code/core/Mage/Adminhtml/Block/Messages.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem.php index 395e171a20b74..74f73e4a7f3f6 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid.php index fa5832ae02d6d..faa1ababdb815 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid/Filter/Checkbox.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid/Filter/Checkbox.php index bb10bace3a6f8..82043530b98c8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid/Filter/Checkbox.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid/Filter/Checkbox.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid/Renderer/Checkbox.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid/Renderer/Checkbox.php index 8e4d0238e59b7..1a45eb91dc38e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid/Renderer/Checkbox.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Problem/Grid/Renderer/Checkbox.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue.php index 4afed56549b40..80d8a5826d6c0 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit.php index 467f985c4a826..169f616cd90a9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit/Form.php index 5a049f3359d7a..448e8277e4430 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid.php index 4403a3ae18df6..811e5c9e2275b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid/Renderer/Action.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid/Renderer/Action.php index ba15789b729ba..1641b41701741 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid/Renderer/Action.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Grid/Renderer/Action.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Preview.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Preview.php index bd1cb9d683afd..90e969bdd5471 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Preview.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Preview.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Preview/Form.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Preview/Form.php index 5939a0c203d4c..9fbc38a8e6106 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Preview/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Queue/Preview/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber.php index 95e360c6e15ce..ffc107093e09b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid.php index a96d08bd7d62b..d3efd3aee1062 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Checkbox.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Checkbox.php index b154ea84339dc..9a3a1b9a8cb68 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Checkbox.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Checkbox.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Website.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Website.php index 9a24ff92bb3e2..7fbc843ca046d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Website.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Filter/Website.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Renderer/Checkbox.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Renderer/Checkbox.php index 66e841e03c038..1cfdc93dc105f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Renderer/Checkbox.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Subscriber/Grid/Renderer/Checkbox.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template.php index 33dcc6efc2329..dd1967206bd96 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit.php index 67d062a8ac6bd..5d34599122453 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit/Form.php index 63b5760ac125a..e4cddbed458e3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid.php index bb5e60268f768..8f497d66d5bb9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Action.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Action.php index fddc1967d1a44..9ddcb00afa79b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Action.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Action.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Sender.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Sender.php index 8f5bb82d78610..ad90b211907f3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Sender.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Grid/Renderer/Sender.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Preview.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Preview.php index 8feb49de7958a..fc89ae09a7494 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Preview.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Preview.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Preview/Form.php b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Preview/Form.php index ef39ea765f9df..5b7d506dffdfc 100644 --- a/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Preview/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Newsletter/Template/Preview/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Notification/Baseurl.php b/app/code/core/Mage/Adminhtml/Block/Notification/Baseurl.php index 94aafac8ca990..a41455c40a2fd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Notification/Baseurl.php +++ b/app/code/core/Mage/Adminhtml/Block/Notification/Baseurl.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Notification/Grid.php b/app/code/core/Mage/Adminhtml/Block/Notification/Grid.php index 3bdc2f24d614e..eccb17d690e69 100644 --- a/app/code/core/Mage/Adminhtml/Block/Notification/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Notification/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Notification/Grid/Renderer/Actions.php b/app/code/core/Mage/Adminhtml/Block/Notification/Grid/Renderer/Actions.php index eec1253464512..e24d4fe76cbc7 100644 --- a/app/code/core/Mage/Adminhtml/Block/Notification/Grid/Renderer/Actions.php +++ b/app/code/core/Mage/Adminhtml/Block/Notification/Grid/Renderer/Actions.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Notification/Grid/Renderer/Notice.php b/app/code/core/Mage/Adminhtml/Block/Notification/Grid/Renderer/Notice.php index 6243ddf0305ff..5b0f34580dd30 100644 --- a/app/code/core/Mage/Adminhtml/Block/Notification/Grid/Renderer/Notice.php +++ b/app/code/core/Mage/Adminhtml/Block/Notification/Grid/Renderer/Notice.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Notification/Grid/Renderer/Severity.php b/app/code/core/Mage/Adminhtml/Block/Notification/Grid/Renderer/Severity.php index bce8cb6a78fb0..bb34441c938cd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Notification/Grid/Renderer/Severity.php +++ b/app/code/core/Mage/Adminhtml/Block/Notification/Grid/Renderer/Severity.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Notification/Inbox.php b/app/code/core/Mage/Adminhtml/Block/Notification/Inbox.php index e7a2d1c3d8aef..44d65654385f9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Notification/Inbox.php +++ b/app/code/core/Mage/Adminhtml/Block/Notification/Inbox.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Notification/Security.php b/app/code/core/Mage/Adminhtml/Block/Notification/Security.php index 9459a83045b75..7e524804d6d09 100644 --- a/app/code/core/Mage/Adminhtml/Block/Notification/Security.php +++ b/app/code/core/Mage/Adminhtml/Block/Notification/Security.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Notification/Survey.php b/app/code/core/Mage/Adminhtml/Block/Notification/Survey.php index b53b53f01d312..5401ca3634433 100644 --- a/app/code/core/Mage/Adminhtml/Block/Notification/Survey.php +++ b/app/code/core/Mage/Adminhtml/Block/Notification/Survey.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Notification/Toolbar.php b/app/code/core/Mage/Adminhtml/Block/Notification/Toolbar.php index d95bf115e9773..a906da0d6fafa 100644 --- a/app/code/core/Mage/Adminhtml/Block/Notification/Toolbar.php +++ b/app/code/core/Mage/Adminhtml/Block/Notification/Toolbar.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Notification/Window.php b/app/code/core/Mage/Adminhtml/Block/Notification/Window.php index bba13e15d48b0..5673b22ecec72 100644 --- a/app/code/core/Mage/Adminhtml/Block/Notification/Window.php +++ b/app/code/core/Mage/Adminhtml/Block/Notification/Window.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Page.php b/app/code/core/Mage/Adminhtml/Block/Page.php index 308aa0745cc3a..4b4e66d360e99 100644 --- a/app/code/core/Mage/Adminhtml/Block/Page.php +++ b/app/code/core/Mage/Adminhtml/Block/Page.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Page/Footer.php b/app/code/core/Mage/Adminhtml/Block/Page/Footer.php index 53c95b17eb489..9a7282f0570c8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Page/Footer.php +++ b/app/code/core/Mage/Adminhtml/Block/Page/Footer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Page/Head.php b/app/code/core/Mage/Adminhtml/Block/Page/Head.php index d146d043daedd..b654a150f9403 100644 --- a/app/code/core/Mage/Adminhtml/Block/Page/Head.php +++ b/app/code/core/Mage/Adminhtml/Block/Page/Head.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Page/Header.php b/app/code/core/Mage/Adminhtml/Block/Page/Header.php index 4e0a05826e3e7..4751e991680c2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Page/Header.php +++ b/app/code/core/Mage/Adminhtml/Block/Page/Header.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Page/Menu.php b/app/code/core/Mage/Adminhtml/Block/Page/Menu.php index cf7fcc6acb7c1..d4036a8c0a37b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Page/Menu.php +++ b/app/code/core/Mage/Adminhtml/Block/Page/Menu.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Page/Notices.php b/app/code/core/Mage/Adminhtml/Block/Page/Notices.php index 4b9c4a9956647..0ae1c05099941 100644 --- a/app/code/core/Mage/Adminhtml/Block/Page/Notices.php +++ b/app/code/core/Mage/Adminhtml/Block/Page/Notices.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Buttons.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Buttons.php index acfca95d5720c..b670116a6a13d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/Buttons.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Buttons.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Editroles.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Editroles.php index f8147b8ff9075..d2f1eb7aaad6a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/Editroles.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Editroles.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Grid/Role.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Grid/Role.php index ab3cf3b586418..d27fd8067ace1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/Grid/Role.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Grid/Role.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Grid/User.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Grid/User.php index 82f4d069e5399..5e86970cea897 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/Grid/User.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Grid/User.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Role.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Role.php index b7ae80b7a3cca..6c43b2fb35dc0 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/Role.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Role.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Role/Grid/User.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Role/Grid/User.php index 1458283d01a9d..52fee442a6fb1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/Role/Grid/User.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Role/Grid/User.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Roles.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Roles.php index 949593c76c813..dfda51c8974cd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/Roles.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Roles.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Roleinfo.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Roleinfo.php index ca91a6017a362..7c00eea95e2cb 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Roleinfo.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Roleinfo.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesedit.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesedit.php index 2c90761e47797..288dbd2381022 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesedit.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesedit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesusers.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesusers.php index 88f8bdbb5a59f..db6289e7955ba 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesusers.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Rolesusers.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Useredit.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Useredit.php index 735a0280c83f2..43d93ab12823b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Useredit.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Useredit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Adminhtml_Block_Permissions_Tab_Useredit extends Mage_Adminhtml_Block_Widget_Form diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/User.php b/app/code/core/Mage/Adminhtml/Block/Permissions/User.php index 12176e873256a..1f4c302683bb9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/User.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/User.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -42,4 +42,14 @@ public function __construct() parent::__construct(); } + /** + * Prepare output HTML + * + * @return string + */ + protected function _toHtml() + { + Mage::dispatchEvent('permissions_user_html_before', array('block' => $this)); + return parent::_toHtml(); + } } diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit.php b/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit.php index 0298f781d9e02..5dd3aa5acdf45 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Form.php index 30a834336f101..9dee15e75510d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tab/Main.php b/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tab/Main.php index 29ccc8249c1d7..d87cdf44111ec 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tab/Main.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tab/Main.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tab/Roles.php b/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tab/Roles.php index 7ee6c07a7c461..0d9f8061267cc 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tab/Roles.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tab/Roles.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tabs.php index f2c98e04788c5..1758bdc2af05c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/User/Edit/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/User/Grid.php b/app/code/core/Mage/Adminhtml/Block/Permissions/User/Grid.php index 4b6d78a307c0f..f92b9b03d8fdc 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/User/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/User/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Permissions/Users.php b/app/code/core/Mage/Adminhtml/Block/Permissions/Users.php index 5ed922866afee..3d7fb972b97ce 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/Users.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Users.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Poll/Answer/Edit.php b/app/code/core/Mage/Adminhtml/Block/Poll/Answer/Edit.php index 81c302f3444da..6743578dc20f0 100644 --- a/app/code/core/Mage/Adminhtml/Block/Poll/Answer/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Poll/Answer/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Poll/Answer/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Poll/Answer/Edit/Form.php index 4f9489bb1d321..2cd67b1d9219f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Poll/Answer/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Poll/Answer/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Poll/Edit.php b/app/code/core/Mage/Adminhtml/Block/Poll/Edit.php index 20c8a95dc9409..eac54f7fbd89d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Poll/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Poll/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Form.php index 51bc2dc972fb2..476bfc7f9cd83 100644 --- a/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers.php b/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers.php index 5935a96294365..8d344d5b2a3d9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers.php +++ b/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers/Form.php b/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers/Form.php index db96bcf4fbb45..640b44008b9c1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers/Grid.php b/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers/Grid.php index 68a118d4ae261..93a7eb8fa307c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers/List.php b/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers/List.php index 01685ff866b0e..120c51482a643 100644 --- a/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers/List.php +++ b/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Answers/List.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Form.php b/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Form.php index bfec8b8d44190..4a753879f3cf1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tab/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -68,7 +68,8 @@ protected function _prepareForm() 'required' => true, 'name' => 'store_ids[]', 'values' => Mage::getSingleton('Mage_Adminhtml_Model_System_Store')->getStoreValuesForForm(), - 'value' => Mage::registry('poll_data')->getStoreIds() + 'value' => Mage::registry('poll_data')->getStoreIds(), + 'after_element_html' => Mage::getBlockSingleton('Mage_Adminhtml_Block_Store_Switcher')->getHintHtml() )); } else { diff --git a/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tabs.php index 29720ea02af8e..5686acbb97376 100644 --- a/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Poll/Edit/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Poll/Grid.php b/app/code/core/Mage/Adminhtml/Block/Poll/Grid.php index fc35b18dcd3e4..62b12e5812f75 100644 --- a/app/code/core/Mage/Adminhtml/Block/Poll/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Poll/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Poll/Poll.php b/app/code/core/Mage/Adminhtml/Block/Poll/Poll.php index 644aaffc5e5c5..719c660028823 100644 --- a/app/code/core/Mage/Adminhtml/Block/Poll/Poll.php +++ b/app/code/core/Mage/Adminhtml/Block/Poll/Poll.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Catalog.php b/app/code/core/Mage/Adminhtml/Block/Promo/Catalog.php index 6438342ff1ac6..ddd75e0a051b3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Catalog.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Catalog.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit.php b/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit.php index cc7efdff6b9b7..aaeb523be9f69 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit.php @@ -20,22 +20,22 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * description - * - * @category Mage - * @category Mage - * @package Mage_Adminhtml - * @author Magento Core Team + * Catalog rule edit form block */ class Mage_Adminhtml_Block_Promo_Catalog_Edit extends Mage_Adminhtml_Block_Widget_Form_Container { - + /** + * Initialize form + * Add standard buttons + * Add "Save and Apply" button + * Add "Save and Continue" button + */ public function __construct() { $this->_objectId = 'id'; @@ -43,33 +43,24 @@ public function __construct() parent::__construct(); - $this->_updateButton('save', 'label', Mage::helper('Mage_CatalogRule_Helper_Data')->__('Save Rule')); - $this->_updateButton('delete', 'label', Mage::helper('Mage_CatalogRule_Helper_Data')->__('Delete Rule')); - - $rule = Mage::registry('current_promo_catalog_rule'); - - if (!$rule || !$rule->isDeleteable()) { - $this->_removeButton('delete'); - } + $this->_addButton('save_apply', array( + 'class' => 'save', + 'label' => Mage::helper('Mage_CatalogRule_Helper_Data')->__('Save and Apply'), + 'onclick' => "$('rule_auto_apply').value=1; editForm.submit()", + )); - if (!$rule || !$rule->isReadonly()) { - $this->_addButton('save_apply', array( - 'class'=>'save', - 'label'=>Mage::helper('Mage_CatalogRule_Helper_Data')->__('Save and Apply'), - 'onclick'=>"$('rule_auto_apply').value=1; editForm.submit()", - )); - $this->_addButton('save_and_continue', array( - 'label' => Mage::helper('Mage_CatalogRule_Helper_Data')->__('Save and Continue Edit'), - 'onclick' => 'saveAndContinueEdit()', - 'class' => 'save' - ), 10); - $this->_formScripts[] = " function saveAndContinueEdit(){ editForm.submit($('edit_form').action + 'back/edit/') } "; - } else { - $this->_removeButton('reset'); - $this->_removeButton('save'); - } + $this->_addButton('save_and_continue_edit', array( + 'class' => 'save', + 'label' => Mage::helper('Mage_CatalogRule_Helper_Data')->__('Save and Continue Edit'), + 'onclick' => 'editForm.submit($(\'edit_form\').action + \'back/edit/\')', + ), 10); } + /** + * Getter for form header text + * + * @return string + */ public function getHeaderText() { $rule = Mage::registry('current_promo_catalog_rule'); diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Form.php index 559df8e80b0eb..a8d3203f3cff0 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Js.php b/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Js.php index 34cee5950f23c..5cfdd3dee02ac 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Js.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Js.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/Actions.php b/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/Actions.php index c97bbb087c33e..6335dc445a722 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/Actions.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/Actions.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/Conditions.php b/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/Conditions.php index 94dd87dbdf9d1..d7676cfbb0ce2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/Conditions.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/Conditions.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/Main.php b/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/Main.php index 0c5ac36d6d9fe..d1df446b14a6b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/Main.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tab/Main.php @@ -20,17 +20,16 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * description + * Catalog Rule General Information Tab * - * @category Mage - * @category Mage - * @package Mage_Adminhtml - * @author Magento Core Team + * @category Mage + * @package Mage_Adminhtml + * @author Magento Core Team */ class Mage_Adminhtml_Block_Promo_Catalog_Edit_Tab_Main extends Mage_Adminhtml_Block_Widget_Form @@ -57,7 +56,7 @@ public function getTabTitle() } /** - * Returns status flag about this tab can be showen or not + * Returns status flag about this tab can be showed or not * * @return true */ @@ -84,7 +83,9 @@ protected function _prepareForm() $form->setHtmlIdPrefix('rule_'); - $fieldset = $form->addFieldset('base_fieldset', array('legend'=>Mage::helper('Mage_CatalogRule_Helper_Data')->__('General Information'))); + $fieldset = $form->addFieldset('base_fieldset', + array('legend '=> Mage::helper('Mage_CatalogRule_Helper_Data')->__('General Information')) + ); $fieldset->addField('auto_apply', 'hidden', array( 'name' => 'auto_apply', @@ -121,34 +122,21 @@ protected function _prepareForm() ), )); - if (!Mage::app()->isSingleStoreMode()) { + if (Mage::app()->isSingleStoreMode()) { + $websiteId = Mage::app()->getStore(true)->getWebsiteId(); + $fieldset->addField('website_ids', 'hidden', array( + 'name' => 'website_ids[]', + 'value' => $websiteId + )); + $model->setWebsiteIds($websiteId); + } else { $fieldset->addField('website_ids', 'multiselect', array( - 'name' => 'website_ids[]', + 'name' => 'website_ids[]', 'label' => Mage::helper('Mage_CatalogRule_Helper_Data')->__('Websites'), 'title' => Mage::helper('Mage_CatalogRule_Helper_Data')->__('Websites'), - 'required' => true, - 'values' => Mage::getSingleton('Mage_Adminhtml_Model_System_Config_Source_Website')->toOptionArray(), - )); - } - else { - $fieldset->addField('website_ids', 'hidden', array( - 'name' => 'website_ids[]', - 'value' => Mage::app()->getStore(true)->getWebsiteId() + 'required' => true, + 'values' => Mage::getSingleton('Mage_Adminhtml_Model_System_Store')->getWebsiteValuesForForm() )); - $model->setWebsiteIds(Mage::app()->getStore(true)->getWebsiteId()); - } - - $customerGroups = Mage::getResourceModel('Mage_Customer_Model_Resource_Group_Collection') - ->load()->toOptionArray(); - - $found = false; - foreach ($customerGroups as $group) { - if ($group['value']==0) { - $found = true; - } - } - if (!$found) { - array_unshift($customerGroups, array('value'=>0, 'label'=>Mage::helper('Mage_CatalogRule_Helper_Data')->__('NOT LOGGED IN'))); } $fieldset->addField('customer_group_ids', 'multiselect', array( @@ -156,7 +144,7 @@ protected function _prepareForm() 'label' => Mage::helper('Mage_CatalogRule_Helper_Data')->__('Customer Groups'), 'title' => Mage::helper('Mage_CatalogRule_Helper_Data')->__('Customer Groups'), 'required' => true, - 'values' => $customerGroups, + 'values' => Mage::getResourceModel('Mage_Customer_Model_Resource_Group_Collection')->toOptionArray() )); $dateFormatIso = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT); diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tabs.php index 007f8e1018c8c..acaa5dc92b6b6 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Edit/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Grid.php b/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Grid.php index 6050519c40ecf..50a4e6e974a82 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Catalog/Grid.php @@ -20,21 +20,23 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * description + * Catalog Rules Grid * - * @category Mage - * @category Mage - * @package Mage_Adminhtml - * @author Magento Core Team + * @category Mage + * @package Mage_Adminhtml + * @author Magento Core Team */ class Mage_Adminhtml_Block_Promo_Catalog_Grid extends Mage_Adminhtml_Block_Widget_Grid { - + /** + * Initialize grid + * Set sort settings + */ public function __construct() { parent::__construct(); @@ -44,14 +46,29 @@ public function __construct() $this->setSaveParametersInSession(true); } + /** + * Add websites to catalog rules collection + * Set collection + * + * @return Mage_Adminhtml_Block_Promo_Catalog_Grid + */ protected function _prepareCollection() { + /** @var $collection Mage_CatalogRule_Model_Resource_Rule_Collection */ $collection = Mage::getModel('Mage_CatalogRule_Model_Rule') ->getResourceCollection(); + $collection->addWebsitesToResult(); $this->setCollection($collection); - return parent::_prepareCollection(); + + parent::_prepareCollection(); + return $this; } + /** + * Add grid columns + * + * @return Mage_Adminhtml_Block_Promo_Catalog_Grid + */ protected function _prepareColumns() { $this->addColumn('rule_id', array( @@ -96,9 +113,29 @@ protected function _prepareColumns() ), )); - return parent::_prepareColumns(); + if (!Mage::app()->isSingleStoreMode()) { + $this->addColumn('rule_website', array( + 'header' => Mage::helper('Mage_CatalogRule_Helper_Data')->__('Website'), + 'align' =>'left', + 'index' => 'website_ids', + 'type' => 'options', + 'sortable' => false, + 'options' => Mage::getSingleton('Mage_Adminhtml_Model_System_Store')->getWebsiteOptionHash(), + 'width' => 200, + )); + } + + parent::_prepareColumns(); + return $this; } + /** + * Retrieve row click URL + * + * @param Varien_Object $row + * + * @return string + */ public function getRowUrl($row) { return $this->getUrl('*/*/edit', array('id' => $row->getRuleId())); diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Quote.php b/app/code/core/Mage/Adminhtml/Block/Promo/Quote.php index c574c2e9e0af4..d18fdd616e57b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Quote.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Quote.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit.php b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit.php index 6e0582d23fa2c..39b76c15d2142 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit.php @@ -20,22 +20,22 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * description - * - * @category Mage - * @category Mage - * @package Mage_Adminhtml - * @author Magento Core Team + * Shopping cart rule edit form block */ class Mage_Adminhtml_Block_Promo_Quote_Edit extends Mage_Adminhtml_Block_Widget_Form_Container { + /** + * Initialize form + * Add standard buttons + * Add "Save and Continue" button + */ public function __construct() { $this->_objectId = 'id'; @@ -43,30 +43,18 @@ public function __construct() parent::__construct(); - $this->_updateButton('save', 'label', Mage::helper('Mage_SalesRule_Helper_Data')->__('Save Rule')); - $this->_updateButton('delete', 'label', Mage::helper('Mage_SalesRule_Helper_Data')->__('Delete Rule')); - - $rule = Mage::registry('current_promo_quote_rule'); - - if (!$rule || !$rule->isDeleteable()) { - $this->_removeButton('delete'); - } - - if ($rule && $rule->isReadonly()) { - $this->_removeButton('save'); - $this->_removeButton('reset'); - } else { - $this->_addButton('save_and_continue', array( - 'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Save and Continue Edit'), - 'onclick' => 'saveAndContinueEdit()', - 'class' => 'save' - ), 10); - $this->_formScripts[] = " function saveAndContinueEdit(){ editForm.submit($('edit_form').action + 'back/edit/') } "; - } - - #$this->setTemplate('promo/quote/edit.phtml'); + $this->_addButton('save_and_continue_edit', array( + 'class' => 'save', + 'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Save and Continue Edit'), + 'onclick' => 'editForm.submit($(\'edit_form\').action + \'back/edit/\')', + ), 10); } + /** + * Getter for form header text + * + * @return string + */ public function getHeaderText() { $rule = Mage::registry('current_promo_quote_rule'); @@ -78,6 +66,11 @@ public function getHeaderText() } } + /** + * Retrieve products JSON + * + * @return string + */ public function getProductsJson() { return '{}'; diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Form.php index 2115c3941c3b5..468c63a2714fb 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Actions.php b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Actions.php index d085c232e3000..44139c3263c06 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Actions.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Actions.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Conditions.php b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Conditions.php index e4e7ecf1a6fb8..0cf071b6976e4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Conditions.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Conditions.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons.php b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons.php new file mode 100644 index 0000000000000..2f778e2188b09 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons.php @@ -0,0 +1,88 @@ + + */ +class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Coupons + extends Mage_Adminhtml_Block_Text_List + implements Mage_Adminhtml_Block_Widget_Tab_Interface +{ + /** + * Prepare content for tab + * + * @return string + */ + public function getTabLabel() + { + return Mage::helper('Mage_SalesRule_Helper_Data')->__('Manage Coupon Codes'); + } + + /** + * Prepare title for tab + * + * @return string + */ + public function getTabTitle() + { + return Mage::helper('Mage_SalesRule_Helper_Data')->__('Manage Coupon Codes'); + } + + /** + * Returns status flag about this tab can be shown or not + * + * @return bool + */ + public function canShowTab() + { + return $this->_isEditing(); + } + + /** + * Returns status flag about this tab hidden or not + * + * @return bool + */ + public function isHidden() + { + return !$this->_isEditing(); + } + + /** + * Check whether we edit existing rule or adding new one + * + * @return bool + */ + protected function _isEditing() + { + $priceRule = Mage::registry('current_promo_quote_rule'); + return !is_null($priceRule->getRuleId()); + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Form.php b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Form.php new file mode 100644 index 0000000000000..78a5d4fdabdf0 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Form.php @@ -0,0 +1,147 @@ + + */ +class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Coupons_Form + extends Mage_Adminhtml_Block_Widget_Form +{ + /** + * Prepare coupon codes generation parameters form + * + * @return Mage_Adminhtml_Block_Widget_Form + */ + protected function _prepareForm() + { + $form = new Varien_Data_Form(); + + /** + * @var Mage_SalesRule_Helper_Coupon $couponHelper + */ + $couponHelper = Mage::helper('Mage_SalesRule_Helper_Coupon'); + + $model = Mage::registry('current_promo_quote_rule'); + $ruleId = $model->getId(); + + $form->setHtmlIdPrefix('coupons_'); + + $gridBlock = $this->getLayout()->getBlock('promo_quote_edit_tab_coupons_grid'); + $gridBlockJsObject = ''; + if ($gridBlock) { + $gridBlockJsObject = $gridBlock->getJsObjectName(); + } + + $fieldset = $form->addFieldset('information_fieldset', array('legend'=>Mage::helper('Mage_SalesRule_Helper_Data')->__('Coupons Information'))); + $fieldset->addClass('ignore-validate'); + + $fieldset->addField('rule_id', 'hidden', array( + 'name' => 'rule_id', + 'value' => $ruleId + )); + + $fieldset->addField('qty', 'text', array( + 'name' => 'qty', + 'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Coupon Qty'), + 'title' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Coupon Qty'), + 'required' => true, + 'class' => 'validate-digits validate-greater-than-zero' + )); + + $fieldset->addField('length', 'text', array( + 'name' => 'length', + 'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Code Length'), + 'title' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Code Length'), + 'required' => true, + 'note' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Excluding prefix, suffix and separators.'), + 'value' => $couponHelper->getDefaultLength(), + 'class' => 'validate-digits validate-greater-than-zero' + )); + + $fieldset->addField('format', 'select', array( + 'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Code Format'), + 'name' => 'format', + 'options' => $couponHelper->getFormatsList(), + 'required' => true, + 'value' => $couponHelper->getDefaultFormat() + )); + + $fieldset->addField('prefix', 'text', array( + 'name' => 'prefix', + 'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Code Prefix'), + 'title' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Code Prefix'), + 'value' => $couponHelper->getDefaultPrefix() + )); + + $fieldset->addField('suffix', 'text', array( + 'name' => 'suffix', + 'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Code Suffix'), + 'title' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Code Suffix'), + 'value' => $couponHelper->getDefaultSuffix() + )); + + $fieldset->addField('dash', 'text', array( + 'name' => 'dash', + 'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Dash Every X Characters'), + 'title' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Dash Every X Characters'), + 'note' => Mage::helper('Mage_SalesRule_Helper_Data')->__('If empty no separation.'), + 'value' => $couponHelper->getDefaultDashInterval(), + 'class' => 'validate-digits' + )); + + $idPrefix = $form->getHtmlIdPrefix(); + $generateUrl = $this->getGenerateUrl(); + + $fieldset->addField('generate_button', 'note', array( + 'text' => $this->getButtonHtml( + Mage::helper('Mage_SalesRule_Helper_Data')->__('Generate'), + "generateCouponCodes('{$idPrefix}' ,'{$generateUrl}', '{$gridBlockJsObject}')", + 'generate' + ) + )); + + $this->setForm($form); + + Mage::dispatchEvent('adminhtml_promo_quote_edit_tab_coupons_form_prepare_form', array('form' => $form)); + + return parent::_prepareForm(); + } + + /** + * Retrieve URL to Generate Action + * + * @return string + */ + public function getGenerateUrl() + { + return $this->getUrl('*/*/generate'); + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid.php b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid.php new file mode 100644 index 0000000000000..104f0707ed8fb --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid.php @@ -0,0 +1,146 @@ + + */ +class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Coupons_Grid extends Mage_Adminhtml_Block_Widget_Grid +{ + /** + * Constructor + */ + public function __construct() + { + parent::__construct(); + $this->setId('couponCodesGrid'); + $this->setUseAjax(true); + } + + /** + * Prepare collection for grid + * + * @return Mage_Adminhtml_Block_Widget_Grid + */ + protected function _prepareCollection() + { + $priceRule = Mage::registry('current_promo_quote_rule'); + + /** + * @var Mage_SalesRule_Model_Resource_Coupon_Collection $collection + */ + $collection = Mage::getResourceModel('Mage_SalesRule_Model_Resource_Coupon_Collection') + ->addRuleToFilter($priceRule) + ->addGeneratedCouponsFilter(); + + $this->setCollection($collection); + + return parent::_prepareCollection(); + } + + /** + * Define grid columns + * + * @return Mage_Adminhtml_Block_Widget_Grid + */ + protected function _prepareColumns() + { + $this->addColumn('code', array( + 'header' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Coupon Code'), + 'index' => 'code' + )); + + $this->addColumn('created_at', array( + 'header' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Created On'), + 'index' => 'created_at', + 'type' => 'datetime', + 'align' => 'center', + 'width' => '160' + )); + + $this->addColumn('used', array( + 'header' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Used'), + 'index' => 'times_used', + 'width' => '100', + 'type' => 'options', + 'options' => array( + Mage::helper('Mage_Adminhtml_Helper_Data')->__('No'), + Mage::helper('Mage_Adminhtml_Helper_Data')->__('Yes') + ), + 'renderer' => 'adminhtml/promo_quote_edit_tab_coupons_grid_column_renderer_used', + 'filter_condition_callback' => array( + Mage::getResourceModel('Mage_SalesRule_Model_Resource_Coupon_Collection'), 'addIsUsedFilterCallback' + ) + )); + + $this->addColumn('times_used', array( + 'header' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Times Used'), + 'index' => 'times_used', + 'width' => '50', + 'type' => 'number', + )); + + $this->addExportType('*/*/exportCouponsCsv', Mage::helper('Mage_Customer_Helper_Data')->__('CSV')); + $this->addExportType('*/*/exportCouponsXml', Mage::helper('Mage_Customer_Helper_Data')->__('Excel XML')); + return parent::_prepareColumns(); + } + + /** + * Configure grid mass actions + * + * @return Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Coupons_Grid + */ + protected function _prepareMassaction() + { + $this->setMassactionIdField('coupon_id'); + $this->getMassactionBlock()->setFormFieldName('ids'); + $this->getMassactionBlock()->setUseAjax(true); + $this->getMassactionBlock()->setHideFormElement(true); + + $this->getMassactionBlock()->addItem('delete', array( + 'label'=> Mage::helper('Mage_Adminhtml_Helper_Data')->__('Delete'), + 'url' => $this->getUrl('*/*/couponsMassDelete', array('_current' => true)), + 'confirm' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Are you sure you want to delete the selected coupon(s)?'), + 'complete' => 'refreshCouponCodesGrid' + )); + + return $this; + } + + /** + * Get grid url + * + * @return string + */ + public function getGridUrl() + { + return $this->getUrl('*/*/couponsGrid', array('_current'=> true)); + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid/Column/Renderer/Used.php b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid/Column/Renderer/Used.php new file mode 100755 index 0000000000000..42a6e3341b9c5 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Coupons/Grid/Column/Renderer/Used.php @@ -0,0 +1,42 @@ + + */ +class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Coupons_Grid_Column_Renderer_Used + extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Text +{ + public function render(Varien_Object $row) + { + $value = (int)$row->getData($this->getColumn()->getIndex()); + return empty($value) ? Mage::helper('Mage_Adminhtml_Helper_Data')->__('No') : Mage::helper('Mage_Adminhtml_Helper_Data')->__('Yes'); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Labels.php b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Labels.php index 672aec25cf2fa..361689760f588 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Labels.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Labels.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -89,6 +89,9 @@ protected function _prepareForm() 'legend' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Store View Specific Labels'), 'table_class' => 'form-list stores-tree', )); + $renderer = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset'); + $fieldset->setRenderer($renderer); + foreach (Mage::app()->getWebsites() as $website) { $fieldset->addField("w_{$website->getId()}_label", 'note', array( 'label' => $website->getName(), diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Main.php b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Main.php index 0d0062c1676aa..90c16d4e8a974 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Main.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Main.php @@ -20,17 +20,16 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * description + * Shopping Cart Price Rule General Information Tab * - * @category Mage - * @category Mage - * @package Mage_Adminhtml - * @author Magento Core Team + * @category Mage + * @package Mage_Adminhtml + * @author Magento Core Team */ class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Main extends Mage_Adminhtml_Block_Widget_Form @@ -57,7 +56,7 @@ public function getTabTitle() } /** - * Returns status flag about this tab can be showen or not + * Returns status flag about this tab can be showed or not * * @return true */ @@ -80,14 +79,11 @@ protected function _prepareForm() { $model = Mage::registry('current_promo_quote_rule'); - //$form = new Varien_Data_Form(array('id' => 'edit_form1', 'action' => $this->getData('action'), 'method' => 'post')); $form = new Varien_Data_Form(); - $form->setHtmlIdPrefix('rule_'); - $fieldset = $form->addFieldset( - 'base_fieldset', - array('legend'=>Mage::helper('Mage_SalesRule_Helper_Data')->__('General Information')) + $fieldset = $form->addFieldset('base_fieldset', + array('legend' => Mage::helper('Mage_SalesRule_Helper_Data')->__('General Information')) ); if ($model->getId()) { @@ -124,39 +120,41 @@ protected function _prepareForm() '0' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Inactive'), ), )); + if (!$model->getId()) { $model->setData('is_active', '1'); } - - if (!Mage::app()->isSingleStoreMode()) { - $fieldset->addField('website_ids', 'multiselect', array( - 'name' => 'website_ids[]', - 'label' => Mage::helper('Mage_CatalogRule_Helper_Data')->__('Websites'), - 'title' => Mage::helper('Mage_CatalogRule_Helper_Data')->__('Websites'), - 'required' => true, - 'values' => Mage::getSingleton('Mage_Adminhtml_Model_System_Config_Source_Website')->toOptionArray(), - )); - } - else { + if (Mage::app()->isSingleStoreMode()) { + $websiteId = Mage::app()->getStore(true)->getWebsiteId(); $fieldset->addField('website_ids', 'hidden', array( - 'name' => 'website_ids[]', - 'value' => Mage::app()->getStore(true)->getWebsiteId() + 'name' => 'website_ids[]', + 'value' => $websiteId + )); + $model->setWebsiteIds($websiteId); + } else { + $fieldset->addField('website_ids', 'multiselect', array( + 'name' => 'website_ids[]', + 'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Websites'), + 'title' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Websites'), + 'required' => true, + 'values' => Mage::getSingleton('Mage_Adminhtml_Model_System_Store')->getWebsiteValuesForForm() )); - $model->setWebsiteIds(Mage::app()->getStore(true)->getWebsiteId()); } - $customerGroups = Mage::getResourceModel('Mage_Customer_Model_Resource_Group_Collection') - ->load()->toOptionArray(); - + $customerGroups = Mage::getResourceModel('Mage_Customer_Model_Resource_Group_Collection')->load()->toOptionArray(); $found = false; + foreach ($customerGroups as $group) { if ($group['value']==0) { $found = true; } } if (!$found) { - array_unshift($customerGroups, array('value'=>0, 'label'=>Mage::helper('Mage_SalesRule_Helper_Data')->__('NOT LOGGED IN'))); + array_unshift($customerGroups, array( + 'value' => 0, + 'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('NOT LOGGED IN')) + ); } $fieldset->addField('customer_group_ids', 'multiselect', array( @@ -164,7 +162,7 @@ protected function _prepareForm() 'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Customer Groups'), 'title' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Customer Groups'), 'required' => true, - 'values' => $customerGroups, + 'values' => Mage::getResourceModel('Mage_Customer_Model_Resource_Group_Collection')->toOptionArray(), )); $couponTypeFiled = $fieldset->addField('coupon_type', 'select', array( @@ -180,6 +178,18 @@ protected function _prepareForm() 'required' => true, )); + $autoGenerationCheckbox = $fieldset->addField('use_auto_generation', 'checkbox', array( + 'name' => 'use_auto_generation', + 'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Use Auto Generation'), + 'note' => Mage::helper('Mage_SalesRule_Helper_Data')->__('If you select and save the rule you will be able to generate multiple coupon codes.'), + 'onclick' => 'handleCouponsTabContentActivity()', + 'checked' => (int)$model->getUseAutoGeneration() > 0 ? 'checked' : '' + )); + + $autoGenerationCheckbox->setRenderer( + $this->getLayout()->createBlock('Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Main_Renderer_Checkbox') + ); + $usesPerCouponFiled = $fieldset->addField('uses_per_coupon', 'text', array( 'name' => 'uses_per_coupon', 'label' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Uses per Coupon'), @@ -230,6 +240,8 @@ protected function _prepareForm() $form->setValues($model->getData()); + $autoGenerationCheckbox->setValue(1); + if ($model->isReadonly()) { foreach ($fieldset->getElements() as $element) { $element->setReadonly(true, true); @@ -245,11 +257,16 @@ protected function _prepareForm() ->createBlock('Mage_Adminhtml_Block_Widget_Form_Element_Dependence') ->addFieldMap($couponTypeFiled->getHtmlId(), $couponTypeFiled->getName()) ->addFieldMap($couponCodeFiled->getHtmlId(), $couponCodeFiled->getName()) + ->addFieldMap($autoGenerationCheckbox->getHtmlId(), $autoGenerationCheckbox->getName()) ->addFieldMap($usesPerCouponFiled->getHtmlId(), $usesPerCouponFiled->getName()) ->addFieldDependence( $couponCodeFiled->getName(), $couponTypeFiled->getName(), Mage_SalesRule_Model_Rule::COUPON_TYPE_SPECIFIC) + ->addFieldDependence( + $autoGenerationCheckbox->getName(), + $couponTypeFiled->getName(), + Mage_SalesRule_Model_Rule::COUPON_TYPE_SPECIFIC) ->addFieldDependence( $usesPerCouponFiled->getName(), $couponTypeFiled->getName(), diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Main/Renderer/Checkbox.php b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Main/Renderer/Checkbox.php new file mode 100644 index 0000000000000..b922bb526e3df --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tab/Main/Renderer/Checkbox.php @@ -0,0 +1,59 @@ + + */ +class Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Main_Renderer_Checkbox + extends Mage_Adminhtml_Block_Abstract + implements Varien_Data_Form_Element_Renderer_Interface +{ + /** + * Checkbox render function + * + * @param Varien_Data_Form_Element_Abstract $element + * @return string + */ + public function render(Varien_Data_Form_Element_Abstract $element) + { + $checkbox = new Varien_Data_Form_Element_Checkbox($element->getData()); + $checkbox->setForm($element->getForm()); + + $elementHtml = $checkbox->getElementHtml() . sprintf( + '

%s

', + $element->getHtmlId(), $element->getLabel(), $element->getNote() + ); + $html = ' '; + $html .= '' . $elementHtml . ''; + + return $html; + } + +} diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tabs.php index 9f607f0aca7c1..181bc26fa88a4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Edit/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Grid.php b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Grid.php index 567ec36a8d70c..a4df99204043b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Quote/Grid.php @@ -20,21 +20,23 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * description + * Shopping Cart Rules Grid * - * @category Mage - * @category Mage - * @package Mage_Adminhtml - * @author Magento Core Team + * @category Mage + * @package Mage_Adminhtml + * @author Magento Core Team */ class Mage_Adminhtml_Block_Promo_Quote_Grid extends Mage_Adminhtml_Block_Widget_Grid { - + /** + * Initialize grid + * Set sort settings + */ public function __construct() { parent::__construct(); @@ -44,14 +46,29 @@ public function __construct() $this->setSaveParametersInSession(true); } + /** + * Add websites to sales rules collection + * Set collection + * + * @return Mage_Adminhtml_Block_Promo_Quote_Grid + */ protected function _prepareCollection() { + /** @var $collection Mage_SalesRule_Model_Resource_Rule_Collection */ $collection = Mage::getModel('Mage_SalesRule_Model_Rule') ->getResourceCollection(); + $collection->addWebsitesToResult(); $this->setCollection($collection); - return parent::_prepareCollection(); + + parent::_prepareCollection(); + return $this; } + /** + * Add grid columns + * + * @return Mage_Adminhtml_Block_Promo_Quote_Grid + */ protected function _prepareColumns() { $this->addColumn('rule_id', array( @@ -103,15 +120,36 @@ protected function _prepareColumns() ), )); + if (!Mage::app()->isSingleStoreMode()) { + $this->addColumn('rule_website', array( + 'header' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Website'), + 'align' =>'left', + 'index' => 'website_ids', + 'type' => 'options', + 'sortable' => false, + 'options' => Mage::getSingleton('Mage_Adminhtml_Model_System_Store')->getWebsiteOptionHash(), + 'width' => 200, + )); + } + $this->addColumn('sort_order', array( 'header' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Priority'), 'align' => 'right', 'index' => 'sort_order', + 'width' => 100, )); - return parent::_prepareColumns(); + parent::_prepareColumns(); + return $this; } + /** + * Retrieve row click URL + * + * @param Varien_Object $row + * + * @return string + */ public function getRowUrl($row) { return $this->getUrl('*/*/edit', array('id' => $row->getRuleId())); diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser.php b/app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser.php index 28cb4c78eda25..d70740a5e163c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -103,6 +103,10 @@ protected function _prepareCollection() $collection = Mage::getModel('Mage_SalesRule_Model_Rule')->getResourceCollection(); $this->setCollection($collection); + Mage::dispatchEvent('adminhtml_block_promo_widget_chooser_prepare_collection', array( + 'collection' => $collection + )); + return parent::_prepareCollection(); } diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser/Daterange.php b/app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser/Daterange.php index 5ae0037b444c8..609dab77415a7 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser/Daterange.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser/Daterange.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser/Sku.php b/app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser/Sku.php index 4a089f14aac43..f6be73d220028 100644 --- a/app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser/Sku.php +++ b/app/code/core/Mage/Adminhtml/Block/Promo/Widget/Chooser/Sku.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Rating/Edit.php b/app/code/core/Mage/Adminhtml/Block/Rating/Edit.php index d2ae17ea99ab7..6cb2d330fa8c2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Rating/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Rating/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Rating/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Rating/Edit/Form.php index 9a05c7a3b4998..85c5d7111edce 100644 --- a/app/code/core/Mage/Adminhtml/Block/Rating/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Rating/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tab/Form.php b/app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tab/Form.php index 81f6a10e89f5b..cb0bd8203ff8a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tab/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tab/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -111,7 +111,8 @@ protected function _prepareForm() 'label' => Mage::helper('Mage_Rating_Helper_Data')->__('Visible In'), // 'required' => true, 'name' => 'stores[]', - 'values' => Mage::getSingleton('Mage_Adminhtml_Model_System_Store')->getStoreValuesForForm() + 'values' => Mage::getSingleton('Mage_Adminhtml_Model_System_Store')->getStoreValuesForForm(), + 'after_element_html' => Mage::getBlockSingleton('Mage_Adminhtml_Block_Store_Switcher')->getHintHtml() )); if (Mage::registry('rating_data')) { diff --git a/app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tab/Options.php b/app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tab/Options.php index b61ee1561d4e4..6cdd867bd2ea9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tab/Options.php +++ b/app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tab/Options.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tabs.php index d901c44568cab..bd103b980e366 100644 --- a/app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Rating/Edit/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Rating/Grid.php b/app/code/core/Mage/Adminhtml/Block/Rating/Grid.php index 5fb9ac1cd36b1..5c9ff3a609bc2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Rating/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Rating/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Rating/Rating.php b/app/code/core/Mage/Adminhtml/Block/Rating/Rating.php index 2c70205bd7ce9..e967b81f8eccc 100644 --- a/app/code/core/Mage/Adminhtml/Block/Rating/Rating.php +++ b/app/code/core/Mage/Adminhtml/Block/Rating/Rating.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Config/Form/Field/MtdStart.php b/app/code/core/Mage/Adminhtml/Block/Report/Config/Form/Field/MtdStart.php index 224f1e951f123..a1f5160b8d507 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Config/Form/Field/MtdStart.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Config/Form/Field/MtdStart.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Config/Form/Field/YtdStart.php b/app/code/core/Mage/Adminhtml/Block/Report/Config/Form/Field/YtdStart.php index 612ce30826604..cf16cab47e8c0 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Config/Form/Field/YtdStart.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Config/Form/Field/YtdStart.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Customer/Accounts.php b/app/code/core/Mage/Adminhtml/Block/Report/Customer/Accounts.php index bed85b8b3fb3a..47a237f87e823 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Customer/Accounts.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Customer/Accounts.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Customer/Accounts/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Customer/Accounts/Grid.php index c5c35bc497ecc..0c608c302e155 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Customer/Accounts/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Customer/Accounts/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Customer/Orders.php b/app/code/core/Mage/Adminhtml/Block/Report/Customer/Orders.php index ec70acc122bf2..509b8abc47ad2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Customer/Orders.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Customer/Orders.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Customer/Orders/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Customer/Orders/Grid.php index 0e837b93bc5d2..9ee9c64ab1c86 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Customer/Orders/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Customer/Orders/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Customer/Totals.php b/app/code/core/Mage/Adminhtml/Block/Report/Customer/Totals.php index 500a4029e9a77..3ed8fa38db786 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Customer/Totals.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Customer/Totals.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Customer/Totals/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Customer/Totals/Grid.php index adc0e5328bc43..2b4ac463f476d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Customer/Totals/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Customer/Totals/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Filter/Form.php b/app/code/core/Mage/Adminhtml/Block/Report/Filter/Form.php index ac2fc45c891cc..48b985c245bd4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Filter/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Filter/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Grid.php index 225dd82f645d1..b400c00f55a45 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Grid/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Report/Grid/Abstract.php index 5b131bfe6edea..7373473d67eff 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Grid/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Grid/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -159,9 +159,11 @@ protected function _prepareCollection() ->setPeriod($filterData->getData('period_type')) ->setDateRange($filterData->getData('from', null), $filterData->getData('to', null)) ->addStoreFilter($storeIds) - ->addOrderStatusFilter($filterData->getData('order_statuses')) ->setAggregatedColumns($this->_getAggregatedColumns()); + $this->_addOrderStatusFilter($resourceCollection, $filterData); + $this->_addCustomFilter($resourceCollection, $filterData); + if ($this->_isExport) { $this->setCollection($resourceCollection); return $this; @@ -185,9 +187,12 @@ protected function _prepareCollection() ->setPeriod($filterData->getData('period_type')) ->setDateRange($filterData->getData('from', null), $filterData->getData('to', null)) ->addStoreFilter($storeIds) - ->addOrderStatusFilter($filterData->getData('order_statuses')) ->setAggregatedColumns($this->_getAggregatedColumns()) ->isTotals(true); + + $this->_addOrderStatusFilter($totalsCollection, $filterData); + $this->_addCustomFilter($totalsCollection, $filterData); + foreach ($totalsCollection as $item) { $this->setTotals($item); break; @@ -208,9 +213,11 @@ public function getCountTotals() ->setPeriod($filterData->getData('period_type')) ->setDateRange($filterData->getData('from', null), $filterData->getData('to', null)) ->addStoreFilter($this->_getStoreIds()) - ->addOrderStatusFilter($filterData->getData('order_statuses')) ->setAggregatedColumns($this->_getAggregatedColumns()) ->isTotals(true); + + $this->_addOrderStatusFilter($totalsCollection, $filterData); + if (count($totalsCollection->getItems()) < 1 || !$filterData->getData('from')) { $this->setTotals(new Varien_Object()); } else { @@ -230,9 +237,11 @@ public function getSubTotals() ->setPeriod($filterData->getData('period_type')) ->setDateRange($filterData->getData('from', null), $filterData->getData('to', null)) ->addStoreFilter($this->_getStoreIds()) - ->addOrderStatusFilter($filterData->getData('order_statuses')) ->setAggregatedColumns($this->_getAggregatedColumns()) ->isSubTotals(true); + + $this->_addOrderStatusFilter($subTotalsCollection, $filterData); + $this->setSubTotals($subTotalsCollection->getItems()); return parent::getSubTotals(); } @@ -252,7 +261,7 @@ public function getCurrentCurrencyCode() } return $this->_currentCurrencyCode; } - + /** * Get currency rate (base to given currency) * @@ -263,4 +272,30 @@ public function getRate($toCurrency) { return Mage::app()->getStore()->getBaseCurrency()->getRate($toCurrency); } + + /** + * Add order status filter + * + * @param Mage_Reports_Model_Resource_Report_Collection_Abstract $collection + * @param Varien_Object $filterData + * @return Mage_Adminhtml_Block_Report_Grid_Abstract + */ + protected function _addOrderStatusFilter($collection, $filterData) + { + $collection->addOrderStatusFilter($filterData->getData('order_statuses')); + return $this; + } + + /** + * Adds custom filter to resource collection + * Can be overridden in child classes if custom filter needed + * + * @param Mage_Reports_Model_Resource_Report_Collection_Abstract $collection + * @param Varien_Object $filterData + * @return Mage_Adminhtml_Block_Report_Grid_Abstract + */ + protected function _addCustomFilter($collection, $filterData) + { + return $this; + } } diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Blanknumber.php b/app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Blanknumber.php index 112f47439e1cb..d6d780e24c3dd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Blanknumber.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Blanknumber.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Currency.php b/app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Currency.php index c22a7d3ba04b0..6a11bd9ad5138 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Currency.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Currency.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Customer.php b/app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Customer.php index 69c0840d0c910..bc444bbef0611 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Customer.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Customer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Product.php b/app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Product.php index a2b4a87519094..447e9baa6e687 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Product.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Grid/Column/Renderer/Product.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Grid/Shopcart.php b/app/code/core/Mage/Adminhtml/Block/Report/Grid/Shopcart.php index ad56636771dc0..2cc8d48efe872 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Grid/Shopcart.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Grid/Shopcart.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Product.php b/app/code/core/Mage/Adminhtml/Block/Report/Product.php index 89fc2fda0c6e3..449973aeac136 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Product.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Product.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads.php b/app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads.php index 9be7e57be3abe..4f76093eb96c8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads/Grid.php index 55c91fa73a51c..e2cba3fd031da 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads/Renderer/Purchases.php b/app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads/Renderer/Purchases.php index cb0f6f5aa3c99..62dffc57693a6 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads/Renderer/Purchases.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Product/Downloads/Renderer/Purchases.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Product/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Product/Grid.php index 6e8882f7fbc45..1cc0007e8e734 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Product/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Product/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Product/Lowstock.php b/app/code/core/Mage/Adminhtml/Block/Report/Product/Lowstock.php index 21af16014b428..ce636758120fe 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Product/Lowstock.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Product/Lowstock.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Product/Lowstock/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Product/Lowstock/Grid.php index f24df812255b3..5fbd939c57355 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Product/Lowstock/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Product/Lowstock/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Product/Sold.php b/app/code/core/Mage/Adminhtml/Block/Report/Product/Sold.php index 53e8db8d04c98..cff4cd59ce056 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Product/Sold.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Product/Sold.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Product/Sold/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Product/Sold/Grid.php index bf501f4f66ad0..ffb05118922ed 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Product/Sold/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Product/Sold/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Product/Viewed.php b/app/code/core/Mage/Adminhtml/Block/Report/Product/Viewed.php index b3be762a00719..d0416921e860f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Product/Viewed.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Product/Viewed.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -39,6 +39,22 @@ public function __construct() $this->_controller = 'report_product_viewed'; $this->_headerText = Mage::helper('Mage_Reports_Helper_Data')->__('Most Viewed'); parent::__construct(); + $this->setTemplate('report/grid/container.phtml'); $this->_removeButton('add'); + $this->addButton('filter_form_submit', array( + 'label' => Mage::helper('Mage_Reports_Helper_Data')->__('Show Report'), + 'onclick' => 'filterFormSubmit()' + )); + } + + /** + * Get filter url + * + * @return string + */ + public function getFilterUrl() + { + $this->getRequest()->setParam('filter', null); + return $this->getUrl('*/*/viewed', array('_current' => true)); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Product/Viewed/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Product/Viewed/Grid.php index 0977aff84194c..44f3d36e28296 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Product/Viewed/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Product/Viewed/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -31,49 +31,94 @@ * @package Mage_Adminhtml * @author Magento Core Team */ -class Mage_Adminhtml_Block_Report_Product_Viewed_Grid extends Mage_Adminhtml_Block_Report_Grid +class Mage_Adminhtml_Block_Report_Product_Viewed_Grid extends Mage_Adminhtml_Block_Report_Grid_Abstract { + /** + * Column for grid to be grouped by + * + * @var string + */ + protected $_columnGroupBy = 'period'; + /** + * Grid resource collection name + * + * @var string + */ + protected $_resourceCollectionName = 'Mage_Reports_Model_Resource_Product_Viewed_Collection'; + + /** + * Init grid parameters + */ public function __construct() { parent::__construct(); - $this->setId('gridViewedProducts'); - } - - protected function _prepareCollection() - { - parent::_prepareCollection(); - $this->getCollection()->initReport('Mage_Reports_Model_Resource_Product_Viewed_Collection'); + $this->setCountTotals(true); } + /** + * Custom columns preparation + * + * @return Mage_Adminhtml_Block_Widget_Grid + */ protected function _prepareColumns() { - $this->addColumn('name', array( - 'header' =>Mage::helper('Mage_Reports_Helper_Data')->__('Product Name'), - 'index' =>'name', - 'total' =>Mage::helper('Mage_Reports_Helper_Data')->__('Subtotal') + $this->addColumn('period', array( + 'header' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Period'), + 'index' => 'period', + 'width' => 100, + 'sortable' => false, + 'period_type' => $this->getPeriodType(), + 'renderer' => 'Mage_Adminhtml_Block_Report_Sales_Grid_Column_Renderer_Date', + 'totals_label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Total'), + 'html_decorators' => array('nobr'), + )); + + $this->addColumn('product_name', array( + 'header' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Product Name'), + 'index' => 'product_name', + 'type' => 'string', + 'sortable' => false )); - $this->addColumn('price', array( - 'header' => Mage::helper('Mage_Reports_Helper_Data')->__('Price'), - 'width' => '120px', + if ($this->getFilterData()->getStoreIds()) { + $this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds())); + } + $currencyCode = $this->getCurrentCurrencyCode(); + + $this->addColumn('product_price', array( + 'header' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Price'), 'type' => 'currency', - 'currency_code' => $this->getCurrentCurrencyCode(), - 'index' => 'price', + 'currency_code' => $currencyCode, + 'index' => 'product_price', + 'sortable' => false, + 'rate' => $this->getRate($currencyCode), )); - $this->addColumn('views', array( - 'header' =>Mage::helper('Mage_Reports_Helper_Data')->__('Number of Views'), - 'width' =>'120px', - 'align' =>'right', - 'index' =>'views', - 'total' =>'sum' + $this->addColumn('views_num', array( + 'header' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Number of Views'), + 'index' => 'views_num', + 'type' => 'number', + 'total' => 'sum', + 'sortable' => false )); - $this->addExportType('*/*/exportViewedCsv', Mage::helper('Mage_Reports_Helper_Data')->__('CSV')); - $this->addExportType('*/*/exportViewedExcel', Mage::helper('Mage_Reports_Helper_Data')->__('Excel XML')); + + $this->addExportType('*/*/exportViewedCsv', Mage::helper('Mage_Adminhtml_Helper_Data')->__('CSV')); + $this->addExportType('*/*/exportViewedExcel', Mage::helper('Mage_Adminhtml_Helper_Data')->__('Excel XML')); return parent::_prepareColumns(); } + /** + * Don't use orders in collection + * + * @param Mage_Reports_Model_Resource_Report_Collection_Abstract $collection + * @param Varien_Object $filterData + * @return Mage_Adminhtml_Block_Report_Grid_Abstract + */ + protected function _addOrderStatusFilter($collection, $filterData) + { + return $this; + } } diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Refresh/Statistics.php b/app/code/core/Mage/Adminhtml/Block/Report/Refresh/Statistics.php index 60567210c341e..196c6988e524c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Refresh/Statistics.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Refresh/Statistics.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Refresh/Statistics/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Refresh/Statistics/Grid.php index f7be00082f727..9b375d6192f04 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Refresh/Statistics/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Refresh/Statistics/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -97,7 +97,13 @@ protected function _prepareCollection() 'report' => Mage::helper('Mage_Sales_Helper_Data')->__('Bestsellers'), 'comment' => Mage::helper('Mage_Sales_Helper_Data')->__('Products Bestsellers Report'), 'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_BESTSELLERS_FLAG_CODE) - ) + ), + array( + 'id' => 'viewed', + 'report' => Mage::helper('Mage_Sales_Helper_Data')->__('Most Viewed'), + 'comment' => Mage::helper('Mage_Sales_Helper_Data')->__('Most Viewed Products Report'), + 'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_PRODUCT_VIEWED_FLAG_CODE) + ), ); foreach ($data as $value) { diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Review/Customer.php b/app/code/core/Mage/Adminhtml/Block/Report/Review/Customer.php index bc201f719180a..0bb956516b49c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Review/Customer.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Review/Customer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Review/Customer/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Review/Customer/Grid.php index 6e2323e86420b..26e1d3c9e692a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Review/Customer/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Review/Customer/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Review/Detail.php b/app/code/core/Mage/Adminhtml/Block/Report/Review/Detail.php index 3e19ffa3d99c2..acb8f2b9a3ce5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Review/Detail.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Review/Detail.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Review/Detail/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Review/Detail/Grid.php index 35632c83aaae6..6e1e82c1fc691 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Review/Detail/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Review/Detail/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Review/Product.php b/app/code/core/Mage/Adminhtml/Block/Report/Review/Product.php index 20cfdee1172ee..c57fc871f857d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Review/Product.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Review/Product.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Review/Product/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Review/Product/Grid.php index 70be59cf59451..4afc2bb6b3f9e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Review/Product/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Review/Product/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Bestsellers.php b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Bestsellers.php index e6524384f18d6..ae10b5da67ca5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Bestsellers.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Bestsellers.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Bestsellers/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Bestsellers/Grid.php index b97e66e2aff66..b45547a81a167 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Bestsellers/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Bestsellers/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Coupons.php b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Coupons.php index 42a8f5cb52d2c..44c5f28f567a3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Coupons.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Coupons.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Coupons/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Coupons/Grid.php index 7e8c3ee54d4b1..a3cc27901235b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Coupons/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Coupons/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -71,6 +71,12 @@ protected function _prepareColumns() 'index' => 'coupon_code' )); + $this->addColumn('rule_name', array( + 'header' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Shopping Cart Price Rule'), + 'sortable' => false, + 'index' => 'rule_name' + )); + $this->addColumn('coupon_uses', array( 'header' => Mage::helper('Mage_SalesRule_Helper_Data')->__('Number of Uses'), 'sortable' => false, @@ -150,4 +156,24 @@ protected function _prepareColumns() return parent::_prepareColumns(); } + + /** + * Add price rule filter + * + * @param Mage_Reports_Model_Resource_Report_Collection_Abstract $collection + * @param Varien_Object $filterData + * @return Mage_Adminhtml_Block_Report_Grid_Abstract + */ + protected function _addCustomFilter($collection, $filterData) + { + if ($filterData->getPriceRuleType()) { + $rulesList = $filterData->getData('rules_list'); + if (isset($rulesList[0])) { + $rulesIds = explode(',', $rulesList[0]); + $collection->addRuleFilter($rulesIds); + } + } + + return parent::_addCustomFilter($filterData, $collection); + } } diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Grid/Column/Renderer/Date.php b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Grid/Column/Renderer/Date.php index 704fddc6e7200..d51584421b7a6 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Grid/Column/Renderer/Date.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Grid/Column/Renderer/Date.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Invoiced.php b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Invoiced.php index 17fa760cbcabb..84bc0cb5e2ec7 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Invoiced.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Invoiced.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Invoiced/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Invoiced/Grid.php index 6b6afca319228..5797984df029c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Invoiced/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Invoiced/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Refunded.php b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Refunded.php index 7c0f6f3ce05b2..1005f3489f57e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Refunded.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Refunded.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Refunded/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Refunded/Grid.php index 9319edc3c8991..a6ead9d286096 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Refunded/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Refunded/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Sales.php b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Sales.php index 23accdffb75b1..5453ce4d97e92 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Sales.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Sales.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Sales/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Sales/Grid.php index 7019851792e80..9288f97e78d5b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Sales/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Sales/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Shipping.php b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Shipping.php index 35f35212bcd62..dc3bca9836bff 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Shipping.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Shipping.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Shipping/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Shipping/Grid.php index 531b3461e3eb0..37bc997b4b34e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Shipping/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Shipping/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Tax.php b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Tax.php index 15319f6909e09..9ce1f72896f3b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Tax.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Tax.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Tax/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Tax/Grid.php index a444ed8b59ff4..b68c9ca514cbe 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Tax/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Tax/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Search.php b/app/code/core/Mage/Adminhtml/Block/Report/Search.php index 9b36108be24b4..fd4e6e9f32ff9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Search.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Search.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Search/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Search/Grid.php index d40e25418b651..de5cb6a32dafb 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Search/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Search/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Abandoned.php b/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Abandoned.php index 7755a89d3149f..74534f9c42ac4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Abandoned.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Abandoned.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Abandoned/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Abandoned/Grid.php index e41de634aaf97..b148285d05678 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Abandoned/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Abandoned/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Customer.php b/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Customer.php index b4f7aac251fcf..adf338ef44d31 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Customer.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Customer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Customer/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Customer/Grid.php index 503278abbd9ea..00cea8f443aab 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Customer/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Customer/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Product.php b/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Product.php index 1fbf809d4eb64..d53272dc0c5bb 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Product.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Product.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Product/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Product/Grid.php index be7259c7a50c7..1ccb4542187f3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Product/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Shopcart/Product/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer.php b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer.php index d737209ad63b0..2d8984c80621f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer/Detail.php b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer/Detail.php index cfe9cadb28223..60562550a92b6 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer/Detail.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer/Detail.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer/Detail/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer/Detail/Grid.php index 58ae3eaaf1148..f6ab7795b866b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer/Detail/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer/Detail/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer/Grid.php index 4c64041c7b23f..e667ae47121c9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Customer/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Popular.php b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Popular.php index bee076d400934..f6427c30aa0be 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Popular.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Popular.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Popular/Detail.php b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Popular/Detail.php index dd74f4eb52110..9932ee540e68c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Popular/Detail.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Popular/Detail.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Popular/Detail/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Popular/Detail/Grid.php index 5dcdd87ce19e9..96d816861c8c0 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Popular/Detail/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Popular/Detail/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Popular/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Popular/Grid.php index c0fa5b17f5af8..f8c9b57ce5f3e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Popular/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Popular/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Product.php b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Product.php index fb2b8da234ac2..2bb3f0f50d1ac 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Product.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Product.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Product/Detail.php b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Product/Detail.php index 50f5e94975381..cddb0869fa2d1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Product/Detail.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Product/Detail.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Product/Detail/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Product/Detail/Grid.php index 134b817a54417..8564f6325e2a7 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Product/Detail/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Product/Detail/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Product/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Product/Grid.php index 2f15b9a6cf296..857ad36fb74da 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Tag/Product/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Tag/Product/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Wishlist.php b/app/code/core/Mage/Adminhtml/Block/Report/Wishlist.php index d15ecd7a2b1c4..f1a9f41284b9c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Wishlist.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Wishlist.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Report/Wishlist/Grid.php b/app/code/core/Mage/Adminhtml/Block/Report/Wishlist/Grid.php index 25b1cea1e69ff..254e39c280a01 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Wishlist/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Wishlist/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Review/Add.php b/app/code/core/Mage/Adminhtml/Block/Review/Add.php index 7495871b8eab3..5096863702c5a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Add.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Add.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Review/Add/Form.php b/app/code/core/Mage/Adminhtml/Block/Review/Add/Form.php index 683bf4094a296..e237d79ad803b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Add/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Add/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -54,8 +54,7 @@ protected function _prepareForm() 'label' => Mage::helper('Mage_Review_Helper_Data')->__('Product Rating'), 'required' => true, 'text' => '
' - . $this->getLayout()->createBlock('Mage_Adminhtml_Block_Review_Rating_Detailed')->toHtml() - . '
', + . $this->getLayout()->createBlock('Mage_Adminhtml_Block_Review_Rating_Detailed')->toHtml() . '', )); $fieldset->addField('status_id', 'select', array( @@ -73,7 +72,8 @@ protected function _prepareForm() 'label' => Mage::helper('Mage_Review_Helper_Data')->__('Visible In'), 'required' => true, 'name' => 'select_stores[]', - 'values' => Mage::getSingleton('Mage_Adminhtml_Model_System_Store')->getStoreValuesForForm() + 'values' => Mage::getSingleton('Mage_Adminhtml_Model_System_Store')->getStoreValuesForForm(), + 'after_element_html' => Mage::getBlockSingleton('Mage_Adminhtml_Block_Store_Switcher')->getHintHtml() )); } diff --git a/app/code/core/Mage/Adminhtml/Block/Review/Edit.php b/app/code/core/Mage/Adminhtml/Block/Review/Edit.php index b88b1609656f8..9c821c72e6e79 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Review/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Review/Edit/Form.php index 84b82b15b1bee..9e98750af8389 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -58,11 +58,7 @@ protected function _prepareForm() )); if ($customer->getId()) { - $customerText = Mage::helper('Mage_Review_Helper_Data')->__('%2$s %3$s (%4$s)', - $this->getUrl('*/customer/edit', array('id' => $customer->getId(), 'active_tab'=>'review')), - $this->escapeHtml($customer->getFirstname()), - $this->escapeHtml($customer->getLastname()), - $this->escapeHtml($customer->getEmail())); + $customerText = Mage::helper('Mage_Review_Helper_Data')->__('%2$s %3$s (%4$s)', $this->getUrl('*/customer/edit', array('id' => $customer->getId(), 'active_tab'=>'review')), $this->escapeHtml($customer->getFirstname()), $this->escapeHtml($customer->getLastname()), $this->escapeHtml($customer->getEmail())); } else { if (is_null($review->getCustomerId())) { $customerText = Mage::helper('Mage_Review_Helper_Data')->__('Guest'); @@ -85,8 +81,8 @@ protected function _prepareForm() 'label' => Mage::helper('Mage_Review_Helper_Data')->__('Detailed Rating'), 'required' => true, 'text' => '
' - . $this->getLayout()->createBlock('Mage_Adminhtml_Block_Review_Rating_Detailed')->toHtml() - . '
', + . $this->getLayout()->createBlock('Mage_Adminhtml_Block_Review_Rating_Detailed')->toHtml() + . '', )); $fieldset->addField('status_id', 'select', array( @@ -104,7 +100,8 @@ protected function _prepareForm() 'label' => Mage::helper('Mage_Review_Helper_Data')->__('Visible In'), 'required' => true, 'name' => 'stores[]', - 'values' => Mage::getSingleton('Mage_Adminhtml_Model_System_Store')->getStoreValuesForForm() + 'values' => Mage::getSingleton('Mage_Adminhtml_Model_System_Store')->getStoreValuesForForm(), + 'after_element_html' => Mage::getBlockSingleton('Mage_Adminhtml_Block_Store_Switcher')->getHintHtml() )); $review->setSelectStores($review->getStores()); } diff --git a/app/code/core/Mage/Adminhtml/Block/Review/Grid.php b/app/code/core/Mage/Adminhtml/Block/Review/Grid.php index 6be785f4114d5..68b91465bdd07 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -47,12 +47,20 @@ protected function _prepareCollection() $collection = $model->getProductCollection(); if ($this->getProductId() || $this->getRequest()->getParam('productId', false)) { - $this->setProductId(($this->getProductId() ? $this->getProductId() : $this->getRequest()->getParam('productId'))); + $productId = $this->getProductId(); + if (!$productId) { + $productId = $this->getRequest()->getParam('productId'); + } + $this->setProductId($productId); $collection->addEntityFilter($this->getProductId()); } if ($this->getCustomerId() || $this->getRequest()->getParam('customerId', false)) { - $this->setCustomerId(($this->getCustomerId() ? $this->getCustomerId() : $this->getRequest()->getParam('customerId'))); + $customerId = $this->getCustomerId(); + if (!$customerId){ + $customerId = $this->getRequest()->getParam('customerId'); + } + $this->setCustomerId($customerId); $collection->addCustomerFilter($this->getCustomerId()); } @@ -211,12 +219,16 @@ protected function _prepareColumns() protected function _prepareMassaction() { $this->setMassactionIdField('review_id'); + $this->setMassactionIdFilter('rt.review_id'); $this->setMassactionIdFieldOnlyIndexValue(true); $this->getMassactionBlock()->setFormFieldName('reviews'); $this->getMassactionBlock()->addItem('delete', array( 'label'=> Mage::helper('Mage_Review_Helper_Data')->__('Delete'), - 'url' => $this->getUrl('*/*/massDelete', array('ret' => Mage::registry('usePendingFilter') ? 'pending' : 'index')), + 'url' => $this->getUrl( + '*/*/massDelete', + array('ret' => Mage::registry('usePendingFilter') ? 'pending' : 'index') + ), 'confirm' => Mage::helper('Mage_Review_Helper_Data')->__('Are you sure?') )); @@ -227,7 +239,10 @@ protected function _prepareMassaction() array_unshift($statuses, array('label'=>'', 'value'=>'')); $this->getMassactionBlock()->addItem('update_status', array( 'label' => Mage::helper('Mage_Review_Helper_Data')->__('Update Status'), - 'url' => $this->getUrl('*/*/massUpdateStatus', array('ret' => Mage::registry('usePendingFilter') ? 'pending' : 'index')), + 'url' => $this->getUrl( + '*/*/massUpdateStatus', + array('ret' => Mage::registry('usePendingFilter') ? 'pending' : 'index') + ), 'additional' => array( 'status' => array( 'name' => 'status', @@ -253,12 +268,15 @@ public function getRowUrl($row) public function getGridUrl() { if( $this->getProductId() || $this->getCustomerId() ) { - return $this->getUrl('*/catalog_product_review/' . (Mage::registry('usePendingFilter') ? 'pending' : ''), array( - 'productId' => $this->getProductId(), - 'customerId' => $this->getCustomerId(), - )); + return $this->getUrl( + '*/catalog_product_review/' . (Mage::registry('usePendingFilter') ? 'pending' : ''), + array( + 'productId' => $this->getProductId(), + 'customerId' => $this->getCustomerId(), + ) + ); } else { return $this->getCurrentUrl(); } } -} +} \ No newline at end of file diff --git a/app/code/core/Mage/Adminhtml/Block/Review/Grid/Filter/Type.php b/app/code/core/Mage/Adminhtml/Block/Review/Grid/Filter/Type.php index 7e9bbf7087a70..1aa24f50bef0b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Grid/Filter/Type.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Grid/Filter/Type.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Review/Grid/Renderer/Type.php b/app/code/core/Mage/Adminhtml/Block/Review/Grid/Renderer/Type.php index 8c9b77e3bbd09..8414a101057b6 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Grid/Renderer/Type.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Grid/Renderer/Type.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Review/Main.php b/app/code/core/Mage/Adminhtml/Block/Review/Main.php index 930bed3c476e3..72e595e6804ae 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Main.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Main.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Review/Product/Grid.php b/app/code/core/Mage/Adminhtml/Block/Review/Product/Grid.php index 0bdfe306fc4e9..00512541127af 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Product/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Product/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Review/Rating/Detailed.php b/app/code/core/Mage/Adminhtml/Block/Review/Rating/Detailed.php index db64b9a94ffc9..6f14ada7cc90b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Rating/Detailed.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Rating/Detailed.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Review/Rating/Summary.php b/app/code/core/Mage/Adminhtml/Block/Review/Rating/Summary.php index 62209d61e4dcb..03595184c74fb 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Rating/Summary.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Rating/Summary.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo.php b/app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo.php index f86d390cf4c46..a0c606f32b863 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo/Grid.php index 1f1ae7ff878b0..e87763b7b9356 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Creditmemo/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Invoice.php b/app/code/core/Mage/Adminhtml/Block/Sales/Invoice.php index 7d7b0cfe01bcc..5ac099b9e756b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Invoice.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Invoice.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Invoice/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sales/Invoice/Grid.php index f31944adeb8cc..e43ff053c8105 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Invoice/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Invoice/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Items/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Sales/Items/Abstract.php index 11c3967157ef4..d02f569b6eb2a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Items/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Items/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Default.php b/app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Default.php index ef0d0196a7e9c..d6181335a82ba 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Default.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Default.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Name.php b/app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Name.php index 7550357243b50..320111ec41ca0 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Name.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Name.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Name/Grouped.php b/app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Name/Grouped.php index a216d92eebcf3..849a342a89868 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Name/Grouped.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Name/Grouped.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Qty.php b/app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Qty.php index 6a5294d9cc8fa..3e85a97fa74ce 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Qty.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Qty.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Items/Renderer/Configurable.php b/app/code/core/Mage/Adminhtml/Block/Sales/Items/Renderer/Configurable.php index e7d281dc70346..19ac5d6b04872 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Items/Renderer/Configurable.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Items/Renderer/Configurable.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Items/Renderer/Default.php b/app/code/core/Mage/Adminhtml/Block/Sales/Items/Renderer/Default.php index 6f17e08eba5f4..7ec8e74241c82 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Items/Renderer/Default.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Items/Renderer/Default.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order.php index 2af514c0dae4c..d07c8bb425f0e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Abstract.php index 12696b7b06805..cfab3669406d4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Address.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Address.php index e992f1bbeded8..f2da47b838f35 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Address.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Address.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Address/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Address/Form.php index bcb4b98255bf4..6397dd7239d27 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Address/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Address/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Comments/View.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Comments/View.php index d2534e65c617a..9c5c17cfacc33 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Comments/View.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Comments/View.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create.php index 4d95c20ff2db7..33c7984ff868c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -56,6 +56,8 @@ public function __construct() } $this->_updateButton('back', 'id', 'back_order_top_button'); + $this->_updateButton('back', 'onclick', 'setLocation(\'' . $this->getBackUrl() . '\')'); + $this->_updateButton('reset', 'id', 'reset_order_top_button'); if (is_null($customerId)) { @@ -122,4 +124,14 @@ public function getCancelUrl() return $url; } + + /** + * Get URL for back (reset) button + * + * @return string + */ + public function getBackUrl() + { + return $this->getUrl('*/' . $this->_controller . '/'); + } } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Abstract.php index 55bae951fcea0..71a4e34e8205b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Billing/Address.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Billing/Address.php index c67abe60f3b0d..ecbea6b539c6e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Billing/Address.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Billing/Address.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -62,6 +62,7 @@ public function getHeaderCssClass() */ protected function _prepareForm() { + $this->setJsVariablePrefix('billingAddress'); parent::_prepareForm(); $this->_form->addFieldNameSuffix('order[billing_address]'); diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Billing/Method.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Billing/Method.php index 55b55bcfa64eb..b342f5faf1ef0 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Billing/Method.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Billing/Method.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Billing/Method/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Billing/Method/Form.php index 8f9af3bf45fa2..a3c1661217467 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Billing/Method/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Billing/Method/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Comment.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Comment.php index 050693a66545b..d6fd2d777ec4c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Comment.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Comment.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Coupons.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Coupons.php index 5b4cfb38741e3..93ce6e82c134e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Coupons.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Coupons.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Coupons/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Coupons/Form.php index 5d25132133d95..ac37cfe6efc1f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Coupons/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Coupons/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Customer.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Customer.php index b598a0b33874e..81903b3b289ad 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Customer.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Customer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Customer/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Customer/Grid.php index f2b39121dd66f..ea55e7b62f95a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Customer/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Customer/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Data.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Data.php index 66ec5c963b15d..8cbd45ab686ed 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Data.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Data.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form.php index 2f52276bdca8d..007d0f70ebacd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Abstract.php index 3d04629278d9d..547ff84a8bdd4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -148,7 +148,7 @@ protected function _addAttributesToForm($attributes, Varien_Data_Form_Abstract $ if ($inputType) { $element = $form->addField($attribute->getAttributeCode(), $inputType, array( 'name' => $attribute->getAttributeCode(), - 'label' => $attribute->getStoreLabel(), + 'label' => $this->__($attribute->getStoreLabel()), 'class' => $attribute->getFrontend()->getClass(), 'required' => $attribute->getIsRequired(), )); diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Account.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Account.php index 636361558f3a1..b4d009cd94596 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Account.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Account.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Address.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Address.php index 515237c86151f..9d6d0f57e1ead 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Address.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Form/Address.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -31,7 +31,8 @@ * @package Mage_Adminhtml * @author Magento Core Team */ -class Mage_Adminhtml_Block_Sales_Order_Create_Form_Address extends Mage_Adminhtml_Block_Sales_Order_Create_Form_Abstract +class Mage_Adminhtml_Block_Sales_Order_Create_Form_Address + extends Mage_Adminhtml_Block_Sales_Order_Create_Form_Abstract { /** * Customer Address Form instance @@ -83,7 +84,9 @@ public function getAddressCollectionJson() foreach ($this->getAddressCollection() as $address) { $addressForm->setEntity($address); - $data[$address->getId()] = $addressForm->outputData(Mage_Customer_Model_Attribute_Data::OUTPUT_FORMAT_JSON); + $data[$address->getId()] = $addressForm->outputData( + Mage_Customer_Model_Attribute_Data::OUTPUT_FORMAT_JSON + ); } return Mage::helper('Mage_Core_Helper_Data')->jsonEncode($data); } @@ -169,6 +172,15 @@ protected function _prepareForm() ); } + // Set custom renderer for VAT field if needed + $vatIdElement = $this->_form->getElement('vat_id'); + if ($vatIdElement && $this->getDisplayVatValidationButton() !== false) { + $vatIdElement->setRenderer( + $this->getLayout()->createBlock('Mage_Adminhtml_Block_Customer_Sales_Order_Address_Form_Renderer_Vat') + ->setJsVariablePrefix($this->getJsVariablePrefix()) + ); + } + return $this; } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Giftmessage.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Giftmessage.php index 19a94e05f4f62..6d2fd6a0ef9d3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Giftmessage.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Giftmessage.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Giftmessage/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Giftmessage/Form.php index 714f3c3acab4e..eb6c30d1412e0 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Giftmessage/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Giftmessage/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Header.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Header.php index da7a157ad20fc..bc4163f3bc16f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Header.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Header.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items.php index 2bfa33bb7d307..6916e636e341b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,38 +29,78 @@ * * @category Mage * @package Mage_Adminhtml - * @author Magento Core Team + * @author Magento Core Team */ class Mage_Adminhtml_Block_Sales_Order_Create_Items extends Mage_Adminhtml_Block_Sales_Order_Create_Abstract { + /** + * Contains button descriptions to be shown at the top of accordion + * @var array + */ + protected $_buttons = array(); + + /** + * Define block ID + */ public function __construct() { parent::__construct(); $this->setId('sales_order_create_items'); } + /** + * Accordion header text + * + * @return string + */ public function getHeaderText() { return Mage::helper('Mage_Sales_Helper_Data')->__('Items Ordered'); } + /** + * Returns all visible items + * + * @return array + */ public function getItems() { -// return $this->getQuote()->getAllItems(); return $this->getQuote()->getAllVisibleItems(); } + /** + * Add button to the items header + * + * @param $args array + */ + public function addButton($args) + { + $this->_buttons[] = $args; + } + + /** + * Render buttons and return HTML code + * + * @return string + */ public function getButtonsHtml() { - $addButtonData = array( - 'label' => Mage::helper('Mage_Sales_Helper_Data')->__('Add Products'), - 'onclick' => "order.productGridShow(this)", - 'class' => 'add', - ); - return $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')->setData($addButtonData)->toHtml(); + $html = ''; + // Make buttons to be rendered in opposite order of addition. This makes "Add products" the last one. + $this->_buttons = array_reverse($this->_buttons); + foreach ($this->_buttons as $buttonData) { + $html .= $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')->setData($buttonData)->toHtml(); + } + + return $html; } + /** + * Return HTML code of the block + * + * @return string + */ protected function _toHtml() { if ($this->getStoreId()) { diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items/Grid.php index 90540c0856b93..83d021a83468e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Items/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Load.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Load.php index cfa1cc3c759e7..b0769e4d9dcad 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Load.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Load.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Messages.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Messages.php index 125712a85eb06..302cc8d9429a1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Messages.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Messages.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Newsletter.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Newsletter.php index bc67073ca88da..b84e140f8b0dd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Newsletter.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Newsletter.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Newsletter/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Newsletter/Form.php index 623a7cb054796..e2bebac3e4327 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Newsletter/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Newsletter/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search.php index 31c4067c2a178..f49908d5e987c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid.php index 1b9a2e207acfd..647959a771ec9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Price.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Price.php index 2ba1493ea6674..49c7e65389636 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Price.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -31,7 +31,8 @@ * @package Mage_Adminhtml * @author Magento Core Team */ -class Mage_Adminhtml_Block_Sales_Order_Create_Search_Grid_Renderer_Price extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Price +class Mage_Adminhtml_Block_Sales_Order_Create_Search_Grid_Renderer_Price extends + Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Price { /** * Render minimal price for downloadable products @@ -41,7 +42,7 @@ class Mage_Adminhtml_Block_Sales_Order_Create_Search_Grid_Renderer_Price extends */ public function render(Varien_Object $row) { - if ($row->getTypeId() == Mage_Downloadable_Model_Product_Type::TYPE_DOWNLOADABLE) { + if ($row->getTypeId() == 'downloadable') { $row->setPrice($row->getPrice()); } return parent::render($row); diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Product.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Product.php index 29ec38c87b98d..4f3db1504fda2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Product.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Product.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Qty.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Qty.php index 206279dd546f1..98ee55f9b32c0 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Qty.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Search/Grid/Renderer/Qty.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Address.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Address.php index 3e7b68329b652..24f7277e740a8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Address.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Address.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -62,6 +62,7 @@ public function getHeaderCssClass() */ protected function _prepareForm() { + $this->setJsVariablePrefix('shippingAddress'); parent::_prepareForm(); $this->_form->addFieldNameSuffix('order[shipping_address]'); diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Method.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Method.php index f66bd6be84163..7e3aa7e706136 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Method.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Method.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Method/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Method/Form.php index 8c2edc3903820..fb67af04aa091 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Method/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Shipping/Method/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar.php index 90a42573d9311..689b4ac7cfdc1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Abstract.php index 7a6d76ddf63bf..c34c0a148bcfd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Cart.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Cart.php index cdba1633a0277..7c6a203b1ee51 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Cart.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Cart.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -31,7 +31,8 @@ * @package Mage_Adminhtml * @author Magento Core Team */ -class Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Cart extends Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Abstract +class Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Cart + extends Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Abstract { /** * Storage action on selected item @@ -93,4 +94,24 @@ public function getProductId($item) { return $item->getProduct()->getId(); } + + /** + * Prepare layout + * + * Add button that clears customer's shopping cart + * + * @return Mage_Adminhtml_Block_Sales_Order_Create_Sidebar_Cart + */ + protected function _prepareLayout() + { + $deleteAllConfirmString = Mage::helper('Mage_Sales_Helper_Data')->__('Are you sure you want to delete all items from shopping cart?'); + $button = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Button')->setData(array( + 'label' => Mage::helper('Mage_Sales_Helper_Data')->__('Clear Shopping Cart'), + 'onclick' => 'order.clearShoppingCart(\'' . $deleteAllConfirmString . '\')', + 'style' => 'float: right;' + )); + $this->setChild('empty_customer_cart_button', $button); + + return parent::_prepareLayout(); + } } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Compared.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Compared.php index 3db14aba45100..fa648b92cb3d7 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Compared.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Compared.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Pcompared.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Pcompared.php index 3915111e4638f..2de07b73f1248 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Pcompared.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Pcompared.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Pviewed.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Pviewed.php index eb1c63e91271b..b2441db7fea60 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Pviewed.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Pviewed.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Reorder.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Reorder.php index ec4e111274222..db4b111deca8e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Reorder.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Reorder.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Viewed.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Viewed.php index 2da79490650a5..5b1146583b766 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Viewed.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Viewed.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Wishlist.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Wishlist.php index 1ae558edeb041..973be1af5015f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Wishlist.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Sidebar/Wishlist.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Store.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Store.php index 4006b547618a2..4d3a1ef1923e7 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Store.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Store.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Store/Select.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Store/Select.php index f18ecbedd911b..323f0d1710a27 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Store/Select.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Store/Select.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals.php index 5302951eff574..b287f80c49fcf 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -97,13 +97,6 @@ public function renderTotals($area = null, $colspan = 1) $html .= $this->renderTotal($total, $area, $colspan); } return $html; - - $html = ''; - foreach($this->getTotals() as $total) { - $html .= $this->renderTotal($total, $area, $colspan); - } - - return $html; } public function canSendNewOrderConfirmationEmail() diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Default.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Default.php index a4dfd54a69cbe..954752fa4d979 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Default.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Default.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Discount.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Discount.php index 4ba00af27bded..82b1279a48e19 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Discount.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Discount.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Grandtotal.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Grandtotal.php index f1b2d9f8ff888..e2a7d6b794ea6 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Grandtotal.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Grandtotal.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Shipping.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Shipping.php index 8067f28ba917a..da3885c390e91 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Shipping.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Shipping.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Subtotal.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Subtotal.php index 7e3ede85d2e4f..d870fef58cb94 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Subtotal.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Subtotal.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Table.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Table.php index 934a90ba120b3..c21d1eec121f1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Table.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Table.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Tax.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Tax.php index 9ca77ed307e16..da376ed16ea44 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Tax.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Create/Totals/Tax.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create.php index ef91eea22ae7f..b158afce4bb69 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -67,20 +67,12 @@ public function getCreditmemo() public function getHeaderText() { if ($this->getCreditmemo()->getInvoice()) { - $header = Mage::helper('Mage_Sales_Helper_Data')->__('New Credit Memo for Invoice #%s', - $this->getCreditmemo()->getInvoice()->getIncrementId() - ); + $header = Mage::helper('Mage_Sales_Helper_Data')->__('New Credit Memo for Invoice #%s', $this->getCreditmemo()->getInvoice()->getIncrementId()); } else { - $header = Mage::helper('Mage_Sales_Helper_Data')->__('New Credit Memo for Order #%s', - $this->getCreditmemo()->getOrder()->getRealOrderId() - ); + $header = Mage::helper('Mage_Sales_Helper_Data')->__('New Credit Memo for Order #%s', $this->getCreditmemo()->getOrder()->getRealOrderId()); } - /*$header = Mage::helper('Mage_Sales_Helper_Data')->__('New Credit Memo for Order #%s | Order Date: %s | Customer Name: %s', - $this->getCreditmemo()->getOrder()->getRealOrderId(), - $this->formatDate($this->getCreditmemo()->getOrder()->getCreatedAt(), 'medium', true), - $this->getCreditmemo()->getOrder()->getCustomerName() - );*/ + return $header; } @@ -91,4 +83,4 @@ public function getBackUrl() array('order_id' => $this->getCreditmemo() ? $this->getCreditmemo()->getOrderId() : null) ); } -} +} \ No newline at end of file diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Adjustments.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Adjustments.php index 42f51abe56ef8..6faee9e4a6c22 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Adjustments.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Adjustments.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Adminhtml_Block_Sales_Order_Creditmemo_Create_Adjustments extends Mage_Adminhtml_Block_Template diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Form.php index b103c01d878ec..5e564020d652d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Items.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Items.php index 1858cfd3a05cc..e7ad2d8423b44 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Items.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Create/Items.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Totals.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Totals.php index 8c4b79cd01bba..ed434c5102b9d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Totals.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/Totals.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View.php index 5a4b2364ae836..27cbdb7fd7f60 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View/Comments.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View/Comments.php index fbade9489abf0..236535dbd8d6b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View/Comments.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View/Comments.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View/Form.php index eea699be8dd7c..7c0033050e82e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View/Items.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View/Items.php index c2cc67c19b0a0..322044c11d2f6 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View/Items.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Creditmemo/View/Items.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php index 91e411ab64368..a81933f28224d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create.php index aa3a7341eaf6b..f0cbb24f17526 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Form.php index e6332e9049862..4722b59e6e862 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Items.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Items.php index 43ed5147c50af..6d860d55fba70 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Items.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Items.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Tracking.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Tracking.php index 543a4cbadf8c3..3ddca10d5fbd2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Tracking.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Create/Tracking.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Totals.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Totals.php index 2461dfd0c03b4..af6f2c598598a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Totals.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/Totals.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View.php index a132b246f590f..371728fe716c2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View/Comments.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View/Comments.php index c3bb5d9eeebd2..510ae32ad6e29 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View/Comments.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View/Comments.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View/Form.php index 870c39060262d..47b29fb3bff19 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View/Items.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View/Items.php index 0a3ed08628faa..1cc3ecb4f6f5a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View/Items.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Invoice/View/Items.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Payment.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Payment.php index 5f98ec54984e4..aa90eeb03bed6 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Payment.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Payment.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create.php index fee5f6c70a384..49dffcb542c50 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Form.php index 8340be7b75d94..5de4d37058132 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Items.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Items.php index 8c97862ec4c6f..2b3e2fb7b77f2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Items.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Items.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -129,6 +129,7 @@ public function canSendShipmentEmail() */ public function canCreateShippingLabel() { - return $this->getOrder()->getShippingCarrier()->isShippingLabelsAvailable(); + $shippingCarrier = $this->getOrder()->getShippingCarrier(); + return $shippingCarrier && $shippingCarrier->isShippingLabelsAvailable(); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Tracking.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Tracking.php index 9760ec275fd87..3835aca15cb71 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Tracking.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Create/Tracking.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging.php index 69fc4dbf092f4..20d93cda90039 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging/Grid.php index 0876b950178bc..9dea4d955afb6 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Packaging/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Tracking/Info.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Tracking/Info.php index 5d2122cb73273..aeae658c07737 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Tracking/Info.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/Tracking/Info.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View.php index 74b0ef0eb3f97..27e7b3e853f19 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Comments.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Comments.php index ebe389ee5186d..d4c9935462a8e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Comments.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Comments.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Form.php index c663c939615b2..07c04195c34e0 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -118,10 +118,11 @@ public function getShowPackagesButton() /** * Check is carrier has functionality of creation shipping labels * - * @return boolean + * @return bool */ public function canCreateShippingLabel() { - return $this->getOrder()->getShippingCarrier()->isShippingLabelsAvailable(); + $shippingCarrier = $this->getOrder()->getShippingCarrier(); + return $shippingCarrier && $shippingCarrier->isShippingLabelsAvailable(); } } diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Items.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Items.php index 02ed083cd1aad..8023a12b4ac26 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Items.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Items.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Tracking.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Tracking.php index 3845b591c81e4..f2d40d0edc84d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Tracking.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Shipment/View/Tracking.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status.php index 6e0ea63a4e053..79b1703fe12ab 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Assign.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Assign.php index 43e96e70434f9..31667725049b5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Assign.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Assign.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Assign/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Assign/Form.php index 7ad9eac26be1f..2bd5cc4672ba5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Assign/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Assign/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Edit.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Edit.php index fa6555fb9e260..cc2535138ceee 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Edit/Form.php index a168cc833343e..b6b8dbe862849 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Grid.php index 9d72ca0b9397a..00d17b8357bac 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/New.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/New.php index 1ee76e7b8e8e1..3a0b65aa7fed5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/New.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/New.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/New/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/New/Form.php index 680a263ad7de6..bc2b79a60c4b7 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/New/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Status/New/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Totalbar.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Totalbar.php index c166b8850b841..35e371bed285f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Totalbar.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Totalbar.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals.php index 7a3bbf5b70f05..591dc74dec16b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals/Item.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals/Item.php index 3efd8cbe19584..88a7433308cb4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals/Item.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals/Item.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals/Tax.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals/Tax.php index 704193f3335ce..acfe53235de32 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals/Tax.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Totals/Tax.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php index 6973726b88a55..ad29f707314f8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Form.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Form.php index 3b4ab89523729..6eedbaa4a2fa8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Giftmessage.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Giftmessage.php index a35c4bf1bc6a9..a2b4856cdd73b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Giftmessage.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Giftmessage.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/History.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/History.php index 1e71c04e74266..2f0482dae3f6c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/History.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/History.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Info.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Info.php index 929bf5c4b2fa4..c443a089af7ad 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Info.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Info.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Items.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Items.php index 3423562b6ee14..47c3572563f79 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Items.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Items.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Items/Renderer/Default.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Items/Renderer/Default.php index 1225b0dec6e41..f23511b3edf1e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Items/Renderer/Default.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Items/Renderer/Default.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Messages.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Messages.php index debf3e7d777e5..efcac73c6298e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Messages.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Messages.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Creditmemos.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Creditmemos.php index 0f8b9256f49d0..5487b05b6065b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Creditmemos.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Creditmemos.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/History.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/History.php index b2131fbd7ec27..b88dfe21739d3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/History.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/History.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Info.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Info.php index 95c4c7cc999e5..f8fece3e7de49 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Info.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Info.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Invoices.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Invoices.php index 9a420c24b3a79..c29481f2241bb 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Invoices.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Invoices.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Shipments.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Shipments.php index cfa913424c257..04a41b14224c1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Shipments.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Shipments.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Transactions.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Transactions.php index aabb99f463629..a4fbacc871194 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Transactions.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tab/Transactions.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tabs.php index 423bc75b3fbd3..9fb61ff9b2b2e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/View/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Reorder/Renderer/Action.php b/app/code/core/Mage/Adminhtml/Block/Sales/Reorder/Renderer/Action.php index d4d9f32651748..0f6258573dc5d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Reorder/Renderer/Action.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Reorder/Renderer/Action.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Shipment.php b/app/code/core/Mage/Adminhtml/Block/Sales/Shipment.php index bd44b33aac006..41c0518bdc20f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Shipment.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Shipment.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Shipment/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sales/Shipment/Grid.php index ef06d49a6c6eb..8fac4a2a10015 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Shipment/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Shipment/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Totals.php b/app/code/core/Mage/Adminhtml/Block/Sales/Totals.php index c814dff61730a..63624c56a8d1f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Totals.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Totals.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Transactions.php b/app/code/core/Mage/Adminhtml/Block/Sales/Transactions.php index 5be551236bb3f..f06e8c9053d2a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Transactions.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Transactions.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Child/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Child/Grid.php index 8476e5622f55b..8ad17f2feecf8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Child/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Child/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Detail.php b/app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Detail.php index de3e9e042cf49..bad4781fff7f2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Detail.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Detail.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -78,10 +78,7 @@ public function __construct() */ public function getHeaderText() { - return Mage::helper('Mage_Sales_Helper_Data')->__("Transaction # %s | %s", - $this->_txn->getTxnId(), - $this->formatDate($this->_txn->getCreatedAt(), Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true) - ); + return Mage::helper('Mage_Sales_Helper_Data')->__("Transaction # %s | %s", $this->_txn->getTxnId(), $this->formatDate($this->_txn->getCreatedAt(), Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM, true)); } protected function _toHtml() diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Detail/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Detail/Grid.php index cf50e6b008b34..c844e1bd5e950 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Detail/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Detail/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Grid.php index b290c5bd91569..6500065dc4811 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Transactions/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Shipping/Carrier/Tablerate/Grid.php b/app/code/core/Mage/Adminhtml/Block/Shipping/Carrier/Tablerate/Grid.php index 4ca852ed61ce0..272811022f899 100644 --- a/app/code/core/Mage/Adminhtml/Block/Shipping/Carrier/Tablerate/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Shipping/Carrier/Tablerate/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sitemap.php b/app/code/core/Mage/Adminhtml/Block/Sitemap.php index 6d799081a2d70..1828ebfee0714 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sitemap.php +++ b/app/code/core/Mage/Adminhtml/Block/Sitemap.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit.php b/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit.php index 10d2a120835ea..bb9e211a23d8f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit/Form.php index 408b95ffa1cc3..13a7ce2773f1f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Sitemap/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid.php b/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid.php index bc7580d5b2640..6beaf53884ea5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Action.php b/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Action.php index 38b4ace678802..56ec63bf18550 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Action.php +++ b/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Action.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Link.php b/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Link.php index 28bc6dc008194..4feee719d22f9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Link.php +++ b/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Link.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Time.php b/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Time.php index e19f43feadd80..426d7109af6c6 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Time.php +++ b/app/code/core/Mage/Adminhtml/Block/Sitemap/Grid/Renderer/Time.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Store/Switcher.php b/app/code/core/Mage/Adminhtml/Block/Store/Switcher.php index 8dced1495761e..6e22b106231b4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Store/Switcher.php +++ b/app/code/core/Mage/Adminhtml/Block/Store/Switcher.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,17 +29,34 @@ * * @category Mage * @package Mage_Adminhtml - * @author Magento Core Team + * @author Magento Core Team */ class Mage_Adminhtml_Block_Store_Switcher extends Mage_Adminhtml_Block_Template { + /** + * Key in config for store switcher hint + */ + const XPATH_HINT_KEY = 'store_switcher'; + /** * @var array */ protected $_storeIds; + /** + * Name of store variable + * + * @var string + */ protected $_storeVarName = 'store'; + /** + * Url for store switcher hint + * + * @var string + */ + protected $_hintUrl; + /** * @var bool */ @@ -206,4 +223,38 @@ public function hasDefaultOption($hasDefaultOption = null) } return $this->_hasDefaultOption; } + + /** + * Return url for store switcher hint + * + * @return string + */ + public function getHintUrl() + { + if (null === $this->_hintUrl) { + $this->_hintUrl = Mage::helper('Mage_Core_Helper_Hint')->getHintByCode(self::XPATH_HINT_KEY); + } + return $this->_hintUrl; + } + + /** + * Return store switcher hint html + * + * @return string + */ + public function getHintHtml() + { + $html = ''; + $url = $this->getHintUrl(); + if ($url) { + $html = '' + . $this->__('What is this?') + . ''; + } + return $html; + } } diff --git a/app/code/core/Mage/Adminhtml/Block/Store/Switcher/Form/Renderer/Fieldset.php b/app/code/core/Mage/Adminhtml/Block/Store/Switcher/Form/Renderer/Fieldset.php new file mode 100644 index 0000000000000..f5ce3250ab5e4 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Store/Switcher/Form/Renderer/Fieldset.php @@ -0,0 +1,83 @@ + + */ +class Mage_Adminhtml_Block_Store_Switcher_Form_Renderer_Fieldset + extends Mage_Adminhtml_Block_Template implements Varien_Data_Form_Element_Renderer_Interface +{ + /** + * Form element which re-rendering + * + * @var Varien_Data_Form_Element_Fieldset + */ + protected $_element; + + /** + * Constructor + */ + protected function _construct() + { + $this->setTemplate('store/switcher/form/renderer/fieldset.phtml'); + } + + /** + * Retrieve an element + * + * @return Varien_Data_Form_Element_Fieldset + */ + public function getElement() + { + return $this->_element; + } + + /** + * Render element + * + * @param Varien_Data_Form_Element_Abstract $element + * @return string + */ + public function render(Varien_Data_Form_Element_Abstract $element) + { + $this->_element = $element; + return $this->toHtml(); + } + + /** + * Return html for store switcher hint + * + * @return string + */ + public function getHintHtml() + { + return Mage::getBlockSingleton('Mage_Adminhtml_Block_Store_Switcher')->getHintHtml(); + } +} diff --git a/app/code/core/Mage/Adminhtml/Block/System/Account/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Account/Edit.php index 7af6ff68982fd..5b13145fc57ac 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Account/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Account/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Account/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/System/Account/Edit/Form.php index c260898796c6c..df5f16fd56b61 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Account/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Account/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Cache/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Cache/Edit.php index 7179a595aa56e..b1bcf6d04eadd 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Cache/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Cache/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Cache/Form.php b/app/code/core/Mage/Adminhtml/Block/System/Cache/Form.php index a4ce57ab2038d..565a9703217ca 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Cache/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Cache/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Dwstree.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Dwstree.php index 1630ada314ade..db2339f17f3a4 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Dwstree.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Dwstree.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Edit.php index 8f66e08e17a09..006d82e14e192 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php index 353ea0a710ba9..bdd5a49a7167f 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -332,12 +332,16 @@ public function initFields($fieldset, $group, $section, $fieldPrefix='', $labelP if ($e->depends) { foreach ($e->depends->children() as $dependent) { + /* @var $dependent Mage_Core_Model_Config_Element */ $dependentId = $section->getName() . '_' . $group->getName() . '_' . $fieldPrefix . $dependent->getName(); $shouldBeAddedDependence = true; $dependentValue = (string) $dependent; + if (isset($dependent['separator'])) { + $dependentValue = explode((string)$dependent['separator'], $dependentValue); + } $dependentFieldName = $fieldPrefix . $dependent->getName(); $dependentField = $group->fields->$dependentFieldName; /* @@ -350,10 +354,12 @@ public function initFields($fieldset, $group, $section, $fieldPrefix='', $labelP . '/' . $group->getName() . '/' . $fieldPrefix . $dependent->getName(); - $shouldBeAddedDependence = $dependentValue != Mage::getStoreConfig( - $dependentFullPath, - $this->getStoreCode() - ); + $dependentValueInStore = Mage::getStoreConfig($dependentFullPath, $this->getStoreCode()); + if (is_array($dependentValue)) { + $shouldBeAddedDependence = !in_array($dependentValueInStore, $dependentValue); + } else { + $shouldBeAddedDependence = $dependentValue != $dependentValueInStore; + } } if($shouldBeAddedDependence) { $this->_getDependence() diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field.php index 37d0c348ba7f6..989a7cbac3651 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Array/Abstract.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Array/Abstract.php index 02c3ff6450057..3e3d263ca064a 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Array/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Array/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Datetime.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Datetime.php index fcd7e9e78373d..f51bd9ab6cc04 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Datetime.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Datetime.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Export.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Export.php index 877563bff5c70..05d9c92bea877 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Export.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Export.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/File.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/File.php index 07a24da5992cb..6727c50c6b756 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/File.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/File.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Heading.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Heading.php index 30676a9387610..1b3188340b3a8 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Heading.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Heading.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Image.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Image.php index 801918ac60332..f6405a2327893 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Image.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Image.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Import.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Import.php index 3898f913d1678..a70f81b0807bf 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Import.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Import.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Notification.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Notification.php index 395c5ed4d98e3..db3f2e551b43b 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Notification.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Notification.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Regexceptions.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Regexceptions.php index 35a63d6c17779..fae00ccbaa264 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Regexceptions.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Regexceptions.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Allowspecific.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Allowspecific.php index e2d053f4acceb..630dc0c10fb48 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Allowspecific.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Allowspecific.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Flatcatalog.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Flatcatalog.php index 2cdcb8a0adbad..a669dc0e09f09 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Flatcatalog.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Flatcatalog.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Flatproduct.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Flatproduct.php index e1c3e33c3eb8c..576da571c143a 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Flatproduct.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Field/Select/Flatproduct.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset.php index f654e7217c693..0456c29e0f24d 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php index 9a35d44b62d73..2e9137cff19ef 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Modules/DisableOutput.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -38,6 +38,13 @@ public function render(Varien_Data_Form_Element_Abstract $element) $modules = array_keys((array)Mage::getConfig()->getNode('modules')->children()); + $dispatchResult = new Varien_Object($modules); + Mage::dispatchEvent( + 'adminhtml_system_config_advanced_disableoutput_render_before', + array('modules' => $dispatchResult) + ); + $modules = $dispatchResult->toArray(); + sort($modules); foreach ($modules as $moduleName) { diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Order/Statuses.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Order/Statuses.php index 52ce47a4c0872..95f72e21dd421 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Order/Statuses.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Order/Statuses.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Switcher.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Switcher.php index 4491298fe6094..a6a6aa0a27753 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Switcher.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Switcher.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -106,4 +106,13 @@ public function getStoreSelectOptions() return $options; } + /** + * Return store switcher hint html + * + * @return mixed + */ + public function getHintHtml() + { + return Mage::getBlockSingleton('Mage_Adminhtml_Block_Store_Switcher')->getHintHtml(); + } } diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/System/Storage/Media/Synchronize.php b/app/code/core/Mage/Adminhtml/Block/System/Config/System/Storage/Media/Synchronize.php index ef417f0c6d912..c43bc232d9aac 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/System/Storage/Media/Synchronize.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/System/Storage/Media/Synchronize.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Config/Tabs.php b/app/code/core/Mage/Adminhtml/Block/System/Config/Tabs.php index 559e5d58b5b2e..fdd8628adc43a 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Config/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Config/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -80,7 +80,7 @@ public function initTabs() $configFields = Mage::getSingleton('Mage_Adminhtml_Model_Config'); $sections = $configFields->getSections($current); $tabs = (array)$configFields->getTabs()->children(); - + $sections = (array)$sections; @@ -99,7 +99,7 @@ public function initTabs() foreach ($sections as $section) { - + Mage::dispatchEvent('adminhtml_block_system_config_init_tab_sections_before', array('section' => $section)); $hasChildren = $configFields->hasChildren($section, $websiteCode, $storeCode); //$code = $section->getPath(); diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui.php index f0b813f03590a..9720b100b706f 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit.php index aee6289a93d0a..3e4d29a612970 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Form.php index f55accf7d5527..78696eab00f1b 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Upload.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Upload.php index d44555aa54113..f3fcc1400943a 100755 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Upload.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Upload.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/View.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/View.php index c2004f64d9ea6..841364335f730 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/View.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/View.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Wizard.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Wizard.php index 8bed5325e2297..65814db41361b 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Wizard.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tab/Wizard.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tabs.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tabs.php index 211c1a18342d3..2bb3d75326b61 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Edit/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Grid.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Grid.php index 5d1f1181809d9..8ab719ae28d36 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Gui/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile.php index 3b109a83d228d..af280f7a45f3f 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit.php index 695189a305a2e..0026ed341354e 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Filter/Action.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Filter/Action.php index 8df5ffc212f71..c86333f3bcecb 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Filter/Action.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Filter/Action.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Form.php index b11dffbe13ea9..14932689ff4db 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Renderer/Action.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Renderer/Action.php index 208336617bf12..38569d0d636e0 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Renderer/Action.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Renderer/Action.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tab/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tab/Edit.php index c826762e8c807..00f1cd2dbc4d8 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tab/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tab/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tab/History.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tab/History.php index f307e8847b029..2b13324913167 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tab/History.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tab/History.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tab/Run.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tab/Run.php index 6e726f4d22721..10b18855f6ab6 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tab/Run.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tab/Run.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tabs.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tabs.php index 172c90d37d49b..bea1e3ef1a3c6 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Edit/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Grid.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Grid.php index 8b640949e0234..24ff410a659bb 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Run.php b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Run.php index 61ebcc2700270..b73da08cc22e7 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Run.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Convert/Profile/Run.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Currency.php b/app/code/core/Mage/Adminhtml/Block/System/Currency.php index 8d674f3dce436..4a27d0791af6f 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Currency.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Currency.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Currency/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/System/Currency/Edit/Form.php index af2a377d5fd70..baeaa6ba12508 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Currency/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Currency/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Currency/Edit/Tab/Main.php b/app/code/core/Mage/Adminhtml/Block/System/Currency/Edit/Tab/Main.php index d5412d8183fd3..79ab475febd9b 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Currency/Edit/Tab/Main.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Currency/Edit/Tab/Main.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Currency/Edit/Tab/Rates.php b/app/code/core/Mage/Adminhtml/Block/System/Currency/Edit/Tab/Rates.php index 882c00c37a336..d4cbaa4ace368 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Currency/Edit/Tab/Rates.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Currency/Edit/Tab/Rates.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Currency/Edit/Tabs.php b/app/code/core/Mage/Adminhtml/Block/System/Currency/Edit/Tabs.php index 84d42f0ac7e1e..30669ce4a56b7 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Currency/Edit/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Currency/Edit/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Currency/Rate/Matrix.php b/app/code/core/Mage/Adminhtml/Block/System/Currency/Rate/Matrix.php index c7d1ae6d83cf7..c2eeef9176d3d 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Currency/Rate/Matrix.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Currency/Rate/Matrix.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Currency/Rate/Services.php b/app/code/core/Mage/Adminhtml/Block/System/Currency/Rate/Services.php index 49ab98861eb53..6a955ceb21ed2 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Currency/Rate/Services.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Currency/Rate/Services.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Design.php b/app/code/core/Mage/Adminhtml/Block/System/Design.php index 2f053310cf9de..caa6ee7063e32 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Design.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Design.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Design/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Design/Edit.php index 78210fe058fed..f2905b1e8b3dd 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Design/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Design/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Design/Edit/Tab/General.php b/app/code/core/Mage/Adminhtml/Block/System/Design/Edit/Tab/General.php index 889a7d656fd92..6ddf5a0a2c27b 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Design/Edit/Tab/General.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Design/Edit/Tab/General.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Adminhtml_Block_System_Design_Edit_Tab_General extends Mage_Adminhtml_Block_Widget_Form diff --git a/app/code/core/Mage/Adminhtml/Block/System/Design/Edit/Tabs.php b/app/code/core/Mage/Adminhtml/Block/System/Design/Edit/Tabs.php index b897516bdcac0..bd4c59f2c0566 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Design/Edit/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Design/Edit/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Design/Grid.php b/app/code/core/Mage/Adminhtml/Block/System/Design/Grid.php index 66a4639c50d8e..9f7d1c8dcdb3c 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Design/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Design/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Email/Template.php b/app/code/core/Mage/Adminhtml/Block/System/Email/Template.php index e1cffa68ccf59..2921fb58b3c1c 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Email/Template.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Email/Template.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php index a186a0a9df575..44d3eab20dbfd 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit/Form.php index 1b0435a0fbe9f..aeb14a9192e63 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid.php b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid.php index 2b86d2e410838..cb49590a0c251 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Filter/Type.php b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Filter/Type.php index dd52f4ef98045..131656f62bdc7 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Filter/Type.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Filter/Type.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -32,19 +32,20 @@ * @author Magento Core Team */ -class Mage_Adminhtml_Block_System_Email_Template_Grid_Filter_Type extends Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Select +class Mage_Adminhtml_Block_System_Email_Template_Grid_Filter_Type + extends Mage_Adminhtml_Block_Widget_Grid_Column_Filter_Select { protected static $_types = array( - null => null, + null => null, Mage_Newsletter_Model_Template::TYPE_HTML => 'HTML', - Mage_Newsletter_Model_Template::TYPE_TEXT => 'Text', + Mage_Newsletter_Model_Template::TYPE_TEXT => 'Text', ); protected function _getOptions() { $result = array(); - foreach (self::$_types as $code=>$label) { - $result[] = array('value'=>$code, 'label'=>Mage::helper('Mage_Adminhtml_Helper_Data')->__($label)); + foreach (self::$_types as $code => $label) { + $result[] = array('value' => $code, 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__($label)); } return $result; @@ -57,8 +58,6 @@ public function getCondition() return null; } - return array('eq'=>$this->getValue()); + return array('eq' => $this->getValue()); } - - -}// Class Mage_Adminhtml_Block_Newsletter_Queue_Grid_Filter_Status END +} diff --git a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Renderer/Action.php b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Renderer/Action.php index f7e800e8f0219..ee494a4286d1b 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Renderer/Action.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Renderer/Action.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Renderer/Sender.php b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Renderer/Sender.php index 374a69cce8ad2..7e71a41febbca 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Renderer/Sender.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Renderer/Sender.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Renderer/Type.php b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Renderer/Type.php index 2192abcd31d1c..c12fd51b5b254 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Renderer/Type.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Grid/Renderer/Type.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -32,11 +32,12 @@ * @author Magento Core Team */ -class Mage_Adminhtml_Block_System_Email_Template_Grid_Renderer_Type extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract +class Mage_Adminhtml_Block_System_Email_Template_Grid_Renderer_Type + extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract { protected static $_types = array( - Mage_Newsletter_Model_Template::TYPE_HTML => 'HTML', - Mage_Newsletter_Model_Template::TYPE_TEXT => 'Text', + Mage_Newsletter_Model_Template::TYPE_HTML => 'HTML', + Mage_Newsletter_Model_Template::TYPE_TEXT => 'Text', ); public function render(Varien_Object $row) { diff --git a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Preview.php b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Preview.php index ccfb30def2114..2ee03216e5587 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Preview.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Email/Template/Preview.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,23 +29,27 @@ * * @category Mage * @package Mage_Adminhtml - * @author Magento Core Team + * @author Magento Core Team */ class Mage_Adminhtml_Block_System_Email_Template_Preview extends Mage_Adminhtml_Block_Widget { - protected function _toHtml() { + /** @var $template Mage_Core_Model_Email_Template */ $template = Mage::getModel('Mage_Core_Model_Email_Template'); - if($id = (int)$this->getRequest()->getParam('id')) { + if ($id = (int)$this->getRequest()->getParam('id')) { $template->load($id); } else { $template->setTemplateType($this->getRequest()->getParam('type')); $template->setTemplateText($this->getRequest()->getParam('text')); $template->setTemplateStyles($this->getRequest()->getParam('styles')); } + + /* @var $filter Mage_Core_Model_Input_Filter_MaliciousCode */ + $filter = Mage::getSingleton('Mage_Core_Model_Input_Filter_MaliciousCode'); + $template->setTemplateText( - $this->escapeHtml($template->getTemplateText()) + $filter->filter($template->getTemplateText()) ); Magento_Profiler::start("email_template_proccessing"); @@ -53,7 +57,7 @@ protected function _toHtml() $templateProcessed = $template->getProcessedTemplate($vars, true); - if($template->isPlain()) { + if ($template->isPlain()) { $templateProcessed = "
" . htmlspecialchars($templateProcessed) . "
"; } @@ -61,5 +65,4 @@ protected function _toHtml() return $templateProcessed; } - } diff --git a/app/code/core/Mage/Adminhtml/Block/System/Store/Delete.php b/app/code/core/Mage/Adminhtml/Block/System/Store/Delete.php index 68a46d2e748a6..637bdbab4d5d1 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Store/Delete.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Store/Delete.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Form.php b/app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Form.php index 757ba812c8e3b..51c29058078e8 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Group.php b/app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Group.php index 3847d6177b09a..38021deacb299 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Group.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Group.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Website.php b/app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Website.php index 946147f122bc6..8e79abc8d6988 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Website.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Store/Delete/Website.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Store/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Store/Edit.php index 4323bfca72780..9451223ee8f1c 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Store/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Store/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Store/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/System/Store/Edit/Form.php index 4fc6b2a2a6490..7bc32a689ba20 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Store/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Store/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -109,7 +109,8 @@ protected function _prepareForm() )); if (Mage::registry('store_action') == 'edit') { - $groups = Mage::getModel('Mage_Core_Model_Store_Group')->getCollection()->addWebsiteFilter($websiteModel->getId())->toOptionArray(); + $groups = Mage::getModel('Mage_Core_Model_Store_Group')->getCollection() + ->addWebsiteFilter($websiteModel->getId())->toOptionArray(); //array_unshift($groups, array('label'=>'', 'value'=>0)); $fieldset->addField('website_default_group_id', 'select', array( 'name' => 'website[default_group_id]', @@ -202,7 +203,8 @@ protected function _prepareForm() )); if (Mage::registry('store_action') == 'edit') { - $stores = Mage::getModel('Mage_Core_Model_Store')->getCollection()->addGroupFilter($groupModel->getId())->toOptionArray(); + $stores = Mage::getModel('Mage_Core_Model_Store')->getCollection() + ->addGroupFilter($groupModel->getId())->toOptionArray(); //array_unshift($stores, array('label'=>'', 'value'=>0)); $fieldset->addField('group_default_store_id', 'select', array( 'name' => 'group[default_store_id]', @@ -335,6 +337,8 @@ protected function _prepareForm() $form->setUseContainer(true); $this->setForm($form); + Mage::dispatchEvent('adminhtml_store_edit_form_prepare_form', array('block' => $this)); + return parent::_prepareForm(); } } diff --git a/app/code/core/Mage/Adminhtml/Block/System/Store/Grid.php b/app/code/core/Mage/Adminhtml/Block/System/Store/Grid.php index ea0293d8b30eb..20393ceea748c 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Store/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Store/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Store/Grid/Render/Group.php b/app/code/core/Mage/Adminhtml/Block/System/Store/Grid/Render/Group.php index b10bd63d73d27..8daf2b05ba899 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Store/Grid/Render/Group.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Store/Grid/Render/Group.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Store/Grid/Render/Store.php b/app/code/core/Mage/Adminhtml/Block/System/Store/Grid/Render/Store.php index 058d18e3ab2fd..4e31be80b40ef 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Store/Grid/Render/Store.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Store/Grid/Render/Store.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Store/Grid/Render/Website.php b/app/code/core/Mage/Adminhtml/Block/System/Store/Grid/Render/Website.php index 03b669717fddd..bfe37c43b8be1 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Store/Grid/Render/Website.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Store/Grid/Render/Website.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Store/Store.php b/app/code/core/Mage/Adminhtml/Block/System/Store/Store.php index 9f4e78732854e..20ab308d32f95 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Store/Store.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Store/Store.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Variable.php b/app/code/core/Mage/Adminhtml/Block/System/Variable.php index 53fef74468535..df71cb899e835 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Variable.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Variable.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit.php b/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit.php index 54e2b289121a1..cdb509e268ab6 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit/Form.php index 55158565a3498..6ac08491069c0 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Variable/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/System/Variable/Grid.php b/app/code/core/Mage/Adminhtml/Block/System/Variable/Grid.php index 340231aba35f6..d381657e1becc 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Variable/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Variable/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Assigned/Grid.php b/app/code/core/Mage/Adminhtml/Block/Tag/Assigned/Grid.php index b0a33d8099e58..593a9ba853de5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Assigned/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Assigned/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Customer.php b/app/code/core/Mage/Adminhtml/Block/Tag/Customer.php index 8648b9c538b2f..a9704f35c0c77 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Customer.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Customer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Customer/Grid.php b/app/code/core/Mage/Adminhtml/Block/Tag/Customer/Grid.php index db2ce964f2bb5..ec2203dd2a2f4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Customer/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Customer/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Edit.php b/app/code/core/Mage/Adminhtml/Block/Tag/Edit.php index b0ba793c23118..2e840c7b3bfb8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Edit/Accordion.php b/app/code/core/Mage/Adminhtml/Block/Tag/Edit/Accordion.php index d1a7469abb96f..abf8a4ccffe11 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Edit/Accordion.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Edit/Accordion.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Edit/Assigned.php b/app/code/core/Mage/Adminhtml/Block/Tag/Edit/Assigned.php index 219ff984233e1..3f17919d0d9f8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Edit/Assigned.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Edit/Assigned.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Tag/Edit/Form.php index 703dcbb6c0901..b2b661fa0f9f3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Grid/All.php b/app/code/core/Mage/Adminhtml/Block/Tag/Grid/All.php index 168c9993f534b..a0a461fb4d5e6 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Grid/All.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Grid/All.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Grid/Pending.php b/app/code/core/Mage/Adminhtml/Block/Tag/Grid/Pending.php index 7bf8eafacc04c..f2ca70e1530c5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Grid/Pending.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Grid/Pending.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Pending.php b/app/code/core/Mage/Adminhtml/Block/Tag/Pending.php index 1df8209170e73..346f62188382d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Pending.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Pending.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Product.php b/app/code/core/Mage/Adminhtml/Block/Tag/Product.php index b40fa79ea2bfc..46b50f966cc86 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Product.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Product.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Product/Grid.php b/app/code/core/Mage/Adminhtml/Block/Tag/Product/Grid.php index caaca3fa21b66..b40c6ed554c01 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Product/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Product/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Store/Switcher.php b/app/code/core/Mage/Adminhtml/Block/Tag/Store/Switcher.php index 0edafe30496ec..975c049c3849b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Store/Switcher.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Store/Switcher.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Tag.php b/app/code/core/Mage/Adminhtml/Block/Tag/Tag.php index 7dbc36ce80df5..f174dce123bff 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Tag.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Tag.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tag/Tag/Grid.php b/app/code/core/Mage/Adminhtml/Block/Tag/Tag/Grid.php index 964103de94aeb..16fed2f14824e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tag/Tag/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Tag/Tag/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Class.php b/app/code/core/Mage/Adminhtml/Block/Tax/Class.php index 5dc047068eaf2..922aa393d83a1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Class.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Class.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Class/Edit.php b/app/code/core/Mage/Adminhtml/Block/Tax/Class/Edit.php index 4ecde13d8cc4e..68471b20b5839 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Class/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Class/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Class/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Tax/Class/Edit/Form.php index 2260c733d2e39..647900de26b4a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Class/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Class/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Class/Grid.php b/app/code/core/Mage/Adminhtml/Block/Tax/Class/Grid.php index 2a58e8adff0d7..61b72885fc768 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Class/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Class/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Form.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Form.php index 49f01b6078732..c363a752b72a2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -158,6 +158,7 @@ protected function _prepareForm() 'label' => Mage::helper('Mage_Tax_Helper_Data')->__('Range From'), 'value' => $rateObject->getZipFrom(), 'required' => true, + 'maxlength' => 9, 'class' => 'validate-digits' ) ); @@ -168,6 +169,7 @@ protected function _prepareForm() 'label' => Mage::helper('Mage_Tax_Helper_Data')->__('Range To'), 'value' => $rateObject->getZipTo(), 'required' => true, + 'maxlength' => 9, 'class' => 'validate-digits' ) ); diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid.php index 56881f99d2fb5..f36a16eadce45 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Adminhtml_Block_Tax_Rate_Grid extends Mage_Adminhtml_Block_Widget_Grid diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid/Renderer/Country.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid/Renderer/Country.php index b114afc8d02a2..efda945e45ee4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid/Renderer/Country.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid/Renderer/Country.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid/Renderer/Data.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid/Renderer/Data.php index 53563b70adc9f..2523b38f29455 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid/Renderer/Data.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Grid/Renderer/Data.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/ImportExport.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/ImportExport.php index 8a7ce77a22e4c..d0a2d48898e09 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/ImportExport.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/ImportExport.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Title.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Title.php index b3159a52f3560..983b82e8eeb0a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Title.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Title.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Title/Fieldset.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Title/Fieldset.php index eb1dd23bf1357..783e0d303f91b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Title/Fieldset.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Title/Fieldset.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Add.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Add.php index 816a8c00e2101..f8d382bc13150 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Add.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Add.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Save.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Save.php index 3e7fbe58ff0b7..e318311bfc5cc 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Save.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Toolbar/Save.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Rule.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rule.php index 9bed46d794766..10b6c1d8fe783 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rule.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rule.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Rule/Edit.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rule/Edit.php index 53860ec59166f..11402c15de524 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rule/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rule/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Rule/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rule/Edit/Form.php index 97eb916c082f8..9fb12c24b7d58 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rule/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rule/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Tax/Rule/Grid.php b/app/code/core/Mage/Adminhtml/Block/Tax/Rule/Grid.php index c0d99f87c0d4e..1f80a2b28279c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rule/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rule/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Adminhtml_Block_Tax_Rule_Grid extends Mage_Adminhtml_Block_Widget_Grid diff --git a/app/code/core/Mage/Adminhtml/Block/Template.php b/app/code/core/Mage/Adminhtml/Block/Template.php index 1a778332e461e..0f10f814cb8b5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Template.php +++ b/app/code/core/Mage/Adminhtml/Block/Template.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Text/List.php b/app/code/core/Mage/Adminhtml/Block/Text/List.php index 59241283bb9d3..80dd06a882a0a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Text/List.php +++ b/app/code/core/Mage/Adminhtml/Block/Text/List.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Urlrewrite.php b/app/code/core/Mage/Adminhtml/Block/Urlrewrite.php index 18af1c211f266..6e7d3c28d180e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Urlrewrite.php +++ b/app/code/core/Mage/Adminhtml/Block/Urlrewrite.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Category/Tree.php b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Category/Tree.php index 5a0e83e5092ec..abc007a3b42cd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Category/Tree.php +++ b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Category/Tree.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit.php b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit.php index f400b556d8843..62f39cc040161 100644 --- a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit.php +++ b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit/Form.php b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit/Form.php index 39eb70cff2317..2b51a48ef099e 100644 --- a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Grid.php b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Grid.php index 4c9da4ac78b4e..cf23382565ec5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Link.php b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Link.php index 372acc6c25a09..faac783c5f972 100644 --- a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Link.php +++ b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Link.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Product/Grid.php b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Product/Grid.php index 94547f47b88e3..0f74b58b84ad7 100644 --- a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Product/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Product/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Selector.php b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Selector.php index d65368ba85596..30af91a9ac936 100644 --- a/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Selector.php +++ b/app/code/core/Mage/Adminhtml/Block/Urlrewrite/Selector.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget.php b/app/code/core/Mage/Adminhtml/Block/Widget.php index 0b15d63829b03..48620bdea8d45 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Accordion.php b/app/code/core/Mage/Adminhtml/Block/Widget/Accordion.php index 9da7cc44fa302..64419881e0512 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Accordion.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Accordion.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Accordion/Item.php b/app/code/core/Mage/Adminhtml/Block/Widget/Accordion/Item.php index bd74b6e2d8c01..e694b938f34d5 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Accordion/Item.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Accordion/Item.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Breadcrumbs.php b/app/code/core/Mage/Adminhtml/Block/Widget/Breadcrumbs.php index a426379b8a2e9..e2c5e158a98ed 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Breadcrumbs.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Breadcrumbs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Button.php b/app/code/core/Mage/Adminhtml/Block/Widget/Button.php index 702616bb8d250..5148dbeb75fe2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Button.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Button.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -63,7 +63,7 @@ protected function _toHtml() . ' style="'.$this->getStyle() .'"' . ($this->getValue()?' value="'.$this->getValue() . '"':'') . ($this->getDisabled() ? ' disabled="disabled"' : '') - . '>' .$this->getLabel().''.$this->getAfterHtml(); + . '>' .$this->getLabel().''.$this->getAfterHtml(); return $html; } diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Container.php b/app/code/core/Mage/Adminhtml/Block/Widget/Container.php index c11cab81610b7..52f927125ed55 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Container.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Container.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Form.php b/app/code/core/Mage/Adminhtml/Block/Widget/Form.php index 30ff2459f7492..cfa68500e81cd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -189,11 +189,10 @@ protected function _setFieldset($attributes, $fieldset, $exclude=array()) $element->setValues($attribute->getSource()->getAllOptions(true, true)); } else if ($inputType == 'multiselect') { $element->setValues($attribute->getSource()->getAllOptions(false, true)); + $element->setCanBeEmpty(true); } else if ($inputType == 'date') { $element->setImage($this->getSkinUrl('images/grid-cal.gif')); - $element->setFormat( - Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT) - ); + $element->setFormat(Mage::app()->getLocale()->getDateFormatWithLongYear()); } else if ($inputType == 'multiline') { $element->setLineCount($attribute->getMultilineCount()); } diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Form/Container.php b/app/code/core/Mage/Adminhtml/Block/Widget/Form/Container.php index dcc4f29f4bb8d..e02832dbbca67 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Form/Container.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Form/Container.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Form/Element.php b/app/code/core/Mage/Adminhtml/Block/Widget/Form/Element.php index 63cc4fe4d5e39..eedbbe6316e5b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Form/Element.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Form/Element.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Form/Element/Dependence.php b/app/code/core/Mage/Adminhtml/Block/Widget/Form/Element/Dependence.php index f7cebf0ed1dcd..2bfe984de68da 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Form/Element/Dependence.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Form/Element/Dependence.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -73,8 +73,6 @@ public function addFieldMap($fieldId, $fieldName) /** * Register field name dependence one from each other by specified values * - * @TODO: multiple values per dependency is not implemented. The values OR comparison is anticipated - * * @param string $fieldName * @param string $fieldNameFrom * @param string|array $refValues @@ -82,9 +80,6 @@ public function addFieldMap($fieldId, $fieldName) */ public function addFieldDependence($fieldName, $fieldNameFrom, $refValues) { - if (is_array($refValues)) { - Mage::throwException('Dependency from multiple values is not implemented yet. Please fix to your widget.xml'); - } $this->_depends[$fieldName][$fieldNameFrom] = $refValues; return $this; } diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Form/Element/Gallery.php b/app/code/core/Mage/Adminhtml/Block/Widget/Form/Element/Gallery.php index db673c9a1bfe5..434c123c1188f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Form/Element/Gallery.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Form/Element/Gallery.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Element.php b/app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Element.php index 1cceb8e257244..7883424759e85 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Element.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Element.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset.php b/app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset.php index 052538072b449..e32cd21ccaf6c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset/Element.php b/app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset/Element.php index 23ed3ffe460fc..07a3d4aa3cdae 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset/Element.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Form/Renderer/Fieldset/Element.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -31,7 +31,8 @@ * @package Mage_Adminhtml * @author Magento Core Team */ -class Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element extends Mage_Adminhtml_Block_Template implements Varien_Data_Form_Element_Renderer_Interface +class Mage_Adminhtml_Block_Widget_Form_Renderer_Fieldset_Element extends Mage_Adminhtml_Block_Template + implements Varien_Data_Form_Element_Renderer_Interface { protected $_element; @@ -50,4 +51,4 @@ public function render(Varien_Data_Form_Element_Abstract $element) $this->_element = $element; return $this->toHtml(); } -} \ No newline at end of file +} diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php index ee51257a66778..eeb363594240f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -175,6 +175,13 @@ class Mage_Adminhtml_Block_Widget_Grid extends Mage_Adminhtml_Block_Widget */ protected $_massactionIdField = null; + /** + * Massaction row id filter + * + * @var string + */ + protected $_massactionIdFilter = null; + /** * Massaction block name * @@ -543,8 +550,8 @@ protected function _decodeFilter(&$value) protected function _preparePage() { - $this->getCollection()->setPageSize($this->getParam($this->getVarNameLimit(), $this->_defaultLimit)); - $this->getCollection()->setCurPage($this->getParam($this->getVarNamePage(), $this->_defaultPage)); + $this->getCollection()->setPageSize((int) $this->getParam($this->getVarNameLimit(), $this->_defaultLimit)); + $this->getCollection()->setCurPage((int) $this->getParam($this->getVarNamePage(), $this->_defaultPage)); } protected function _prepareColumns() @@ -589,11 +596,12 @@ protected function _prepareMassactionColumn() $columnId = 'massaction'; $massactionColumn = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Grid_Column') ->setData(array( - 'index' => $this->getMassactionIdField(), - 'type' => 'massaction', - 'name' => $this->getMassactionBlock()->getFormFieldName(), - 'align' => 'center', - 'is_system' => true + 'index' => $this->getMassactionIdField(), + 'filter_index' => $this->getMassactionIdFilter(), + 'type' => 'massaction', + 'name' => $this->getMassactionBlock()->getFormFieldName(), + 'align' => 'center', + 'is_system' => true )); if ($this->getNoFilterMassactionColumn()) { @@ -1262,7 +1270,7 @@ public function getJsObjectName() } /** - * Retrive massaction row identifier field + * Retrieve massaction row identifier field * * @return string */ @@ -1283,6 +1291,28 @@ public function setMassactionIdField($idField) return $this; } + /** + * Retrieve massaction row identifier filter + * + * @return string + */ + public function getMassactionIdFilter() + { + return $this->_massactionIdFilter; + } + + /** + * Set massaction row identifier filter + * + * @param string $idFilter + * @return Mage_Adminhtml_Block_Widget_Grid + */ + public function setMassactionIdFilter($idFilter) + { + $this->_massactionIdFilter = $idFilter; + return $this; + } + /** * Retrive massaction block name * diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column.php index eefc5b82d9c38..5683600eda4ae 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Abstract.php index bb447d990a88d..0e3015813d9b7 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Checkbox.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Checkbox.php index 66becacbc87d3..448d5c6032dcb 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Checkbox.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Checkbox.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Country.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Country.php index d9efe38ce3c0d..ed5d7b808bcdd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Country.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Country.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Date.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Date.php index f22ea97bbfd38..a41f5680077ed 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Date.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Date.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Datetime.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Datetime.php index 95fd4bc79a141..66275f4db3849 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Datetime.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Datetime.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Interface.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Interface.php index b50aaed12bf3e..3458a3f62d193 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Interface.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Interface.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Massaction.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Massaction.php index ee80e33778a94..5b25af02bc403 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Massaction.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Massaction.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Price.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Price.php index 4201689a44ab4..951b56b4d4743 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Price.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Radio.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Radio.php index 066b9dfa7e5cf..a2c3106ceae77 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Radio.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Radio.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Range.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Range.php index fef6047733d77..4d90615ada2a4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Range.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Range.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Select.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Select.php index 656080838e1e1..1b54ddc9e8b7f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Select.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Select.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Store.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Store.php index bdb6f9d7a94d9..641b01599a406 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Store.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Store.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Text.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Text.php index 705fd08f226e4..533d326fa4a6c 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Text.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Text.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Theme.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Theme.php index d9da6f8abb1fd..5489b48aba91f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Theme.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Filter/Theme.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Abstract.php index 37b6cf692f9f2..be35373185c34 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Action.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Action.php index cb87475d7efbf..732c9e3f1d738 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Action.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Action.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Checkbox.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Checkbox.php index 49422240ce43f..81a4ada485cd1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Checkbox.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Checkbox.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Concat.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Concat.php index 09c0114ae0378..bb1dae1bd0810 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Concat.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Concat.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Country.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Country.php index 46ecb86d0980d..3f76302ef9133 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Country.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Country.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Currency.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Currency.php index 49908ee95e355..f27ec269e4bf0 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Currency.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Currency.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Date.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Date.php index 1a465781b29e3..9e4a6a8286ebe 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Date.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Date.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Datetime.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Datetime.php index a661960d4caca..863c0731fc015 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Datetime.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Datetime.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Input.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Input.php index c4883f6d7cdde..395ecaf20e3ec 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Input.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Input.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Interface.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Interface.php index 73c218b846baf..baaa488a31313 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Interface.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Interface.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Ip.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Ip.php index 4c94be98a64cc..d24a31938a78f 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Ip.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Ip.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Longtext.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Longtext.php index 71102ba8eb12f..ae76e300998ba 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Longtext.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Longtext.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Massaction.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Massaction.php index 2fe160f04e41b..ea9f3c65316be 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Massaction.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Massaction.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Number.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Number.php index 829d655bdc41b..5fd161105df38 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Number.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Number.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Options.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Options.php index 815a9d28c638d..6c0238bcdc249 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Options.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Options.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Price.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Price.php index a01bbd51bed6d..c647cf71cccdb 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Price.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Radio.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Radio.php index 82ac6e7ead1f4..f7a17e77a2346 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Radio.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Radio.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Select.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Select.php index f8337e3d5763b..f63c5dcd3943d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Select.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Select.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Store.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Store.php index 314011fd3527d..21e53e8e78b7b 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Store.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Store.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Text.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Text.php index ea4808aabae88..691bf7416c27a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Text.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Text.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Wrapline.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Wrapline.php index 0eaaa1765ef2e..ce991d3739ba9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Wrapline.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column/Renderer/Wrapline.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php index 4f6f5a66f5bcd..c91d4cf4f735a 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Container.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction.php index ff8b246b0719e..51a2db9cb46d3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Abstract.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Abstract.php index 15cc44447af8a..ae845927376b1 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Abstract.php @@ -20,13 +20,15 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** * Grid widget massaction block * + * @method Mage_Sales_Model_Quote setHideFormElement(boolean $value) Hide Form element to prevent IE errors + * @method boolean getHideFormElement() * @category Mage * @package Mage_Adminhtml * @author Magento Core Team @@ -40,6 +42,9 @@ abstract class Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract extends Mage */ protected $_items = array(); + /** + * Sets Massaction template + */ public function __construct() { parent::__construct(); @@ -187,10 +192,8 @@ public function getSelectedJson() if($selected = $this->getRequest()->getParam($this->getFormFieldNameInternal())) { $selected = explode(',', $selected); return join(',', $selected); -// return Mage::helper('Mage_Core_Helper_Data')->jsonEncode($selected); } else { return ''; -// return '[]'; } } @@ -221,13 +224,14 @@ public function getApplyButtonHtml() public function getJavaScript() { - return " - var {$this->getJsObjectName()} = new varienGridMassaction('{$this->getHtmlId()}', {$this->getGridJsObjectName()}, '{$this->getSelectedJson()}', '{$this->getFormFieldNameInternal()}', '{$this->getFormFieldName()}'); - {$this->getJsObjectName()}.setItems({$this->getItemsJson()}); - {$this->getJsObjectName()}.setGridIds('{$this->getGridIdsJson()}'); - ". ($this->getUseAjax() ? "{$this->getJsObjectName()}.setUseAjax(true);" : '') . " - ". ($this->getUseSelectAll() ? "{$this->getJsObjectName()}.setUseSelectAll(true);" : '') . - "{$this->getJsObjectName()}.errorText = '{$this->getErrorText()}';"; + return " var {$this->getJsObjectName()} = new varienGridMassaction('{$this->getHtmlId()}', " + . "{$this->getGridJsObjectName()}, '{$this->getSelectedJson()}'" + . ", '{$this->getFormFieldNameInternal()}', '{$this->getFormFieldName()}');" + . "{$this->getJsObjectName()}.setItems({$this->getItemsJson()}); " + . "{$this->getJsObjectName()}.setGridIds('{$this->getGridIdsJson()}');" + . ($this->getUseAjax() ? "{$this->getJsObjectName()}.setUseAjax(true);" : '') + . ($this->getUseSelectAll() ? "{$this->getJsObjectName()}.setUseSelectAll(true);" : '') + . "{$this->getJsObjectName()}.errorText = '{$this->getErrorText()}';"; } public function getGridIdsJson() @@ -240,10 +244,8 @@ public function getGridIdsJson() if(!empty($gridIds)) { return join(",", $gridIds); - //return Mage::helper('Mage_Core_Helper_Data')->jsonEncode($gridIds); } return ''; - //return '[]'; } public function getHtmlId() @@ -288,4 +290,3 @@ public function setUseSelectAll($flag) return $this; } } - // Class Mage_Adminhtml_Block_Widget_Grid_Massaction_Abstract End diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Item.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Item.php index 494054c841597..7a640229621cb 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Item.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Item.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Item/Additional/Default.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Item/Additional/Default.php index e6042f8bf8ee0..f6a27990c4400 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Item/Additional/Default.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Item/Additional/Default.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Item/Additional/Interface.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Item/Additional/Interface.php index d07a8dd253fb9..222c39f82cc91 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Item/Additional/Interface.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Massaction/Item/Additional/Interface.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Serializer.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Serializer.php index b085660a421c9..9de0d775db813 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Serializer.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Serializer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Tab/Interface.php b/app/code/core/Mage/Adminhtml/Block/Widget/Tab/Interface.php index a11b346b7b9e8..716b4173a1ddf 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Tab/Interface.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Tab/Interface.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php b/app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php index d02f84d260164..2597095aacaba 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/View/Container.php b/app/code/core/Mage/Adminhtml/Block/Widget/View/Container.php index 0c4072f1313ea..e20f5d74d75c4 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/View/Container.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/View/Container.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Controller/Action.php b/app/code/core/Mage/Adminhtml/Controller/Action.php index efbfd9c351cfe..e6e3d2cbc03e8 100644 --- a/app/code/core/Mage/Adminhtml/Controller/Action.php +++ b/app/code/core/Mage/Adminhtml/Controller/Action.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Controller/Report/Abstract.php b/app/code/core/Mage/Adminhtml/Controller/Report/Abstract.php new file mode 100644 index 0000000000000..adcebaf55cc37 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Controller/Report/Abstract.php @@ -0,0 +1,124 @@ + + */ +abstract class Mage_Adminhtml_Controller_Report_Abstract extends Mage_Adminhtml_Controller_Action +{ + /** + * Admin session model + * + * @var null|Mage_Admin_Model_Session + */ + protected $_adminSession = null; + + /** + * Retrieve admin session model + * + * @return Mage_Admin_Model_Session + */ + protected function _getSession() + { + if (is_null($this->_adminSession)) { + $this->_adminSession = Mage::getSingleton('Mage_Admin_Model_Session'); + } + return $this->_adminSession; + } + + /** + * Add report breadcrumbs + * + * @return Mage_Adminhtml_Controller_Report_Abstract + */ + public function _initAction() + { + $this->loadLayout() + ->_addBreadcrumb(Mage::helper('Mage_Reports_Helper_Data')->__('Reports'), Mage::helper('Mage_Reports_Helper_Data')->__('Reports')); + return $this; + } + + /** + * Report action init operations + * + * @param array|Varien_Object $blocks + * @return Mage_Adminhtml_Controller_Report_Abstract + */ + public function _initReportAction($blocks) + { + if (!is_array($blocks)) { + $blocks = array($blocks); + } + + $requestData = Mage::helper('Mage_Adminhtml_Helper_Data')->prepareFilterString($this->getRequest()->getParam('filter')); + $requestData = $this->_filterDates($requestData, array('from', 'to')); + $requestData['store_ids'] = $this->getRequest()->getParam('store_ids'); + $params = new Varien_Object(); + + foreach ($requestData as $key => $value) { + if (!empty($value)) { + $params->setData($key, $value); + } + } + + foreach ($blocks as $block) { + if ($block) { + $block->setPeriodType($params->getData('period_type')); + $block->setFilterData($params); + } + } + + return $this; + } + + /** + * Add refresh statistics links + * + * @param string $flagCode + * @param string $refreshCode + * @return Mage_Adminhtml_Controller_Report_Abstract + */ + protected function _showLastExecutionTime($flagCode, $refreshCode) + { + $flag = Mage::getModel('Mage_Reports_Model_Flag')->setReportFlagCode($flagCode)->loadSelf(); + $updatedAt = ($flag->hasData()) + ? Mage::app()->getLocale()->storeDate( + 0, new Zend_Date($flag->getLastUpdate(), Varien_Date::DATETIME_INTERNAL_FORMAT), true + ) + : 'undefined'; + + $refreshStatsLink = $this->getUrl('*/report_statistics'); + $directRefreshLink = $this->getUrl('*/report_statistics/refreshRecent', array('code' => $refreshCode)); + + Mage::getSingleton('Mage_Adminhtml_Model_Session')->addNotice(Mage::helper('Mage_Adminhtml_Helper_Data')->__('Last updated: %s. To refresh last day\'s statistics, click here.', $updatedAt, $refreshStatsLink, $directRefreshLink)); + return $this; + } +} diff --git a/app/code/core/Mage/Adminhtml/Controller/Sales/Creditmemo.php b/app/code/core/Mage/Adminhtml/Controller/Sales/Creditmemo.php index a3db9bac1b0b8..4765143f44384 100644 --- a/app/code/core/Mage/Adminhtml/Controller/Sales/Creditmemo.php +++ b/app/code/core/Mage/Adminhtml/Controller/Sales/Creditmemo.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Controller/Sales/Invoice.php b/app/code/core/Mage/Adminhtml/Controller/Sales/Invoice.php index 5b899ba9b7432..5f713086ecea6 100644 --- a/app/code/core/Mage/Adminhtml/Controller/Sales/Invoice.php +++ b/app/code/core/Mage/Adminhtml/Controller/Sales/Invoice.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Controller/Sales/Shipment.php b/app/code/core/Mage/Adminhtml/Controller/Sales/Shipment.php index 9683ec828adfd..c64b21fd1ee3e 100644 --- a/app/code/core/Mage/Adminhtml/Controller/Sales/Shipment.php +++ b/app/code/core/Mage/Adminhtml/Controller/Sales/Shipment.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Exception.php b/app/code/core/Mage/Adminhtml/Exception.php index aec29c1ea29d6..62a57f0379d4f 100644 --- a/app/code/core/Mage/Adminhtml/Exception.php +++ b/app/code/core/Mage/Adminhtml/Exception.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Helper/Addresses.php b/app/code/core/Mage/Adminhtml/Helper/Addresses.php index 6ccfb65b63984..bd9225aebf495 100644 --- a/app/code/core/Mage/Adminhtml/Helper/Addresses.php +++ b/app/code/core/Mage/Adminhtml/Helper/Addresses.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Helper/Catalog.php b/app/code/core/Mage/Adminhtml/Helper/Catalog.php index 9ae0bc4854d53..2fd481c71145a 100644 --- a/app/code/core/Mage/Adminhtml/Helper/Catalog.php +++ b/app/code/core/Mage/Adminhtml/Helper/Catalog.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Helper/Catalog/Product/Composite.php b/app/code/core/Mage/Adminhtml/Helper/Catalog/Product/Composite.php index 9c16f029078d6..688e9e244f295 100644 --- a/app/code/core/Mage/Adminhtml/Helper/Catalog/Product/Composite.php +++ b/app/code/core/Mage/Adminhtml/Helper/Catalog/Product/Composite.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Helper/Catalog/Product/Edit/Action/Attribute.php b/app/code/core/Mage/Adminhtml/Helper/Catalog/Product/Edit/Action/Attribute.php index 745a8553cf5df..3bcbb4241e5da 100644 --- a/app/code/core/Mage/Adminhtml/Helper/Catalog/Product/Edit/Action/Attribute.php +++ b/app/code/core/Mage/Adminhtml/Helper/Catalog/Product/Edit/Action/Attribute.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Helper/Dashboard/Abstract.php b/app/code/core/Mage/Adminhtml/Helper/Dashboard/Abstract.php index 7b851d3e7a4c5..66c59d0e40556 100644 --- a/app/code/core/Mage/Adminhtml/Helper/Dashboard/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Helper/Dashboard/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Helper/Dashboard/Data.php b/app/code/core/Mage/Adminhtml/Helper/Dashboard/Data.php index d395d20a498d8..6119ac7c2a234 100644 --- a/app/code/core/Mage/Adminhtml/Helper/Dashboard/Data.php +++ b/app/code/core/Mage/Adminhtml/Helper/Dashboard/Data.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Helper/Dashboard/Order.php b/app/code/core/Mage/Adminhtml/Helper/Dashboard/Order.php index 096cba611cd67..bb19399e09762 100644 --- a/app/code/core/Mage/Adminhtml/Helper/Dashboard/Order.php +++ b/app/code/core/Mage/Adminhtml/Helper/Dashboard/Order.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Helper/Data.php b/app/code/core/Mage/Adminhtml/Helper/Data.php index 0fa97d28d11bc..3792f5ee02dca 100644 --- a/app/code/core/Mage/Adminhtml/Helper/Data.php +++ b/app/code/core/Mage/Adminhtml/Helper/Data.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Helper/Js.php b/app/code/core/Mage/Adminhtml/Helper/Js.php index e3ddc85c7463e..9b30e7f8e629c 100644 --- a/app/code/core/Mage/Adminhtml/Helper/Js.php +++ b/app/code/core/Mage/Adminhtml/Helper/Js.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Helper/Media/Js.php b/app/code/core/Mage/Adminhtml/Helper/Media/Js.php index 9e274513c1350..523da5baca425 100644 --- a/app/code/core/Mage/Adminhtml/Helper/Media/Js.php +++ b/app/code/core/Mage/Adminhtml/Helper/Media/Js.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -28,9 +28,10 @@ /** * Media library js helper * + * @deprecated since 1.7.0.0 * @category Mage * @package Mage_Adminhtml - * @author Magento Core Team + * @author Magento Core Team */ class Mage_Adminhtml_Helper_Media_Js extends Mage_Core_Helper_Js { diff --git a/app/code/core/Mage/Adminhtml/Helper/Rss.php b/app/code/core/Mage/Adminhtml/Helper/Rss.php index 90291d8e846d6..572ce27743922 100644 --- a/app/code/core/Mage/Adminhtml/Helper/Rss.php +++ b/app/code/core/Mage/Adminhtml/Helper/Rss.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Helper/Sales.php b/app/code/core/Mage/Adminhtml/Helper/Sales.php index 120aaf12821b3..4e639d046fe44 100644 --- a/app/code/core/Mage/Adminhtml/Helper/Sales.php +++ b/app/code/core/Mage/Adminhtml/Helper/Sales.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/Config.php b/app/code/core/Mage/Adminhtml/Model/Config.php index 8a55f0636b136..9517f4b700154 100644 --- a/app/code/core/Mage/Adminhtml/Model/Config.php +++ b/app/code/core/Mage/Adminhtml/Model/Config.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/Config/Data.php b/app/code/core/Mage/Adminhtml/Model/Config/Data.php index 50c7afc4ec819..01b8cb121e482 100644 --- a/app/code/core/Mage/Adminhtml/Model/Config/Data.php +++ b/app/code/core/Mage/Adminhtml/Model/Config/Data.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -45,6 +45,8 @@ public function save() $this->_validate(); $this->_getScope(); + Mage::dispatchEvent('model_config_data_save_before', array('object' => $this)); + $section = $this->getSection(); $website = $this->getWebsite(); $store = $this->getStore(); diff --git a/app/code/core/Mage/Adminhtml/Model/Customer/Renderer/Region.php b/app/code/core/Mage/Adminhtml/Model/Customer/Renderer/Region.php index 6488fe75ac869..d8976ffd318cc 100644 --- a/app/code/core/Mage/Adminhtml/Model/Customer/Renderer/Region.php +++ b/app/code/core/Mage/Adminhtml/Model/Customer/Renderer/Region.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/Email/Template.php b/app/code/core/Mage/Adminhtml/Model/Email/Template.php index 4b05d4d6c3700..2d0cdbfcf483b 100644 --- a/app/code/core/Mage/Adminhtml/Model/Email/Template.php +++ b/app/code/core/Mage/Adminhtml/Model/Email/Template.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/Extension.php b/app/code/core/Mage/Adminhtml/Model/Extension.php index a17ada6516cbd..e791ee7479052 100644 --- a/app/code/core/Mage/Adminhtml/Model/Extension.php +++ b/app/code/core/Mage/Adminhtml/Model/Extension.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/Giftmessage/Save.php b/app/code/core/Mage/Adminhtml/Model/Giftmessage/Save.php index f53e8c78ea702..627c10c5a37f5 100644 --- a/app/code/core/Mage/Adminhtml/Model/Giftmessage/Save.php +++ b/app/code/core/Mage/Adminhtml/Model/Giftmessage/Save.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/LayoutUpdate/Validator.php b/app/code/core/Mage/Adminhtml/Model/LayoutUpdate/Validator.php index deec68f06b602..2e10b422a51f6 100644 --- a/app/code/core/Mage/Adminhtml/Model/LayoutUpdate/Validator.php +++ b/app/code/core/Mage/Adminhtml/Model/LayoutUpdate/Validator.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/Newsletter/Renderer/Text.php b/app/code/core/Mage/Adminhtml/Model/Newsletter/Renderer/Text.php index 06aef2f20b239..b679b993c95c8 100644 --- a/app/code/core/Mage/Adminhtml/Model/Newsletter/Renderer/Text.php +++ b/app/code/core/Mage/Adminhtml/Model/Newsletter/Renderer/Text.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/Observer.php b/app/code/core/Mage/Adminhtml/Model/Observer.php index 276dc2ab73a8e..099aa335fcd81 100644 --- a/app/code/core/Mage/Adminhtml/Model/Observer.php +++ b/app/code/core/Mage/Adminhtml/Model/Observer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/Report/Item.php b/app/code/core/Mage/Adminhtml/Model/Report/Item.php index 8bd7756813271..44b86db696fdb 100644 --- a/app/code/core/Mage/Adminhtml/Model/Report/Item.php +++ b/app/code/core/Mage/Adminhtml/Model/Report/Item.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Adminhtml_Model_Report_Item extends Varien_Object diff --git a/app/code/core/Mage/Adminhtml/Model/Sales/Order.php b/app/code/core/Mage/Adminhtml/Model/Sales/Order.php index 296cd74bf8777..9b1013bcd0f89 100644 --- a/app/code/core/Mage/Adminhtml/Model/Sales/Order.php +++ b/app/code/core/Mage/Adminhtml/Model/Sales/Order.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -71,9 +71,7 @@ public function checkRelation(Mage_Sales_Model_Order $order) foreach ($order->getAllItems() as $item) { if (!$productCollection->getItemById($item->getProductId())) { $this->_getSession()->addError( - Mage::helper('Mage_Adminhtml_Helper_Data')->__('The item %s (SKU %s) does not exist in the catalog anymore.', - $item->getName(), - $item->getSku() + Mage::helper('Mage_Adminhtml_Helper_Data')->__('The item %s (SKU %s) does not exist in the catalog anymore.', $item->getName(), $item->getSku() )); $hasBadItems = true; } @@ -87,4 +85,3 @@ public function checkRelation(Mage_Sales_Model_Order $order) } } - diff --git a/app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php b/app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php index 92bf730c98d97..26dc8d39a4875 100644 --- a/app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php +++ b/app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -32,7 +32,7 @@ * @package Mage_Adminhtml * @author Magento Core Team */ -class Mage_Adminhtml_Model_Sales_Order_Create extends Varien_Object +class Mage_Adminhtml_Model_Sales_Order_Create extends Varien_Object implements Mage_Checkout_Model_Cart_Interface { /** * Quote session object @@ -111,6 +111,13 @@ class Mage_Adminhtml_Model_Sales_Order_Create extends Varien_Object */ protected $_errors = array(); + /** + * Quote associated with the model + * + * @var Mage_Sales_Model_Quote + */ + protected $_quote; + public function __construct() { $this->_session = Mage::getSingleton('Mage_Adminhtml_Model_Session_Quote'); @@ -233,7 +240,22 @@ public function getSession() */ public function getQuote() { - return $this->getSession()->getQuote(); + if (!$this->_quote) { + $this->_quote = $this->getSession()->getQuote(); + } + return $this->_quote; + } + + /** + * Set quote object + * + * @param Mage_Sales_Model_Quote $quote + * @return Mage_Adminhtml_Model_Sales_Order_Create + */ + public function setQuote(Mage_Sales_Model_Quote $quote) + { + $this->_quote = $quote; + return $this; } /** @@ -633,6 +655,9 @@ public function applySidebarData($data) $this->removeItem($itemId, $from); } } + if (isset($data['empty_customer_cart']) && (int)$data['empty_customer_cart'] == 1) { + $this->getCustomerCart()->removeAllItems()->collectTotals()->save(); + } return $this; } diff --git a/app/code/core/Mage/Adminhtml/Model/Sales/Order/Random.php b/app/code/core/Mage/Adminhtml/Model/Sales/Order/Random.php index 99c7a104837f4..4ce4b49c867fc 100644 --- a/app/code/core/Mage/Adminhtml/Model/Sales/Order/Random.php +++ b/app/code/core/Mage/Adminhtml/Model/Sales/Order/Random.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/Search/Catalog.php b/app/code/core/Mage/Adminhtml/Model/Search/Catalog.php index 2f58b22b4c104..f9d7d9bb7d028 100644 --- a/app/code/core/Mage/Adminhtml/Model/Search/Catalog.php +++ b/app/code/core/Mage/Adminhtml/Model/Search/Catalog.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/Search/Customer.php b/app/code/core/Mage/Adminhtml/Model/Search/Customer.php index b06896883f1a5..a860a55c4cb4c 100644 --- a/app/code/core/Mage/Adminhtml/Model/Search/Customer.php +++ b/app/code/core/Mage/Adminhtml/Model/Search/Customer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/Search/Order.php b/app/code/core/Mage/Adminhtml/Model/Search/Order.php index eb93779a7a419..77a33e8501847 100644 --- a/app/code/core/Mage/Adminhtml/Model/Search/Order.php +++ b/app/code/core/Mage/Adminhtml/Model/Search/Order.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/Session.php b/app/code/core/Mage/Adminhtml/Model/Session.php index 401136d239492..7ebb30e7ad8c4 100644 --- a/app/code/core/Mage/Adminhtml/Model/Session.php +++ b/app/code/core/Mage/Adminhtml/Model/Session.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/Session/Quote.php b/app/code/core/Mage/Adminhtml/Model/Session/Quote.php index d8bf31246f219..8ff13b2d3f57a 100644 --- a/app/code/core/Mage/Adminhtml/Model/Session/Quote.php +++ b/app/code/core/Mage/Adminhtml/Model/Session/Quote.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Custom.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Custom.php index 57a4a5fee5631..e7abd834904ab 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Custom.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Custom.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Custompath.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Custompath.php index 5c02fa82b4b1a..e1475539175be 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Custompath.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Custompath.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Observer.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Observer.php index 5b033370680bb..6060269ae0b84 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Observer.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Observer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Password/Link/Expirationperiod.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Password/Link/Expirationperiod.php index c0b48d180a5ba..42c3fc4a1b802 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Password/Link/Expirationperiod.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Password/Link/Expirationperiod.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usecustom.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usecustom.php index 1f23c85a2c1e8..6c3523528d4c2 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usecustom.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usecustom.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usecustompath.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usecustompath.php index 5b5040bd18b17..bcdcc7e0b4e6c 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usecustompath.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usecustompath.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usesecretkey.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usesecretkey.php index 1318d6b05fe10..e422d45a38475 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usesecretkey.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Usesecretkey.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Baseurl.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Baseurl.php index 5186d288fe06d..8d3df8a603e6b 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Baseurl.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Baseurl.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Cache.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Cache.php index 6a3204fc5f4a3..f9f6af5e63dba 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Cache.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Cache.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Catalog/Inventory/Managestock.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Catalog/Inventory/Managestock.php index 1e1f57a984a7b..d54f4121f9843 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Catalog/Inventory/Managestock.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Catalog/Inventory/Managestock.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Catalog/Search/Type.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Catalog/Search/Type.php index ecb19cc3e2661..92c220973c3f9 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Catalog/Search/Type.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Catalog/Search/Type.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Category.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Category.php index 0b43edb3affbc..80ac66c3b43a8 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Category.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Category.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Abstract.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Abstract.php index 25c14e4b3bf4a..c8e8deabf3dc2 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Allow.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Allow.php index 8456d0d95541b..d244be362bfab 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Allow.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Allow.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Base.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Base.php index 71a9ed14a2422..dcbac27fd8311 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Base.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Base.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Cron.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Cron.php index 07e3105efd493..3c315bbe06487 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Cron.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Cron.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Default.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Default.php index 54af420d7081b..25200d6ab9eba 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Default.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Currency/Default.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Address/Street.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Address/Street.php index 9a47c77fdc10c..b14d0f5d9310e 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Address/Street.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Address/Street.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/GroupAutoAssign.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/GroupAutoAssign.php new file mode 100644 index 0000000000000..06eaed7428161 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/GroupAutoAssign.php @@ -0,0 +1,57 @@ + + */ +class Mage_Adminhtml_Model_System_Config_Backend_Customer_GroupAutoAssign extends Mage_Core_Model_Config_Data +{ + /** + * If merchant country is not in EU, VAT Validation should be disabled + * + * @return Mage_Core_Model_Abstract + */ + protected function _beforeSave() + { + $storeId = $this->getScopeId(); + $merchantCountry = Mage::getStoreConfig('general/store_information/merchant_country', $storeId); + + if (!Mage::helper('Mage_Core_Helper_Data')->isCountryInEU($merchantCountry, $storeId)) { + Mage::getConfig()->saveConfig( + Mage_Customer_Helper_Address::XML_PATH_VAT_VALIDATION_ENABLED, + 0, + $this->getScope(), + $storeId + ); + } + + return parent::_beforeSave(); + } +} diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Password/Link/Expirationperiod.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Password/Link/Expirationperiod.php index c64ddee4d11d7..3e3ead27555a9 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Password/Link/Expirationperiod.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Password/Link/Expirationperiod.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Show/Address.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Show/Address.php index e5b2cabb2bd5f..a549a002efb24 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Show/Address.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Show/Address.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Show/Customer.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Show/Customer.php index dc7488f9a2981..83d5b132fda78 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Show/Customer.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Customer/Show/Customer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Datashare.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Datashare.php index 42430935f1ca3..7c472a0b7ab20 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Datashare.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Datashare.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Design/Exception.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Design/Exception.php index 21c08ca4b0e00..a1648d1c033a2 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Design/Exception.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Design/Exception.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Email/Address.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Email/Address.php index 65548f8fcc92a..80a458feccb09 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Email/Address.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Email/Address.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Email/Sender.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Email/Sender.php index fb58b92052659..56d87bd571951 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Email/Sender.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Email/Sender.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Encrypted.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Encrypted.php index f7a08ca013bc6..14a1129a27f54 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Encrypted.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Encrypted.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/File.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/File.php index 44642951370b7..bf8c5bee0e263 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/File.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/File.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Filename.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Filename.php index 95a11f853ab15..83a0c76ccb59f 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Filename.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Filename.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image.php index ad148be31cdd1..02c402377c36e 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image/Favicon.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image/Favicon.php index dfa5d057e5146..89894e871d626 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image/Favicon.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image/Favicon.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image/Pdf.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image/Pdf.php index f393bd4d2a224..575dffbb0c866 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image/Pdf.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Image/Pdf.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Locale.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Locale.php index aeefd0d8e05a1..30a0c8061a6ab 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Locale.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Locale.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -48,8 +48,11 @@ protected function _afterSave() $values = explode(',', $this->getValue()); $exceptions = array(); + foreach ($collection as $data) { $match = false; + $scopeName = Mage::helper('Mage_Adminhtml_Helper_Data')->__('Default scope'); + if (preg_match('/(base|default)$/', $data->getPath(), $match)) { if (!in_array($data->getValue(), $values)) { $currencyName = Mage::app()->getLocale()->currency($data->getValue())->getName(); @@ -76,11 +79,7 @@ protected function _afterSave() break; } - $exceptions[] = Mage::helper('Mage_Adminhtml_Helper_Data')->__('Currency "%s" is used as %s in %s.', - $currencyName, - $fieldName, - $scopeName - ); + $exceptions[] = Mage::helper('Mage_Adminhtml_Helper_Data')->__('Currency "%s" is used as %s in %s.', $currencyName, $fieldName, $scopeName); } } } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Locale/Timezone.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Locale/Timezone.php index b280ecbe842f2..048fa75f8386d 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Locale/Timezone.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Locale/Timezone.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Log/Cron.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Log/Cron.php index 5ef3d4bcc376b..a2e8509094925 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Log/Cron.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Log/Cron.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Price/Scope.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Price/Scope.php index d627818b581f0..3c22b87e92565 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Price/Scope.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Price/Scope.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Product/Alert/Cron.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Product/Alert/Cron.php index 7061fa7abb0cc..50a2e1df57507 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Product/Alert/Cron.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Product/Alert/Cron.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Secure.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Secure.php index a0c513250a7ee..c3ae44f80d0ce 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Secure.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Secure.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Seo/Product.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Seo/Product.php index 3012bb3843034..64a0632c3f77e 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Seo/Product.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Seo/Product.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Serialized.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Serialized.php index 26c60859f0379..3355f1776c662 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Serialized.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Serialized.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Serialized/Array.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Serialized/Array.php index 83f8d18595261..df16b1a1e3aec 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Serialized/Array.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Serialized/Array.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Shipping/Tablerate.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Shipping/Tablerate.php index feb9065fe9e8f..91fe5ff23f2d3 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Shipping/Tablerate.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Shipping/Tablerate.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Sitemap.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Sitemap.php index 6eb50a972f8bd..dc7c042260f16 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Sitemap.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Sitemap.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Sitemap/Cron.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Sitemap/Cron.php index b3674526433e3..793f0cc96d2b7 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Sitemap/Cron.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Sitemap/Cron.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Storage/Media/Database.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Storage/Media/Database.php index c20160b0bb444..877d20f2b7ae5 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Storage/Media/Database.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Storage/Media/Database.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Store.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Store.php index f4d51d76687b2..95ed09a1f58ed 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Store.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Store.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Translate.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Translate.php index c01da5d67c837..f92dd2d7ba453 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Translate.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Translate.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Clone/Media/Image.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Clone/Media/Image.php index 7c69ef9161aa8..e19c2ea81e593 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Clone/Media/Image.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Clone/Media/Image.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Admin/Page.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Admin/Page.php index 47b52a07f1c4e..fadd44c9a53dc 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Admin/Page.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Admin/Page.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Allregion.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Allregion.php index 449d9301f64ad..bf12e42c5b194 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Allregion.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Allregion.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/GridPerPage.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/GridPerPage.php index 05bc9fd390ff7..c99eb15566304 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/GridPerPage.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/GridPerPage.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListMode.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListMode.php index c0f151116bcd4..7caeb03bd5de5 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListMode.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListMode.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListPerPage.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListPerPage.php index d2937baa09e89..bf66a4285a62b 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListPerPage.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListPerPage.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListSort.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListSort.php index 35b74e5b62b54..cdc3000b29503 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListSort.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/ListSort.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/Search/Type.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/Search/Type.php index 833277380e031..594837eeb4bdb 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/Search/Type.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/Search/Type.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/TimeFormat.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/TimeFormat.php index 8df61bbecf061..0769b1d537a6f 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/TimeFormat.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Catalog/TimeFormat.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Category.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Category.php index cf0d386bd12cc..20494281f94f7 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Category.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Category.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Checktype.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Checktype.php index e045b3503b835..2408f979b0954 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Checktype.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Checktype.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cms/Page.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cms/Page.php index 88045ca2aceeb..107c8986834d1 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cms/Page.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cms/Page.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Adminhtml_Model_System_Config_Source_Cms_Page diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cms/Wysiwyg/Enabled.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cms/Wysiwyg/Enabled.php index 5129e7b527af5..4e18f373a30d8 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cms/Wysiwyg/Enabled.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cms/Wysiwyg/Enabled.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Country.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Country.php index 7ac4be48931ef..538f7ad80055d 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Country.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Country.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Country/Full.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Country/Full.php index f2b8048d935ec..f1e4a7be5f3c9 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Country/Full.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Country/Full.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cron/Frequency.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cron/Frequency.php index e14c92cc4948a..432b30ad75b74 100755 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cron/Frequency.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Cron/Frequency.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Currency.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Currency.php index b24ed935a9299..44d0862e437b7 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Currency.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Currency.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Currency/Service.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Currency/Service.php index bb2b913d8be52..b15df5aac2b3f 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Currency/Service.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Currency/Service.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Address/Type.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Address/Type.php new file mode 100644 index 0000000000000..f37e323ad3f5b --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Address/Type.php @@ -0,0 +1,48 @@ + + */ +class Mage_Adminhtml_Model_System_Config_Source_Customer_Address_Type +{ + /** + * Retrieve possible customer address types + * + * @return array + */ + public function toOptionArray() + { + return array( + Mage_Customer_Model_Address_Abstract::TYPE_BILLING => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Billing Address'), + Mage_Customer_Model_Address_Abstract::TYPE_SHIPPING => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Shipping Address') + ); + } +} diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Group.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Group.php index 46f829933d4ef..c67aa416a6471 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Group.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Group.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Group/Multiselect.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Group/Multiselect.php new file mode 100644 index 0000000000000..0b168734c1bc4 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Customer/Group/Multiselect.php @@ -0,0 +1,50 @@ +_options) { + $this->_options = Mage::getResourceModel('Mage_Customer_Model_Resource_Group_Collection') + ->setRealGroupsFilter() + ->loadData()->toOptionArray(); + } + return $this->_options; + } +} diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Date/Short.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Date/Short.php index b4d62ce4288b4..b0d9bee836d4f 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Date/Short.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Date/Short.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Design/Package.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Design/Package.php index 04b993ddcd3dd..dba7cb508eca8 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Design/Package.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Design/Package.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Adminhtml_Model_System_Config_Source_Package diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Design/Robots.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Design/Robots.php index 11090da9b51c8..2b63840fac323 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Design/Robots.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Design/Robots.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Dev/Dbautoup.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Dev/Dbautoup.php index 1109dec13e2e7..e9ce071f07a4b 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Dev/Dbautoup.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Dev/Dbautoup.php @@ -20,18 +20,17 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Adminhtml_Model_System_Config_Source_Dev_Dbautoup { public function toOptionArray() { - $hlp = Mage::helper('Mage_Adminhtml_Helper_Data'); return array( - array('value'=>Mage_Core_Model_Resource::AUTO_UPDATE_ALWAYS, 'label'=>$hlp->__('Always (during development)')), - array('value'=>Mage_Core_Model_Resource::AUTO_UPDATE_ONCE, 'label'=>$hlp->__('Only Once (version upgrade)')), - array('value'=>Mage_Core_Model_Resource::AUTO_UPDATE_NEVER, 'label'=>$hlp->__('Never (production)')), + array('value'=>Mage_Core_Model_Resource::AUTO_UPDATE_ALWAYS, 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Always (during development)')), + array('value'=>Mage_Core_Model_Resource::AUTO_UPDATE_ONCE, 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Only Once (version upgrade)')), + array('value'=>Mage_Core_Model_Resource::AUTO_UPDATE_NEVER, 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('Never (production)')), ); } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Identity.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Identity.php index 94848aa1f908e..1882c96014597 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Identity.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Identity.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Method.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Method.php index 57eac63173e30..b877438992f2e 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Method.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Method.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Smtpauth.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Smtpauth.php index a806cad68ee4c..4918cbe6c2b3e 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Smtpauth.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Smtpauth.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Template.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Template.php index f5c0eea54ab3d..442bd95f49212 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Template.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Email/Template.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Enabledisable.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Enabledisable.php index 6f766f806bf73..160978f1be998 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Enabledisable.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Enabledisable.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Frequency.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Frequency.php index 2b174aa591fb2..ecdd2004b7437 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Frequency.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Frequency.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale.php index e892ba8f6193c..f2d2ab830c080 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Country.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Country.php index ac26271a5d141..cb509591d2641 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Country.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Country.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Currency.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Currency.php index 0635ed83396ac..ab5b2dfadfe68 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Currency.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Currency.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Currency/All.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Currency/All.php index e346ec591114e..ff1a617b394ab 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Currency/All.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Currency/All.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Timezone.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Timezone.php index 0e409f7f9f804..9a319c11346b9 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Timezone.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Timezone.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Weekdays.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Weekdays.php index 66d041f336b41..d5905b739b85c 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Weekdays.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Locale/Weekdays.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Nooptreq.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Nooptreq.php index 6aca0a43557a8..9ad6c4d5f9a44 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Nooptreq.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Nooptreq.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Adminhtml_Model_System_Config_Source_Nooptreq diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Notification/Frequency.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Notification/Frequency.php index 6ea6a55987713..6811eb8d969e3 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Notification/Frequency.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Notification/Frequency.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status.php index 55a42316c7b80..0fa4aa5661736 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/New.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/New.php index d18071c8c1c22..4f87b182f3701 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/New.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/New.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/Newprocessing.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/Newprocessing.php index 7a51d1c77cbc4..7a71d272de412 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/Newprocessing.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/Newprocessing.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/Processing.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/Processing.php index 76852c533f741..42892359248d8 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/Processing.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Order/Status/Processing.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allmethods.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allmethods.php index 8c59feadea677..350f10a4e4d1f 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allmethods.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allmethods.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allowedmethods.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allowedmethods.php index d321d0234f4ea..ad11e10bf7bf4 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allowedmethods.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allowedmethods.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allspecificcountries.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allspecificcountries.php index 9173aafeec69b..4fc42b8451e87 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allspecificcountries.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Allspecificcountries.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Cctype.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Cctype.php index 3d2a3a5c32c13..a23ba7937f1b7 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Cctype.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Payment/Cctype.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Price/Scope.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Price/Scope.php index 72b6573f192eb..c171c71a3c5a4 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Price/Scope.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Price/Scope.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Price/Step.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Price/Step.php index 1522bde835b43..1b5691533988c 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Price/Step.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Price/Step.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Options/Price.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Options/Price.php index e1256e06d9456..ae3a07fc5de38 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Options/Price.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Options/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Options/Type.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Options/Type.php index 69d2bf44d3a88..9563ca278e78e 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Options/Type.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Options/Type.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -41,13 +41,16 @@ public function toOptionArray() array('value' => '', 'label' => Mage::helper('Mage_Adminhtml_Helper_Data')->__('-- Please select --')) ); + $helper = Mage::helper('Mage_Catalog_Helper_Data'); + foreach (Mage::getConfig()->getNode(self::PRODUCT_OPTIONS_GROUPS_PATH)->children() as $group) { $types = array(); $typesPath = self::PRODUCT_OPTIONS_GROUPS_PATH . '/' . $group->getName() . '/types'; foreach (Mage::getConfig()->getNode($typesPath)->children() as $type) { - $labelPath = self::PRODUCT_OPTIONS_GROUPS_PATH . '/' . $group->getName() . '/types/' . $type->getName() . '/label'; + $labelPath = self::PRODUCT_OPTIONS_GROUPS_PATH . '/' . $group->getName() . '/types/' . $type->getName() + . '/label'; $types[] = array( - 'label' => (string) Mage::getConfig()->getNode($labelPath), + 'label' => $helper->__((string) Mage::getConfig()->getNode($labelPath)), 'value' => $type->getName() ); } @@ -55,7 +58,7 @@ public function toOptionArray() $labelPath = self::PRODUCT_OPTIONS_GROUPS_PATH . '/' . $group->getName() . '/label'; $groups[] = array( - 'label' => (string) Mage::getConfig()->getNode($labelPath), + 'label' => $helper->__((string) Mage::getConfig()->getNode($labelPath)), 'value' => $types ); } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Thumbnail.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Thumbnail.php index 97c24d8f6962e..8e22dbf982a37 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Thumbnail.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Product/Thumbnail.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Reports/Scope.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Reports/Scope.php index 5f03696f04adc..2654b32fdbe00 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Reports/Scope.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Reports/Scope.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Allmethods.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Allmethods.php index 0fd6a7e6af0f4..81bf95798b615 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Allmethods.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Allmethods.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Allspecificcountries.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Allspecificcountries.php index 3e19f9ebe7548..5c3b9728a875a 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Allspecificcountries.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Allspecificcountries.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Flatrate.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Flatrate.php index c1c352119e9e8..c16ec10596854 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Flatrate.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Flatrate.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Tablerate.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Tablerate.php index c399fd08b4760..c0a039be5e5dc 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Tablerate.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Tablerate.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Taxclass.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Taxclass.php index a6f7beee6fa13..649085ff44cc9 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Taxclass.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Taxclass.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Adminhtml_Model_System_Config_Source_Shipping_Taxclass diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Storage/Media/Database.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Storage/Media/Database.php index 81e39b8989d61..c2670add3d8da 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Storage/Media/Database.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Storage/Media/Database.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Storage/Media/Storage.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Storage/Media/Storage.php index 810e217f4e067..75d7a2750c001 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Storage/Media/Storage.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Storage/Media/Storage.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Store.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Store.php index 53280ce351966..f847b9651e97f 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Store.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Store.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Apply/On.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Apply/On.php index ba4520305b679..327166b01da16 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Apply/On.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Apply/On.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Adminhtml_Model_System_Config_Source_Tax_Apply_On diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Basedon.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Basedon.php index e29597965d3c3..2a6f595d8d1b0 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Basedon.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Basedon.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Adminhtml_Model_System_Config_Source_Tax_Basedon diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Catalog.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Catalog.php index 891655c603e24..48c735ea4d842 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Catalog.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Tax/Catalog.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Adminhtml_Model_System_Config_Source_Tax_Catalog diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Watermark/Position.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Watermark/Position.php index 9d5dd6c20173e..43e15984d5736 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Watermark/Position.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Watermark/Position.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Web/Protocol.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Web/Protocol.php index 597c9a610313e..a647f6d60dbb6 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Web/Protocol.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Web/Protocol.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Adminhtml_Model_System_Config_Source_Web_Protocol diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Web/Redirect.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Web/Redirect.php index 5f34070176861..a18dc4c7c7d5e 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Web/Redirect.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Web/Redirect.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Adminhtml_Model_System_Config_Source_Web_Redirect diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Website.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Website.php index d3c30777f66c8..1cd91b35bff3f 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Website.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Website.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesno.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesno.php index 1a7701829d16e..3b2d6026e99ff 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesno.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesno.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesnocustom.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesnocustom.php index 921d976d5dbba..5144aed6defa5 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesnocustom.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Yesnocustom.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/Model/System/Store.php b/app/code/core/Mage/Adminhtml/Model/System/Store.php index e41c7263b6f73..ac4bf40ae55ea 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Store.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Store.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -488,7 +488,7 @@ public function getStoreNamePath($storeId) if (isset($this->_storeCollection[$storeId])) { $data = $this->_storeCollection[$storeId]; $name .= $this->getWebsiteName($data->getWebsiteId()); - $name .= ($name ? '/' : '').$this->getGroupName($data->getGroupId()); + $name .= ($name ? '/' : '') . $this->getGroupName($data->getGroupId()); } } return $name; diff --git a/app/code/core/Mage/Adminhtml/Model/Url.php b/app/code/core/Mage/Adminhtml/Model/Url.php index b6f4c52c7a569..01b9fe6b8f383 100644 --- a/app/code/core/Mage/Adminhtml/Model/Url.php +++ b/app/code/core/Mage/Adminhtml/Model/Url.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Adminhtml_Model_Url extends Mage_Core_Model_Url diff --git a/app/code/core/Mage/Adminhtml/controllers/AjaxController.php b/app/code/core/Mage/Adminhtml/controllers/AjaxController.php index 6556682fda2e4..fa1ac333fae3b 100644 --- a/app/code/core/Mage/Adminhtml/controllers/AjaxController.php +++ b/app/code/core/Mage/Adminhtml/controllers/AjaxController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Api/RoleController.php b/app/code/core/Mage/Adminhtml/controllers/Api/RoleController.php index 4d1c6e339e46a..183f9d4f5744d 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Api/RoleController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Api/RoleController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Api/UserController.php b/app/code/core/Mage/Adminhtml/controllers/Api/UserController.php index e6fc444f908dd..faffad63918a8 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Api/UserController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Api/UserController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Adminhtml_Api_UserController extends Mage_Adminhtml_Controller_Action diff --git a/app/code/core/Mage/Adminhtml/controllers/CacheController.php b/app/code/core/Mage/Adminhtml/controllers/CacheController.php index e696bedb67557..f15798160ab0d 100644 --- a/app/code/core/Mage/Adminhtml/controllers/CacheController.php +++ b/app/code/core/Mage/Adminhtml/controllers/CacheController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/Category/WidgetController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/Category/WidgetController.php index 800dc53079fdb..6c379bd7c27b4 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/Category/WidgetController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/Category/WidgetController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php index d12527f87697e..8a826f781955e 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -178,13 +178,23 @@ public function editAction() ->setLastEditedCategory($category->getId()); // $this->_initLayoutMessages('Mage_Adminhtml_Model_Session'); $this->loadLayout(); - $this->getResponse()->setBody(Mage::helper('Mage_Core_Helper_Data')->jsonEncode(array( - 'messages' => $this->getLayout()->getMessagesBlock()->getGroupedHtml(), - 'content' => - $this->getLayout()->getBlock('category.edit')->getFormHtml() + + $eventResponse = new Varien_Object(array( + 'content' => $this->getLayout()->getBlock('category.edit')->getFormHtml() . $this->getLayout()->getBlock('category.tree') - ->getBreadcrumbsJavascript($breadcrumbsPath, 'editingCategoryBreadcrumbs') - ))); + ->getBreadcrumbsJavascript($breadcrumbsPath, 'editingCategoryBreadcrumbs'), + 'messages' => $this->getLayout()->getMessagesBlock()->getGroupedHtml(), + )); + + Mage::dispatchEvent('category_prepare_ajax_response', array( + 'response' => $eventResponse, + 'controller' => $this + )); + + $this->getResponse()->setBody( + Mage::helper('Mage_Core_Helper_Data')->jsonEncode($eventResponse->getData()) + ); + return; } diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/Action/AttributeController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/Action/AttributeController.php index 8152355a71aad..4d7366bace430 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/Action/AttributeController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/Action/AttributeController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -159,8 +159,7 @@ public function saveAction() } $this->_getSession()->addSuccess( - $this->__('Total of %d record(s) were updated', - count($this->_getHelper()->getProductIds())) + $this->__('Total of %d record(s) were updated', count($this->_getHelper()->getProductIds())) ); } catch (Mage_Core_Exception $e) { diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php index f931ee02454c8..3db2d854392df 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -185,7 +185,8 @@ public function saveAction() $validatorAttrCode = new Zend_Validate_Regex(array('pattern' => '/^[a-z][a-z_0-9]{1,254}$/')); if (!$validatorAttrCode->isValid($data['attribute_code'])) { $session->addError( - $helper->__('Attribute code is invalid. Please use only letters (a-z), numbers (0-9) or underscore(_) in this field, first character should be a letter.')); + Mage::helper('Mage_Catalog_Helper_Data')->__('Attribute code is invalid. Please use only letters (a-z), numbers (0-9) or underscore(_) in this field, first character should be a letter.') + ); $this->_redirect('*/*/edit', array('attribute_id' => $id, '_current' => true)); return; } diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/DatafeedsController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/DatafeedsController.php index 6168cc499c325..178df4f139085 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/DatafeedsController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/DatafeedsController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GalleryController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GalleryController.php index bebc327ebc5a0..8aa70f916ad9d 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GalleryController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GalleryController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -46,6 +46,11 @@ public function uploadAction() Mage::getSingleton('Mage_Catalog_Model_Product_Media_Config')->getBaseTmpMediaPath() ); + Mage::dispatchEvent('catalog_product_gallery_upload_image_after', array( + 'result' => $result, + 'action' => $this + )); + /** * Workaround for prototype 1.7 methods "isJSON", "evalJSON" on Windows OS */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GroupController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GroupController.php index aabfb08c6f2bd..2dd43295ea21f 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GroupController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GroupController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php index d2089a0e39780..29c540a5d0746 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php index 2e8e7bc61c178..939a9316d6172 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/WidgetController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/WidgetController.php index 20dd441e93fbf..322d2a54bb3e4 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/WidgetController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/WidgetController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php index a9c04062b8599..a305ce08b9222 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php index eb1acc6bce401..26a3a8bcc4945 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -178,9 +178,7 @@ public function massDeleteAction() $model->delete(); } Mage::getSingleton('Mage_Adminhtml_Model_Session')->addSuccess( - Mage::helper('Mage_Adminhtml_Helper_Data')->__( - 'Total of %d record(s) were deleted', count($searchIds) - ) + Mage::helper('Mage_Adminhtml_Helper_Data')->__('Total of %d record(s) were deleted', count($searchIds)) ); } catch (Exception $e) { Mage::getSingleton('Mage_Adminhtml_Model_Session')->addError($e->getMessage()); diff --git a/app/code/core/Mage/Adminhtml/controllers/Checkout/AgreementController.php b/app/code/core/Mage/Adminhtml/controllers/Checkout/AgreementController.php index bd1b2cf6454b9..584997bdd102d 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Checkout/AgreementController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Checkout/AgreementController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -54,11 +54,13 @@ public function editAction() $id = $this->getRequest()->getParam('id'); $agreementModel = Mage::getModel('Mage_Checkout_Model_Agreement'); - $hlp = Mage::helper('Mage_Checkout_Helper_Data'); + if ($id) { $agreementModel->load($id); if (!$agreementModel->getId()) { - Mage::getSingleton('Mage_Adminhtml_Model_Session')->addError($hlp->__('This condition no longer exists.')); + Mage::getSingleton('Mage_Adminhtml_Model_Session')->addError( + Mage::helper('Mage_Checkout_Helper_Data')->__('This condition no longer exists.') + ); $this->_redirect('*/*/'); return; } @@ -74,7 +76,12 @@ public function editAction() Mage::register('checkout_agreement', $agreementModel); $this->_initAction() - ->_addBreadcrumb($id ? $hlp->__('Edit Condition') : $hlp->__('New Condition'), $id ? $hlp->__('Edit Condition') : $hlp->__('New Condition')) + ->_addBreadcrumb( + $id ? Mage::helper('Mage_Checkout_Helper_Data')->__('Edit Condition') + : Mage::helper('Mage_Checkout_Helper_Data')->__('New Condition'), + $id ? Mage::helper('Mage_Checkout_Helper_Data')->__('Edit Condition') + : Mage::helper('Mage_Checkout_Helper_Data')->__('New Condition') + ) ->_addContent( $this->getLayout() ->createBlock('Mage_Adminhtml_Block_Checkout_Agreement_Edit') diff --git a/app/code/core/Mage/Adminhtml/controllers/Cms/Block/WidgetController.php b/app/code/core/Mage/Adminhtml/controllers/Cms/Block/WidgetController.php index b4f1356aa824c..d5133d5fb89cd 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Cms/Block/WidgetController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Cms/Block/WidgetController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php b/app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php index f62c7cfba06b7..ae7bfc9eec6c9 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Cms/Page/WidgetController.php b/app/code/core/Mage/Adminhtml/controllers/Cms/Page/WidgetController.php index 16cf4a07cdf81..4980db54ee5f0 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Cms/Page/WidgetController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Cms/Page/WidgetController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php b/app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php index 8f738ca13b44d..ae5f9cc32cca0 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Cms/Wysiwyg/ImagesController.php b/app/code/core/Mage/Adminhtml/controllers/Cms/Wysiwyg/ImagesController.php index 60b139f5b4213..5b1bf2d3c0a71 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Cms/Wysiwyg/ImagesController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Cms/Wysiwyg/ImagesController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Cms/WysiwygController.php b/app/code/core/Mage/Adminhtml/controllers/Cms/WysiwygController.php index f3381bfc1656f..caf3e505e00a9 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Cms/WysiwygController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Cms/WysiwygController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Customer/Cart/Product/Composite/CartController.php b/app/code/core/Mage/Adminhtml/controllers/Customer/Cart/Product/Composite/CartController.php index 1eede4696599f..3c7eadc7c34b6 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Customer/Cart/Product/Composite/CartController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Customer/Cart/Product/Composite/CartController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Customer/GroupController.php b/app/code/core/Mage/Adminhtml/controllers/Customer/GroupController.php index 6823962aa557c..0d48c0a2a22fb 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Customer/GroupController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Customer/GroupController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Customer/OnlineController.php b/app/code/core/Mage/Adminhtml/controllers/Customer/OnlineController.php index b375799915c62..e08ec599a0155 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Customer/OnlineController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Customer/OnlineController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Adminhtml_Customer_OnlineController extends Mage_Adminhtml_Controller_Action diff --git a/app/code/core/Mage/Adminhtml/controllers/Customer/System/Config/ValidatevatController.php b/app/code/core/Mage/Adminhtml/controllers/Customer/System/Config/ValidatevatController.php new file mode 100644 index 0000000000000..7d8d7831049b2 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/controllers/Customer/System/Config/ValidatevatController.php @@ -0,0 +1,91 @@ + + */ +class Mage_Adminhtml_Customer_System_Config_ValidatevatController extends Mage_Adminhtml_Controller_Action +{ + /** + * Perform customer VAT ID validation + * + * @return Varien_Object + */ + protected function _validate() + { + return Mage::helper('Mage_Customer_Helper_Data')->checkVatNumber( + $this->getRequest()->getParam('country'), + $this->getRequest()->getParam('vat') + ); + } + + /** + * Check whether vat is valid + * + * @return void + */ + public function validateAction() + { + $result = $this->_validate(); + $this->getResponse()->setBody((int)$result->getIsValid()); + } + + /** + * Retrieve validation result as JSON + * + * @return void + */ + public function validateAdvancedAction() + { + /** @var $coreHelper Mage_Core_Helper_Data */ + $coreHelper = Mage::helper('Mage_Core_Helper_Data'); + + $result = $this->_validate(); + $valid = $result->getIsValid(); + $success = $result->getRequestSuccess(); + // ID of the store where order is placed + $storeId = $this->getRequest()->getParam('store_id'); + // Sanitize value if needed + if (!is_null($storeId)) { + $storeId = (int)$storeId; + } + + $groupId = Mage::helper('Mage_Customer_Helper_Data')->getCustomerGroupIdBasedOnVatNumber( + $this->getRequest()->getParam('country'), $result, $storeId + ); + + $body = $coreHelper->jsonEncode(array( + 'valid' => $valid, + 'group' => $groupId, + 'success' => $success + )); + $this->getResponse()->setBody($body); + } +} diff --git a/app/code/core/Mage/Adminhtml/controllers/Customer/Wishlist/Product/Composite/WishlistController.php b/app/code/core/Mage/Adminhtml/controllers/Customer/Wishlist/Product/Composite/WishlistController.php index 7c8b79fb8dba3..86822d08579e1 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Customer/Wishlist/Product/Composite/WishlistController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Customer/Wishlist/Product/Composite/WishlistController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/CustomerController.php b/app/code/core/Mage/Adminhtml/controllers/CustomerController.php index 618f62885bb57..df2e480171263 100644 --- a/app/code/core/Mage/Adminhtml/controllers/CustomerController.php +++ b/app/code/core/Mage/Adminhtml/controllers/CustomerController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -86,7 +86,7 @@ public function indexAction() public function gridAction() { $this->loadLayout(); - $this->getResponse()->setBody($this->getLayout()->createBlock('Mage_Adminhtml_Block_Customer_Grid')->toHtml()); + $this->renderLayout(); } /** @@ -186,21 +186,27 @@ public function saveAction() { $data = $this->getRequest()->getPost(); if ($data) { - $redirectBack = $this->getRequest()->getParam('back', false); + $redirectBack = $this->getRequest()->getParam('back', false); $this->_initCustomer('customer_id'); - /* @var $customer Mage_Customer_Model_Customer */ + /** @var $customer Mage_Customer_Model_Customer */ $customer = Mage::registry('current_customer'); - /* @var $customerForm Mage_Customer_Model_Form */ + /** @var $customerForm Mage_Customer_Model_Form */ $customerForm = Mage::getModel('Mage_Customer_Model_Form'); $customerForm->setEntity($customer) ->setFormCode('adminhtml_customer') ->ignoreInvisible(false) ; - $formData = $customerForm->extractData($this->getRequest(), 'account'); - $errors = $customerForm->validateData($formData); + $formData = $customerForm->extractData($this->getRequest(), 'account'); + + // Handle 'disable auto_group_change' attribute + if (isset($formData['disable_auto_group_change'])) { + $formData['disable_auto_group_change'] = empty($formData['disable_auto_group_change']) ? '0' : '1'; + } + + $errors = $customerForm->validateData($formData); if ($errors !== true) { foreach ($errors as $error) { $this->_getSession()->addError($error); @@ -212,27 +218,36 @@ public function saveAction() $customerForm->compactData($formData); - // unset template data + // Unset template data if (isset($data['address']['_template_'])) { unset($data['address']['_template_']); } $modifiedAddresses = array(); if (!empty($data['address'])) { - /* @var $addressForm Mage_Customer_Model_Form */ + /** @var $addressForm Mage_Customer_Model_Form */ $addressForm = Mage::getModel('Mage_Customer_Model_Form'); $addressForm->setFormCode('adminhtml_customer_address')->ignoreInvisible(false); foreach (array_keys($data['address']) as $index) { $address = $customer->getAddressItemById($index); if (!$address) { - $address = Mage::getModel('Mage_Customer_Model_Address'); + $address = Mage::getModel('Mage_Customer_Model_Address'); } $requestScope = sprintf('address/%s', $index); $formData = $addressForm->setEntity($address) ->extractData($this->getRequest(), $requestScope); - $errors = $addressForm->validateData($formData); + + // Set default billing and shipping flags to address + $isDefaultBilling = isset($data['account']['default_billing']) + && $data['account']['default_billing'] == $index; + $address->setIsDefaultBilling($isDefaultBilling); + $isDefaultShipping = isset($data['account']['default_shipping']) + && $data['account']['default_shipping'] == $index; + $address->setIsDefaultShipping($isDefaultShipping); + + $errors = $addressForm->validateData($formData); if ($errors !== true) { foreach ($errors as $error) { $this->_getSession()->addError($error); @@ -257,7 +272,7 @@ public function saveAction() } } - // default billing and shipping + // Default billing and shipping if (isset($data['account']['default_billing'])) { $customer->setData('default_billing', $data['account']['default_billing']); } @@ -268,7 +283,7 @@ public function saveAction() $customer->setData('confirmation', $data['account']['confirmation']); } - // not modified customer addresses mark for delete + // Mark not modified customer addresses for delete foreach ($customer->getAddressesCollection() as $customerAddress) { if ($customerAddress->getId() && !in_array($customerAddress->getId(), $modifiedAddresses)) { $customerAddress->setData('_deleted', true); @@ -286,7 +301,7 @@ public function saveAction() $isNewCustomer = $customer->isObjectNew(); try { $sendPassToEmail = false; - // force new customer active + // Force new customer confirmation if ($isNewCustomer) { $customer->setPassword($data['account']['password']); $customer->setForceConfirmed(true); @@ -303,14 +318,13 @@ public function saveAction() $customer->save(); - // send welcome email + // Send welcome email if ($customer->getWebsiteId() && (isset($data['account']['sendemail']) || $sendPassToEmail)) { $storeId = $customer->getSendemailStoreId(); if ($isNewCustomer) { $customer->sendNewAccountEmail('registered', '', $storeId); - } - // confirm not confirmed customer - else if ((!$customer->getConfirmation())) { + } elseif ((!$customer->getConfirmation())) { + // Confirm not confirmed customer $customer->sendNewAccountEmail('confirmed', '', $storeId); } } @@ -334,8 +348,8 @@ public function saveAction() if ($redirectBack) { $this->_redirect('*/*/edit', array( - 'id' => $customer->getId(), - '_current'=>true + 'id' => $customer->getId(), + '_current' => true )); return; } @@ -409,8 +423,8 @@ public function newsletterAction() ->loadByCustomer(Mage::registry('current_customer')); Mage::register('subscriber', $subscriber); - $this->getResponse()->setBody( - $this->getLayout()->createBlock('Mage_Adminhtml_Block_Customer_Edit_Tab_Newsletter_Grid')->toHtml()); + $this->loadLayout() + ->renderLayout(); } public function wishlistAction() @@ -470,10 +484,9 @@ public function cartAction() } } - $this->getResponse()->setBody( - $this->getLayout()->createBlock('Mage_Adminhtml_Block_Customer_Edit_Tab_Cart', 'admin.customer.view.cart', - array('website_id'=>$websiteId))->toHtml() - ); + $this->loadLayout(); + $this->getLayout()->getBlock('admin.customer.view.edit.cart')->setWebsiteId($websiteId); + $this->renderLayout(); } /** @@ -534,11 +547,11 @@ public function productTagsAction() public function tagGridAction() { $this->_initCustomer(); - $this->getResponse()->setBody( - $this->getLayout()->createBlock('Mage_Adminhtml_Block_Customer_Edit_Tab_Tag', 'admin.customer.tags') - ->setCustomerId(Mage::registry('current_customer')) - ->toHtml() + $this->loadLayout(); + $this->getLayout()->getBlock('admin.customer.tags')->setCustomerId( + Mage::registry('current_customer') ); + $this->renderLayout(); } public function validateAction() @@ -639,9 +652,7 @@ public function massSubscribeAction() $customer->save(); } Mage::getSingleton('Mage_Adminhtml_Model_Session')->addSuccess( - Mage::helper('Mage_Adminhtml_Helper_Data')->__( - 'Total of %d record(s) were updated.', count($customersIds) - ) + Mage::helper('Mage_Adminhtml_Helper_Data')->__('Total of %d record(s) were updated.', count($customersIds)) ); } catch (Exception $e) { Mage::getSingleton('Mage_Adminhtml_Model_Session')->addError($e->getMessage()); @@ -663,9 +674,7 @@ public function massUnsubscribeAction() $customer->save(); } Mage::getSingleton('Mage_Adminhtml_Model_Session')->addSuccess( - Mage::helper('Mage_Adminhtml_Helper_Data')->__( - 'Total of %d record(s) were updated.', count($customersIds) - ) + Mage::helper('Mage_Adminhtml_Helper_Data')->__('Total of %d record(s) were updated.', count($customersIds)) ); } catch (Exception $e) { Mage::getSingleton('Mage_Adminhtml_Model_Session')->addError($e->getMessage()); @@ -689,9 +698,7 @@ public function massDeleteAction() ->delete(); } Mage::getSingleton('Mage_Adminhtml_Model_Session')->addSuccess( - Mage::helper('Mage_Adminhtml_Helper_Data')->__( - 'Total of %d record(s) were deleted.', count($customersIds) - ) + Mage::helper('Mage_Adminhtml_Helper_Data')->__('Total of %d record(s) were deleted.', count($customersIds)) ); } catch (Exception $e) { Mage::getSingleton('Mage_Adminhtml_Model_Session')->addError($e->getMessage()); @@ -714,9 +721,7 @@ public function massAssignGroupAction() $customer->save(); } Mage::getSingleton('Mage_Adminhtml_Model_Session')->addSuccess( - Mage::helper('Mage_Adminhtml_Helper_Data')->__( - 'Total of %d record(s) were updated.', count($customersIds) - ) + Mage::helper('Mage_Adminhtml_Helper_Data')->__('Total of %d record(s) were updated.', count($customersIds)) ); } catch (Exception $e) { Mage::getSingleton('Mage_Adminhtml_Model_Session')->addError($e->getMessage()); diff --git a/app/code/core/Mage/Adminhtml/controllers/DashboardController.php b/app/code/core/Mage/Adminhtml/controllers/DashboardController.php index b08448c4fdf0b..1c19a6bd56899 100644 --- a/app/code/core/Mage/Adminhtml/controllers/DashboardController.php +++ b/app/code/core/Mage/Adminhtml/controllers/DashboardController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/IndexController.php b/app/code/core/Mage/Adminhtml/controllers/IndexController.php index e269689391f32..043f37dea93a6 100644 --- a/app/code/core/Mage/Adminhtml/controllers/IndexController.php +++ b/app/code/core/Mage/Adminhtml/controllers/IndexController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -76,14 +76,10 @@ public function loginAction() return; } $loginData = $this->getRequest()->getParam('login'); - $data = array(); + $username = (is_array($loginData) && array_key_exists('username', $loginData)) ? $loginData['username'] : null; - if(is_array($loginData) && array_key_exists('username', $loginData)) { - $data['username'] = $loginData['username']; - } else { - $data['username'] = null; - } - $this->_outTemplate('admin/login', $data); + $this->loadLayout(); + $this->renderLayout(); } /** @@ -217,40 +213,36 @@ public function forgotpasswordAction() if (!empty($email) && !empty($params)) { // Validate received data to be an email address - if (!Zend_Validate::is($email, 'EmailAddress')) { - $this->_getSession()->addError($this->__('Invalid email address.')); - $this->_outTemplate('forgotpassword'); - return; - } - $collection = Mage::getResourceModel('Mage_Admin_Model_Resource_User_Collection'); - /** @var $collection Mage_Admin_Model_Resource_User_Collection */ - $collection->addFieldToFilter('email', $email); - $collection->load(false); - - if ($collection->getSize() > 0) { - foreach ($collection as $item) { - $user = Mage::getModel('Mage_Admin_Model_User')->load($item->getId()); - if ($user->getId()) { - $newResetPasswordLinkToken = Mage::helper('Mage_Admin_Helper_Data')->generateResetPasswordLinkToken(); - $user->changeResetPasswordLinkToken($newResetPasswordLinkToken); - $user->save(); - $user->sendPasswordResetConfirmationEmail(); + if (Zend_Validate::is($email, 'EmailAddress')) { + $collection = Mage::getResourceModel('Mage_Admin_Model_Resource_User_Collection'); + /** @var $collection Mage_Admin_Model_Resource_User_Collection */ + $collection->addFieldToFilter('email', $email); + $collection->load(false); + + if ($collection->getSize() > 0) { + foreach ($collection as $item) { + $user = Mage::getModel('Mage_Admin_Model_User')->load($item->getId()); + if ($user->getId()) { + $newResetPasswordLinkToken = Mage::helper('Mage_Admin_Helper_Data')->generateResetPasswordLinkToken(); + $user->changeResetPasswordLinkToken($newResetPasswordLinkToken); + $user->save(); + $user->sendPasswordResetConfirmationEmail(); + } + break; } - break; } + $this->_getSession() + ->addSuccess(Mage::helper('Mage_Adminhtml_Helper_Data')->__('If there is an account associated with %s you will receive an email with a link to reset your password.', Mage::helper('Mage_Adminhtml_Helper_Data')->escapeHtml($email))); + $this->_redirect('*/*/login'); + return; + } else { + $this->_getSession()->addError($this->__('Invalid email address.')); } - $this->_getSession() - ->addSuccess(Mage::helper('Mage_Adminhtml_Helper_Data')->__('If there is an account associated with %s you will receive an email with a link to reset your password.', Mage::helper('Mage_Adminhtml_Helper_Data')->escapeHtml($email))); - $this->_redirect('*/*/login'); - return; } elseif (!empty($params)) { $this->_getSession()->addError(Mage::helper('Mage_Adminhtml_Helper_Data')->__('The email address is empty.')); } - - $data = array( - 'email' => $email - ); - $this->_outTemplate('admin/forgotpassword', $data); + $this->loadLayout(); + $this->renderLayout(); } /** diff --git a/app/code/core/Mage/Adminhtml/controllers/JsonController.php b/app/code/core/Mage/Adminhtml/controllers/JsonController.php index 63441b834b99e..a6c9216e69f86 100644 --- a/app/code/core/Mage/Adminhtml/controllers/JsonController.php +++ b/app/code/core/Mage/Adminhtml/controllers/JsonController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Media/EditorController.php b/app/code/core/Mage/Adminhtml/controllers/Media/EditorController.php index ed99b068485b5..b1845ab1dff62 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Media/EditorController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Media/EditorController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Media/UploaderController.php b/app/code/core/Mage/Adminhtml/controllers/Media/UploaderController.php index 4f20ef9921e7a..f635125d6fb71 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Media/UploaderController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Media/UploaderController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Newsletter/ProblemController.php b/app/code/core/Mage/Adminhtml/controllers/Newsletter/ProblemController.php index 058db895ee037..c558026b1ff89 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Newsletter/ProblemController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Newsletter/ProblemController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Newsletter/QueueController.php b/app/code/core/Mage/Adminhtml/controllers/Newsletter/QueueController.php index a5eb1aca82d78..3fbd4f20ed7e8 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Newsletter/QueueController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Newsletter/QueueController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Newsletter/SubscriberController.php b/app/code/core/Mage/Adminhtml/controllers/Newsletter/SubscriberController.php index 9a5538c87b31d..8036960e43b0f 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Newsletter/SubscriberController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Newsletter/SubscriberController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -102,9 +102,7 @@ public function massUnsubscribeAction() $subscriber->unsubscribe(); } Mage::getSingleton('Mage_Adminhtml_Model_Session')->addSuccess( - Mage::helper('Mage_Adminhtml_Helper_Data')->__( - 'Total of %d record(s) were updated', count($subscribersIds) - ) + Mage::helper('Mage_Adminhtml_Helper_Data')->__('Total of %d record(s) were updated', count($subscribersIds)) ); } catch (Exception $e) { Mage::getSingleton('Mage_Adminhtml_Model_Session')->addError($e->getMessage()); @@ -127,9 +125,7 @@ public function massDeleteAction() $subscriber->delete(); } Mage::getSingleton('Mage_Adminhtml_Model_Session')->addSuccess( - Mage::helper('Mage_Adminhtml_Helper_Data')->__( - 'Total of %d record(s) were deleted', count($subscribersIds) - ) + Mage::helper('Mage_Adminhtml_Helper_Data')->__('Total of %d record(s) were deleted', count($subscribersIds)) ); } catch (Exception $e) { Mage::getSingleton('Mage_Adminhtml_Model_Session')->addError($e->getMessage()); diff --git a/app/code/core/Mage/Adminhtml/controllers/Newsletter/TemplateController.php b/app/code/core/Mage/Adminhtml/controllers/Newsletter/TemplateController.php index 337864afac653..497702674b007 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Newsletter/TemplateController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Newsletter/TemplateController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** diff --git a/app/code/core/Mage/Adminhtml/controllers/NotificationController.php b/app/code/core/Mage/Adminhtml/controllers/NotificationController.php index f4bb81de63399..9b697988e14b5 100644 --- a/app/code/core/Mage/Adminhtml/controllers/NotificationController.php +++ b/app/code/core/Mage/Adminhtml/controllers/NotificationController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Permissions/RoleController.php b/app/code/core/Mage/Adminhtml/controllers/Permissions/RoleController.php index 99a505f282c45..564499ad955cb 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Permissions/RoleController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Permissions/RoleController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Permissions/UserController.php b/app/code/core/Mage/Adminhtml/controllers/Permissions/UserController.php index cffcb101a8d87..b79561ad5cce5 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Permissions/UserController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Permissions/UserController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Adminhtml_Permissions_UserController extends Mage_Adminhtml_Controller_Action diff --git a/app/code/core/Mage/Adminhtml/controllers/Poll/AnswerController.php b/app/code/core/Mage/Adminhtml/controllers/Poll/AnswerController.php index bd614f58d1359..9157e592b396c 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Poll/AnswerController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Poll/AnswerController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/PollController.php b/app/code/core/Mage/Adminhtml/controllers/PollController.php index 39705e9aafd78..73cddfeed8a74 100644 --- a/app/code/core/Mage/Adminhtml/controllers/PollController.php +++ b/app/code/core/Mage/Adminhtml/controllers/PollController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Promo/CatalogController.php b/app/code/core/Mage/Adminhtml/controllers/Promo/CatalogController.php index 65467c839059c..64b484575313f 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Promo/CatalogController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Promo/CatalogController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -137,11 +137,10 @@ public function saveAction() $data['conditions'] = $data['rule']['conditions']; unset($data['rule']); + $autoApply = false; if (!empty($data['auto_apply'])) { $autoApply = true; unset($data['auto_apply']); - } else { - $autoApply = false; } $model->loadPost($data); @@ -277,17 +276,15 @@ public function newActionHtmlAction() */ public function applyRulesAction() { + $errorMessage = Mage::helper('Mage_CatalogRule_Helper_Data')->__('Unable to apply rules.'); try { Mage::getModel('Mage_CatalogRule_Model_Rule')->applyAll(); Mage::app()->removeCache('catalog_rules_dirty'); - Mage::getSingleton('Mage_Adminhtml_Model_Session')->addSuccess( - Mage::helper('Mage_CatalogRule_Helper_Data')->__('The rules have been applied.') - ); + $this->_getSession()->addSuccess(Mage::helper('Mage_CatalogRule_Helper_Data')->__('The rules have been applied.')); + } catch (Mage_Core_Exception $e) { + $this->_getSession()->addError($errorMessage . ' ' . $e->getMessage()); } catch (Exception $e) { - Mage::getSingleton('Mage_Adminhtml_Model_Session')->addError( - Mage::helper('Mage_CatalogRule_Helper_Data')->__('Unable to apply rules.') - ); - throw $e; + $this->_getSession()->addError($errorMessage); } $this->_redirect('*/*'); } diff --git a/app/code/core/Mage/Adminhtml/controllers/Promo/QuoteController.php b/app/code/core/Mage/Adminhtml/controllers/Promo/QuoteController.php index a117e62f94731..7de8f01ed9fd2 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Promo/QuoteController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Promo/QuoteController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -32,9 +32,14 @@ protected function _initRule() $this->_title($this->__('Promotions'))->_title($this->__('Shopping Cart Price Rules')); Mage::register('current_promo_quote_rule', Mage::getModel('Mage_SalesRule_Model_Rule')); - if ($id = (int) $this->getRequest()->getParam('id')) { - Mage::registry('current_promo_quote_rule') - ->load($id); + $id = (int)$this->getRequest()->getParam('id'); + + if (!$id && $this->getRequest()->getParam('rule_id')) { + $id = (int)$this->getRequest()->getParam('rule_id'); + } + + if ($id) { + Mage::registry('current_promo_quote_rule')->load($id); } } @@ -110,21 +115,12 @@ public function saveAction() { if ($this->getRequest()->getPost()) { try { + /** @var $model Mage_SalesRule_Model_Rule */ $model = Mage::getModel('Mage_SalesRule_Model_Rule'); Mage::dispatchEvent( 'adminhtml_controller_salesrule_prepare_save', array('request' => $this->getRequest())); $data = $this->getRequest()->getPost(); - - //filter HTML tags - /** @var $helper Mage_Adminhtml_Helper_Data */ - $helper = Mage::helper('Mage_Adminhtml_Helper_Data'); - $data['name'] = $helper->stripTags($data['name']); - $data['description'] = $helper->stripTags($data['description']); - foreach ($data['store_labels'] as &$label) { - $label = $helper->stripTags($label); - } - $data = $this->_filterDates($data, array('from_date', 'to_date')); $id = $this->getRequest()->getParam('rule_id'); if ($id) { @@ -159,6 +155,9 @@ public function saveAction() unset($data['rule']); $model->loadPost($data); + $useAutoGeneration = (int)!empty($data['use_auto_generation']); + $model->setUseAutoGeneration($useAutoGeneration); + $session->setPageData($model->getData()); $model->save(); @@ -172,12 +171,20 @@ public function saveAction() return; } catch (Mage_Core_Exception $e) { $this->_getSession()->addError($e->getMessage()); + $id = (int)$this->getRequest()->getParam('rule_id'); + if (!empty($id)) { + $this->_redirect('*/*/edit', array('id' => $id)); + } else { + $this->_redirect('*/*/new'); + } + return; + } catch (Exception $e) { $this->_getSession()->addError( Mage::helper('Mage_CatalogRule_Helper_Data')->__('An error occurred while saving the rule data. Please review the log and try again.')); Mage::logException($e); Mage::getSingleton('Mage_Adminhtml_Model_Session')->setPageData($data); - $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('rule_id'))); + $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('rule_id'))); return; } } @@ -264,6 +271,128 @@ public function applyRulesAction() $this->renderLayout(); } + /** + * Coupon codes grid + */ + public function couponsGridAction() + { + $this->_initRule(); + $this->loadLayout()->renderLayout(); + } + + /** + * Export coupon codes as excel xml file + * + * @return void + */ + public function exportCouponsXmlAction() + { + $this->_initRule(); + $rule = Mage::registry('current_promo_quote_rule'); + if ($rule->getId()) { + $fileName = 'coupon_codes.xml'; + $content = $this->getLayout() + ->createBlock('Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Coupons_Grid') + ->getExcelFile($fileName); + $this->_prepareDownloadResponse($fileName, $content); + } else { + $this->_redirect('*/*/detail', array('_current' => true)); + return; + } + } + + /** + * Export coupon codes as CSV file + * + * @return void + */ + public function exportCouponsCsvAction() + { + $this->_initRule(); + $rule = Mage::registry('current_promo_quote_rule'); + if ($rule->getId()) { + $fileName = 'coupon_codes.csv'; + $content = $this->getLayout() + ->createBlock('Mage_Adminhtml_Block_Promo_Quote_Edit_Tab_Coupons_Grid') + ->getCsvFile(); + $this->_prepareDownloadResponse($fileName, $content); + } else { + $this->_redirect('*/*/detail', array('_current' => true)); + return; + } + } + + /** + * Coupons mass delete action + */ + public function couponsMassDeleteAction() + { + $this->_initRule(); + $rule = Mage::registry('current_promo_quote_rule'); + + if (!$rule->getId()) { + $this->_forward('noRoute'); + } + + $codesIds = $this->getRequest()->getParam('ids'); + + if (is_array($codesIds)) { + + $couponsCollection = Mage::getResourceModel('Mage_SalesRule_Model_Resource_Coupon_Collection') + ->addFieldToFilter('coupon_id', array('in' => $codesIds)); + + foreach ($couponsCollection as $coupon) { + $coupon->delete(); + } + } + } + + /** + * Generate Coupons action + */ + public function generateAction() + { + if (!$this->getRequest()->isAjax()) { + $this->_forward('noRoute'); + return; + } + $result = array(); + $this->_initRule(); + + /** @var $rule Mage_SalesRule_Model_Rule */ + $rule = Mage::registry('current_promo_quote_rule'); + + if (!$rule->getId()) { + $result['error'] = Mage::helper('Mage_SalesRule_Helper_Data')->__('Rule is not defined'); + } else { + try { + $data = $this->getRequest()->getParams(); + if (!empty($data['to_date'])) { + $data = array_merge($data, $this->_filterDates($data, array('to_date'))); + } + + /** @var $generator Mage_SalesRule_Model_Coupon_Massgenerator */ + $generator = $rule->getCouponMassGenerator(); + if (!$generator->validateData($data)) { + $result['error'] = Mage::helper('Mage_SalesRule_Helper_Data')->__('Not valid data provided'); + } else { + $generator->setData($data); + $generator->generatePool(); + $generated = $generator->getGeneratedCount(); + $this->_getSession()->addSuccess(Mage::helper('Mage_SalesRule_Helper_Data')->__('%s Coupon(s) generated successfully', $generated)); + $this->_initLayoutMessages('Mage_Adminhtml_Model_Session'); + $result['messages'] = $this->getLayout()->getMessagesBlock()->getGroupedHtml(); + } + } catch (Mage_Core_Exception $e) { + $result['error'] = $e->getMessage(); + } catch (Exception $e) { + $result['error'] = Mage::helper('Mage_SalesRule_Helper_Data')->__('An error occurred while generating coupons. Please review the log and try again.'); + Mage::logException($e); + } + } + $this->getResponse()->setBody(Mage::helper('Mage_Core_Helper_Data')->jsonEncode($result)); + } + /** * Chooser source action */ @@ -276,6 +405,10 @@ public function chooserAction() $this->getResponse()->setBody($chooserBlock->toHtml()); } + /** + * Returns result of current user permission check on resource and privilege + * @return boolean + */ protected function _isAllowed() { return Mage::getSingleton('Mage_Admin_Model_Session')->isAllowed('promo/quote'); diff --git a/app/code/core/Mage/Adminhtml/controllers/Promo/WidgetController.php b/app/code/core/Mage/Adminhtml/controllers/Promo/WidgetController.php index 2d704b6db0b9b..3ab0ee973182d 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Promo/WidgetController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Promo/WidgetController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/PromoController.php b/app/code/core/Mage/Adminhtml/controllers/PromoController.php index cc1d5174b91ba..5182793342dc9 100644 --- a/app/code/core/Mage/Adminhtml/controllers/PromoController.php +++ b/app/code/core/Mage/Adminhtml/controllers/PromoController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/RatingController.php b/app/code/core/Mage/Adminhtml/controllers/RatingController.php index 5d4747d9d4fa2..44691f3b52d41 100644 --- a/app/code/core/Mage/Adminhtml/controllers/RatingController.php +++ b/app/code/core/Mage/Adminhtml/controllers/RatingController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Report/CustomerController.php b/app/code/core/Mage/Adminhtml/controllers/Report/CustomerController.php index d9ff764ae915e..20438ca5d3637 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Report/CustomerController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Report/CustomerController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Report/ProductController.php b/app/code/core/Mage/Adminhtml/controllers/Report/ProductController.php index a7bd792c400a8..394d43ab12f78 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Report/ProductController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Report/ProductController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -32,21 +32,17 @@ * @package Mage_Adminhtml * @author Magento Core Team */ -class Mage_Adminhtml_Report_ProductController extends Mage_Adminhtml_Controller_Action +class Mage_Adminhtml_Report_ProductController extends Mage_Adminhtml_Controller_Report_Abstract { /** - * init + * Add report/products breadcrumbs * * @return Mage_Adminhtml_Report_ProductController */ public function _initAction() { - $act = $this->getRequest()->getActionName(); - if(!$act) - $act = 'default'; - $this->loadLayout() - ->_addBreadcrumb(Mage::helper('Mage_Reports_Helper_Data')->__('Reports'), Mage::helper('Mage_Reports_Helper_Data')->__('Reports')) - ->_addBreadcrumb(Mage::helper('Mage_Reports_Helper_Data')->__('Products'), Mage::helper('Mage_Reports_Helper_Data')->__('Products')); + parent::_initAction(); + $this->_addBreadcrumb(Mage::helper('Mage_Reports_Helper_Data')->__('Products'), Mage::helper('Mage_Reports_Helper_Data')->__('Products')); return $this; } @@ -101,15 +97,23 @@ public function exportSoldExcelAction() */ public function viewedAction() { - $this->_title($this->__('Reports')) - ->_title($this->__('Products')) - ->_title($this->__('Most Viewed')); + $this->_title($this->__('Reports'))->_title($this->__('Products'))->_title($this->__('Most Viewed')); + + $this->_showLastExecutionTime(Mage_Reports_Model_Flag::REPORT_PRODUCT_VIEWED_FLAG_CODE, 'viewed'); $this->_initAction() - ->_setActiveMenu('report/product/viewed') - ->_addBreadcrumb(Mage::helper('Mage_Reports_Helper_Data')->__('Most Viewed'), Mage::helper('Mage_Reports_Helper_Data')->__('Most Viewed')) - ->_addContent($this->getLayout()->createBlock('Mage_Adminhtml_Block_Report_Product_Viewed')) - ->renderLayout(); + ->_setActiveMenu('report/products/viewed') + ->_addBreadcrumb(Mage::helper('Mage_Adminhtml_Helper_Data')->__('Products Most Viewed Report'), Mage::helper('Mage_Adminhtml_Helper_Data')->__('Products Most Viewed Report')); + + $gridBlock = $this->getLayout()->getBlock('report_product_viewed.grid'); + $filterFormBlock = $this->getLayout()->getBlock('grid.filter.form'); + + $this->_initReportAction(array( + $gridBlock, + $filterFormBlock + )); + + $this->renderLayout(); } /** @@ -119,10 +123,9 @@ public function viewedAction() public function exportViewedCsvAction() { $fileName = 'products_mostviewed.csv'; - $content = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Report_Product_Viewed_Grid') - ->getCsv(); - - $this->_prepareDownloadResponse($fileName, $content); + $grid = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Report_Product_Viewed_Grid'); + $this->_initReportAction($grid); + $this->_prepareDownloadResponse($fileName, $grid->getCsvFile()); } /** @@ -132,10 +135,9 @@ public function exportViewedCsvAction() public function exportViewedExcelAction() { $fileName = 'products_mostviewed.xml'; - $content = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Report_Product_Viewed_Grid') - ->getExcel($fileName); - - $this->_prepareDownloadResponse($fileName, $content); + $grid = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Report_Product_Viewed_Grid'); + $this->_initReportAction($grid); + $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName)); } /** diff --git a/app/code/core/Mage/Adminhtml/controllers/Report/ReviewController.php b/app/code/core/Mage/Adminhtml/controllers/Report/ReviewController.php index 3494c5cb9d517..0bd28bf18ccac 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Report/ReviewController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Report/ReviewController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Report/SalesController.php b/app/code/core/Mage/Adminhtml/controllers/Report/SalesController.php index 6b21f87f440b8..0b2b0f0e41f72 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Report/SalesController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Report/SalesController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,49 +29,19 @@ * * @category Mage * @package Mage_Adminhtml - * @author Magento Core Team + * @author Magento Core Team */ -class Mage_Adminhtml_Report_SalesController extends Mage_Adminhtml_Controller_Action +class Mage_Adminhtml_Report_SalesController extends Mage_Adminhtml_Controller_Report_Abstract { /** - * Admin session model + * Add report/sales breadcrumbs * - * @var null|Mage_Admin_Model_Session + * @return Mage_Adminhtml_Report_SalesController */ - protected $_adminSession = null; - public function _initAction() { - $this->loadLayout() - ->_addBreadcrumb(Mage::helper('Mage_Reports_Helper_Data')->__('Reports'), Mage::helper('Mage_Reports_Helper_Data')->__('Reports')) - ->_addBreadcrumb(Mage::helper('Mage_Reports_Helper_Data')->__('Sales'), Mage::helper('Mage_Reports_Helper_Data')->__('Sales')); - return $this; - } - - public function _initReportAction($blocks) - { - if (!is_array($blocks)) { - $blocks = array($blocks); - } - - $requestData = Mage::helper('Mage_Adminhtml_Helper_Data')->prepareFilterString($this->getRequest()->getParam('filter')); - $requestData = $this->_filterDates($requestData, array('from', 'to')); - $requestData['store_ids'] = $this->getRequest()->getParam('store_ids'); - $params = new Varien_Object(); - - foreach ($requestData as $key => $value) { - if (!empty($value)) { - $params->setData($key, $value); - } - } - - foreach ($blocks as $block) { - if ($block) { - $block->setPeriodType($params->getData('period_type')); - $block->setFilterData($params); - } - } - + parent::_initAction(); + $this->_addBreadcrumb(Mage::helper('Mage_Reports_Helper_Data')->__('Sales'), Mage::helper('Mage_Reports_Helper_Data')->__('Sales')); return $this; } @@ -103,7 +73,7 @@ public function bestsellersAction() $this->_showLastExecutionTime(Mage_Reports_Model_Flag::REPORT_BESTSELLERS_FLAG_CODE, 'bestsellers'); $this->_initAction() - ->_setActiveMenu('report/sales/bestsellers') + ->_setActiveMenu('report/products/bestsellers') ->_addBreadcrumb(Mage::helper('Mage_Adminhtml_Helper_Data')->__('Products Bestsellers Report'), Mage::helper('Mage_Adminhtml_Helper_Data')->__('Products Bestsellers Report')); $gridBlock = $this->getLayout()->getBlock('report_sales_bestsellers.grid'); @@ -139,22 +109,6 @@ public function exportBestsellersExcelAction() $this->_prepareDownloadResponse($fileName, $grid->getExcelFile($fileName)); } - protected function _showLastExecutionTime($flagCode, $refreshCode) - { - $flag = Mage::getModel('Mage_Reports_Model_Flag')->setReportFlagCode($flagCode)->loadSelf(); - $updatedAt = ($flag->hasData()) - ? Mage::app()->getLocale()->storeDate( - 0, new Zend_Date($flag->getLastUpdate(), Varien_Date::DATETIME_INTERNAL_FORMAT), true - ) - : 'undefined'; - - $refreshStatsLink = $this->getUrl('*/*/refreshstatistics'); - $directRefreshLink = $this->getUrl('*/*/refreshRecent', array('code' => $refreshCode)); - - Mage::getSingleton('Mage_Adminhtml_Model_Session')->addNotice(Mage::helper('Mage_Adminhtml_Helper_Data')->__('Last updated: %s. To refresh last day\'s statistics, click here.', $updatedAt, $refreshStatsLink, $directRefreshLink)); - return $this; - } - /** * Refresh statistics for last 25 hours * @@ -449,17 +403,4 @@ protected function _isAllowed() break; } } - - /** - * Retrieve admin session model - * - * @return Mage_Admin_Model_Session - */ - protected function _getSession() - { - if (is_null($this->_adminSession)) { - $this->_adminSession = Mage::getSingleton('Mage_Admin_Model_Session'); - } - return $this->_adminSession; - } } diff --git a/app/code/core/Mage/Adminhtml/controllers/Report/ShopcartController.php b/app/code/core/Mage/Adminhtml/controllers/Report/ShopcartController.php index 7c9e049840a28..0240fd481f4b5 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Report/ShopcartController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Report/ShopcartController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Report/StatisticsController.php b/app/code/core/Mage/Adminhtml/controllers/Report/StatisticsController.php index 927b109984113..8741458133893 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Report/StatisticsController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Report/StatisticsController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -99,13 +99,14 @@ protected function _getCollectionNames() } $aliases = array( - 'sales' => 'Mage_Sales_Model_Resource_Report_Order', - 'tax' => 'Mage_Tax_Model_Resource_Report_Tax', - 'shipping' => 'Mage_Sales_Model_Resource_Report_Shipping', - 'invoiced' => 'Mage_Sales_Model_Resource_Report_Invoiced', - 'refunded' => 'Mage_Sales_Model_Resource_Report_Refunded', - 'coupons' => 'Mage_SalesRule_Model_Resource_Report_Rule', + 'sales' => 'Mage_Sales_Model_Resource_Report_Order', + 'tax' => 'Mage_Tax_Model_Resource_Report_Tax', + 'shipping' => 'Mage_Sales_Model_Resource_Report_Shipping', + 'invoiced' => 'Mage_Sales_Model_Resource_Report_Invoiced', + 'refunded' => 'Mage_Sales_Model_Resource_Report_Refunded', + 'coupons' => 'Mage_SalesRule_Model_Resource_Report_Rule', 'bestsellers' => 'Mage_Sales_Model_Resource_Report_Bestsellers', + 'viewed' => 'Mage_Sales_Model_Resource_Report_Product_Viewed', ); $out = array(); foreach ($codes as $code) { diff --git a/app/code/core/Mage/Adminhtml/controllers/Report/TagController.php b/app/code/core/Mage/Adminhtml/controllers/Report/TagController.php index a4a07753c671b..5f3afbedfd794 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Report/TagController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Report/TagController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/ReportController.php b/app/code/core/Mage/Adminhtml/controllers/ReportController.php index 215cc14b53197..a8d5af09ee324 100644 --- a/app/code/core/Mage/Adminhtml/controllers/ReportController.php +++ b/app/code/core/Mage/Adminhtml/controllers/ReportController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Rss/CatalogController.php b/app/code/core/Mage/Adminhtml/controllers/Rss/CatalogController.php index 419f924f2c6c1..b51fe96cba787 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Rss/CatalogController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Rss/CatalogController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Rss/OrderController.php b/app/code/core/Mage/Adminhtml/controllers/Rss/OrderController.php index 0339059a0595b..9760fd1a79d05 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Rss/OrderController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Rss/OrderController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Sales/Billing/AgreementController.php b/app/code/core/Mage/Adminhtml/controllers/Sales/Billing/AgreementController.php index c9c14966fdf91..57cca433f10ae 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/Billing/AgreementController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/Billing/AgreementController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Sales/CreditmemoController.php b/app/code/core/Mage/Adminhtml/controllers/Sales/CreditmemoController.php index 6b815042f3cb8..75ca991988b73 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/CreditmemoController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/CreditmemoController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Sales/InvoiceController.php b/app/code/core/Mage/Adminhtml/controllers/Sales/InvoiceController.php index 1a1f7da746177..acfd358fc7e1a 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/InvoiceController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/InvoiceController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreateController.php b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreateController.php index 0aec3763f3c90..735aa1756360a 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreateController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreateController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -131,6 +131,14 @@ protected function _processData() */ protected function _processActionData($action = null) { + $eventData = array( + 'order_create_model' => $this->_getOrderCreateModel(), + 'request_model' => $this->getRequest(), + 'session' => $this->_getSession(), + ); + + Mage::dispatchEvent('adminhtml_sales_order_create_process_data_before', $eventData); + /** * Saving order data */ @@ -279,7 +287,8 @@ protected function _processActionData($action = null) $data = $this->getRequest()->getPost('order'); if (!empty($data['coupon']['code'])) { if ($this->_getQuote()->getCouponCode() !== $data['coupon']['code']) { - $this->_getSession()->addError($this->__('"%s" coupon code is not valid.', $data['coupon']['code'])); + $this->_getSession()->addError( + $this->__('"%s" coupon code is not valid.', $this->_getHelper()->escapeHtml($data['coupon']['code']))); } else { $this->_getSession()->addSuccess($this->__('The coupon code has been accepted.')); } @@ -611,4 +620,14 @@ public function showUpdateResultAction() return false; } } + + /** + * Process data and display index page + */ + public function processDataAction() + { + $this->_initSession(); + $this->_processData(); + $this->_forward('index'); + } } diff --git a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php index 5f7d91b52b2ca..780d64da8dd9f 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/EditController.php b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/EditController.php index fe038cb4c706e..be3d5c1c783c9 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/EditController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/EditController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -52,13 +52,21 @@ public function startAction() $orderId = $this->getRequest()->getParam('order_id'); $order = Mage::getModel('Mage_Sales_Model_Order')->load($orderId); - if ($order->getId()) { - $this->_getSession()->setUseOldShippingMethod(true); - $this->_getOrderCreateModel()->initFromOrder($order); - $this->_redirect('*/*'); - } - else { - $this->_redirect('*/sales_order/'); + try { + if ($order->getId()) { + $this->_getSession()->setUseOldShippingMethod(true); + $this->_getOrderCreateModel()->initFromOrder($order); + $this->_redirect('*/*'); + } + else { + $this->_redirect('*/sales_order/'); + } + } catch (Mage_Core_Exception $e) { + Mage::getSingleton('Mage_Adminhtml_Model_Session')->addError($e->getMessage()); + $this->_redirect('*/sales_order/view', array('order_id' => $orderId)); + } catch (Exception $e) { + Mage::getSingleton('Mage_Adminhtml_Model_Session')->addException($e, $e->getMessage()); + $this->_redirect('*/sales_order/view', array('order_id' => $orderId)); } } @@ -74,7 +82,7 @@ public function indexAction() ->_setActiveMenu('sales/order') ->renderLayout(); } - + /** * Acl check for admin * @@ -83,5 +91,5 @@ public function indexAction() protected function _isAllowed() { return Mage::getSingleton('Mage_Admin_Model_Session')->isAllowed('sales/order/actions/edit'); - } + } } diff --git a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php index 274e0bc070cea..05278cf0fbf88 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php index 80a659193eddb..c7dba1e42920c 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -220,9 +220,12 @@ public function saveAction() $this->_saveShipment($shipment); $shipment->sendEmail(!empty($data['send_email']), $comment); - $this->_getSession()->addSuccess($isNeedCreateLabel ? - $this->__('The shipment has been created. The shipping label has been created.') : - $this->__('The shipment has been created.')); + + $shipmentCreatedMessage = $this->__('The shipment has been created.'); + $labelCreatedMessage = $this->__('The shipping label has been created.'); + + $this->_getSession()->addSuccess($isNeedCreateLabel ? $shipmentCreatedMessage . ' ' . $labelCreatedMessage + : $shipmentCreatedMessage); Mage::getSingleton('Mage_Adminhtml_Model_Session')->getCommentText(true); } catch (Mage_Core_Exception $e) { if ($isNeedCreateLabel) { @@ -708,4 +711,4 @@ public function getShippingItemsGridAction() ->toHtml() ); } -} +} \ No newline at end of file diff --git a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/StatusController.php b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/StatusController.php index 0bf610d523081..fded5b638ea25 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/StatusController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/StatusController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/View/GiftmessageController.php b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/View/GiftmessageController.php index 23472dda968db..b49c257c42b95 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/View/GiftmessageController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/View/GiftmessageController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php b/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php index 756bf19ee8c16..c09b76df946d8 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -722,10 +722,17 @@ public function addressAction() $addressId = $this->getRequest()->getParam('address_id'); $address = Mage::getModel('Mage_Sales_Model_Order_Address') ->getCollection() + ->addFilter('entity_id', $addressId) ->getItemById($addressId); if ($address) { Mage::register('order_address', $address); $this->loadLayout(); + // Do not display VAT validation button on edit order address form + $addressFormContainer = $this->getLayout()->getBlock('sales_order_address.form.container'); + if ($addressFormContainer) { + $addressFormContainer->getChild('form')->setDisplayVatValidationButton(false); + } + $this->renderLayout(); } else { $this->_redirect('*/*/'); diff --git a/app/code/core/Mage/Adminhtml/controllers/Sales/Recurring/ProfileController.php b/app/code/core/Mage/Adminhtml/controllers/Sales/Recurring/ProfileController.php index d401fb77ef1d8..5ef0e55d88128 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/Recurring/ProfileController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/Recurring/ProfileController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Sales/ShipmentController.php b/app/code/core/Mage/Adminhtml/controllers/Sales/ShipmentController.php index 1117d13a0a02e..0678cbc57eec0 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/ShipmentController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/ShipmentController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Sales/TransactionsController.php b/app/code/core/Mage/Adminhtml/controllers/Sales/TransactionsController.php index 9316a7fdf5c07..e3666be4ac5fc 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/TransactionsController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/TransactionsController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -110,13 +110,15 @@ public function fetchAction() ->setOrder($txn->getOrder()) ->importTransactionInfo($txn); $txn->save(); - Mage::getSingleton('Mage_Adminhtml_Model_Session')->addSuccess(Mage::helper('Mage_Adminhtml_Helper_Data') - ->__('The transaction details have been updated.')); + Mage::getSingleton('Mage_Adminhtml_Model_Session')->addSuccess( + Mage::helper('Mage_Adminhtml_Helper_Data')->__('The transaction details have been updated.') + ); } catch (Mage_Core_Exception $e) { Mage::getSingleton('Mage_Adminhtml_Model_Session')->addError($e->getMessage()); } catch (Exception $e) { - Mage::getSingleton('Mage_Adminhtml_Model_Session')->addError(Mage::helper('Mage_Adminhtml_Helper_Data') - ->__('Unable to update transaction details.')); + Mage::getSingleton('Mage_Adminhtml_Model_Session')->addError( + Mage::helper('Mage_Adminhtml_Helper_Data')->__('Unable to update transaction details.') + ); Mage::logException($e); } $this->_redirect('*/sales_transactions/view', array('_current' => true)); diff --git a/app/code/core/Mage/Adminhtml/controllers/SitemapController.php b/app/code/core/Mage/Adminhtml/controllers/SitemapController.php index a58707276c1c6..be5b6e27eed4e 100644 --- a/app/code/core/Mage/Adminhtml/controllers/SitemapController.php +++ b/app/code/core/Mage/Adminhtml/controllers/SitemapController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/SurveyController.php b/app/code/core/Mage/Adminhtml/controllers/SurveyController.php index ee2a83772404f..276c05b457667 100644 --- a/app/code/core/Mage/Adminhtml/controllers/SurveyController.php +++ b/app/code/core/Mage/Adminhtml/controllers/SurveyController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/System/AccountController.php b/app/code/core/Mage/Adminhtml/controllers/System/AccountController.php index 400c56943693d..b417c7c9d2bf9 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/AccountController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/AccountController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/System/BackupController.php b/app/code/core/Mage/Adminhtml/controllers/System/BackupController.php index 9542b8b1bfffc..cc173fdad32fc 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/BackupController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/BackupController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -66,43 +66,105 @@ public function gridAction() /** * Create backup action + * + * @return Mage_Adminhtml_Controller_Action */ public function createAction() { + if (!$this->getRequest()->isAjax()) { + return $this->getUrl('*/*/index'); + } + + $response = new Varien_Object(); + + /** + * @var Mage_Backup_Helper_Data $helper + */ + $helper = Mage::helper('Mage_Backup_Helper_Data'); + try { - $backupDb = Mage::getModel('Mage_Backup_Model_Db'); - $backup = Mage::getModel('Mage_Backup_Model_Backup') + $type = $this->getRequest()->getParam('type'); + + if ($type == Mage_Backup_Helper_Data::TYPE_SYSTEM_SNAPSHOT + && $this->getRequest()->getParam('exclude_media')) + { + $type = Mage_Backup_Helper_Data::TYPE_SNAPSHOT_WITHOUT_MEDIA; + } + + $backupManager = Mage_Backup::getBackupInstance($type) + ->setBackupExtension($helper->getExtensionByType($type)) ->setTime(time()) - ->setType('db') - ->setPath(Mage::getBaseDir("var") . DS . "backups"); + ->setBackupsDir($helper->getBackupsDir()); + + $backupManager->setName($this->getRequest()->getParam('backup_name')); - Mage::register('backup_model', $backup); + Mage::register('backup_manager', $backupManager); - $backupDb->createBackup($backup); - $this->_getSession()->addSuccess(Mage::helper('Mage_Adminhtml_Helper_Data')->__('The backup has been created.')); + if ($this->getRequest()->getParam('maintenance_mode')) { + $turnedOn = $helper->turnOnMaintenanceMode(); + + if (!$turnedOn) { + $response->setError( + Mage::helper('Mage_Backup_Helper_Data')->__("Warning! System couldn't put store on the maintenance mode.") . ' ' + . Mage::helper('Mage_Backup_Helper_Data')->__("Please deselect the sufficient check-box, if you want to continue backup's creation") + ); + $backupManager->setErrorMessage(Mage::helper('Mage_Backup_Helper_Data')->__("System couldn't put store on the maintenance mode")); + return $this->getResponse()->setBody($response->toJson()); + } + } + + if ($type != Mage_Backup_Helper_Data::TYPE_DB) { + $backupManager->setRootDir(Mage::getBaseDir()) + ->addIgnorePaths($helper->getBackupIgnorePaths()); + } + + $successMessage = $helper->getCreateSuccessMessageByType($type); + + $backupManager->create(); + + $this->_getSession()->addSuccess($successMessage); + + $response->setRedirectUrl($this->getUrl('*/*/index')); + } catch (Mage_Backup_Exception_NotEnoughFreeSpace $e) { + $errorMessage = Mage::helper('Mage_Backup_Helper_Data')->__('Not enough free space to create backup.'); + } catch (Mage_Backup_Exception_NotEnoughPermissions $e) { + Mage::log($e->getMessage()); + $errorMessage = Mage::helper('Mage_Backup_Helper_Data')->__('Not enough permissions to create backup.'); + } catch (Exception $e) { + Mage::log($e->getMessage()); + $errorMessage = Mage::helper('Mage_Backup_Helper_Data')->__('An error occurred while creating the backup.'); } - catch (Exception $e) { - $this->_getSession()->addException($e, Mage::helper('Mage_Adminhtml_Helper_Data')->__('An error occurred while creating the backup.')); + + if (!empty($errorMessage)) { + $response->setError($errorMessage); + $backupManager->setErrorMessage($errorMessage); } - $this->_redirect('*/*'); + + if ($this->getRequest()->getParam('maintenance_mode')) { + $helper->turnOffMaintenanceMode(); + } + + $this->getResponse()->setBody($response->toJson()); } /** * Download backup action + * + * @return Mage_Adminhtml_Controller_Action */ public function downloadAction() { - $backup = Mage::getModel('Mage_Backup_Model_Backup') - ->setTime((int)$this->getRequest()->getParam('time')) - ->setType($this->getRequest()->getParam('type')) - ->setPath(Mage::getBaseDir("var") . DS . "backups"); /* @var $backup Mage_Backup_Model_Backup */ + $backup = Mage::getModel('Mage_Backup_Model_Backup')->loadByTimeAndType( + $this->getRequest()->getParam('time'), + $this->getRequest()->getParam('type') + ); - if (!$backup->exists()) { - $this->_redirect('*/*'); + if (!$backup->getTime() || !$backup->exists()) { + return $this->_redirect('*/*'); } - $fileName = 'backup-' . date('YmdHis', $backup->getTime()) . '.sql.gz'; + $fileName = Mage::helper('Mage_Backup_Helper_Data')->generateBackupDownloadName($backup); $this->_prepareDownloadResponse($fileName, null, 'application/octet-stream', $backup->getSize()); @@ -113,29 +175,187 @@ public function downloadAction() } /** - * Delete backup action + * Rollback Action + * + * @return Mage_Adminhtml_Controller_Action */ - public function deleteAction() + public function rollbackAction() { + if (!Mage::helper('Mage_Backup_Helper_Data')->isRollbackAllowed()){ + return $this->_forward('denied'); + } + + if (!$this->getRequest()->isAjax()) { + return $this->getUrl('*/*/index'); + } + + $helper = Mage::helper('Mage_Backup_Helper_Data'); + $response = new Varien_Object(); + try { - $backup = Mage::getModel('Mage_Backup_Model_Backup') - ->setTime((int)$this->getRequest()->getParam('time')) - ->setType($this->getRequest()->getParam('type')) - ->setPath(Mage::getBaseDir("var") . DS . "backups") - ->deleteFile(); + /* @var $backup Mage_Backup_Model_Backup */ + $backup = Mage::getModel('Mage_Backup_Model_Backup')->loadByTimeAndType( + $this->getRequest()->getParam('time'), + $this->getRequest()->getParam('type') + ); + + if (!$backup->getTime() || !$backup->exists()) { + return $this->_redirect('*/*'); + } + + if (!$backup->getTime()) { + throw new Mage_Backup_Exception_CantLoadSnapshot(); + } + + $type = $backup->getType(); + + $backupManager = Mage_Backup::getBackupInstance($type) + ->setBackupExtension($helper->getExtensionByType($type)) + ->setTime($backup->getTime()) + ->setBackupsDir($helper->getBackupsDir()) + ->setName($backup->getName(), false) + ->setResourceModel(Mage::getResourceModel('Mage_Backup_Model_Resource_Db')); + + Mage::register('backup_manager', $backupManager); + + $passwordValid = Mage::getModel('Mage_Backup_Model_Backup')->validateUserPassword( + $this->getRequest()->getParam('password') + ); - Mage::register('backup_model', $backup); + if (!$passwordValid) { + $response->setError(Mage::helper('Mage_Backup_Helper_Data')->__('Invalid Password.')); + $backupManager->setErrorMessage(Mage::helper('Mage_Backup_Helper_Data')->__('Invalid Password.')); + return $this->getResponse()->setBody($response->toJson()); + } - $this->_getSession()->addSuccess(Mage::helper('Mage_Adminhtml_Helper_Data')->__('Backup record was deleted.')); + if ($this->getRequest()->getParam('maintenance_mode')) { + $turnedOn = $helper->turnOnMaintenanceMode(); + + if (!$turnedOn) { + $response->setError( + Mage::helper('Mage_Backup_Helper_Data')->__("Warning! System couldn't put store on the maintenance mode.") . ' ' + . Mage::helper('Mage_Backup_Helper_Data')->__("Please deselect the sufficient check-box, if you want to continue rollback processing") + ); + $backupManager->setErrorMessage(Mage::helper('Mage_Backup_Helper_Data')->__("System couldn't put store on the maintenance mode")); + return $this->getResponse()->setBody($response->toJson()); + } + } + + if ($type != Mage_Backup_Helper_Data::TYPE_DB) { + + $backupManager->setRootDir(Mage::getBaseDir()) + ->addIgnorePaths($helper->getRollbackIgnorePaths()); + + if ($this->getRequest()->getParam('use_ftp', false)) { + $backupManager->setUseFtp( + $this->getRequest()->getParam('ftp_host', ''), + $this->getRequest()->getParam('ftp_user', ''), + $this->getRequest()->getParam('ftp_pass', ''), + $this->getRequest()->getParam('ftp_path', '') + ); + } + } + + $backupManager->rollback(); + + $helper->invalidateCache()->invalidateIndexer(); + + $adminSession = $this->_getSession(); + $adminSession->unsetAll(); + $adminSession->getCookie()->delete($adminSession->getSessionName()); + + $response->setRedirectUrl($this->getUrl('*')); + } catch (Mage_Backup_Exception_CantLoadSnapshot $e) { + $errorMsg = Mage::helper('Mage_Backup_Helper_Data')->__('Backup file not found'); + } catch (Mage_Backup_Exception_FtpConnectionFailed $e) { + $errorMsg = Mage::helper('Mage_Backup_Helper_Data')->__('Failed to connect to FTP'); + } catch (Mage_Backup_Exception_FtpValidationFailed $e) { + $errorMsg = Mage::helper('Mage_Backup_Helper_Data')->__('Failed to validate FTP'); + } catch (Mage_Backup_Exception_NotEnoughPermissions $e) { + Mage::log($e->getMessage()); + $errorMsg = Mage::helper('Mage_Backup_Helper_Data')->__('Not enough permissions to perform rollback'); + } catch (Exception $e) { + Mage::log($e->getMessage()); + $errorMsg = Mage::helper('Mage_Backup_Helper_Data')->__('Failed to rollback'); } - catch (Exception $e) { - // Nothing + + if (!empty($errorMsg)) { + $response->setError($errorMsg); + $backupManager->setErrorMessage($errorMsg); } - $this->_redirect('*/*/'); + if ($this->getRequest()->getParam('maintenance_mode')) { + $helper->turnOffMaintenanceMode(); + } + $this->getResponse()->setBody($response->toJson()); } + /** + * Delete backups mass action + * + * @return Mage_Adminhtml_Controller_Action + */ + public function massDeleteAction() + { + $backupIds = $this->getRequest()->getParam('ids', array()); + + if (!is_array($backupIds) || !count($backupIds)) { + return $this->_redirect('*/*/index'); + } + + /** @var $backupModel Mage_Backup_Model_Backup */ + $backupModel = Mage::getModel('Mage_Backup_Model_Backup'); + $resultData = new Varien_Object(); + $resultData->setIsSuccess(false); + $resultData->setDeleteResult(array()); + Mage::register('backup_manager', $resultData); + + $deleteFailMessage = Mage::helper('Mage_Backup_Helper_Data')->__('Failed to delete one or several backups.'); + + try { + $allBackupsDeleted = true; + + foreach ($backupIds as $id) { + list($time, $type) = explode('_', $id); + $backupModel + ->loadByTimeAndType($time, $type) + ->deleteFile(); + + if ($backupModel->exists()) { + $allBackupsDeleted = false; + $result = Mage::helper('Mage_Adminhtml_Helper_Data')->__('failed'); + } else { + $result = Mage::helper('Mage_Adminhtml_Helper_Data')->__('successful'); + } + + $resultData->setDeleteResult( + array_merge($resultData->getDeleteResult(), array($backupModel->getFileName() . ' ' . $result)) + ); + } + + $resultData->setIsSuccess(true); + if ($allBackupsDeleted) { + $this->_getSession()->addSuccess( + Mage::helper('Mage_Backup_Helper_Data')->__('The selected backup(s) has been deleted.') + ); + } + else { + throw new Exception($deleteFailMessage); + } + } catch (Exception $e) { + $resultData->setIsSuccess(false); + $this->_getSession()->addError($deleteFailMessage); + } + + return $this->_redirect('*/*/index'); + } + + /** + * Check Permissions for all actions + * + * @return bool + */ protected function _isAllowed() { return Mage::getSingleton('Mage_Admin_Model_Session')->isAllowed('system/tools/backup'); diff --git a/app/code/core/Mage/Adminhtml/controllers/System/Config/System/StorageController.php b/app/code/core/Mage/Adminhtml/controllers/System/Config/System/StorageController.php index 9eea567c2daca..5e8ad0ff43232 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/Config/System/StorageController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/Config/System/StorageController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php b/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php index fcb622cf32874..a56869bd2350a 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -161,6 +161,11 @@ public function saveAction() // reinit configuration Mage::getConfig()->reinit(); + Mage::dispatchEvent('admin_system_config_section_save_after', array( + 'website' => $website, + 'store' => $store, + 'section' => $section + )); Mage::app()->reinitStores(); // website and store codes can be used in event implementation, so set them as well diff --git a/app/code/core/Mage/Adminhtml/controllers/System/Convert/GuiController.php b/app/code/core/Mage/Adminhtml/controllers/System/Convert/GuiController.php index f204abb3845ed..bcfecca04be2b 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/Convert/GuiController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/Convert/GuiController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/System/Convert/ProfileController.php b/app/code/core/Mage/Adminhtml/controllers/System/Convert/ProfileController.php index 146459d14091f..91c07695829dc 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/Convert/ProfileController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/Convert/ProfileController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/System/CurrencyController.php b/app/code/core/Mage/Adminhtml/controllers/System/CurrencyController.php index 0dc2addd12e81..1c90bc0abbbdf 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/CurrencyController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/CurrencyController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/System/DesignController.php b/app/code/core/Mage/Adminhtml/controllers/System/DesignController.php index 7e9659be6e885..fedcd19c554e6 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/DesignController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/DesignController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/System/Email/TemplateController.php b/app/code/core/Mage/Adminhtml/controllers/System/Email/TemplateController.php index 958cfb6304ede..7083db6957b2b 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/Email/TemplateController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/Email/TemplateController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/System/StoreController.php b/app/code/core/Mage/Adminhtml/controllers/System/StoreController.php index 44654754535cc..923783795821f 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/StoreController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/StoreController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -172,6 +172,7 @@ public function saveAction() try { switch ($postData['store_type']) { case 'website': + $postData['website']['name'] = $this->_getHelper()->removeTags($postData['website']['name']); $websiteModel = Mage::getModel('Mage_Core_Model_Website'); if ($postData['website']['website_id']) { $websiteModel->load($postData['website']['website_id']); @@ -186,6 +187,7 @@ public function saveAction() break; case 'group': + $postData['group']['name'] = $this->_getHelper()->removeTags($postData['group']['name']); $groupModel = Mage::getModel('Mage_Core_Model_Store_Group'); if ($postData['group']['group_id']) { $groupModel->load($postData['group']['group_id']); @@ -205,6 +207,7 @@ public function saveAction() case 'store': $eventName = 'store_edit'; $storeModel = Mage::getModel('Mage_Core_Model_Store'); + $postData['store']['name'] = $this->_getHelper()->removeTags($postData['store']['name']); if ($postData['store']['store_id']) { $storeModel->load($postData['store']['store_id']); } @@ -498,4 +501,3 @@ protected function _addDeletionNotice($typeTitle) } } - diff --git a/app/code/core/Mage/Adminhtml/controllers/System/VariableController.php b/app/code/core/Mage/Adminhtml/controllers/System/VariableController.php index 228f91d1d579a..9c2b457669f6d 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/VariableController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/VariableController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -56,7 +56,7 @@ protected function _initVariable() $this->_title($this->__('System'))->_title($this->__('Custom Variables')); $variableId = $this->getRequest()->getParam('variable_id', null); - $storeId = $this->getRequest()->getParam('store', 0); + $storeId = (int)$this->getRequest()->getParam('store', 0); /* @var $emailVariable Mage_Core_Model_Variable */ $variable = Mage::getModel('Mage_Core_Model_Variable'); if ($variableId) { @@ -101,9 +101,9 @@ public function editAction() $this->_initLayout() ->_addContent($this->getLayout()->createBlock('Mage_Adminhtml_Block_System_Variable_Edit')) - ->_addJs($this->getLayout() - ->createBlock('Mage_Core_Block_Template', '', array('template' => 'system/variable/js.phtml')) - ) + ->_addJs($this->getLayout()->createBlock('Mage_Core_Block_Template', '', array( + 'template' => 'system/variable/js.phtml' + ))) ->renderLayout(); } diff --git a/app/code/core/Mage/Adminhtml/controllers/SystemController.php b/app/code/core/Mage/Adminhtml/controllers/SystemController.php index e7f56acd65414..3a194ba68018d 100644 --- a/app/code/core/Mage/Adminhtml/controllers/SystemController.php +++ b/app/code/core/Mage/Adminhtml/controllers/SystemController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/TagController.php b/app/code/core/Mage/Adminhtml/controllers/TagController.php index 29db3ccb350fc..9a7f56cea422a 100644 --- a/app/code/core/Mage/Adminhtml/controllers/TagController.php +++ b/app/code/core/Mage/Adminhtml/controllers/TagController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -82,7 +82,6 @@ public function indexAction() $this->_initAction() ->_addBreadcrumb(Mage::helper('Mage_Adminhtml_Helper_Data')->__('All Tags'), Mage::helper('Mage_Adminhtml_Helper_Data')->__('All Tags')) ->_setActiveMenu('catalog/tag/all') - ->_addContent($this->getLayout()->createBlock('Mage_Adminhtml_Block_Tag_Tag')) ->renderLayout(); } @@ -93,7 +92,7 @@ public function indexAction() public function ajaxGridAction() { $this->loadLayout(); - $this->getResponse()->setBody($this->getLayout()->createBlock('Mage_Adminhtml_Block_Tag_Tag_Grid')->toHtml()); + $this->renderLayout(); } /** @@ -103,9 +102,7 @@ public function ajaxGridAction() public function ajaxPendingGridAction() { $this->loadLayout(); - $this->getResponse()->setBody( - $this->getLayout()->createBlock('Mage_Adminhtml_Block_Tag_Grid_Pending')->toHtml() - ); + $this->renderLayout(); } /** @@ -172,7 +169,9 @@ public function saveAction() $model->addData($data); if (isset($postData['tag_assigned_products'])) { - $productIds = Mage::helper('Mage_Adminhtml_Helper_Js')->decodeGridSerializedInput($postData['tag_assigned_products']); + $productIds = Mage::helper('Mage_Adminhtml_Helper_Js')->decodeGridSerializedInput( + $postData['tag_assigned_products'] + ); $tagRelationModel = Mage::getModel('Mage_Tag_Model_Tag_Relation'); $tagRelationModel->addRelations($model, $productIds); } @@ -236,7 +235,6 @@ public function pendingAction() $this->_initAction() ->_addBreadcrumb(Mage::helper('Mage_Adminhtml_Helper_Data')->__('Pending Tags'), Mage::helper('Mage_Adminhtml_Helper_Data')->__('Pending Tags')) ->_setActiveMenu('catalog/tag/pending') - ->_addContent($this->getLayout()->createBlock('Mage_Adminhtml_Block_Tag_Pending')) ->renderLayout(); } @@ -271,9 +269,8 @@ public function assignedGridOnlyAction() public function productAction() { $this->_initTag(); - $this->getResponse()->setBody( - $this->getLayout()->createBlock('Mage_Adminhtml_Block_Tag_Product_Grid')->toHtml() - ); + $this->loadLayout(); + $this->renderLayout(); } /** @@ -283,9 +280,8 @@ public function productAction() public function customerAction() { $this->_initTag(); - $this->getResponse()->setBody( - $this->getLayout()->createBlock('Mage_Adminhtml_Block_Tag_Customer_Grid')->toHtml() - ); + $this->loadLayout(); + $this->renderLayout(); } /** diff --git a/app/code/core/Mage/Adminhtml/controllers/Tax/Class/CustomerController.php b/app/code/core/Mage/Adminhtml/controllers/Tax/Class/CustomerController.php index b47b1016e532c..4528abc624654 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Tax/Class/CustomerController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Tax/Class/CustomerController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Tax/Class/ProductController.php b/app/code/core/Mage/Adminhtml/controllers/Tax/Class/ProductController.php index 0f6f1ffc44ff6..1d0ce11c2e496 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Tax/Class/ProductController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Tax/Class/ProductController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/controllers/Tax/ClassController.php b/app/code/core/Mage/Adminhtml/controllers/Tax/ClassController.php index e08ac92ab47b7..ec86c4170ee02 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Tax/ClassController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Tax/ClassController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -41,9 +41,6 @@ public function saveAction() { if ($postData = $this->getRequest()->getPost()) { - //filtering - $postData['class_name'] = Mage::helper('Mage_Adminhtml_Helper_Data')->stripTags($postData['class_name']); - $model = Mage::getModel('Mage_Tax_Model_Class')->setData($postData); try { diff --git a/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php b/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php index 522d51036307e..5fd17b64f65a5 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -93,16 +93,6 @@ public function saveAction() { $ratePost = $this->getRequest()->getPost(); if ($ratePost) { - //filter tags in titles - /** @var $helper Mage_Adminhtml_Helper_Data */ - $helper = Mage::helper('Mage_Adminhtml_Helper_Data'); - $ratePost['code'] = $helper->stripTags($ratePost['code']); - if (!empty($ratePost['title'])) { - foreach ($ratePost['title'] as &$title) { - $title = $helper->stripTags($title); - } - } - $rateId = $this->getRequest()->getParam('tax_calculation_rate_id'); if ($rateId) { $rateModel = Mage::getSingleton('Mage_Tax_Model_Calculation_Rate')->load($rateId); @@ -302,7 +292,9 @@ protected function _importRates() $stores = array(); $unset = array(); $storeCollection = Mage::getModel('Mage_Core_Model_Store')->getCollection()->setLoadDefault(false); - for ($i = count($csvFields); $i < count($csvData[0]); $i++) { + $cvsFieldsNum = count($csvFields); + $cvsDataNum = count($csvData[0]); + for ($i = $cvsFieldsNum; $i < $cvsDataNum; $i++) { $header = $csvData[0][$i]; $found = false; foreach ($storeCollection as $store) { @@ -367,7 +359,7 @@ protected function _importRates() if (!empty($regions[$v[1]][$v[2]])) { $rateData = array( - 'code' => $helper->stripTags($v[0]), + 'code' => $v[0], 'tax_country_id' => $v[1], 'tax_region_id' => ($regions[$v[1]][$v[2]] == '*') ? 0 : $regions[$v[1]][$v[2]], 'tax_postcode' => (empty($v[3]) || $v[3]=='*') ? null : $v[3], @@ -387,11 +379,6 @@ protected function _importRates() $titles[$id] = $v[$field]; } - //filter tags in titles - foreach ($titles as &$title) { - $title = $helper->stripTags($title); - } - $rateModel->setTitle($titles); $rateModel->save(); } @@ -482,4 +469,4 @@ protected function _isAllowed() break; } } -} +} \ No newline at end of file diff --git a/app/code/core/Mage/Adminhtml/controllers/Tax/RuleController.php b/app/code/core/Mage/Adminhtml/controllers/Tax/RuleController.php index 0c95d266ed1b7..6f9cb234764f0 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Tax/RuleController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Tax/RuleController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -89,11 +89,6 @@ public function saveAction() { if ($postData = $this->getRequest()->getPost()) { - //filtering - /** @var $helper Mage_Adminhtml_Helper_Data */ - $helper = Mage::helper('Mage_Adminhtml_Helper_Data'); - $postData['code'] = $helper->stripTags($postData['code']); - $ruleModel = Mage::getSingleton('Mage_Tax_Model_Calculation_Rule'); $ruleModel->setData($postData); diff --git a/app/code/core/Mage/Adminhtml/controllers/UrlrewriteController.php b/app/code/core/Mage/Adminhtml/controllers/UrlrewriteController.php index cbbabdb9bdf88..e5d5cf7259f2e 100644 --- a/app/code/core/Mage/Adminhtml/controllers/UrlrewriteController.php +++ b/app/code/core/Mage/Adminhtml/controllers/UrlrewriteController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/etc/adminhtml.xml b/app/code/core/Mage/Adminhtml/etc/adminhtml.xml index 50245e920535f..025cba8a08f40 100644 --- a/app/code/core/Mage/Adminhtml/etc/adminhtml.xml +++ b/app/code/core/Mage/Adminhtml/etc/adminhtml.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Adminhtml/etc/config.xml b/app/code/core/Mage/Adminhtml/etc/config.xml index 7eb6f302d2f72..3656c858ad450 100644 --- a/app/code/core/Mage/Adminhtml/etc/config.xml +++ b/app/code/core/Mage/Adminhtml/etc/config.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -207,6 +207,12 @@ + + + + 1 + + diff --git a/app/code/core/Mage/Adminhtml/etc/translater.xml b/app/code/core/Mage/Adminhtml/etc/translater.xml new file mode 100644 index 0000000000000..8454ad559c278 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/etc/translater.xml @@ -0,0 +1,65 @@ + + + + + + Complete + + + Upload Security Error + + + Upload HTTP Error + + + Upload I/O Error + + + SSL Error: Invalid or self-signed certificate + + + Tb + + + Gb + + + Mb + + + Kb + + + b + + + + Add Products + + + diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/admin.xml b/app/code/core/Mage/Adminhtml/view/adminhtml/admin.xml index 7e313b32d1f9e..f10404e154998 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/admin.xml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/admin.xml @@ -21,7 +21,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/admin/access_denied.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/admin/access_denied.phtml index bf85d99edddb2..fcb90c48c3fe1 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/admin/access_denied.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/admin/access_denied.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/admin/forgotpassword.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/admin/forgotpassword.phtml index 7bcbb183a6320..8cdfb5bb61167 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/admin/forgotpassword.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/admin/forgotpassword.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -39,6 +39,7 @@ + @@ -57,10 +58,11 @@

+ getChildHtml('form.additional.info'); ?>
« __('Back to Login'); ?> - +
@@ -73,4 +75,3 @@ - diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/admin/formkey.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/admin/formkey.phtml index 7ab082d367454..9ac18a669eef4 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/admin/formkey.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/admin/formkey.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/admin/login.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/admin/login.phtml index a6153c6a3e0d1..8ad67aa44c0ce 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/admin/login.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/admin/login.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -38,6 +38,7 @@ + @@ -57,6 +58,7 @@

+ getChildHtml('form.additional.info'); ?>
__('Forgot your password?') ?> @@ -72,4 +74,3 @@
- diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/admin/overlay_popup.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/admin/overlay_popup.phtml index 7a26c1d06f6e9..84a11c67099cb 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/admin/overlay_popup.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/admin/overlay_popup.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/admin/page.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/admin/page.phtml index 906b448c8404a..30e0a13f8d910 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/admin/page.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/admin/page.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -43,7 +43,7 @@ getChildHtml('head') ?> -getBodyClass()?'class="'.$this->getBodyClass().'"':'' ?>> +getBodyClass() ? ' class="' . $this->getBodyClass() . '"' : ''; ?>> getChildHtml('notification_window'); ?>
getChildHtml('global_notices') ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/admin/popup.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/admin/popup.phtml index 874cbe1dd6880..69c93163f2e85 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/admin/popup.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/admin/popup.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/adminnotification.xml b/app/code/core/Mage/Adminhtml/view/adminhtml/adminnotification.xml index 869eef8dbbf21..5c4bc5d549609 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/adminnotification.xml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/adminnotification.xml @@ -21,7 +21,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/api/role_users_grid_js.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/api/role_users_grid_js.phtml index 838135e7459b6..79ffafe5fe410 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/api/role_users_grid_js.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/api/role_users_grid_js.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/api/roleinfo.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/api/roleinfo.phtml index e74f89123493b..053723aeba5f5 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/api/roleinfo.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/api/roleinfo.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/api/roles.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/api/roles.phtml index 4713c7b0d107e..cebb8dcb14322 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/api/roles.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/api/roles.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -29,7 +29,7 @@

__('Roles') ?>

- + diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/api/rolesedit.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/api/rolesedit.phtml index 07c06c7b754da..e031b7da66639 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/api/rolesedit.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/api/rolesedit.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/api/rolesusers.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/api/rolesusers.phtml index 3727f5c4ac917..e09eb58a42257 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/api/rolesusers.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/api/rolesusers.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/api/user_roles_grid_js.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/api/user_roles_grid_js.phtml index 57a60860f8ea6..cc042e99e851a 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/api/user_roles_grid_js.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/api/user_roles_grid_js.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/api/userinfo.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/api/userinfo.phtml index c9be39d10b18f..5290bbcf433cf 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/api/userinfo.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/api/userinfo.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/api/usernroles.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/api/usernroles.phtml index 8106d8e6ff28c..9ccb82acbfbfb 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/api/usernroles.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/api/usernroles.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/backup/dialogs.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/backup/dialogs.phtml new file mode 100644 index 0000000000000..7b2b8635d54f9 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/backup/dialogs.phtml @@ -0,0 +1,190 @@ + + + + + + + + + + + +getUrl('*/*/rollback'); + $backupUrl = $this->getUrl('*/*/create'); +?> + + diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/backup/left.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/backup/left.phtml index 5c07412a14ebd..d684b1233af60 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/backup/left.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/backup/left.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/backup/list.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/backup/list.phtml index 0e2b40194c995..686a9e0abd09c 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/backup/list.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/backup/list.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -28,8 +28,13 @@ - +

__('Backups') ?>

getCreateButtonHtml(); ?> + getCreateSnapshotButtonHtml(); ?> + getCreateMediaBackupButtonHtml(); ?> + getCreateButtonHtml(); ?> +
getGridHtml() ?> +getDialogsHtml() ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog.xml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog.xml index 8a3333c884623..49abfdbbb1123 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog.xml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog.xml @@ -21,7 +21,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/checkboxes/tree.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/checkboxes/tree.phtml index e80f37103d8c7..18832c8a1145b 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/checkboxes/tree.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/checkboxes/tree.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit.phtml index 6453c9208ab75..89d6e6900e83f 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit/form.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit/form.phtml index 8739d513c422a..c3f11437f27fa 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit/form.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/edit/form.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/tree.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/tree.phtml index a993a5f56235c..6bcb21d5cd85a 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/tree.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/tree.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/widget/tree.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/widget/tree.phtml index 5dd3a0d85e2ce..4fe27d3568e36 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/widget/tree.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/category/widget/tree.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/form/renderer/fieldset/element.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/form/renderer/fieldset/element.phtml index eaa1ff880df1a..e3305ad1cb2e7 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/form/renderer/fieldset/element.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/form/renderer/fieldset/element.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product.js b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product.js index e6aae5f63a999..2ba1d51419588 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product.js +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product.js @@ -19,7 +19,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product.phtml index abccdff0c47ad..e17878ee458ba 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/js.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/js.phtml index deb22a1ffcf18..3a9d956706a1e 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/js.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/js.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/new/created.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/new/created.phtml index a0ab7f942c7a9..00b11f381bcdc 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/new/created.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/new/created.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/options.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/options.phtml index 4698093204672..f1b17645d38a5 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/options.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/options.phtml @@ -20,13 +20,13 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/main/tree/attribute.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/main/tree/attribute.phtml index 2acd065758f7c..06b9fcb86a249 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/main/tree/attribute.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/main/tree/attribute.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/main/tree/group.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/main/tree/group.phtml index 91fe9250a425d..dc4ec6d0c351b 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/main/tree/group.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/main/tree/group.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/toolbar/add.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/toolbar/add.phtml index c6584ab878e95..2bfd88b8729e6 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/toolbar/add.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/toolbar/add.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/toolbar/main.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/toolbar/main.phtml index f4419690084ee..a8d0cc85efefa 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/toolbar/main.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/attribute/set/toolbar/main.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/configure.js b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/configure.js index 4d2c123796cf7..98d5706a98738 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/configure.js +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/configure.js @@ -19,7 +19,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -213,16 +213,16 @@ ProductConfigure.prototype = { } else if (response) { response = response + ''; this.blockFormFields.update(response); - + // Add special div to hold mage data, e.g. scripts to execute on every popup show var mageData = {}; var scripts = response.extractScripts(); mageData.scripts = scripts; - + var scriptHolder = new Element('div', {'style': 'display:none'}); scriptHolder.mageData = mageData; this.blockFormFields.insert(scriptHolder); - + // Show window this._showWindow(); } @@ -694,7 +694,7 @@ ProductConfigure.prototype = { restoreConfirmedValues(this.blockFormFields.getElementsByTagName('input')); restoreConfirmedValues(this.blockFormFields.getElementsByTagName('select')); restoreConfirmedValues(this.blockFormFields.getElementsByTagName('textarea')); - + // Execute scripts if (mageData && mageData.scripts) { this.restorePhase = true; diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/configure.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/configure.phtml index ac32f74671cfa..93b116ea16bba 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/configure.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/configure.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -39,8 +39,8 @@
- - + +
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/configurable.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/configurable.phtml index b28458c6b4c7d..ec879c360f8e4 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/configurable.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/configurable.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/grouped.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/grouped.phtml index 8cda4468cc754..75d29b0725c87 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/grouped.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/grouped.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options.phtml index 9c3b616522e89..0e23a4e19eebb 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options/js.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options/js.phtml index d5d6361a364c3..30f453aa28cc8 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options/js.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options/js.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options/type/date.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options/type/date.phtml index d83f9a3a244dd..3e491c7d14e5c 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options/type/date.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options/type/date.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options/type/default.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options/type/default.phtml index 8337938533154..df324cd804552 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options/type/default.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options/type/default.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options/type/file.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options/type/file.phtml index 6e9e4b8a1a3da..484534cd2104c 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options/type/file.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options/type/file.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options/type/select.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options/type/select.phtml index 8b9119ac771cd..4ee993292959b 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options/type/select.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options/type/select.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options/type/text.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options/type/text.phtml index 836685a6d6b50..ac193203ec6c2 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options/type/text.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/options/type/text.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/qty.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/qty.phtml index 20d32b49a1dc8..63d0b6bfe736c 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/qty.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/composite/fieldset/qty.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/created.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/created.phtml index 7f5cd5e6801c6..0306b20a29b82 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/created.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/created.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit.phtml index 8d099da86a895..361cd25ba8301 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/action/attribute.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/action/attribute.phtml index e3d5fd1f00407..92a0348d2b907 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/action/attribute.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/action/attribute.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/action/inventory.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/action/inventory.phtml index 2ae37985247de..1ac9fb6bb73b6 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/action/inventory.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/action/inventory.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/action/websites.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/action/websites.phtml index e76829c821fd5..2a7a0c5f023f8 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/action/websites.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/action/websites.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/categories.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/categories.phtml index d02a5d1606715..436ebdd18a7c6 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/categories.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/categories.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options.phtml index ab7aae28e735b..5062bdd8e4484 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/option.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/option.phtml index 08ea5068e45a7..94bb4eb1ce7cd 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/option.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/option.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -330,7 +330,7 @@ if($('getAddButtonId() ?>')){ //validation for selected input type Validation.addAllThese([ - ['required-option-select', '__('Select type of option') ?>', function(v, elm) { + ['required-option-select', helper('Mage_Core_Helper_Data')->jsonEncode(Mage::helper('Mage_Catalog_Helper_Data')->__('Select type of option')) ?>, function(v, elm) { if (elm.getValue() == '') { return false; } diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/type/date.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/type/date.phtml index 07f48a91c5575..d97e519e3ae16 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/type/date.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/type/date.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -36,7 +36,7 @@ OptionTemplateDate = ''+ ''+ ''+ getCanReadPrice() !== false) : ?> - '' + + '' + '' + '' + diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/type/file.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/type/file.phtml index 674fbd701d5ff..34f54fd675e24 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/type/file.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/type/file.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -29,24 +29,28 @@ OptionTemplateFile = '
getCanEditPrice() === false) : ?> disabled="disabled">getCanEditPrice() === false) : ?> disabled="disabled">getPriceTypeSelectHtml() ?>{{checkboxScopePrice}}
'+ ''+ getCanReadPrice() !== false) : ?> - '' + - '' + + '' + + '' + - ''+ - ''+ - ''+ - ''+ - ''+ + '' + + ''+ + '' + + '' + + '' + getCanReadPrice() !== false) : ?> '' + - '' + + '' + '' + '' + - ''+ - ''+ - ''+ + '' + + '' + + '' + ''+ '
__('Price') ?>__('Price Type') ?>' + helper('Mage_Core_Helper_Data')->jsonEncode(Mage::helper('Mage_Catalog_Helper_Data')->__('Price')); ?> + '' + helper('Mage_Core_Helper_Data')->jsonEncode(Mage::helper('Mage_Catalog_Helper_Data')->__('Price Type')); ?> + '__('SKU') ?>__('Allowed File Extensions') ?>__('Maximum Image Size') ?>
' + helper('Mage_Core_Helper_Data')->jsonEncode(Mage::helper('Mage_Catalog_Helper_Data')->__('SKU')); ?> + '' + helper('Mage_Core_Helper_Data')->jsonEncode(Mage::helper('Mage_Catalog_Helper_Data')->__('Allowed File Extensions')); ?> + '' + helper('Mage_Core_Helper_Data')->jsonEncode(Mage::helper('Mage_Catalog_Helper_Data')->__('Maximum Image Size')); ?> + '
getCanEditPrice() === false) : ?> disabled="disabled">getPriceTypeSelectHtml() ?>' + helper('Mage_Core_Helper_Data')->jsonEncode($this->getPriceTypeSelectHtml()) ?> + ' __('x') ?> __('px.') ?>
__('leave blank if its not an image') ?>
' + + helper('Mage_Core_Helper_Data')->jsonEncode(Mage::helper('Mage_Catalog_Helper_Data')->__('x')) ?> + + '' + + helper('Mage_Core_Helper_Data')->jsonEncode(Mage::helper('Mage_Catalog_Helper_Data')->__('px.')) ?> + + '
' + helper('Mage_Core_Helper_Data')->jsonEncode(Mage::helper('Mage_Catalog_Helper_Data')->__('leave blank if its not an image')) ?> + '
'; diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/type/select.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/type/select.phtml index 69644ed6899b9..dd526b5c55fa5 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/type/select.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/type/select.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -153,7 +153,7 @@ if ($('option_panel_type_select')) { selectOptionType.bindRemoveButtons(); Validation.addAllThese([ - ['required-option-select-type-rows', '__('Please add rows to option.') ?>', function(v, elm) { + ['required-option-select-type-rows', helper('Mage_Core_Helper_Data')->jsonEncode(Mage::helper('Mage_Catalog_Helper_Data')->__('Please add rows to option.')); ?>, function(v, elm) { var optionContainerElm = elm.up('div.grid'); var selectTypesFlag = false; selectTypeElements = $$('#'+optionContainerElm.id+' .select-type-title'); diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/type/text.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/type/text.phtml index ffba61919d569..05f49df6490b4 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/type/text.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/options/type/text.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/price/group.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/price/group.phtml new file mode 100644 index 0000000000000..745d20b3de205 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/price/group.phtml @@ -0,0 +1,169 @@ + +getElement()->getHtmlId(); +$_htmlClass = $this->getElement()->getClass(); +$_htmlName = $this->getElement()->getName(); +$_readonly = $this->getElement()->getReadonly(); +$_priceValueValidation = $this->getPriceValidation('validate-zero-or-greater'); + +$_showWebsite= $this->isMultiWebsites(); +?> + + getElement()->getLabel(); ?> + + + + + + + + + + + + + + + + + + + + + + + +
style="display: none;">__('Website'); ?>__('Customer Group'); ?>getPriceColumnHeader(Mage::helper('Mage_Catalog_Helper_Data')->__('Price')); ?>__('Action'); ?>
style="display: none;">getAddButtonHtml(); ?>
+ + + diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/price/tier.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/price/tier.phtml index 13c37b17c23f0..43c76b81d3c62 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/price/tier.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/price/tier.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /* @var $this Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Tier */ @@ -80,11 +80,11 @@ var tierPriceRowTemplate = '' + '' + '' - + ' __("and above")?>' + + ' __("and above")?>' + '' + '' - + '' + + '' + ''; var tierPriceControl = { diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/serializer.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/serializer.phtml index 00d66f8c15425..cf46170036660 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/serializer.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/serializer.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/super/config.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/super/config.phtml index 409a3a0749a07..3af9eba4ce81f 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/super/config.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/super/config.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -72,7 +72,7 @@
- isReadonly()):?> disabled="disabled" class="input-text attribute-label required-entry template no-display" value="'{{label}}'" readonly="label" /> + isAttributesConfigurationReadonly()): ?> disabled="disabled" class="input-text attribute-label required-entry template no-display" value="'{{label}}'" readonly="label" />
    @@ -87,17 +87,17 @@
    __('Price:') ?> - isReadonly() || $this->getCanEditPrice() === false):?> disabled="disabled" class="input-text attribute-price validate-number template no-display" value="'{{pricing_value}}'"/> + isAttributesPricesReadonly() || $this->getCanEditPrice() === false): ?> disabled="disabled" class="input-text attribute-price validate-number template no-display" value="'{{pricing_value}}'"/>
    -  isAttributesPricesReadonly() || $this->getCanEditPrice() === false): ?> disabled="disabled" >
    getShowUseDefaultPrice()):?>
    -  isReadonly() || $this->getCanEditPrice() === false):?> disabled="disabled" class="attribute-use-default-value"> +  isAttributesPricesReadonly() || $this->getCanEditPrice() === false): ?> disabled="disabled" class="attribute-use-default-value">
    diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/websites.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/websites.phtml index e68873d54a020..721bd19a37fa4 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/websites.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/edit/websites.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -38,6 +38,7 @@
+ getHintHtml() ?> getWebsiteCollection() as $_website): ?>
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/helper/gallery.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/helper/gallery.phtml index f956dfbefa8c2..f1aa4f26ad750 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/helper/gallery.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/helper/gallery.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/js.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/js.phtml index 30495e2ca3f14..12f3e401f3ca6 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/js.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/js.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/price.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/price.phtml index 67a04d5e95ee5..f0bb82f09f5ed 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/price.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/price.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -213,13 +213,13 @@ $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax

__('Special Price:') ?> - __('Excl. Tax:') ?> + helper('Mage_Tax_Helper_Data')->__('Excl. Tax:') ?> currencyByStore($_finalPrice+$_weeeTaxAmount, $_storeId, true, false) ?> - __('Incl. Tax:') ?> + helper('Mage_Tax_Helper_Data')->__('Incl. Tax:') ?> currencyByStore($_finalPriceInclTax+$_weeeTaxAmount, $_storeId, true, false) ?> @@ -245,7 +245,7 @@ $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax

__('Special Price:') ?> - __('Excl. Tax:') ?> + helper('Mage_Tax_Helper_Data')->__('Excl. Tax:') ?> currencyByStore($_finalPrice+$_weeeTaxAmount, $_storeId, true, false) ?> @@ -275,7 +275,7 @@ $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax

__('Special Price:') ?> - __('Excl. Tax:') ?> + helper('Mage_Tax_Helper_Data')->__('Excl. Tax:') ?> currencyByStore($_finalPrice+$_weeeTaxAmount, $_storeId, true, false) ?> @@ -305,7 +305,7 @@ $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax

__('Special Price:') ?> - __('Excl. Tax:') ?> + helper('Mage_Tax_Helper_Data')->__('Excl. Tax:') ?> currencyByStore($_finalPrice, $_storeId, true, false) ?> @@ -316,7 +316,7 @@ $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax - __('Incl. Tax:') ?> + helper('Mage_Tax_Helper_Data')->__('Incl. Tax:') ?> currencyByStore($_finalPriceInclTax+$_weeeTaxAmount, $_storeId, true, false) ?> @@ -334,7 +334,7 @@ $_inclTax = $_taxHelper->getPrice($_product, $_minimalPriceValue, $includingTax

__('Special Price:') ?> - __('Excl. Tax:') ?> + helper('Mage_Tax_Helper_Data')->__('Excl. Tax:') ?> currencyByStore($_finalPrice, $_storeId, true, false) ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/tab/alert.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/tab/alert.phtml index 07931d0e5956e..d1843d7c9f99e 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/tab/alert.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/tab/alert.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/tab/inventory.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/tab/inventory.phtml index cd1bf4009b0b9..99f450f03a5e8 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/tab/inventory.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/tab/inventory.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/widget/chooser/container.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/widget/chooser/container.phtml index beaccd822dc38..89af4ea1bb98a 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/widget/chooser/container.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/product/widget/chooser/container.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/wysiwyg/js.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/wysiwyg/js.phtml index 926b55367dcf2..96c56085bb4f8 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/wysiwyg/js.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalog/wysiwyg/js.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/catalogsearch.xml b/app/code/core/Mage/Adminhtml/view/adminhtml/catalogsearch.xml index 1ccc658f2ed58..f39405ee7f78f 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/catalogsearch.xml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/catalogsearch.xml @@ -21,7 +21,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/cms.xml b/app/code/core/Mage/Adminhtml/view/adminhtml/cms.xml index 94669268012b5..8b5fb08842198 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/cms.xml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/cms.xml @@ -21,7 +21,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/cms/browser/content.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/cms/browser/content.phtml index 7466ac1ac63d4..3447515cf041a 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/cms/browser/content.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/cms/browser/content.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/cms/browser/content/files.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/cms/browser/content/files.phtml index d99fb9c65c5fe..f43abd58dee94 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/cms/browser/content/files.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/cms/browser/content/files.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/cms/browser/content/newfolder.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/cms/browser/content/newfolder.phtml index 022cea673ef42..10af59bd1ab22 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/cms/browser/content/newfolder.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/cms/browser/content/newfolder.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/cms/browser/content/uploader.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/cms/browser/content/uploader.phtml index 8d89251209dc4..14c425fe3bb25 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/cms/browser/content/uploader.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/cms/browser/content/uploader.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -31,9 +31,6 @@ * @see Mage_Adminhtml_Block_Cms_Wysiwyg_Images_Content_Uploader */ ?> - -helper('Mage_Adminhtml_Helper_Media_Js')->getTranslatorScript() ?> -

diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/report/refresh/statistics.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/report/refresh/statistics.phtml index c4dc32a97b6f6..683776eb10eac 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/report/refresh/statistics.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/report/refresh/statistics.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/report/store/switcher.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/report/store/switcher.phtml index aec031ccbb294..08ea6a430fbc3 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/report/store/switcher.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/report/store/switcher.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -30,7 +30,7 @@ */ ?> isShow()): ?> -

+

+getHintHtml() ?>

- __('No Payment Methods') ?> +
__('No Payment Methods') ?>
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/comment.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/comment.phtml index 83fb544616227..5c9a99c0d3d50 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/comment.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/comment.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/coupons/form.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/coupons/form.phtml index 9c6a0fd755dca..fe95484e613e3 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/coupons/form.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/coupons/form.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/data.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/data.phtml index b10924ff959ca..576f20da91b9f 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/data.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/data.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -42,8 +42,10 @@ getCustomerId()): ?>class="main-col"> +
getChildHtml('items') ?>
+
getChildHtml('errors') ?>
getChildHtml('form_account') ?>
getChildHtml('billing_address') ?>
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/form.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/form.phtml index 45107eb4c3fbb..052dee376b34d 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/form.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/form.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/form/account.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/form/account.phtml index c43ffd862ddec..092b6e2ca5767 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/form/account.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/form/account.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/form/address.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/form/address.phtml index b5c630933e02e..5b22e27ff75b0 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/form/address.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/form/address.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ if($this->getIsShipping()): diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/giftmessage.js b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/giftmessage.js index 82e1343f209dc..5ce20bbb4a149 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/giftmessage.js +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/giftmessage.js @@ -19,7 +19,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/giftmessage.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/giftmessage.phtml index 6853fbbca0104..7a63708413ded 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/giftmessage.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/giftmessage.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/items.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/items.phtml index 25633ebb61d54..b258f84955f5a 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/items.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/items.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/items/grid.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/items/grid.phtml index 5ff91ee747abb..5e79118db11d8 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/items/grid.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/items/grid.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/js.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/js.phtml index 76a868fb7edd2..7a7b6d92aee38 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/js.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/js.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/newsletter/form.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/newsletter/form.phtml index 73359fa216f73..0bc2d60acad0b 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/newsletter/form.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/newsletter/form.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/scripts.js b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/scripts.js index ae7eb3f2af298..d046613a534d9 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/scripts.js +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/scripts.js @@ -19,7 +19,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ var AdminOrder = new Class.create(); @@ -42,6 +42,48 @@ AdminOrder.prototype = { this.giftMessageDataChanged = false; this.productConfigureAddFields = {}; this.productPriceBase = {}; + this.collectElementsValue = true; + Event.observe(window, 'load', (function(){ + this.dataArea = new OrderFormArea('data', $(this.getAreaId('data')), this); + this.itemsArea = Object.extend(new OrderFormArea('items', $(this.getAreaId('items')), this), { + addControlButton: function(button){ + var controlButtonArea = $(this.node).select('.form-buttons')[0]; + if (typeof controlButtonArea != 'undefined') { + var buttons = controlButtonArea.childElements(); + for (var i = 0; i < buttons.length; i++) { + if (buttons[i].innerHTML.include(button.label)) { + return ; + } + } + button.insertIn(controlButtonArea, 'top'); + } + } + }); + + var searchButton = new ControlButton(Translator.translate('Add Products')), + searchAreaId = this.getAreaId('search'); + searchButton.onClick = function() { + $(searchAreaId).show(); + this.remove(); + } + this.itemsArea.onLoad = this.itemsArea.onLoad.wrap(function(proceed) { + proceed(); + if (!$(searchAreaId).visible()) { + this.addControlButton(searchButton); + } + }); + this.areasLoaded(); + }).bind(this)); + }, + + areasLoaded: function(){ + }, + + itemsLoaded: function(){ + }, + + dataLoaded: function(){ + this.dataShow(); }, setLoadBaseUrl : function(url){ @@ -63,7 +105,7 @@ AdminOrder.prototype = { setCustomerAfter : function () { this.customerSelectorHide(); if (this.storeId) { - $(this.getAreaId('data')).callback = 'dataShow'; + $(this.getAreaId('data')).callback = 'dataLoaded'; this.loadArea(['data'], true); } else { @@ -219,14 +261,26 @@ AdminOrder.prototype = { } }, - disableShippingAddress : function(flag){ + disableShippingAddress : function(flag) { this.shippingAsBilling = flag; - if($('order-shipping_address_customer_address_id')) { - $('order-shipping_address_customer_address_id').disabled=flag; + if ($('order-shipping_address_customer_address_id')) { + $('order-shipping_address_customer_address_id').disabled = flag; } - if($(this.shippingAddressContainer)){ + if ($(this.shippingAddressContainer)) { var dataFields = $(this.shippingAddressContainer).select('input', 'select', 'textarea'); - for(var i=0;i option[value=' + currentCustomerGroupId + ']')[0].text; + var customerGroupOption = $$('#' + groupIdHtmlId + ' > option[value=' + groupId + ']')[0]; + var confirmText = message.replace(/%s/, customerGroupOption.text); + confirmText = confirmText.replace(/%s/, currentCustomerGroupTitle); + if (confirm(confirmText)) { + $$('#' + groupIdHtmlId + ' option').each(function(o) { + o.selected = o.readAttribute('value') == groupId; + }); + this.accountGroupChange(); + } + } +}; + +var OrderFormArea = Class.create(); +OrderFormArea.prototype = { + _name: null, + _node: null, + _parent: null, + _callbackName: null, + + initialize: function(name, node, parent){ + this._name = name; + this._parent = parent; + this._callbackName = node.callback; + if (typeof this._callbackName == 'undefined') { + this._callbackName = name + 'Loaded'; + node.callback = this._callbackName; + } + parent[this._callbackName] = parent[this._callbackName].wrap((function (proceed){ + proceed(); + this.onLoad(); + }).bind(this)); + + this.setNode(node); + }, + + setNode: function(node){ + if (!node.callback) { + node.callback = this._callbackName; + } + this.node = node; + }, + + onLoad: function(){ + } +}; + +var ControlButton = Class.create(); +ControlButton.prototype = { + _label: '', + _node: null, + + initialize: function(label){ + this._label = label; + this._node = new Element('button', { + 'class': 'scalable add' + }); + }, + + onClick: function(){ + }, + + insertIn: function(element, position){ + var node = Object.extend(this._node), + content = {}; + node.observe('click', this.onClick); + node.update('' + this._label + ''); + content[position] = node; + Element.insert(element, content); } }; diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/shipping/method/form.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/shipping/method/form.phtml index 12adadf285b92..cc67d26832048 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/shipping/method/form.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/shipping/method/form.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -91,7 +91,7 @@ __('Get shipping methods and rates') ?> - +
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/sidebar.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/sidebar.phtml index 87b28fcd87240..e81cab68e1f6c 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/sidebar.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/sidebar.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/sidebar/items.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/sidebar/items.phtml index 83547f2a50b67..d524bb08db920 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/sidebar/items.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/sidebar/items.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -92,5 +92,8 @@

__('No items') ?>

+ getItemCount() && $this->canRemoveItems()): ?> + getChildHtml('empty_customer_cart_button'); ?> +
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/store/select.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/store/select.phtml index 97c02ff6f0855..cb19c36c07984 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/store/select.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/store/select.phtml @@ -20,11 +20,12 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> +getHintHtml() ?> getWebsiteCollection() as $_website): ?> getGroupCollection($_website) as $_group): ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/totals.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/totals.phtml index 73863759ad4e7..870926f59da05 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/totals.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/totals.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/totals/default.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/totals/default.phtml index 8ddf39d3173d8..3b66de9de0b96 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/totals/default.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/totals/default.phtml @@ -20,14 +20,14 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getRenderingArea() == $this->getTotal()->getArea()): ?> - getTotal()->getTitle() ?> + escapeHtml($this->getTotal()->getTitle()); ?> getRenderingArea() == $this->getTotal()->getArea()): ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/totals/grandtotal.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/totals/grandtotal.phtml index c84aa4adc45cf..f14446390b18f 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/totals/grandtotal.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/totals/grandtotal.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/totals/shipping.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/totals/shipping.phtml index d304e1163fd61..69c4371a0075a 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/totals/shipping.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/totals/shipping.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/totals/subtotal.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/totals/subtotal.phtml index c005216acb9f4..a7d021dd6353d 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/totals/subtotal.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/totals/subtotal.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/totals/tax.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/totals/tax.phtml index cbb419a8fa6c4..13b1b0497eba1 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/totals/tax.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/create/totals/tax.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/create/form.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/create/form.phtml index 7629c505067f5..face88352ee4d 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/create/form.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/create/form.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/create/items.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/create/items.phtml index 198e10e5e533f..042a395f105e7 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/create/items.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/create/items.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/create/items/renderer/configurable.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/create/items/renderer/configurable.phtml index b0876731b90a5..ddebb797ec4b4 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/create/items/renderer/configurable.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/create/items/renderer/configurable.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -228,12 +228,11 @@ typeOfDisplay($_item, 2, 'sales')): ?> -
__('Total'); ?>:
displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedRowAmnt(), $_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
+
__('Total'); ?>:
displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedRowAmount(), $_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
- displayPriceAttribute('tax_amount') ?> displayPriceAttribute('discount_amount') ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/create/items/renderer/default.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/create/items/renderer/default.phtml index 01c96a1f5c095..63677f43dc294 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/create/items/renderer/default.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/create/items/renderer/default.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -233,7 +233,6 @@ - displayPriceAttribute('tax_amount') ?> displayPriceAttribute('discount_amount') ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/create/totals/adjustments.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/create/totals/adjustments.phtml index 82181d24b4375..6af4d00c97262 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/create/totals/adjustments.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/create/totals/adjustments.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/view/form.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/view/form.phtml index f25c4f38c37b6..ee8d6e46a52d6 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/view/form.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/view/form.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/view/items.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/view/items.phtml index 616f49d8fc666..12358444ecb72 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/view/items.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/view/items.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/view/items/renderer/configurable.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/view/items/renderer/configurable.phtml index 41ccaa15c7380..60be10a9812de 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/view/items/renderer/configurable.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/view/items/renderer/configurable.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -215,12 +215,11 @@ typeOfDisplay($_item, 2, 'sales')): ?> -
__('Total'); ?>:
displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedRowAmnt(), $_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
+
__('Total'); ?>:
displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedRowAmount(), $_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
- displayPriceAttribute('tax_amount') ?> displayPriceAttribute('discount_amount') ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/view/items/renderer/default.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/view/items/renderer/default.phtml index 4ef3c15b2004a..29ad5b5f7b661 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/view/items/renderer/default.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/creditmemo/view/items/renderer/default.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -221,7 +221,6 @@ - displayPriceAttribute('tax_amount') ?> displayPriceAttribute('discount_amount') ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/giftoptions.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/giftoptions.phtml index ddf58a0816edc..550a5223d581f 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/giftoptions.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/giftoptions.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/giftoptions_tooltip.js b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/giftoptions_tooltip.js index 519efaf5e2276..99675a27f72c6 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/giftoptions_tooltip.js +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/giftoptions_tooltip.js @@ -19,7 +19,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/create/form.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/create/form.phtml index d34ce1ae18e63..2c43ff9c0ba85 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/create/form.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/create/form.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/create/items.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/create/items.phtml index d60b56da3cfac..8bb3ea5fc6530 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/create/items.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/create/items.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/create/items/renderer/configurable.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/create/items/renderer/configurable.phtml index 8a6e9ce2a99c6..57e88e3fb1183 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/create/items/renderer/configurable.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/create/items/renderer/configurable.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -227,7 +227,6 @@ - displayPriceAttribute('tax_amount') ?> displayPriceAttribute('discount_amount') ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/create/items/renderer/default.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/create/items/renderer/default.phtml index 6cab2cf4bcb14..11b62382c1ba5 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/create/items/renderer/default.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/create/items/renderer/default.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -227,7 +227,6 @@ - displayPriceAttribute('tax_amount') ?> displayPriceAttribute('discount_amount') ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/create/tracking.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/create/tracking.phtml index 37c36500f4f59..9b1d50936ea99 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/create/tracking.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/create/tracking.phtml @@ -20,11 +20,12 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/view/form.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/view/form.phtml index fa54fbeebe689..ac33f2db3fcc9 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/view/form.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/view/form.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/view/items.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/view/items.phtml index 8bbc47ed57bac..b65e181c376e8 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/view/items.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/view/items.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/view/items/renderer/configurable.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/view/items/renderer/configurable.phtml index 8a6e9ce2a99c6..f42e2c83d735e 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/view/items/renderer/configurable.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/view/items/renderer/configurable.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -222,12 +222,12 @@ typeOfDisplay($_item, 2, 'sales')): ?> -
__('Total'); ?>:
displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedRowAmnt(), $_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
+
__('Total'); ?>:
displayPrices($_baseIncl+$_item->getBaseWeeeTaxAppliedRowAmount(), $_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
- + diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/view/items/renderer/default.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/view/items/renderer/default.phtml index 3c61f51b46f22..45eba3ec63061 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/view/items/renderer/default.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/invoice/view/items/renderer/default.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -221,7 +221,6 @@ - diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/create/form.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/create/form.phtml index 4d19df6f8f4a2..0f7346d1e335e 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/create/form.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/create/form.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/create/items.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/create/items.phtml index ad2600932cd22..9558c568d957d 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/create/items.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/create/items.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/create/items/renderer/configurable.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/create/items/renderer/configurable.phtml index 1cc67f2a09c82..cca9e03bf989c 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/create/items/renderer/configurable.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/create/items/renderer/configurable.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/create/items/renderer/default.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/create/items/renderer/default.phtml index d735fc08dfd4d..e1861670e19ba 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/create/items/renderer/default.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/create/items/renderer/default.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/create/tracking.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/create/tracking.phtml index fbf66aff6993a..7a095d19d4268 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/create/tracking.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/create/tracking.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/packaging.js b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/packaging.js index ac99fe5ebe5e3..fd0739b8b57e0 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/packaging.js +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/packaging.js @@ -19,7 +19,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ var Packaging = Class.create(); @@ -248,6 +248,17 @@ Packaging.prototype = { }, validate: function() { + var dimensionElements = $("packaging_window").select( + 'input[name=container_length],input[name=container_width],input[name=container_height]' + ); + var callback = null; + if ( dimensionElements.any(function(element) { return !!element.value; })) { + callback = function(element) { $(element).addClassName('required-entry'); }; + } else { + callback = function(element) { $(element).removeClassName('required-entry'); }; + } + dimensionElements.each(callback); + return result = $$('[id^="package_block_"] input').collect(function (element) { return this.validateElement(element) }, this).all(); @@ -609,7 +620,7 @@ Packaging.prototype = { return; } - currentNode.select( + $(currentNode).select( 'input[name=container_length],input[name=container_width],input[name=container_height],select[name=container_dimension_units]' ).each(function(inputElement) { if (disable) { diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/packaging/grid.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/packaging/grid.phtml index a1e597d7ec020..560dc5f451a31 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/packaging/grid.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/packaging/grid.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -81,7 +81,7 @@   diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/packaging/packed.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/packaging/packed.phtml index 9508ea3911d02..c2ddd754047d4 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/packaging/packed.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/packaging/packed.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -190,7 +190,7 @@
getPrintButton() ?>
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/packaging/popup.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/packaging/popup.phtml index ceb39072c653a..92348e12d67bf 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/packaging/popup.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/packaging/popup.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -46,7 +46,7 @@ document.observe("dom:loaded", function() {

__('Create Packages') ?>

@@ -156,12 +156,12 @@ document.observe("dom:loaded", function() {
@@ -198,7 +198,7 @@ document.observe("dom:loaded", function() {
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/tracking/info.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/tracking/info.phtml index d4df9d10c96f2..e134686dba3ab 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/tracking/info.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/tracking/info.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/view/form.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/view/form.phtml index 6c06d7c91d896..bd37961776f4b 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/view/form.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/view/form.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/view/items.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/view/items.phtml index 4f95554aa49d6..9b0c3defc4cae 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/view/items.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/view/items.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/view/items/renderer/configurable.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/view/items/renderer/configurable.phtml index 372700c1262d1..5bdf2a91a6f62 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/view/items/renderer/configurable.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/view/items/renderer/configurable.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/view/items/renderer/default.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/view/items/renderer/default.phtml index 148d0f69d7652..5b5e0f62aad6e 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/view/items/renderer/default.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/view/items/renderer/default.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/view/tracking.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/view/tracking.phtml index 43963306ae17e..7457113720068 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/view/tracking.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/shipment/view/tracking.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -74,6 +74,7 @@
displayPriceAttribute('tax_amount') ?> displayPriceAttribute('discount_amount') ?> displayPriceAttribute('tax_amount') ?> displayPriceAttribute('discount_amount') ?>
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totalbar.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totalbar.phtml index cae1e44e9affb..81448cb2a29f3 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totalbar.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totalbar.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals.phtml index a343bca3f4b94..536e9aa713f10 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -35,52 +35,52 @@ - getTotals('')?> + getTotals('footer')?> - - $_total): ?> + + getTotals('footer') as $_code => $_total): ?> getBlockName()): ?> getChildHtml($_total->getBlockName(), false); ?> - getStrong()):?> - + - getTotals('footer')?> + getTotals('')?> - - getTotals('footer') as $_code => $_total): ?> + + $_total): ?> getBlockName()): ?> getChildHtml($_total->getBlockName(), false); ?> + getStrong()):?> - +
getLabelProperties()?> class="label"> - getStrong()):?> - getLabel()?> - - getLabel()?> - + escapeHtml($_total->getLabel()); ?> getValueProperties()?> class="emph"> formatValue($_total) ?> - - getValueProperties()?>> - formatValue($_total) ?> -
getLabelProperties()?> class="label"> - getLabel()?> + getStrong()):?> + escapeHtml($_total->getLabel()); ?> + + escapeHtml($_total->getLabel()); ?> + getValueProperties()?> class="emph"> formatValue($_total) ?> + + getValueProperties()?>> + formatValue($_total) ?> +
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/discount.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/discount.phtml index 7911c993e1a2c..4ccfd70842359 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/discount.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/discount.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/due.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/due.phtml index 4b05ffb74288e..8c37ce3b4f2ee 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/due.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/due.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/footer.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/footer.phtml index bf027e603ae69..5618bbe5b71a3 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/footer.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/footer.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/grand.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/grand.phtml index aa4c3ea02366c..f4ab25eea94af 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/grand.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/grand.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/item.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/item.phtml index f16c9bb177054..ee552ea45618c 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/item.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/item.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/main.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/main.phtml index c85a611c6aef0..518a2ceecd708 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/main.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/main.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/paid.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/paid.phtml index 249a907407833..d9d5e3d09a01a 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/paid.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/paid.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/refunded.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/refunded.phtml index c6770626c18b4..c3437c5b943fc 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/refunded.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/refunded.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/shipping.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/shipping.phtml index 130ca52d94e81..6d5b67f7bdc27 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/shipping.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/shipping.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/tax.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/tax.phtml index c522ef9f8de89..e08b9049e6567 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/tax.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/totals/tax.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** @var $this Mage_Adminhtml_Block_Sales_Order_Totals_Tax */ diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/form.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/form.phtml index 9e094c7ce83ec..226ff5f39065b 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/form.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/form.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/giftmessage.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/giftmessage.phtml index 26390983ce028..c2ce110c0b496 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/giftmessage.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/giftmessage.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/history.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/history.phtml index 8876f987a1c93..f46dd2e20e62b 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/history.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/history.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/info.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/info.phtml index 56a555b9d1ea3..7c1666437c4a7 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/info.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/info.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/items.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/items.phtml index 3f18a3ad11172..4dda557ff70be 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/items.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/items.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/items/renderer/default.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/items/renderer/default.phtml index 9e73fbc0e392c..43c90c1a2f587 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/items/renderer/default.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/items/renderer/default.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/tab/history.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/tab/history.phtml index 292e7b707c8b4..46c5f57d2892e 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/tab/history.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/tab/history.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/tab/info.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/tab/info.phtml index 0328eb1366d1f..57b1ffec9a1f1 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/tab/info.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/tab/info.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/tracking.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/tracking.phtml index a434cffcb95e4..ff559b7465776 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/tracking.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/order/view/tracking.phtml @@ -20,23 +20,24 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -getOrder()->getShippingCarrier()->isTrackingAvailable()) : ?> +getOrder()->getShippingCarrier(); ?> +isTrackingAvailable()): ?> - +
- getOrder()->getTrackingNumbers()): ?> - - - - __('Delete') ?>
- - + getOrder()->getTrackingNumbers(); ?> + + + + __('Delete') ?>
+ + getSaveButtonHtml() ?> @@ -44,4 +45,4 @@
- + diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/transactions/detail.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/transactions/detail.phtml index ec029946e11df..9c6ab7a905972 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/sales/transactions/detail.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/sales/transactions/detail.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/store/switcher.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/store/switcher.phtml index 8819f353ec465..ccdcefe9e4da3 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/store/switcher.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/store/switcher.phtml @@ -20,13 +20,13 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> getWebsites()): ?> -

+

+getHintHtml() ?>

diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/system/variable/js.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/system/variable/js.phtml index 8dc7adb27973d..65f2a32c38fe3 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/system/variable/js.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/system/variable/js.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/tag.xml b/app/code/core/Mage/Adminhtml/view/adminhtml/tag.xml index 2834b470a9a1c..7f036133d9561 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/tag.xml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/tag.xml @@ -21,7 +21,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -49,4 +49,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/tag/edit/container.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/tag/edit/container.phtml index 14af436f9fd6e..0d7f20b9d3677 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/tag/edit/container.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/tag/edit/container.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/tag/index.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/tag/index.phtml index e5c5e79af6f69..6a64592b2ddea 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/tag/index.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/tag/index.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/class/page/edit.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/class/page/edit.phtml index 23ed082ffd50a..7a5391e95dba8 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/class/page/edit.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/class/page/edit.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/importExport.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/importExport.phtml index 2a3770900a3bc..9e09822fd30e5 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/importExport.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/importExport.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/rate/form.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/rate/form.phtml index 253ac8d871b55..55c7efdac469a 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/rate/form.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/rate/form.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/rate/title.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/rate/title.phtml index 721438fe3f214..e64b44a393c37 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/rate/title.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/rate/title.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/class/add.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/class/add.phtml index caa4c17c72d67..d34398a4ee1cf 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/class/add.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/class/add.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -29,7 +29,7 @@

- + diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/class/save.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/class/save.phtml index 0f846b5d719c8..29dc54c21ea6e 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/class/save.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/class/save.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rate/add.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rate/add.phtml index c099c6227cec4..f1edfc322b1ce 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rate/add.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rate/add.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rate/save.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rate/save.phtml index 5f7e4ef32665a..cdde037d88822 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rate/save.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rate/save.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rule/add.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rule/add.phtml index 9a602d46ede66..f9070d02eb075 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rule/add.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rule/add.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -29,7 +29,7 @@

- + diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rule/save.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rule/save.phtml index e9b12ec3018c1..356fe3e6a63a9 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rule/save.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/tax/toolbar/rule/save.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/urlrewrite/categories.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/urlrewrite/categories.phtml index 3a160365c8682..32d1c022618aa 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/urlrewrite/categories.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/urlrewrite/categories.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/urlrewrite/edit.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/urlrewrite/edit.phtml index 57be9648f473e..7ae6052b52f01 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/urlrewrite/edit.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/urlrewrite/edit.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/urlrewrite/selector.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/urlrewrite/selector.phtml index cc650ee93415f..8522feb6cee29 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/urlrewrite/selector.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/urlrewrite/selector.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/variables.js b/app/code/core/Mage/Adminhtml/view/adminhtml/variables.js index 8b54d92d5ed40..cf9ffd27bdbe3 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/variables.js +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/variables.js @@ -19,7 +19,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/accordion.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/accordion.phtml index ea1e4638d8680..38a15353a9b2e 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/accordion.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/accordion.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -29,11 +29,11 @@ * Template for Mage_Adminhtml_Block_Widget_Accordion */ ?> -
+
getItems() as $_item): ?> getChildHtml($_item->getId()) ?>
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/breadcrumbs.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/breadcrumbs.phtml index e1bad537b688c..24668763af5c0 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/breadcrumbs.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/breadcrumbs.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form.phtml index c048a166a08f1..04a297f0adb82 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form/container.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form/container.phtml index fc0f9f8191526..9fd68966b1924 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form/container.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form/container.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form/element.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form/element.phtml index fce21172174d6..ebf3c96263f39 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form/element.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form/element.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form/element/gallery.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form/element/gallery.phtml index 592ea9f7972e8..68770dce84917 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form/element/gallery.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form/element/gallery.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form/renderer/element.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form/renderer/element.phtml index 9f4fb73b85efd..4348f5861827e 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form/renderer/element.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form/renderer/element.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form/renderer/fieldset.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form/renderer/fieldset.phtml index 36e698e001d21..78d7b3c7490fb 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form/renderer/fieldset.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form/renderer/fieldset.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form/renderer/fieldset/element.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form/renderer/fieldset/element.phtml index 8269cda7d4846..6b783b76a7230 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form/renderer/fieldset/element.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/form/renderer/fieldset/element.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/grid.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/grid.phtml index 15220c0343e34..0f004f1d83cf5 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/grid.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/grid.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/grid/container.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/grid/container.phtml index e8acc20ef9764..fb76b3c55b338 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/grid/container.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/grid/container.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/grid/massaction.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/grid/massaction.phtml index 76be70bad7388..1c0855161f34f 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/grid/massaction.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/grid/massaction.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -42,7 +42,9 @@
+ getHideFormElement() !== true):?>
+ getBlockHtml('formkey')?>
@@ -60,7 +62,9 @@ getApplyButtonHtml() ?>
+ getHideFormElement() !== true):?>
+
diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/grid/serializer.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/grid/serializer.phtml index 86dd54e07f647..cda25d5e381f7 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/grid/serializer.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/grid/serializer.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/tabs.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/tabs.phtml index 760c858bc3b86..723f9c4e82edf 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/tabs.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/tabs.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/tabshoriz.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/tabshoriz.phtml index c90300dbe9c32..81f5df1d4773f 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/tabshoriz.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/tabshoriz.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/tabsleft.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/tabsleft.phtml index c7e8e4bb369d5..fec2c9b0f7f80 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/tabsleft.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/tabsleft.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/view/container.phtml b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/view/container.phtml index e4e318581d2ec..2fed87758217e 100644 --- a/app/code/core/Mage/Adminhtml/view/adminhtml/widget/view/container.phtml +++ b/app/code/core/Mage/Adminhtml/view/adminhtml/widget/view/container.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Api/Controller/Action.php b/app/code/core/Mage/Api/Controller/Action.php index f8274cf838abb..8781fda354c80 100644 --- a/app/code/core/Mage/Api/Controller/Action.php +++ b/app/code/core/Mage/Api/Controller/Action.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Exception.php b/app/code/core/Mage/Api/Exception.php index 2e52caaa089d6..ebd3fd8de641c 100644 --- a/app/code/core/Mage/Api/Exception.php +++ b/app/code/core/Mage/Api/Exception.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Helper/Data.php b/app/code/core/Mage/Api/Helper/Data.php index 0ededf8474503..b604fc672b320 100644 --- a/app/code/core/Mage/Api/Helper/Data.php +++ b/app/code/core/Mage/Api/Helper/Data.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Acl.php b/app/code/core/Mage/Api/Model/Acl.php index a47f7931b9c32..5a873750fd34b 100644 --- a/app/code/core/Mage/Api/Model/Acl.php +++ b/app/code/core/Mage/Api/Model/Acl.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Acl/Resource.php b/app/code/core/Mage/Api/Model/Acl/Resource.php index 514819c0be13e..1157e6da21e05 100644 --- a/app/code/core/Mage/Api/Model/Acl/Resource.php +++ b/app/code/core/Mage/Api/Model/Acl/Resource.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Acl/Role.php b/app/code/core/Mage/Api/Model/Acl/Role.php index 9fdbe47b28bd7..f3723bf424535 100644 --- a/app/code/core/Mage/Api/Model/Acl/Role.php +++ b/app/code/core/Mage/Api/Model/Acl/Role.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Acl/Role/Generic.php b/app/code/core/Mage/Api/Model/Acl/Role/Generic.php index 3a145bd249d4f..4323e48c1e923 100644 --- a/app/code/core/Mage/Api/Model/Acl/Role/Generic.php +++ b/app/code/core/Mage/Api/Model/Acl/Role/Generic.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Acl/Role/Group.php b/app/code/core/Mage/Api/Model/Acl/Role/Group.php index ebb710d7b0f39..fc6ca50bb72d2 100644 --- a/app/code/core/Mage/Api/Model/Acl/Role/Group.php +++ b/app/code/core/Mage/Api/Model/Acl/Role/Group.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Acl/Role/Registry.php b/app/code/core/Mage/Api/Model/Acl/Role/Registry.php index 6744f5ef53ec8..0a42cc0efb341 100644 --- a/app/code/core/Mage/Api/Model/Acl/Role/Registry.php +++ b/app/code/core/Mage/Api/Model/Acl/Role/Registry.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Acl/Role/User.php b/app/code/core/Mage/Api/Model/Acl/Role/User.php index dde5d2b3116b3..bade58da92acd 100644 --- a/app/code/core/Mage/Api/Model/Acl/Role/User.php +++ b/app/code/core/Mage/Api/Model/Acl/Role/User.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Config.php b/app/code/core/Mage/Api/Model/Config.php index 77abc5aec1c33..e8b70d3a8296e 100644 --- a/app/code/core/Mage/Api/Model/Config.php +++ b/app/code/core/Mage/Api/Model/Config.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Resource/Abstract.php b/app/code/core/Mage/Api/Model/Resource/Abstract.php index ad770c63bd5e3..549e349178f01 100644 --- a/app/code/core/Mage/Api/Model/Resource/Abstract.php +++ b/app/code/core/Mage/Api/Model/Resource/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Resource/Acl.php b/app/code/core/Mage/Api/Model/Resource/Acl.php index 78ef2fbbd9de4..9fefdc2c91bb5 100755 --- a/app/code/core/Mage/Api/Model/Resource/Acl.php +++ b/app/code/core/Mage/Api/Model/Resource/Acl.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Resource/Acl/Role.php b/app/code/core/Mage/Api/Model/Resource/Acl/Role.php index 6652490513fca..b4eb87b3b613f 100755 --- a/app/code/core/Mage/Api/Model/Resource/Acl/Role.php +++ b/app/code/core/Mage/Api/Model/Resource/Acl/Role.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Resource/Acl/Role/Collection.php b/app/code/core/Mage/Api/Model/Resource/Acl/Role/Collection.php index a073ed37a5d32..eaa7968118474 100755 --- a/app/code/core/Mage/Api/Model/Resource/Acl/Role/Collection.php +++ b/app/code/core/Mage/Api/Model/Resource/Acl/Role/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Resource/Permissions/Collection.php b/app/code/core/Mage/Api/Model/Resource/Permissions/Collection.php index 49d73abe31dc0..a6ef7ebb706e8 100755 --- a/app/code/core/Mage/Api/Model/Resource/Permissions/Collection.php +++ b/app/code/core/Mage/Api/Model/Resource/Permissions/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Resource/Role.php b/app/code/core/Mage/Api/Model/Resource/Role.php index 507a1b63eb1d7..ae39a30c9033b 100755 --- a/app/code/core/Mage/Api/Model/Resource/Role.php +++ b/app/code/core/Mage/Api/Model/Resource/Role.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Resource/Role/Collection.php b/app/code/core/Mage/Api/Model/Resource/Role/Collection.php index c52c34d99b2cc..a490823768fc8 100755 --- a/app/code/core/Mage/Api/Model/Resource/Role/Collection.php +++ b/app/code/core/Mage/Api/Model/Resource/Role/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Resource/Roles.php b/app/code/core/Mage/Api/Model/Resource/Roles.php index 8b6f8bcbbb23b..43448bd61ceb1 100755 --- a/app/code/core/Mage/Api/Model/Resource/Roles.php +++ b/app/code/core/Mage/Api/Model/Resource/Roles.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Resource/Roles/Collection.php b/app/code/core/Mage/Api/Model/Resource/Roles/Collection.php index 1a72e9f9880c0..e0def9cb02c64 100755 --- a/app/code/core/Mage/Api/Model/Resource/Roles/Collection.php +++ b/app/code/core/Mage/Api/Model/Resource/Roles/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Resource/Roles/User/Collection.php b/app/code/core/Mage/Api/Model/Resource/Roles/User/Collection.php index b3861edd220be..4b282900e2fca 100755 --- a/app/code/core/Mage/Api/Model/Resource/Roles/User/Collection.php +++ b/app/code/core/Mage/Api/Model/Resource/Roles/User/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Resource/Rules.php b/app/code/core/Mage/Api/Model/Resource/Rules.php index 7a65f1b405d3c..82052d38cc889 100755 --- a/app/code/core/Mage/Api/Model/Resource/Rules.php +++ b/app/code/core/Mage/Api/Model/Resource/Rules.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Resource/Rules/Collection.php b/app/code/core/Mage/Api/Model/Resource/Rules/Collection.php index 774d6d49052a1..48dc8a7b34900 100755 --- a/app/code/core/Mage/Api/Model/Resource/Rules/Collection.php +++ b/app/code/core/Mage/Api/Model/Resource/Rules/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Resource/User.php b/app/code/core/Mage/Api/Model/Resource/User.php index b960fc862738f..878de72994be7 100755 --- a/app/code/core/Mage/Api/Model/Resource/User.php +++ b/app/code/core/Mage/Api/Model/Resource/User.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Resource/User/Collection.php b/app/code/core/Mage/Api/Model/Resource/User/Collection.php index 13a632799a252..9577cf9cc06b4 100755 --- a/app/code/core/Mage/Api/Model/Resource/User/Collection.php +++ b/app/code/core/Mage/Api/Model/Resource/User/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Role.php b/app/code/core/Mage/Api/Model/Role.php index e0978371db884..599ca42fab4b2 100644 --- a/app/code/core/Mage/Api/Model/Role.php +++ b/app/code/core/Mage/Api/Model/Role.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Roles.php b/app/code/core/Mage/Api/Model/Roles.php index d1f63492acc16..69a3b30e2a67b 100644 --- a/app/code/core/Mage/Api/Model/Roles.php +++ b/app/code/core/Mage/Api/Model/Roles.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Rules.php b/app/code/core/Mage/Api/Model/Rules.php index b8e95d003182b..8c319032a952b 100644 --- a/app/code/core/Mage/Api/Model/Rules.php +++ b/app/code/core/Mage/Api/Model/Rules.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Server.php b/app/code/core/Mage/Api/Model/Server.php index 29dc0b5440e05..536d0fd8c1462 100644 --- a/app/code/core/Mage/Api/Model/Server.php +++ b/app/code/core/Mage/Api/Model/Server.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Server/Adapter/Interface.php b/app/code/core/Mage/Api/Model/Server/Adapter/Interface.php index f5ee1916e7d4f..e48430c4f60e6 100644 --- a/app/code/core/Mage/Api/Model/Server/Adapter/Interface.php +++ b/app/code/core/Mage/Api/Model/Server/Adapter/Interface.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Server/Adapter/Soap.php b/app/code/core/Mage/Api/Model/Server/Adapter/Soap.php index 818abbbfa5224..c46832bb1dc21 100644 --- a/app/code/core/Mage/Api/Model/Server/Adapter/Soap.php +++ b/app/code/core/Mage/Api/Model/Server/Adapter/Soap.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Server/Adapter/Xmlrpc.php b/app/code/core/Mage/Api/Model/Server/Adapter/Xmlrpc.php index e5dfdf8ebc1c4..18b8bebeaff5e 100644 --- a/app/code/core/Mage/Api/Model/Server/Adapter/Xmlrpc.php +++ b/app/code/core/Mage/Api/Model/Server/Adapter/Xmlrpc.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Server/Handler.php b/app/code/core/Mage/Api/Model/Server/Handler.php index 29b42ef0cfc82..4c4181b77e0fe 100644 --- a/app/code/core/Mage/Api/Model/Server/Handler.php +++ b/app/code/core/Mage/Api/Model/Server/Handler.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Server/Handler/Abstract.php b/app/code/core/Mage/Api/Model/Server/Handler/Abstract.php index 432e09c868d9a..7f7b549d01fa4 100644 --- a/app/code/core/Mage/Api/Model/Server/Handler/Abstract.php +++ b/app/code/core/Mage/Api/Model/Server/Handler/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Server/V2/Adapter/Soap.php b/app/code/core/Mage/Api/Model/Server/V2/Adapter/Soap.php index 6071193a5bd7e..a9cbeaa622fab 100644 --- a/app/code/core/Mage/Api/Model/Server/V2/Adapter/Soap.php +++ b/app/code/core/Mage/Api/Model/Server/V2/Adapter/Soap.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Server/V2/Handler.php b/app/code/core/Mage/Api/Model/Server/V2/Handler.php index c615d9cc315f3..978a42372f650 100644 --- a/app/code/core/Mage/Api/Model/Server/V2/Handler.php +++ b/app/code/core/Mage/Api/Model/Server/V2/Handler.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Server/Wsi/Adapter/Soap.php b/app/code/core/Mage/Api/Model/Server/Wsi/Adapter/Soap.php index f9b6572709811..7b3a4963b34cd 100644 --- a/app/code/core/Mage/Api/Model/Server/Wsi/Adapter/Soap.php +++ b/app/code/core/Mage/Api/Model/Server/Wsi/Adapter/Soap.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Server/Wsi/Handler.php b/app/code/core/Mage/Api/Model/Server/Wsi/Handler.php index 38c44e871e2bb..0192d728913db 100644 --- a/app/code/core/Mage/Api/Model/Server/Wsi/Handler.php +++ b/app/code/core/Mage/Api/Model/Server/Wsi/Handler.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Session.php b/app/code/core/Mage/Api/Model/Session.php index 79519a7d5601d..e6624481c9e51 100644 --- a/app/code/core/Mage/Api/Model/Session.php +++ b/app/code/core/Mage/Api/Model/Session.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/User.php b/app/code/core/Mage/Api/Model/User.php index 93a42209c5818..ee5e139283ded 100644 --- a/app/code/core/Mage/Api/Model/User.php +++ b/app/code/core/Mage/Api/Model/User.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -56,6 +56,13 @@ */ class Mage_Api_Model_User extends Mage_Core_Model_Abstract { + /** + * Prefix of model events names + * + * @var string + */ + protected $_eventPrefix = 'api_user'; + protected function _construct() { $this->_init('Mage_Api_Model_Resource_User'); diff --git a/app/code/core/Mage/Api/Model/Wsdl/Config.php b/app/code/core/Mage/Api/Model/Wsdl/Config.php index 6c5580074005c..f94bf37991bed 100644 --- a/app/code/core/Mage/Api/Model/Wsdl/Config.php +++ b/app/code/core/Mage/Api/Model/Wsdl/Config.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Wsdl/Config/Base.php b/app/code/core/Mage/Api/Model/Wsdl/Config/Base.php index 72dd66bc8d79b..49db9a717d838 100644 --- a/app/code/core/Mage/Api/Model/Wsdl/Config/Base.php +++ b/app/code/core/Mage/Api/Model/Wsdl/Config/Base.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/Model/Wsdl/Config/Element.php b/app/code/core/Mage/Api/Model/Wsdl/Config/Element.php index d44a987a48fd8..fe11244090b59 100644 --- a/app/code/core/Mage/Api/Model/Wsdl/Config/Element.php +++ b/app/code/core/Mage/Api/Model/Wsdl/Config/Element.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/controllers/IndexController.php b/app/code/core/Mage/Api/controllers/IndexController.php index fb724559977f4..39753e5924bbd 100644 --- a/app/code/core/Mage/Api/controllers/IndexController.php +++ b/app/code/core/Mage/Api/controllers/IndexController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/controllers/SoapController.php b/app/code/core/Mage/Api/controllers/SoapController.php index 3674c65c25bd4..91f4ec7b8cea9 100644 --- a/app/code/core/Mage/Api/controllers/SoapController.php +++ b/app/code/core/Mage/Api/controllers/SoapController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/controllers/V2/SoapController.php b/app/code/core/Mage/Api/controllers/V2/SoapController.php index 6f183b5d27225..18395b95af8fd 100644 --- a/app/code/core/Mage/Api/controllers/V2/SoapController.php +++ b/app/code/core/Mage/Api/controllers/V2/SoapController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/controllers/XmlrpcController.php b/app/code/core/Mage/Api/controllers/XmlrpcController.php index 29a0edb8b4d7e..1573ed5906937 100644 --- a/app/code/core/Mage/Api/controllers/XmlrpcController.php +++ b/app/code/core/Mage/Api/controllers/XmlrpcController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Api/etc/adminhtml.xml b/app/code/core/Mage/Api/etc/adminhtml.xml index a3d1fb4d07d70..a756ac4538ee1 100644 --- a/app/code/core/Mage/Api/etc/adminhtml.xml +++ b/app/code/core/Mage/Api/etc/adminhtml.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Api/etc/api.xml b/app/code/core/Mage/Api/etc/api.xml index 3989d78334762..695ee9b259e88 100644 --- a/app/code/core/Mage/Api/etc/api.xml +++ b/app/code/core/Mage/Api/etc/api.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Api/etc/config.xml b/app/code/core/Mage/Api/etc/config.xml index f1d7bab35da05..2492346a4a278 100644 --- a/app/code/core/Mage/Api/etc/config.xml +++ b/app/code/core/Mage/Api/etc/config.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Api/etc/system.xml b/app/code/core/Mage/Api/etc/system.xml index 25818a76a17da..bc9c8e122b484 100644 --- a/app/code/core/Mage/Api/etc/system.xml +++ b/app/code/core/Mage/Api/etc/system.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Api/sql/api_setup/install-1.6.0.0.php b/app/code/core/Mage/Api/sql/api_setup/install-1.6.0.0.php index fb9df666844f9..68bb78a1570c8 100644 --- a/app/code/core/Mage/Api/sql/api_setup/install-1.6.0.0.php +++ b/app/code/core/Mage/Api/sql/api_setup/install-1.6.0.0.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Api - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Authorizenet/Block/Directpost/Form.php b/app/code/core/Mage/Authorizenet/Block/Directpost/Form.php index e1bdfe5d4df01..355e2422e066e 100644 --- a/app/code/core/Mage/Authorizenet/Block/Directpost/Form.php +++ b/app/code/core/Mage/Authorizenet/Block/Directpost/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Authorizenet - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Authorizenet/Block/Directpost/Iframe.php b/app/code/core/Mage/Authorizenet/Block/Directpost/Iframe.php index a450291edbbd0..9cadfc3ccdd53 100644 --- a/app/code/core/Mage/Authorizenet/Block/Directpost/Iframe.php +++ b/app/code/core/Mage/Authorizenet/Block/Directpost/Iframe.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Authorizenet - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Authorizenet/Helper/Data.php b/app/code/core/Mage/Authorizenet/Helper/Data.php index bc63f67119d59..a7298578ea93d 100755 --- a/app/code/core/Mage/Authorizenet/Helper/Data.php +++ b/app/code/core/Mage/Authorizenet/Helper/Data.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Authorizenet - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Authorizenet/Model/Directpost.php b/app/code/core/Mage/Authorizenet/Model/Directpost.php index 9efc94c97307a..e4eee4781bf84 100644 --- a/app/code/core/Mage/Authorizenet/Model/Directpost.php +++ b/app/code/core/Mage/Authorizenet/Model/Directpost.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Authorizenet - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Authorizenet/Model/Directpost/Observer.php b/app/code/core/Mage/Authorizenet/Model/Directpost/Observer.php index 75f2fdcef2bfd..6477f12ce0ba0 100644 --- a/app/code/core/Mage/Authorizenet/Model/Directpost/Observer.php +++ b/app/code/core/Mage/Authorizenet/Model/Directpost/Observer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Authorizenet - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Authorizenet/Model/Directpost/Request.php b/app/code/core/Mage/Authorizenet/Model/Directpost/Request.php index 2d66651dff649..57fcd15eebd08 100644 --- a/app/code/core/Mage/Authorizenet/Model/Directpost/Request.php +++ b/app/code/core/Mage/Authorizenet/Model/Directpost/Request.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Authorizenet - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Authorizenet/Model/Directpost/Response.php b/app/code/core/Mage/Authorizenet/Model/Directpost/Response.php index 4f47518cae879..9486793f8878e 100644 --- a/app/code/core/Mage/Authorizenet/Model/Directpost/Response.php +++ b/app/code/core/Mage/Authorizenet/Model/Directpost/Response.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Authorizenet - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Authorizenet/Model/Directpost/Session.php b/app/code/core/Mage/Authorizenet/Model/Directpost/Session.php index b7b9d53be1847..a827b6deb300c 100644 --- a/app/code/core/Mage/Authorizenet/Model/Directpost/Session.php +++ b/app/code/core/Mage/Authorizenet/Model/Directpost/Session.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Authorizenet - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Authorizenet/controllers/Adminhtml/Authorizenet/Directpost/PaymentController.php b/app/code/core/Mage/Authorizenet/controllers/Adminhtml/Authorizenet/Directpost/PaymentController.php index 9162394ad4c7c..8be65c3f7c721 100644 --- a/app/code/core/Mage/Authorizenet/controllers/Adminhtml/Authorizenet/Directpost/PaymentController.php +++ b/app/code/core/Mage/Authorizenet/controllers/Adminhtml/Authorizenet/Directpost/PaymentController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Authorizenet - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Authorizenet/controllers/Directpost/PaymentController.php b/app/code/core/Mage/Authorizenet/controllers/Directpost/PaymentController.php index 995c427325a95..87a489758a062 100644 --- a/app/code/core/Mage/Authorizenet/controllers/Directpost/PaymentController.php +++ b/app/code/core/Mage/Authorizenet/controllers/Directpost/PaymentController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Authorizenet - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Authorizenet/etc/config.xml b/app/code/core/Mage/Authorizenet/etc/config.xml index 894e94d2accca..88f8782aaab99 100755 --- a/app/code/core/Mage/Authorizenet/etc/config.xml +++ b/app/code/core/Mage/Authorizenet/etc/config.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Authorizenet - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Authorizenet/etc/system.xml b/app/code/core/Mage/Authorizenet/etc/system.xml index 52f8b54abfa81..2a479f02f731b 100755 --- a/app/code/core/Mage/Authorizenet/etc/system.xml +++ b/app/code/core/Mage/Authorizenet/etc/system.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Authorizenet - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -210,6 +210,7 @@ 1 1 0 + validate-number diff --git a/app/code/core/Mage/Authorizenet/view/adminhtml/directpost/iframe.phtml b/app/code/core/Mage/Authorizenet/view/adminhtml/directpost/iframe.phtml index 35b8c0c16f996..1f1d2f3a37e61 100644 --- a/app/code/core/Mage/Authorizenet/view/adminhtml/directpost/iframe.phtml +++ b/app/code/core/Mage/Authorizenet/view/adminhtml/directpost/iframe.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Authorizenet/view/adminhtml/directpost/info.phtml b/app/code/core/Mage/Authorizenet/view/adminhtml/directpost/info.phtml index c4b65dc8b08aa..4195962042244 100644 --- a/app/code/core/Mage/Authorizenet/view/adminhtml/directpost/info.phtml +++ b/app/code/core/Mage/Authorizenet/view/adminhtml/directpost/info.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Authorizenet/view/adminhtml/layout.xml b/app/code/core/Mage/Authorizenet/view/adminhtml/layout.xml index 423270a2320f1..c8a299ed74ed2 100644 --- a/app/code/core/Mage/Authorizenet/view/adminhtml/layout.xml +++ b/app/code/core/Mage/Authorizenet/view/adminhtml/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Authorizenet/view/frontend/directpost/form.phtml b/app/code/core/Mage/Authorizenet/view/frontend/directpost/form.phtml index 7ac49e2ef6065..2f979a708ed5f 100644 --- a/app/code/core/Mage/Authorizenet/view/frontend/directpost/form.phtml +++ b/app/code/core/Mage/Authorizenet/view/frontend/directpost/form.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Authorizenet/view/frontend/directpost/iframe.phtml b/app/code/core/Mage/Authorizenet/view/frontend/directpost/iframe.phtml index 611c034ef1952..9d2c612ca245b 100644 --- a/app/code/core/Mage/Authorizenet/view/frontend/directpost/iframe.phtml +++ b/app/code/core/Mage/Authorizenet/view/frontend/directpost/iframe.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Authorizenet/view/frontend/directpost/info.phtml b/app/code/core/Mage/Authorizenet/view/frontend/directpost/info.phtml index d4ba4ac82aded..d8e6ff2275dd5 100644 --- a/app/code/core/Mage/Authorizenet/view/frontend/directpost/info.phtml +++ b/app/code/core/Mage/Authorizenet/view/frontend/directpost/info.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Authorizenet/view/frontend/layout.xml b/app/code/core/Mage/Authorizenet/view/frontend/layout.xml index 0cde93890510a..558852a859037 100644 --- a/app/code/core/Mage/Authorizenet/view/frontend/layout.xml +++ b/app/code/core/Mage/Authorizenet/view/frontend/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Backup/Exception.php b/app/code/core/Mage/Backup/Exception.php index 8be06068a244f..cbdfdc8a4e0cb 100644 --- a/app/code/core/Mage/Backup/Exception.php +++ b/app/code/core/Mage/Backup/Exception.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Backup - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Backup/Helper/Data.php b/app/code/core/Mage/Backup/Helper/Data.php index c9540e00e14ac..3f53a87aa62bb 100644 --- a/app/code/core/Mage/Backup/Helper/Data.php +++ b/app/code/core/Mage/Backup/Helper/Data.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Backup - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,5 +29,305 @@ */ class Mage_Backup_Helper_Data extends Mage_Core_Helper_Abstract { + /** + * Backup type constant for database backup + * + * @const string + */ + const TYPE_DB = 'db'; + /** + * Backup type constant for filesystem backup + * + * @const string + */ + const TYPE_FILESYSTEM = 'filesystem'; + + /** + * Backup type constant for full system backup(database + filesystem) + * + * @const string + */ + const TYPE_SYSTEM_SNAPSHOT = 'snapshot'; + + /** + * Backup type constant for media and database backup + * + * @const string + */ + const TYPE_MEDIA = 'media'; + + /** + * Backup type constant for full system backup excluding media folder + * + * @const string + */ + const TYPE_SNAPSHOT_WITHOUT_MEDIA = 'nomedia'; + + /** + * Get all possible backup type values with descriptive title + * + * @return array + */ + public function getBackupTypes() + { + return array( + self::TYPE_DB => self::__('Database'), + self::TYPE_MEDIA => self::__('Database and Media'), + self::TYPE_SYSTEM_SNAPSHOT => self::__('System'), + self::TYPE_SNAPSHOT_WITHOUT_MEDIA => self::__('System (excluding Media)') + ); + } + + /** + * Get all possible backup type values + * + * @return array + */ + public function getBackupTypesList() + { + return array( + self::TYPE_DB, + self::TYPE_SYSTEM_SNAPSHOT, + self::TYPE_SNAPSHOT_WITHOUT_MEDIA, + self::TYPE_MEDIA + ); + } + + /** + * Get default backup type value + * + * @return string + */ + public function getDefaultBackupType() + { + return self::TYPE_DB; + } + + /** + * Get directory path where backups stored + * + * @return string + */ + public function getBackupsDir() + { + return Mage::getBaseDir('var') . DS . 'backups'; + } + + /** + * Get backup file extension by backup type + * + * @param string $type + * @return string + */ + public function getExtensionByType($type) + { + $extensions = $this->getExtensions(); + return isset($extensions[$type]) ? $extensions[$type] : ''; + } + + /** + * Get all types to extensions map + * + * @return array + */ + public function getExtensions() + { + return array( + self::TYPE_SYSTEM_SNAPSHOT => 'tgz', + self::TYPE_SNAPSHOT_WITHOUT_MEDIA => 'tgz', + self::TYPE_MEDIA => 'tgz', + self::TYPE_DB => 'gz' + ); + } + + /** + * Generate backup download name + * + * @param Mage_Backup_Model_Backup $backup + * @return string + */ + public function generateBackupDownloadName(Mage_Backup_Model_Backup $backup) + { + $additionalExtension = $backup->getType() == self::TYPE_DB ? '.sql' : ''; + return $backup->getType() . '-' . date('YmdHis', $backup->getTime()) . $additionalExtension . '.' + . $this->getExtensionByType($backup->getType()); + } + + /** + * Check Permission for Rollback + * + * @return boolean + */ + public function isRollbackAllowed(){ + return Mage::getSingleton('Mage_Admin_Model_Session')->isAllowed('system/tools/backup/rollback' ); + } + + /** + * Get paths that should be ignored when creating system snapshots + * + * @return array + */ + public function getBackupIgnorePaths() + { + return array( + '.svn', + 'maintenance.flag', + Mage::getBaseDir('var') . DS . 'session', + Mage::getBaseDir('var') . DS . 'cache', + Mage::getBaseDir('var') . DS . 'full_page_cache', + Mage::getBaseDir('var') . DS . 'locks', + Mage::getBaseDir('var') . DS . 'log', + Mage::getBaseDir('var') . DS . 'report' + ); + } + + /** + * Get paths that should be ignored when rolling back system snapshots + * + * @return array + */ + public function getRollbackIgnorePaths() + { + return array( + '.svn', + 'maintenance.flag', + Mage::getBaseDir('var') . DS . 'session', + Mage::getBaseDir('var') . DS . 'locks', + Mage::getBaseDir('var') . DS . 'log', + Mage::getBaseDir('var') . DS . 'report', + Mage::getBaseDir('app') . DS . 'Mage.php', + Mage::getBaseDir() . DS . 'errors', + Mage::getBaseDir() . DS . 'index.php' + ); + } + + /** + * Put store into maintenance mode + * + * @return bool + */ + public function turnOnMaintenanceMode() + { + $maintenanceFlagFile = $this->getMaintenanceFlagFilePath(); + $result = file_put_contents($maintenanceFlagFile, 'maintenance'); + + return $result !== false; + } + + /** + * Turn off store maintenance mode + */ + public function turnOffMaintenanceMode() + { + $maintenanceFlagFile = $this->getMaintenanceFlagFilePath(); + @unlink($maintenanceFlagFile); + } + + /** + * Get backup create success message by backup type + * + * @param string $type + * @return string + */ + public function getCreateSuccessMessageByType($type) + { + $messagesMap = array( + self::TYPE_SYSTEM_SNAPSHOT => $this->__('The system backup has been created.'), + self::TYPE_SNAPSHOT_WITHOUT_MEDIA => $this->__('The system backup has been created.'), + self::TYPE_MEDIA => $this->__('The database and media backup has been created.'), + self::TYPE_DB => $this->__('The database backup has been created.') + ); + + if (!isset($messagesMap[$type])) { + return; + } + + return $messagesMap[$type]; + } + + /** + * Get path to maintenance flag file + * + * @return string + */ + protected function getMaintenanceFlagFilePath() + { + return Mage::getBaseDir() . DS . 'maintenance.flag'; + } + + /** + * Invalidate Cache + * @return Mage_Backup_Helper_Data + */ + public function invalidateCache() + { + if ($cacheTypesNode = Mage::getConfig()->getNode(Mage_Core_Model_Cache::XML_PATH_TYPES)) { + $cacheTypesList = array_keys($cacheTypesNode->asArray()); + Mage::app()->getCacheInstance()->invalidateType($cacheTypesList); + } + return $this; + } + + /** + * Invalidate Indexer + * + * @return Mage_Backup_Helper_Data + */ + public function invalidateIndexer() + { + foreach (Mage::getResourceModel('Mage_Index_Model_Resource_Process_Collection') as $process){ + $process->changeStatus(Mage_Index_Model_Process::STATUS_REQUIRE_REINDEX); + } + return $this; + } + + /** + * Creates backup's display name from it's name + * + * @param string $name + * @return string + */ + public function nameToDisplayName($name) + { + return str_replace('_', ' ', $name); + } + + /** + * Extracts information from backup's filename + * + * @param string $filename + * @return Varien_Object + */ + public function extractDataFromFilename($filename) + { + $extensions = $this->getExtensions(); + + $filenameWithoutExtension = $filename; + + foreach ($extensions as $extension) { + $filenameWithoutExtension = preg_replace('/' . preg_quote($extension, '/') . '$/', '', + $filenameWithoutExtension + ); + } + + $filenameWithoutExtension = substr($filenameWithoutExtension, 0, strrpos($filenameWithoutExtension, ".")); + + list($time, $type) = explode("_", $filenameWithoutExtension); + + $name = str_replace($time . '_' . $type, '', $filenameWithoutExtension); + + if (!empty($name)) { + $name = substr($name, 1); + } + + $result = new Varien_Object(); + $result->addData(array( + 'name' => $name, + 'type' => $type, + 'time' => $time + )); + + return $result; + } } diff --git a/app/code/core/Mage/Backup/Model/Backup.php b/app/code/core/Mage/Backup/Model/Backup.php index fb3a75d3f2b14..8ecf82c213887 100644 --- a/app/code/core/Mage/Backup/Model/Backup.php +++ b/app/code/core/Mage/Backup/Model/Backup.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Backup - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,23 +29,17 @@ * * @category Mage * @package Mage_Backup - * @author Magento Core Team + * @author Magento Core Team */ class Mage_Backup_Model_Backup extends Varien_Object { - /* backup types */ - const BACKUP_DB = 'db'; - const BACKUP_VIEW = 'view'; - const BACKUP_MEDIA = 'media'; - /* internal constants */ - const BACKUP_EXTENSION = 'gz'; const COMPRESS_RATE = 9; /** * Type of backup file * - * @var string db|media|view + * @var string */ private $_type = 'db'; @@ -65,14 +59,19 @@ class Mage_Backup_Model_Backup extends Varien_Object */ public function load($fileName, $filePath) { - list ($time, $type) = explode("_", substr($fileName, 0, strrpos($fileName, "."))); + $backupData = Mage::helper('Mage_Backup_Helper_Data')->extractDataFromFilename($fileName); + $this->addData(array( 'id' => $filePath . DS . $fileName, - 'time' => (int)$time, + 'time' => (int)$backupData->getTime(), 'path' => $filePath, - 'date_object' => new Zend_Date((int)$time) + 'extension' => Mage::helper('Mage_Backup_Helper_Data')->getExtensionByType($backupData->getType()), + 'display_name' => Mage::helper('Mage_Backup_Helper_Data')->nameToDisplayName($backupData->getName()), + 'name' => $backupData->getName(), + 'date_object' => new Zend_Date((int)$backupData->getTime(), Mage::app()->getLocale()->getLocaleCode()) )); - $this->setType($type); + + $this->setType($backupData->getType()); return $this; } @@ -93,19 +92,29 @@ public function exists() */ public function getFileName() { - return $this->getTime() . "_" . $this->getType() - . "." . self::BACKUP_EXTENSION; + $filename = $this->getTime() . "_" . $this->getType(); + $backupName = $this->getName(); + + if (!empty($backupName)) { + $filename .= '_' . $backupName; + } + + $filename .= '.' . Mage::helper('Mage_Backup_Helper_Data')->getExtensionByType($this->getType()); + + return $filename; } /** * Sets type of file * - * @param string $value db|media|view + * @param string $value + * @return Mage_Backup_Model_Backup */ public function setType($value='db') { - if(!in_array($value, array('db','media','view'))) { - $value = 'db'; + $possibleTypes = Mage::helper('Mage_Backup_Helper_Data')->getBackupTypesList(); + if(!in_array($value, $possibleTypes)) { + $value = Mage::helper('Mage_Backup_Helper_Data')->getDefaultBackupType(); } $this->_type = $value; @@ -117,7 +126,7 @@ public function setType($value='db') /** * Returns type of backup file * - * @return string db|media|view + * @return string */ public function getType() { @@ -205,6 +214,7 @@ public function &getFile() * Delete backup file * * @throws Mage_Backup_Exception + * @return Mage_Backup_Model_Backup */ public function deleteFile() { @@ -249,11 +259,12 @@ public function open($write = false) $mode = $write ? 'wb' . self::COMPRESS_RATE : 'rb'; - try { - $this->_handler = gzopen($filePath, $mode); - } - catch (Exception $e) { - Mage::exception('Mage_Backup', Mage::helper('Mage_Backup_Helper_Data')->__('Backup file "%s" cannot be read from or written to.', $this->getFileName())); + $this->_handler = @gzopen($filePath, $mode); + + if (!$this->_handler) { + throw new Mage_Backup_Exception_NotEnoughPermissions( + Mage::helper('Mage_Backup_Helper_Data')->__('Backup file "%s" cannot be read from or written to.', $this->getFileName()) + ); } return $this; @@ -351,4 +362,41 @@ public function getSize() return 0; } + + /** + * Validate user password + * + * @param string $password + * @return bool + */ + public function validateUserPassword($password) + { + $userPasswordHash = Mage::getModel('Mage_Admin_Model_Session')->getUser()->getPassword(); + return Mage::helper('Mage_Core_Helper_Data')->validateHash($password, $userPasswordHash); + } + + /** + * Load backup by it's type and creation timestamp + * + * @param int $timestamp + * @param string $type + * @return Mage_Backup_Model_Backup + */ + public function loadByTimeAndType($timestamp, $type) + { + $backupsCollection = Mage::getSingleton('Mage_Backup_Model_Fs_Collection'); + $backupId = $timestamp . '_' . $type; + + foreach ($backupsCollection as $backup) { + if ($backup->getId() == $backupId) { + $this->setType($backup->getType()) + ->setTime($backup->getTime()) + ->setName($backup->getName()) + ->setPath($backup->getPath()); + break; + } + } + + return $this; + } } diff --git a/app/code/core/Mage/Backup/Model/Config/Backend/Cron.php b/app/code/core/Mage/Backup/Model/Config/Backend/Cron.php new file mode 100644 index 0000000000000..023b3a2fcfb85 --- /dev/null +++ b/app/code/core/Mage/Backup/Model/Config/Backend/Cron.php @@ -0,0 +1,89 @@ + + */ +class Mage_Backup_Model_Config_Backend_Cron extends Mage_Core_Model_Config_Data +{ + const CRON_STRING_PATH = 'crontab/jobs/system_backup/schedule/cron_expr'; + const CRON_MODEL_PATH = 'crontab/jobs/system_backup/run/model'; + + const XML_PATH_BACKUP_ENABLED = 'groups/backup/fields/enabled/value'; + const XML_PATH_BACKUP_TIME = 'groups/backup/fields/time/value'; + const XML_PATH_BACKUP_FREQUENCY = 'groups/backup/fields/frequency/value'; + + /** + * Cron settings after save + * + * @return Mage_Adminhtml_Model_System_Config_Backend_Log_Cron + */ + protected function _afterSave() + { + $enabled = $this->getData(self::XML_PATH_BACKUP_ENABLED); + $time = $this->getData(self::XML_PATH_BACKUP_TIME); + $frequency = $this->getData(self::XML_PATH_BACKUP_FREQUENCY); + + $frequencyWeekly = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_WEEKLY; + $frequencyMonthly = Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency::CRON_MONTHLY; + + if ($enabled) { + $cronExprArray = array( + intval($time[1]), # Minute + intval($time[0]), # Hour + ($frequency == $frequencyMonthly) ? '1' : '*', # Day of the Month + '*', # Month of the Year + ($frequency == $frequencyWeekly) ? '1' : '*', # Day of the Week + ); + $cronExprString = join(' ', $cronExprArray); + } + else { + $cronExprString = ''; + } + + try { + Mage::getModel('Mage_Core_Model_Config_Data') + ->load(self::CRON_STRING_PATH, 'path') + ->setValue($cronExprString) + ->setPath(self::CRON_STRING_PATH) + ->save(); + + Mage::getModel('Mage_Core_Model_Config_Data') + ->load(self::CRON_MODEL_PATH, 'path') + ->setValue((string) Mage::getConfig()->getNode(self::CRON_MODEL_PATH)) + ->setPath(self::CRON_MODEL_PATH) + ->save(); + } + catch (Exception $e) { + Mage::throwException(Mage::helper('Mage_Backup_Helper_Data')->__('Unable to save the cron expression.')); + } + } +} diff --git a/app/code/core/Mage/Backup/Model/Config/Source/Type.php b/app/code/core/Mage/Backup/Model/Config/Source/Type.php new file mode 100644 index 0000000000000..abace0ebe8951 --- /dev/null +++ b/app/code/core/Mage/Backup/Model/Config/Source/Type.php @@ -0,0 +1,52 @@ + + */ +class Mage_Backup_Model_Config_Source_Type +{ + /** + * return possible options + * + * @return array + */ + public function toOptionArray() + { + $backupTypes = array(); + foreach(Mage::helper('Mage_Backup_Helper_Data')->getBackupTypes() as $type => $label) { + $backupTypes[] = array( + 'label' => $label, + 'value' => $type, + ); + } + return $backupTypes; + } +} diff --git a/app/code/core/Mage/Backup/Model/Db.php b/app/code/core/Mage/Backup/Model/Db.php index 772c24b2bc098..2126f41b9ce63 100644 --- a/app/code/core/Mage/Backup/Model/Db.php +++ b/app/code/core/Mage/Backup/Model/Db.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Backup - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -37,10 +37,10 @@ class Mage_Backup_Model_Db /** * Buffer length for multi rows - * default 512 Kb + * default 100 Kb * */ - const BUFFER_LENGTH = 524288; + const BUFFER_LENGTH = 102400; /** * Retrieve resource model diff --git a/app/code/core/Mage/Backup/Model/Fs/Collection.php b/app/code/core/Mage/Backup/Model/Fs/Collection.php index 70f4b2e9b9b57..d7850ae9f8711 100644 --- a/app/code/core/Mage/Backup/Model/Fs/Collection.php +++ b/app/code/core/Mage/Backup/Model/Fs/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Backup - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -58,10 +58,17 @@ public function __construct() } // set collection specific params + $extensions = Mage::helper('Mage_Backup_Helper_Data')->getExtensions(); + + foreach ($extensions as $key => $value) { + $extensions[] = '(' . preg_quote($value, '/') . ')'; + } + $extensions = implode('|', $extensions); + $this ->setOrder('time', self::SORT_ORDER_DESC) ->addTargetDir($this->_baseDir) - ->setFilesFilter('/^[a-z0-9\-\_]+\.' . preg_quote(Mage_Backup_Model_Backup::BACKUP_EXTENSION, '/') . '$/') + ->setFilesFilter('/^[a-z0-9\-\_]+\.' . $extensions . '$/') ->setCollectRecursively(false) ; } @@ -80,6 +87,7 @@ protected function _generateRow($filename) $row[$key] = $value; } $row['size'] = filesize($filename); + $row['id'] = $row['time'] . '_' . $row['type']; return $row; } } diff --git a/app/code/core/Mage/Backup/Model/Observer.php b/app/code/core/Mage/Backup/Model/Observer.php new file mode 100644 index 0000000000000..9cd91aa26258a --- /dev/null +++ b/app/code/core/Mage/Backup/Model/Observer.php @@ -0,0 +1,95 @@ + + */ +class Mage_Backup_Model_Observer +{ + const XML_PATH_BACKUP_ENABLED = 'system/backup/enabled'; + const XML_PATH_BACKUP_TYPE = 'system/backup/type'; + const XML_PATH_BACKUP_MAINTENANCE_MODE = 'system/backup/maintenance'; + + /** + * Error messages + * + * @var array + */ + protected $_errors = array(); + + /** + * Create Backup + * + * @return Mage_Log_Model_Cron + */ + public function scheduledBackup() + { + if (!Mage::getStoreConfigFlag(self::XML_PATH_BACKUP_ENABLED)) { + return $this; + } + + if (Mage::getStoreConfigFlag(self::XML_PATH_BACKUP_MAINTENANCE_MODE)) { + Mage::helper('Mage_Backup_Helper_Data')->turnOnMaintenanceMode(); + } + + $type = Mage::getStoreConfig(self::XML_PATH_BACKUP_TYPE); + + $this->_errors = array(); + try { + $backupManager = Mage_Backup::getBackupInstance($type) + ->setBackupExtension(Mage::helper('Mage_Backup_Helper_Data')->getExtensionByType($type)) + ->setTime(time()) + ->setBackupsDir(Mage::helper('Mage_Backup_Helper_Data')->getBackupsDir()); + + Mage::register('backup_manager', $backupManager); + + if ($type != Mage_Backup_Helper_Data::TYPE_DB) { + $backupManager->setRootDir(Mage::getBaseDir()) + ->addIgnorePaths(Mage::helper('Mage_Backup_Helper_Data')->getBackupIgnorePaths()); + } + + $backupManager->create(); + Mage::log(Mage::helper('Mage_Backup_Helper_Data')->getCreateSuccessMessageByType($type)); + } + catch (Exception $e) { + $this->_errors[] = $e->getMessage(); + $this->_errors[] = $e->getTrace(); + Mage::log($e->getMessage(), Zend_Log::ERR); + Mage::logException($e); + } + + if (Mage::getStoreConfigFlag(self::XML_PATH_BACKUP_MAINTENANCE_MODE)) { + Mage::helper('Mage_Backup_Helper_Data')->turnOffMaintenanceMode(); + } + + return $this; + } +} diff --git a/app/code/core/Mage/Backup/Model/Resource/Db.php b/app/code/core/Mage/Backup/Model/Resource/Db.php index 714cb16ba29b2..23beb2fb2e873 100755 --- a/app/code/core/Mage/Backup/Model/Resource/Db.php +++ b/app/code/core/Mage/Backup/Model/Resource/Db.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Backup - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -35,11 +35,11 @@ class Mage_Backup_Model_Resource_Db { /** - * Read connection + * Database connection adapter * * @var Varien_Db_Adapter_Pdo_Mysql */ - protected $_read; + protected $_write; /** * tables Foreign key data array @@ -55,7 +55,7 @@ class Mage_Backup_Model_Resource_Db */ public function __construct() { - $this->_read = Mage::getSingleton('Mage_Core_Model_Resource')->getConnection('backup_read'); + $this->_write = Mage::getSingleton('Mage_Core_Model_Resource')->getConnection('backup_write'); } /** @@ -74,7 +74,7 @@ public function clear() */ public function getTables() { - return $this->_read->listTables(); + return $this->_write->listTables(); } /** @@ -112,7 +112,10 @@ public function getTableForeignKeysSql($tableName = null) if (!$tableName) { $tables = $this->getTables(); foreach($tables as $table) { - $fkScript = $fkScript . Mage::getResourceHelper('Mage_Backup')->getTableForeignKeysSql($table); + $tableFkScript = Mage::getResourceHelper('Mage_Backup')->getTableForeignKeysSql($table); + if (!empty($tableFkScript)) { + $fkScript .= "\n" . $tableFkScript; + } } } else { $fkScript = $this->getTableForeignKeysSql($tableName); @@ -128,7 +131,7 @@ public function getTableForeignKeysSql($tableName = null) */ public function getTableStatus($tableName) { - $row = $this->_read->showTableStatus($tableName); + $row = $this->_write->showTableStatus($tableName); if ($row) { $statusObject = new Varien_Object(); @@ -137,8 +140,8 @@ public function getTableStatus($tableName) $statusObject->setData(strtolower($field), $value); } - $cntRow = $this->_read->fetchRow( - $this->_read->select()->from($tableName, 'COUNT(1) as rows')); + $cntRow = $this->_write->fetchRow( + $this->_write->select()->from($tableName, 'COUNT(1) as rows')); $statusObject->setRows($cntRow['rows']); return $statusObject; @@ -157,8 +160,7 @@ public function getTableStatus($tableName) */ public function getTableDataSql($tableName, $count = null, $offset = null) { - return Mage::getResourceHelper('Mage_Backup')->getInsertSql($tableName); - + return Mage::getResourceHelper('Mage_Backup')->getPartInsertSql($tableName, $count, $offset); } /** @@ -181,7 +183,7 @@ public function getTableCreateScript($tableName, $addDropIfExists = false) */ public function getTableHeader($tableName) { - $quotedTableName = $this->_read->quoteIdentifier($tableName); + $quotedTableName = $this->_write->quoteIdentifier($tableName); return "\n--\n" . "-- Table structure for table {$quotedTableName}\n" . "--\n\n"; @@ -249,7 +251,7 @@ public function getTableDataAfterSql($tableName) public function beginTransaction() { Mage::getResourceHelper('Mage_Backup')->turnOnSerializableMode(); - $this->_read->beginTransaction(); + $this->_write->beginTransaction(); return $this; } @@ -260,7 +262,7 @@ public function beginTransaction() */ public function commitTransaction() { - $this->_read->commit(); + $this->_write->commit(); Mage::getResourceHelper('Mage_Backup')->turnOnReadCommittedMode(); return $this; } @@ -272,7 +274,18 @@ public function commitTransaction() */ public function rollBackTransaction() { - $this->_read->rollBack(); + $this->_write->rollBack(); + return $this; + } + + /** + * Run sql code + * + * @param $command + * @return Mage_Backup_Model_Resource_Db + */ + public function runCommand($command){ + $this->_write->query($command); return $this; } } diff --git a/app/code/core/Mage/Backup/Model/Resource/Helper/Mysql4.php b/app/code/core/Mage/Backup/Model/Resource/Helper/Mysql4.php index b166957d27eef..26de1344678f6 100644 --- a/app/code/core/Mage/Backup/Model/Resource/Helper/Mysql4.php +++ b/app/code/core/Mage/Backup/Model/Resource/Helper/Mysql4.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Backup - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -54,19 +54,40 @@ public function getTableDropSql($tableName) */ public function getTableForeignKeysSql($tableName = null) { + $sql = false; + if ($tableName === null) { $sql = ''; foreach ($this->_foreignKeys as $table => $foreignKeys) { - $sql .= sprintf("ALTER TABLE %s\n %s;\n", - $this->_getReadAdapter()->quoteIdentifier($table), - join(",\n ", $foreignKeys) - ); + $sql .= $this->_buildForeignKeysAlterTableSql($table, $foreignKeys); } - return $sql; + } else if (isset($this->_foreignKeys[$tableName])) { + $foreignKeys = $this->_foreignKeys[$tableName]; + $sql = $this->_buildForeignKeysAlterTableSql($tableName, $foreignKeys); + } + + return $sql; + } + + /** + * Build sql that will add foreign keys to it + * + * @param string $tableName + * @param array $foreignKeys + * @return string + */ + protected function _buildForeignKeysAlterTableSql($tableName, $foreignKeys) + { + if (!is_array($foreignKeys) || empty($foreignKeys)) { + return ''; } - return false; + return sprintf("ALTER TABLE %s\n %s;\n", + $this->_getReadAdapter()->quoteIdentifier($tableName), + join(",\n ", $foreignKeys) + ); } + /** * Get create script for table * @@ -217,14 +238,17 @@ public function getTableDataAfterSql($tableName) * Return table part data SQL insert * * @param string $tableName + * @param int $count + * @param int $offset * @return string */ - public function getInsertSql($tableName) + public function getPartInsertSql($tableName, $count = null, $offset = null) { $sql = null; $adapter = $this->_getWriteAdapter(); $select = $adapter->select() - ->from($tableName); + ->from($tableName) + ->limit($count, $offset); $query = $adapter->query($select); while ($row = $query->fetch()) { @@ -243,7 +267,16 @@ public function getInsertSql($tableName) return $sql; } - + /** + * Return table data SQL insert + * + * @param string $tableName + * @return string + */ + public function getInsertSql($tableName) + { + return $this->getPartInsertSql($tableName); + } /** * Quote Table Row * diff --git a/app/code/core/Mage/Backup/etc/adminhtml.xml b/app/code/core/Mage/Backup/etc/adminhtml.xml index d598ee9a44abe..a8c2bccf7fadd 100644 --- a/app/code/core/Mage/Backup/etc/adminhtml.xml +++ b/app/code/core/Mage/Backup/etc/adminhtml.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Backup - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -50,6 +50,11 @@ Backups + + + Rollback + + diff --git a/app/code/core/Mage/Backup/etc/config.xml b/app/code/core/Mage/Backup/etc/config.xml index 5179bd3febb8f..c6d01a142ac99 100644 --- a/app/code/core/Mage/Backup/etc/config.xml +++ b/app/code/core/Mage/Backup/etc/config.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Backup - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -51,4 +51,13 @@ + + + + + Mage_Backup_Model_Observer::scheduledBackup + + + + diff --git a/app/code/core/Mage/Backup/etc/system.xml b/app/code/core/Mage/Backup/etc/system.xml new file mode 100644 index 0000000000000..f0e0a6f229bbf --- /dev/null +++ b/app/code/core/Mage/Backup/etc/system.xml @@ -0,0 +1,95 @@ + + + + + + + + + text + 500 + 1 + 0 + 0 + + + + select + Mage_Adminhtml_Model_System_Config_Source_Yesno + 10 + 1 + 0 + 0 + + + + select + 1 + Mage_Backup_Model_Config_Source_Type + 20 + 1 + 0 + 0 + + + + + select + 1 + Mage_Adminhtml_Model_System_Config_Source_Cron_Frequency + Mage_Backup_Model_Config_Backend_Cron + 40 + 1 + 0 + 0 + + + + Put store on the maintenance mode while backup's creation + select + 1 + Mage_Adminhtml_Model_System_Config_Source_Yesno + 50 + 1 + 0 + 0 + + + + + + + diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Bundle.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Bundle.php index 5e0c2c38cfbe5..69d12354dcbc9 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Bundle.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Bundle.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Checkbox.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Checkbox.php index fa8f95eefed4d..7df542e3d627e 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Checkbox.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Checkbox.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Multi.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Multi.php index 4ab148ca25ce0..4a056642300c5 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Multi.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Multi.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Radio.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Radio.php index 82799e3f0f7f3..5069b9aaeb88f 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Radio.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Radio.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Select.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Select.php index d156e96dd2a21..734c579532695 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Select.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Composite/Fieldset/Options/Type/Select.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php index decf8454d04b3..e7e1a75d950ef 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -122,6 +122,15 @@ function changeTaxClassId() { ); } + $groupPrice = $this->getForm()->getElement('group_price'); + if ($groupPrice) { + $groupPrice->setRenderer( + $this->getLayout()->createBlock('Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Price_Group') + ->setPriceColumnHeader(Mage::helper('Mage_Bundle_Helper_Data')->__('Percent Discount')) + ->setPriceValidation('validate-greater-than-zero validate-percents') + ); + } + $mapEnabled = $this->getForm()->getElement('msrp_enabled'); if ($mapEnabled && $this->getCanEditPrice() !== false) { $mapEnabled->setAfterElementHtml( diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php index 3d918822545f2..41911a42978e5 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Extend.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Special.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Special.php index 0a4963b01d7f2..751c51851d4dd 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Special.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Attributes/Special.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle.php index 35e382537545d..bce14c76e7aef 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php index 368ba3697116e..79672d7390e72 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search.php index 0af8b00caa3fb..a1b9e6bec9be8 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/Grid.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/Grid.php index c1f9b9e010d9f..65ccd040e74a6 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/Grid.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Search/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Selection.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Selection.php index 4cf4458c5de6d..e05be53435bc3 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Selection.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tab/Bundle/Option/Selection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tabs.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tabs.php index 80850647b400b..0fccbafca990e 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tabs.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Catalog/Product/Edit/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php index 4ce33d267614a..f8bb42b2a863b 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php b/app/code/core/Mage/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php index c21f8cef1c6de..2dffeffa0222c 100644 --- a/app/code/core/Mage/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php +++ b/app/code/core/Mage/Bundle/Block/Adminhtml/Sales/Order/View/Items/Renderer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Block/Catalog/Product/Price.php b/app/code/core/Mage/Bundle/Block/Catalog/Product/Price.php index 1b918f25061ed..d020577d76158 100644 --- a/app/code/core/Mage/Bundle/Block/Catalog/Product/Price.php +++ b/app/code/core/Mage/Bundle/Block/Catalog/Product/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Block/Catalog/Product/View.php b/app/code/core/Mage/Bundle/Block/Catalog/Product/View.php index c262ecbb084ee..dd7f7515f6f63 100644 --- a/app/code/core/Mage/Bundle/Block/Catalog/Product/View.php +++ b/app/code/core/Mage/Bundle/Block/Catalog/Product/View.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle.php b/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle.php index ef787faa8bb69..473d101084205 100644 --- a/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle.php +++ b/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -122,7 +122,8 @@ public function getJsonConfig() unset($tierPriceInfo); // break the reference with the last element $itemPrice = $bundlePriceModel->getSelectionFinalTotalPrice($currentProduct, $_selection, - $currentProduct->getQty(), $_selection->getQty(), false); + $currentProduct->getQty(), $_selection->getQty(), false, false + ); $canApplyMAP = false; diff --git a/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php b/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php index b9c930263572e..832fd99648a63 100644 --- a/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php +++ b/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -163,6 +163,11 @@ protected function _getSelectedQty() return $selectedQty; } + /** + * Get product model + * + * @return Mage_Catalog_Model_Product + */ public function getProduct() { if (!$this->hasData('product')) { diff --git a/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option/Checkbox.php b/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option/Checkbox.php index ddbc86de51541..384b2b9c6fa5d 100644 --- a/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option/Checkbox.php +++ b/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option/Checkbox.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option/Multi.php b/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option/Multi.php index 7976ee5b0452f..09773dc91d4d6 100644 --- a/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option/Multi.php +++ b/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option/Multi.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option/Radio.php b/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option/Radio.php index 4f6f50137de6c..dfd7bddd0e6a9 100644 --- a/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option/Radio.php +++ b/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option/Radio.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option/Select.php b/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option/Select.php index 5984c63128ade..745276925158a 100644 --- a/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option/Select.php +++ b/app/code/core/Mage/Bundle/Block/Catalog/Product/View/Type/Bundle/Option/Select.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Block/Checkout/Cart/Item/Renderer.php b/app/code/core/Mage/Bundle/Block/Checkout/Cart/Item/Renderer.php index 9b159ab6f32b2..58c7e4b88ec6d 100644 --- a/app/code/core/Mage/Bundle/Block/Checkout/Cart/Item/Renderer.php +++ b/app/code/core/Mage/Bundle/Block/Checkout/Cart/Item/Renderer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Block/Sales/Order/Items/Renderer.php b/app/code/core/Mage/Bundle/Block/Sales/Order/Items/Renderer.php index aa5ff499fb36c..5daaa15b3bc93 100644 --- a/app/code/core/Mage/Bundle/Block/Sales/Order/Items/Renderer.php +++ b/app/code/core/Mage/Bundle/Block/Sales/Order/Items/Renderer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Helper/Catalog/Product/Configuration.php b/app/code/core/Mage/Bundle/Helper/Catalog/Product/Configuration.php index 472b9f16b7860..d3a3fc9a2e6bf 100644 --- a/app/code/core/Mage/Bundle/Helper/Catalog/Product/Configuration.php +++ b/app/code/core/Mage/Bundle/Helper/Catalog/Product/Configuration.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -57,12 +57,17 @@ public function getSelectionQty($product, $selectionId) * @param Mage_Catalog_Model_Product $selectionProduct * @return decimal */ - public function getSelectionFinalPrice(Mage_Catalog_Model_Product_Configuration_Item_Interface $item, $selectionProduct) + public function getSelectionFinalPrice(Mage_Catalog_Model_Product_Configuration_Item_Interface $item, + $selectionProduct) { - return $item->getProduct()->getPriceModel()->getSelectionFinalPrice( - $item->getProduct(), $selectionProduct, + $selectionProduct->unsetData('final_price'); + return $item->getProduct()->getPriceModel()->getSelectionFinalTotalPrice( + $item->getProduct(), + $selectionProduct, $item->getQty() * 1, - $this->getSelectionQty($item->getProduct(), $selectionProduct->getSelectionId()) + $this->getSelectionQty($item->getProduct(), $selectionProduct->getSelectionId()), + false, + true ); } @@ -86,7 +91,7 @@ public function getBundleOptions(Mage_Catalog_Model_Product_Configuration_Item_I // get bundle options $optionsQuoteItemOption = $item->getOptionByCode('bundle_option_ids'); - $bundleOptionsIds = unserialize($optionsQuoteItemOption->getValue()); + $bundleOptionsIds = $optionsQuoteItemOption ? unserialize($optionsQuoteItemOption->getValue()) : array(); if ($bundleOptionsIds) { /** * @var Mage_Bundle_Model_Resource_Option_Collection @@ -115,7 +120,9 @@ public function getBundleOptions(Mage_Catalog_Model_Product_Configuration_Item_I $qty = $this->getSelectionQty($product, $bundleSelection->getSelectionId()) * 1; if ($qty) { $option['value'][] = $qty . ' x ' . $this->escapeHtml($bundleSelection->getName()) - . ' ' . Mage::helper('Mage_Core_Helper_Data')->currency($this->getSelectionFinalPrice($item, $bundleSelection)); + . ' ' . Mage::helper('Mage_Core_Helper_Data')->currency( + $this->getSelectionFinalPrice($item, $bundleSelection) + ); } } diff --git a/app/code/core/Mage/Bundle/Helper/Data.php b/app/code/core/Mage/Bundle/Helper/Data.php index 12a0524a30c3c..26325296fa24b 100644 --- a/app/code/core/Mage/Bundle/Helper/Data.php +++ b/app/code/core/Mage/Bundle/Helper/Data.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Model/Observer.php b/app/code/core/Mage/Bundle/Model/Observer.php index ca53ac7519792..06b83504c65db 100644 --- a/app/code/core/Mage/Bundle/Model/Observer.php +++ b/app/code/core/Mage/Bundle/Model/Observer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Model/Option.php b/app/code/core/Mage/Bundle/Model/Option.php index 827c754577d1f..6afae3b27c3a3 100644 --- a/app/code/core/Mage/Bundle/Model/Option.php +++ b/app/code/core/Mage/Bundle/Model/Option.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Model/Price/Index.php b/app/code/core/Mage/Bundle/Model/Price/Index.php index 60d4e741cabb2..24ad94b3051df 100644 --- a/app/code/core/Mage/Bundle/Model/Price/Index.php +++ b/app/code/core/Mage/Bundle/Model/Price/Index.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Model/Product/Attribute/Source/Price/View.php b/app/code/core/Mage/Bundle/Model/Product/Attribute/Source/Price/View.php index 86376232fc6af..6415d43e81ab8 100644 --- a/app/code/core/Mage/Bundle/Model/Product/Attribute/Source/Price/View.php +++ b/app/code/core/Mage/Bundle/Model/Product/Attribute/Source/Price/View.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Model/Product/Price.php b/app/code/core/Mage/Bundle/Model/Product/Price.php index 965cbe8037811..7854949d24bfd 100644 --- a/app/code/core/Mage/Bundle/Model/Product/Price.php +++ b/app/code/core/Mage/Bundle/Model/Product/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -68,6 +68,40 @@ public function getPrice($product) } } + /** + * Get Total price for Bundle items + * + * @param Mage_Catalog_Model_Product $product + * @param null|float $qty + * @return float + */ + public function getTotalBundleItemsPrice($product, $qty = null) + { + $price = 0.0; + if ($product->hasCustomOptions()) { + $customOption = $product->getCustomOption('bundle_selection_ids'); + if ($customOption) { + $selectionIds = unserialize($customOption->getValue()); + $selections = $product->getTypeInstance()->getSelectionsByIds($selectionIds, $product); + $selections->addTierPriceData(); + Mage::dispatchEvent('prepare_catalog_product_collection_prices', array( + 'collection' => $selections, + 'store_id' => $product->getStoreId(), + )); + foreach ($selections->getItems() as $selection) { + if ($selection->isSalable()) { + $selectionQty = $product->getCustomOption('selection_qty_' . $selection->getSelectionId()); + if ($selectionQty) { + $price += $this->getSelectionFinalTotalPrice($product, $selection, $qty, + $selectionQty->getValue()); + } + } + } + } + } + return $price; + } + /** * Get product final price * @@ -81,45 +115,15 @@ public function getFinalPrice($qty = null, $product) return $product->getCalculatedFinalPrice(); } - $finalPrice = $product->getPrice(); - - /** - * Just product with fixed price calculation has price - */ - if ($finalPrice) { - $tierPrice = $this->_applyTierPrice($product, $qty, $finalPrice); - $specialPrice = $this->_applySpecialPrice($product, $finalPrice); - $finalPrice = min(array($tierPrice, $specialPrice)); + $finalPrice = $this->getBasePrice($product, $qty); - $product->setFinalPrice($finalPrice); - Mage::dispatchEvent('catalog_product_get_final_price', array('product'=>$product)); - $finalPrice = $product->getData('final_price'); - } - $basePrice = $finalPrice; - - if ($product->hasCustomOptions()) { - $customOption = $product->getCustomOption('bundle_selection_ids'); - $selectionIds = unserialize($customOption->getValue()); - $selections = $product->getTypeInstance()->getSelectionsByIds($selectionIds, $product); - $selections->addTierPriceData(); - Mage::dispatchEvent('prepare_catalog_product_collection_prices', array( - 'collection' => $selections, - 'store_id' => $product->getStoreId(), - )); - foreach ($selections->getItems() as $selection) { - if ($selection->isSalable()) { - $selectionQty = $product->getCustomOption('selection_qty_' . $selection->getSelectionId()); - if ($selectionQty) { - $finalPrice += $this->getSelectionFinalTotalPrice($product, $selection, $qty, - $selectionQty->getValue()); - } - } - } - } - - $finalPrice = $finalPrice + $this->_applyOptionsPrice($product, $qty, $basePrice) - $basePrice; $product->setFinalPrice($finalPrice); + Mage::dispatchEvent('catalog_product_get_final_price', array('product' => $product, 'qty' => $qty)); + $finalPrice = $product->getData('final_price'); + $finalPrice += $this->getTotalBundleItemsPrice($product, $qty); + $finalPrice = $this->_applyOptionsPrice($product, $qty, $finalPrice); + $product->setFinalPrice($finalPrice); return max(0, $product->getData('final_price')); } @@ -138,7 +142,7 @@ public function getChildFinalPrice($product, $productQty, $childProduct, $childP } /** - * Retrieve Price with take into account tier price + * Retrieve Price considering tier price * * @param Mage_Catalog_Model_Product $product * @param string|null $which @@ -150,9 +154,9 @@ public function getTotalPrices($product, $which = null, $includeTax = null, $tak { // check calculated price index if ($product->getData('min_price') && $product->getData('max_price')) { - $minimalPrice = Mage::helper('Mage_Tax_Helper_Data')->getPrice($product, $product->getData('min_price'), $includeTax); - $maximalPrice = Mage::helper('Mage_Tax_Helper_Data')->getPrice($product, $product->getData('max_price'), $includeTax); - $this->_isPricesCalculatedByIndex = true; + $minimalPrice = Mage::helper('Mage_Tax_Helper_Data')->getPrice($product, $product->getData('min_price'), $includeTax); + $maximalPrice = Mage::helper('Mage_Tax_Helper_Data')->getPrice($product, $product->getData('max_price'), $includeTax); + $this->_isPricesCalculatedByIndex = true; } else { /** * Check if product price is fixed @@ -272,7 +276,7 @@ public function getTotalPrices($product, $which = null, $includeTax = null, $tak if ($which == 'max') { return $maximalPrice; - } else if ($which == 'min') { + } elseif ($which == 'min') { return $minimalPrice; } @@ -327,6 +331,9 @@ public function getOptions($product) /** * Calculate price of selection * + * @deprecated after 1.6.2.0 + * @see Mage_Bundle_Model_Product_Price::getSelectionFinalTotalPrice() + * * @param Mage_Catalog_Model_Product $bundleProduct * @param Mage_Catalog_Model_Product $selectionProduct * @param float|null $selectionQty @@ -335,27 +342,7 @@ public function getOptions($product) */ public function getSelectionPrice($bundleProduct, $selectionProduct, $selectionQty = null, $multiplyQty = true) { - if (is_null($selectionQty)) { - $selectionQty = $selectionProduct->getSelectionQty(); - } - - if ($bundleProduct->getPriceType() == self::PRICE_TYPE_DYNAMIC) { - if ($multiplyQty) { - return $selectionProduct->getFinalPrice($selectionQty) * $selectionQty; - } else { - return $selectionProduct->getFinalPrice($selectionQty); - } - } else { - if ($selectionProduct->getSelectionPriceType()) { // percent - $price = $bundleProduct->getPrice() * ($selectionProduct->getSelectionPriceValue() / 100); - } else { // fixed - $price = $selectionProduct->getSelectionPriceValue(); - } - if ($multiplyQty) { - $price *= $selectionQty; - } - return $price; - } + return $this->getSelectionFinalTotalPrice($bundleProduct, $selectionProduct, 0, $selectionQty, $multiplyQty); } /** @@ -368,10 +355,7 @@ public function getSelectionPrice($bundleProduct, $selectionProduct, $selectionQ */ public function getSelectionPreFinalPrice($bundleProduct, $selectionProduct, $qty = null) { - return $this->_applySpecialPrice( - $bundleProduct, - $this->getSelectionPrice($bundleProduct, $selectionProduct, $qty) - ); + return $this->getSelectionPrice($bundleProduct, $selectionProduct, $qty); } /** @@ -389,18 +373,85 @@ public function getSelectionPreFinalPrice($bundleProduct, $selectionProduct, $qt public function getSelectionFinalTotalPrice($bundleProduct, $selectionProduct, $bundleQty, $selectionQty, $multiplyQty = true, $takeTierPrice = true) { - $selectionPrice = $this->getSelectionPrice($bundleProduct, $selectionProduct, $selectionQty, $multiplyQty); - - // apply bundle special price - $specialPrice = $this->_applySpecialPrice($bundleProduct, $selectionPrice); + if (is_null($selectionQty)) { + $selectionQty = $selectionProduct->getSelectionQty(); + } - if ($takeTierPrice) { - // apply bundle tier price - $tierPrice = $this->_applyTierPrice($bundleProduct, $bundleQty, $selectionPrice); - return min(array($tierPrice, $specialPrice)); + if ($bundleProduct->getPriceType() == self::PRICE_TYPE_DYNAMIC) { + $price = $selectionProduct->getFinalPrice($takeTierPrice ? $selectionQty : 1); } else { - return $specialPrice; + if ($selectionProduct->getSelectionPriceType()) { // percent + $price = $this->getPrice($bundleProduct) * ($selectionProduct->getSelectionPriceValue() / 100); + } else { // fixed + $price = $selectionProduct->getSelectionPriceValue(); + } + } + + if ($multiplyQty) { + $price *= $selectionQty; + } + + return min($price, + $this->_applyGroupPrice($bundleProduct, $price), + $this->_applyTierPrice($bundleProduct, $bundleQty, $price), + $this->_applySpecialPrice($bundleProduct, $price) + ); + } + + /** + * Apply group price for bundle product + * + * @param Mage_Catalog_Model_Product $product + * @param float $finalPrice + * @return float + */ + protected function _applyGroupPrice($product, $finalPrice) + { + $result = $finalPrice; + $groupPrice = $product->getGroupPrice(); + + if (is_numeric($groupPrice)) { + $groupPrice = $finalPrice - ($finalPrice * ($groupPrice / 100)); + $result = min($finalPrice, $groupPrice); } + + return $result; + } + + /** + * Get product group price + * + * @param Mage_Catalog_Model_Product $product + * @return float|null + */ + public function getGroupPrice($product) + { + $groupPrices = $product->getData('group_price'); + + if (is_null($groupPrices)) { + $attribute = $product->getResource()->getAttribute('group_price'); + if ($attribute) { + $attribute->getBackend()->afterLoad($product); + $groupPrices = $product->getData('group_price'); + } + } + + if (is_null($groupPrices) || !is_array($groupPrices)) { + return null; + } + + $customerGroup = $this->_getCustomerGroupId($product); + + $matchedPrice = 0; + + foreach ($groupPrices as $groupPrice) { + if ($groupPrice['cust_group'] == $customerGroup && $groupPrice['website_price'] > $matchedPrice) { + $matchedPrice = $groupPrice['website_price']; + break; + } + } + + return $matchedPrice; } /** @@ -536,11 +587,11 @@ public static function calculateSpecialPrice($finalPrice, $specialPrice, $specia } /** - * Check is tier price value fixed or percent of original price + * Check is group price value fixed or percent of original price * * @return bool */ - public function isTierPriceFixed() + public function isGroupPriceFixed() { return false; } diff --git a/app/code/core/Mage/Bundle/Model/Product/Type.php b/app/code/core/Mage/Bundle/Model/Product/Type.php index e6d6a90421a62..0983cb1330beb 100644 --- a/app/code/core/Mage/Bundle/Model/Product/Type.php +++ b/app/code/core/Mage/Bundle/Model/Product/Type.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -654,7 +654,7 @@ protected function _prepareProduct(Varien_Object $buyRequest, $product, $process * Create extra attributes that will be converted to product options in order item * for selection (not for all bundle) */ - $price = $product->getPriceModel()->getSelectionPrice($product, $selection, $qty); + $price = $product->getPriceModel()->getSelectionFinalTotalPrice($product, $selection, 0, $qty); $attributes = array( 'price' => Mage::app()->getStore()->convertPrice($price), 'qty' => $qty, @@ -792,9 +792,7 @@ public function getOrderOptions($product) if ($selection->isSalable()) { $selectionQty = $product->getCustomOption('selection_qty_' . $selection->getSelectionId()); if ($selectionQty) { - $price = $product->getPriceModel()->getSelectionPrice( - $product, - $selection, + $price = $product->getPriceModel()->getSelectionFinalTotalPrice($product, $selection, 0, $selectionQty->getValue() ); diff --git a/app/code/core/Mage/Bundle/Model/Resource/Bundle.php b/app/code/core/Mage/Bundle/Model/Resource/Bundle.php index dcd8b7b488119..e8fdf82a86a02 100755 --- a/app/code/core/Mage/Bundle/Model/Resource/Bundle.php +++ b/app/code/core/Mage/Bundle/Model/Resource/Bundle.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Model/Resource/Indexer/Price.php b/app/code/core/Mage/Bundle/Model/Resource/Indexer/Price.php index 9eb0f073c11ce..5080bbbe6940e 100755 --- a/app/code/core/Mage/Bundle/Model/Resource/Indexer/Price.php +++ b/app/code/core/Mage/Bundle/Model/Resource/Indexer/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -170,7 +170,13 @@ protected function _prepareBundlePriceByType($priceType, $entityIds = null) ->joinLeft( array('tp' => $this->_getTierPriceIndexTable()), 'tp.entity_id = e.entity_id AND tp.website_id = cw.website_id' - . ' AND tp.customer_group_id = cg.customer_group_id', + . ' AND tp.customer_group_id = cg.customer_group_id', + array() + ) + ->joinLeft( + array('gp' => $this->_getGroupPriceIndexTable()), + 'gp.entity_id = e.entity_id AND gp.website_id = cw.website_id' + . ' AND gp.customer_group_id = cg.customer_group_id', array() ) ->where('e.type_id=?', $this->getTypeId()); @@ -201,7 +207,6 @@ protected function _prepareBundlePriceByType($priceType, $entityIds = null) $specialTo = $this->_addAttributeToSelect($select, 'special_to_date', 'e.entity_id', 'cs.store_id'); $curentDate = new Zend_Db_Expr('cwd.website_date'); - $specialExpr = $write->getCheckSql( $write->getCheckSql( $specialFrom . ' IS NULL', @@ -225,6 +230,13 @@ protected function _prepareBundlePriceByType($priceType, $entityIds = null) $specialPrice, '0' ); + + $groupPriceExpr = $write->getCheckSql( + 'gp.price IS NOT NULL AND gp.price > 0 AND gp.price < 100', + 'gp.price', + '0' + ); + $tierExpr = new Zend_Db_Expr("tp.min_price"); if ($priceType == Mage_Bundle_Model_Product_Price::PRICE_TYPE_FIXED) { @@ -235,24 +247,38 @@ protected function _prepareBundlePriceByType($priceType, $entityIds = null) ); $tierPrice = $write->getCheckSql( $tierExpr . ' IS NOT NULL', - 'ROUND(' . $price .' - ' . '(' . $price . ' * (' . $tierExpr . ' / 100)), 4)', + 'ROUND(' . $price . ' - ' . '(' . $price . ' * (' . $tierExpr . ' / 100)), 4)', 'NULL' ); + $groupPrice = $write->getCheckSql( + $groupPriceExpr . ' > 0', + 'ROUND(' . $price . ' - ' . '(' . $price . ' * (' . $groupPriceExpr . ' / 100)), 4)', + 'NULL' + ); + $finalPrice = $write->getCheckSql( + "{$groupPrice} IS NOT NULL AND {$groupPrice} < {$finalPrice}", + $groupPrice, + $finalPrice + ); } else { $finalPrice = new Zend_Db_Expr("0"); $tierPrice = $write->getCheckSql($tierExpr . ' IS NOT NULL', '0', 'NULL'); + $groupPrice = $write->getCheckSql($groupPriceExpr . ' > 0', $groupPriceExpr, 'NULL'); } $select->columns(array( - 'price_type' => new Zend_Db_Expr($priceType), - 'special_price' => $specialExpr, - 'tier_percent' => $tierExpr, - 'orig_price' => $write->getCheckSql($price . ' IS NULL', '0', $price), - 'price' => $finalPrice, - 'min_price' => $finalPrice, - 'max_price' => $finalPrice, - 'tier_price' => $tierPrice, - 'base_tier' => $tierPrice, + 'price_type' => new Zend_Db_Expr($priceType), + 'special_price' => $specialExpr, + 'tier_percent' => $tierExpr, + 'orig_price' => $write->getCheckSql($price . ' IS NULL', '0', $price), + 'price' => $finalPrice, + 'min_price' => $finalPrice, + 'max_price' => $finalPrice, + 'tier_price' => $tierPrice, + 'base_tier' => $tierPrice, + 'group_price' => $groupPrice, + 'base_group_price' => $groupPrice, + 'group_price_percent' => new Zend_Db_Expr('gp.price'), )); if (!is_null($entityIds)) { @@ -302,6 +328,8 @@ protected function _calculateBundleOptionPrice() 'max_price' => $write->getCheckSql('i.group_type = 1', 'SUM(i.price)', 'MAX(i.price)'), 'tier_price' => $write->getCheckSql('i.is_required = 1', 'MIN(i.tier_price)', '0'), 'alt_tier_price' => $write->getCheckSql('i.is_required = 0', 'MIN(i.tier_price)', '0'), + 'group_price' => $write->getCheckSql('i.is_required = 1', 'MIN(i.group_price)', '0'), + 'alt_group_price' => $write->getCheckSql('i.is_required = 0', 'MIN(i.group_price)', '0'), )); $query = $select->insertFromSelect($this->_getBundleOptionTable()); @@ -324,6 +352,15 @@ protected function _calculateBundleOptionPrice() ) . ' + MIN(i.tier_price)', 'NULL' ); + $groupPrice = $write->getCheckSql( + 'MIN(i.group_price_percent) IS NOT NULL', + $write->getCheckSql( + 'SUM(io.group_price) = 0', + 'SUM(io.alt_group_price)', + 'SUM(io.group_price)' + ) . ' + MIN(i.group_price)', + 'NULL' + ); $select = $write->select() ->from( @@ -339,12 +376,14 @@ protected function _calculateBundleOptionPrice() ->group(array('io.entity_id', 'io.customer_group_id', 'io.website_id', 'i.tax_class_id', 'i.orig_price', 'i.price')) ->columns(array('i.tax_class_id', - 'orig_price' => 'i.orig_price', - 'price' => 'i.price', - 'min_price' => $minPrice, - 'max_price' => $maxPrice, - 'tier_price' => $tierPrice, - 'base_tier' => 'MIN(i.base_tier)' + 'orig_price' => 'i.orig_price', + 'price' => 'i.price', + 'min_price' => $minPrice, + 'max_price' => $maxPrice, + 'tier_price' => $tierPrice, + 'base_tier' => 'MIN(i.base_tier)', + 'group_price' => $groupPrice, + 'base_group_price' => 'MIN(i.base_group_price)', )); $query = $select->insertFromSelect($this->_getDefaultFinalPriceTable()); @@ -387,7 +426,6 @@ protected function _calculateBundleSelectionPrice($priceType) ) . '* bs.selection_qty' ); - $tierExpr = $write->getCheckSql( 'i.base_tier IS NOT NULL', $write->getCheckSql( @@ -402,6 +440,24 @@ protected function _calculateBundleSelectionPrice($priceType) ) . ' * bs.selection_qty', 'NULL' ); + + $groupExpr = $write->getCheckSql( + 'i.base_group_price IS NOT NULL', + $write->getCheckSql( + $selectionPriceType .' = 1', + $priceExpr, + $write->getCheckSql( + 'i.group_price_percent > 0', + 'ROUND(' . $selectionPriceValue + . ' - (' . $selectionPriceValue . ' * (i.group_price_percent / 100)),4)', + $selectionPriceValue + ) + ) . ' * bs.selection_qty', + 'NULL' + ); + $priceExpr = new Zend_Db_Expr( + $write->getCheckSql("{$groupExpr} < {$priceExpr}", $groupExpr, $priceExpr) + ); } else { $priceExpr = new Zend_Db_Expr( $write->getCheckSql( @@ -415,7 +471,21 @@ protected function _calculateBundleSelectionPrice($priceType) 'ROUND(idx.min_price * (i.base_tier / 100), 4)* bs.selection_qty', 'NULL' ); - + $groupExpr = $write->getCheckSql( + 'i.base_group_price IS NOT NULL', + 'ROUND(idx.min_price * (i.base_group_price / 100), 4)* bs.selection_qty', + 'NULL' + ); + $groupPriceExpr = new Zend_Db_Expr( + $write->getCheckSql( + 'i.base_group_price IS NOT NULL AND i.base_group_price > 0 AND i.base_group_price < 100', + 'ROUND(idx.min_price - idx.min_price * (i.base_group_price / 100), 4)', + 'idx.min_price' + ) . ' * bs.selection_qty' + ); + $priceExpr = new Zend_Db_Expr( + $write->getCheckSql("{$groupPriceExpr} < {$priceExpr}", $groupPriceExpr, $priceExpr) + ); } $select = $write->select() @@ -459,6 +529,7 @@ protected function _calculateBundleSelectionPrice($priceType) 'is_required' => 'bo.required', 'price' => $priceExpr, 'tier_price' => $tierExpr, + 'group_price' => $groupExpr, )); $query = $select->insertFromSelect($this->_getBundleSelectionTable()); @@ -476,6 +547,7 @@ protected function _calculateBundleSelectionPrice($priceType) protected function _prepareBundlePrice($entityIds = null) { $this->_prepareTierPriceIndex($entityIds); + $this->_prepareGroupPriceIndex($entityIds); $this->_prepareBundlePriceTable(); $this->_prepareBundlePriceByType(Mage_Bundle_Model_Product_Price::PRICE_TYPE_FIXED, $entityIds); $this->_prepareBundlePriceByType(Mage_Bundle_Model_Product_Price::PRICE_TYPE_DYNAMIC, $entityIds); @@ -564,4 +636,63 @@ protected function _prepareTierPriceIndex($entityIds = null) return $this; } + + /** + * Prepare percentage group price for bundle products + * + * @see Mage_Catalog_Model_Resource_Product_Indexer_Price::_prepareGroupPriceIndex + * + * @param int|array $entityIds + * @return Mage_Bundle_Model_Resource_Indexer_Price + */ + protected function _prepareGroupPriceIndex($entityIds = null) + { + $adapter = $this->_getWriteAdapter(); + + // remove index by bundle products + $select = $adapter->select() + ->from(array('i' => $this->_getGroupPriceIndexTable()), null) + ->join( + array('e' => $this->getTable('catalog_product_entity')), + 'i.entity_id=e.entity_id', + array() + ) + ->where('e.type_id=?', $this->getTypeId()); + $query = $select->deleteFromSelect('i'); + $adapter->query($query); + + $select = $adapter->select() + ->from( + array('gp' => $this->getTable('catalog_product_entity_group_price')), + array('entity_id') + ) + ->join( + array('e' => $this->getTable('catalog_product_entity')), + 'gp.entity_id=e.entity_id', + array() + ) + ->join( + array('cg' => $this->getTable('customer_group')), + 'gp.all_groups = 1 OR (gp.all_groups = 0 AND gp.customer_group_id = cg.customer_group_id)', + array('customer_group_id') + ) + ->join( + array('cw' => $this->getTable('core_website')), + 'gp.website_id = 0 OR gp.website_id = cw.website_id', + array('website_id') + ) + ->where('cw.website_id != 0') + ->where('e.type_id=?', $this->getTypeId()) + ->columns(new Zend_Db_Expr('MIN(gp.value)')) + ->group(array('gp.entity_id', 'cg.customer_group_id', 'cw.website_id')); + + if (!empty($entityIds)) { + $select->where('gp.entity_id IN(?)', $entityIds); + } + + $query = $select->insertFromSelect($this->_getGroupPriceIndexTable()); + $adapter->query($query); + + return $this; + } } diff --git a/app/code/core/Mage/Bundle/Model/Resource/Indexer/Stock.php b/app/code/core/Mage/Bundle/Model/Resource/Indexer/Stock.php index 4d6765345b6c6..9194d063ee49b 100755 --- a/app/code/core/Mage/Bundle/Model/Resource/Indexer/Stock.php +++ b/app/code/core/Mage/Bundle/Model/Resource/Indexer/Stock.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Model/Resource/Option.php b/app/code/core/Mage/Bundle/Model/Resource/Option.php index 8714a94eebb43..b5a2f56ff251c 100755 --- a/app/code/core/Mage/Bundle/Model/Resource/Option.php +++ b/app/code/core/Mage/Bundle/Model/Resource/Option.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Model/Resource/Option/Collection.php b/app/code/core/Mage/Bundle/Model/Resource/Option/Collection.php index 56fcc2c8a312b..df6e62487f09a 100755 --- a/app/code/core/Mage/Bundle/Model/Resource/Option/Collection.php +++ b/app/code/core/Mage/Bundle/Model/Resource/Option/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Model/Resource/Price/Index.php b/app/code/core/Mage/Bundle/Model/Resource/Price/Index.php index 4a71987b70c77..722d2646b50c0 100755 --- a/app/code/core/Mage/Bundle/Model/Resource/Price/Index.php +++ b/app/code/core/Mage/Bundle/Model/Resource/Price/Index.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Model/Resource/Selection.php b/app/code/core/Mage/Bundle/Model/Resource/Selection.php index 0ac65aa1c9c1e..accc1c816a72d 100755 --- a/app/code/core/Mage/Bundle/Model/Resource/Selection.php +++ b/app/code/core/Mage/Bundle/Model/Resource/Selection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Model/Resource/Selection/Collection.php b/app/code/core/Mage/Bundle/Model/Resource/Selection/Collection.php index 243c69505d921..7c578e51d84b0 100755 --- a/app/code/core/Mage/Bundle/Model/Resource/Selection/Collection.php +++ b/app/code/core/Mage/Bundle/Model/Resource/Selection/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Abstract.php b/app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Abstract.php index e4fc0834dd0dc..a2810309cdae9 100644 --- a/app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Abstract.php +++ b/app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php b/app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php index 977b0f7e93426..d94f213333bc6 100644 --- a/app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php +++ b/app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Creditmemo.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php b/app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php index 9f9feb15a9442..eda3fffc320d2 100644 --- a/app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php +++ b/app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Invoice.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php b/app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php index 9ce08855dc611..561937eda5534 100644 --- a/app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php +++ b/app/code/core/Mage/Bundle/Model/Sales/Order/Pdf/Items/Shipment.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Model/Selection.php b/app/code/core/Mage/Bundle/Model/Selection.php index 7af28c5c50c5f..0285375b1c054 100644 --- a/app/code/core/Mage/Bundle/Model/Selection.php +++ b/app/code/core/Mage/Bundle/Model/Selection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Model/Source/Option/Selection/Price/Type.php b/app/code/core/Mage/Bundle/Model/Source/Option/Selection/Price/Type.php index 84547a057b33b..e3ebf898ac803 100644 --- a/app/code/core/Mage/Bundle/Model/Source/Option/Selection/Price/Type.php +++ b/app/code/core/Mage/Bundle/Model/Source/Option/Selection/Price/Type.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/Model/Source/Option/Type.php b/app/code/core/Mage/Bundle/Model/Source/Option/Type.php index b283eda0a2ae6..c4cb9d6047483 100644 --- a/app/code/core/Mage/Bundle/Model/Source/Option/Type.php +++ b/app/code/core/Mage/Bundle/Model/Source/Option/Type.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/controllers/Adminhtml/Bundle/Product/EditController.php b/app/code/core/Mage/Bundle/controllers/Adminhtml/Bundle/Product/EditController.php index 48e25938e187b..69019a202d5f4 100644 --- a/app/code/core/Mage/Bundle/controllers/Adminhtml/Bundle/Product/EditController.php +++ b/app/code/core/Mage/Bundle/controllers/Adminhtml/Bundle/Product/EditController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/controllers/Adminhtml/Bundle/SelectionController.php b/app/code/core/Mage/Bundle/controllers/Adminhtml/Bundle/SelectionController.php index cf59d4f149d77..50f6baf203910 100644 --- a/app/code/core/Mage/Bundle/controllers/Adminhtml/Bundle/SelectionController.php +++ b/app/code/core/Mage/Bundle/controllers/Adminhtml/Bundle/SelectionController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/data/bundle_setup/data-install-1.6.0.0.php b/app/code/core/Mage/Bundle/data/bundle_setup/data-install-1.6.0.0.php index f11710d34b688..be8f0baefc0a6 100644 --- a/app/code/core/Mage/Bundle/data/bundle_setup/data-install-1.6.0.0.php +++ b/app/code/core/Mage/Bundle/data/bundle_setup/data-install-1.6.0.0.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/etc/config.xml b/app/code/core/Mage/Bundle/etc/config.xml index 4bb20ee96276f..af9c2188587d4 100644 --- a/app/code/core/Mage/Bundle/etc/config.xml +++ b/app/code/core/Mage/Bundle/etc/config.xml @@ -21,14 +21,14 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - 1.6.0.0 + 1.6.0.0.1 diff --git a/app/code/core/Mage/Bundle/etc/fieldset.xml b/app/code/core/Mage/Bundle/etc/fieldset.xml index e97bd79595ac6..6e7b334120dad 100644 --- a/app/code/core/Mage/Bundle/etc/fieldset.xml +++ b/app/code/core/Mage/Bundle/etc/fieldset.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Bundle/sql/bundle_setup/install-1.6.0.0.php b/app/code/core/Mage/Bundle/sql/bundle_setup/install-1.6.0.0.php index 30f535f2c9d2d..759c47cdfe29e 100644 --- a/app/code/core/Mage/Bundle/sql/bundle_setup/install-1.6.0.0.php +++ b/app/code/core/Mage/Bundle/sql/bundle_setup/install-1.6.0.0.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Bundle - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-1.6.0.0-1.6.0.0.1.php b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-1.6.0.0-1.6.0.0.1.php new file mode 100644 index 0000000000000..43e2bf4553538 --- /dev/null +++ b/app/code/core/Mage/Bundle/sql/bundle_setup/mysql4-upgrade-1.6.0.0-1.6.0.0.1.php @@ -0,0 +1,44 @@ +getConnection(); +$memoryTables = array( + 'catalog_product_index_price_bundle_opt_tmp', + 'catalog_product_index_price_bundle_sel_tmp', + 'catalog_product_index_price_bundle_tmp', +); + +foreach ($memoryTables as $table) { + $connection->changeTableEngine($installer->getTable($table), Varien_Db_Adapter_Pdo_Mysql::ENGINE_MEMORY); +} diff --git a/app/code/core/Mage/Bundle/sql/bundle_setup/upgrade-1.6.0.0-1.6.0.0.1.php b/app/code/core/Mage/Bundle/sql/bundle_setup/upgrade-1.6.0.0-1.6.0.0.1.php new file mode 100644 index 0000000000000..214d8d9194238 --- /dev/null +++ b/app/code/core/Mage/Bundle/sql/bundle_setup/upgrade-1.6.0.0-1.6.0.0.1.php @@ -0,0 +1,84 @@ +getConnection(); + +$priceIndexerTables = array( + 'catalog_product_index_price_bundle_idx', + 'catalog_product_index_price_bundle_tmp', +); + +$optionsPriceIndexerTables = array( + 'catalog_product_index_price_bundle_opt_idx', + 'catalog_product_index_price_bundle_opt_tmp', +); + +$selectionPriceIndexerTables = array( + 'catalog_product_index_price_bundle_sel_idx', + 'catalog_product_index_price_bundle_sel_tmp', +); + +foreach ($priceIndexerTables as $table) { + $connection->addColumn($installer->getTable($table), 'group_price', array( + 'type' => Varien_Db_Ddl_Table::TYPE_DECIMAL, + 'length' => '12,4', + 'comment' => 'Group price', + )); + $connection->addColumn($installer->getTable($table), 'base_group_price', array( + 'type' => Varien_Db_Ddl_Table::TYPE_DECIMAL, + 'length' => '12,4', + 'comment' => 'Base Group Price', + )); + $connection->addColumn($installer->getTable($table), 'group_price_percent', array( + 'type' => Varien_Db_Ddl_Table::TYPE_DECIMAL, + 'length' => '12,4', + 'comment' => 'Group Price Percent', + )); +} + +foreach (array_merge($optionsPriceIndexerTables, $selectionPriceIndexerTables) as $table) { + $connection->addColumn($installer->getTable($table), 'group_price', array( + 'type' => Varien_Db_Ddl_Table::TYPE_DECIMAL, + 'length' => '12,4', + 'comment' => 'Group price', + )); +} + +foreach ($optionsPriceIndexerTables as $table) { + $connection->addColumn($installer->getTable($table), 'alt_group_price', array( + 'type' => Varien_Db_Ddl_Table::TYPE_DECIMAL, + 'length' => '12,4', + 'comment' => 'Alt Group Price', + )); +} + +$applyTo = explode(',', $installer->getAttribute(Mage_Catalog_Model_Product::ENTITY, 'group_price', 'apply_to')); +if (!in_array('bundle', $applyTo)) { + $applyTo[] = 'bundle'; + $installer->updateAttribute(Mage_Catalog_Model_Product::ENTITY, 'group_price', 'apply_to', implode(',', $applyTo)); +} diff --git a/app/code/core/Mage/Bundle/view/adminhtml/layout.xml b/app/code/core/Mage/Bundle/view/adminhtml/layout.xml index 217e6b9ee7cc9..04088e94f24f7 100644 --- a/app/code/core/Mage/Bundle/view/adminhtml/layout.xml +++ b/app/code/core/Mage/Bundle/view/adminhtml/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Bundle/view/adminhtml/product/composite/fieldset/options/bundle.phtml b/app/code/core/Mage/Bundle/view/adminhtml/product/composite/fieldset/options/bundle.phtml index 7ec25c4ec74f5..812eaee17ca6f 100644 --- a/app/code/core/Mage/Bundle/view/adminhtml/product/composite/fieldset/options/bundle.phtml +++ b/app/code/core/Mage/Bundle/view/adminhtml/product/composite/fieldset/options/bundle.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Bundle/view/adminhtml/product/composite/fieldset/options/type/checkbox.phtml b/app/code/core/Mage/Bundle/view/adminhtml/product/composite/fieldset/options/type/checkbox.phtml index ee9fe0f65e2cb..5e99121107a7b 100644 --- a/app/code/core/Mage/Bundle/view/adminhtml/product/composite/fieldset/options/type/checkbox.phtml +++ b/app/code/core/Mage/Bundle/view/adminhtml/product/composite/fieldset/options/type/checkbox.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Bundle/view/adminhtml/product/composite/fieldset/options/type/multi.phtml b/app/code/core/Mage/Bundle/view/adminhtml/product/composite/fieldset/options/type/multi.phtml index 4d9420abf44a7..fb6fc84c93251 100644 --- a/app/code/core/Mage/Bundle/view/adminhtml/product/composite/fieldset/options/type/multi.phtml +++ b/app/code/core/Mage/Bundle/view/adminhtml/product/composite/fieldset/options/type/multi.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Bundle/view/adminhtml/product/composite/fieldset/options/type/radio.phtml b/app/code/core/Mage/Bundle/view/adminhtml/product/composite/fieldset/options/type/radio.phtml index 4ca4f23e7abf4..2675e600acd9f 100644 --- a/app/code/core/Mage/Bundle/view/adminhtml/product/composite/fieldset/options/type/radio.phtml +++ b/app/code/core/Mage/Bundle/view/adminhtml/product/composite/fieldset/options/type/radio.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Bundle/view/adminhtml/product/composite/fieldset/options/type/select.phtml b/app/code/core/Mage/Bundle/view/adminhtml/product/composite/fieldset/options/type/select.phtml index abde139db0d48..31526f0428680 100644 --- a/app/code/core/Mage/Bundle/view/adminhtml/product/composite/fieldset/options/type/select.phtml +++ b/app/code/core/Mage/Bundle/view/adminhtml/product/composite/fieldset/options/type/select.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Bundle/view/adminhtml/product/edit/bundle.phtml b/app/code/core/Mage/Bundle/view/adminhtml/product/edit/bundle.phtml index 0edb2a0043f70..9fbde6677e2a9 100644 --- a/app/code/core/Mage/Bundle/view/adminhtml/product/edit/bundle.phtml +++ b/app/code/core/Mage/Bundle/view/adminhtml/product/edit/bundle.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Bundle/view/adminhtml/product/edit/bundle/option.phtml b/app/code/core/Mage/Bundle/view/adminhtml/product/edit/bundle/option.phtml index 7f681f66a7064..0eddff17e2f2b 100644 --- a/app/code/core/Mage/Bundle/view/adminhtml/product/edit/bundle/option.phtml +++ b/app/code/core/Mage/Bundle/view/adminhtml/product/edit/bundle/option.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Bundle/view/adminhtml/product/edit/bundle/option/search.phtml b/app/code/core/Mage/Bundle/view/adminhtml/product/edit/bundle/option/search.phtml index 7a2fe9ba4f743..3649d47e9ffa5 100644 --- a/app/code/core/Mage/Bundle/view/adminhtml/product/edit/bundle/option/search.phtml +++ b/app/code/core/Mage/Bundle/view/adminhtml/product/edit/bundle/option/search.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Bundle/view/adminhtml/product/edit/bundle/option/selection.phtml b/app/code/core/Mage/Bundle/view/adminhtml/product/edit/bundle/option/selection.phtml index 19e9b608a6de9..4db875553beb0 100644 --- a/app/code/core/Mage/Bundle/view/adminhtml/product/edit/bundle/option/selection.phtml +++ b/app/code/core/Mage/Bundle/view/adminhtml/product/edit/bundle/option/selection.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Bundle/view/adminhtml/sales/creditmemo/create/items/renderer.phtml b/app/code/core/Mage/Bundle/view/adminhtml/sales/creditmemo/create/items/renderer.phtml index 9fa999f9429d9..f67f5a9446e81 100644 --- a/app/code/core/Mage/Bundle/view/adminhtml/sales/creditmemo/create/items/renderer.phtml +++ b/app/code/core/Mage/Bundle/view/adminhtml/sales/creditmemo/create/items/renderer.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Bundle/view/adminhtml/sales/creditmemo/view/items/renderer.phtml b/app/code/core/Mage/Bundle/view/adminhtml/sales/creditmemo/view/items/renderer.phtml index 43fee1b0a78d1..cb0501c3c0022 100644 --- a/app/code/core/Mage/Bundle/view/adminhtml/sales/creditmemo/view/items/renderer.phtml +++ b/app/code/core/Mage/Bundle/view/adminhtml/sales/creditmemo/view/items/renderer.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Bundle/view/adminhtml/sales/invoice/create/items/renderer.phtml b/app/code/core/Mage/Bundle/view/adminhtml/sales/invoice/create/items/renderer.phtml index da23543ee1502..4a347c2d07d4d 100644 --- a/app/code/core/Mage/Bundle/view/adminhtml/sales/invoice/create/items/renderer.phtml +++ b/app/code/core/Mage/Bundle/view/adminhtml/sales/invoice/create/items/renderer.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Bundle/view/adminhtml/sales/invoice/view/items/renderer.phtml b/app/code/core/Mage/Bundle/view/adminhtml/sales/invoice/view/items/renderer.phtml index b585e15270c10..e5aec80b512b6 100644 --- a/app/code/core/Mage/Bundle/view/adminhtml/sales/invoice/view/items/renderer.phtml +++ b/app/code/core/Mage/Bundle/view/adminhtml/sales/invoice/view/items/renderer.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Bundle/view/adminhtml/sales/order/view/items/renderer.phtml b/app/code/core/Mage/Bundle/view/adminhtml/sales/order/view/items/renderer.phtml index 5b70bbd18028f..991801fbaaac5 100644 --- a/app/code/core/Mage/Bundle/view/adminhtml/sales/order/view/items/renderer.phtml +++ b/app/code/core/Mage/Bundle/view/adminhtml/sales/order/view/items/renderer.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Bundle/view/adminhtml/sales/shipment/create/items/renderer.phtml b/app/code/core/Mage/Bundle/view/adminhtml/sales/shipment/create/items/renderer.phtml index 197f96021c37b..8924cf628b394 100644 --- a/app/code/core/Mage/Bundle/view/adminhtml/sales/shipment/create/items/renderer.phtml +++ b/app/code/core/Mage/Bundle/view/adminhtml/sales/shipment/create/items/renderer.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Bundle/view/adminhtml/sales/shipment/view/items/renderer.phtml b/app/code/core/Mage/Bundle/view/adminhtml/sales/shipment/view/items/renderer.phtml index b89b9de260c78..9d5e11e269ddf 100644 --- a/app/code/core/Mage/Bundle/view/adminhtml/sales/shipment/view/items/renderer.phtml +++ b/app/code/core/Mage/Bundle/view/adminhtml/sales/shipment/view/items/renderer.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Bundle/view/frontend/bundle.js b/app/code/core/Mage/Bundle/view/frontend/bundle.js index 56c8c82c69f81..e803e253c8cf4 100644 --- a/app/code/core/Mage/Bundle/view/frontend/bundle.js +++ b/app/code/core/Mage/Bundle/view/frontend/bundle.js @@ -19,7 +19,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ if(typeof Product=='undefined') { diff --git a/app/code/core/Mage/Bundle/view/frontend/catalog/product/price.phtml b/app/code/core/Mage/Bundle/view/frontend/catalog/product/price.phtml index df093c98d4626..7ad2d7b58d309 100644 --- a/app/code/core/Mage/Bundle/view/frontend/catalog/product/price.phtml +++ b/app/code/core/Mage/Bundle/view/frontend/catalog/product/price.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -35,12 +35,17 @@ getPriceType() == 1) { $_weeeTaxAmount = Mage::helper('Mage_Weee_Helper_Data')->getAmount($_product); + $_weeeTaxAmountInclTaxes = $_weeeTaxAmount; + if (Mage::helper('Mage_Weee_Helper_Data')->isTaxable()) { + $_attributes = Mage::helper('Mage_Weee_Helper_Data')->getProductWeeeAttributesForRenderer($_product, null, null, null, true); + $_weeeTaxAmountInclTaxes = Mage::helper('Mage_Weee_Helper_Data')->getAmountInclTaxes($_attributes); + } if ($_weeeTaxAmount && Mage::helper('Mage_Weee_Helper_Data')->typeOfDisplay($_product, array(0, 1, 4))) { $_minimalPriceTax += $_weeeTaxAmount; - $_minimalPriceInclTax += $_weeeTaxAmount; + $_minimalPriceInclTax += $_weeeTaxAmountInclTaxes; } if ($_weeeTaxAmount && Mage::helper('Mage_Weee_Helper_Data')->typeOfDisplay($_product, 2)) { - $_minimalPriceInclTax += $_weeeTaxAmount; + $_minimalPriceInclTax += $_weeeTaxAmountInclTaxes; } if (Mage::helper('Mage_Weee_Helper_Data')->typeOfDisplay($_product, array(1, 2, 4))) { @@ -153,10 +158,10 @@ if ($_product->getPriceType() == 1) { if ($_product->getPriceType() == 1) { if ($_weeeTaxAmount && Mage::helper('Mage_Weee_Helper_Data')->typeOfDisplay($_product, array(0, 1, 4))) { $_maximalPriceTax += $_weeeTaxAmount; - $_maximalPriceInclTax += $_weeeTaxAmount; + $_maximalPriceInclTax += $_weeeTaxAmountInclTaxes; } if ($_weeeTaxAmount && Mage::helper('Mage_Weee_Helper_Data')->typeOfDisplay($_product, 2)) { - $_maximalPriceInclTax += $_weeeTaxAmount; + $_maximalPriceInclTax += $_weeeTaxAmountInclTaxes; } } ?> diff --git a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/options/notice.phtml b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/options/notice.phtml index 8a4b97da0f1a4..93c8ff90e2c3d 100644 --- a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/options/notice.phtml +++ b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/options/notice.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/price.phtml b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/price.phtml index 10b6bcf98ec08..8d9a5d297c551 100644 --- a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/price.phtml +++ b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/price.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/tierprices.phtml b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/tierprices.phtml index 80576267bef70..adf0f60e5597f 100644 --- a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/tierprices.phtml +++ b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/tierprices.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle.phtml b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle.phtml index 8f331941f74bd..2ba0a21a548b4 100644 --- a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle.phtml +++ b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/checkbox.phtml b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/checkbox.phtml index 47f5b382d9a46..cc04c120ddb03 100644 --- a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/checkbox.phtml +++ b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/checkbox.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/multi.phtml b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/multi.phtml index 78f7740964021..5f115c67214ca 100644 --- a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/multi.phtml +++ b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/multi.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/radio.phtml b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/radio.phtml index a8af8fd096d77..f02ad6fea9c06 100644 --- a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/radio.phtml +++ b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/radio.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/select.phtml b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/select.phtml index 0d28c8fdae571..c8cf9e8f8833e 100644 --- a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/select.phtml +++ b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/option/select.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/options.phtml b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/options.phtml index 1e1aa4f2eca3c..c52f0ace16901 100644 --- a/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/options.phtml +++ b/app/code/core/Mage/Bundle/view/frontend/catalog/product/view/type/bundle/options.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Bundle/view/frontend/email/order/items/creditmemo/default.phtml b/app/code/core/Mage/Bundle/view/frontend/email/order/items/creditmemo/default.phtml index b362fd38ed02a..8cf26befcd0a2 100644 --- a/app/code/core/Mage/Bundle/view/frontend/email/order/items/creditmemo/default.phtml +++ b/app/code/core/Mage/Bundle/view/frontend/email/order/items/creditmemo/default.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Bundle/view/frontend/email/order/items/invoice/default.phtml b/app/code/core/Mage/Bundle/view/frontend/email/order/items/invoice/default.phtml index 1ae556187989a..ee29073b9411b 100644 --- a/app/code/core/Mage/Bundle/view/frontend/email/order/items/invoice/default.phtml +++ b/app/code/core/Mage/Bundle/view/frontend/email/order/items/invoice/default.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Bundle/view/frontend/email/order/items/order/default.phtml b/app/code/core/Mage/Bundle/view/frontend/email/order/items/order/default.phtml index 60356b4247595..e5c5eee673ee5 100644 --- a/app/code/core/Mage/Bundle/view/frontend/email/order/items/order/default.phtml +++ b/app/code/core/Mage/Bundle/view/frontend/email/order/items/order/default.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Bundle/view/frontend/email/order/items/shipment/default.phtml b/app/code/core/Mage/Bundle/view/frontend/email/order/items/shipment/default.phtml index 59a872366042a..2a9e4ec535308 100644 --- a/app/code/core/Mage/Bundle/view/frontend/email/order/items/shipment/default.phtml +++ b/app/code/core/Mage/Bundle/view/frontend/email/order/items/shipment/default.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Bundle/view/frontend/layout.xml b/app/code/core/Mage/Bundle/view/frontend/layout.xml index f0123909477a0..b03fe0fcd2ec3 100644 --- a/app/code/core/Mage/Bundle/view/frontend/layout.xml +++ b/app/code/core/Mage/Bundle/view/frontend/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Bundle/view/frontend/rss/catalog/product/price.phtml b/app/code/core/Mage/Bundle/view/frontend/rss/catalog/product/price.phtml index 90233fd6c7952..95b494afe38b3 100644 --- a/app/code/core/Mage/Bundle/view/frontend/rss/catalog/product/price.phtml +++ b/app/code/core/Mage/Bundle/view/frontend/rss/catalog/product/price.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Bundle/view/frontend/sales/order/creditmemo/items/renderer.phtml b/app/code/core/Mage/Bundle/view/frontend/sales/order/creditmemo/items/renderer.phtml index b4b8514d4b801..00a5f0f7c607d 100644 --- a/app/code/core/Mage/Bundle/view/frontend/sales/order/creditmemo/items/renderer.phtml +++ b/app/code/core/Mage/Bundle/view/frontend/sales/order/creditmemo/items/renderer.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Bundle/view/frontend/sales/order/invoice/items/renderer.phtml b/app/code/core/Mage/Bundle/view/frontend/sales/order/invoice/items/renderer.phtml index 9d10933694879..977d7e3436130 100644 --- a/app/code/core/Mage/Bundle/view/frontend/sales/order/invoice/items/renderer.phtml +++ b/app/code/core/Mage/Bundle/view/frontend/sales/order/invoice/items/renderer.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Bundle/view/frontend/sales/order/items/renderer.phtml b/app/code/core/Mage/Bundle/view/frontend/sales/order/items/renderer.phtml index 7153357e3756f..0398cbea96e2b 100644 --- a/app/code/core/Mage/Bundle/view/frontend/sales/order/items/renderer.phtml +++ b/app/code/core/Mage/Bundle/view/frontend/sales/order/items/renderer.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Bundle/view/frontend/sales/order/shipment/items/renderer.phtml b/app/code/core/Mage/Bundle/view/frontend/sales/order/shipment/items/renderer.phtml index 17afe53ea510d..5349e88684313 100644 --- a/app/code/core/Mage/Bundle/view/frontend/sales/order/shipment/items/renderer.phtml +++ b/app/code/core/Mage/Bundle/view/frontend/sales/order/shipment/items/renderer.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Captcha/Block/Captcha.php b/app/code/core/Mage/Captcha/Block/Captcha.php new file mode 100755 index 0000000000000..7453fb41902db --- /dev/null +++ b/app/code/core/Mage/Captcha/Block/Captcha.php @@ -0,0 +1,48 @@ + + */ +class Mage_Captcha_Block_Captcha extends Mage_Core_Block_Template +{ + /** + * Renders captcha HTML (if required) + * + * @return string + */ + protected function _toHtml() + { + $blockPath = Mage::helper('Mage_Captcha_Helper_Data')->getCaptcha($this->getFormId())->getBlockName(); + $block = $this->getLayout()->createBlock($blockPath); + $block->setData($this->getData()); + return $block->toHtml(); + } +} diff --git a/app/code/core/Mage/Captcha/Block/Captcha/Zend.php b/app/code/core/Mage/Captcha/Block/Captcha/Zend.php new file mode 100755 index 0000000000000..814a173f19313 --- /dev/null +++ b/app/code/core/Mage/Captcha/Block/Captcha/Zend.php @@ -0,0 +1,87 @@ + + */ +class Mage_Captcha_Block_Captcha_Zend extends Mage_Core_Block_Template +{ + protected $_template = 'zend.phtml'; + + /** + * @var string + */ + protected $_captcha; + + /** + * Returns template path + * + * @return string + */ + public function getTemplate() + { + return $this->getIsAjax() ? '' : $this->_template; + } + + /** + * Returns URL to controller action which returns new captcha image + * + * @return string + */ + public function getRefreshUrl() + { + $url = Mage::app()->getStore()->isAdmin() ? "adminhtml/refresh/refresh" : "captcha/refresh"; + return Mage::getUrl($url, array('_secure' => Mage::app()->getRequest()->isSecure())); + } + + /** + * Renders captcha HTML (if required) + * + * @return string + */ + protected function _toHtml() + { + if ($this->getCaptchaModel()->isRequired()) { + $this->getCaptchaModel()->generate(); + return parent::_toHtml(); + } + return ''; + } + + /** + * Returns captcha model + * + * @return Mage_Captcha_Model_Abstract + */ + public function getCaptchaModel() + { + return Mage::helper('Mage_Captcha_Helper_Data')->getCaptcha($this->getFormId()); + } +} diff --git a/app/code/core/Mage/Captcha/Helper/Data.php b/app/code/core/Mage/Captcha/Helper/Data.php new file mode 100755 index 0000000000000..bb6dbee4f2c50 --- /dev/null +++ b/app/code/core/Mage/Captcha/Helper/Data.php @@ -0,0 +1,138 @@ + + */ +class Mage_Captcha_Helper_Data extends Mage_Core_Helper_Abstract +{ + /** + * Used for "name" attribute of captcha's input field + */ + const INPUT_NAME_FIELD_VALUE = 'captcha'; + + /** + * Always show captcha + */ + const MODE_ALWAYS = 'always'; + + /** + * Show captcha only after certain number of unsuccessful attempts + */ + const MODE_AFTER_FAIL = 'after_fail'; + + /** + * Captcha fonts path + */ + const XML_PATH_CAPTCHA_FONTS = 'default/captcha/fonts'; + + /** + * List uses Models of Captcha + * @var array + */ + protected $_captcha = array(); + + /** + * Get Captcha + * + * @param string $formId + * @return Mage_Captcha_Model_Interface + */ + public function getCaptcha($formId) + { + if (!array_key_exists($formId, $this->_captcha)) { + $type = ucfirst($this->getConfigNode('type')); + $this->_captcha[$formId] = Mage::getModel('Mage_Captcha_Model_' . $type, array('formId' => $formId)); + } + return $this->_captcha[$formId]; + } + + /** + * Returns value of the node with respect to current area (frontend or backend) + * + * @param string $id The last part of XML_PATH_$area_CAPTCHA_ constant (case insensitive) + * @param Mage_Core_Model_Store $store + * @return Mage_Core_Model_Config_Element + */ + public function getConfigNode($id, $store = null) + { + $areaCode = Mage::app()->getStore($store)->isAdmin() ? 'admin' : 'customer'; + return Mage::getStoreConfig( $areaCode . '/captcha/' . $id, $store); + } + + /** + * Get list of available fonts + * Return format: + * [['arial'] => ['label' => 'Arial', 'path' => '/www/magento/fonts/arial.ttf']] + * + * @return array + */ + public function getFonts() + { + $node = Mage::getConfig()->getNode(Mage_Captcha_Helper_Data::XML_PATH_CAPTCHA_FONTS); + $fonts = array(); + if ($node) { + foreach ($node->children() as $fontName => $fontNode) { + $fonts[$fontName] = array( + 'label' => (string)$fontNode->label, + 'path' => Mage::getBaseDir('base') . DS . $fontNode->path + ); + } + } + return $fonts; + } + + /** + * Get captcha image directory + * + * @param mixed $website + * @return string + */ + public function getImgDir($website = null) + { + $websiteCode = Mage::app()->getWebsite($website)->getCode(); + $captchaDir = Mage::getBaseDir('media') . DS . 'captcha' . DS . $websiteCode . DS; + $io = new Varien_Io_File(); + $io->checkAndCreateFolder($captchaDir, 0755); + return $captchaDir; + } + + /** + * Get captcha image base URL + * + * @param mixed $website + * @return string + */ + public function getImgUrl($website = null) + { + $websiteCode = Mage::app()->getWebsite($website)->getCode(); + return Mage::getBaseUrl('media') . 'captcha' . '/' . $websiteCode . '/'; + } +} diff --git a/app/code/core/Mage/Captcha/Model/Config/Font.php b/app/code/core/Mage/Captcha/Model/Config/Font.php new file mode 100755 index 0000000000000..7b11ef2b53a6e --- /dev/null +++ b/app/code/core/Mage/Captcha/Model/Config/Font.php @@ -0,0 +1,49 @@ + + */ +class Mage_Captcha_Model_Config_Font +{ + /** + * Get options for font selection field + * + * @return array + */ + public function toOptionArray() + { + $optionArray = array(); + foreach (Mage::helper('Mage_Captcha_Helper_Data')->getFonts() as $fontName => $fontData) { + $optionArray[] = array('label' => $fontData['label'], 'value' => $fontName); + } + return $optionArray; + } +} diff --git a/app/code/core/Mage/Captcha/Model/Config/Form/Abstract.php b/app/code/core/Mage/Captcha/Model/Config/Form/Abstract.php new file mode 100755 index 0000000000000..444b5d3a1f04a --- /dev/null +++ b/app/code/core/Mage/Captcha/Model/Config/Form/Abstract.php @@ -0,0 +1,61 @@ + + */ +abstract class Mage_Captcha_Model_Config_Form_Abstract extends Mage_Core_Model_Config_Data +{ + /** + * @var string + */ + protected $_configPath; + + /** + * Returns options for form multiselect + * + * @return array + */ + public function toOptionArray() + { + $optionArray = array(); + /* @var $backendNode Mage_Core_Model_Config_Element */ + $backendNode = Mage::getConfig()->getNode($this->_configPath); + if ($backendNode) { + foreach ($backendNode->children() as $formNode) { + /* @var $formNode Mage_Core_Model_Config_Element */ + if (!empty($formNode->label)) { + $optionArray[] = array('label' => (string)$formNode->label, 'value' => $formNode->getName()); + } + } + } + return $optionArray; + } +} diff --git a/app/code/core/Mage/Captcha/Model/Config/Form/Backend.php b/app/code/core/Mage/Captcha/Model/Config/Form/Backend.php new file mode 100755 index 0000000000000..568c70ddb0183 --- /dev/null +++ b/app/code/core/Mage/Captcha/Model/Config/Form/Backend.php @@ -0,0 +1,40 @@ + + */ +class Mage_Captcha_Model_Config_Form_Backend extends Mage_Captcha_Model_Config_Form_Abstract +{ + /** + * @var string + */ + protected $_configPath = 'default/captcha/backend/areas'; +} diff --git a/app/code/core/Mage/Captcha/Model/Config/Form/Frontend.php b/app/code/core/Mage/Captcha/Model/Config/Form/Frontend.php new file mode 100755 index 0000000000000..112903c303182 --- /dev/null +++ b/app/code/core/Mage/Captcha/Model/Config/Form/Frontend.php @@ -0,0 +1,40 @@ + + */ +class Mage_Captcha_Model_Config_Form_Frontend extends Mage_Captcha_Model_Config_Form_Abstract +{ + /** + * @var string + */ + protected $_configPath = 'default/captcha/frontend/areas'; +} diff --git a/app/code/core/Mage/Captcha/Model/Config/Mode.php b/app/code/core/Mage/Captcha/Model/Config/Mode.php new file mode 100755 index 0000000000000..02cb7aa1f2d76 --- /dev/null +++ b/app/code/core/Mage/Captcha/Model/Config/Mode.php @@ -0,0 +1,54 @@ + + */ +class Mage_Captcha_Model_Config_Mode +{ + /** + * Get options for captcha mode selection field + * + * @return array + */ + public function toOptionArray() + { + return array( + array( + 'label' => Mage::helper('Mage_Captcha_Helper_Data')->__('Always'), + 'value' => Mage_Captcha_Helper_Data::MODE_ALWAYS + ), + array( + 'label' => Mage::helper('Mage_Captcha_Helper_Data')->__('After number of attempts to login'), + 'value' => Mage_Captcha_Helper_Data::MODE_AFTER_FAIL + ), + ); + } +} diff --git a/app/code/core/Mage/Captcha/Model/Interface.php b/app/code/core/Mage/Captcha/Model/Interface.php new file mode 100755 index 0000000000000..2fa086c8be440 --- /dev/null +++ b/app/code/core/Mage/Captcha/Model/Interface.php @@ -0,0 +1,60 @@ + + */ +interface Mage_Captcha_Model_Interface +{ + /** + * Generates captcha + * + * @abstract + * @return void + */ + public function generate(); + + /** + * Checks whether word entered by user corresponds to the one generated by generate() + * + * @abstract + * @param string $word + * @return void + */ + public function isCorrect($word); + + + /** + * Get Block Name + * + * @return string + */ + public function getBlockName(); +} diff --git a/app/code/core/Mage/Captcha/Model/Observer.php b/app/code/core/Mage/Captcha/Model/Observer.php new file mode 100755 index 0000000000000..8eb1ab8494372 --- /dev/null +++ b/app/code/core/Mage/Captcha/Model/Observer.php @@ -0,0 +1,292 @@ + + */ +class Mage_Captcha_Model_Observer +{ + /** + * Check Captcha On Forgot Password Page + * + * @param Varien_Event_Observer $observer + * @return Mage_Captcha_Model_Observer + */ + public function checkForgotpassword($observer) + { + $formId = 'user_forgotpassword'; + $captchaModel = Mage::helper('Mage_Captcha_Helper_Data')->getCaptcha($formId); + if ($captchaModel->isRequired()) { + $controller = $observer->getControllerAction(); + if (!$captchaModel->isCorrect($this->_getCaptchaString($controller->getRequest(), $formId))) { + Mage::getSingleton('Mage_Customer_Model_Session')->addError(Mage::helper('Mage_Captcha_Helper_Data')->__('Incorrect CAPTCHA.')); + $controller->setFlag('', Mage_Core_Controller_Varien_Action::FLAG_NO_DISPATCH, true); + $controller->getResponse()->setRedirect(Mage::getUrl('*/*/forgotpassword')); + } + } + return $this; + } + + /** + * Check Captcha On User Login Page + * + * @param Varien_Event_Observer $observer + * @return Mage_Captcha_Model_Observer + */ + public function checkUserLogin($observer) + { + $formId = 'user_login'; + $captchaModel = Mage::helper('Mage_Captcha_Helper_Data')->getCaptcha($formId); + $controller = $observer->getControllerAction(); + $loginParams = $controller->getRequest()->getPost('login'); + $login = array_key_exists('username', $loginParams) ? $loginParams['username'] : null; + if ($captchaModel->isRequired($login)) { + $word = $this->_getCaptchaString($controller->getRequest(), $formId); + if (!$captchaModel->isCorrect($word)) { + Mage::getSingleton('Mage_Customer_Model_Session')->addError(Mage::helper('Mage_Captcha_Helper_Data')->__('Incorrect CAPTCHA.')); + $controller->setFlag('', Mage_Core_Controller_Varien_Action::FLAG_NO_DISPATCH, true); + Mage::getSingleton('Mage_Customer_Model_Session')->setUsername($login); + $beforeUrl = Mage::getSingleton('Mage_Customer_Model_Session')->getBeforeAuthUrl(); + $url = $beforeUrl ? $beforeUrl : Mage::helper('Mage_Customer_Helper_Data')->getLoginUrl(); + $controller->getResponse()->setRedirect($url); + } + } + $captchaModel->logAttempt($login); + return $this; + } + + /** + * Check Captcha On Register User Page + * + * @param Varien_Event_Observer $observer + * @return Mage_Captcha_Model_Observer + */ + public function checkUserCreate($observer) + { + $formId = 'user_create'; + $captchaModel = Mage::helper('Mage_Captcha_Helper_Data')->getCaptcha($formId); + if ($captchaModel->isRequired()) { + $controller = $observer->getControllerAction(); + if (!$captchaModel->isCorrect($this->_getCaptchaString($controller->getRequest(), $formId))) { + Mage::getSingleton('Mage_Customer_Model_Session')->addError(Mage::helper('Mage_Captcha_Helper_Data')->__('Incorrect CAPTCHA.')); + $controller->setFlag('', Mage_Core_Controller_Varien_Action::FLAG_NO_DISPATCH, true); + Mage::getSingleton('Mage_Customer_Model_Session')->setCustomerFormData($controller->getRequest()->getPost()); + $controller->getResponse()->setRedirect(Mage::getUrl('*/*/create')); + } + } + return $this; + } + + /** + * Check Captcha On Checkout as Guest Page + * + * @param Varien_Event_Observer $observer + * @return Mage_Captcha_Model_Observer + */ + public function checkGuestCheckout($observer) + { + $formId = 'guest_checkout'; + $captchaModel = Mage::helper('Mage_Captcha_Helper_Data')->getCaptcha($formId); + $checkoutMethod = Mage::getSingleton('Mage_Checkout_Model_Type_Onepage')->getQuote()->getCheckoutMethod(); + if ($checkoutMethod == Mage_Checkout_Model_Type_Onepage::METHOD_GUEST) { + if ($captchaModel->isRequired()) { + $controller = $observer->getControllerAction(); + if (!$captchaModel->isCorrect($this->_getCaptchaString($controller->getRequest(), $formId))) { + $controller->setFlag('', Mage_Core_Controller_Varien_Action::FLAG_NO_DISPATCH, true); + $result = array('error' => 1, 'message' => Mage::helper('Mage_Captcha_Helper_Data')->__('Incorrect CAPTCHA.')); + $controller->getResponse()->setBody(Mage::helper('Mage_Core_Helper_Data')->jsonEncode($result)); + } + } + } + return $this; + } + + /** + * Check Captcha On Checkout Register Page + * + * @param Varien_Event_Observer $observer + * @return Mage_Captcha_Model_Observer + */ + public function checkRegisterCheckout($observer) + { + $formId = 'register_during_checkout'; + $captchaModel = Mage::helper('Mage_Captcha_Helper_Data')->getCaptcha($formId); + $checkoutMethod = Mage::getSingleton('Mage_Checkout_Model_Type_Onepage')->getQuote()->getCheckoutMethod(); + if ($checkoutMethod == Mage_Checkout_Model_Type_Onepage::METHOD_REGISTER) { + if ($captchaModel->isRequired()) { + $controller = $observer->getControllerAction(); + if (!$captchaModel->isCorrect($this->_getCaptchaString($controller->getRequest(), $formId))) { + $controller->setFlag('', Mage_Core_Controller_Varien_Action::FLAG_NO_DISPATCH, true); + $result = array('error' => 1, 'message' => Mage::helper('Mage_Captcha_Helper_Data')->__('Incorrect CAPTCHA.')); + $controller->getResponse()->setBody(Mage::helper('Mage_Core_Helper_Data')->jsonEncode($result)); + } + } + } + return $this; + } + + /** + * Check Captcha On User Login Backend Page + * + * @param Varien_Event_Observer $observer + * @return Mage_Captcha_Model_Observer + */ + public function checkUserLoginBackend($observer) + { + $formId = 'backend_login'; + $captchaModel = Mage::helper('Mage_Captcha_Helper_Data')->getCaptcha($formId); + $loginParams = Mage::app()->getRequest()->getPost('login'); + $login = is_array($loginParams) && array_key_exists('username', $loginParams) ? $loginParams['username'] : null; + if ($captchaModel->isRequired($login)) { + if (!$captchaModel->isCorrect($this->_getCaptchaString(Mage::app()->getRequest(), $formId))) { + $captchaModel->logAttempt($login); + Mage::throwException(Mage::helper('Mage_Captcha_Helper_Data')->__('Incorrect CAPTCHA.')); + } + } + $captchaModel->logAttempt($login); + return $this; + } + + /** + * Returns backend session + * + * @return Mage_Adminhtml_Model_Session + */ + protected function _getBackendSession() + { + return Mage::getSingleton('Mage_Adminhtml_Model_Session'); + } + + /** + * Check Captcha On User Login Backend Page + * + * @param Varien_Event_Observer $observer + * @return Mage_Captcha_Model_Observer + */ + public function checkUserForgotPasswordBackend($observer) + { + $formId = 'backend_forgotpassword'; + $captchaModel = Mage::helper('Mage_Captcha_Helper_Data')->getCaptcha($formId); + $controller = $observer->getControllerAction(); + $email = (string) $observer->getControllerAction()->getRequest()->getParam('email'); + $params = $observer->getControllerAction()->getRequest()->getParams(); + + if (!empty($email) && !empty($params)){ + if ($captchaModel->isRequired()){ + if (!$captchaModel->isCorrect($this->_getCaptchaString($controller->getRequest(), $formId))) { + $this->_getBackendSession()->setEmail((string) $controller->getRequest()->getPost('email')); + $controller->setFlag('', Mage_Core_Controller_Varien_Action::FLAG_NO_DISPATCH, true); + $this->_getBackendSession()->addError(Mage::helper('Mage_Captcha_Helper_Data')->__('Incorrect CAPTCHA.')); + $controller->getResponse()->setRedirect(Mage::getUrl('*/*/forgotpassword')); + } + } + } + return $this; + } + + /** + * Reset Attempts For Frontend + * + * @param Varien_Event_Observer $observer + * @return Mage_Captcha_Model_Observer + */ + public function resetAttemptForFrontend($observer) + { + return $this->_resetAttempt($observer->getModel()->getEmail()); + } + + /** + * Reset Attempts For Backend + * + * @param Varien_Event_Observer $observer + * @return Mage_Captcha_Model_Observer + */ + public function resetAttemptForBackend($observer) + { + return $this->_resetAttempt($observer->getUser()->getUsername()); + } + + /** + * Delete Unnecessary logged attempts + * + * @return Mage_Captcha_Model_Observer + */ + public function deleteOldAttempts() + { + Mage::getResourceModel('Mage_Captcha_Model_Resource_Log')->deleteOldAttempts(); + return $this; + } + + /** + * Delete Expired Captcha Images + * + * @return Mage_Captcha_Model_Observer + */ + public function deleteExpiredImages() + { + foreach (Mage::app()->getWebsites(true) as $website){ + $expire = time() - Mage::helper('Mage_Captcha_Helper_Data')->getConfigNode('timeout', $website->getDefaultStore())*60; + $imageDirectory = Mage::helper('Mage_Captcha_Helper_Data')->getImgDir($website); + foreach (new DirectoryIterator($imageDirectory) as $file) { + if ($file->isFile() && pathinfo($file->getFilename(), PATHINFO_EXTENSION) == 'png') { + if ($file->getMTime() < $expire) { + unlink($file->getPathname()); + } + } + } + } + return $this; + } + + /** + * Reset Attempts + * + * @param string $login + * @return Mage_Captcha_Model_Observer + */ + protected function _resetAttempt($login) + { + Mage::getResourceModel('Mage_Captcha_Model_Resource_Log')->deleteUserAttempts($login); + return $this; + } + + /** + * Get Captcha String + * + * @param Varien_Object $request + * @param string $formId + * @return string + */ + protected function _getCaptchaString($request, $formId) + { + $captchaParams = $request->getPost(Mage_Captcha_Helper_Data::INPUT_NAME_FIELD_VALUE); + return $captchaParams[$formId]; + } +} diff --git a/app/code/core/Mage/Captcha/Model/Resource/Log.php b/app/code/core/Mage/Captcha/Model/Resource/Log.php new file mode 100755 index 0000000000000..9a9490611cdd6 --- /dev/null +++ b/app/code/core/Mage/Captcha/Model/Resource/Log.php @@ -0,0 +1,156 @@ + + */ +class Mage_Captcha_Model_Resource_Log extends Mage_Core_Model_Resource_Db_Abstract +{ + /** + * Type Remote Address + */ + const TYPE_REMOTE_ADDRESS = 1; + /** + * Type User Login Name + */ + const TYPE_LOGIN = 2; + + /** + * Define main table + * + */ + protected function _construct() + { + $this->_init('captcha_log', array('type','value')); + } + + /** + * Save or Update count Attempts + * + * @param string|null $login + * @return Mage_Captcha_Model_Resource_Log + */ + public function logAttempt($login) + { + if ($login != null){ + $this->_getWriteAdapter()->insertOnDuplicate( + $this->getMainTable(), + array( + 'type' => self::TYPE_LOGIN, 'value' => $login, 'count' => 1, + 'updated_at' => Mage::getSingleton('Mage_Core_Model_Date')->gmtDate() + ), + array('count' => new Zend_Db_Expr('count+1'), 'updated_at') + ); + } + $ip = Mage::helper('Mage_Core_Helper_Http')->getRemoteAddr(); + if ($ip != null) { + $this->_getWriteAdapter()->insertOnDuplicate( + $this->getMainTable(), + array( + 'type' => self::TYPE_REMOTE_ADDRESS, 'value' => $ip, 'count' => 1, + 'updated_at' => Mage::getSingleton('Mage_Core_Model_Date')->gmtDate() + ), + array('count' => new Zend_Db_Expr('count+1'), 'updated_at') + ); + } + return $this; + } + + /** + * Delete User attempts by login + * + * @param string $login + * @return Mage_Captcha_Model_Resource_Log + */ + public function deleteUserAttempts($login) + { + if ($login != null) { + $this->_getWriteAdapter()->delete( + $this->getMainTable(), + array('type = ?' => self::TYPE_LOGIN, 'value = ?' => $login) + ); + } + $ip = Mage::helper('Mage_Core_Helper_Http')->getRemoteAddr(); + if ($ip != null) { + $this->_getWriteAdapter()->delete( + $this->getMainTable(), array('type = ?' => self::TYPE_REMOTE_ADDRESS, 'value = ?' => $ip) + ); + } + + return $this; + } + + /** + * Get count attempts by ip + * + * @return null|int + */ + public function countAttemptsByRemoteAddress() + { + $ip = Mage::helper('Mage_Core_Helper_Http')->getRemoteAddr(); + if (!$ip) { + return 0; + } + $read = $this->_getReadAdapter(); + $select = $read->select()->from($this->getMainTable(), 'count')->where('type = ?', self::TYPE_REMOTE_ADDRESS) + ->where('value = ?', $ip); + return $read->fetchOne($select); + } + + /** + * Get count attempts by user login + * + * @param string $login + * @return null|int + */ + public function countAttemptsByUserLogin($login) + { + if (!$login) { + return 0; + } + $read = $this->_getReadAdapter(); + $select = $read->select()->from($this->getMainTable(), 'count')->where('type = ?', self::TYPE_LOGIN) + ->where('value = ?', $login); + return $read->fetchOne($select); + } + + /** + * Delete attempts with expired in update_at time + * + * @return void + */ + public function deleteOldAttempts() + { + $this->_getWriteAdapter()->delete( + $this->getMainTable(), + array('updated_at < ?' => Mage::getSingleton('Mage_Core_Model_Date')->gmtDate(null, time() - 60*30)) + ); + } +} diff --git a/app/code/core/Mage/Captcha/Model/Zend.php b/app/code/core/Mage/Captcha/Model/Zend.php new file mode 100755 index 0000000000000..435dd9a9a8b67 --- /dev/null +++ b/app/code/core/Mage/Captcha/Model/Zend.php @@ -0,0 +1,504 @@ + + */ +class Mage_Captcha_Model_Zend extends Zend_Captcha_Image implements Mage_Captcha_Model_Interface +{ + /** + * Key in session for captcha code + */ + const SESSION_WORD = 'word'; + + /** + * Min captcha lengths default value + */ + const DEFAULT_WORD_LENGTH_FROM = 3; + + /** + * Max captcha lengths default value + */ + const DEFAULT_WORD_LENGTH_TO = 5; + + /** + * Helper Instance + * @var Mage_Captcha_Helper_Data + */ + protected $_helper = null; + + /** + * Captcha expire time + * @var int + */ + protected $_expiration; + + /** + * Override default value to prevent a captcha cut off + * @var int + * @see Zend_Captcha_Image::$_fsize + */ + protected $_fsize = 22; + + /** + * Captcha form id + * @var string + */ + protected $_formId; + + /** + * Zend captcha constructor + * + * @param array $params + */ + public function __construct($params) + { + if (!isset($params['formId'])) { + throw new Exception('formId is mandatory'); + } + $this->_formId = $params['formId']; + $this->setExpiration($this->getTimeout()); + } + + /** + * Returns key with respect of current form ID + * + * @param string $key + * @return string + */ + protected function _getFormIdKey($key) + { + return $this->_formId . '_' . $key; + } + + /** + * Get Block Name + * + * @return string + */ + public function getBlockName() + { + return 'Mage_Captcha_Block_Captcha_Zend'; + } + + + /** + * Whether captcha is required to be inserted to this form + * + * @param null|string $login + * @return bool + */ + public function isRequired($login = null) + { + if ($this->_isUserAuth() || !$this->_isEnabled() || !in_array($this->_formId, $this->_getTargetForms())) { + return false; + } + + return ($this->_isShowAlways() || $this->_isOverLimitAttempts($login) + || $this->getSession()->getData($this->_getFormIdKey('show_captcha')) + ); + } + + /** + * Check is overlimit attempts + * + * @param string $login + * @return bool + */ + protected function _isOverLimitAttempts($login) + { + return ($this->_isOverLimitIpAttempt() || $this->_isOverLimitLoginAttempts($login)); + } + + /** + * Returns number of allowed attempts for same login + * + * @return int + */ + protected function _getAllowedAttemptsForSameLogin() + { + return (int)$this->_getHelper()->getConfigNode('failed_attempts_login'); + } + + /** + * Returns number of allowed attempts from same IP + * + * @return int + */ + protected function _getAllowedAttemptsFromSameIp() + { + return (int)$this->_getHelper()->getConfigNode('failed_attempts_ip'); + } + + /** + * Check is overlimit saved attempts from one ip + * + * @return bool + */ + protected function _isOverLimitIpAttempt() + { + $countAttemptsByIp = Mage::getResourceModel('Mage_Captcha_Model_Resource_Log')->countAttemptsByRemoteAddress(); + return $countAttemptsByIp >= $this->_getAllowedAttemptsFromSameIp(); + } + + /** + * Is Over Limit Login Attempts + * + * @param string $login + * @return bool + */ + protected function _isOverLimitLoginAttempts($login) + { + if ($login != false) { + $countAttemptsByLogin = Mage::getResourceModel('Mage_Captcha_Model_Resource_Log')->countAttemptsByUserLogin($login); + return ($countAttemptsByLogin >= $this->_getAllowedAttemptsForSameLogin()); + } + return false; + } + + /** + * Check is user auth + * + * @return bool + */ + protected function _isUserAuth() + { + return Mage::app()->getStore()->isAdmin() + ? Mage::getSingleton('Mage_Admin_Model_Session')->isLoggedIn() + : Mage::getSingleton('Mage_Customer_Model_Session')->isLoggedIn(); + } + + /** + * Whether to respect case while checking the answer + * + * @return bool + */ + public function isCaseSensitive() + { + return (string)$this->_getHelper()->getConfigNode('case_sensitive'); + } + + /** + * Get font to use when generating captcha + * + * @return string + */ + public function getFont() + { + return $this->_getFontPath(); + } + + /** + * After this time isCorrect() is going to return FALSE even if word was guessed correctly + * + * @return int + */ + public function getTimeout() + { + if (!$this->_expiration) { + /** + * as "timeout" configuration parameter specifies timeout in minutes - we multiply it on 60 to set + * expiration in seconds + */ + $this->_expiration = (int)$this->_getHelper()->getConfigNode('timeout') * 60; + } + return $this->_expiration; + } + + /** + * Get captcha image directory + * + * @return string + */ + public function getImgDir() + { + return $this->_helper->getImgDir(); + } + + /** + * Get captcha image base URL + * + * @return string + */ + public function getImgUrl() + { + return $this->_helper->getImgUrl(); + } + + /** + * Checks whether captcha was guessed correctly by user + * + * @param string $word + * @return bool + */ + public function isCorrect($word) + { + $storedWord = $this->getWord(); + $this->_clearWord(); + + if (!$word || !$storedWord){ + return false; + } + + if (!$this->isCaseSensitive()) { + $storedWord = strtolower($storedWord); + $word = strtolower($word); + } + return $word == $storedWord; + } + + /** + * Returns session instance + * + * @return Mage_Customer_Model_Session + */ + public function getSession() + { + return Mage::getSingleton('Mage_Customer_Model_Session'); + } + + /** + * Return full URL to captcha image + * + * @return string + */ + public function getImgSrc() + { + return $this->getImgUrl() . $this->getId() . $this->getSuffix(); + } + + /** + * log Attempt + * + * @param string $login + * @return Mage_Captcha_Model_Zend + */ + public function logAttempt($login) + { + if ($this->_isEnabled() && in_array($this->_formId, $this->_getTargetForms())) { + Mage::getResourceModel('Mage_Captcha_Model_Resource_Log')->logAttempt($login); + if ($this->_isOverLimitLoginAttempts($login)) { + $this->getSession()->setData($this->_getFormIdKey('show_captcha'), 1); + } + } + return $this; + } + + /** + * Returns path for the font file, chosen to generate captcha + * + * @return string + */ + protected function _getFontPath() + { + $font = (string)$this->_getHelper()->getConfigNode('font'); + $fonts = $this->_getHelper()->getFonts(); + + if (isset($fonts[$font])) { + $fontPath = $fonts[$font]['path']; + } else { + $fontData = array_shift($fonts); + $fontPath = $fontData['path']; + } + + return $fontPath; + } + + /** + * Returns captcha helper + * + * @return Mage_Captcha_Helper_Data + */ + protected function _getHelper() + { + if (empty($this->_helper)) { + $this->_helper = Mage::helper('Mage_Captcha_Helper_Data'); + } + return $this->_helper; + } + + /** + * Generate word used for captcha render + * + * @return string + */ + protected function _generateWord() + { + $word = ''; + $symbols = $this->_getSymbols(); + $wordLen = $this->_getWordLen(); + for ($i = 0; $i < $wordLen; $i++) { + $word .= $symbols[array_rand($symbols)]; + } + return $word; + } + + /** + * Get symbols array to use for word generation + * + * @return array + */ + protected function _getSymbols() + { + return str_split((string)$this->_getHelper()->getConfigNode('symbols')); + } + + /** + * Returns length for generating captcha word. This value may be dynamic. + * + * @return int + */ + protected function _getWordLen() + { + $from = 0; + $to = 0; + $length = (string)$this->_getHelper()->getConfigNode('length'); + if (!is_numeric($length)) { + if (preg_match('/(\d+)-(\d+)/', $length, $matches)) { + $from = (int)$matches[1]; + $to = (int)$matches[2]; + } + } else { + $from = (int)$length; + $to = (int)$length; + } + + if (($to < $from) || ($from < 1) || ($to < 1)) { + $from = self::DEFAULT_WORD_LENGTH_FROM; + $to = self::DEFAULT_WORD_LENGTH_TO; + } + + return mt_rand($from, $to); + } + + /** + * Whether to show captcha for this form every time + * + * @return bool + */ + protected function _isShowAlways() + { + if ((string)$this->_getHelper()->getConfigNode('mode') == Mage_Captcha_Helper_Data::MODE_ALWAYS) { + return true; + } + + $alwaysFor = $this->_getHelper()->getConfigNode('always_for'); + foreach ($alwaysFor as $nodeFormId => $isAlwaysFor) { + if ($isAlwaysFor && $this->_formId == $nodeFormId) { + return true; + } + } + + return false; + } + + /** + * Whether captcha is enabled at this area + * + * @return bool + */ + protected function _isEnabled() + { + return (string)$this->_getHelper()->getConfigNode('enable'); + } + + /** + * Retrieve list of forms where captcha must be shown + * + * For frontend this list is based on current website + * + * @return array + */ + protected function _getTargetForms() + { + $formsString = (string) $this->_getHelper()->getConfigNode('forms'); + return explode(',', $formsString); + } + + /** + * Get captcha word + * + * @return string + */ + public function getWord() + { + $sessionData = $this->getSession()->getData($this->_getFormIdKey(self::SESSION_WORD)); + return time() < $sessionData['expires'] ? $sessionData['data'] : null; + } + + /** + * Set captcha word + * + * @param string $word + * @return Zend_Captcha_Word + */ + protected function _setWord($word) + { + $this->getSession()->setData($this->_getFormIdKey(self::SESSION_WORD), + array('data' => $word, 'expires' => time() + $this->getTimeout()) + ); + $this->_word = $word; + return $this; + } + + /** + * Set captcha word + * + * @return Mage_Captcha_Model_Zend + */ + protected function _clearWord() + { + $this->getSession()->unsetData($this->_getFormIdKey(self::SESSION_WORD)); + $this->_word = null; + return $this; + } + + /** + * Override function to generate less curly captcha that will not cut off + * + * @see Zend_Captcha_Image::_randomSize() + * @return int + */ + protected function _randomSize() + { + return mt_rand(280, 300) / 100; + } + + /** + * Overlap of the parent method + * + * Now deleting old captcha images make crontab script + * @see Mage_Captcha_Model_Observer::deleteExpiredImages + */ + protected function _gc() + { + //do nothing + } +} diff --git a/app/code/core/Mage/Captcha/controllers/Adminhtml/RefreshController.php b/app/code/core/Mage/Captcha/controllers/Adminhtml/RefreshController.php new file mode 100755 index 0000000000000..09d0f5fb21872 --- /dev/null +++ b/app/code/core/Mage/Captcha/controllers/Adminhtml/RefreshController.php @@ -0,0 +1,50 @@ + + */ +class Mage_Captcha_Adminhtml_RefreshController extends Mage_Adminhtml_Controller_Action +{ + /** + * Refreshes captcha and returns JSON encoded URL to image (AJAX action) + * Example: {'imgSrc': 'http://example.com/media/captcha/67842gh187612ngf8s.png'} + * + * @return null + */ + public function refreshAction() + { + $formId = $this->getRequest()->getPost('formId'); + $captchaModel = Mage::helper('Mage_Captcha_Helper_Data')->getCaptcha($formId); + $this->getLayout()->createBlock($captchaModel->getBlockName())->setFormId($formId)->setIsAjax(true)->toHtml(); + $this->getResponse()->setBody(json_encode(array('imgSrc' => $captchaModel->getImgSrc()))); + $this->setFlag('', self::FLAG_NO_POST_DISPATCH, true); + } +} diff --git a/app/code/core/Mage/Captcha/controllers/RefreshController.php b/app/code/core/Mage/Captcha/controllers/RefreshController.php new file mode 100755 index 0000000000000..dcc3c7f1815d8 --- /dev/null +++ b/app/code/core/Mage/Captcha/controllers/RefreshController.php @@ -0,0 +1,50 @@ + + */ +class Mage_Captcha_RefreshController extends Mage_Core_Controller_Front_Action +{ + /** + * Refreshes captcha and returns JSON encoded URL to image (AJAX action) + * Example: {'imgSrc': 'http://example.com/media/captcha/67842gh187612ngf8s.png'} + * + * @return null + */ + public function indexAction() + { + $formId = $this->getRequest()->getPost('formId'); + $captchaModel = Mage::helper('Mage_Captcha_Helper_Data')->getCaptcha($formId); + $this->getLayout()->createBlock($captchaModel->getBlockName())->setFormId($formId)->setIsAjax(true)->toHtml(); + $this->getResponse()->setBody(json_encode(array('imgSrc' => $captchaModel->getImgSrc()))); + $this->setFlag('', self::FLAG_NO_POST_DISPATCH, true); + } +} diff --git a/app/code/core/Mage/Captcha/etc/config.xml b/app/code/core/Mage/Captcha/etc/config.xml new file mode 100755 index 0000000000000..a16dd6d31fba1 --- /dev/null +++ b/app/code/core/Mage/Captcha/etc/config.xml @@ -0,0 +1,250 @@ + + + + + + 1.7.0.0.0 + + + + + + + Mage_Captcha + + + + + + + + Mage_Captcha_Model_Observer + checkUserLogin + + + + + + + Mage_Captcha_Model_Observer + checkForgotPassword + + + + + + + Mage_Captcha_Model_Observer + checkUserCreate + + + + + + + Mage_Captcha_Model_Observer + checkUserForgotPasswordBackend + + + + + + + Mage_Captcha_Model_Observer + checkUserLoginBackend + + + + + + + Mage_Captcha_Model_Observer + checkGuestCheckout + + + Mage_Captcha_Model_Observer + checkRegisterCheckout + + + + + + + Mage_Captcha_Model_Observer + resetAttemptForFrontend + + + + + + + Mage_Captcha_Model_Observer + resetAttemptForBackend + + + + + + + + + standard + + Mage_Captcha + captcha + + + + + + + layout.xml + + + + + + + + + + Mage_Captcha_Adminhtml + + + + + + + + + + layout.xml + + + + + + + + zend + 0 + linlibertine + after_fail + backend_forgotpassword + 3 + 1000 + 7 + 4-5 + ABCDEFGHJKMnpqrstuvwxyz23456789 + 0 + + 1 + + + + + + zend + 0 + linlibertine + after_fail + user_forgotpassword + 3 + 1000 + 7 + 4-5 + ABCDEFGHJKMnpqrstuvwxyz23456789 + 0 + + 1 + 1 + 1 + 1 + + + + + + + + lib/LinLibertineFont/LinLibertine_Bd-2.8.1.ttf + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */30 * * * * + + + Mage_Captcha_Model_Observer::deleteOldAttempts + + + + + */10 * * * * + + + Mage_Captcha_Model_Observer::deleteExpiredImages + + + + + + diff --git a/app/code/core/Mage/Captcha/etc/system.xml b/app/code/core/Mage/Captcha/etc/system.xml new file mode 100755 index 0000000000000..a0b1e6e7232bd --- /dev/null +++ b/app/code/core/Mage/Captcha/etc/system.xml @@ -0,0 +1,250 @@ + + + + + + + + + text + 50 + 1 + 1 + 0 + + + + select + Mage_Adminhtml_Model_System_Config_Source_Yesno + 1 + 1 + 0 + 0 + + + + select + Mage_Captcha_Model_Config_Font + 2 + 1 + 0 + 0 + 1 + + + + multiselect + Mage_Captcha_Model_Config_Form_Backend + 3 + 1 + 0 + 0 + 1 + + + + select + Mage_Captcha_Model_Config_Mode + 4 + 1 + 0 + 0 + 1 + + + + text + If 0 is specified, CAPTCHA on the Login form will be always available. + 5 + 1 + 0 + 0 + + after_fail + 1 + + required-entry validate-digits + + + + text + 6 + 1 + 0 + 0 + 1 + required-entry validate-digits + + + + text + Please specify 8 symbols at the most. Range allowed (e.g. 3-5) + 7 + 1 + 0 + 0 + 1 + required-entry + + + + text + Similar looking characters (e.g. "i", "l", "1") decrease chance of correct recognition by customer.]]> + 8 + 1 + 0 + 0 + 1 + required-entry validate-alphanum + + + + select + Mage_Adminhtml_Model_System_Config_Source_Yesno + 9 + 1 + 0 + 0 + 1 + + + + + + + + + + text + 110 + 1 + 1 + 0 + + + + select + Mage_Adminhtml_Model_System_Config_Source_Yesno + 1 + 1 + 1 + 0 + + + + select + Mage_Captcha_Model_Config_Font + 2 + 1 + 1 + 0 + 1 + + + + multiselect + Mage_Captcha_Model_Config_Form_Frontend + CAPTCHA for "Create user" and "Forgot password" forms is always enabled if chosen + 3 + 1 + 1 + 0 + 1 + + + + select + Mage_Captcha_Model_Config_Mode + 4 + 1 + 1 + 0 + 1 + + + + text + If 0 is specified, CAPTCHA on the Login form will be always available. + 5 + 1 + 1 + 0 + + 1 + after_fail + + required-entry validate-digits + + + + text + 6 + 1 + 1 + 0 + 1 + required-entry validate-digits + + + + text + Please specify 8 symbols at the most. Range allowed (e.g. 3-5) + 7 + 1 + 1 + 0 + 1 + required-entry + + + + text + Similar looking characters (e.g. "i", "l", "1") decrease chance of correct recognition by customer.]]> + 8 + 1 + 1 + 0 + 1 + required-entry validate-alphanum + + + + select + Mage_Adminhtml_Model_System_Config_Source_Yesno + 9 + 1 + 1 + 0 + 1 + + + + + + + diff --git a/app/code/core/Mage/Captcha/sql/captcha_setup/install-1.7.0.0.0.php b/app/code/core/Mage/Captcha/sql/captcha_setup/install-1.7.0.0.0.php new file mode 100644 index 0000000000000..82d3f62952749 --- /dev/null +++ b/app/code/core/Mage/Captcha/sql/captcha_setup/install-1.7.0.0.0.php @@ -0,0 +1,52 @@ +startSetup(); + +$table = $installer->getConnection() + ->newTable($installer->getTable('captcha_log')) + ->addColumn('type', Varien_Db_Ddl_Table::TYPE_TEXT, 32, array( + 'nullable' => false, + 'primary' => true, + ), 'Type') + ->addColumn('value', Varien_Db_Ddl_Table::TYPE_TEXT, 32, array( + 'nullable' => false, + 'unsigned' => true, + 'primary' => true, + ), 'Value') + ->addColumn('count', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array( + 'unsigned' => true, + 'nullable' => false, + 'default' => '0', + ), 'Count') + ->addColumn('updated_at', Varien_Db_Ddl_Table::TYPE_TIMESTAMP, null, array(), 'Update Time') + ->setComment('Count Login Attempts'); +$installer->getConnection()->createTable($table); + +$installer->endSetup(); diff --git a/app/code/core/Mage/Captcha/view/adminhtml/layout.xml b/app/code/core/Mage/Captcha/view/adminhtml/layout.xml new file mode 100644 index 0000000000000..0ae5f1a74e49d --- /dev/null +++ b/app/code/core/Mage/Captcha/view/adminhtml/layout.xml @@ -0,0 +1,47 @@ + + + + + + + backend_login + 226 + 50 + + + + + + + backend_forgotpassword + 226 + 50 + + + + diff --git a/app/code/core/Mage/Captcha/view/adminhtml/reload.png b/app/code/core/Mage/Captcha/view/adminhtml/reload.png new file mode 100644 index 0000000000000000000000000000000000000000..2b1e64bc158ab6cb284628823b12db2af8565dfc GIT binary patch literal 1538 zcmV+d2L1VoP)eB=yHf4Sggd%J(+ zb#*;&!=@*Lqmn;x6mNJ7048W+8g;-Tejc~GANT3!NJh7jEPjkzDmrHQ=ArCB-)lh_ zya?_3I^g{yMW?Ie9P<164hz;3FDLo^FW?Pr#>N5R^hx5`E9ljGU@cB}8EJHVFwX z{f+hqf4~L}Fctv4c!PNEBC30c?9P2C*9B`p$D(q1KU>JYkZlI<0aX{k&3c=??(S!; zjUA_J1OCou0SG6L(?0WCY^z2`J!{g);EwOXE01AXE1ed$YS^R=I>zfN9mq7>6VUhs z;K`VBWDp(U^bX>54Pe4L@yuCl>s}|jjyyX6Yp~VpH2?e>Rs;l0*ub2*A3 z960X+h@uD5oY+)UzJz!_roM!(&OzG5V!_%^tI#ddyDMk`93KjU;ATO2paT%?D~H~- zLl%uuHeMCI+9EjjE8^?#Vv`8H_-||+Je>Wybuw4w?Q|Xe0p7?inkRlv`_wP6Q6$coPS3y2_Z=GP*X4IA9db zW?~ls6hNhJ<{GiND4rOVadCUgxaA4l4V$pRGRf>ah!df5&iax<0srZj$v^Wl;$?|v zj$^9V5Km~tcCu2}GwXwPWiejvEvUB#2E3!bD+L6>q@Wz!@(!~5zDrU$g>BA*wW#7K z&d7dpPrZaH_M@vaM3cV;-LOW`m1_Eziwp7nb--_?!+5c2{;_pDGdbKR`%y@I>ph&l zZ8$v>Zo7wA|>(xzNCEvuv|dik>Gyfi!t+m={W6~tiK|9bZ^NZ<)vs3NYkDYA1I=zs*e|k1z>Tx#NYL>On->ZC!h?s_)!fNTxpeIG#T<7dIpQ$f$ol o;J-}KQQTU^21tR&{wCJ!KhPV +getCaptchaModel() ?> + +
+
+
+
+ +
+
+ <?php echo $this->__('Reload captcha') ?> + +
+
+isCaseSensitive()) :?> +
+

__('Attention: Captcha is case sensitive.') ?>

+
+ + diff --git a/app/code/core/Mage/Captcha/view/frontend/layout.xml b/app/code/core/Mage/Captcha/view/frontend/layout.xml new file mode 100644 index 0000000000000..8de21d6a6a17a --- /dev/null +++ b/app/code/core/Mage/Captcha/view/frontend/layout.xml @@ -0,0 +1,105 @@ + + + + + + + + + mage/captcha.js + + user_login + 230 + 50 + + + + + + + + + + mage/captcha.js + + user_forgotpassword + 230 + 50 + + + + + + + + + + mage/captcha.js + + user_create + 230 + 50 + + + + + + + + + + mage/captcha.js + + user_login + 230 + 50 + + + + + + + + mage/captcha.js + + guest_checkout + 230 + 50 + + + + mage/captcha.js + + register_during_checkout + 230 + 50 + + + + + diff --git a/app/code/core/Mage/Captcha/view/frontend/reload.png b/app/code/core/Mage/Captcha/view/frontend/reload.png new file mode 100644 index 0000000000000000000000000000000000000000..2b1e64bc158ab6cb284628823b12db2af8565dfc GIT binary patch literal 1538 zcmV+d2L1VoP)eB=yHf4Sggd%J(+ zb#*;&!=@*Lqmn;x6mNJ7048W+8g;-Tejc~GANT3!NJh7jEPjkzDmrHQ=ArCB-)lh_ zya?_3I^g{yMW?Ie9P<164hz;3FDLo^FW?Pr#>N5R^hx5`E9ljGU@cB}8EJHVFwX z{f+hqf4~L}Fctv4c!PNEBC30c?9P2C*9B`p$D(q1KU>JYkZlI<0aX{k&3c=??(S!; zjUA_J1OCou0SG6L(?0WCY^z2`J!{g);EwOXE01AXE1ed$YS^R=I>zfN9mq7>6VUhs z;K`VBWDp(U^bX>54Pe4L@yuCl>s}|jjyyX6Yp~VpH2?e>Rs;l0*ub2*A3 z960X+h@uD5oY+)UzJz!_roM!(&OzG5V!_%^tI#ddyDMk`93KjU;ATO2paT%?D~H~- zLl%uuHeMCI+9EjjE8^?#Vv`8H_-||+Je>Wybuw4w?Q|Xe0p7?inkRlv`_wP6Q6$coPS3y2_Z=GP*X4IA9db zW?~ls6hNhJ<{GiND4rOVadCUgxaA4l4V$pRGRf>ah!df5&iax<0srZj$v^Wl;$?|v zj$^9V5Km~tcCu2}GwXwPWiejvEvUB#2E3!bD+L6>q@Wz!@(!~5zDrU$g>BA*wW#7K z&d7dpPrZaH_M@vaM3cV;-LOW`m1_Eziwp7nb--_?!+5c2{;_pDGdbKR`%y@I>ph&l zZ8$v>Zo7wA|>(xzNCEvuv|dik>Gyfi!t+m={W6~tiK|9bZ^NZ<)vs3NYkDYA1I=zs*e|k1z>Tx#NYL>On->ZC!h?s_)!fNTxpeIG#T<7dIpQ$f$ol o;J-}KQQTU^21tR&{wCJ!KhPV + + + +getCaptchaModel() ?> +
  • + +
    + +
    +
  • +
  • +
    + + <?php echo $this->__('Reload captcha') ?> + + isCaseSensitive()) :?> +
    + __('Attention: Captcha is case sensitive.') ?> +
    + +
    +
  • diff --git a/app/code/core/Mage/Catalog/Block/Breadcrumbs.php b/app/code/core/Mage/Catalog/Block/Breadcrumbs.php index da650999bc3b4..0691777e5a90d 100644 --- a/app/code/core/Mage/Catalog/Block/Breadcrumbs.php +++ b/app/code/core/Mage/Catalog/Block/Breadcrumbs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Category/View.php b/app/code/core/Mage/Catalog/Block/Category/View.php index c2483404c1b88..a0debf7483c8b 100644 --- a/app/code/core/Mage/Catalog/Block/Category/View.php +++ b/app/code/core/Mage/Catalog/Block/Category/View.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Category/Widget/Link.php b/app/code/core/Mage/Catalog/Block/Category/Widget/Link.php index 696522d54d583..8427a9b15655b 100644 --- a/app/code/core/Mage/Catalog/Block/Category/Widget/Link.php +++ b/app/code/core/Mage/Catalog/Block/Category/Widget/Link.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Layer/Filter/Abstract.php b/app/code/core/Mage/Catalog/Block/Layer/Filter/Abstract.php index 58b78d424bb46..2708dfe3c127b 100644 --- a/app/code/core/Mage/Catalog/Block/Layer/Filter/Abstract.php +++ b/app/code/core/Mage/Catalog/Block/Layer/Filter/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Layer/Filter/Attribute.php b/app/code/core/Mage/Catalog/Block/Layer/Filter/Attribute.php index 83a2d75a84b2e..fe03b2493db54 100644 --- a/app/code/core/Mage/Catalog/Block/Layer/Filter/Attribute.php +++ b/app/code/core/Mage/Catalog/Block/Layer/Filter/Attribute.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Layer/Filter/Category.php b/app/code/core/Mage/Catalog/Block/Layer/Filter/Category.php index afd22e7e1d7cf..46207e73de6fe 100644 --- a/app/code/core/Mage/Catalog/Block/Layer/Filter/Category.php +++ b/app/code/core/Mage/Catalog/Block/Layer/Filter/Category.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Layer/Filter/Decimal.php b/app/code/core/Mage/Catalog/Block/Layer/Filter/Decimal.php index 93b6edb25c49e..60e16e8ebb9d9 100644 --- a/app/code/core/Mage/Catalog/Block/Layer/Filter/Decimal.php +++ b/app/code/core/Mage/Catalog/Block/Layer/Filter/Decimal.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Layer/Filter/Price.php b/app/code/core/Mage/Catalog/Block/Layer/Filter/Price.php index 17d921e212164..bc89dc30bb006 100644 --- a/app/code/core/Mage/Catalog/Block/Layer/Filter/Price.php +++ b/app/code/core/Mage/Catalog/Block/Layer/Filter/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Layer/State.php b/app/code/core/Mage/Catalog/Block/Layer/State.php index ba978e2c0710b..2fbfa9486c9df 100644 --- a/app/code/core/Mage/Catalog/Block/Layer/State.php +++ b/app/code/core/Mage/Catalog/Block/Layer/State.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Layer/View.php b/app/code/core/Mage/Catalog/Block/Layer/View.php index 686c77eaa7d84..dd991f8cb6e7f 100644 --- a/app/code/core/Mage/Catalog/Block/Layer/View.php +++ b/app/code/core/Mage/Catalog/Block/Layer/View.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -230,4 +230,14 @@ protected function _getPriceFilter() { return $this->getChild('_price_filter'); } + + /** + * Get url for 'Clear All' link + * + * @return string + */ + public function getClearUrl() + { + return $this->getChild('layer_state')->getClearUrl(); + } } diff --git a/app/code/core/Mage/Catalog/Block/Navigation.php b/app/code/core/Mage/Catalog/Block/Navigation.php index 1cc141ed9ecef..0f11913005435 100644 --- a/app/code/core/Mage/Catalog/Block/Navigation.php +++ b/app/code/core/Mage/Catalog/Block/Navigation.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product.php b/app/code/core/Mage/Catalog/Block/Product.php index 18d6de8c5158b..348d004a9fa55 100644 --- a/app/code/core/Mage/Catalog/Block/Product.php +++ b/app/code/core/Mage/Catalog/Block/Product.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/Abstract.php b/app/code/core/Mage/Catalog/Block/Product/Abstract.php index b5dfbecc11427..1177c24dee280 100644 --- a/app/code/core/Mage/Catalog/Block/Product/Abstract.php +++ b/app/code/core/Mage/Catalog/Block/Product/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -344,12 +344,19 @@ public function getTierPrices($product = null) $res = array(); if (is_array($prices)) { foreach ($prices as $price) { - $price['price_qty'] = $price['price_qty']*1; - if ($product->getPrice() != $product->getFinalPrice()) { + $price['price_qty'] = $price['price_qty'] * 1; + + $_productPrice = $product->getPrice(); + if ($_productPrice != $product->getFinalPrice()) { $_productPrice = $product->getFinalPrice(); - } else { - $_productPrice = $product->getPrice(); } + + // Group price must be used for percent calculation if it is lower + $groupPrice = $product->getGroupPrice(); + if ($_productPrice > $groupPrice) { + $_productPrice = $groupPrice; + } + if ($price['price'] < $_productPrice) { $price['savePercent'] = ceil(100 - ((100 / $_productPrice) * $price['price'])); diff --git a/app/code/core/Mage/Catalog/Block/Product/Compare/Abstract.php b/app/code/core/Mage/Catalog/Block/Product/Compare/Abstract.php index 220cf59e88947..2e670812eb032 100644 --- a/app/code/core/Mage/Catalog/Block/Product/Compare/Abstract.php +++ b/app/code/core/Mage/Catalog/Block/Product/Compare/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/Compare/List.php b/app/code/core/Mage/Catalog/Block/Product/Compare/List.php index dc0cbe9d101a7..8b7ef5afd30a0 100644 --- a/app/code/core/Mage/Catalog/Block/Product/Compare/List.php +++ b/app/code/core/Mage/Catalog/Block/Product/Compare/List.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/Compare/Sidebar.php b/app/code/core/Mage/Catalog/Block/Product/Compare/Sidebar.php index 63bddb8974a7f..29899bf186631 100644 --- a/app/code/core/Mage/Catalog/Block/Product/Compare/Sidebar.php +++ b/app/code/core/Mage/Catalog/Block/Product/Compare/Sidebar.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/Gallery.php b/app/code/core/Mage/Catalog/Block/Product/Gallery.php index c8bd70b7c3fb2..75c47245a509c 100644 --- a/app/code/core/Mage/Catalog/Block/Product/Gallery.php +++ b/app/code/core/Mage/Catalog/Block/Product/Gallery.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/List.php b/app/code/core/Mage/Catalog/Block/Product/List.php index 422a46a226d90..d2b02ce4d5456 100644 --- a/app/code/core/Mage/Catalog/Block/Product/List.php +++ b/app/code/core/Mage/Catalog/Block/Product/List.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/List/Crosssell.php b/app/code/core/Mage/Catalog/Block/Product/List/Crosssell.php index bd7bae35aaf9f..4eea20cd68e10 100644 --- a/app/code/core/Mage/Catalog/Block/Product/List/Crosssell.php +++ b/app/code/core/Mage/Catalog/Block/Product/List/Crosssell.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/List/Promotion.php b/app/code/core/Mage/Catalog/Block/Product/List/Promotion.php index c3dfa32363315..fb3c95fd87a53 100755 --- a/app/code/core/Mage/Catalog/Block/Product/List/Promotion.php +++ b/app/code/core/Mage/Catalog/Block/Product/List/Promotion.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Catalog_Block_Product_List_Promotion extends Mage_Catalog_Block_Product_List diff --git a/app/code/core/Mage/Catalog/Block/Product/List/Random.php b/app/code/core/Mage/Catalog/Block/Product/List/Random.php index a5610d7c3dce6..ad9caf80990b7 100644 --- a/app/code/core/Mage/Catalog/Block/Product/List/Random.php +++ b/app/code/core/Mage/Catalog/Block/Product/List/Random.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/List/Related.php b/app/code/core/Mage/Catalog/Block/Product/List/Related.php index cf161f33f3451..cd8b13f1ad0c8 100644 --- a/app/code/core/Mage/Catalog/Block/Product/List/Related.php +++ b/app/code/core/Mage/Catalog/Block/Product/List/Related.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php b/app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php index e6757d941f9f0..0cd04af31b435 100644 --- a/app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php +++ b/app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/List/Upsell.php b/app/code/core/Mage/Catalog/Block/Product/List/Upsell.php index a0a42a93c0f67..4f3b7311b51bf 100644 --- a/app/code/core/Mage/Catalog/Block/Product/List/Upsell.php +++ b/app/code/core/Mage/Catalog/Block/Product/List/Upsell.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/New.php b/app/code/core/Mage/Catalog/Block/Product/New.php index 5ae9a8c4d81df..6670455b7634d 100644 --- a/app/code/core/Mage/Catalog/Block/Product/New.php +++ b/app/code/core/Mage/Catalog/Block/Product/New.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -81,19 +81,26 @@ public function getCacheKeyInfo() */ protected function _beforeToHtml() { - $todayDate = Mage::app()->getLocale()->date()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT); + $todayStartOfDayDate = Mage::app()->getLocale()->date() + ->setTime('00:00:00') + ->toString(Varien_Date::DATETIME_INTERNAL_FORMAT); + + $todayEndOfDayDate = Mage::app()->getLocale()->date() + ->setTime('23:59:59') + ->toString(Varien_Date::DATETIME_INTERNAL_FORMAT); $collection = Mage::getResourceModel('Mage_Catalog_Model_Resource_Product_Collection'); $collection->setVisibility(Mage::getSingleton('Mage_Catalog_Model_Product_Visibility')->getVisibleInCatalogIds()); + $collection = $this->_addProductAttributesAndPrices($collection) ->addStoreFilter() ->addAttributeToFilter('news_from_date', array('or'=> array( - 0 => array('date' => true, 'to' => $todayDate), + 0 => array('date' => true, 'to' => $todayEndOfDayDate), 1 => array('is' => new Zend_Db_Expr('null'))) ), 'left') ->addAttributeToFilter('news_to_date', array('or'=> array( - 0 => array('date' => true, 'from' => $todayDate), + 0 => array('date' => true, 'from' => $todayStartOfDayDate), 1 => array('is' => new Zend_Db_Expr('null'))) ), 'left') ->addAttributeToFilter( diff --git a/app/code/core/Mage/Catalog/Block/Product/Price.php b/app/code/core/Mage/Catalog/Block/Product/Price.php index 406985816b63d..672bb8bfd7087 100644 --- a/app/code/core/Mage/Catalog/Block/Product/Price.php +++ b/app/code/core/Mage/Catalog/Block/Product/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -72,21 +72,26 @@ public function getTierPrices($product = null) if (is_null($product)) { $product = $this->getProduct(); } - $prices = $product->getFormatedTierPrice(); + $prices = $product->getFormatedTierPrice(); $res = array(); if (is_array($prices)) { foreach ($prices as $price) { - $price['price_qty'] = $price['price_qty']*1; + $price['price_qty'] = $price['price_qty'] * 1; + $productPrice = $product->getPrice(); if ($product->getPrice() != $product->getFinalPrice()) { $productPrice = $product->getFinalPrice(); - } else { - $productPrice = $product->getPrice(); } - if ($price['price']<$productPrice) { - $price['savePercent'] = ceil(100 - (( 100/$productPrice ) * $price['price'] )); + // Group price must be used for percent calculation if it is lower + $groupPrice = $product->getGroupPrice(); + if ($productPrice > $groupPrice) { + $productPrice = $groupPrice; + } + + if ($price['price'] < $productPrice) { + $price['savePercent'] = ceil(100 - ((100 / $productPrice) * $price['price'])); $tierPrice = Mage::app()->getStore()->convertPrice( Mage::helper('Mage_Tax_Helper_Data')->getPrice($product, $price['website_price']) diff --git a/app/code/core/Mage/Catalog/Block/Product/Price/Template.php b/app/code/core/Mage/Catalog/Block/Product/Price/Template.php index 8ae93ac6c27f9..10f03d6d07670 100644 --- a/app/code/core/Mage/Catalog/Block/Product/Price/Template.php +++ b/app/code/core/Mage/Catalog/Block/Product/Price/Template.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/Send.php b/app/code/core/Mage/Catalog/Block/Product/Send.php index f193c10dde9d3..b141a1c27068a 100644 --- a/app/code/core/Mage/Catalog/Block/Product/Send.php +++ b/app/code/core/Mage/Catalog/Block/Product/Send.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/View.php b/app/code/core/Mage/Catalog/Block/Product/View.php index f0bd3b7937571..ff895feb96202 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View.php +++ b/app/code/core/Mage/Catalog/Block/Product/View.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -122,7 +122,7 @@ public function getAddToCartUrl($product, $additional = array()) } $addUrlKey = Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED; - $addUrlValue = Mage::getUrl('*/*/*', array('_use_rewrite' => true, '_current' => false)); + $addUrlValue = Mage::getUrl('*/*/*', array('_use_rewrite' => true, '_current' => true)); $additional[$addUrlKey] = Mage::helper('Mage_Core_Helper_Data')->urlEncode($addUrlValue); return $this->helper('Mage_Checkout_Helper_Cart')->getAddUrl($product, $additional); @@ -254,4 +254,4 @@ public function getProductDefaultQty($product = null) return $qty; } -} +} \ No newline at end of file diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Abstract.php b/app/code/core/Mage/Catalog/Block/Product/View/Abstract.php index 53ec921ae3b9d..28529dc2dd5a4 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Abstract.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Additional.php b/app/code/core/Mage/Catalog/Block/Product/View/Additional.php index a658e1e1dcdd3..14beb1bf0e2b3 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Additional.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Additional.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Attributes.php b/app/code/core/Mage/Catalog/Block/Product/View/Attributes.php index 79acac48b7abd..dc80de96fd7b9 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Attributes.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Attributes.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Description.php b/app/code/core/Mage/Catalog/Block/Product/View/Description.php index 27bd2f2f8a583..223f1268ad43c 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Description.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Description.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Media.php b/app/code/core/Mage/Catalog/Block/Product/View/Media.php index 93456f5ee3ccc..f5c5c40072ca0 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Media.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Media.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Options.php b/app/code/core/Mage/Catalog/Block/Product/View/Options.php index ea8cf3e9258ae..9f7c34416b70d 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Options.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Options.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -135,6 +135,29 @@ public function hasOptions() return false; } + /** + * Get price configuration + * + * @param Mage_Catalog_Model_Product_Option_Value|Mage_Catalog_Model_Product_Option $option + * @return array + */ + protected function _getPriceConfiguration($option) + { + $data = array(); + $data['price'] = Mage::helper('Mage_Core_Helper_Data')->currency($option->getPrice(true), false, false); + $data['oldPrice'] = Mage::helper('Mage_Core_Helper_Data')->currency($option->getPrice(false), false, false); + $data['priceValue'] = $option->getPrice(false); + $data['type'] = $option->getPriceType(); + $data['excludeTax'] = $price = Mage::helper('Mage_Tax_Helper_Data')->getPrice($option->getProduct(), $data['price'], false); + $data['includeTax'] = $price = Mage::helper('Mage_Tax_Helper_Data')->getPrice($option->getProduct(), $data['price'], true); + return $data; + } + + /** + * Get json representation of + * + * @return string + */ public function getJsonConfig() { $config = array(); @@ -146,11 +169,12 @@ public function getJsonConfig() $_tmpPriceValues = array(); foreach ($option->getValues() as $value) { /* @var $value Mage_Catalog_Model_Product_Option_Value */ - $_tmpPriceValues[$value->getId()] = Mage::helper('Mage_Core_Helper_Data')->currency($value->getPrice(true), false, false); + $id = $value->getId(); + $_tmpPriceValues[$id] = $this->_getPriceConfiguration($value); } $priceValue = $_tmpPriceValues; } else { - $priceValue = Mage::helper('Mage_Core_Helper_Data')->currency($option->getPrice(true), false, false); + $priceValue = $this->_getPriceConfiguration($option); } $config[$option->getId()] = $priceValue; } diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Options/Abstract.php b/app/code/core/Mage/Catalog/Block/Product/View/Options/Abstract.php index f01852ec6f64f..4c01454682825 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Options/Abstract.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Options/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -96,8 +96,8 @@ public function getFormatedPrice() { if ($option = $this->getOption()) { return $this->_formatPrice(array( - 'is_percent' => ($option->getPriceType() == 'percent') ? true : false, - 'pricing_value' => $option->getPrice(true) + 'is_percent' => ($option->getPriceType() == 'percent'), + 'pricing_value' => $option->getPrice($option->getPriceType() == 'percent') )); } return ''; diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Date.php b/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Date.php index 978d1f5990ce9..9a80a3a027c4d 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Date.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Date.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Default.php b/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Default.php index 8d683d7ef6469..f84c026a86620 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Default.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Default.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/File.php b/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/File.php index 3a2c96f944028..e36bb882e532c 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/File.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/File.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Select.php b/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Select.php index ed037f5a20276..efa36049637df 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Select.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Select.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -64,8 +64,8 @@ public function getValuesHtml() } foreach ($_option->getValues() as $_value) { $priceStr = $this->_formatPrice(array( - 'is_percent' => ($_value->getPriceType() == 'percent') ? true : false, - 'pricing_value' => $_value->getPrice(true) + 'is_percent' => ($_value->getPriceType() == 'percent'), + 'pricing_value' => $_value->getPrice(($_value->getPriceType() == 'percent')) ), false); $select->addOption( $_value->getOptionTypeId(), @@ -105,12 +105,11 @@ public function getValuesHtml() $type = 'radio'; $class = 'radio'; if (!$_option->getIsRequire()) { - $selectHtml .= '
  • getId() . '" class="' + . $class . ' product-custom-option" name="options[' . $_option->getId() . ']"' . ($this->getSkipJsReloadPrice() ? '' : ' onclick="opConfig.reloadPrice()"') . ' value="" checked="checked" />
  • '; + . $_option->getId() . '">' . $this->__('None') . ''; } break; case Mage_Catalog_Model_Product_Option::OPTION_TYPE_CHECKBOX: @@ -124,8 +123,8 @@ public function getValuesHtml() $count++; $priceStr = $this->_formatPrice(array( - 'is_percent' => ($_value->getPriceType() == 'percent') ? true : false, - 'pricing_value' => $_value->getPrice(true) + 'is_percent' => ($_value->getPriceType() == 'percent'), + 'pricing_value' => $_value->getPrice($_value->getPriceType() == 'percent') )); $htmlValue = $_value->getOptionTypeId(); @@ -135,19 +134,19 @@ public function getValuesHtml() $checked = $configValue == $htmlValue ? 'checked' : ''; } - $selectHtml .= '
  • ' . 'getSkipJsReloadPrice() ? '' : ' onclick="opConfig.reloadPrice()"') - . ' name="options[' . $_option->getId() . ']' . $arraySign . '" id="options_' - . $_option->getId() . '_' . $count . '" value="' . $htmlValue . '" ' . $checked . ' price="' - . $this->helper('Mage_Core_Helper_Data')->currencyByStore($_value->getPrice(true), $store, false) - . '" />' . '
  • '; } diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Text.php b/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Text.php index 697a12f317a66..597d145d4337d 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Text.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Options/Type/Text.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Price.php b/app/code/core/Mage/Catalog/Block/Product/View/Price.php index a3359f11c1bef..d8bca253b8783 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Price.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Tabs.php b/app/code/core/Mage/Catalog/Block/Product/View/Tabs.php index e2212d40c601f..5c6107cd9648a 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Tabs.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Type/Configurable.php b/app/code/core/Mage/Catalog/Block/Product/View/Type/Configurable.php index cf9a07de360f1..01c98a9657322 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Type/Configurable.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Type/Configurable.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -34,20 +34,41 @@ */ class Mage_Catalog_Block_Product_View_Type_Configurable extends Mage_Catalog_Block_Product_View_Abstract { + /** + * Prices + * + * @var array + */ protected $_prices = array(); + + /** + * Prepared prices + * + * @var array + */ protected $_resPrices = array(); + /** + * Get allowed attributes + * + * @return array + */ public function getAllowAttributes() { return $this->getProduct()->getTypeInstance() ->getConfigurableAttributes($this->getProduct()); } + /** + * Check if allowed attributes have options + * + * @return bool + */ public function hasOptions() { $attributes = $this->getAllowAttributes(); if (count($attributes)) { - foreach ($attributes as $key => $attribute) { + foreach ($attributes as $attribute) { /** @var Mage_Catalog_Model_Product_Type_Configurable_Attribute $attribute */ if ($attribute->getData('prices')) { return true; @@ -57,6 +78,11 @@ public function hasOptions() return false; } + /** + * Get Allowed Products + * + * @return array + */ public function getAllowProducts() { if (!$this->hasAllowProducts()) { @@ -171,11 +197,10 @@ public function getJsonConfig() 'id' => $value['value_index'], 'label' => $value['label'], 'price' => $configurablePrice, - 'oldPrice' => $this->_preparePrice($value['pricing_value'], $value['is_percent']), + 'oldPrice' => $this->_prepareOldPrice($value['pricing_value'], $value['is_percent']), 'products' => $productsIndex, ); $optionPrices[] = $configurablePrice; - //$this->_registerAdditionalJsPrice($value['pricing_value'], $value['is_percent']); } } /** @@ -224,7 +249,6 @@ public function getJsonConfig() $config = array( 'attributes' => $attributes, 'template' => str_replace('%s', '#{price}', $store->getCurrentCurrency()->getOutputFormat()), -// 'prices' => $this->_prices, 'basePrice' => $this->_registerJsPrice($this->_convertPrice($currentProduct->getFinalPrice())), 'oldPrice' => $this->_registerJsPrice($this->_convertPrice($currentProduct->getPrice())), 'productId' => $currentProduct->getId(), @@ -244,7 +268,7 @@ public function getJsonConfig() /** * Validating of super product option value * - * @param array $attribute + * @param array $attributeId * @param array $value * @param array $options * @return boolean @@ -272,26 +296,57 @@ protected function _validateAttributeInfo(&$info) return false; } - protected function _preparePrice($price, $isPercent=false) + /** + * Calculation real price + * + * @param float $price + * @param bool $isPercent + * @return mixed + */ + protected function _preparePrice($price, $isPercent = false) { if ($isPercent && !empty($price)) { - $price = $this->getProduct()->getFinalPrice()*$price/100; + $price = $this->getProduct()->getFinalPrice() * $price / 100; } return $this->_registerJsPrice($this->_convertPrice($price, true)); } - protected function _registerJsPrice($price) + /** + * Calculation price before special price + * + * @param float $price + * @param bool $isPercent + * @return mixed + */ + protected function _prepareOldPrice($price, $isPercent = false) { - $jsPrice = str_replace(',', '.', $price); + if ($isPercent && !empty($price)) { + $price = $this->getProduct()->getPrice() * $price / 100; + } -// if (!isset($this->_prices[$jsPrice])) { -// $this->_prices[$jsPrice] = strip_tags(Mage::app()->getStore()->formatPrice($price)); -// } - return $jsPrice; + return $this->_registerJsPrice($this->_convertPrice($price, true)); + } + + /** + * Replace ',' on '.' for js + * + * @param float $price + * @return string + */ + protected function _registerJsPrice($price) + { + return str_replace(',', '.', $price); } - protected function _convertPrice($price, $round=false) + /** + * Convert price from default currency to current currency + * + * @param float $price + * @param boolean $round + * @return float + */ + protected function _convertPrice($price, $round = false) { if (empty($price)) { return 0; @@ -302,32 +357,6 @@ protected function _convertPrice($price, $round=false) $price = $this->getCurrentStore()->roundPrice($price); } - return $price; } - -// protected function _registerAdditionalJsPrice($price, $isPercent=false) -// { -// if (empty($price) && isset($this->_prices[0])) { -// return $this; -// } -// -// $basePrice = $this->getProduct()->getFinalPrice(); -// if ($isPercent) { -// $price = $basePrice*$price/100; -// } -// else { -// $price = $price; -// } -// -// $price = $this->_convertPrice($price); -// -// foreach ($this->_resPrices as $prevPrice) { -// $additionalPrice = $prevPrice + $price; -// $this->_resPrices[] = $additionalPrice; -// $jsAdditionalPrice = str_replace(',', '.', $additionalPrice); -// $this->_prices[$jsAdditionalPrice] = strip_tags(Mage::app()->getStore()->formatPrice($additionalPrice)); -// } -// return $this; -// } } diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Type/Grouped.php b/app/code/core/Mage/Catalog/Block/Product/View/Type/Grouped.php index ded54996233d7..3453334b43159 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Type/Grouped.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Type/Grouped.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Type/Simple.php b/app/code/core/Mage/Catalog/Block/Product/View/Type/Simple.php index e2bf595398a39..fb4f9bb2eb7c0 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Type/Simple.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Type/Simple.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/View/Type/Virtual.php b/app/code/core/Mage/Catalog/Block/Product/View/Type/Virtual.php index f8f503579c75e..65f1c14fa12f8 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View/Type/Virtual.php +++ b/app/code/core/Mage/Catalog/Block/Product/View/Type/Virtual.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/Widget/Link.php b/app/code/core/Mage/Catalog/Block/Product/Widget/Link.php index 8adc3b0e82fd3..2d06f3d75e848 100644 --- a/app/code/core/Mage/Catalog/Block/Product/Widget/Link.php +++ b/app/code/core/Mage/Catalog/Block/Product/Widget/Link.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Product/Widget/New.php b/app/code/core/Mage/Catalog/Block/Product/Widget/New.php index bf93aae3aa090..6867d5b3b2407 100644 --- a/app/code/core/Mage/Catalog/Block/Product/Widget/New.php +++ b/app/code/core/Mage/Catalog/Block/Product/Widget/New.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Abstract.php b/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Abstract.php index fd1c7e7db517d..efc7f64167ad3 100644 --- a/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Abstract.php +++ b/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Category.php b/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Category.php index 88c8327f827fa..24b7c6f9d7308 100644 --- a/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Category.php +++ b/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Category.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Product.php b/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Product.php index ea509fac42ca2..f1db0a9f108b9 100644 --- a/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Product.php +++ b/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Product.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Tree/Category.php b/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Tree/Category.php index 63fa4697d109a..28789b5455af3 100644 --- a/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Tree/Category.php +++ b/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Tree/Category.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Tree/Pager.php b/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Tree/Pager.php index e0b4805cb7fed..b762f2a13ea7d 100644 --- a/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Tree/Pager.php +++ b/app/code/core/Mage/Catalog/Block/Seo/Sitemap/Tree/Pager.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Block/Widget/Link.php b/app/code/core/Mage/Catalog/Block/Widget/Link.php index 9c5121d15fc5d..e5c94172ba02e 100644 --- a/app/code/core/Mage/Catalog/Block/Widget/Link.php +++ b/app/code/core/Mage/Catalog/Block/Widget/Link.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Controller/Product/View/Interface.php b/app/code/core/Mage/Catalog/Controller/Product/View/Interface.php index 4f2a6e9790504..8e9f505193d72 100644 --- a/app/code/core/Mage/Catalog/Controller/Product/View/Interface.php +++ b/app/code/core/Mage/Catalog/Controller/Product/View/Interface.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Exception.php b/app/code/core/Mage/Catalog/Exception.php index 7a572a962a4fd..724265ed90675 100644 --- a/app/code/core/Mage/Catalog/Exception.php +++ b/app/code/core/Mage/Catalog/Exception.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Helper/Category.php b/app/code/core/Mage/Catalog/Helper/Category.php index 80ef7ac266dae..bcbe25149abb8 100644 --- a/app/code/core/Mage/Catalog/Helper/Category.php +++ b/app/code/core/Mage/Catalog/Helper/Category.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Helper/Category/Flat.php b/app/code/core/Mage/Catalog/Helper/Category/Flat.php index b8ed28b5a70b6..658e212f3ac07 100644 --- a/app/code/core/Mage/Catalog/Helper/Category/Flat.php +++ b/app/code/core/Mage/Catalog/Helper/Category/Flat.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Helper/Data.php b/app/code/core/Mage/Catalog/Helper/Data.php index ec849e2dfdfb8..1ec0743468e9d 100644 --- a/app/code/core/Mage/Catalog/Helper/Data.php +++ b/app/code/core/Mage/Catalog/Helper/Data.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Helper/Image.php b/app/code/core/Mage/Catalog/Helper/Image.php index 5aa6e8de7c5f2..1f92f4cd3aa3c 100644 --- a/app/code/core/Mage/Catalog/Helper/Image.php +++ b/app/code/core/Mage/Catalog/Helper/Image.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -31,22 +31,87 @@ */ class Mage_Catalog_Helper_Image extends Mage_Core_Helper_Abstract { + /** + * Current model + * + * @var Mage_Catalog_Model_Product_Image + */ protected $_model; + + /** + * Scheduled for resize image + * + * @var bool + */ protected $_scheduleResize = false; + + /** + * Scheduled for rotate image + * + * @var bool + */ protected $_scheduleRotate = false; + + /** + * Angle + * + * @var int + */ protected $_angle; + /** + * Watermark file name + * + * @var string + */ protected $_watermark; + + /** + * Watermark Position + * + * @var string + */ protected $_watermarkPosition; + + /** + * Watermark Size + * + * @var string + */ protected $_watermarkSize; + + /** + * Watermark Image opacity + * + * @var int + */ protected $_watermarkImageOpacity; + /** + * Current Product + * + * @var Mage_Catalog_Model_Product + */ protected $_product; + + /** + * Image File + * + * @var string + */ protected $_imageFile; + + /** + * Image Placeholder + * + * @var string + */ protected $_placeholder; /** - * Reset all previos data + * Reset all previous data + * + * @return Mage_Catalog_Helper_Image */ protected function _reset() { @@ -63,6 +128,14 @@ protected function _reset() return $this; } + /** + * Initialize Helper to work with Image + * + * @param Mage_Catalog_Model_Product $product + * @param string $attributeName + * @param mixed $imageFile + * @return Mage_Catalog_Helper_Image + */ public function init(Mage_Catalog_Model_Product $product, $attributeName, $imageFile=null) { $this->_reset(); @@ -70,17 +143,24 @@ public function init(Mage_Catalog_Model_Product $product, $attributeName, $image $this->_getModel()->setDestinationSubdir($attributeName); $this->setProduct($product); - $this->setWatermark(Mage::getStoreConfig("design/watermark/{$this->_getModel()->getDestinationSubdir()}_image")); - $this->setWatermarkImageOpacity(Mage::getStoreConfig("design/watermark/{$this->_getModel()->getDestinationSubdir()}_imageOpacity")); - $this->setWatermarkPosition(Mage::getStoreConfig("design/watermark/{$this->_getModel()->getDestinationSubdir()}_position")); - $this->setWatermarkSize(Mage::getStoreConfig("design/watermark/{$this->_getModel()->getDestinationSubdir()}_size")); + $this->setWatermark( + Mage::getStoreConfig("design/watermark/{$this->_getModel()->getDestinationSubdir()}_image") + ); + $this->setWatermarkImageOpacity( + Mage::getStoreConfig("design/watermark/{$this->_getModel()->getDestinationSubdir()}_imageOpacity") + ); + $this->setWatermarkPosition( + Mage::getStoreConfig("design/watermark/{$this->_getModel()->getDestinationSubdir()}_position") + ); + $this->setWatermarkSize( + Mage::getStoreConfig("design/watermark/{$this->_getModel()->getDestinationSubdir()}_size") + ); if ($imageFile) { $this->setImageFile($imageFile); - } - else { + } else { // add for work original size - $this->_getModel()->setBaseFile( $this->getProduct()->getData($this->_getModel()->getDestinationSubdir()) ); + $this->_getModel()->setBaseFile($this->getProduct()->getData($this->_getModel()->getDestinationSubdir())); } return $this; } @@ -198,6 +278,12 @@ public function backgroundColor($colorRGB) return $this; } + /** + * Rotate image into specified angle + * + * @param int $angle + * @return Mage_Catalog_Helper_Image + */ public function rotate($angle) { $this->setAngle($angle); @@ -225,11 +311,22 @@ public function watermark($fileName, $position, $size=null, $imageOpacity=null) return $this; } + /** + * Set placeholder + * + * @param string $fileName + * @return void + */ public function placeholder($fileName) { $this->_placeholder = $fileName; } + /** + * Get Placeholder + * + * @return string + */ public function getPlaceholder() { if (!$this->_placeholder) { @@ -239,41 +336,49 @@ public function getPlaceholder() return $this->_placeholder; } + /** + * Return Image URL + * + * @return string + */ public function __toString() { try { - if( $this->getImageFile() ) { - $this->_getModel()->setBaseFile( $this->getImageFile() ); + $model = $this->_getModel(); + + if ($this->getImageFile()) { + $model->setBaseFile($this->getImageFile()); } else { - $this->_getModel()->setBaseFile( $this->getProduct()->getData($this->_getModel()->getDestinationSubdir()) ); + $model->setBaseFile($this->getProduct()->getData($model->getDestinationSubdir())); } - if( $this->_getModel()->isCached() ) { - return $this->_getModel()->getUrl(); + if ($model->isCached()) { + return $model->getUrl(); } else { - if( $this->_scheduleRotate ) { - $this->_getModel()->rotate( $this->getAngle() ); + if ($this->_scheduleRotate) { + $model->rotate($this->getAngle()); } if ($this->_scheduleResize) { - $this->_getModel()->resize(); + $model->resize(); } - if( $this->getWatermark() ) { - $this->_getModel()->setWatermark($this->getWatermark()); + if ($this->getWatermark()) { + $model->setWatermark($this->getWatermark()); } - $url = $this->_getModel()->saveFile()->getUrl(); + $url = $model->saveFile()->getUrl(); } - } catch( Exception $e ) { + } catch (Exception $e) { $url = Mage::getDesign()->getSkinUrl($this->getPlaceholder()); } return $url; } /** - * Enter description here... + * Set current Image model * + * @param Mage_Catalog_Model_Product_Image $model * @return Mage_Catalog_Helper_Image */ protected function _setModel($model) @@ -283,7 +388,7 @@ protected function _setModel($model) } /** - * Enter description here... + * Get current Image model * * @return Mage_Catalog_Model_Product_Image */ @@ -292,12 +397,23 @@ protected function _getModel() return $this->_model; } + /** + * Set Rotation Angle + * + * @param int $angle + * @return Mage_Catalog_Helper_Image + */ protected function setAngle($angle) { $this->_angle = $angle; return $this; } + /** + * Get Rotation Angle + * + * @return int + */ protected function getAngle() { return $this->_angle; @@ -393,44 +509,67 @@ public function setWatermarkImageOpacity($imageOpacity) */ protected function getWatermarkImageOpacity() { - if( $this->_watermarkImageOpacity ) { + if ($this->_watermarkImageOpacity) { return $this->_watermarkImageOpacity; } return $this->_getModel()->getWatermarkImageOpacity(); } + /** + * Set current Product + * + * @param Mage_Catalog_Model_Product $product + * @return Mage_Catalog_Helper_Image + */ protected function setProduct($product) { $this->_product = $product; return $this; } + /** + * Get current Product + * + * @return Mage_Catalog_Model_Product + */ protected function getProduct() { return $this->_product; } + /** + * Set Image file + * + * @param string $file + * @return Mage_Catalog_Helper_Image + */ protected function setImageFile($file) { $this->_imageFile = $file; return $this; } + /** + * Get Image file + * + * @return string + */ protected function getImageFile() { return $this->_imageFile; } /** - * Enter description here... + * Retrieve size from string * - * @return array + * @param string $string + * @return array|bool */ protected function parseSize($string) { $size = explode('x', strtolower($string)); - if( sizeof($size) == 2 ) { + if (sizeof($size) == 2) { return array( 'width' => ($size[0] > 0) ? $size[0] : null, 'heigth' => ($size[1] > 0) ? $size[1] : null, @@ -478,13 +617,15 @@ public function getOriginalSizeArray() * * @param string $filePath * @return bool - * @throw Mage_Core_Exception + * @throws Mage_Core_Exception */ public function validateUploadFile($filePath) { if (!getimagesize($filePath)) { Mage::throwException($this->__('Disallowed file type.')); } - return true; + + $_processor = new Varien_Image($filePath); + return $_processor->getMimeType() !== null; } -} +} \ No newline at end of file diff --git a/app/code/core/Mage/Catalog/Helper/Map.php b/app/code/core/Mage/Catalog/Helper/Map.php index 3ecff8dab9424..e819ffb486173 100644 --- a/app/code/core/Mage/Catalog/Helper/Map.php +++ b/app/code/core/Mage/Catalog/Helper/Map.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Helper/Output.php b/app/code/core/Mage/Catalog/Helper/Output.php index f98e05e6edf19..c8f77a811d5ac 100644 --- a/app/code/core/Mage/Catalog/Helper/Output.php +++ b/app/code/core/Mage/Catalog/Helper/Output.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Helper/Product.php b/app/code/core/Mage/Catalog/Helper/Product.php index 4ab7c80ae5479..378b769170633 100644 --- a/app/code/core/Mage/Catalog/Helper/Product.php +++ b/app/code/core/Mage/Catalog/Helper/Product.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Helper/Product/Compare.php b/app/code/core/Mage/Catalog/Helper/Product/Compare.php index 1a289e89655f6..5da6aff01b026 100644 --- a/app/code/core/Mage/Catalog/Helper/Product/Compare.php +++ b/app/code/core/Mage/Catalog/Helper/Product/Compare.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Helper/Product/Configuration.php b/app/code/core/Mage/Catalog/Helper/Product/Configuration.php index 71764ca435e34..b435e3ce0b948 100644 --- a/app/code/core/Mage/Catalog/Helper/Product/Configuration.php +++ b/app/code/core/Mage/Catalog/Helper/Product/Configuration.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Helper/Product/Configuration/Interface.php b/app/code/core/Mage/Catalog/Helper/Product/Configuration/Interface.php index 4352261c416e5..f5575f1646f51 100644 --- a/app/code/core/Mage/Catalog/Helper/Product/Configuration/Interface.php +++ b/app/code/core/Mage/Catalog/Helper/Product/Configuration/Interface.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Helper/Product/Flat.php b/app/code/core/Mage/Catalog/Helper/Product/Flat.php index e7c26da5f2208..59b11e858582b 100644 --- a/app/code/core/Mage/Catalog/Helper/Product/Flat.php +++ b/app/code/core/Mage/Catalog/Helper/Product/Flat.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Helper/Product/Options.php b/app/code/core/Mage/Catalog/Helper/Product/Options.php index f57ea7a23beeb..53aaa083d4c6a 100644 --- a/app/code/core/Mage/Catalog/Helper/Product/Options.php +++ b/app/code/core/Mage/Catalog/Helper/Product/Options.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Helper/Product/Url.php b/app/code/core/Mage/Catalog/Helper/Product/Url.php index 8a3a77ea7880e..3b9bb2507bddb 100644 --- a/app/code/core/Mage/Catalog/Helper/Product/Url.php +++ b/app/code/core/Mage/Catalog/Helper/Product/Url.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Helper/Product/View.php b/app/code/core/Mage/Catalog/Helper/Product/View.php index ebf84900627df..0d1f4350866e2 100644 --- a/app/code/core/Mage/Catalog/Helper/Product/View.php +++ b/app/code/core/Mage/Catalog/Helper/Product/View.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Abstract.php b/app/code/core/Mage/Catalog/Model/Abstract.php index 099cad5956af3..d5734c71d4a12 100644 --- a/app/code/core/Mage/Catalog/Model/Abstract.php +++ b/app/code/core/Mage/Catalog/Model/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Api/Resource.php b/app/code/core/Mage/Catalog/Model/Api/Resource.php index ca1e37eb9f415..274ff16752715 100644 --- a/app/code/core/Mage/Catalog/Model/Api/Resource.php +++ b/app/code/core/Mage/Catalog/Model/Api/Resource.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Attribute/Backend/Customlayoutupdate.php b/app/code/core/Mage/Catalog/Model/Attribute/Backend/Customlayoutupdate.php index 0b015ec24e667..6d80ae1141500 100644 --- a/app/code/core/Mage/Catalog/Model/Attribute/Backend/Customlayoutupdate.php +++ b/app/code/core/Mage/Catalog/Model/Attribute/Backend/Customlayoutupdate.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Category.php b/app/code/core/Mage/Catalog/Model/Category.php index 8d1deddc64e72..6635187282634 100644 --- a/app/code/core/Mage/Catalog/Model/Category.php +++ b/app/code/core/Mage/Catalog/Model/Category.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Category/Api.php b/app/code/core/Mage/Catalog/Model/Category/Api.php index 209b47adac4c5..4f7236d16a67f 100644 --- a/app/code/core/Mage/Catalog/Model/Category/Api.php +++ b/app/code/core/Mage/Catalog/Model/Category/Api.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Category/Api/V2.php b/app/code/core/Mage/Catalog/Model/Category/Api/V2.php index 685fcd6a16488..aa76e42859637 100644 --- a/app/code/core/Mage/Catalog/Model/Category/Api/V2.php +++ b/app/code/core/Mage/Catalog/Model/Category/Api/V2.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Category/Attribute/Api.php b/app/code/core/Mage/Catalog/Model/Category/Attribute/Api.php index 51013ee567daa..db9bf721ac01b 100644 --- a/app/code/core/Mage/Catalog/Model/Category/Attribute/Api.php +++ b/app/code/core/Mage/Catalog/Model/Category/Attribute/Api.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Category/Attribute/Api/V2.php b/app/code/core/Mage/Catalog/Model/Category/Attribute/Api/V2.php index ddd8489b9b3cb..3328b324e0a8e 100644 --- a/app/code/core/Mage/Catalog/Model/Category/Attribute/Api/V2.php +++ b/app/code/core/Mage/Catalog/Model/Category/Attribute/Api/V2.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Category/Attribute/Backend/Image.php b/app/code/core/Mage/Catalog/Model/Category/Attribute/Backend/Image.php index 1d67a5098cd6e..b9f07718ea03b 100644 --- a/app/code/core/Mage/Catalog/Model/Category/Attribute/Backend/Image.php +++ b/app/code/core/Mage/Catalog/Model/Category/Attribute/Backend/Image.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Category/Attribute/Backend/Sortby.php b/app/code/core/Mage/Catalog/Model/Category/Attribute/Backend/Sortby.php index 12f184a16ed94..c7473ae2d8e2c 100644 --- a/app/code/core/Mage/Catalog/Model/Category/Attribute/Backend/Sortby.php +++ b/app/code/core/Mage/Catalog/Model/Category/Attribute/Backend/Sortby.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Category/Attribute/Backend/Urlkey.php b/app/code/core/Mage/Catalog/Model/Category/Attribute/Backend/Urlkey.php index f8075237b998c..f883af5e3a419 100644 --- a/app/code/core/Mage/Catalog/Model/Category/Attribute/Backend/Urlkey.php +++ b/app/code/core/Mage/Catalog/Model/Category/Attribute/Backend/Urlkey.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Category/Attribute/Source/Layout.php b/app/code/core/Mage/Catalog/Model/Category/Attribute/Source/Layout.php index 26428f5716b04..47d2e1841ca4a 100644 --- a/app/code/core/Mage/Catalog/Model/Category/Attribute/Source/Layout.php +++ b/app/code/core/Mage/Catalog/Model/Category/Attribute/Source/Layout.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Category/Attribute/Source/Mode.php b/app/code/core/Mage/Catalog/Model/Category/Attribute/Source/Mode.php index 51fb658ec7382..36a74271d767b 100644 --- a/app/code/core/Mage/Catalog/Model/Category/Attribute/Source/Mode.php +++ b/app/code/core/Mage/Catalog/Model/Category/Attribute/Source/Mode.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Category/Attribute/Source/Page.php b/app/code/core/Mage/Catalog/Model/Category/Attribute/Source/Page.php index 210c973559a78..d306e18be4aa6 100644 --- a/app/code/core/Mage/Catalog/Model/Category/Attribute/Source/Page.php +++ b/app/code/core/Mage/Catalog/Model/Category/Attribute/Source/Page.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Category/Attribute/Source/Sortby.php b/app/code/core/Mage/Catalog/Model/Category/Attribute/Source/Sortby.php index 5c14ae7134183..5561f00b30b02 100644 --- a/app/code/core/Mage/Catalog/Model/Category/Attribute/Source/Sortby.php +++ b/app/code/core/Mage/Catalog/Model/Category/Attribute/Source/Sortby.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Category/Indexer/Flat.php b/app/code/core/Mage/Catalog/Model/Category/Indexer/Flat.php index 550e8d87ebda2..0074a5d9ba04c 100644 --- a/app/code/core/Mage/Catalog/Model/Category/Indexer/Flat.php +++ b/app/code/core/Mage/Catalog/Model/Category/Indexer/Flat.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Category/Indexer/Product.php b/app/code/core/Mage/Catalog/Model/Category/Indexer/Product.php index 0eba5f4ab0beb..1019e09db8f22 100644 --- a/app/code/core/Mage/Catalog/Model/Category/Indexer/Product.php +++ b/app/code/core/Mage/Catalog/Model/Category/Indexer/Product.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Config.php b/app/code/core/Mage/Catalog/Model/Config.php index da4f57bc15671..80c4885f8f16a 100644 --- a/app/code/core/Mage/Catalog/Model/Config.php +++ b/app/code/core/Mage/Catalog/Model/Config.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Convert.php b/app/code/core/Mage/Catalog/Model/Convert.php index c1f120ee1af5e..8f2eebbe6f386 100644 --- a/app/code/core/Mage/Catalog/Model/Convert.php +++ b/app/code/core/Mage/Catalog/Model/Convert.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Convert/Adapter/Catalog.php b/app/code/core/Mage/Catalog/Model/Convert/Adapter/Catalog.php index 0cb4c858d8da7..eeb8ceab8106f 100644 --- a/app/code/core/Mage/Catalog/Model/Convert/Adapter/Catalog.php +++ b/app/code/core/Mage/Catalog/Model/Convert/Adapter/Catalog.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php b/app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php index 083830e685469..1a3ff1f946c7a 100644 --- a/app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php +++ b/app/code/core/Mage/Catalog/Model/Convert/Adapter/Product.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -556,10 +556,7 @@ public function save() } catch (Exception $e) { if (!$e instanceof Mage_Dataflow_Model_Convert_Exception) { $this->addException( - Mage::helper('Mage_Catalog_Helper_Data')->__( - 'An error occurred while saving the collection, aborting. Error message: %s', - $e->getMessage() - ), + Mage::helper('Mage_Catalog_Helper_Data')->__('An error occurred while saving the collection, aborting. Error message: %s', $e->getMessage()), Mage_Dataflow_Model_Convert_Exception::FATAL ); } @@ -586,10 +583,7 @@ public function saveRow(array $importData) if (!is_null($this->getBatchParams('store'))) { $store = $this->getStoreById($this->getBatchParams('store')); } else { - $message = Mage::helper('Mage_Catalog_Helper_Data')->__( - 'Skipping import row, required field "%s" is not defined.', - 'store' - ); + $message = Mage::helper('Mage_Catalog_Helper_Data')->__('Skipping import row, required field "%s" is not defined.', 'store'); Mage::throwException($message); } } else { @@ -597,10 +591,7 @@ public function saveRow(array $importData) } if ($store === false) { - $message = Mage::helper('Mage_Catalog_Helper_Data')->__( - 'Skipping import row, store "%s" field does not exist.', - $importData['store'] - ); + $message = Mage::helper('Mage_Catalog_Helper_Data')->__('Skipping import row, store "%s" field does not exist.', $importData['store']); Mage::throwException($message); } @@ -622,11 +613,7 @@ public function saveRow(array $importData) */ if (empty($importData['type']) || !isset($productTypes[strtolower($importData['type'])])) { $value = isset($importData['type']) ? $importData['type'] : ''; - $message = Mage::helper('Mage_Catalog_Helper_Data')->__( - 'Skip import row, is not valid value "%s" for field "%s"', - $value, - 'type' - ); + $message = Mage::helper('Mage_Catalog_Helper_Data')->__('Skip import row, is not valid value "%s" for field "%s"', $value, 'type'); Mage::throwException($message); } $product->setTypeId($productTypes[strtolower($importData['type'])]); @@ -635,11 +622,7 @@ public function saveRow(array $importData) */ if (empty($importData['attribute_set']) || !isset($productAttributeSets[$importData['attribute_set']])) { $value = isset($importData['attribute_set']) ? $importData['attribute_set'] : ''; - $message = Mage::helper('Mage_Catalog_Helper_Data')->__( - 'Skip import row, the value "%s" is invalid for field "%s"', - $value, - 'attribute_set' - ); + $message = Mage::helper('Mage_Catalog_Helper_Data')->__('Skip import row, the value "%s" is invalid for field "%s"', $value, 'attribute_set'); Mage::throwException($message); } $product->setAttributeSetId($productAttributeSets[$importData['attribute_set']]); @@ -647,10 +630,7 @@ public function saveRow(array $importData) foreach ($this->_requiredFields as $field) { $attribute = $this->getAttribute($field); if (!isset($importData[$field]) && $attribute && $attribute->getIsRequired()) { - $message = Mage::helper('Mage_Catalog_Helper_Data')->__( - 'Skipping import row, required field "%s" for new products is not defined.', - $field - ); + $message = Mage::helper('Mage_Catalog_Helper_Data')->__('Skipping import row, required field "%s" for new products is not defined.', $field); Mage::throwException($message); } } diff --git a/app/code/core/Mage/Catalog/Model/Convert/Parser/Product.php b/app/code/core/Mage/Catalog/Model/Convert/Parser/Product.php index 0ca79d1abbdc4..66b69b8f51cc2 100644 --- a/app/code/core/Mage/Catalog/Model/Convert/Parser/Product.php +++ b/app/code/core/Mage/Catalog/Model/Convert/Parser/Product.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Design.php b/app/code/core/Mage/Catalog/Model/Design.php index bd48204076dc9..723a83d42e180 100644 --- a/app/code/core/Mage/Catalog/Model/Design.php +++ b/app/code/core/Mage/Catalog/Model/Design.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Entity/Attribute.php b/app/code/core/Mage/Catalog/Model/Entity/Attribute.php index 5947b4f000443..2e892c7585e3f 100644 --- a/app/code/core/Mage/Catalog/Model/Entity/Attribute.php +++ b/app/code/core/Mage/Catalog/Model/Entity/Attribute.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Entity/Product/Attribute/Design/Options/Container.php b/app/code/core/Mage/Catalog/Model/Entity/Product/Attribute/Design/Options/Container.php index 58028a83837e5..d7ab088c0cd10 100644 --- a/app/code/core/Mage/Catalog/Model/Entity/Product/Attribute/Design/Options/Container.php +++ b/app/code/core/Mage/Catalog/Model/Entity/Product/Attribute/Design/Options/Container.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Index.php b/app/code/core/Mage/Catalog/Model/Index.php index 00bf3666a9696..f064673283ba8 100644 --- a/app/code/core/Mage/Catalog/Model/Index.php +++ b/app/code/core/Mage/Catalog/Model/Index.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Indexer/Url.php b/app/code/core/Mage/Catalog/Model/Indexer/Url.php index 36406301ebd0a..fc0a8632cbadb 100644 --- a/app/code/core/Mage/Catalog/Model/Indexer/Url.php +++ b/app/code/core/Mage/Catalog/Model/Indexer/Url.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Layer.php b/app/code/core/Mage/Catalog/Model/Layer.php index 1e1ae32fedda0..fae1238644799 100644 --- a/app/code/core/Mage/Catalog/Model/Layer.php +++ b/app/code/core/Mage/Catalog/Model/Layer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Layer/Filter/Abstract.php b/app/code/core/Mage/Catalog/Model/Layer/Filter/Abstract.php index 79e6739b6fbc6..952779a3dc2bf 100644 --- a/app/code/core/Mage/Catalog/Model/Layer/Filter/Abstract.php +++ b/app/code/core/Mage/Catalog/Model/Layer/Filter/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -300,4 +300,14 @@ public function setWebsiteId($websiteId) { return $this->setData('website_id', $websiteId); } + + /** + * Clear current element link text, for example 'Clear Price' + * + * @return false|string + */ + public function getClearLinkText() + { + return false; + } } diff --git a/app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php b/app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php index 199cf14b76d3b..4c92b0a8a85b0 100644 --- a/app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php +++ b/app/code/core/Mage/Catalog/Model/Layer/Filter/Attribute.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -69,7 +69,7 @@ protected function _getResource() * Get option text from frontend model by option id * * @param int $optionId - * @return unknown + * @return string|bool */ protected function _getOptionText($optionId) { @@ -90,7 +90,7 @@ public function apply(Zend_Controller_Request_Abstract $request, $filterBlock) return $this; } $text = $this->_getOptionText($filter); - if ($filter && $text) { + if ($filter && strlen($text)) { $this->_getResource()->applyFilterToCollection($this, $filter); $this->getLayer()->getState()->addFilter($this->_createItem($text, $filter)); $this->_items = array(); diff --git a/app/code/core/Mage/Catalog/Model/Layer/Filter/Category.php b/app/code/core/Mage/Catalog/Model/Layer/Filter/Category.php index 5f50435fa596b..4f031ee71dda0 100644 --- a/app/code/core/Mage/Catalog/Model/Layer/Filter/Category.php +++ b/app/code/core/Mage/Catalog/Model/Layer/Filter/Category.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Layer/Filter/Decimal.php b/app/code/core/Mage/Catalog/Model/Layer/Filter/Decimal.php index 8cad0330dcc3d..289733df0ca43 100644 --- a/app/code/core/Mage/Catalog/Model/Layer/Filter/Decimal.php +++ b/app/code/core/Mage/Catalog/Model/Layer/Filter/Decimal.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Layer/Filter/Item.php b/app/code/core/Mage/Catalog/Model/Layer/Filter/Item.php index 5186d283dbc51..f5c7fca79d0ef 100644 --- a/app/code/core/Mage/Catalog/Model/Layer/Filter/Item.php +++ b/app/code/core/Mage/Catalog/Model/Layer/Filter/Item.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -78,6 +78,27 @@ public function getRemoveUrl() return Mage::getUrl('*/*/*', $params); } + /** + * Get url for "clear" link + * + * @return false|string + */ + public function getClearLinkUrl() + { + $clearLinkText = $this->getFilter()->getClearLinkText(); + if (!$clearLinkText) { + return false; + } + + $urlParams = array( + '_current' => true, + '_use_rewrite' => true, + '_query' => array($this->getFilter()->getRequestVar() => null), + '_escape' => true, + ); + return Mage::getUrl('*/*/*', $urlParams); + } + /** * Get item filter name * diff --git a/app/code/core/Mage/Catalog/Model/Layer/Filter/Price.php b/app/code/core/Mage/Catalog/Model/Layer/Filter/Price.php index d09fac9945bef..14f119f7ccd6d 100644 --- a/app/code/core/Mage/Catalog/Model/Layer/Filter/Price.php +++ b/app/code/core/Mage/Catalog/Model/Layer/Filter/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -40,6 +40,9 @@ class Mage_Catalog_Model_Layer_Filter_Price extends Mage_Catalog_Model_Layer_Fil { const XML_PATH_RANGE_CALCULATION = 'catalog/layered_navigation/price_range_calculation'; const XML_PATH_RANGE_STEP = 'catalog/layered_navigation/price_range_step'; + const XML_PATH_RANGE_MAX_INTERVALS = 'catalog/layered_navigation/price_range_max_intervals'; + const XML_PATH_ONE_PRICE_INTERVAL = 'catalog/layered_navigation/one_price_interval'; + const XML_PATH_INTERVAL_DIVISION_LIMIT = 'catalog/layered_navigation/interval_division_limit'; const RANGE_CALCULATION_AUTO = 'auto'; const RANGE_CALCULATION_MANUAL = 'manual'; @@ -107,10 +110,6 @@ public function getPriceRange() } } - while (ceil($maxPrice / $range) > 25) { - $range *= 10; - } - $this->setData('price_range', $range); } @@ -146,6 +145,19 @@ public function getRangeItemCounts($range) $items = $this->getData($rangeKey); if (is_null($items)) { $items = $this->_getResource()->getCount($this, $range); + // checking max number of intervals + $i = 0; + $lastIndex = null; + $maxIntervalsNumber = $this->getMaxIntervalsNumber(); + foreach ($items as $k => $v) { + ++$i; + if ($i > 1 && $i > $maxIntervalsNumber) { + $items[$lastIndex] += $v; + unset($items[$k]); + } else { + $lastIndex = $k; + } + } $this->setData($rangeKey, $items); } @@ -182,34 +194,57 @@ protected function _renderRangeLabel($fromPrice, $toPrice) $formattedFromPrice = $store->formatPrice($fromPrice); if (empty($toPrice)) { return Mage::helper('Mage_Catalog_Helper_Data')->__('%s and above', $formattedFromPrice); - } elseif ($fromPrice == $toPrice) { + } elseif ($fromPrice == $toPrice && Mage::app()->getStore()->getConfig(self::XML_PATH_ONE_PRICE_INTERVAL)) { return $formattedFromPrice; } else { - return Mage::helper('Mage_Catalog_Helper_Data')->__('%s - %s', $formattedFromPrice, $store->formatPrice($toPrice - .01)); + if ($fromPrice != $toPrice) { + $toPrice -= .01; + } + return Mage::helper('Mage_Catalog_Helper_Data')->__('%s - %s', $formattedFromPrice, $store->formatPrice($toPrice)); } } /** - * Get data generated by algorithm for build price filter items + * Get additional request param data * - * @return array + * @return string */ - protected function _getCalculatedItemsData() + protected function _getAdditionalRequestData() { + $result = ''; $appliedInterval = $this->getInterval(); if ($appliedInterval) { - return array(); + $result = ',' . $appliedInterval[0] . '-' . $appliedInterval[1]; + $priorIntervals = $this->getResetValue(); + if ($priorIntervals) { + $result .= ',' . $priorIntervals; + } } + return $result; + } + + /** + * Get data generated by algorithm for build price filter items + * + * @return array + */ + protected function _getCalculatedItemsData() + { /** @var $algorithmModel Mage_Catalog_Model_Layer_Filter_Price_Algorithm */ $algorithmModel = Mage::getSingleton('Mage_Catalog_Model_Layer_Filter_Price_Algorithm'); + $appliedInterval = $this->getInterval(); + if ($appliedInterval) { + $algorithmModel->setLimits($appliedInterval[0], $appliedInterval[1]); + } $this->_getResource()->loadAllPrices($algorithmModel, $this); $items = array(); foreach ($algorithmModel->calculateSeparators() as $separator) { $items[] = array( 'label' => $this->_renderRangeLabel($separator['from'], $separator['to']), - 'value' => (($separator['from'] == 0) ? '' : $separator['from']) . '-' . $separator['to'], + 'value' => (($separator['from'] == 0) ? '' : $separator['from']) + . '-' . $separator['to'] . $this->_getAdditionalRequestData(), 'count' => $separator['count'], ); } @@ -226,6 +261,8 @@ protected function _getItemsData() { if (Mage::app()->getStore()->getConfig(self::XML_PATH_RANGE_CALCULATION) == self::RANGE_CALCULATION_AUTO) { return $this->_getCalculatedItemsData(); + } elseif ($this->getInterval()) { + return array(); } $range = $this->getPriceRange(); @@ -262,6 +299,27 @@ protected function _applyPriceRange() return $this; } + /** + * Validate and parse filter request param + * + * @param string $filter + * @return array|bool + */ + protected function _validateFilter($filter) + { + $filter = explode('-', $filter); + if (count($filter) != 2) { + return false; + } + foreach ($filter as $v) { + if ($v !== '' && (float)$v <= 0) { + return false; + } + } + + return $filter; + } + /** * Apply price range filter * @@ -281,20 +339,31 @@ public function apply(Zend_Controller_Request_Abstract $request, $filterBlock) } //validate filter - $filter = explode('-', $filter); - if (count($filter) != 2) { + $filterParams = explode(',', $filter); + $filter = $this->_validateFilter($filterParams[0]); + if (!$filter) { return $this; } - foreach ($filter as $v) { - if ($v !== '' && (float)$v <= 0) { - return $this; - } - } list($from, $to) = $filter; $this->setInterval(array($from, $to)); + $priorFilters = array(); + for ($i = 1; $i < count($filterParams); ++$i) { + $priorFilter = $this->_validateFilter($filterParams[$i]); + if ($priorFilter) { + $priorFilters[] = $priorFilter; + } else { + //not valid data + $priorFilters = array(); + break; + } + } + if ($priorFilters) { + $this->setPriorIntervals($priorFilters); + } + $this->_applyPriceRange(); $this->getLayer()->getState()->addFilter($this->_createItem( $this->_renderRangeLabel(empty($from) ? 0 : $from, $to), @@ -370,4 +439,56 @@ public function setCurrencyRate($rate) { return $this->setData('currency_rate', $rate); } + + /** + * Get maximum number of intervals + * + * @return int + */ + public function getMaxIntervalsNumber() + { + return (int)Mage::app()->getStore()->getConfig(self::XML_PATH_RANGE_MAX_INTERVALS); + } + + /** + * Get interval division limit + * + * @return int + */ + public function getIntervalDivisionLimit() + { + return (int)Mage::app()->getStore()->getConfig(self::XML_PATH_INTERVAL_DIVISION_LIMIT); + } + + /** + * Get filter value for reset current filter state + * + * @return null|string + */ + public function getResetValue() + { + $priorIntervals = $this->getPriorIntervals(); + $value = array(); + if ($priorIntervals) { + foreach ($priorIntervals as $priorInterval) { + $value[] = implode('-', $priorInterval); + } + return implode(',', $value); + } + return parent::getResetValue(); + } + + /** + * Get 'clear price' link text + * + * @return false|string + */ + public function getClearLinkText() + { + if (Mage::app()->getStore()->getConfig(self::XML_PATH_RANGE_CALCULATION) == self::RANGE_CALCULATION_AUTO) { + return Mage::helper('Mage_Catalog_Helper_Data')->__('Clear Price'); + } + + return parent::getClearLinkText(); + } } diff --git a/app/code/core/Mage/Catalog/Model/Layer/Filter/Price/Algorithm.php b/app/code/core/Mage/Catalog/Model/Layer/Filter/Price/Algorithm.php index 57c79a0187bfe..8d2a8afe8cc2f 100644 --- a/app/code/core/Mage/Catalog/Model/Layer/Filter/Price/Algorithm.php +++ b/app/code/core/Mage/Catalog/Model/Layer/Filter/Price/Algorithm.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -35,6 +35,7 @@ class Mage_Catalog_Model_Layer_Filter_Price_Algorithm { const MIN_POSSIBLE_PRICE = .01; const TEN_POWER_ROUNDING_FACTOR = 4; + const INTERVAL_DEFLECTION_LIMIT = .3; /** * Sorted array of all products prices @@ -58,39 +59,134 @@ class Mage_Catalog_Model_Layer_Filter_Price_Algorithm protected $_skippedQuantilesUpperLimits = array(); /** - * Set products prices + * Upper prices limit + * + * @var null|float + */ + protected $_upperLimit = null; + + /** + * Lower prices limit + * + * @var null|float + */ + protected $_lowerLimit = null; + + /** + * Search index of price, that satisfy conditions to be less or greater-or-equal than $value + * Returns -1 if index was not found + * + * @param float $value + * @param null|array $limits search [from, to] + * @param bool $isLess (to be less or greater-or-equal) + * @return int + */ + protected function _binarySearch($value, $limits = null, $isLess = true) + { + if (empty($this->_prices)) { + return -1; + } + + if (!is_array($limits)) { + $limits = array(); + } + if (!isset($limits[0])) { + $limits[0] = 0; + } + if (!isset($limits[1])) { + $limits[1] = count($this->_prices) - 1; + } + + if ($limits[0] > $limits[1] + || ($isLess && $this->_prices[$limits[1]] < $value) + || (!$isLess && $this->_prices[$limits[0]] >= $value) + ) { + return -1; + } + + if ($limits[1] - $limits[0] <= 1) { + if ($isLess) { + return ($this->_prices[$limits[0]] < $value) ? $limits[1] : $limits[0]; + } else { + return ($this->_prices[$limits[1]] >= $value) ? $limits[0] : $limits[1]; + } + } + + $separator = floor(($limits[0] + $limits[1]) / 2); + if ($isLess) { + if ($this->_prices[$separator] < $value) { + $limits[0] = $separator + 1; + } else { + $limits[1] = $separator; + } + } else { + if ($this->_prices[$separator] >= $value) { + $limits[1] = $separator - 1; + } else { + $limits[0] = $separator; + } + } + + return $this->_binarySearch($value, array($limits[0], $limits[1]), $isLess); + } + + /** + * Check prices to be in limits interval * - * @param array $prices * @return Mage_Catalog_Model_Layer_Filter_Price_Algorithm */ - public function setPrices(array $prices) + protected function _checkPrices() { - $this->_prices = $prices; - sort($this->_prices); - $this->_intervalsNumber = null; - $this->_skippedQuantilesUpperLimits = array(); + if (is_null($this->_prices)) { + return $this; + } + if (!is_null($this->_upperLimit) || !is_null($this->_lowerLimit)) { + $right = is_null($this->_upperLimit) + ? (count($this->_prices) - 1) + : $this->_binarySearch($this->_upperLimit, null, false); + $left = is_null($this->_lowerLimit) + ? 0 + : $this->_binarySearch($this->_lowerLimit, array(0, $right)); + if ($left > $right) { + $this->_prices = array(); + } else { + $this->_prices = array_slice($this->_prices, $left, $right - $left + 1); + } + } return $this; } /** - * Get min price + * Set lower and upper limit for algorithm * - * @return float + * @param null|float $lowerLimit + * @param null|float $upperLimit + * @return Mage_Catalog_Model_Layer_Filter_Price_Algorithm */ - public function getMinPrice() + public function setLimits($lowerLimit = null, $upperLimit = null) { - return empty($this->_prices) ? 0 : $this->_prices[0]; + $this->_lowerLimit = empty($lowerLimit) ? null : (float)$lowerLimit; + $this->_upperLimit = empty($upperLimit) ? null : (float)$upperLimit; + $this->_checkPrices(); + return $this; } /** - * Get max price + * Set products prices * - * @return float + * @param array $prices due to performance issue prices should be sorted (by DBMS engine) + * @return Mage_Catalog_Model_Layer_Filter_Price_Algorithm */ - public function getMaxPrice() + public function setPrices(array $prices) { - return (empty($this->_prices)) ? 0 : $this->_prices[count($this->_prices) - 1]; + $this->_prices = $prices; + + $this->_checkPrices(); + $this->_intervalsNumber = null; + $this->_skippedQuantilesUpperLimits = array(); + + return $this; } /** @@ -105,7 +201,8 @@ public function getIntervalsNumber() } $pricesCount = count($this->_prices); - if ($pricesCount < 2 || ($this->getMaxPrice() - $this->getMinPrice() == 0)) { + $priceRange = empty($this->_prices) ? 0 : ($this->_prices[count($this->_prices) - 1] - $this->_prices[0]); + if ($pricesCount < 2 || ($priceRange == 0)) { //Same price couldn't be separated with several intervals $this->_intervalsNumber = 1; return $this->_intervalsNumber; @@ -118,10 +215,10 @@ public function getIntervalsNumber() $sumSquares += $price * $price; } - if ($pricesCount * $sumSquares - $sum * $sum == 0) { + if ($pricesCount * $sumSquares - $sum * $sum <= 0) { $intervalsNumber = 1000; } else { - $intervalsNumber = ($this->getMaxPrice() - $this->getMinPrice()) * pow($pricesCount, 5 / 6) + $intervalsNumber = $priceRange * pow($pricesCount, 5 / 6) * sqrt(($pricesCount - 1) / ($pricesCount * $sumSquares - $sum * $sum)) / 3.5; } $this->_intervalsNumber = min(max(ceil($intervalsNumber), 2), 10); @@ -129,6 +226,16 @@ public function getIntervalsNumber() return $this->_intervalsNumber; } + /** + * Get intervals number with checking skipped quantiles + * + * @return int + */ + protected function _getCalculatedIntervalsNumber() + { + return max(1, $this->getIntervalsNumber() - count($this->_skippedQuantilesUpperLimits)); + } + /** * Get quantile * @@ -210,19 +317,16 @@ protected function _findRoundPrice($lowerPrice, $upperPrice, $returnEmpty = true // round is used for such examples: (1194.32 / 0.02) or (5 / 100000) $lowerDivision = ceil(round($lowerPrice / $roundingFactor, self::TEN_POWER_ROUNDING_FACTOR + 3)); $upperDivision = floor(round($upperPrice / $roundingFactor, self::TEN_POWER_ROUNDING_FACTOR + 3)); - if ($lowerDivision > $upperDivision) { - return false; - } - $averageDivision = ($lowerDivision + $upperDivision) / 2; - $lowerAverageDivision = floor($averageDivision); - $result = array(round($lowerAverageDivision * $roundingFactor, 2)); - if ($averageDivision != $lowerAverageDivision) { - $upperAverageDivision = ceil($averageDivision); - $result[] = round($upperAverageDivision * $roundingFactor, 2); + + $result = array(); + for ($i = $lowerDivision; $i <= $upperDivision; ++$i) { + $result[] = round($i * $roundingFactor, 2); } + return $result; } + $result = array(); $tenPower = pow(10, self::TEN_POWER_ROUNDING_FACTOR); $roundingFactorCoefficients = array(10, 5, 2); while ($tenPower >= self::MIN_POSSIBLE_PRICE) { @@ -235,13 +339,34 @@ protected function _findRoundPrice($lowerPrice, $upperPrice, $returnEmpty = true $lowerPrice, $upperPrice, $returnEmpty, $roundingFactorCoefficient ); if ($roundPrices) { - return array($roundingFactorCoefficient, $roundPrices); + $result[round($roundingFactorCoefficient / self::MIN_POSSIBLE_PRICE)] = $roundPrices; } } $tenPower /= 10; } - return array(self::MIN_POSSIBLE_PRICE, array()); + return empty($result) ? array(1 => array()) : $result; + } + + /** + * Merge new round prices with old ones + * + * @param array $oldRoundPrices + * @param array $newRoundPrices + * @return void + */ + protected function _mergeRoundPrices(&$oldRoundPrices, &$newRoundPrices) + { + foreach ($newRoundPrices as $roundingFactor => $roundPriceValues) { + if (array_key_exists($roundingFactor, $oldRoundPrices)) { + $oldRoundPrices[$roundingFactor] = array_unique(array_merge( + $oldRoundPrices[$roundingFactor], + $roundPriceValues + )); + } else { + $oldRoundPrices[$roundingFactor] = $roundPriceValues; + } + } } /** @@ -255,76 +380,44 @@ protected function _findPriceSeparator($quantileNumber) if ($quantileNumber < 1 || $quantileNumber >= $this->getIntervalsNumber()) { return null; } - $quantile = $this->_getQuantile($quantileNumber); - $lowerQuantile = floor($quantile); - $upperQuantile = ceil($quantile); $quantileInterval = $this->_getQuantileInterval($quantileNumber); - $quantileDeflection = 0; - $maxRoundingFactor = self::MIN_POSSIBLE_PRICE; $bestRoundPrice = array(); if ($this->_prices[$quantileInterval[0]] == $this->_prices[$quantileInterval[1]]) { if ($quantileNumber == 1) { - $i = $quantileInterval[0]; - while ($i >= 0 && ($this->_prices[$i] == $this->_prices[$quantileInterval[1]])) { - --$i; - } - if ($i >= 0) { - list($roundingFactor, $bestRoundPrice) = $this->_findRoundPrice( - $this->_prices[$i] + self::MIN_POSSIBLE_PRICE / 10, + $index = $this->_binarySearch( + $this->_prices[$quantileInterval[1]], + array(0, $quantileInterval[0]), + false + ); + if ($index != -1) { + $bestRoundPrice = $this->_findRoundPrice( + $this->_prices[$index] + self::MIN_POSSIBLE_PRICE / 10, $this->_prices[$quantileInterval[1]], false ); } } if ($quantileNumber == $this->getIntervalsNumber() - 1) { - $pricesCount = count($this->_prices); - $i = $quantileInterval[1]; - while ($i < $pricesCount && ($this->_prices[$quantileInterval[0]] == $this->_prices[$i])) { - ++$i; - } - if ($i < $pricesCount) { - list($upperRoundingFactor, $upperBestRoundPrice) = $this->_findRoundPrice( + $index = $this->_binarySearch( + $this->_prices[$quantileInterval[0]] + self::MIN_POSSIBLE_PRICE / 10, + array($quantileInterval[1]) + ); + if ($index != -1) { + $upperBestRoundPrice = $this->_findRoundPrice( $this->_prices[$quantileInterval[0]] + self::MIN_POSSIBLE_PRICE / 10, - $this->_prices[$i], + $this->_prices[$index], false ); - if (!empty($bestRoundPrice)) { - if ($upperRoundingFactor >= $roundingFactor) { - if ($upperRoundingFactor > $roundingFactor) { - $bestRoundPrice = $upperBestRoundPrice; - } else { - $bestRoundPrice = array_merge($bestRoundPrice, $upperBestRoundPrice); - } - } - } else { - $bestRoundPrice = $upperBestRoundPrice; - } + $this->_mergeRoundPrices($bestRoundPrice, $upperBestRoundPrice); } } } else { - while ($lowerQuantile - $quantileDeflection >= $quantileInterval[0] - || $upperQuantile + $quantileDeflection <= $quantileInterval[1] - ) { - $leftIndex = max($quantileInterval[0], $lowerQuantile - $quantileDeflection); - $rightIndex = min($quantileInterval[1], $upperQuantile + $quantileDeflection); - - list($roundingFactor, $roundPrice) = $this->_findRoundPrice( - $this->_prices[$leftIndex] + self::MIN_POSSIBLE_PRICE / 10, - $this->_prices[$rightIndex] - ); - - if ($roundingFactor >= $maxRoundingFactor) { - if ($roundingFactor == $maxRoundingFactor) { - $bestRoundPrice = array_unique(array_merge($bestRoundPrice, $roundPrice)); - } else { - $bestRoundPrice = $roundPrice; - $maxRoundingFactor = $roundingFactor; - } - } - ++$quantileDeflection; - } + $bestRoundPrice = $this->_findRoundPrice( + $this->_prices[$quantileInterval[0]] + self::MIN_POSSIBLE_PRICE / 10, + $this->_prices[$quantileInterval[1]] + ); } if (empty($bestRoundPrice)) { @@ -332,8 +425,46 @@ protected function _findPriceSeparator($quantileNumber) return $bestRoundPrice; } - sort($bestRoundPrice); - return $bestRoundPrice; + ksort($bestRoundPrice, SORT_NUMERIC); + foreach ($bestRoundPrice as $index => &$bestRoundPriceValues) { + if (empty($bestRoundPriceValues)) { + unset($bestRoundPrice[$index]); + } else { + sort($bestRoundPriceValues); + } + } + return array_reverse($bestRoundPrice); + } + + /** + * Get separator nearest to quantile among the separators + * + * @param int $quantileNumber + * @param array $separators + * @param int $priceIndex + * @return bool|array [separatorPrice, pricesCount] + */ + protected function _findBestSeparator($quantileNumber, $separators, $priceIndex) + { + $result = false; + + $i = $priceIndex; + $pricesCount = count($this->_prices); + while ($i < $pricesCount && !empty($separators)) { + $i = $this->_binarySearch($separators[0], array($i)); + if ($i == -1) { + break; + } + + $separator = array_shift($separators); + + $deflection = abs(($quantileNumber + 1) * $pricesCount - $i * $this->_getCalculatedIntervalsNumber()); + if (!$result || $deflection < $result[0]) { + $result = array($deflection, $separator, $i - $priceIndex); + } + } + + return $result ? $result : false; } /** @@ -343,6 +474,7 @@ protected function _findPriceSeparator($quantileNumber) */ public function calculateSeparators() { + $this->_checkPrices(); $separators = array(); for ($i = 1; $i < $this->getIntervalsNumber(); ++$i) { $separators[] = $this->_findPriceSeparator($i); @@ -351,8 +483,9 @@ public function calculateSeparators() $i = 0; $result = array(); - $lastSeparator = 0; + $lastSeparator = is_null($this->_lowerLimit) ? 0 : $this->_lowerLimit; $quantile = 0; + $pricesPerInterval = $pricesCount / $this->_getCalculatedIntervalsNumber(); while (!empty($separators) && ($i < $pricesCount)) { while (!empty($separators) && empty($separators[0])) { array_shift($separators); @@ -360,59 +493,49 @@ public function calculateSeparators() if (empty($separators)) { break; } - if ($this->_prices[$i] < $separators[0][0]) { - ++$i; - } else { - $separator = array_shift($separators[0]); - $separatorData = array( - 'from' => $lastSeparator, - 'to' => $separator, - 'count' => $i, - ); - - $deflection = abs(($quantile + 1) / $this->getIntervalsNumber() - $i / $pricesCount); - if (!array_key_exists($quantile, $result)) { - $result[$quantile] = array($deflection, $separatorData); - } elseif ($deflection < $result[$quantile][0]) { - $result[$quantile] = array($deflection, $separatorData); - } - if (empty($separators[0])) { - array_shift($separators); - if (!array_key_exists($quantile - 1, $result) - || $result[$quantile - 1][1]['count'] < $result[$quantile][1]['count'] - ) { - $lastSeparator = $result[$quantile][1]['to']; + $separatorCandidate = false; + $newLastSeparator = $lastSeparator; + while (!empty($separators[0]) && !array_key_exists($quantile, $result)) { + $separatorsPortion = array_shift($separators[0]); + $bestSeparator = $this->_findBestSeparator($quantile, $separatorsPortion, $i); + if ($bestSeparator && $bestSeparator[2] > 0) { + $isEqualPrice = ($this->_prices[$i] == $this->_prices[$i + $bestSeparator[2] - 1]) + ? $this->_prices[$i] + : false; + $separatorData = array( + 'from' => ($isEqualPrice !== false) ? $isEqualPrice : $lastSeparator, + 'to' => ($isEqualPrice !== false) ? $isEqualPrice : $bestSeparator[1], + 'count' => $bestSeparator[2], + ); + if (abs(1 - $bestSeparator[2] / $pricesPerInterval) <= self::INTERVAL_DEFLECTION_LIMIT) { + $newLastSeparator = $bestSeparator[1]; + $result[$quantile] = $separatorData; + } elseif (!$separatorCandidate || $bestSeparator[0] < $separatorCandidate[0]) { + $separatorCandidate = array($bestSeparator[0], $separatorData, $bestSeparator[1]); } - ++$quantile; } } - } - if ($i < $pricesCount || empty($result)) { - $result[$quantile] = array(0, array( - 'from' => $lastSeparator, - 'to' => '', - 'count' => $pricesCount, - )); - } - for ($i = count($result) - 1; $i >= 0; --$i) { - $rangeCount = ($i == 0) ? $result[$i][1]['count'] : ($result[$i][1]['count'] - $result[$i-1][1]['count']); - if ($rangeCount > 0) { - $result[$i] = $result[$i][1]; - $firstPriceInRange = $this->_prices[$result[$i]['count'] - $rangeCount]; - if ($this->_prices[$result[$i]['count'] - 1] == $firstPriceInRange) { - $result[$i]['from'] = $firstPriceInRange; - $result[$i]['to'] = $firstPriceInRange; - } - $result[$i]['from'] = round($result[$i]['from'], 2); - if (!empty($result[$i]['to'])) { - $result[$i]['to'] = round($result[$i]['to'], 2); - } - $result[$i]['count'] = $rangeCount; - } else { - unset($result[$i]); + if (!array_key_exists($quantile, $result) && $separatorCandidate) { + $newLastSeparator = $separatorCandidate[2]; + $result[$quantile] = $separatorCandidate[1]; } + + if (array_key_exists($quantile, $result)) { + $lastSeparator = $newLastSeparator; + $i = $this->_binarySearch($lastSeparator, array($i)); + array_shift($separators); + } + ++$quantile; + } + if ($i < $pricesCount) { + $isEqualPrice = ($this->_prices[$i] == $this->_prices[$pricesCount - 1]) ? $this->_prices[$i] : false; + $result[$quantile] = array( + 'from' => $isEqualPrice ? $isEqualPrice : $lastSeparator, + 'to' => $isEqualPrice ? $isEqualPrice : (is_null($this->_upperLimit) ? '' : $this->_upperLimit), + 'count' => $pricesCount - $i, + ); } return array_values($result); diff --git a/app/code/core/Mage/Catalog/Model/Layer/State.php b/app/code/core/Mage/Catalog/Model/Layer/State.php index 90b71dfdae516..2f2a0630ae983 100644 --- a/app/code/core/Mage/Catalog/Model/Layer/State.php +++ b/app/code/core/Mage/Catalog/Model/Layer/State.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Observer.php b/app/code/core/Mage/Catalog/Model/Observer.php index 53dd9ff1c0efb..f05222203689a 100644 --- a/app/code/core/Mage/Catalog/Model/Observer.php +++ b/app/code/core/Mage/Catalog/Model/Observer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product.php b/app/code/core/Mage/Catalog/Model/Product.php index 793a99d1ff330..0e533dfd22811 100644 --- a/app/code/core/Mage/Catalog/Model/Product.php +++ b/app/code/core/Mage/Catalog/Model/Product.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -601,6 +601,16 @@ public function getPriceModel() return Mage::getSingleton('Mage_Catalog_Model_Product_Type')->priceFactory($this->getTypeId()); } + /** + * Get product group price + * + * @return float + */ + public function getGroupPrice() + { + return $this->getPriceModel()->getGroupPrice($this); + } + /** * Get product tier price by qty * @@ -1025,6 +1035,7 @@ public function duplicate() $this->getWebsiteIds(); $this->getCategoryIds(); + /* @var $newProduct Mage_Catalog_Model_Product */ $newProduct = Mage::getModel('Mage_Catalog_Model_Product')->setData($this->getData()) ->setIsDuplicate(true) ->setOriginalId($this->getId()) @@ -1040,16 +1051,6 @@ public function duplicate() array('current_product' => $this, 'new_product' => $newProduct) ); - /* @var $newProduct Mage_Catalog_Model_Product */ - - $newOptionsArray = array(); - $newProduct->setCanSaveCustomOptions(true); - foreach ($this->getOptions() as $_option) { - /* @var $_option Mage_Catalog_Model_Product_Option */ - $newOptionsArray[] = $_option->prepareOptionForDuplicate(); - } - $newProduct->setProductOptions($newOptionsArray); - /* Prepare Related*/ $data = array(); $this->getLinkInstance()->useRelatedLinks(); @@ -1800,6 +1801,7 @@ public function setOrigData($key=null, $data=null) */ public function reset() { + $this->unlockAttributes(); $this->_clearData(); return $this; } diff --git a/app/code/core/Mage/Catalog/Model/Product/Action.php b/app/code/core/Mage/Catalog/Model/Product/Action.php index 3cbd1b198df40..49e38dcf60965 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Action.php +++ b/app/code/core/Mage/Catalog/Model/Product/Action.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Api.php b/app/code/core/Mage/Catalog/Model/Product/Api.php index 560c4cbbfb361..e42af757c16c8 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Api.php +++ b/app/code/core/Mage/Catalog/Model/Product/Api.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -182,6 +182,11 @@ public function create($type, $set, $sku, $productData, $store = null) ->setTypeId($type) ->setSku($sku); + if (!isset($productData['stock_data']) || !is_array($productData['stock_data'])) { + //Set default stock_data if not exist in product data + $product->setStockData(array('use_config_manage_stock' => 0)); + } + $this->_prepareDataForSave($product, $productData); try { @@ -262,6 +267,14 @@ protected function _prepareDataForSave($product, $productData) } foreach ($product->getTypeInstance()->getEditableAttributes($product) as $attribute) { + //Unset data if object attribute has no value in current store + if (Mage_Catalog_Model_Abstract::DEFAULT_STORE_ID !== $product->getStoreId() + && !$product->getExistsStoreValueFlag($attribute->getAttributeCode()) + && !$attribute->isScopeGlobal() + ) { + $product->setData($attribute->getAttributeCode(), false); + } + if ($this->_isAllowedAttribute($attribute)) { if (isset($productData[$attribute->getAttributeCode()])) { $product->setData( @@ -303,8 +316,6 @@ protected function _prepareDataForSave($product, $productData) if (isset($productData['stock_data']) && is_array($productData['stock_data'])) { $product->setStockData($productData['stock_data']); - } else { - $product->setStockData(array('use_config_manage_stock' => 0)); } if (isset($productData['tier_price']) && is_array($productData['tier_price'])) { @@ -441,4 +452,4 @@ protected function _checkProductAttributeSet($attributeSetId) $this->_fault('product_attribute_set_not_valid'); } } -} // Class Mage_Catalog_Model_Product_Api End +} // Class Mage_Catalog_Model_Product_Api End \ No newline at end of file diff --git a/app/code/core/Mage/Catalog/Model/Product/Api/V2.php b/app/code/core/Mage/Catalog/Model/Product/Api/V2.php index d4dd81d038712..92f1bbf57ef38 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Api/V2.php +++ b/app/code/core/Mage/Catalog/Model/Product/Api/V2.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -176,6 +176,12 @@ public function create($type, $set, $sku, $productData, $store = null) ->setTypeId($type) ->setSku($sku); + if (!property_exists($productData, 'stock_data')) { + //Set default stock_data if not exist in product data + $_stockData = array('use_config_manage_stock' => 0); + $product->setStockData($_stockData); + } + $this->_prepareDataForSave($product, $productData); try { @@ -273,9 +279,18 @@ protected function _prepareDataForSave ($product, $productData) foreach ($product->getTypeInstance()->getEditableAttributes($product) as $attribute) { $_attrCode = $attribute->getAttributeCode(); + + //Unset data if object attribute has no value in current store + if (Mage_Catalog_Model_Abstract::DEFAULT_STORE_ID !== (int) $product->getStoreId() + && !$product->getExistsStoreValueFlag($_attrCode) + && !$attribute->isScopeGlobal() + ) { + $product->setData($_attrCode, false); + } + if ($this->_isAllowedAttribute($attribute) && (isset($productData->$_attrCode))) { $product->setData( - $attribute->getAttributeCode(), + $_attrCode, $productData->$_attrCode ); } @@ -305,10 +320,8 @@ protected function _prepareDataForSave ($product, $productData) foreach ($productData->stock_data as $key => $value) { $_stockData[$key] = $value; } - } else { - $_stockData = array('use_config_manage_stock' => 0); + $product->setStockData($_stockData); } - $product->setStockData($_stockData); if (property_exists($productData, 'tier_price')) { $tierPrices = Mage::getModel('Mage_Catalog_Model_Product_Attribute_Tierprice_Api_V2') diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Api.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Api.php index 282afd419dfaf..645e85549bfb3 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Api.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Api.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Api/V2.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Api/V2.php index 2702ee9c02e01..b5f3ffa7c60a7 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Api/V2.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Api/V2.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Boolean.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Boolean.php index 97657baac24bf..dbd87d3ef9183 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Boolean.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Boolean.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Groupprice.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Groupprice.php new file mode 100644 index 0000000000000..2e905bd9fdcf4 --- /dev/null +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Groupprice.php @@ -0,0 +1,57 @@ + + */ +class Mage_Catalog_Model_Product_Attribute_Backend_Groupprice + extends Mage_Catalog_Model_Product_Attribute_Backend_Groupprice_Abstract +{ + /** + * Retrieve resource instance + * + * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Product_Attribute_Backend_Tierprice + */ + protected function _getResource() + { + return Mage::getResourceSingleton('Mage_Catalog_Model_Resource_Product_Attribute_Backend_Groupprice'); + } + + /** + * Error message when duplicates + * + * @return string + */ + protected function _getDuplicateErrorMessage() + { + return Mage::helper('Mage_Catalog_Helper_Data')->__('Duplicate website group price customer group.'); + } +} diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Groupprice/Abstract.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Groupprice/Abstract.php new file mode 100644 index 0000000000000..13a7f95eda196 --- /dev/null +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Groupprice/Abstract.php @@ -0,0 +1,369 @@ + + */ +abstract class Mage_Catalog_Model_Product_Attribute_Backend_Groupprice_Abstract + extends Mage_Catalog_Model_Product_Attribute_Backend_Price +{ + /** + * Website currency codes and rates + * + * @var array + */ + protected $_rates; + + /** + * Error message when duplicates + * + * @abstract + * @return string + */ + abstract protected function _getDuplicateErrorMessage(); + + /** + * Retrieve websites currency rates and base currency codes + * + * @return array + */ + protected function _getWebsiteCurrencyRates() + { + if (is_null($this->_rates)) { + $this->_rates = array(); + $baseCurrency = Mage::app()->getBaseCurrencyCode(); + foreach (Mage::app()->getWebsites() as $website) { + /* @var $website Mage_Core_Model_Website */ + if ($website->getBaseCurrencyCode() != $baseCurrency) { + $rate = Mage::getModel('Mage_Directory_Model_Currency') + ->load($baseCurrency) + ->getRate($website->getBaseCurrencyCode()); + if (!$rate) { + $rate = 1; + } + $this->_rates[$website->getId()] = array( + 'code' => $website->getBaseCurrencyCode(), + 'rate' => $rate + ); + } else { + $this->_rates[$website->getId()] = array( + 'code' => $baseCurrency, + 'rate' => 1 + ); + } + } + } + return $this->_rates; + } + + /** + * Get additional unique fields + * + * @param array $objectArray + * @return array + */ + protected function _getAdditionalUniqueFields($objectArray) + { + return array(); + } + + /** + * Whether group price value fixed or percent of original price + * + * @param Mage_Catalog_Model_Product_Type_Price $priceObject + * @return bool + */ + protected function _isPriceFixed($priceObject) + { + return $priceObject->isGroupPriceFixed(); + } + + /** + * Validate group price data + * + * @param Mage_Catalog_Model_Product $object + * @throws Mage_Core_Exception + * @return bool + */ + public function validate($object) + { + $attribute = $this->getAttribute(); + $priceRows = $object->getData($attribute->getName()); + if (empty($priceRows)) { + return true; + } + + // validate per website + $duplicates = array(); + foreach ($priceRows as $priceRow) { + if (!empty($priceRow['delete'])) { + continue; + } + $compare = join('-', array_merge( + array($priceRow['website_id'], $priceRow['cust_group']), + $this->_getAdditionalUniqueFields($priceRow) + )); + if (isset($duplicates[$compare])) { + Mage::throwException($this->_getDuplicateErrorMessage()); + } + $duplicates[$compare] = true; + } + + // if attribute scope is website and edit in store view scope + // add global group prices for duplicates find + if (!$attribute->isScopeGlobal() && $object->getStoreId()) { + $origGroupPrices = $object->getOrigData($attribute->getName()); + foreach ($origGroupPrices as $price) { + if ($price['website_id'] == 0) { + $compare = join('-', array_merge( + array($price['website_id'], $price['cust_group']), + $this->_getAdditionalUniqueFields($price) + )); + $duplicates[$compare] = true; + } + } + } + + // validate currency + $baseCurrency = Mage::app()->getBaseCurrencyCode(); + $rates = $this->_getWebsiteCurrencyRates(); + foreach ($priceRows as $priceRow) { + if (!empty($priceRow['delete'])) { + continue; + } + if ($priceRow['website_id'] == 0) { + continue; + } + + $globalCompare = join('-', array_merge( + array(0, $priceRow['cust_group']), + $this->_getAdditionalUniqueFields($priceRow) + )); + $websiteCurrency = $rates[$priceRow['website_id']]['code']; + + if ($baseCurrency == $websiteCurrency && isset($duplicates[$globalCompare])) { + Mage::throwException($this->_getDuplicateErrorMessage()); + } + } + + return true; + } + + /** + * Prepare group prices data for website + * + * @param array $priceData + * @param string $productTypeId + * @param int $websiteId + * @return array + */ + public function preparePriceData(array $priceData, $productTypeId, $websiteId) + { + $rates = $this->_getWebsiteCurrencyRates(); + $data = array(); + $price = Mage::getSingleton('Mage_Catalog_Model_Product_Type')->priceFactory($productTypeId); + foreach ($priceData as $v) { + $key = join('-', array_merge(array($v['cust_group']), $this->_getAdditionalUniqueFields($v))); + if ($v['website_id'] == $websiteId) { + $data[$key] = $v; + $data[$key]['website_price'] = $v['price']; + } else if ($v['website_id'] == 0 && !isset($data[$key])) { + $data[$key] = $v; + $data[$key]['website_id'] = $websiteId; + if ($this->_isPriceFixed($price)) { + $data[$key]['price'] = $v['price'] * $rates[$websiteId]['rate']; + $data[$key]['website_price'] = $v['price'] * $rates[$websiteId]['rate']; + } + } + } + + return $data; + } + + /** + * Assign group prices to product data + * + * @param Mage_Catalog_Model_Product $object + * @return Mage_Catalog_Model_Product_Attribute_Backend_Groupprice_Abstract + */ + public function afterLoad($object) + { + $storeId = $object->getStoreId(); + $websiteId = null; + if ($this->getAttribute()->isScopeGlobal()) { + $websiteId = 0; + } else if ($storeId) { + $websiteId = Mage::app()->getStore($storeId)->getWebsiteId(); + } + + $data = $this->_getResource()->loadPriceData($object->getId(), $websiteId); + foreach ($data as $k => $v) { + $data[$k]['website_price'] = $v['price']; + if ($v['all_groups']) { + $data[$k]['cust_group'] = Mage_Customer_Model_Group::CUST_GROUP_ALL; + } + } + + if (!$object->getData('_edit_mode') && $websiteId) { + $data = $this->preparePriceData($data, $object->getTypeId(), $websiteId); + } + + $object->setData($this->getAttribute()->getName(), $data); + $object->setOrigData($this->getAttribute()->getName(), $data); + + $valueChangedKey = $this->getAttribute()->getName() . '_changed'; + $object->setOrigData($valueChangedKey, 0); + $object->setData($valueChangedKey, 0); + + return $this; + } + + /** + * After Save Attribute manipulation + * + * @param Mage_Catalog_Model_Product $object + * @return Mage_Catalog_Model_Product_Attribute_Backend_Groupprice_Abstract + */ + public function afterSave($object) + { + $websiteId = Mage::app()->getStore($object->getStoreId())->getWebsiteId(); + $isGlobal = $this->getAttribute()->isScopeGlobal() || $websiteId == 0; + + $priceRows = $object->getData($this->getAttribute()->getName()); + if (empty($priceRows)) { + if ($isGlobal) { + $this->_getResource()->deletePriceData($object->getId()); + } else { + $this->_getResource()->deletePriceData($object->getId(), $websiteId); + } + return $this; + } + + $old = array(); + $new = array(); + + // prepare original data for compare + $origGroupPrices = $object->getOrigData($this->getAttribute()->getName()); + if (!is_array($origGroupPrices)) { + $origGroupPrices = array(); + } + foreach ($origGroupPrices as $data) { + if ($data['website_id'] > 0 || ($data['website_id'] == '0' && $isGlobal)) { + $key = join('-', array_merge( + array($data['website_id'], $data['cust_group']), + $this->_getAdditionalUniqueFields($data) + )); + $old[$key] = $data; + } + } + + // prepare data for save + foreach ($priceRows as $data) { + $hasEmptyData = false; + foreach ($this->_getAdditionalUniqueFields($data) as $field) { + if (empty($field)) { + $hasEmptyData = true; + break; + } + } + + if ($hasEmptyData || !isset($data['cust_group']) || !empty($data['delete'])) { + continue; + } + if ($this->getAttribute()->isScopeGlobal() && $data['website_id'] > 0) { + continue; + } + if (!$isGlobal && (int)$data['website_id'] == 0) { + continue; + } + + $key = join('-', array_merge( + array($data['website_id'], $data['cust_group']), + $this->_getAdditionalUniqueFields($data) + )); + + $useForAllGroups = $data['cust_group'] == Mage_Customer_Model_Group::CUST_GROUP_ALL; + $customerGroupId = !$useForAllGroups ? $data['cust_group'] : 0; + + $new[$key] = array_merge(array( + 'website_id' => $data['website_id'], + 'all_groups' => $useForAllGroups ? 1 : 0, + 'customer_group_id' => $customerGroupId, + 'value' => $data['price'], + ), $this->_getAdditionalUniqueFields($data)); + } + + $delete = array_diff_key($old, $new); + $insert = array_diff_key($new, $old); + $update = array_intersect_key($new, $old); + + $isChanged = false; + $productId = $object->getId(); + + if (!empty($delete)) { + foreach ($delete as $data) { + $this->_getResource()->deletePriceData($productId, null, $data['price_id']); + $isChanged = true; + } + } + + if (!empty($insert)) { + foreach ($insert as $data) { + $price = new Varien_Object($data); + $price->setEntityId($productId); + $this->_getResource()->savePriceData($price); + + $isChanged = true; + } + } + + if (!empty($update)) { + foreach ($update as $k => $v) { + if ($old[$k]['price'] != $v['value']) { + $price = new Varien_Object(array( + 'value_id' => $old[$k]['price_id'], + 'value' => $v['value'] + )); + $this->_getResource()->savePriceData($price); + + $isChanged = true; + } + } + } + + if ($isChanged) { + $valueChangedKey = $this->getAttribute()->getName() . '_changed'; + $object->setData($valueChangedKey, 1); + } + + return $this; + } +} diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Media.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Media.php index 62f794efc4ca2..b317be56439eb 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Media.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Media.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -163,6 +163,8 @@ public function beforeSave($object) } } + Mage::dispatchEvent('catalog_product_media_save_before', array('product' => $object, 'images' => $value)); + $object->setData($attrCode, $value); return $this; @@ -268,6 +270,9 @@ public function addImage(Mage_Catalog_Model_Product $product, $file, if (!$file || !file_exists($file)) { Mage::throwException(Mage::helper('Mage_Catalog_Helper_Data')->__('Image does not exist.')); } + + Mage::dispatchEvent('catalog_product_media_add_image', array('product' => $product, 'image' => $file)); + $pathinfo = pathinfo($file); $imgExtensions = array('jpg','jpeg','gif','png'); if (!isset($pathinfo['extension']) || !in_array(strtolower($pathinfo['extension']), $imgExtensions)) { diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Msrp.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Msrp.php index 5f8c81e8f40a8..e59929419d9d8 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Msrp.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Msrp.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Price.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Price.php index 51717e2a0eb8e..16538c868e128 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Price.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Recurring.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Recurring.php index d93615a54963f..eb4fd4a8d646f 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Recurring.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Recurring.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Sku.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Sku.php index 69c5ccc83aca4..ce16f66300d41 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Sku.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Sku.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Startdate.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Startdate.php index 95994762aa61d..a3634a2ee9860 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Startdate.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Startdate.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Tierprice.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Tierprice.php index d6a4dcf844d93..3e2f1743fee95 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Tierprice.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Tierprice.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -32,15 +32,9 @@ * @package Mage_Catalog * @author Magento Core Team */ -class Mage_Catalog_Model_Product_Attribute_Backend_Tierprice extends Mage_Catalog_Model_Product_Attribute_Backend_Price +class Mage_Catalog_Model_Product_Attribute_Backend_Tierprice + extends Mage_Catalog_Model_Product_Attribute_Backend_Groupprice_Abstract { - /** - * Website currency codes and rates - * - * @var array - */ - protected $_rates; - /** * Retrieve resource instance * @@ -54,278 +48,45 @@ protected function _getResource() /** * Retrieve websites rates and base currency codes * + * @deprecated since 1.12.0.0 * @return array */ public function _getWebsiteRates() { - if (is_null($this->_rates)) { - $this->_rates = array(); - $baseCurrency = Mage::app()->getBaseCurrencyCode(); - foreach (Mage::app()->getWebsites() as $website) { - /* @var $website Mage_Core_Model_Website */ - if ($website->getBaseCurrencyCode() != $baseCurrency) { - $rate = Mage::getModel('Mage_Directory_Model_Currency') - ->load($baseCurrency) - ->getRate($website->getBaseCurrencyCode()); - if (!$rate) { - $rate = 1; - } - $this->_rates[$website->getId()] = array( - 'code' => $website->getBaseCurrencyCode(), - 'rate' => $rate - ); - } else { - $this->_rates[$website->getId()] = array( - 'code' => $baseCurrency, - 'rate' => 1 - ); - } - } - } - return $this->_rates; - } - - /** - * Validate tier price data - * - * @param Mage_Catalog_Model_Product $object - * @throws Mage_Core_Exception - * @return bool - */ - public function validate($object) - { - $attribute = $this->getAttribute(); - $tiers = $object->getData($attribute->getName()); - if (empty($tiers)) { - return true; - } - - // validate per website - $duplicates = array(); - foreach ($tiers as $tier) { - if (!empty($tier['delete'])) { - continue; - } - $compare = join('-', array($tier['website_id'], $tier['cust_group'], $tier['price_qty'] * 1)); - if (isset($duplicates[$compare])) { - Mage::throwException( - Mage::helper('Mage_Catalog_Helper_Data')->__('Duplicate website tier price customer group and quantity.') - ); - } - $duplicates[$compare] = true; - } - - // if attribute scope is website and edit in store view scope - // add global tier prices for duplicates find - if (!$attribute->isScopeGlobal() && $object->getStoreId()) { - $origTierPrices = $object->getOrigData($attribute->getName()); - foreach ($origTierPrices as $tier) { - if ($tier['website_id'] == 0) { - $compare = join('-', array($tier['website_id'], $tier['cust_group'], $tier['price_qty'] * 1)); - $duplicates[$compare] = true; - } - } - } - - // validate currency - $baseCurrency = Mage::app()->getBaseCurrencyCode(); - $rates = $this->_getWebsiteRates(); - foreach ($tiers as $tier) { - if (!empty($tier['delete'])) { - continue; - } - if ($tier['website_id'] == 0) { - continue; - } - - $compare = join('-', array($tier['website_id'], $tier['cust_group'], $tier['price_qty'])); - $globalCompare = join('-', array(0, $tier['cust_group'], $tier['price_qty'] * 1)); - $websiteCurrency = $rates[$tier['website_id']]['code']; - - if ($baseCurrency == $websiteCurrency && isset($duplicates[$globalCompare])) { - Mage::throwException( - Mage::helper('Mage_Catalog_Helper_Data')->__('Duplicate website tier price customer group and quantity.') - ); - } - } - - return true; + return $this->_getWebsiteCurrencyRates(); } /** - * Prepare tier prices data for website + * Add price qty to unique fields * - * @param array $priceData - * @param string $productTypeId - * @param int $websiteId + * @param array $objectArray * @return array */ - public function preparePriceData(array $priceData, $productTypeId, $websiteId) + protected function _getAdditionalUniqueFields($objectArray) { - $rates = $this->_getWebsiteRates(); - $data = array(); - $price = Mage::getSingleton('Mage_Catalog_Model_Product_Type')->priceFactory($productTypeId); - foreach ($priceData as $v) { - $key = join('-', array($v['cust_group'], $v['price_qty'])); - if ($v['website_id'] == $websiteId) { - $data[$key] = $v; - $data[$key]['website_price'] = $v['price']; - } else if ($v['website_id'] == 0 && !isset($data[$key])) { - $data[$key] = $v; - $data[$key]['website_id'] = $websiteId; - if ($price->isTierPriceFixed()) { - $data[$key]['price'] = $v['price'] * $rates[$websiteId]['rate']; - $data[$key]['website_price'] = $v['price'] * $rates[$websiteId]['rate']; - } - } - } - - return $data; + $uniqueFields = parent::_getAdditionalUniqueFields($objectArray); + $uniqueFields['qty'] = $objectArray['price_qty'] * 1; + return $uniqueFields; } /** - * Assign tier prices to product data + * Error message when duplicates * - * @param Mage_Catalog_Model_Product $object - * @return Mage_Catalog_Model_Product_Attribute_Backend_Tierprice + * @return string */ - public function afterLoad($object) + protected function _getDuplicateErrorMessage() { - $storeId = $object->getStoreId(); - $websiteId = null; - if ($this->getAttribute()->isScopeGlobal()) { - $websiteId = 0; - } else if ($storeId) { - $websiteId = Mage::app()->getStore($storeId)->getWebsiteId(); - } - - $data = $this->_getResource()->loadPriceData($object->getId(), $websiteId); - foreach ($data as $k => $v) { - $data[$k]['website_price'] = $v['price']; - if ($v['all_groups']) { - $data[$k]['cust_group'] = Mage_Customer_Model_Group::CUST_GROUP_ALL; - } - } - - if (!$object->getData('_edit_mode') && $websiteId) { - $data = $this->preparePriceData($data, $object->getTypeId(), $websiteId); - } - - $object->setData($this->getAttribute()->getName(), $data); - $object->setOrigData($this->getAttribute()->getName(), $data); - - $valueChangedKey = $this->getAttribute()->getName() . '_changed'; - $object->setOrigData($valueChangedKey, 0); - $object->setData($valueChangedKey, 0); - - return $this; + return Mage::helper('Mage_Catalog_Helper_Data')->__('Duplicate website tier price customer group and quantity.'); } /** - * After Save Attribute manipulation + * Whether tier price value fixed or percent of original price * - * @param Mage_Catalog_Model_Product $object - * @return Mage_Catalog_Model_Product_Attribute_Backend_Tierprice + * @param Mage_Catalog_Model_Product_Type_Price $priceObject + * @return bool */ - public function afterSave($object) + protected function _isPriceFixed($priceObject) { - $websiteId = Mage::app()->getStore($object->getStoreId())->getWebsiteId(); - $isGlobal = $this->getAttribute()->isScopeGlobal() || $websiteId == 0; - - $tierPrices = $object->getData($this->getAttribute()->getName()); - if (empty($tierPrices)) { - if ($isGlobal) { - $this->_getResource()->deletePriceData($object->getId()); - } else { - $this->_getResource()->deletePriceData($object->getId(), $websiteId); - } - return $this; - } - - $old = array(); - $new = array(); - - // prepare original data for compare - $origTierPrices = $object->getOrigData($this->getAttribute()->getName()); - if (!is_array($origTierPrices)) { - $origTierPrices = array(); - } - foreach ($origTierPrices as $data) { - if ($data['website_id'] > 0 || ($data['website_id'] == '0' && $isGlobal)) { - $key = join('-', array($data['website_id'], $data['cust_group'], $data['price_qty'] * 1)); - $old[$key] = $data; - } - } - - // prepare data for save - foreach ($tierPrices as $data) { - if (empty($data['price_qty']) || !isset($data['cust_group']) || !empty($data['delete'])) { - continue; - } - if ($this->getAttribute()->isScopeGlobal() && $data['website_id'] > 0) { - continue; - } - if (!$isGlobal && (int)$data['website_id'] == 0) { - continue; - } - - $key = join('-', array($data['website_id'], $data['cust_group'], $data['price_qty'] * 1)); - - $useForAllGroups = $data['cust_group'] == Mage_Customer_Model_Group::CUST_GROUP_ALL; - $customerGroupId = !$useForAllGroups ? $data['cust_group'] : 0; - - $new[$key] = array( - 'website_id' => $data['website_id'], - 'all_groups' => $useForAllGroups ? 1 : 0, - 'customer_group_id' => $customerGroupId, - 'qty' => $data['price_qty'], - 'value' => $data['price'], - ); - } - - $delete = array_diff_key($old, $new); - $insert = array_diff_key($new, $old); - $update = array_intersect_key($new, $old); - - $isChanged = false; - $productId = $object->getId(); - - if (!empty($delete)) { - foreach ($delete as $data) { - $this->_getResource()->deletePriceData($productId, null, $data['price_id']); - $isChanged = true; - } - } - - if (!empty($insert)) { - foreach ($insert as $data) { - $price = new Varien_Object($data); - $price->setEntityId($productId); - $this->_getResource()->savePriceData($price); - - $isChanged = true; - } - } - - if (!empty($update)) { - foreach ($update as $k => $v) { - if ($old[$k]['price'] != $v['value']) { - $price = new Varien_Object(array( - 'value_id' => $old[$k]['price_id'], - 'value' => $v['value'] - )); - $this->_getResource()->savePriceData($price); - - $isChanged = true; - } - } - } - - if ($isChanged) { - $valueChangedKey = $this->getAttribute()->getName() . '_changed'; - $object->setData($valueChangedKey, 1); - } - - return $this; + return $priceObject->isTierPriceFixed(); } } diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Urlkey.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Urlkey.php index 77f104864f49c..9aec762c7392d 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Urlkey.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Backend/Urlkey.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Frontend/Image.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Frontend/Image.php index d000d4b84ddd5..4c23bbeb26a9b 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Frontend/Image.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Frontend/Image.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Group.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Group.php index 61a090f4f8bdb..729254cbe7d31 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Group.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Group.php @@ -21,7 +21,7 @@ * @category Mage * @package Mage_Catalog * @author Magento Core Team - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Media/Api.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Media/Api.php index 6a5ee18d2cd87..32b036caab84c 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Media/Api.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Media/Api.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Media/Api/V2.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Media/Api/V2.php index e0f2ba5e8cb26..c150248937c7f 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Media/Api/V2.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Media/Api/V2.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Set/Api.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Set/Api.php index 9c8b6358cf5d0..3682034b372a6 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Set/Api.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Set/Api.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Set/Api/V2.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Set/Api/V2.php index 517251b6e5c6e..34b7fce655942 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Set/Api/V2.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Set/Api/V2.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Boolean.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Boolean.php index 2fc8399ec54ad..b757fbf92d465 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Boolean.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Boolean.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Countryofmanufacture.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Countryofmanufacture.php index 52881a9a14b8d..1c4f246ca1dac 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Countryofmanufacture.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Countryofmanufacture.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Inputtype.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Inputtype.php index 76f452e83553c..71f4c849be81a 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Inputtype.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Inputtype.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Eav - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Layout.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Layout.php index 319faac561542..e5b54ff772839 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Layout.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Layout.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Msrp/Type.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Msrp/Type.php index 97c5cf2f72acc..23a6496f333b4 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Msrp/Type.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Msrp/Type.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Msrp/Type/Enabled.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Msrp/Type/Enabled.php index 136e8d7d8879b..78fa19ccfc450 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Msrp/Type/Enabled.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Msrp/Type/Enabled.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Msrp/Type/Price.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Msrp/Type/Price.php index ee91f6ead60a3..eebd5f55bfcc2 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Msrp/Type/Price.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Source/Msrp/Type/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Tierprice/Api.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Tierprice/Api.php index e5587b26b7415..9c98fb945d63a 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Tierprice/Api.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Tierprice/Api.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Attribute/Tierprice/Api/V2.php b/app/code/core/Mage/Catalog/Model/Product/Attribute/Tierprice/Api/V2.php index 9a705373133c5..e04b3716918a1 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Attribute/Tierprice/Api/V2.php +++ b/app/code/core/Mage/Catalog/Model/Product/Attribute/Tierprice/Api/V2.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Compare/Item.php b/app/code/core/Mage/Catalog/Model/Product/Compare/Item.php index e1ed15e1b61fb..d2543b612f922 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Compare/Item.php +++ b/app/code/core/Mage/Catalog/Model/Product/Compare/Item.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Compare/List.php b/app/code/core/Mage/Catalog/Model/Product/Compare/List.php index f0a69057e94ae..1b4cec5a3c703 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Compare/List.php +++ b/app/code/core/Mage/Catalog/Model/Product/Compare/List.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Condition.php b/app/code/core/Mage/Catalog/Model/Product/Condition.php index e814f71221794..463d4b0a33a29 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Condition.php +++ b/app/code/core/Mage/Catalog/Model/Product/Condition.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Condition/Interface.php b/app/code/core/Mage/Catalog/Model/Product/Condition/Interface.php index df5a4ef6d03ed..f6d6104615528 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Condition/Interface.php +++ b/app/code/core/Mage/Catalog/Model/Product/Condition/Interface.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Configuration/Item/Interface.php b/app/code/core/Mage/Catalog/Model/Product/Configuration/Item/Interface.php index 0b4aebfaa49e5..9aa55caeb31f2 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Configuration/Item/Interface.php +++ b/app/code/core/Mage/Catalog/Model/Product/Configuration/Item/Interface.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Configuration/Item/Option.php b/app/code/core/Mage/Catalog/Model/Product/Configuration/Item/Option.php index acb9492bdefeb..65d83bc7a7c20 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Configuration/Item/Option.php +++ b/app/code/core/Mage/Catalog/Model/Product/Configuration/Item/Option.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Configuration/Item/Option/Interface.php b/app/code/core/Mage/Catalog/Model/Product/Configuration/Item/Option/Interface.php index 146cf4e9b3b2f..8e542c2d7c2f6 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Configuration/Item/Option/Interface.php +++ b/app/code/core/Mage/Catalog/Model/Product/Configuration/Item/Option/Interface.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Flat/Flag.php b/app/code/core/Mage/Catalog/Model/Product/Flat/Flag.php index 9eaf1058f48f6..d12d4a45fabde 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Flat/Flag.php +++ b/app/code/core/Mage/Catalog/Model/Product/Flat/Flag.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Flat/Indexer.php b/app/code/core/Mage/Catalog/Model/Product/Flat/Indexer.php index e5fad36d501de..690941b222307 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Flat/Indexer.php +++ b/app/code/core/Mage/Catalog/Model/Product/Flat/Indexer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -296,4 +296,14 @@ public function reindexAll() $this->_getResource()->reindexAll(); return $this; } + + /** + * Retrieve list of attribute codes for flat + * + * @return array + */ + public function getAttributeCodes() + { + return $this->_getResource()->getAttributeCodes(); + } } diff --git a/app/code/core/Mage/Catalog/Model/Product/Flat/Observer.php b/app/code/core/Mage/Catalog/Model/Product/Flat/Observer.php index 5c8e3026ccc08..2f8fa8d5bedfd 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Flat/Observer.php +++ b/app/code/core/Mage/Catalog/Model/Product/Flat/Observer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Image.php b/app/code/core/Mage/Catalog/Model/Product/Image.php index 1674ff74f46f5..7dcab3a6d5866 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Image.php +++ b/app/code/core/Mage/Catalog/Model/Product/Image.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Indexer/Eav.php b/app/code/core/Mage/Catalog/Model/Product/Indexer/Eav.php index 4ede822b5cd70..6f1915a6b97fb 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Indexer/Eav.php +++ b/app/code/core/Mage/Catalog/Model/Product/Indexer/Eav.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php b/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php index 76b4b675c7348..0171de4a0a297 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php +++ b/app/code/core/Mage/Catalog/Model/Product/Indexer/Flat.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Catalog_Model_Product_Indexer_Flat extends Mage_Index_Model_Indexer_Abstract @@ -103,7 +103,7 @@ public function matchEvent(Mage_Index_Model_Event $event) return false; } - $data = $event->getNewData(); + $data = $event->getNewData(); if (isset($data[self::EVENT_MATCH_RESULT_KEY])) { return $data[self::EVENT_MATCH_RESULT_KEY]; } @@ -205,7 +205,7 @@ protected function _registerEvent(Mage_Index_Model_Event $event) * Register data required by catalog product process in event object * * @param Mage_Index_Model_Event $event - * @return Mage_CatalogSearch_Model_Indexer_Search + * @return Mage_Catalog_Model_Product_Indexer_Flat */ protected function _registerCatalogProductEvent(Mage_Index_Model_Event $event) { @@ -237,7 +237,12 @@ protected function _registerCatalogProductEvent(Mage_Index_Model_Event $event) $reindexData['catalog_product_flat_action_type'] = $actionObject->getActionType(); } - if (isset($attrData['price']) || isset($attrData['name'])) { + $flatAttributes = array(); + if (is_array($attrData)) { + $flatAttributes = array_intersect($this->_getFlatAttributes(), array_keys($attrData)); + } + + if (count($flatAttributes) > 0) { $reindexFlat = true; $reindexData['catalog_product_flat_force_update'] = true; } @@ -330,4 +335,14 @@ public function reindexAll() { $this->_getIndexer()->reindexAll(); } + + /** + * Retrieve list of attribute codes, that are used in flat + * + * @return array + */ + protected function _getFlatAttributes() + { + return Mage::getModel('Mage_Catalog_Model_Product_Flat_Indexer')->getAttributeCodes(); + } } diff --git a/app/code/core/Mage/Catalog/Model/Product/Indexer/Price.php b/app/code/core/Mage/Catalog/Model/Product/Indexer/Price.php index 483eba1bcb15b..f700beb49f59e 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Indexer/Price.php +++ b/app/code/core/Mage/Catalog/Model/Product/Indexer/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** diff --git a/app/code/core/Mage/Catalog/Model/Product/Link.php b/app/code/core/Mage/Catalog/Model/Product/Link.php index 68958123f57f6..553a0610c9ef9 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Link.php +++ b/app/code/core/Mage/Catalog/Model/Product/Link.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Link/Api.php b/app/code/core/Mage/Catalog/Model/Product/Link/Api.php index fde0633f707ab..d81d7f6053c30 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Link/Api.php +++ b/app/code/core/Mage/Catalog/Model/Product/Link/Api.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Link/Api/V2.php b/app/code/core/Mage/Catalog/Model/Product/Link/Api/V2.php index de6a3c967fdfc..279a0a7eab5b4 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Link/Api/V2.php +++ b/app/code/core/Mage/Catalog/Model/Product/Link/Api/V2.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Media/Config.php b/app/code/core/Mage/Catalog/Model/Product/Media/Config.php index 0f1f7e43dde91..76022f467b005 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Media/Config.php +++ b/app/code/core/Mage/Catalog/Model/Product/Media/Config.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Option.php b/app/code/core/Mage/Catalog/Model/Product/Option.php index b98bdd5a57883..73d012569118d 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Option.php +++ b/app/code/core/Mage/Catalog/Model/Product/Option.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Option/Api.php b/app/code/core/Mage/Catalog/Model/Product/Option/Api.php index 22967e06ed788..5077e60cc6f42 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Option/Api.php +++ b/app/code/core/Mage/Catalog/Model/Product/Option/Api.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Option/Api/V2.php b/app/code/core/Mage/Catalog/Model/Product/Option/Api/V2.php index f77f544f8267e..4380c13c998dd 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Option/Api/V2.php +++ b/app/code/core/Mage/Catalog/Model/Product/Option/Api/V2.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Option/Observer.php b/app/code/core/Mage/Catalog/Model/Product/Option/Observer.php index 64885d4e37db5..1bd2a3b6a34bc 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Option/Observer.php +++ b/app/code/core/Mage/Catalog/Model/Product/Option/Observer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Option/Type/Date.php b/app/code/core/Mage/Catalog/Model/Product/Option/Type/Date.php index 4c046bed474e1..9669ed349a013 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Option/Type/Date.php +++ b/app/code/core/Mage/Catalog/Model/Product/Option/Type/Date.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Option/Type/Default.php b/app/code/core/Mage/Catalog/Model/Product/Option/Type/Default.php index a70d42a3e206d..79ea5e5f97045 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Option/Type/Default.php +++ b/app/code/core/Mage/Catalog/Model/Product/Option/Type/Default.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php b/app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php index cd760d82490a2..bb07dc8ac17e9 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php +++ b/app/code/core/Mage/Catalog/Model/Product/Option/Type/File.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -415,19 +415,15 @@ protected function _getValidatorErrors($errors, $fileInfo) $result = array(); foreach ($errors as $errorCode) { if ($errorCode == Zend_Validate_File_ExcludeExtension::FALSE_EXTENSION) { - $result[] = Mage::helper('Mage_Catalog_Helper_Data')->__("The file '%s' for '%s' has an invalid extension", - $fileInfo['title'], $option->getTitle()); + $result[] = Mage::helper('Mage_Catalog_Helper_Data')->__("The file '%s' for '%s' has an invalid extension", $fileInfo['title'], $option->getTitle()); } elseif ($errorCode == Zend_Validate_File_Extension::FALSE_EXTENSION) { - $result[] = Mage::helper('Mage_Catalog_Helper_Data')->__("The file '%s' for '%s' has an invalid extension", - $fileInfo['title'], $option->getTitle()); + $result[] = Mage::helper('Mage_Catalog_Helper_Data')->__("The file '%s' for '%s' has an invalid extension", $fileInfo['title'], $option->getTitle()); } elseif ($errorCode == Zend_Validate_File_ImageSize::WIDTH_TOO_BIG || $errorCode == Zend_Validate_File_ImageSize::HEIGHT_TOO_BIG) { - $result[] = Mage::helper('Mage_Catalog_Helper_Data')->__("Maximum allowed image size for '%s' is %sx%s px.", - $option->getTitle(), $option->getImageSizeX(), $option->getImageSizeY()); + $result[] = Mage::helper('Mage_Catalog_Helper_Data')->__("Maximum allowed image size for '%s' is %sx%s px.", $option->getTitle(), $option->getImageSizeX(), $option->getImageSizeY()); } elseif ($errorCode == Zend_Validate_File_FilesSize::TOO_BIG) { - $result[] = Mage::helper('Mage_Catalog_Helper_Data')->__("The file '%s' you uploaded is larger than %s Megabytes allowed by server", - $fileInfo['title'], $this->_bytesToMbytes($this->_getUploadMaxFilesize())); + $result[] = Mage::helper('Mage_Catalog_Helper_Data')->__("The file '%s' you uploaded is larger than %s Megabytes allowed by server", $fileInfo['title'], $this->_bytesToMbytes($this->_getUploadMaxFilesize())); } } return $result; @@ -513,7 +509,9 @@ protected function _getOptionHtml($optionValue) { $value = $this->_unserializeValue($optionValue); try { - if (isset($value) && isset($value['width']) && isset($value['height']) && $value['width'] > 0 && $value['height'] > 0) { + if (isset($value) && isset($value['width']) && isset($value['height']) + && $value['width'] > 0 && $value['height'] > 0 + ) { $sizes = $value['width'] . ' x ' . $value['height'] . ' ' . Mage::helper('Mage_Catalog_Helper_Data')->__('px.'); } else { $sizes = ''; diff --git a/app/code/core/Mage/Catalog/Model/Product/Option/Type/Select.php b/app/code/core/Mage/Catalog/Model/Product/Option/Type/Select.php index 6629f42eb6c68..68e09f0cee4ca 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Option/Type/Select.php +++ b/app/code/core/Mage/Catalog/Model/Product/Option/Type/Select.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Option/Type/Text.php b/app/code/core/Mage/Catalog/Model/Product/Option/Type/Text.php index bed8add174729..001ba1c7234a8 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Option/Type/Text.php +++ b/app/code/core/Mage/Catalog/Model/Product/Option/Type/Text.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Option/Value.php b/app/code/core/Mage/Catalog/Model/Product/Option/Value.php index ada97f40eb795..b06b79ec3f08e 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Option/Value.php +++ b/app/code/core/Mage/Catalog/Model/Product/Option/Value.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Option/Value/Api.php b/app/code/core/Mage/Catalog/Model/Product/Option/Value/Api.php index 122153f7ab326..1b26ff27d9730 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Option/Value/Api.php +++ b/app/code/core/Mage/Catalog/Model/Product/Option/Value/Api.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Option/Value/Api/V2.php b/app/code/core/Mage/Catalog/Model/Product/Option/Value/Api/V2.php index 763f7eacdef9e..1bef883999cfe 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Option/Value/Api/V2.php +++ b/app/code/core/Mage/Catalog/Model/Product/Option/Value/Api/V2.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Status.php b/app/code/core/Mage/Catalog/Model/Product/Status.php index bab3e4db0e3bf..a2a2e02cf0614 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Status.php +++ b/app/code/core/Mage/Catalog/Model/Product/Status.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Type.php b/app/code/core/Mage/Catalog/Model/Product/Type.php index 32708ed5929e3..2e337bce21e56 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Type.php +++ b/app/code/core/Mage/Catalog/Model/Product/Type.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php b/app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php index 6ceaeeac128d8..c91dfe0ed6bbf 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php +++ b/app/code/core/Mage/Catalog/Model/Product/Type/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Type/Api.php b/app/code/core/Mage/Catalog/Model/Product/Type/Api.php index 7b15e4be375f1..1fadfd95e73b5 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Type/Api.php +++ b/app/code/core/Mage/Catalog/Model/Product/Type/Api.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Type/Api/V2.php b/app/code/core/Mage/Catalog/Model/Product/Type/Api/V2.php index 95f2e733600a9..28d7ac63e020d 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Type/Api/V2.php +++ b/app/code/core/Mage/Catalog/Model/Product/Type/Api/V2.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php b/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php index 52153b04b968d..f2012a3745f85 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php +++ b/app/code/core/Mage/Catalog/Model/Product/Type/Configurable.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -389,18 +389,20 @@ public function beforeSave($product) if ($product->getCanSaveConfigurableAttributes()) { $product->canAffectOptions(true); - if ($data = $product->getConfigurableAttributesData()) { - if (!empty($data)) { - foreach ($data as $attribute) { - if (!empty($attribute['values'])) { - $product->setTypeHasOptions(true); - $product->setTypeHasRequiredOptions(true); - break; - } + $data = $product->getConfigurableAttributesData(); + if (!empty($data)) { + foreach ($data as $attribute) { + if (!empty($attribute['values'])) { + $product->setTypeHasOptions(true); + $product->setTypeHasRequiredOptions(true); + break; } } } } + foreach ($this->getConfigurableAttributes($product) as $attribute) { + $product->setData($attribute->getProductAttribute()->getAttributeCode(), null); + } return $this; } diff --git a/app/code/core/Mage/Catalog/Model/Product/Type/Configurable/Attribute.php b/app/code/core/Mage/Catalog/Model/Product/Type/Configurable/Attribute.php index 780d703de0a7c..b1d3c405208cf 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Type/Configurable/Attribute.php +++ b/app/code/core/Mage/Catalog/Model/Product/Type/Configurable/Attribute.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Type/Configurable/Price.php b/app/code/core/Mage/Catalog/Model/Product/Type/Configurable/Price.php index a13b9ccd2f214..04df156bb2a53 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Type/Configurable/Price.php +++ b/app/code/core/Mage/Catalog/Model/Product/Type/Configurable/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -46,18 +46,42 @@ public function getFinalPrice($qty=null, $product) return $product->getCalculatedFinalPrice(); } - $finalPrice = parent::getFinalPrice($qty, $product); + $basePrice = $this->getBasePrice($product, $qty); + $finalPrice = $basePrice; + $product->setFinalPrice($finalPrice); + Mage::dispatchEvent('catalog_product_get_final_price', array('product' => $product, 'qty' => $qty)); + $finalPrice = $product->getData('final_price'); + + $finalPrice += $this->getTotalConfigurableItemsPrice($product, $qty); + $finalPrice += $this->_applyOptionsPrice($product, $qty, $basePrice) - $basePrice; + $finalPrice = max(0, $finalPrice); + + $product->setFinalPrice($finalPrice); + return $finalPrice; + } + + /** + * Get Total price for configurable items + * + * @param Mage_Catalog_Model_Product $product + * @param null|float $qty + * @return float + */ + public function getTotalConfigurableItemsPrice($product, $qty = null) + { + $price = 0.0; + $product->getTypeInstance() - ->setStoreFilter($product->getStore(), $product); + ->setStoreFilter($product->getStore(), $product); $attributes = $product->getTypeInstance() - ->getConfigurableAttributes($product); + ->getConfigurableAttributes($product); $selectedAttributes = array(); if ($product->getCustomOption('attributes')) { $selectedAttributes = unserialize($product->getCustomOption('attributes')->getValue()); } - $basePrice = $finalPrice; + $basePrice = $this->getBasePrice($product, $qty); foreach ($attributes as $attribute) { $attributeId = $attribute->getProductAttribute()->getId(); $value = $this->_getValueByIndex( @@ -65,19 +89,18 @@ public function getFinalPrice($qty=null, $product) isset($selectedAttributes[$attributeId]) ? $selectedAttributes[$attributeId] : null ); $product->setParentId(true); - if($value) { - if($value['pricing_value'] != 0) { + if ($value) { + if ($value['pricing_value'] != 0) { $product->setConfigurablePrice($this->_calcSelectionPrice($value, $basePrice)); Mage::dispatchEvent( 'catalog_product_type_configurable_price', array('product' => $product) ); - $finalPrice += $product->getConfigurablePrice(); + $price += $product->getConfigurablePrice(); } } } - $product->setFinalPrice($finalPrice); - return max(0, $product->getData('final_price')); + return $price; } /** diff --git a/app/code/core/Mage/Catalog/Model/Product/Type/Grouped.php b/app/code/core/Mage/Catalog/Model/Product/Type/Grouped.php index 26cc0b6485864..370d4d76a7915 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Type/Grouped.php +++ b/app/code/core/Mage/Catalog/Model/Product/Type/Grouped.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Type/Grouped/Price.php b/app/code/core/Mage/Catalog/Model/Product/Type/Grouped/Price.php index 710d83b102c21..3420f08668383 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Type/Grouped/Price.php +++ b/app/code/core/Mage/Catalog/Model/Product/Type/Grouped/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Type/Price.php b/app/code/core/Mage/Catalog/Model/Product/Type/Price.php index ae67fa56c924f..9fa5946ee7979 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Type/Price.php +++ b/app/code/core/Mage/Catalog/Model/Product/Type/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -48,24 +48,39 @@ public function getPrice($product) } /** - * Get product final price + * Get base price with apply Group, Tier, Special prises * - * @param double $qty - * @param Mage_Catalog_Model_Product $product - * @return double + * @param Mage_Catalog_Model_Product $product + * @param float|null $qty + * + * @return float + */ + public function getBasePrice($product, $qty = null) + { + $price = (float)$product->getPrice(); + return min($this->_applyGroupPrice($product, $price), $this->_applyTierPrice($product, $qty, $price), + $this->_applySpecialPrice($product, $price) + ); + } + + + /** + * Retrieve product final price + * + * @param float|null $qty + * @param Mage_Catalog_Model_Product $product + * @return float */ - public function getFinalPrice($qty=null, $product) + public function getFinalPrice($qty = null, $product) { if (is_null($qty) && !is_null($product->getCalculatedFinalPrice())) { return $product->getCalculatedFinalPrice(); } - $finalPrice = $product->getPrice(); - $finalPrice = $this->_applyTierPrice($product, $qty, $finalPrice); - $finalPrice = $this->_applySpecialPrice($product, $finalPrice); + $finalPrice = $this->getBasePrice($product, $qty); $product->setFinalPrice($finalPrice); - Mage::dispatchEvent('catalog_product_get_final_price', array('product'=>$product, 'qty' => $qty)); + Mage::dispatchEvent('catalog_product_get_final_price', array('product' => $product, 'qty' => $qty)); $finalPrice = $product->getData('final_price'); $finalPrice = $this->_applyOptionsPrice($product, $qty, $finalPrice); @@ -80,13 +95,65 @@ public function getChildFinalPrice($product, $productQty, $childProduct, $childP return $this->getFinalPrice($childProductQty, $childProduct); } + /** + * Apply group price for product + * + * @param Mage_Catalog_Model_Product $product + * @param float $finalPrice + * @return float + */ + protected function _applyGroupPrice($product, $finalPrice) + { + $groupPrice = $product->getGroupPrice(); + if (is_numeric($groupPrice)) { + $finalPrice = min($finalPrice, $groupPrice); + } + return $finalPrice; + } + + /** + * Get product group price + * + * @param Mage_Catalog_Model_Product $product + * @return float + */ + public function getGroupPrice($product) + { + + $groupPrices = $product->getData('group_price'); + + if (is_null($groupPrices)) { + $attribute = $product->getResource()->getAttribute('group_price'); + if ($attribute) { + $attribute->getBackend()->afterLoad($product); + $groupPrices = $product->getData('group_price'); + } + } + + if (is_null($groupPrices) || !is_array($groupPrices)) { + return $product->getPrice(); + } + + $customerGroup = $this->_getCustomerGroupId($product); + + $matchedPrice = $product->getPrice(); + foreach ($groupPrices as $groupPrice) { + if ($groupPrice['cust_group'] == $customerGroup && $groupPrice['website_price'] < $matchedPrice) { + $matchedPrice = $groupPrice['website_price']; + break; + } + } + + return $matchedPrice; + } + /** * Apply tier price for product if not return price that was before * * @param Mage_Catalog_Model_Product $product - * @param double $qty - * @param double $finalPrice - * @return double + * @param float $qty + * @param float $finalPrice + * @return float */ protected function _applyTierPrice($product, $qty, $finalPrice) { @@ -104,9 +171,9 @@ protected function _applyTierPrice($product, $qty, $finalPrice) /** * Get product tier price by qty * - * @param double $qty + * @param float $qty * @param Mage_Catalog_Model_Product $product - * @return double + * @return float */ public function getTierPrice($qty = null, $product) { @@ -197,8 +264,8 @@ protected function _getCustomerGroupId($product) * Apply special price for product if not return price that was before * * @param Mage_Catalog_Model_Product $product - * @param double $finalPrice - * @return double + * @param float $finalPrice + * @return float */ protected function _applySpecialPrice($product, $finalPrice) { @@ -220,11 +287,11 @@ public function getTierPriceCount($product) } /** - * Get formated by currency tier price + * Get formatted by currency tier price * - * @param double $qty + * @param float $qty * @param Mage_Catalog_Model_Product $product - * @return array || double + * @return array || float */ public function getFormatedTierPrice($qty=null, $product) { @@ -244,10 +311,10 @@ public function getFormatedTierPrice($qty=null, $product) } /** - * Get formated by currency product price + * Get formatted by currency product price * * @param Mage_Catalog_Model_Product $product - * @return array || double + * @return array || float */ public function getFormatedPrice($product) { @@ -259,8 +326,8 @@ public function getFormatedPrice($product) * * @param Mage_Catalog_Model_Product $product * @param int $qty - * @param double $finalPrice - * @return double + * @param float $finalPrice + * @return float */ protected function _applyOptionsPrice($product, $qty, $finalPrice) { @@ -268,12 +335,11 @@ protected function _applyOptionsPrice($product, $qty, $finalPrice) $basePrice = $finalPrice; foreach (explode(',', $optionIds->getValue()) as $optionId) { if ($option = $product->getOptionById($optionId)) { - $confItemOption = $product->getCustomOption('option_'.$option->getId()); + $group = $option->groupFactory($option->getType()) ->setOption($option) ->setConfigurationItemOption($confItemOption); - $finalPrice += $group->getOptionPrice($confItemOption->getValue(), $basePrice); } } @@ -355,6 +421,16 @@ public static function calculateSpecialPrice($finalPrice, $specialPrice, $specia * @return bool */ public function isTierPriceFixed() + { + return $this->isGroupPriceFixed(); + } + + /** + * Check is group price value fixed or percent of original price + * + * @return bool + */ + public function isGroupPriceFixed() { return true; } diff --git a/app/code/core/Mage/Catalog/Model/Product/Type/Simple.php b/app/code/core/Mage/Catalog/Model/Product/Type/Simple.php index f527948789d98..9e8ca639b6bcb 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Type/Simple.php +++ b/app/code/core/Mage/Catalog/Model/Product/Type/Simple.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Type/Virtual.php b/app/code/core/Mage/Catalog/Model/Product/Type/Virtual.php index 54d63646f5714..1f0d0a4fde398 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Type/Virtual.php +++ b/app/code/core/Mage/Catalog/Model/Product/Type/Virtual.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Url.php b/app/code/core/Mage/Catalog/Model/Product/Url.php index df57627c62ba5..5415617cfc760 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Url.php +++ b/app/code/core/Mage/Catalog/Model/Product/Url.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Visibility.php b/app/code/core/Mage/Catalog/Model/Product/Visibility.php index 736d69a1dd6c0..02f8e04a92dc9 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Visibility.php +++ b/app/code/core/Mage/Catalog/Model/Product/Visibility.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Product/Website.php b/app/code/core/Mage/Catalog/Model/Product/Website.php index 8007f50344686..387ea78f93fbf 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Website.php +++ b/app/code/core/Mage/Catalog/Model/Product/Website.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Abstract.php b/app/code/core/Mage/Catalog/Model/Resource/Abstract.php index e31f9deca64d9..25333e81ffb79 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Abstract.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -202,7 +202,7 @@ protected function _setAttributeValue($object, $valueRow) if (!$isDefaultStore) { $object->setExistsStoreValueFlag($attributeCode); } - $attribute->getBackend()->setValueId($valueId); + $attribute->getBackend()->setEntityValueId($object, $valueId); } return $this; diff --git a/app/code/core/Mage/Catalog/Model/Resource/Attribute.php b/app/code/core/Mage/Catalog/Model/Resource/Attribute.php index b3903a3e285a0..b4740bee3a6c6 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Attribute.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Attribute.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Category.php b/app/code/core/Mage/Catalog/Model/Resource/Category.php index 28956b5f4c96b..5648a447a4df9 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Category.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Category.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Category/Attribute/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Category/Attribute/Collection.php index 040c1e122bb82..5dcbc06e20635 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Category/Attribute/Collection.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Category/Attribute/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Category/Attribute/Frontend/Image.php b/app/code/core/Mage/Catalog/Model/Resource/Category/Attribute/Frontend/Image.php index 890af7ec37c69..44787591df8a8 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Category/Attribute/Frontend/Image.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Category/Attribute/Frontend/Image.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Category/Attribute/Source/Layout.php b/app/code/core/Mage/Catalog/Model/Resource/Category/Attribute/Source/Layout.php index 4d835a53947c8..e5ea45593aea2 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Category/Attribute/Source/Layout.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Category/Attribute/Source/Layout.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Category/Attribute/Source/Mode.php b/app/code/core/Mage/Catalog/Model/Resource/Category/Attribute/Source/Mode.php index 84816549755d3..4734621a97033 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Category/Attribute/Source/Mode.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Category/Attribute/Source/Mode.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Category/Attribute/Source/Page.php b/app/code/core/Mage/Catalog/Model/Resource/Category/Attribute/Source/Page.php index 0beea60c43788..be435f41a2979 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Category/Attribute/Source/Page.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Category/Attribute/Source/Page.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Category/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Category/Collection.php index 68274fdb1edf5..259bf8e1db944 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Category/Collection.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Category/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php b/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php index 44fb77318b173..1de0b3f75e3c5 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Category/Flat.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Category/Flat/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Category/Flat/Collection.php index 461c3c563d200..6a25ee9e3ad34 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Category/Flat/Collection.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Category/Flat/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php b/app/code/core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php index 830a4acfb5218..324551213c5bd 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Category/Indexer/Product.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Category/Tree.php b/app/code/core/Mage/Catalog/Model/Resource/Category/Tree.php index 974c52722aec6..970f31d94253e 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Category/Tree.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Category/Tree.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Collection/Abstract.php b/app/code/core/Mage/Catalog/Model/Resource/Collection/Abstract.php index b891597e0770e..7ab9f0097815c 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Collection/Abstract.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Collection/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Config.php b/app/code/core/Mage/Catalog/Model/Resource/Config.php index b60fa96ee6a60..194e16e7a0a1d 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Config.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Config.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Attribute.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Attribute.php index 690c74b61bce8..25f7667a57fe6 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Attribute.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Attribute.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Helper/Mysql4.php b/app/code/core/Mage/Catalog/Model/Resource/Helper/Mysql4.php index 76d1ea88feae0..69723d77b9872 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Helper/Mysql4.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Helper/Mysql4.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Attribute.php b/app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Attribute.php index a88e042f59862..2caa16643fd07 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Attribute.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Attribute.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Decimal.php b/app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Decimal.php index 684b2fda4a731..1ca16bad8d43f 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Decimal.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Decimal.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -71,8 +71,7 @@ public function applyFilterToCollection($filter, $range, $index) $collection->getSelect() ->where("{$tableAlias}.value >= ?", ($range * ($index - 1))) - ->where("{$tableAlias}.value < ?", ($range * $index)) - ->group('e.entity_id'); + ->where("{$tableAlias}.value < ?", ($range * $index)); return $this; } @@ -143,7 +142,7 @@ public function getCount($filter, $range) $select = $this->_getSelect($filter); $adapter = $this->_getReadAdapter(); - $countExpr = new Zend_Db_Expr("COUNT(DISTINCT e.entity_id)"); + $countExpr = new Zend_Db_Expr("COUNT(*)"); $rangeExpr = new Zend_Db_Expr("FLOOR(decimal_index.value / {$range}) + 1"); $select->columns(array( diff --git a/app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Price.php b/app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Price.php index 9e8d89826af6c..a8d04b9fde65a 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Price.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Layer/Filter/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -159,7 +159,7 @@ public function getCount($filter, $range) 'range' => $rangeExpr, 'count' => $countExpr )); - $select->group($rangeExpr); + $select->group($rangeExpr)->order("$rangeExpr ASC"); return $connection->fetchPairs($select); } @@ -181,7 +181,7 @@ protected function _prepareApply($filter) $table = $this->_getIndexTableAlias(); $additional = join('', $response->getAdditionalCalculations()); $rate = $filter->getCurrencyRate(); - $priceExpr = new Zend_Db_Expr("(({$table}.min_price {$additional}) * {$rate})"); + $priceExpr = new Zend_Db_Expr("ROUND(({$table}.min_price {$additional}) * {$rate}, 2)"); return array($select, $priceExpr); } @@ -221,13 +221,17 @@ public function loadAllPrices($algorithm, $filter) $additional = join('', $response->getAdditionalCalculations()); $maxPriceExpr = new Zend_Db_Expr( - "({$table}.min_price {$additional}) * ". $connection->quote($filter->getCurrencyRate()) + "ROUND(({$table}.min_price {$additional}) * " . $connection->quote($filter->getCurrencyRate()) . ", 2)" ); - $select->columns(array($maxPriceExpr)); + $select->columns(array($maxPriceExpr))->order("$maxPriceExpr ASC"); $prices = $connection->fetchCol($select); - $algorithm->setPrices($prices); + if ($filter->getInterval() && count($prices) <= $filter->getIntervalDivisionLimit()) { + $algorithm->setPrices(array()); + } else { + $algorithm->setPrices($prices); + } return $prices; } diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product.php b/app/code/core/Mage/Catalog/Model/Resource/Product.php index 112c5d87b6c15..6d9dc25cb6900 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -630,7 +630,7 @@ public function getProductsSku(array $productIds) /** * Retrieve product entities info * - * @param null $columns + * @param array|string|null $columns * @return array */ public function getProductEntitiesInfo($columns = null) @@ -641,9 +641,12 @@ public function getProductEntitiesInfo($columns = null) if (empty($columns) || !is_array($columns)) { $columns = $this->_getDefaultAttributes(); } - $select = $this->_getReadAdapter()->select() + + $adapter = $this->_getReadAdapter(); + $select = $adapter->select() ->from($this->getTable('catalog_product_entity'), $columns); - return $this->_getReadAdapter()->fetchAll($select); + + return $adapter->fetchAll($select); } /** @@ -681,4 +684,4 @@ public function getAssignedImages($product, $storeIds) $images = $read->fetchAll($select); return $images; } -} +} \ No newline at end of file diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Action.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Action.php index 9d9d6ce56dde2..90401af50e980 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Action.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Action.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Groupprice.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Groupprice.php new file mode 100755 index 0000000000000..1a29638502a28 --- /dev/null +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Groupprice.php @@ -0,0 +1,46 @@ + + */ +class Mage_Catalog_Model_Resource_Product_Attribute_Backend_Groupprice + extends Mage_Catalog_Model_Resource_Product_Attribute_Backend_Groupprice_Abstract +{ + /** + * Initialize connection and define main table + * + */ + protected function _construct() + { + $this->_init('catalog_product_entity_group_price', 'value_id'); + } +} \ No newline at end of file diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Groupprice/Abstract.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Groupprice/Abstract.php new file mode 100644 index 0000000000000..e3786d0e1a3e9 --- /dev/null +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Groupprice/Abstract.php @@ -0,0 +1,147 @@ + + */ +abstract class Mage_Catalog_Model_Resource_Product_Attribute_Backend_Groupprice_Abstract + extends Mage_Core_Model_Resource_Db_Abstract +{ + /** + * Load Tier Prices for product + * + * @param int $productId + * @param int $websiteId + * @return Mage_Catalog_Model_Resource_Product_Attribute_Backend_Tierprice + */ + public function loadPriceData($productId, $websiteId = null) + { + $adapter = $this->_getReadAdapter(); + + $columns = array( + 'price_id' => $this->getIdFieldName(), + 'website_id' => 'website_id', + 'all_groups' => 'all_groups', + 'cust_group' => 'customer_group_id', + 'price' => 'value', + ); + + $columns = $this->_loadPriceDataColumns($columns); + + $select = $adapter->select() + ->from($this->getMainTable(), $columns) + ->where('entity_id=?', $productId); + + $this->_loadPriceDataSelect($select); + + if (!is_null($websiteId)) { + if ($websiteId == '0') { + $select->where('website_id = ?', $websiteId); + } else { + $select->where('website_id IN(?)', array(0, $websiteId)); + } + } + + return $adapter->fetchAll($select); + } + + /** + * Load specific sql columns + * + * @param array $columns + * @return array + */ + protected function _loadPriceDataColumns($columns) + { + return $columns; + } + + /** + * Load specific db-select data + * + * @param Varien_Db_Select $select + * @return Varien_Db_Select + */ + protected function _loadPriceDataSelect($select) + { + return $select; + } + + /** + * Delete Tier Prices for product + * + * @param int $productId + * @param int $websiteId + * @param int $priceId + * @return int The number of affected rows + */ + public function deletePriceData($productId, $websiteId = null, $priceId = null) + { + $adapter = $this->_getWriteAdapter(); + + $conds = array( + $adapter->quoteInto('entity_id = ?', $productId) + ); + + if (!is_null($websiteId)) { + $conds[] = $adapter->quoteInto('website_id = ?', $websiteId); + } + + if (!is_null($priceId)) { + $conds[] = $adapter->quoteInto($this->getIdFieldName() . ' = ?', $priceId); + } + + $where = implode(' AND ', $conds); + + return $adapter->delete($this->getMainTable(), $where); + } + + /** + * Save tier price object + * + * @param Varien_Object $priceObject + * @return Mage_Catalog_Model_Resource_Product_Attribute_Backend_Tierprice + */ + public function savePriceData(Varien_Object $priceObject) + { + $adapter = $this->_getWriteAdapter(); + $data = $this->_prepareDataForTable($priceObject, $this->getMainTable()); + + if (!empty($data[$this->getIdFieldName()])) { + $where = $adapter->quoteInto($this->getIdFieldName() . ' = ?', $data[$this->getIdFieldName()]); + unset($data[$this->getIdFieldName()]); + $adapter->update($this->getMainTable(), $data, $where); + } else { + $adapter->insert($this->getMainTable(), $data); + } + return $this; + } +} diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Image.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Image.php index 6ea707808c919..9ab82537d0306 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Image.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Image.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Media.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Media.php index b24c83210226e..51a256abfed4e 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Media.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Media.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Tierprice.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Tierprice.php index b5d9c69fe5d1f..f1c316838b6e0 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Tierprice.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Tierprice.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -32,7 +32,8 @@ * @package Mage_Catalog * @author Magento Core Team */ -class Mage_Catalog_Model_Resource_Product_Attribute_Backend_Tierprice extends Mage_Core_Model_Resource_Db_Abstract +class Mage_Catalog_Model_Resource_Product_Attribute_Backend_Tierprice + extends Mage_Catalog_Model_Resource_Product_Attribute_Backend_Groupprice_Abstract { /** * Initialize connection and define main table @@ -44,88 +45,27 @@ protected function _construct() } /** - * Load Tier Prices for product + * Add qty column * - * @param int $productId - * @param int $websiteId - * @return Mage_Catalog_Model_Resource_Product_Attribute_Backend_Tierprice + * @param array $columns + * @return array */ - public function loadPriceData($productId, $websiteId = null) + protected function _loadPriceDataColumns($columns) { - $adapter = $this->_getReadAdapter(); - - $columns = array( - 'price_id' => $this->getIdFieldName(), - 'website_id' => 'website_id', - 'all_groups' => 'all_groups', - 'cust_group' => 'customer_group_id', - 'price_qty' => 'qty', - 'price' => 'value', - ); - - $select = $adapter->select() - ->from($this->getMainTable(), $columns) - ->where('entity_id=?', $productId) - ->order('qty'); - - if (!is_null($websiteId)) { - if ($websiteId == '0') { - $select->where('website_id = ?', $websiteId); - } else { - $select->where('website_id IN(?)', array(0, $websiteId)); - } - } - - return $adapter->fetchAll($select); - } - - /** - * Delete Tier Prices for product - * - * @param int $productId - * @param int $websiteId - * @param int $priceId - * @return int The number of affected rows - */ - public function deletePriceData($productId, $websiteId = null, $priceId = null) - { - $adapter = $this->_getWriteAdapter(); - - $conds = array( - $adapter->quoteInto('entity_id = ?', $productId) - ); - - if (!is_null($websiteId)) { - $conds[] = $adapter->quoteInto('website_id = ?', $websiteId); - } - - if (!is_null($priceId)) { - $conds[] = $adapter->quoteInto($this->getIdFieldName() . ' = ?', $priceId); - } - - $where = implode(' AND ', $conds); - - return $adapter->delete($this->getMainTable(), $where); + $columns = parent::_loadPriceDataColumns($columns); + $columns['price_qty'] = 'qty'; + return $columns; } /** - * Save tier price object + * Order by qty * - * @param Varien_Object $priceObject - * @return Mage_Catalog_Model_Resource_Product_Attribute_Backend_Tierprice + * @param Varien_Db_Select $select + * @return Varien_Db_Select */ - public function savePriceData(Varien_Object $priceObject) + protected function _loadPriceDataSelect($select) { - $adapter = $this->_getWriteAdapter(); - $data = $this->_prepareDataForTable($priceObject, $this->getMainTable()); - - if (!empty($data[$this->getIdFieldName()])) { - $where = $adapter->quoteInto($this->getIdFieldName() . ' = ?', $data[$this->getIdFieldName()]); - unset($data[$this->getIdFieldName()]); - $adapter->update($this->getMainTable(), $data, $where); - } else { - $adapter->insert($this->getMainTable(), $data); - } - return $this; + $select->order('qty'); + return $select; } } diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Urlkey.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Urlkey.php index 9a238ead17ddd..1e17780ca2a4d 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Urlkey.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Backend/Urlkey.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Collection.php index c7cf5fdf8d2eb..d00f2b62b978f 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Collection.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Attribute/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -72,9 +72,10 @@ protected function _initSelect() } /** - * Specify attribute entity type filter + * Specify attribute entity type filter. + * Entity type is defined. * - * @param int $typeId + * @param int $typeId * @return Mage_Catalog_Model_Resource_Product_Attribute_Collection */ public function setEntityTypeFilter($typeId) @@ -173,11 +174,13 @@ public function addToIndexFilter($addRequiredCodes = false) 'additional_table.is_searchable = 1', 'additional_table.is_visible_in_advanced_search = 1', 'additional_table.is_filterable > 0', - 'additional_table.is_filterable_in_search = 1' + 'additional_table.is_filterable_in_search = 1', + 'additional_table.used_for_sort_by = 1' ); if ($addRequiredCodes) { - $conditions[] = $this->getConnection()->quoteInto('main_table.attribute_code IN (?)', array('status', 'visibility')); + $conditions[] = $this->getConnection()->quoteInto('main_table.attribute_code IN (?)', + array('status', 'visibility')); } $this->getSelect()->where(sprintf('(%s)', implode(' OR ', $conditions))); diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php index d1367a705c4f9..b0492af8dd7ea 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -1458,6 +1458,17 @@ protected function _productLimitationJoinStore() * @return Mage_Catalog_Model_Resource_Product_Collection */ protected function _productLimitationJoinPrice() + { + return $this->_productLimitationPrice(); + } + + /** + * Join Product Price Table with left-join possibility + * + * @see Mage_Catalog_Model_Resource_Product_Collection::_productLimitationJoinPrice() + * @return Mage_Catalog_Model_Resource_Product_Collection + */ + protected function _productLimitationPrice($joinLeft = false) { $filters = $this->_productLimitationFilters; if (empty($filters['use_price_index'])) { @@ -1480,11 +1491,12 @@ protected function _productLimitationJoinPrice() $least, 'price_index.min_price'); $colls = array('price', 'tax_class_id', 'final_price', 'minimal_price' => $minimalExpr , 'min_price', 'max_price', 'tier_price'); - $select->join( - array('price_index' => $this->getTable('catalog_product_index_price')), - $joinCond, - $colls - ); + $tableName = array('price_index' => $this->getTable('catalog_product_index_price')); + if ($joinLeft) { + $select->joinLeft($tableName, $joinCond, $colls); + } else { + $select->join($tableName, $joinCond, $colls); + } // Set additional field filters foreach ($this->_priceDataFieldFilters as $filterData) { $select->where(call_user_func_array('sprintf', $filterData)); diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Compare/Item.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Compare/Item.php index b545d410c1ba8..6ecf33ad94975 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Compare/Item.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Compare/Item.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Compare/Item/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Compare/Item/Collection.php index 38f1b555b4cd1..5285c85d9565b 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Compare/Item/Collection.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Compare/Item/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Flat.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Flat.php index 141a87dfb1e38..77b096d86cbc6 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Flat.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Flat.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php index ebece7e05838c..8fb31af465a6b 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Flat/Indexer.php @@ -1,5 +1,5 @@ - - */ -class Mage_Catalog_Model_Resource_Product_Flat_Indexer extends Mage_Index_Model_Resource_Abstract -{ - const XML_NODE_MAX_INDEX_COUNT = 'global/catalog/product/flat/max_index_count'; - const XML_NODE_ATTRIBUTE_NODES = 'global/catalog/product/flat/attribute_nodes'; - - /** - * Attribute codes for flat - * - * @var array - */ - protected $_attributeCodes; - - /** - * Attribute objects for flat cache - * - * @var array - */ - protected $_attributes; - - /** - * Required system attributes for preload - * - * @var array - */ - protected $_systemAttributes = array('status', 'required_options', 'tax_class_id', 'weight'); - - /** - * Eav Catalog_Product Entity Type Id - * - * @var int - */ - protected $_entityTypeId; - - /** - * Flat table columns cache - * - * @var array - */ - protected $_columns; - - /** - * Flat table indexes cache - * - * @var array - */ - protected $_indexes; - - /** - * Product Type Instances cache - * - * @var array - */ - protected $_productTypes; - - /** - * Exists flat tables cache - * - * @var array - */ - protected $_existsFlatTables = array(); - - /** - * Flat tables which were prepared - * - * @var array - */ - protected $_preparedFlatTables = array(); - - /** - * Initialize connection - * - */ - protected function _construct() - { - $this->_init('catalog_product_entity', 'entity_id'); - } - - /** - * Rebuild Catalog Product Flat Data - * - * @param Mage_Core_Model_Store|int $store - * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer - */ - public function rebuild($store = null) - { - if ($store === null) { - foreach (Mage::app()->getStores() as $store) { - $this->rebuild($store->getId()); - } - $flag = $this->getFlatHelper()->getFlag(); - $flag->setIsBuild(true)->save(); - - return $this; - } - - $storeId = (int)Mage::app()->getStore($store)->getId(); - - $this->prepareFlatTable($storeId); - $this->cleanNonWebsiteProducts($storeId); - $this->updateStaticAttributes($storeId); - $this->updateEavAttributes($storeId); - $this->updateEventAttributes($storeId); - $this->updateRelationProducts($storeId); - $this->cleanRelationProducts($storeId); - - return $this; - } - - /** - * Retrieve Catalog Product Flat helper - * - * @return Mage_Catalog_Helper_Product_Flat - */ - public function getFlatHelper() - { - return Mage::helper('Mage_Catalog_Helper_Product_Flat'); - } - - /** - * Retrieve attribute codes using for flat - * - * @return array - */ - public function getAttributeCodes() - { - if ($this->_attributeCodes === null) { - $adapter = $this->_getReadAdapter(); - $this->_attributeCodes = array(); - - $attributeNodes = Mage::getConfig() - ->getNode(self::XML_NODE_ATTRIBUTE_NODES) - ->children(); - foreach ($attributeNodes as $node) { - $attributes = Mage::getConfig()->getNode((string)$node)->asArray(); - $attributes = array_keys($attributes); - $this->_systemAttributes = array_unique(array_merge($attributes, $this->_systemAttributes)); - } - - $bind = array( - 'backend_type' => Mage_Eav_Model_Entity_Attribute_Abstract::TYPE_STATIC, - 'entity_type_id' => $this->getEntityTypeId() - ); - - $select = $adapter->select() - ->from(array('main_table' => $this->getTable('eav_attribute'))) - ->join( - array('additional_table' => $this->getTable('catalog_eav_attribute')), - 'additional_table.attribute_id = main_table.attribute_id' - ) - ->where('main_table.entity_type_id = :entity_type_id'); - $whereCondition = array( - 'main_table.backend_type = :backend_type', - $adapter->quoteInto('additional_table.is_used_for_promo_rules = ?', 1), - $adapter->quoteInto('additional_table.used_in_product_listing = ?', 1), - $adapter->quoteInto('additional_table.used_for_sort_by = ?', 1), - $adapter->quoteInto('main_table.attribute_code IN(?)', $this->_systemAttributes) - ); - if ($this->getFlatHelper()->isAddFilterableAttributes()) { - $whereCondition[] = $adapter->quoteInto('additional_table.is_filterable > ?', 0); - } - - $select->where(implode(' OR ', $whereCondition)); - $attributesData = $adapter->fetchAll($select, $bind); - Mage::getSingleton('Mage_Eav_Model_Config') - ->importAttributesData($this->getEntityType(), $attributesData); - - foreach ($attributesData as $data) { - $this->_attributeCodes[$data['attribute_id']] = $data['attribute_code']; - } - unset($attributesData); - } - - return $this->_attributeCodes; - } - - /** - * Retrieve entity type - * - * @return string - */ - public function getEntityType() - { - return Mage_Catalog_Model_Product::ENTITY; - } - - /** - * Retrieve Catalog Entity Type Id - * - * @return int - */ - public function getEntityTypeId() - { - if ($this->_entityTypeId === null) { - $this->_entityTypeId = Mage::getResourceModel('Mage_Catalog_Model_Resource_Config') - ->getEntityTypeId(); - } - return $this->_entityTypeId; - } - - /** - * Retrieve attribute objects for flat - * - * @return array - */ - public function getAttributes() - { - if ($this->_attributes === null) { - $this->_attributes = array(); - $attributeCodes = $this->getAttributeCodes(); - $entity = Mage::getSingleton('Mage_Eav_Model_Config') - ->getEntityType($this->getEntityType()) - ->getEntity(); - - foreach ($attributeCodes as $attributeCode) { - $attribute = Mage::getSingleton('Mage_Eav_Model_Config') - ->getAttribute($this->getEntityType(), $attributeCode) - ->setEntity($entity); - try { - // check if exists source and backend model. - // To prevent exception when some module was disabled - $attribute->usesSource() && $attribute->getSource(); - $attribute->getBackend(); - $this->_attributes[$attributeCode] = $attribute; - } catch (Exception $e) { - Mage::logException($e); - } - } - } - - return $this->_attributes; - } - - /** - * Retrieve loaded attribute by code - * - * @param string $attributeCode - * @throws Mage_Core_Exception - * @return Mage_Eav_Model_Entity_Attribute - */ - public function getAttribute($attributeCode) - { - $attributes = $this->getAttributes(); - if (!isset($attributes[$attributeCode])) { - $attribute = Mage::getModel('Mage_Catalog_Model_Resource_Eav_Attribute') - ->loadByCode($this->getEntityTypeId(), $attributeCode); - if (!$attribute->getId()) { - Mage::throwException(Mage::helper('Mage_Catalog_Helper_Data')->__('Invalid attribute %s', $attributeCode)); - } - $entity = Mage::getSingleton('Mage_Eav_Model_Config') - ->getEntityType($this->getEntityType()) - ->getEntity(); - $attribute->setEntity($entity); - - return $attribute; - } - - return $attributes[$attributeCode]; - } - - /** - * Retrieve Catalog Product Flat Table name - * - * @param int $storeId - * @return string - */ - public function getFlatTableName($storeId) - { - return sprintf('%s_%s', $this->getTable('catalog_product_flat'), $storeId); - } - - /** - * Retrieve catalog product flat columns array in old format (used before MMDB support) - * - * @return array - */ - protected function _getFlatColumnsOldDefinition() - { - $columns = array(); - $columns['entity_id'] = array( - 'type' => 'int(10)', - 'unsigned' => true, - 'is_null' => false, - 'default' => null, - 'extra' => null - ); - if ($this->getFlatHelper()->isAddChildData()) { - $columns['child_id'] = array( - 'type' => 'int(10)', - 'unsigned' => true, - 'is_null' => true, - 'default' => null, - 'extra' => null - ); - $columns['is_child'] = array( - 'type' => 'tinyint(1)', - 'unsigned' => true, - 'is_null' => false, - 'default' => 0, - 'extra' => null - ); - } - $columns['attribute_set_id'] = array( - 'type' => 'smallint(5)', - 'unsigned' => true, - 'is_null' => false, - 'default' => 0, - 'extra' => null - ); - $columns['type_id'] = array( - 'type' => 'varchar(32)', - 'unsigned' => false, - 'is_null' => false, - 'default' => Mage_Catalog_Model_Product_Type::TYPE_SIMPLE, - 'extra' => null - ); - - return $columns; - } - - /** - * Retrieve catalog product flat columns array in DDL format - * - * @return array - */ - protected function _getFlatColumnsDdlDefinition() - { - $columns = array(); - $columns['entity_id'] = array( - 'type' => Varien_Db_Ddl_Table::TYPE_INTEGER, - 'length' => null, - 'unsigned' => true, - 'nullable' => false, - 'default' => false, - 'primary' => true, - 'comment' => 'Entity Id' - ); - if ($this->getFlatHelper()->isAddChildData()) { - $columns['child_id'] = array( - 'type' => Varien_Db_Ddl_Table::TYPE_INTEGER, - 'length' => null, - 'unsigned' => true, - 'nullable' => true, - 'default' => null, - 'primary' => true, - 'comment' => 'Child Id' - ); - $columns['is_child'] = array( - 'type' => Varien_Db_Ddl_Table::TYPE_SMALLINT, - 'length' => 1, - 'unsigned' => true, - 'nullable' => false, - 'default' => '0', - 'comment' => 'Checks If Entity Is Child' - ); - } - $columns['attribute_set_id'] = array( - 'type' => Varien_Db_Ddl_Table::TYPE_SMALLINT, - 'length' => 5, - 'unsigned' => true, - 'nullable' => false, - 'default' => '0', - 'comment' => 'Attribute Set Id' - ); - $columns['type_id'] = array( - 'type' => Varien_Db_Ddl_Table::TYPE_TEXT, - 'length' => 32, - 'unsigned' => false, - 'nullable' => false, - 'default' => Mage_Catalog_Model_Product_Type::TYPE_SIMPLE, - 'comment' => 'Type Id' - ); - - return $columns; - } - - /** - * Retrieve catalog product flat table columns array - * - * @return array - */ - public function getFlatColumns() - { - if ($this->_columns === null) { - if (Mage::helper('Mage_Core_Helper_Data')->useDbCompatibleMode()) { - $this->_columns = $this->_getFlatColumnsOldDefinition(); - } else { - $this->_columns = $this->_getFlatColumnsDdlDefinition(); - } - - foreach ($this->getAttributes() as $attribute) { - /** @var $attribute Mage_Eav_Model_Entity_Attribute_Abstract */ - $columns = $attribute - ->setFlatAddFilterableAttributes($this->getFlatHelper()->isAddFilterableAttributes()) - ->setFlatAddChildData($this->getFlatHelper()->isAddChildData()) - ->getFlatColumns(); - if ($columns !== null) { - $this->_columns = array_merge($this->_columns, $columns); - } - } - - $columnsObject = new Varien_Object(); - $columnsObject->setColumns($this->_columns); - Mage::dispatchEvent('catalog_product_flat_prepare_columns', - array('columns' => $columnsObject) - ); - $this->_columns = $columnsObject->getColumns(); - } - - return $this->_columns; - } - - /** - * Retrieve catalog product flat table indexes array - * - * @return array - */ - public function getFlatIndexes() - { - if ($this->_indexes === null) { - $this->_indexes = array(); - - if ($this->getFlatHelper()->isAddChildData()) { - $this->_indexes['PRIMARY'] = array( - 'type' => Varien_Db_Adapter_Interface::INDEX_TYPE_PRIMARY, - 'fields' => array('entity_id', 'child_id') - ); - $this->_indexes['IDX_CHILD'] = array( - 'type' => Varien_Db_Adapter_Interface::INDEX_TYPE_INDEX, - 'fields' => array('child_id') - ); - $this->_indexes['IDX_IS_CHILD'] = array( - 'type' => Varien_Db_Adapter_Interface::INDEX_TYPE_INDEX, - 'fields' => array('entity_id', 'is_child') - ); - } else { - $this->_indexes['PRIMARY'] = array( - 'type' => Varien_Db_Adapter_Interface::INDEX_TYPE_PRIMARY, - 'fields' => array('entity_id') - ); - } - $this->_indexes['IDX_TYPE_ID'] = array( - 'type' => Varien_Db_Adapter_Interface::INDEX_TYPE_INDEX, - 'fields' => array('type_id') - ); - $this->_indexes['IDX_ATTRIBUTE_SET'] = array( - 'type' => Varien_Db_Adapter_Interface::INDEX_TYPE_INDEX, - 'fields' => array('attribute_set_id') - ); - - foreach ($this->getAttributes() as $attribute) { - /** @var $attribute Mage_Eav_Model_Entity_Attribute */ - $indexes = $attribute - ->setFlatAddFilterableAttributes($this->getFlatHelper()->isAddFilterableAttributes()) - ->setFlatAddChildData($this->getFlatHelper()->isAddChildData()) - ->getFlatIndexes(); - if ($indexes !== null) { - $this->_indexes = array_merge($this->_indexes, $indexes); - } - } - - $indexesObject = new Varien_Object(); - $indexesObject->setIndexes($this->_indexes); - Mage::dispatchEvent('catalog_product_flat_prepare_indexes', array( - 'indexes' => $indexesObject - )); - $this->_indexes = $indexesObject->getIndexes(); - } - - return $this->_indexes; - } - - /** - * Compare Flat style with Describe style columns - * If column a different - return false - * - * @param array $column - * @param array $describe - * @return bool - */ - protected function _compareColumnProperties($column, $describe) - { - return Mage::getResourceHelper('Mage_Catalog')->compareIndexColumnProperties($column, $describe); - } - - /** - * Retrieve UNIQUE HASH for a Table foreign key - * - * @param string $priTableName the target table name - * @param string $priColumnName the target table column name - * @param string $refTableName the reference table name - * @param string $refColumnName the reference table column name - * @return string - */ - public function getFkName($priTableName, $priColumnName, $refTableName, $refColumnName) - { - return Mage::getSingleton('Mage_Core_Model_Resource') - ->getFkName($priTableName, $priColumnName, $refTableName, $refColumnName); - } - - /** - * Prepare flat table for store - * - * @param int $storeId - * @throws Mage_Core_Exception - * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer - */ - public function prepareFlatTable($storeId) - { - if (isset($this->_preparedFlatTables[$storeId])) { - return $this; - } - $adapter = $this->_getWriteAdapter(); - $tableName = $this->getFlatTableName($storeId); - - // Extract columns we need to have in flat table - $columns = $this->getFlatColumns(); - if (Mage::helper('Mage_Core_Helper_Data')->useDbCompatibleMode()) { - /* Convert old format of flat columns to new MMDB format that uses DDL types and definitions */ - foreach ($columns as $key => $column) { - $columns[$key] = Mage::getResourceHelper('Mage_Core')->convertOldColumnDefinition($column); - } - } - - // Extract indexes we need to have in flat table - $indexesNeed = $this->getFlatIndexes(); - - $maxIndex = Mage::getConfig()->getNode(self::XML_NODE_MAX_INDEX_COUNT); - if (count($indexesNeed) > $maxIndex) { - Mage::throwException(Mage::helper('Mage_Catalog_Helper_Data')->__("The Flat Catalog module has a limit of %2\$d filterable and/or sortable attributes. Currently there are %1\$d of them. Please reduce the number of filterable/sortable attributes in order to use this module", count($indexesNeed), $maxIndex)); - } - - // Process indexes to create names for them in MMDB-style and reformat to common index definition - $indexKeys = array(); - $indexProps = array_values($indexesNeed); - $upperPrimaryKey = strtoupper(Varien_Db_Adapter_Interface::INDEX_TYPE_PRIMARY); - foreach ($indexProps as $i => $indexProp) { - $indexName = $adapter->getIndexName($tableName, $indexProp['fields'], $indexProp['type']); - $indexProp['type'] = strtoupper($indexProp['type']); - if ($indexProp['type'] == $upperPrimaryKey) { - $indexKey = $upperPrimaryKey; - } else { - $indexKey = $indexName; - } - - $indexProps[$i] = array( - 'KEY_NAME' => $indexName, - 'COLUMNS_LIST' => $indexProp['fields'], - 'INDEX_TYPE' => strtolower($indexProp['type']) - ); - $indexKeys[$i] = $indexKey; - } - $indexesNeed = array_combine($indexKeys, $indexProps); // Array with index names as keys, except for primary - - // Foreign keys - $foreignEntityKey = $this->getFkName($tableName, 'entity_id', 'catalog_product_entity', 'entity_id'); - $foreignChildKey = $this->getFkName($tableName, 'child_id', 'catalog_product_entity', 'entity_id'); - - // Create table or modify existing one - if (!$this->_isFlatTableExists($storeId)) { - /** @var $table Varien_Db_Ddl_Table */ - $table = $adapter->newTable($tableName); - foreach ($columns as $fieldName => $fieldProp) { - $table->addColumn( - $fieldName, - $fieldProp['type'], - isset($fieldProp['length']) ? $fieldProp['length'] : null, - array( - 'nullable' => isset($fieldProp['nullable']) ? (bool)$fieldProp['nullable'] : false, - 'unsigned' => isset($fieldProp['unsigned']) ? (bool)$fieldProp['unsigned'] : false, - 'default' => isset($fieldProp['default']) ? $fieldProp['default'] : false, - 'primary' => false, - ), - isset($fieldProp['comment']) ? $fieldProp['comment'] : $fieldName - ); - } - - foreach ($indexesNeed as $indexProp) { - $table->addIndex($indexProp['KEY_NAME'], $indexProp['COLUMNS_LIST'], - array('type' => $indexProp['INDEX_TYPE'])); - } - - $table->addForeignKey($foreignEntityKey, - 'entity_id', $this->getTable('catalog_product_entity'), 'entity_id', - Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE); - - if ($this->getFlatHelper()->isAddChildData()) { - $table->addForeignKey($foreignChildKey, - 'child_id', $this->getTable('catalog_product_entity'), 'entity_id', - Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE); - } - $table->setComment("Catalog Product Flat (Store {$storeId})"); - - $adapter->createTable($table); - - $this->_existsFlatTables[$storeId] = true; - } else { - $adapter->resetDdlCache($tableName); - - // Sort columns into added/altered/dropped lists - $describe = $adapter->describeTable($tableName); - $addColumns = array_diff_key($columns, $describe); - $dropColumns = array_diff_key($describe, $columns); - $modifyColumns = array(); - foreach ($columns as $field => $fieldProp) { - if (isset($describe[$field]) && !$this->_compareColumnProperties($fieldProp, $describe[$field])) { - $modifyColumns[$field] = $fieldProp; - } - } - - // Sort indexes into added/dropped lists. Altered indexes are put into both lists. - $addIndexes = array(); - $dropIndexes = array(); - $indexesNow = $adapter->getIndexList($tableName); // Note: primary is always stored under 'PRIMARY' key - $newIndexes = $indexesNeed; - foreach ($indexesNow as $key => $indexNow) { - if (isset($indexesNeed[$key])) { - $indexNeed = $indexesNeed[$key]; - if (($indexNeed['INDEX_TYPE'] != $indexNow['INDEX_TYPE']) - || ($indexNeed['COLUMNS_LIST'] != $indexNow['COLUMNS_LIST'])) { - $dropIndexes[$key] = $indexNow; - $addIndexes[$key] = $indexNeed; - } - unset($newIndexes[$key]); - } else { - $dropIndexes[$key] = $indexNow; - } - } - $addIndexes = $addIndexes + $newIndexes; - - // Compose contstraints - $addConstraints = array(); - $addConstraints[$foreignEntityKey] = array( - 'table_index' => 'entity_id', - 'ref_table' => $this->getTable('catalog_product_entity'), - 'ref_index' => 'entity_id', - 'on_update' => Varien_Db_Ddl_Table::ACTION_CASCADE, - 'on_delete' => Varien_Db_Ddl_Table::ACTION_CASCADE - ); - - // Additional data from childs - $isAddChildData = $this->getFlatHelper()->isAddChildData(); - if (!$isAddChildData && isset($describe['is_child'])) { - $adapter->delete($tableName, array('is_child = ?' => 1)); - $adapter->dropForeignKey($tableName, $foreignChildKey); - } - if ($isAddChildData && !isset($describe['is_child'])) { - $adapter->delete($tableName); - $dropIndexes['PRIMARY'] = $indexesNow['PRIMARY']; - $addIndexes['PRIMARY'] = $indexesNeed['PRIMARY']; - - $addConstraints[$foreignChildKey] = array( - 'table_index' => 'child_id', - 'ref_table' => $this->getTable('catalog_product_entity'), - 'ref_index' => 'entity_id', - 'on_update' => Varien_Db_Ddl_Table::ACTION_CASCADE, - 'on_delete' => Varien_Db_Ddl_Table::ACTION_CASCADE - ); - } - - // Drop constraints - foreach (array_keys($adapter->getForeignKeys($tableName)) as $constraintName) { - $adapter->dropForeignKey($tableName, $constraintName); - } - - // Drop indexes - foreach ($dropIndexes as $indexProp) { - $adapter->dropIndex($tableName, $indexProp['KEY_NAME']); - } - - // Drop columns - foreach (array_keys($dropColumns) as $columnName) { - $adapter->dropColumn($tableName, $columnName); - } - - // Modify columns - foreach ($modifyColumns as $columnName => $columnProp) { - $columnProp = array_change_key_case($columnProp, CASE_UPPER); - if (!isset($columnProp['COMMENT'])) { - $columnProp['COMMENT'] = ucwords(str_replace('_', ' ', $columnName)); - } - $adapter->changeColumn($tableName, $columnName, $columnName, $columnProp); - } - - // Add columns - foreach ($addColumns as $columnName => $columnProp) { - $columnProp = array_change_key_case($columnProp, CASE_UPPER); - if (!isset($columnProp['COMMENT'])) { - $columnProp['COMMENT'] = ucwords(str_replace('_', ' ', $columnName)); - } - $adapter->addColumn($tableName, $columnName, $columnProp); - } - - // Add indexes - foreach ($addIndexes as $indexProp) { - $adapter->addIndex($tableName, $indexProp['KEY_NAME'], $indexProp['COLUMNS_LIST'], - $indexProp['INDEX_TYPE']); - } - - // Add constraints - foreach ($addConstraints as $constraintName => $constraintProp) { - $adapter->addForeignKey($constraintName, $tableName, - $constraintProp['table_index'], - $constraintProp['ref_table'], - $constraintProp['ref_index'], - $constraintProp['on_delete'], - $constraintProp['on_update'] - ); - } - } - - $this->_preparedFlatTables[$storeId] = true; - - return $this; - } - - /** - * Add or Update static attributes - * - * @param int $storeId - * @param int|array $productIds update only product(s) - * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer - */ - public function updateStaticAttributes($storeId, $productIds = null) - { - if (!$this->_isFlatTableExists($storeId)) { - return $this; - } - $adapter = $this->_getWriteAdapter(); - $websiteId = (int)Mage::app()->getStore($storeId)->getWebsite()->getId(); - /* @var $status Mage_Eav_Model_Entity_Attribute */ - $status = $this->getAttribute('status'); - - $fieldList = array('entity_id', 'type_id', 'attribute_set_id'); - $colsList = array('entity_id', 'type_id', 'attribute_set_id'); - if ($this->getFlatHelper()->isAddChildData()) { - $fieldList = array_merge($fieldList, array('child_id', 'is_child')); - $isChild = new Zend_Db_Expr('0'); - $colsList = array_merge($colsList, array('entity_id', $isChild)); - } - - $columns = $this->getFlatColumns(); - $bind = array( - 'website_id' => $websiteId, - 'store_id' => $storeId, - 'entity_type_id' => (int)$status->getEntityTypeId(), - 'attribute_id' => (int)$status->getId() - ); - - $fieldExpr = $adapter->getCheckSql('t2.value_id > 0', 't2.value', 't1.value'); - $select = $this->_getWriteAdapter()->select() - ->from(array('e' => $this->getTable('catalog_product_entity')), $colsList) - ->join( - array('wp' => $this->getTable('catalog_product_website')), - 'e.entity_id = wp.product_id AND wp.website_id = :website_id', - array()) - ->joinLeft( - array('t1' => $status->getBackend()->getTable()), - 'e.entity_id = t1.entity_id', - array()) - ->joinLeft( - array('t2' => $status->getBackend()->getTable()), - 't2.entity_id = t1.entity_id' - . ' AND t1.entity_type_id = t2.entity_type_id' - . ' AND t1.attribute_id = t2.attribute_id' - . ' AND t2.store_id = :store_id', - array()) - ->where('t1.entity_type_id = :entity_type_id') - ->where('t1.attribute_id = :attribute_id') - ->where('t1.store_id = ?', Mage_Core_Model_App::ADMIN_STORE_ID) - ->where("{$fieldExpr} = ?", Mage_Catalog_Model_Product_Status::STATUS_ENABLED); - foreach ($this->getAttributes() as $attributeCode => $attribute) { - /** @var $attribute Mage_Eav_Model_Entity_Attribute */ - if ($attribute->getBackend()->getType() == 'static') { - if (!isset($columns[$attributeCode])) { - continue; - } - $fieldList[] = $attributeCode; - $select->columns($attributeCode, 'e'); - } - } - - if ($productIds !== null) { - $select->where('e.entity_id IN(?)', $productIds); - } - - $sql = $select->insertFromSelect($this->getFlatTableName($storeId), $fieldList); - $adapter->query($sql, $bind); - - return $this; - } - - /** - * Remove non website products - * - * @param int $storeId - * @param int|array $productIds - * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer - */ - public function cleanNonWebsiteProducts($storeId, $productIds = null) - { - if (!$this->_isFlatTableExists($storeId)) { - return $this; - } - - $websiteId = (int)Mage::app()->getStore($storeId)->getWebsite()->getId(); - $adapter = $this->_getWriteAdapter(); - - $joinCondition = array( - 'e.entity_id = wp.product_id', - 'wp.website_id = :website_id' - ); - if ($this->getFlatHelper()->isAddChildData()) { - $joinCondition[] = 'e.child_id = wp.product_id'; - } - $bind = array('website_id' => $websiteId); - $select = $adapter->select() - ->from(array('e' => $this->getFlatTableName($storeId)), null) - ->joinLeft( - array('wp' => $this->getTable('catalog_product_website')), - implode(' AND ', $joinCondition), - array()); - if ($productIds !== null) { - $condition = array( - $adapter->quoteInto('e.entity_id IN(?)', $productIds) - ); - if ($this->getFlatHelper()->isAddChildData()) { - $condition[] = $adapter->quoteInto('e.child_id IN(?)', $productIds); - } - $select->where(implode(' OR ', $condition)); - } - - $sql = $select->deleteFromSelect('e'); - $adapter->query($sql, $bind); - - return $this; - } - - /** - * Update attribute flat data - * - * @param Mage_Eav_Model_Entity_Attribute $attribute - * @param int $storeId - * @param int|array $productIds update only product(s) - * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer - */ - public function updateAttribute($attribute, $storeId, $productIds = null) - { - if (!$this->_isFlatTableExists($storeId)) { - return $this; - } - $adapter = $this->_getWriteAdapter(); - $flatTableName = $this->getFlatTableName($storeId); - $describe = $adapter->describeTable($flatTableName); - - if ($attribute->getBackend()->getType() == 'static') { - if (!isset($describe[$attribute->getAttributeCode()])) { - return $this; - } - - $select = $adapter->select() - ->join( - array('main_table' => $this->getTable('catalog_product_entity')), - 'main_table.entity_id = e.entity_id', - array($attribute->getAttributeCode() => 'main_table.' . $attribute->getAttributeCode()) - ); - if ($this->getFlatHelper()->isAddChildData()) { - $select->where('e.is_child = ?', 0); - } - if ($productIds !== null) { - $select->where('main_table.entity_id IN(?)', $productIds); - } - - $sql = $select->crossUpdateFromSelect(array('e' => $flatTableName)); - $adapter->query($sql); - } else { - $columns = $attribute->getFlatColumns(); - if (!$columns) { - return $this; - } - foreach (array_keys($columns) as $columnName) { - if (!isset($describe[$columnName])) { - return $this; - } - } - - $select = $attribute->getFlatUpdateSelect($storeId); - if ($select instanceof Varien_Db_Select) { - if ($productIds !== null) { - $select->where('e.entity_id IN(?)', $productIds); - } - - $sql = $select->crossUpdateFromSelect(array('e' => $flatTableName)); - $adapter->query($sql); - } - } - - return $this; - } - - /** - * Update non static EAV attributes flat data - * - * @param int $storeId - * @param int|array $productIds update only product(s) - * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer - */ - public function updateEavAttributes($storeId, $productIds = null) - { - if (!$this->_isFlatTableExists($storeId)) { - return $this; - } - - foreach ($this->getAttributes() as $attribute) { - /* @var $attribute Mage_Eav_Model_Entity_Attribute */ - if ($attribute->getBackend()->getType() != 'static') { - $this->updateAttribute($attribute, $storeId, $productIds); - } - } - return $this; - } - - /** - * Update events observer attributes - * - * @param int $storeId - */ - public function updateEventAttributes($storeId = null) - { - Mage::dispatchEvent('catalog_product_flat_rebuild', array( - 'store_id' => $storeId, - 'table' => $this->getFlatTableName($storeId) - )); - } - - /** - * Retrieve Product Type Instances - * as key - type code, value - instance model - * - * @return array - */ - public function getProductTypeInstances() - { - if ($this->_productTypes === null) { - $this->_productTypes = array(); - $productEmulator = new Varien_Object(); - - foreach (array_keys(Mage_Catalog_Model_Product_Type::getTypes()) as $typeId) { - $productEmulator->setTypeId($typeId); - $this->_productTypes[$typeId] = Mage::getSingleton('Mage_Catalog_Model_Product_Type') - ->factory($productEmulator); - } - } - return $this->_productTypes; - } - - /** - * Update relation products - * - * @param int $storeId - * @param int|array $productIds Update child product(s) only - * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer - */ - public function updateRelationProducts($storeId, $productIds = null) - { - if (!$this->getFlatHelper()->isAddChildData() || !$this->_isFlatTableExists($storeId)) { - return $this; - } - - $adapter = $this->_getWriteAdapter(); - - foreach ($this->getProductTypeInstances() as $typeInstance) { - if (!$typeInstance->isComposite()) { - continue; - } - $relation = $typeInstance->getRelationInfo(); - if ($relation - && $relation->getTable() - && $relation->getParentFieldName() - && $relation->getChildFieldName() - ) { - $columns = $this->getFlatColumns(); - $fieldList = array_keys($columns); - unset($columns['entity_id']); - unset($columns['child_id']); - unset($columns['is_child']); - - $select = $adapter->select() - ->from( - array('t' => $this->getTable($relation->getTable())), - array($relation->getParentFieldName(), $relation->getChildFieldName(), new Zend_Db_Expr('1'))) - ->join( - array('e' => $this->getFlatTableName($storeId)), - "e.entity_id = t.{$relation->getChildFieldName()}", - array_keys($columns) - ); - if ($relation->getWhere() !== null) { - $select->where($relation->getWhere()); - } - if ($productIds !== null) { - $cond = array( - $adapter->quoteInto("{$relation->getChildFieldName()} IN(?)", $productIds), - $adapter->quoteInto("{$relation->getParentFieldName()} IN(?)", $productIds) - ); - - $select->where(implode(' OR ', $cond)); - } - $sql = $select->insertFromSelect($this->getFlatTableName($storeId), $fieldList); - $adapter->query($sql); - } - } - - return $this; - } - - /** - * Update children data from parent - * - * @param int $storeId - * @param int|array $productIds - * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer - */ - public function updateChildrenDataFromParent($storeId, $productIds = null) - { - if (!$this->getFlatHelper()->isAddChildData() || !$this->_isFlatTableExists($storeId)) { - return $this; - } - $adapter = $this->_getWriteAdapter(); - - $select = $adapter->select(); - foreach (array_keys($this->getFlatColumns()) as $columnName) { - if ($columnName == 'entity_id' || $columnName == 'child_id' || $columnName == 'is_child') { - continue; - } - $select->columns(array($columnName => new Zend_Db_Expr('t1.' . $columnName))); - } - $select - ->joinLeft( - array('t1' => $this->getFlatTableName($storeId)), - $adapter->quoteInto('t2.child_id = t1.entity_id AND t1.is_child = ?', 0), - array()) - ->where('t2.is_child = ?', 1); - - if ($productIds !== null) { - $select->where('t2.child_id IN(?)', $productIds); - } - - $sql = $select->crossUpdateFromSelect(array('t2' => $this->getFlatTableName($storeId))); - $adapter->query($sql); - - return $this; - } - - /** - * Clean unused relation products - * - * @param int $storeId - * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer - */ - public function cleanRelationProducts($storeId) - { - if (!$this->getFlatHelper()->isAddChildData()) { - return $this; - } - - foreach ($this->getProductTypeInstances() as $typeInstance) { - if (!$typeInstance->isComposite()) { - continue; - } - $adapter = $this->_getWriteAdapter(); - $relation = $typeInstance->getRelationInfo(); - if ($relation - && $relation->getTable() - && $relation->getParentFieldName() - && $relation->getChildFieldName() - ) { - $select = $this->_getWriteAdapter()->select() - ->distinct(true) - ->from( - $this->getTable($relation->getTable()), - "{$relation->getParentFieldName()}" - ); - $joinLeftCond = array( - "e.entity_id = t.{$relation->getParentFieldName()}", - "e.child_id = t.{$relation->getChildFieldName()}" - ); - if ($relation->getWhere() !== null) { - $select->where($relation->getWhere()); - $joinLeftCond[] = $relation->getWhere(); - } - - $entitySelect = new Zend_Db_Expr($select->__toString()); - - $select = $adapter->select() - ->from(array('e' => $this->getFlatTableName($storeId)), null) - ->joinLeft( - array('t' => $this->getTable($relation->getTable())), - implode(' AND ', $joinLeftCond), - array()) - ->where('e.is_child = ?', 1) - ->where('e.entity_id IN(?)', $entitySelect) - ->where("t.{$relation->getChildFieldName()} IS NULL"); - - $sql = $select->deleteFromSelect('e'); - $adapter->query($sql); - } - } - - return $this; - } - - /** - * Remove product data from flat - * - * @param int|array $productIds - * @param int $storeId - * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer - */ - public function removeProduct($productIds, $storeId) - { - if (!$this->_isFlatTableExists($storeId)) { - return $this; - } - $adapter = $this->_getWriteAdapter(); - $cond = array( - $adapter->quoteInto('entity_id IN(?)', $productIds) - ); - if ($this->getFlatHelper()->isAddChildData()) { - $cond[] = $adapter->quoteInto('child_id IN(?)', $productIds); - } - $cond = implode(' OR ', $cond); - $adapter->delete($this->getFlatTableName($storeId), $cond); - - return $this; - } - - /** - * Remove children from parent product - * - * @param int|array $productIds - * @param int $storeId - * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer - */ - public function removeProductChildren($productIds, $storeId) - { - if (!$this->getFlatHelper()->isAddChildData()) { - return $this; - } - $whereExpr = array( - 'entity_id IN(?)' => $productIds, - 'is_child = ?' => 1 - ); - $this->_getWriteAdapter()->delete($this->getFlatTableName($storeId), $whereExpr); - - return $this; - } - - /** - * Update flat data for product - * - * @param int|array $productIds - * @param int $storeId - * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer - */ - public function updateProduct($productIds, $storeId) - { - if (!$this->_isFlatTableExists($storeId)) { - return $this; - } - - $this->saveProduct($productIds, $storeId); - - Mage::dispatchEvent('catalog_product_flat_update_product', array( - 'store_id' => $storeId, - 'table' => $this->getFlatTableName($storeId), - 'product_ids' => $productIds - )); - - return $this; - } - - /** - * Save product(s) data for store - * - * @param int|array $productIds - * @param int $storeId - * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer - */ - public function saveProduct($productIds, $storeId) - { - if (!$this->_isFlatTableExists($storeId)) { - return $this; - } - - $this->updateStaticAttributes($storeId, $productIds); - $this->updateEavAttributes($storeId, $productIds); - - return $this; - } - - /** - * Delete flat table process - * - * @param int $storeId - * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer - */ - public function deleteFlatTable($storeId) - { - if ($this->_isFlatTableExists($storeId)) { - $this->_getWriteAdapter()->dropTable($this->getFlatTableName($storeId)); - } - - return $this; - } - - /** - * Check is flat table for store exists - * - * @param int $storeId - * @return bool - */ - protected function _isFlatTableExists($storeId) - { - if (!isset($this->_existsFlatTables[$storeId])) { - $tableName = $this->getFlatTableName($storeId); - $isTableExists = $this->_getWriteAdapter()->isTableExists($tableName); - - $this->_existsFlatTables[$storeId] = $isTableExists ? true : false; - } - - return $this->_existsFlatTables[$storeId]; - } - - /** - * Retrieve previous key from array by key - * - * @param array $array - * @param mixed $key - * @return mixed - */ - protected function _arrayPrevKey(array $array, $key) - { - $prev = false; - foreach (array_keys($array) as $k) { - if ($k == $key) { - return $prev; - } - $prev = $k; - } - return false; - } - - /** - * Retrieve next key from array by key - * - * @param array $array - * @param mixed $key - * @return mixed - */ - protected function _arrayNextKey(array $array, $key) - { - $next = false; - foreach (array_keys($array) as $k) { - if ($next === true) { - return $k; - } - if ($k == $key) { - $next = true; - } - } - return false; - } - - /** - * Prepare flat tables for all stores - * - * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer - */ - public function prepareFlatTables() - { + */ + + +/** + * Catalog Product Flat Indexer Resource Model + * + * @category Mage + * @package Mage_Catalog + * @author Magento Core Team + */ +class Mage_Catalog_Model_Resource_Product_Flat_Indexer extends Mage_Index_Model_Resource_Abstract +{ + const XML_NODE_MAX_INDEX_COUNT = 'global/catalog/product/flat/max_index_count'; + const XML_NODE_ATTRIBUTE_NODES = 'global/catalog/product/flat/attribute_nodes'; + + /** + * Attribute codes for flat + * + * @var array + */ + protected $_attributeCodes; + + /** + * Attribute objects for flat cache + * + * @var array + */ + protected $_attributes; + + /** + * Required system attributes for preload + * + * @var array + */ + protected $_systemAttributes = array('status', 'required_options', 'tax_class_id', 'weight'); + + /** + * Eav Catalog_Product Entity Type Id + * + * @var int + */ + protected $_entityTypeId; + + /** + * Flat table columns cache + * + * @var array + */ + protected $_columns; + + /** + * Flat table indexes cache + * + * @var array + */ + protected $_indexes; + + /** + * Product Type Instances cache + * + * @var array + */ + protected $_productTypes; + + /** + * Exists flat tables cache + * + * @var array + */ + protected $_existsFlatTables = array(); + + /** + * Flat tables which were prepared + * + * @var array + */ + protected $_preparedFlatTables = array(); + + /** + * Initialize connection + * + */ + protected function _construct() + { + $this->_init('catalog_product_entity', 'entity_id'); + } + + /** + * Rebuild Catalog Product Flat Data + * + * @param Mage_Core_Model_Store|int $store + * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer + */ + public function rebuild($store = null) + { + if ($store === null) { + foreach (Mage::app()->getStores() as $store) { + $this->rebuild($store->getId()); + } + $flag = $this->getFlatHelper()->getFlag(); + $flag->setIsBuild(true)->save(); + + return $this; + } + + $storeId = (int)Mage::app()->getStore($store)->getId(); + + $this->prepareFlatTable($storeId); + $this->cleanNonWebsiteProducts($storeId); + $this->updateStaticAttributes($storeId); + $this->updateEavAttributes($storeId); + $this->updateEventAttributes($storeId); + $this->updateRelationProducts($storeId); + $this->cleanRelationProducts($storeId); + + return $this; + } + + /** + * Retrieve Catalog Product Flat helper + * + * @return Mage_Catalog_Helper_Product_Flat + */ + public function getFlatHelper() + { + return Mage::helper('Mage_Catalog_Helper_Product_Flat'); + } + + /** + * Retrieve attribute codes using for flat + * + * @return array + */ + public function getAttributeCodes() + { + if ($this->_attributeCodes === null) { + $adapter = $this->_getReadAdapter(); + $this->_attributeCodes = array(); + + $attributeNodes = Mage::getConfig() + ->getNode(self::XML_NODE_ATTRIBUTE_NODES) + ->children(); + foreach ($attributeNodes as $node) { + $attributes = Mage::getConfig()->getNode((string)$node)->asArray(); + $attributes = array_keys($attributes); + $this->_systemAttributes = array_unique(array_merge($attributes, $this->_systemAttributes)); + } + + $bind = array( + 'backend_type' => Mage_Eav_Model_Entity_Attribute_Abstract::TYPE_STATIC, + 'entity_type_id' => $this->getEntityTypeId() + ); + + $select = $adapter->select() + ->from(array('main_table' => $this->getTable('eav_attribute'))) + ->join( + array('additional_table' => $this->getTable('catalog_eav_attribute')), + 'additional_table.attribute_id = main_table.attribute_id' + ) + ->where('main_table.entity_type_id = :entity_type_id'); + $whereCondition = array( + 'main_table.backend_type = :backend_type', + $adapter->quoteInto('additional_table.is_used_for_promo_rules = ?', 1), + $adapter->quoteInto('additional_table.used_in_product_listing = ?', 1), + $adapter->quoteInto('additional_table.used_for_sort_by = ?', 1), + $adapter->quoteInto('main_table.attribute_code IN(?)', $this->_systemAttributes) + ); + if ($this->getFlatHelper()->isAddFilterableAttributes()) { + $whereCondition[] = $adapter->quoteInto('additional_table.is_filterable > ?', 0); + } + + $select->where(implode(' OR ', $whereCondition)); + $attributesData = $adapter->fetchAll($select, $bind); + Mage::getSingleton('Mage_Eav_Model_Config') + ->importAttributesData($this->getEntityType(), $attributesData); + + foreach ($attributesData as $data) { + $this->_attributeCodes[$data['attribute_id']] = $data['attribute_code']; + } + unset($attributesData); + } + + return $this->_attributeCodes; + } + + /** + * Retrieve entity type + * + * @return string + */ + public function getEntityType() + { + return Mage_Catalog_Model_Product::ENTITY; + } + + /** + * Retrieve Catalog Entity Type Id + * + * @return int + */ + public function getEntityTypeId() + { + if ($this->_entityTypeId === null) { + $this->_entityTypeId = Mage::getResourceModel('Mage_Catalog_Model_Resource_Config') + ->getEntityTypeId(); + } + return $this->_entityTypeId; + } + + /** + * Retrieve attribute objects for flat + * + * @return array + */ + public function getAttributes() + { + if ($this->_attributes === null) { + $this->_attributes = array(); + $attributeCodes = $this->getAttributeCodes(); + $entity = Mage::getSingleton('Mage_Eav_Model_Config') + ->getEntityType($this->getEntityType()) + ->getEntity(); + + foreach ($attributeCodes as $attributeCode) { + $attribute = Mage::getSingleton('Mage_Eav_Model_Config') + ->getAttribute($this->getEntityType(), $attributeCode) + ->setEntity($entity); + try { + // check if exists source and backend model. + // To prevent exception when some module was disabled + $attribute->usesSource() && $attribute->getSource(); + $attribute->getBackend(); + $this->_attributes[$attributeCode] = $attribute; + } catch (Exception $e) { + Mage::logException($e); + } + } + } + + return $this->_attributes; + } + + /** + * Retrieve loaded attribute by code + * + * @param string $attributeCode + * @throws Mage_Core_Exception + * @return Mage_Eav_Model_Entity_Attribute + */ + public function getAttribute($attributeCode) + { + $attributes = $this->getAttributes(); + if (!isset($attributes[$attributeCode])) { + $attribute = Mage::getModel('Mage_Catalog_Model_Resource_Eav_Attribute') + ->loadByCode($this->getEntityTypeId(), $attributeCode); + if (!$attribute->getId()) { + Mage::throwException(Mage::helper('Mage_Catalog_Helper_Data')->__('Invalid attribute %s', $attributeCode)); + } + $entity = Mage::getSingleton('Mage_Eav_Model_Config') + ->getEntityType($this->getEntityType()) + ->getEntity(); + $attribute->setEntity($entity); + + return $attribute; + } + + return $attributes[$attributeCode]; + } + + /** + * Retrieve Catalog Product Flat Table name + * + * @param int $storeId + * @return string + */ + public function getFlatTableName($storeId) + { + return sprintf('%s_%s', $this->getTable('catalog_product_flat'), $storeId); + } + + /** + * Retrieve catalog product flat columns array in old format (used before MMDB support) + * + * @return array + */ + protected function _getFlatColumnsOldDefinition() + { + $columns = array(); + $columns['entity_id'] = array( + 'type' => 'int(10)', + 'unsigned' => true, + 'is_null' => false, + 'default' => null, + 'extra' => null + ); + if ($this->getFlatHelper()->isAddChildData()) { + $columns['child_id'] = array( + 'type' => 'int(10)', + 'unsigned' => true, + 'is_null' => true, + 'default' => null, + 'extra' => null + ); + $columns['is_child'] = array( + 'type' => 'tinyint(1)', + 'unsigned' => true, + 'is_null' => false, + 'default' => 0, + 'extra' => null + ); + } + $columns['attribute_set_id'] = array( + 'type' => 'smallint(5)', + 'unsigned' => true, + 'is_null' => false, + 'default' => 0, + 'extra' => null + ); + $columns['type_id'] = array( + 'type' => 'varchar(32)', + 'unsigned' => false, + 'is_null' => false, + 'default' => Mage_Catalog_Model_Product_Type::TYPE_SIMPLE, + 'extra' => null + ); + + return $columns; + } + + /** + * Retrieve catalog product flat columns array in DDL format + * + * @return array + */ + protected function _getFlatColumnsDdlDefinition() + { + $columns = array(); + $columns['entity_id'] = array( + 'type' => Varien_Db_Ddl_Table::TYPE_INTEGER, + 'length' => null, + 'unsigned' => true, + 'nullable' => false, + 'default' => false, + 'primary' => true, + 'comment' => 'Entity Id' + ); + if ($this->getFlatHelper()->isAddChildData()) { + $columns['child_id'] = array( + 'type' => Varien_Db_Ddl_Table::TYPE_INTEGER, + 'length' => null, + 'unsigned' => true, + 'nullable' => true, + 'default' => null, + 'primary' => true, + 'comment' => 'Child Id' + ); + $columns['is_child'] = array( + 'type' => Varien_Db_Ddl_Table::TYPE_SMALLINT, + 'length' => 1, + 'unsigned' => true, + 'nullable' => false, + 'default' => '0', + 'comment' => 'Checks If Entity Is Child' + ); + } + $columns['attribute_set_id'] = array( + 'type' => Varien_Db_Ddl_Table::TYPE_SMALLINT, + 'length' => 5, + 'unsigned' => true, + 'nullable' => false, + 'default' => '0', + 'comment' => 'Attribute Set Id' + ); + $columns['type_id'] = array( + 'type' => Varien_Db_Ddl_Table::TYPE_TEXT, + 'length' => 32, + 'unsigned' => false, + 'nullable' => false, + 'default' => Mage_Catalog_Model_Product_Type::TYPE_SIMPLE, + 'comment' => 'Type Id' + ); + + return $columns; + } + + /** + * Retrieve catalog product flat table columns array + * + * @return array + */ + public function getFlatColumns() + { + if ($this->_columns === null) { + if (Mage::helper('Mage_Core_Helper_Data')->useDbCompatibleMode()) { + $this->_columns = $this->_getFlatColumnsOldDefinition(); + } else { + $this->_columns = $this->_getFlatColumnsDdlDefinition(); + } + + foreach ($this->getAttributes() as $attribute) { + /** @var $attribute Mage_Eav_Model_Entity_Attribute_Abstract */ + $columns = $attribute + ->setFlatAddFilterableAttributes($this->getFlatHelper()->isAddFilterableAttributes()) + ->setFlatAddChildData($this->getFlatHelper()->isAddChildData()) + ->getFlatColumns(); + if ($columns !== null) { + $this->_columns = array_merge($this->_columns, $columns); + } + } + + $columnsObject = new Varien_Object(); + $columnsObject->setColumns($this->_columns); + Mage::dispatchEvent('catalog_product_flat_prepare_columns', + array('columns' => $columnsObject) + ); + $this->_columns = $columnsObject->getColumns(); + } + + return $this->_columns; + } + + /** + * Retrieve catalog product flat table indexes array + * + * @return array + */ + public function getFlatIndexes() + { + if ($this->_indexes === null) { + $this->_indexes = array(); + + if ($this->getFlatHelper()->isAddChildData()) { + $this->_indexes['PRIMARY'] = array( + 'type' => Varien_Db_Adapter_Interface::INDEX_TYPE_PRIMARY, + 'fields' => array('entity_id', 'child_id') + ); + $this->_indexes['IDX_CHILD'] = array( + 'type' => Varien_Db_Adapter_Interface::INDEX_TYPE_INDEX, + 'fields' => array('child_id') + ); + $this->_indexes['IDX_IS_CHILD'] = array( + 'type' => Varien_Db_Adapter_Interface::INDEX_TYPE_INDEX, + 'fields' => array('entity_id', 'is_child') + ); + } else { + $this->_indexes['PRIMARY'] = array( + 'type' => Varien_Db_Adapter_Interface::INDEX_TYPE_PRIMARY, + 'fields' => array('entity_id') + ); + } + $this->_indexes['IDX_TYPE_ID'] = array( + 'type' => Varien_Db_Adapter_Interface::INDEX_TYPE_INDEX, + 'fields' => array('type_id') + ); + $this->_indexes['IDX_ATTRIBUTE_SET'] = array( + 'type' => Varien_Db_Adapter_Interface::INDEX_TYPE_INDEX, + 'fields' => array('attribute_set_id') + ); + + foreach ($this->getAttributes() as $attribute) { + /** @var $attribute Mage_Eav_Model_Entity_Attribute */ + $indexes = $attribute + ->setFlatAddFilterableAttributes($this->getFlatHelper()->isAddFilterableAttributes()) + ->setFlatAddChildData($this->getFlatHelper()->isAddChildData()) + ->getFlatIndexes(); + if ($indexes !== null) { + $this->_indexes = array_merge($this->_indexes, $indexes); + } + } + + $indexesObject = new Varien_Object(); + $indexesObject->setIndexes($this->_indexes); + Mage::dispatchEvent('catalog_product_flat_prepare_indexes', array( + 'indexes' => $indexesObject + )); + $this->_indexes = $indexesObject->getIndexes(); + } + + return $this->_indexes; + } + + /** + * Compare Flat style with Describe style columns + * If column a different - return false + * + * @param array $column + * @param array $describe + * @return bool + */ + protected function _compareColumnProperties($column, $describe) + { + return Mage::getResourceHelper('Mage_Catalog')->compareIndexColumnProperties($column, $describe); + } + + /** + * Retrieve UNIQUE HASH for a Table foreign key + * + * @param string $priTableName the target table name + * @param string $priColumnName the target table column name + * @param string $refTableName the reference table name + * @param string $refColumnName the reference table column name + * @return string + */ + public function getFkName($priTableName, $priColumnName, $refTableName, $refColumnName) + { + return Mage::getSingleton('Mage_Core_Model_Resource') + ->getFkName($priTableName, $priColumnName, $refTableName, $refColumnName); + } + + /** + * Prepare flat table for store + * + * @param int $storeId + * @throws Mage_Core_Exception + * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer + */ + public function prepareFlatTable($storeId) + { + if (isset($this->_preparedFlatTables[$storeId])) { + return $this; + } + $adapter = $this->_getWriteAdapter(); + $tableName = $this->getFlatTableName($storeId); + + // Extract columns we need to have in flat table + $columns = $this->getFlatColumns(); + if (Mage::helper('Mage_Core_Helper_Data')->useDbCompatibleMode()) { + /* Convert old format of flat columns to new MMDB format that uses DDL types and definitions */ + foreach ($columns as $key => $column) { + $columns[$key] = Mage::getResourceHelper('Mage_Core')->convertOldColumnDefinition($column); + } + } + + // Extract indexes we need to have in flat table + $indexesNeed = $this->getFlatIndexes(); + + $maxIndex = Mage::getConfig()->getNode(self::XML_NODE_MAX_INDEX_COUNT); + if (count($indexesNeed) > $maxIndex) { + Mage::throwException(Mage::helper('Mage_Catalog_Helper_Data')->__("The Flat Catalog module has a limit of %2\$d filterable and/or sortable attributes. Currently there are %1\$d of them. Please reduce the number of filterable/sortable attributes in order to use this module", count($indexesNeed), $maxIndex)); + } + + // Process indexes to create names for them in MMDB-style and reformat to common index definition + $indexKeys = array(); + $indexProps = array_values($indexesNeed); + $upperPrimaryKey = strtoupper(Varien_Db_Adapter_Interface::INDEX_TYPE_PRIMARY); + foreach ($indexProps as $i => $indexProp) { + $indexName = $adapter->getIndexName($tableName, $indexProp['fields'], $indexProp['type']); + $indexProp['type'] = strtoupper($indexProp['type']); + if ($indexProp['type'] == $upperPrimaryKey) { + $indexKey = $upperPrimaryKey; + } else { + $indexKey = $indexName; + } + + $indexProps[$i] = array( + 'KEY_NAME' => $indexName, + 'COLUMNS_LIST' => $indexProp['fields'], + 'INDEX_TYPE' => strtolower($indexProp['type']) + ); + $indexKeys[$i] = $indexKey; + } + $indexesNeed = array_combine($indexKeys, $indexProps); // Array with index names as keys, except for primary + + // Foreign keys + $foreignEntityKey = $this->getFkName($tableName, 'entity_id', 'catalog_product_entity', 'entity_id'); + $foreignChildKey = $this->getFkName($tableName, 'child_id', 'catalog_product_entity', 'entity_id'); + + // Create table or modify existing one + if (!$this->_isFlatTableExists($storeId)) { + /** @var $table Varien_Db_Ddl_Table */ + $table = $adapter->newTable($tableName); + foreach ($columns as $fieldName => $fieldProp) { + $table->addColumn( + $fieldName, + $fieldProp['type'], + isset($fieldProp['length']) ? $fieldProp['length'] : null, + array( + 'nullable' => isset($fieldProp['nullable']) ? (bool)$fieldProp['nullable'] : false, + 'unsigned' => isset($fieldProp['unsigned']) ? (bool)$fieldProp['unsigned'] : false, + 'default' => isset($fieldProp['default']) ? $fieldProp['default'] : false, + 'primary' => false, + ), + isset($fieldProp['comment']) ? $fieldProp['comment'] : $fieldName + ); + } + + foreach ($indexesNeed as $indexProp) { + $table->addIndex($indexProp['KEY_NAME'], $indexProp['COLUMNS_LIST'], + array('type' => $indexProp['INDEX_TYPE'])); + } + + $table->addForeignKey($foreignEntityKey, + 'entity_id', $this->getTable('catalog_product_entity'), 'entity_id', + Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE); + + if ($this->getFlatHelper()->isAddChildData()) { + $table->addForeignKey($foreignChildKey, + 'child_id', $this->getTable('catalog_product_entity'), 'entity_id', + Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE); + } + $table->setComment("Catalog Product Flat (Store {$storeId})"); + + $adapter->createTable($table); + + $this->_existsFlatTables[$storeId] = true; + } else { + $adapter->resetDdlCache($tableName); + + // Sort columns into added/altered/dropped lists + $describe = $adapter->describeTable($tableName); + $addColumns = array_diff_key($columns, $describe); + $dropColumns = array_diff_key($describe, $columns); + $modifyColumns = array(); + foreach ($columns as $field => $fieldProp) { + if (isset($describe[$field]) && !$this->_compareColumnProperties($fieldProp, $describe[$field])) { + $modifyColumns[$field] = $fieldProp; + } + } + + // Sort indexes into added/dropped lists. Altered indexes are put into both lists. + $addIndexes = array(); + $dropIndexes = array(); + $indexesNow = $adapter->getIndexList($tableName); // Note: primary is always stored under 'PRIMARY' key + $newIndexes = $indexesNeed; + foreach ($indexesNow as $key => $indexNow) { + if (isset($indexesNeed[$key])) { + $indexNeed = $indexesNeed[$key]; + if (($indexNeed['INDEX_TYPE'] != $indexNow['INDEX_TYPE']) + || ($indexNeed['COLUMNS_LIST'] != $indexNow['COLUMNS_LIST'])) { + $dropIndexes[$key] = $indexNow; + $addIndexes[$key] = $indexNeed; + } + unset($newIndexes[$key]); + } else { + $dropIndexes[$key] = $indexNow; + } + } + $addIndexes = $addIndexes + $newIndexes; + + // Compose contstraints + $addConstraints = array(); + $addConstraints[$foreignEntityKey] = array( + 'table_index' => 'entity_id', + 'ref_table' => $this->getTable('catalog_product_entity'), + 'ref_index' => 'entity_id', + 'on_update' => Varien_Db_Ddl_Table::ACTION_CASCADE, + 'on_delete' => Varien_Db_Ddl_Table::ACTION_CASCADE + ); + + // Additional data from childs + $isAddChildData = $this->getFlatHelper()->isAddChildData(); + if (!$isAddChildData && isset($describe['is_child'])) { + $adapter->delete($tableName, array('is_child = ?' => 1)); + $adapter->dropForeignKey($tableName, $foreignChildKey); + } + if ($isAddChildData && !isset($describe['is_child'])) { + $adapter->delete($tableName); + $dropIndexes['PRIMARY'] = $indexesNow['PRIMARY']; + $addIndexes['PRIMARY'] = $indexesNeed['PRIMARY']; + + $addConstraints[$foreignChildKey] = array( + 'table_index' => 'child_id', + 'ref_table' => $this->getTable('catalog_product_entity'), + 'ref_index' => 'entity_id', + 'on_update' => Varien_Db_Ddl_Table::ACTION_CASCADE, + 'on_delete' => Varien_Db_Ddl_Table::ACTION_CASCADE + ); + } + + // Drop constraints + foreach (array_keys($adapter->getForeignKeys($tableName)) as $constraintName) { + $adapter->dropForeignKey($tableName, $constraintName); + } + + // Drop indexes + foreach ($dropIndexes as $indexProp) { + $adapter->dropIndex($tableName, $indexProp['KEY_NAME']); + } + + // Drop columns + foreach (array_keys($dropColumns) as $columnName) { + $adapter->dropColumn($tableName, $columnName); + } + + // Modify columns + foreach ($modifyColumns as $columnName => $columnProp) { + $columnProp = array_change_key_case($columnProp, CASE_UPPER); + if (!isset($columnProp['COMMENT'])) { + $columnProp['COMMENT'] = ucwords(str_replace('_', ' ', $columnName)); + } + $adapter->changeColumn($tableName, $columnName, $columnName, $columnProp); + } + + // Add columns + foreach ($addColumns as $columnName => $columnProp) { + $columnProp = array_change_key_case($columnProp, CASE_UPPER); + if (!isset($columnProp['COMMENT'])) { + $columnProp['COMMENT'] = ucwords(str_replace('_', ' ', $columnName)); + } + $adapter->addColumn($tableName, $columnName, $columnProp); + } + + // Add indexes + foreach ($addIndexes as $indexProp) { + $adapter->addIndex($tableName, $indexProp['KEY_NAME'], $indexProp['COLUMNS_LIST'], + $indexProp['INDEX_TYPE']); + } + + // Add constraints + foreach ($addConstraints as $constraintName => $constraintProp) { + $adapter->addForeignKey($constraintName, $tableName, + $constraintProp['table_index'], + $constraintProp['ref_table'], + $constraintProp['ref_index'], + $constraintProp['on_delete'], + $constraintProp['on_update'] + ); + } + } + + $this->_preparedFlatTables[$storeId] = true; + + return $this; + } + + /** + * Add or Update static attributes + * + * @param int $storeId + * @param int|array $productIds update only product(s) + * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer + */ + public function updateStaticAttributes($storeId, $productIds = null) + { + if (!$this->_isFlatTableExists($storeId)) { + return $this; + } + $adapter = $this->_getWriteAdapter(); + $websiteId = (int)Mage::app()->getStore($storeId)->getWebsite()->getId(); + /* @var $status Mage_Eav_Model_Entity_Attribute */ + $status = $this->getAttribute('status'); + + $fieldList = array('entity_id', 'type_id', 'attribute_set_id'); + $colsList = array('entity_id', 'type_id', 'attribute_set_id'); + if ($this->getFlatHelper()->isAddChildData()) { + $fieldList = array_merge($fieldList, array('child_id', 'is_child')); + $isChild = new Zend_Db_Expr('0'); + $colsList = array_merge($colsList, array('entity_id', $isChild)); + } + + $columns = $this->getFlatColumns(); + $bind = array( + 'website_id' => $websiteId, + 'store_id' => $storeId, + 'entity_type_id' => (int)$status->getEntityTypeId(), + 'attribute_id' => (int)$status->getId() + ); + + $fieldExpr = $adapter->getCheckSql('t2.value_id > 0', 't2.value', 't1.value'); + $select = $this->_getWriteAdapter()->select() + ->from(array('e' => $this->getTable('catalog_product_entity')), $colsList) + ->join( + array('wp' => $this->getTable('catalog_product_website')), + 'e.entity_id = wp.product_id AND wp.website_id = :website_id', + array()) + ->joinLeft( + array('t1' => $status->getBackend()->getTable()), + 'e.entity_id = t1.entity_id', + array()) + ->joinLeft( + array('t2' => $status->getBackend()->getTable()), + 't2.entity_id = t1.entity_id' + . ' AND t1.entity_type_id = t2.entity_type_id' + . ' AND t1.attribute_id = t2.attribute_id' + . ' AND t2.store_id = :store_id', + array()) + ->where('t1.entity_type_id = :entity_type_id') + ->where('t1.attribute_id = :attribute_id') + ->where('t1.store_id = ?', Mage_Core_Model_App::ADMIN_STORE_ID) + ->where("{$fieldExpr} = ?", Mage_Catalog_Model_Product_Status::STATUS_ENABLED); + foreach ($this->getAttributes() as $attributeCode => $attribute) { + /** @var $attribute Mage_Eav_Model_Entity_Attribute */ + if ($attribute->getBackend()->getType() == 'static') { + if (!isset($columns[$attributeCode])) { + continue; + } + $fieldList[] = $attributeCode; + $select->columns($attributeCode, 'e'); + } + } + + if ($productIds !== null) { + $select->where('e.entity_id IN(?)', $productIds); + } + + $sql = $select->insertFromSelect($this->getFlatTableName($storeId), $fieldList); + $adapter->query($sql, $bind); + + return $this; + } + + /** + * Remove non website products + * + * @param int $storeId + * @param int|array $productIds + * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer + */ + public function cleanNonWebsiteProducts($storeId, $productIds = null) + { + if (!$this->_isFlatTableExists($storeId)) { + return $this; + } + + $websiteId = (int)Mage::app()->getStore($storeId)->getWebsite()->getId(); + $adapter = $this->_getWriteAdapter(); + + $joinCondition = array( + 'e.entity_id = wp.product_id', + 'wp.website_id = :website_id' + ); + if ($this->getFlatHelper()->isAddChildData()) { + $joinCondition[] = 'e.child_id = wp.product_id'; + } + $bind = array('website_id' => $websiteId); + $select = $adapter->select() + ->from(array('e' => $this->getFlatTableName($storeId)), null) + ->joinLeft( + array('wp' => $this->getTable('catalog_product_website')), + implode(' AND ', $joinCondition), + array()); + if ($productIds !== null) { + $condition = array( + $adapter->quoteInto('e.entity_id IN(?)', $productIds) + ); + if ($this->getFlatHelper()->isAddChildData()) { + $condition[] = $adapter->quoteInto('e.child_id IN(?)', $productIds); + } + $select->where(implode(' OR ', $condition)); + } + + $sql = $select->deleteFromSelect('e'); + $adapter->query($sql, $bind); + + return $this; + } + + /** + * Update attribute flat data + * + * @param Mage_Eav_Model_Entity_Attribute $attribute + * @param int $storeId + * @param int|array $productIds update only product(s) + * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer + */ + public function updateAttribute($attribute, $storeId, $productIds = null) + { + if (!$this->_isFlatTableExists($storeId)) { + return $this; + } + $adapter = $this->_getWriteAdapter(); + $flatTableName = $this->getFlatTableName($storeId); + $describe = $adapter->describeTable($flatTableName); + + if ($attribute->getBackend()->getType() == 'static') { + if (!isset($describe[$attribute->getAttributeCode()])) { + return $this; + } + + $select = $adapter->select() + ->join( + array('main_table' => $this->getTable('catalog_product_entity')), + 'main_table.entity_id = e.entity_id', + array($attribute->getAttributeCode() => 'main_table.' . $attribute->getAttributeCode()) + ); + if ($this->getFlatHelper()->isAddChildData()) { + $select->where('e.is_child = ?', 0); + } + if ($productIds !== null) { + $select->where('main_table.entity_id IN(?)', $productIds); + } + + $sql = $select->crossUpdateFromSelect(array('e' => $flatTableName)); + $adapter->query($sql); + } else { + $columns = $attribute->getFlatColumns(); + if (!$columns) { + return $this; + } + foreach (array_keys($columns) as $columnName) { + if (!isset($describe[$columnName])) { + return $this; + } + } + + $select = $attribute->getFlatUpdateSelect($storeId); + if ($select instanceof Varien_Db_Select) { + if ($productIds !== null) { + $select->where('e.entity_id IN(?)', $productIds); + } + + $sql = $select->crossUpdateFromSelect(array('e' => $flatTableName)); + $adapter->query($sql); + } + } + + return $this; + } + + /** + * Update non static EAV attributes flat data + * + * @param int $storeId + * @param int|array $productIds update only product(s) + * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer + */ + public function updateEavAttributes($storeId, $productIds = null) + { + if (!$this->_isFlatTableExists($storeId)) { + return $this; + } + + foreach ($this->getAttributes() as $attribute) { + /* @var $attribute Mage_Eav_Model_Entity_Attribute */ + if ($attribute->getBackend()->getType() != 'static') { + $this->updateAttribute($attribute, $storeId, $productIds); + } + } + return $this; + } + + /** + * Update events observer attributes + * + * @param int $storeId + */ + public function updateEventAttributes($storeId = null) + { + Mage::dispatchEvent('catalog_product_flat_rebuild', array( + 'store_id' => $storeId, + 'table' => $this->getFlatTableName($storeId) + )); + } + + /** + * Retrieve Product Type Instances + * as key - type code, value - instance model + * + * @return array + */ + public function getProductTypeInstances() + { + if ($this->_productTypes === null) { + $this->_productTypes = array(); + $productEmulator = new Varien_Object(); + + foreach (array_keys(Mage_Catalog_Model_Product_Type::getTypes()) as $typeId) { + $productEmulator->setTypeId($typeId); + $this->_productTypes[$typeId] = Mage::getSingleton('Mage_Catalog_Model_Product_Type') + ->factory($productEmulator); + } + } + return $this->_productTypes; + } + + /** + * Update relation products + * + * @param int $storeId + * @param int|array $productIds Update child product(s) only + * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer + */ + public function updateRelationProducts($storeId, $productIds = null) + { + if (!$this->getFlatHelper()->isAddChildData() || !$this->_isFlatTableExists($storeId)) { + return $this; + } + + $adapter = $this->_getWriteAdapter(); + + foreach ($this->getProductTypeInstances() as $typeInstance) { + if (!$typeInstance->isComposite()) { + continue; + } + $relation = $typeInstance->getRelationInfo(); + if ($relation + && $relation->getTable() + && $relation->getParentFieldName() + && $relation->getChildFieldName() + ) { + $columns = $this->getFlatColumns(); + $fieldList = array_keys($columns); + unset($columns['entity_id']); + unset($columns['child_id']); + unset($columns['is_child']); + + $select = $adapter->select() + ->from( + array('t' => $this->getTable($relation->getTable())), + array($relation->getParentFieldName(), $relation->getChildFieldName(), new Zend_Db_Expr('1'))) + ->join( + array('e' => $this->getFlatTableName($storeId)), + "e.entity_id = t.{$relation->getChildFieldName()}", + array_keys($columns) + ); + if ($relation->getWhere() !== null) { + $select->where($relation->getWhere()); + } + if ($productIds !== null) { + $cond = array( + $adapter->quoteInto("{$relation->getChildFieldName()} IN(?)", $productIds), + $adapter->quoteInto("{$relation->getParentFieldName()} IN(?)", $productIds) + ); + + $select->where(implode(' OR ', $cond)); + } + $sql = $select->insertFromSelect($this->getFlatTableName($storeId), $fieldList); + $adapter->query($sql); + } + } + + return $this; + } + + /** + * Update children data from parent + * + * @param int $storeId + * @param int|array $productIds + * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer + */ + public function updateChildrenDataFromParent($storeId, $productIds = null) + { + if (!$this->getFlatHelper()->isAddChildData() || !$this->_isFlatTableExists($storeId)) { + return $this; + } + $adapter = $this->_getWriteAdapter(); + + $select = $adapter->select(); + foreach (array_keys($this->getFlatColumns()) as $columnName) { + if ($columnName == 'entity_id' || $columnName == 'child_id' || $columnName == 'is_child') { + continue; + } + $select->columns(array($columnName => new Zend_Db_Expr('t1.' . $columnName))); + } + $select + ->joinLeft( + array('t1' => $this->getFlatTableName($storeId)), + $adapter->quoteInto('t2.child_id = t1.entity_id AND t1.is_child = ?', 0), + array()) + ->where('t2.is_child = ?', 1); + + if ($productIds !== null) { + $select->where('t2.child_id IN(?)', $productIds); + } + + $sql = $select->crossUpdateFromSelect(array('t2' => $this->getFlatTableName($storeId))); + $adapter->query($sql); + + return $this; + } + + /** + * Clean unused relation products + * + * @param int $storeId + * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer + */ + public function cleanRelationProducts($storeId) + { + if (!$this->getFlatHelper()->isAddChildData()) { + return $this; + } + + foreach ($this->getProductTypeInstances() as $typeInstance) { + if (!$typeInstance->isComposite()) { + continue; + } + $adapter = $this->_getWriteAdapter(); + $relation = $typeInstance->getRelationInfo(); + if ($relation + && $relation->getTable() + && $relation->getParentFieldName() + && $relation->getChildFieldName() + ) { + $select = $this->_getWriteAdapter()->select() + ->distinct(true) + ->from( + $this->getTable($relation->getTable()), + "{$relation->getParentFieldName()}" + ); + $joinLeftCond = array( + "e.entity_id = t.{$relation->getParentFieldName()}", + "e.child_id = t.{$relation->getChildFieldName()}" + ); + if ($relation->getWhere() !== null) { + $select->where($relation->getWhere()); + $joinLeftCond[] = $relation->getWhere(); + } + + $entitySelect = new Zend_Db_Expr($select->__toString()); + + $select = $adapter->select() + ->from(array('e' => $this->getFlatTableName($storeId)), null) + ->joinLeft( + array('t' => $this->getTable($relation->getTable())), + implode(' AND ', $joinLeftCond), + array()) + ->where('e.is_child = ?', 1) + ->where('e.entity_id IN(?)', $entitySelect) + ->where("t.{$relation->getChildFieldName()} IS NULL"); + + $sql = $select->deleteFromSelect('e'); + $adapter->query($sql); + } + } + + return $this; + } + + /** + * Remove product data from flat + * + * @param int|array $productIds + * @param int $storeId + * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer + */ + public function removeProduct($productIds, $storeId) + { + if (!$this->_isFlatTableExists($storeId)) { + return $this; + } + $adapter = $this->_getWriteAdapter(); + $cond = array( + $adapter->quoteInto('entity_id IN(?)', $productIds) + ); + if ($this->getFlatHelper()->isAddChildData()) { + $cond[] = $adapter->quoteInto('child_id IN(?)', $productIds); + } + $cond = implode(' OR ', $cond); + $adapter->delete($this->getFlatTableName($storeId), $cond); + + return $this; + } + + /** + * Remove children from parent product + * + * @param int|array $productIds + * @param int $storeId + * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer + */ + public function removeProductChildren($productIds, $storeId) + { + if (!$this->getFlatHelper()->isAddChildData()) { + return $this; + } + $whereExpr = array( + 'entity_id IN(?)' => $productIds, + 'is_child = ?' => 1 + ); + $this->_getWriteAdapter()->delete($this->getFlatTableName($storeId), $whereExpr); + + return $this; + } + + /** + * Update flat data for product + * + * @param int|array $productIds + * @param int $storeId + * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer + */ + public function updateProduct($productIds, $storeId) + { + if (!$this->_isFlatTableExists($storeId)) { + return $this; + } + + $this->saveProduct($productIds, $storeId); + + Mage::dispatchEvent('catalog_product_flat_update_product', array( + 'store_id' => $storeId, + 'table' => $this->getFlatTableName($storeId), + 'product_ids' => $productIds + )); + + return $this; + } + + /** + * Save product(s) data for store + * + * @param int|array $productIds + * @param int $storeId + * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer + */ + public function saveProduct($productIds, $storeId) + { + if (!$this->_isFlatTableExists($storeId)) { + return $this; + } + + $this->updateStaticAttributes($storeId, $productIds); + $this->updateEavAttributes($storeId, $productIds); + + return $this; + } + + /** + * Delete flat table process + * + * @param int $storeId + * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer + */ + public function deleteFlatTable($storeId) + { + if ($this->_isFlatTableExists($storeId)) { + $this->_getWriteAdapter()->dropTable($this->getFlatTableName($storeId)); + } + + return $this; + } + + /** + * Check is flat table for store exists + * + * @param int $storeId + * @return bool + */ + protected function _isFlatTableExists($storeId) + { + if (!isset($this->_existsFlatTables[$storeId])) { + $tableName = $this->getFlatTableName($storeId); + $isTableExists = $this->_getWriteAdapter()->isTableExists($tableName); + + $this->_existsFlatTables[$storeId] = $isTableExists ? true : false; + } + + return $this->_existsFlatTables[$storeId]; + } + + /** + * Retrieve previous key from array by key + * + * @param array $array + * @param mixed $key + * @return mixed + */ + protected function _arrayPrevKey(array $array, $key) + { + $prev = false; + foreach (array_keys($array) as $k) { + if ($k == $key) { + return $prev; + } + $prev = $k; + } + return false; + } + + /** + * Retrieve next key from array by key + * + * @param array $array + * @param mixed $key + * @return mixed + */ + protected function _arrayNextKey(array $array, $key) + { + $next = false; + foreach (array_keys($array) as $k) { + if ($next === true) { + return $k; + } + if ($k == $key) { + $next = true; + } + } + return false; + } + + /** + * Transactional rebuild Catalog Product Flat Data + * + * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer + */ + public function reindexAll() + { foreach (Mage::app()->getStores() as $storeId => $store) { - $this->prepareFlatTable($storeId); - } - return $this; - } - - /** - * Transactional rebuild Catalog Product Flat Data - * - * @return Mage_Catalog_Model_Resource_Product_Flat_Indexer - */ - public function reindexAll() - { - $this->prepareFlatTables(); - $this->beginTransaction(); - try { - $this->rebuild(); - $this->commit(); - } catch (Exception $e) { - $this->rollBack(); - throw $e; - } - return $this; - } -} + $this->prepareFlatTable($storeId); + $this->beginTransaction(); + try { + $this->rebuild($store); + $this->commit(); + } catch (Exception $e) { + $this->rollBack(); + throw $e; + } + } + $flag = $this->getFlatHelper()->getFlag(); + $flag->setIsBuild(true)->save(); + + return $this; + } +} \ No newline at end of file diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Abstract.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Abstract.php index 2cd11ec583d01..b1742c68d6484 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Abstract.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav.php index 58225ad20cf04..9b5362f6a1266 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Abstract.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Abstract.php index b78d1a72fb3c2..8046cf03a9c6e 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Abstract.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Decimal.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Decimal.php index d8eeadc217d88..5e220a5fb4358 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Decimal.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Decimal.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Source.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Source.php index 1349247c98cef..26049c32eb926 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Source.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Eav/Source.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -121,6 +121,10 @@ protected function _prepareSelectIndex($entityIds = null, $attributeId = null) ) ->where('s.store_id != 0'); + if (!is_null($entityIds)) { + $subSelect->where('d.entity_id IN(?)', $entityIds); + } + /**@var $select Varien_Db_Select*/ $select = $adapter->select() ->from( @@ -144,10 +148,6 @@ protected function _prepareSelectIndex($entityIds = null, $attributeId = null) $select->where(Mage::getResourceHelper('Mage_Catalog')->getIsNullNotNullCondition('pis.value', 'pid.value')); - if (!is_null($entityIds)) { - $select->where('pid.entity_id IN(?)', $entityIds); - } - /** * Add additional external limitation */ @@ -290,4 +290,4 @@ public function getIdxTable($table = null) } return $this->getTable('catalog_product_index_eav_tmp'); } -} \ No newline at end of file +} diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php index 80c34ad892906..e2949d2d0638c 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -169,6 +169,7 @@ public function catalogProductSave(Mage_Index_Model_Event $event) if ($indexer->getIsComposite()) { $this->_copyRelationIndexData($productId); $this->_prepareTierPriceIndex($productId); + $this->_prepareGroupPriceIndex($productId); $indexer->reindexEntity($productId); } else { $parentIds = $this->getProductParentsByChild($productId); @@ -177,6 +178,7 @@ public function catalogProductSave(Mage_Index_Model_Event $event) $processIds = array_merge($processIds, array_keys($parentIds)); $this->_copyRelationIndexData(array_keys($parentIds), $productId); $this->_prepareTierPriceIndex($processIds); + $this->_prepareGroupPriceIndex($processIds); $indexer->reindexEntity($productId); $parentByType = array(); @@ -189,6 +191,7 @@ public function catalogProductSave(Mage_Index_Model_Event $event) } } else { $this->_prepareTierPriceIndex($productId); + $this->_prepareGroupPriceIndex($productId); $indexer->reindexEntity($productId); } } @@ -371,6 +374,7 @@ public function reindexAll() $this->clearTemporaryIndexTable(); $this->_prepareWebsiteDateTable(); $this->_prepareTierPriceIndex(); + $this->_prepareGroupPriceIndex(); $indexers = $this->getTypeIndexers(); foreach ($indexers as $indexer) { @@ -397,6 +401,16 @@ protected function _getTierPriceIndexTable() return $this->getTable('catalog_product_index_tier_price'); } + /** + * Retrieve table name for product group price index + * + * @return string + */ + protected function _getGroupPriceIndexTable() + { + return $this->getTable('catalog_product_index_group_price'); + } + /** * Prepare tier price index table * @@ -440,6 +454,49 @@ protected function _prepareTierPriceIndex($entityIds = null) return $this; } + /** + * Prepare group price index table + * + * @param int|array $entityIds the entity ids limitation + * @return Mage_Catalog_Model_Resource_Product_Indexer_Price + */ + protected function _prepareGroupPriceIndex($entityIds = null) + { + $write = $this->_getWriteAdapter(); + $table = $this->_getGroupPriceIndexTable(); + $write->delete($table); + + $websiteExpression = $write->getCheckSql('gp.website_id = 0', 'ROUND(gp.value * cwd.rate, 4)', 'gp.value'); + $select = $write->select() + ->from( + array('gp' => $this->getTable('catalog_product_entity_group_price')), + array('entity_id')) + ->join( + array('cg' => $this->getTable('customer_group')), + 'gp.all_groups = 1 OR (gp.all_groups = 0 AND gp.customer_group_id = cg.customer_group_id)', + array('customer_group_id')) + ->join( + array('cw' => $this->getTable('core_website')), + 'gp.website_id = 0 OR gp.website_id = cw.website_id', + array('website_id')) + ->join( + array('cwd' => $this->_getWebsiteDateTable()), + 'cw.website_id = cwd.website_id', + array()) + ->where('cw.website_id != 0') + ->columns(new Zend_Db_Expr("MIN({$websiteExpression})")) + ->group(array('gp.entity_id', 'cg.customer_group_id', 'cw.website_id')); + + if (!empty($entityIds)) { + $select->where('gp.entity_id IN(?)', $entityIds); + } + + $query = $select->insertFromSelect($table); + $write->query($query); + + return $this; + } + /** * Copy relations product index from primary index to temporary index table by parent entity * diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Configurable.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Configurable.php index ef9828635ded3..9e50d208d5e78 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Configurable.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Configurable.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -170,20 +170,26 @@ protected function _applyConfigurableOption() ->group(array('l.parent_id', 'i.customer_group_id', 'i.website_id', 'l.product_id')); $priceExpression = $write->getCheckSql('apw.value_id IS NOT NULL', 'apw.pricing_value', 'apd.pricing_value'); - $percenExpr = $write->getCheckSql('apw.value_id IS NOT NULL', 'apw.is_percent', 'apd.is_percent'); + $percentExpr = $write->getCheckSql('apw.value_id IS NOT NULL', 'apw.is_percent', 'apd.is_percent'); $roundExpr = "ROUND(i.price * ({$priceExpression} / 100), 4)"; - $roundPriceExpr = $write->getCheckSql("{$percenExpr} = 1", $roundExpr, $priceExpression); + $roundPriceExpr = $write->getCheckSql("{$percentExpr} = 1", $roundExpr, $priceExpression); $priceColumn = $write->getCheckSql("{$priceExpression} IS NULL", '0', $roundPriceExpr); $priceColumn = new Zend_Db_Expr("SUM({$priceColumn})"); $tierPrice = $priceExpression; - $tierRoundPriceExp = $write->getCheckSql("{$percenExpr} = 1", $roundExpr, $tierPrice); + $tierRoundPriceExp = $write->getCheckSql("{$percentExpr} = 1", $roundExpr, $tierPrice); $tierPriceExp = $write->getCheckSql("{$tierPrice} IS NULL", '0', $tierRoundPriceExp); $tierPriceColumn = $write->getCheckSql("MIN(i.tier_price) IS NOT NULL", "SUM({$tierPriceExp})", 'NULL'); + $groupPrice = $priceExpression; + $groupRoundPriceExp = $write->getCheckSql("{$percentExpr} = 1", $roundExpr, $groupPrice); + $groupPriceExp = $write->getCheckSql("{$groupPrice} IS NULL", '0', $groupRoundPriceExp); + $groupPriceColumn = $write->getCheckSql("MIN(i.group_price) IS NOT NULL", "SUM({$groupPriceExp})", 'NULL'); + $select->columns(array( - 'price' => $priceColumn, - 'tier_price' => $tierPriceColumn + 'price' => $priceColumn, + 'tier_price' => $tierPriceColumn, + 'group_price' => $groupPriceColumn, )); $query = $select->insertFromSelect($coaTable); @@ -192,7 +198,10 @@ protected function _applyConfigurableOption() $select = $write->select() ->from( array($coaTable), - array('parent_id', 'customer_group_id', 'website_id', 'MIN(price)', 'MAX(price)', 'MIN(tier_price)')) + array( + 'parent_id', 'customer_group_id', 'website_id', + 'MIN(price)', 'MAX(price)', 'MIN(tier_price)', 'MIN(group_price)' + )) ->group(array('parent_id', 'customer_group_id', 'website_id')); $query = $select->insertFromSelect($copTable); @@ -206,9 +215,13 @@ protected function _applyConfigurableOption() .' AND i.website_id = io.website_id', array()); $select->columns(array( - 'min_price' => new Zend_Db_Expr('i.min_price + io.min_price'), - 'max_price' => new Zend_Db_Expr('i.max_price + io.max_price'), - 'tier_price' => $write->getCheckSql('i.tier_price IS NOT NULL', 'i.tier_price + io.tier_price', 'NULL'), + 'min_price' => new Zend_Db_Expr('i.min_price + io.min_price'), + 'max_price' => new Zend_Db_Expr('i.max_price + io.max_price'), + 'tier_price' => $write->getCheckSql('i.tier_price IS NOT NULL', 'i.tier_price + io.tier_price', 'NULL'), + 'group_price' => $write->getCheckSql( + 'i.group_price IS NOT NULL', + 'i.group_price + io.group_price', 'NULL' + ), )); $query = $select->crossUpdateFromSelect($table); diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Default.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Default.php index 6c7d929b3bae2..026a59b8b02ba 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Default.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Default.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -220,6 +220,11 @@ protected function _prepareFinalPriceData($entityIds = null) 'tp.entity_id = e.entity_id AND tp.website_id = cw.website_id' . ' AND tp.customer_group_id = cg.customer_group_id', array()) + ->joinLeft( + array('gp' => $this->_getGroupPriceIndexTable()), + 'gp.entity_id = e.entity_id AND gp.website_id = cw.website_id' + . ' AND gp.customer_group_id = cg.customer_group_id', + array()) ->where('e.type_id = ?', $this->getTypeId()); // add enable products limitation @@ -237,6 +242,7 @@ protected function _prepareFinalPriceData($entityIds = null) $specialFrom = $this->_addAttributeToSelect($select, 'special_from_date', 'e.entity_id', 'cs.store_id'); $specialTo = $this->_addAttributeToSelect($select, 'special_to_date', 'e.entity_id', 'cs.store_id'); $currentDate = $write->getDatePartSql('cwd.website_date'); + $groupPrice = $write->getCheckSql('gp.price IS NULL', "{$price}", 'gp.price'); $specialFromDate = $write->getDatePartSql($specialFrom); $specialToDate = $write->getDatePartSql($specialTo); @@ -247,14 +253,17 @@ protected function _prepareFinalPriceData($entityIds = null) $specialToHas = $write->getCheckSql("{$specialTo} IS NULL", '1', "{$specialToUse}"); $finalPrice = $write->getCheckSql("{$specialFromHas} > 0 AND {$specialToHas} > 0" . " AND {$specialPrice} < {$price}", $specialPrice, $price); + $finalPrice = $write->getCheckSql("{$groupPrice} < {$finalPrice}", $groupPrice, $finalPrice); $select->columns(array( - 'orig_price' => $price, - 'price' => $finalPrice, - 'min_price' => $finalPrice, - 'max_price' => $finalPrice, - 'tier_price' => new Zend_Db_Expr('tp.min_price'), - 'base_tier' => new Zend_Db_Expr('tp.min_price'), + 'orig_price' => $price, + 'price' => $finalPrice, + 'min_price' => $finalPrice, + 'max_price' => $finalPrice, + 'tier_price' => new Zend_Db_Expr('tp.min_price'), + 'base_tier' => new Zend_Db_Expr('tp.min_price'), + 'group_price' => new Zend_Db_Expr('gp.price'), + 'base_group_price' => new Zend_Db_Expr('gp.price'), )); if (!is_null($entityIds)) { @@ -304,7 +313,7 @@ protected function _getCustomOptionAggregateTable() if ($this->useIdxTable()) { return $this->getTable('catalog_product_index_price_opt_agr_idx'); } - return $this->getTable('catalog_product_index_price_opt_agr_idx'); + return $this->getTable('catalog_product_index_price_opt_agr_tmp'); } /** @@ -403,16 +412,22 @@ protected function _applyCustomOption() $tierPriceValue = $write->getCheckSql("MIN(o.is_require) > 0", $tierPriceMin, 0); $tierPrice = $write->getCheckSql("MIN(i.base_tier) IS NOT NULL", $tierPriceValue, "NULL"); + $groupPriceRound = new Zend_Db_Expr("ROUND(i.base_group_price * ({$optPriceValue} / 100), 4)"); + $groupPriceExpr = $write->getCheckSql("{$optPriceType} = 'fixed'", $optPriceValue, $groupPriceRound); + $groupPriceMin = new Zend_Db_Expr("MIN($groupPriceExpr)"); + $groupPriceValue = $write->getCheckSql("MIN(o.is_require) > 0", $groupPriceMin, 0); + $groupPrice = $write->getCheckSql("MIN(i.base_group_price) IS NOT NULL", $groupPriceValue, "NULL"); + $maxPriceRound = new Zend_Db_Expr("ROUND(i.price * ({$optPriceValue} / 100), 4)"); $maxPriceExpr = $write->getCheckSql("{$optPriceType} = 'fixed'", $optPriceValue, $maxPriceRound); - //$tierPriceMin = new Zend_Db_Expr("MIN($tierPriceExpr)"); $maxPrice = $write->getCheckSql("(MIN(o.type)='radio' OR MIN(o.type)='drop_down')", "MAX($maxPriceExpr)", "SUM($maxPriceExpr)"); $select->columns(array( - 'min_price' => $minPrice, - 'max_price' => $maxPrice, - 'tier_price' => $tierPrice + 'min_price' => $minPrice, + 'max_price' => $maxPrice, + 'tier_price' => $tierPrice, + 'group_price' => $groupPrice, )); $query = $select->insertFromSelect($coaTable); @@ -461,10 +476,16 @@ protected function _applyCustomOption() $tierPriceValue = $write->getCheckSql("{$tierPriceExpr} > 0 AND o.is_require > 0", $tierPriceExpr, 0); $tierPrice = $write->getCheckSql("i.base_tier IS NOT NULL", $tierPriceValue, "NULL"); + $groupPriceRound = new Zend_Db_Expr("ROUND(i.base_group_price * ({$optPriceValue} / 100), 4)"); + $groupPriceExpr = $write->getCheckSql("{$optPriceType} = 'fixed'", $optPriceValue, $groupPriceRound); + $groupPriceValue = $write->getCheckSql("{$groupPriceExpr} > 0 AND o.is_require > 0", $groupPriceExpr, 0); + $groupPrice = $write->getCheckSql("i.base_group_price IS NOT NULL", $groupPriceValue, "NULL"); + $select->columns(array( - 'min_price' => $minPrice, - 'max_price' => $maxPrice, - 'tier_price' => $tierPrice + 'min_price' => $minPrice, + 'max_price' => $maxPrice, + 'tier_price' => $tierPrice, + 'group_price' => $groupPrice, )); $query = $select->insertFromSelect($coaTable); @@ -480,6 +501,7 @@ protected function _applyCustomOption() 'min_price' => 'SUM(min_price)', 'max_price' => 'SUM(max_price)', 'tier_price' => 'SUM(tier_price)', + 'group_price' => 'SUM(group_price)', )) ->group(array('entity_id', 'customer_group_id', 'website_id')); $query = $select->insertFromSelect($copTable); @@ -493,9 +515,13 @@ protected function _applyCustomOption() .' AND i.website_id = io.website_id', array()); $select->columns(array( - 'min_price' => new Zend_Db_Expr('i.min_price + io.min_price'), - 'max_price' => new Zend_Db_Expr('i.max_price + io.max_price'), - 'tier_price' => $write->getCheckSql('i.tier_price IS NOT NULL', 'i.tier_price + io.tier_price', 'NULL'), + 'min_price' => new Zend_Db_Expr('i.min_price + io.min_price'), + 'max_price' => new Zend_Db_Expr('i.max_price + io.max_price'), + 'tier_price' => $write->getCheckSql('i.tier_price IS NOT NULL', 'i.tier_price + io.tier_price', 'NULL'), + 'group_price' => $write->getCheckSql( + 'i.group_price IS NOT NULL', + 'i.group_price + io.group_price', 'NULL' + ), )); $query = $select->crossUpdateFromSelect($table); $write->query($query); @@ -522,7 +548,8 @@ protected function _movePriceDataToIndexTable() 'final_price' => 'price', 'min_price' => 'min_price', 'max_price' => 'max_price', - 'tier_price' => 'tier_price' + 'tier_price' => 'tier_price', + 'group_price' => 'group_price', ); $write = $this->_getWriteAdapter(); @@ -548,6 +575,16 @@ protected function _getTierPriceIndexTable() return $this->getTable('catalog_product_index_tier_price'); } + /** + * Retrieve table name for product group price index + * + * @return string + */ + protected function _getGroupPriceIndexTable() + { + return $this->getTable('catalog_product_index_group_price'); + } + /** * Register data required by product type process in event object * diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Grouped.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Grouped.php index bfcac8c95a42e..b8f2671d5ea29 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Grouped.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Grouped.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -103,13 +103,14 @@ protected function _prepareGroupedProductPriceData($entityIds = null) 'i.entity_id = l.linked_product_id AND i.website_id = cw.website_id' . ' AND i.customer_group_id = cg.customer_group_id', array( - 'tax_class_id'=> $this->_getReadAdapter() + 'tax_class_id' => $this->_getReadAdapter() ->getCheckSql('MIN(i.tax_class_id) IS NULL', '0', 'MIN(i.tax_class_id)'), - 'price' => new Zend_Db_Expr('NULL'), - 'final_price' => new Zend_Db_Expr('NULL'), - 'min_price' => new Zend_Db_Expr('MIN(' . $minCheckSql . ')'), - 'max_price' => new Zend_Db_Expr('MAX(' . $maxCheckSql . ')'), - 'tier_price' => new Zend_Db_Expr('NULL') + 'price' => new Zend_Db_Expr('NULL'), + 'final_price' => new Zend_Db_Expr('NULL'), + 'min_price' => new Zend_Db_Expr('MIN(' . $minCheckSql . ')'), + 'max_price' => new Zend_Db_Expr('MAX(' . $maxCheckSql . ')'), + 'tier_price' => new Zend_Db_Expr('NULL'), + 'group_price' => new Zend_Db_Expr('NULL'), )) ->group(array('e.entity_id', 'cg.customer_group_id', 'cw.website_id')) ->where('e.type_id=?', $this->getTypeId()); diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Interface.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Interface.php index f590e1b3b4230..f0b22210318c9 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Interface.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Indexer/Price/Interface.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Link.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Link.php index 011563141f8ff..d8cfafa401ae6 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Link.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Link.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Link/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Link/Collection.php index 4e452dba7a328..a382b405d20a5 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Link/Collection.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Link/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Link/Product/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Link/Product/Collection.php index ea9de7b0eb7c7..ac7668d36b34d 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Link/Product/Collection.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Link/Product/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Option.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Option.php index bed92f6bb495e..f20811bfb83ef 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Option.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Option.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Option/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Option/Collection.php index d4531437bf214..986ca7aee0c76 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Option/Collection.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Option/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Option/Value.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Option/Value.php index b6ea1a68b9037..8dd0bfd44c64e 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Option/Value.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Option/Value.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Option/Value/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Option/Value/Collection.php index 8c1675c1f2dea..c4186d1e216a8 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Option/Value/Collection.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Option/Value/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Relation.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Relation.php index a8e6cf6ec449c..0cfe75896943b 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Relation.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Relation.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Status.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Status.php index 0e6f685568e00..668a05500465a 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Status.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Status.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable.php index 4fd38d4662b42..094831d6a873d 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute.php index 900cb52653aee..20ed35f245290 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php index 425dbf15649fc..29d59fa6c1a4d 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Attribute/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Product/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Product/Collection.php index 59bfba75697c3..c72960147c3a4 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Product/Collection.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Type/Configurable/Product/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Product/Website.php b/app/code/core/Mage/Catalog/Model/Resource/Product/Website.php index 9e9dd740ac35f..d036d770c1725 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Product/Website.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Product/Website.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Resource/Setup.php b/app/code/core/Mage/Catalog/Model/Resource/Setup.php index 380d987a1dc9d..29eaf768aeb6e 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Setup.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Setup.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -484,7 +484,7 @@ public function getDefaultEntities() 'weight' => array( 'type' => 'decimal', 'label' => 'Weight', - 'input' => 'text', + 'input' => 'weight', 'sort_order' => 5, 'apply_to' => Mage_Catalog_Model_Product_Type::TYPE_SIMPLE, ), @@ -576,6 +576,17 @@ public function getDefaultEntities() 'sort_order' => 6, 'visible' => false, ), + 'group_price' => array( + 'type' => 'decimal', + 'label' => 'Group Price', + 'input' => 'text', + 'backend' => 'Mage_Catalog_Model_Product_Attribute_Backend_Groupprice', + 'required' => false, + 'sort_order' => 6, + 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE, + 'apply_to' => 'simple,configurable,virtual', + 'group' => 'Prices', + ), 'tier_price' => array( 'type' => 'decimal', 'label' => 'Tier Price', diff --git a/app/code/core/Mage/Catalog/Model/Resource/Url.php b/app/code/core/Mage/Catalog/Model/Resource/Url.php index 08fad62f32b4e..bdaad52a56bcc 100755 --- a/app/code/core/Mage/Catalog/Model/Resource/Url.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Url.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -173,6 +173,40 @@ public function getRewriteByRequestPath($requestPath, $storeId) return $rewrite; } + /** + * Get last used increment part of rewrite request path + * + * @param string $prefix + * @param string $suffix + * @param int $storeId + * @return int + */ + public function getLastUsedRewriteRequestIncrement($prefix, $suffix, $storeId) + { + $adapter = $this->_getWriteAdapter(); + $requestPathField = new Zend_Db_Expr($adapter->quoteIdentifier('request_path')); + //select increment part of request path and cast expression to integer + $urlIncrementPartExpression = Mage::getResourceHelper('Mage_Eav') + ->getCastToIntExpression($adapter->getSubstringSql( + $requestPathField, + strlen($prefix) + 1, + $adapter->getLengthSql($requestPathField) . ' - ' . strlen($prefix) . ' - ' . strlen($suffix) + )); + $select = $adapter->select() + ->from($this->getMainTable(), new Zend_Db_Expr('MAX(' . $urlIncrementPartExpression . ')')) + ->where('store_id = :store_id') + ->where('request_path LIKE :request_path') + ->where($adapter->prepareSqlCondition('request_path', array( + 'regexp' => '^' . preg_quote($prefix) . '[0-9]*' . preg_quote($suffix) . '$' + ))); + $bind = array( + 'store_id' => (int)$storeId, + 'request_path' => $prefix . '%' . $suffix, + ); + + return (int)$adapter->fetchOne($select, $bind); + } + /** * Validate array of request paths. Return first not used path in case if validations passed * @@ -1310,12 +1344,26 @@ public function findFinalTargetPath($requestPath, $storeId, &$_checkedPaths = ar */ public function deleteRewrite($requestPath, $storeId) { - $this->_getWriteAdapter()->delete( - $this->getMainTable(), - array( - 'store_id = ?' => $storeId, - 'request_path = ?' => $requestPath - ) + $this->deleteRewriteRecord($requestPath, $storeId); + } + + /** + * Delete rewrite path record from the database with RP checking. + * + * @param string $requestPath + * @param int $storeId + * @param bool $rp whether check rewrite option to be "Redirect = Permanent" + * @return void + */ + public function deleteRewriteRecord($requestPath, $storeId, $rp = false) + { + $conditions = array( + 'store_id = ?' => $storeId, + 'request_path = ?' => $requestPath, ); + if ($rp) { + $conditions['options = ?'] = 'RP'; + } + $this->_getWriteAdapter()->delete($this->getMainTable(), $conditions); } } diff --git a/app/code/core/Mage/Catalog/Model/Session.php b/app/code/core/Mage/Catalog/Model/Session.php index f36cb475c5994..d859a9e2cce95 100644 --- a/app/code/core/Mage/Catalog/Model/Session.php +++ b/app/code/core/Mage/Catalog/Model/Session.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/System/Config/Backend/Catalog/Category/Flat.php b/app/code/core/Mage/Catalog/Model/System/Config/Backend/Catalog/Category/Flat.php index af34c4f5e9a07..849c208d23b58 100644 --- a/app/code/core/Mage/Catalog/Model/System/Config/Backend/Catalog/Category/Flat.php +++ b/app/code/core/Mage/Catalog/Model/System/Config/Backend/Catalog/Category/Flat.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/System/Config/Backend/Catalog/Product/Flat.php b/app/code/core/Mage/Catalog/Model/System/Config/Backend/Catalog/Product/Flat.php index 3d42873a4ea7c..d6c75997fef1b 100644 --- a/app/code/core/Mage/Catalog/Model/System/Config/Backend/Catalog/Product/Flat.php +++ b/app/code/core/Mage/Catalog/Model/System/Config/Backend/Catalog/Product/Flat.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php b/app/code/core/Mage/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php index d5e4ee82e698f..f43f689532f0b 100644 --- a/app/code/core/Mage/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php +++ b/app/code/core/Mage/Catalog/Model/System/Config/Backend/Catalog/Url/Rewrite/Suffix.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Template/Filter.php b/app/code/core/Mage/Catalog/Model/Template/Filter.php index 0c1e21708b125..5112981988ea3 100644 --- a/app/code/core/Mage/Catalog/Model/Template/Filter.php +++ b/app/code/core/Mage/Catalog/Model/Template/Filter.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/Model/Url.php b/app/code/core/Mage/Catalog/Model/Url.php index 166619c0653ac..97d673e2f1a5e 100644 --- a/app/code/core/Mage/Catalog/Model/Url.php +++ b/app/code/core/Mage/Catalog/Model/Url.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -645,11 +645,21 @@ public function getUnusedPath($storeId, $requestPath, $idPath) } // match request_url abcdef1234(-12)(.html) pattern $match = array(); - if (!preg_match('#^([0-9a-z/-]+?)(-([0-9]+))?('.preg_quote($suffix).')?$#i', $requestPath, $match)) { + $regularExpression = '#^([0-9a-z/-]+?)(-([0-9]+))?('.preg_quote($suffix).')?$#i'; + if (!preg_match($regularExpression, $requestPath, $match)) { return $this->getUnusedPath($storeId, '-', $idPath); } - $requestPath = $match[1].(isset($match[3])?'-'.($match[3]+1):'-1').(isset($match[4])?$match[4]:''); - return $this->getUnusedPath($storeId, $requestPath, $idPath); + $match[1] = $match[1] . '-'; + $match[4] = isset($match[4]) ? $match[4] : ''; + + $lastRequestPath = $this->getResource() + ->getLastUsedRewriteRequestIncrement($match[1], $match[4], $storeId); + if ($lastRequestPath) { + $match[3] = $lastRequestPath; + } + return $match[1] + . (isset($match[3]) ? ($match[3]+1) : '1') + . $match[4]; } else { return $requestPath; @@ -694,7 +704,6 @@ public function getCategoryRequestPath($category, $parentPath) if (isset($this->_rewrites[$idPath])) { $this->_rewrite = $this->_rewrites[$idPath]; $existingRequestPath = $this->_rewrites[$idPath]->getRequestPath(); - $existingRequestPath = str_replace($suffix, '', $existingRequestPath); } if ($category->getUrlKey() == '') { @@ -715,8 +724,8 @@ public function getCategoryRequestPath($category, $parentPath) true, $category->getStoreId()); $requestPath = $parentPath . $urlKey . $categoryUrlSuffix; - if (isset($existingRequestPath) && $existingRequestPath == $requestPath) { - return $requestPath.$suffix; + if (isset($existingRequestPath) && $existingRequestPath == $requestPath . $suffix) { + return $existingRequestPath; } if ($this->_deleteOldTargetPath($requestPath, $idPath, $storeId)) { @@ -740,7 +749,7 @@ protected function _deleteOldTargetPath($requestPath, $idPath, $storeId) { $finalOldTargetPath = $this->getResource()->findFinalTargetPath($requestPath, $storeId); if ($finalOldTargetPath && $finalOldTargetPath == $idPath) { - $this->getResource()->deleteRewrite($requestPath, $storeId); + $this->getResource()->deleteRewriteRecord($requestPath, $storeId, true); return true; } @@ -788,18 +797,21 @@ public function getProductRequestPath($product, $category) if (isset($this->_rewrites[$idPath])) { $this->_rewrite = $this->_rewrites[$idPath]; $existingRequestPath = $this->_rewrites[$idPath]->getRequestPath(); - $existingRequestPath = str_replace($suffix, '', $existingRequestPath); - if ($existingRequestPath == $requestPath) { - return $requestPath.$suffix; + if ($existingRequestPath == $requestPath . $suffix) { + return $existingRequestPath; } + + $existingRequestPath = preg_replace('/' . preg_quote($suffix, '/') . '$/', '', $existingRequestPath); /** * Check if existing request past can be used */ if ($product->getUrlKey() == '' && !empty($requestPath) - && strpos($existingRequestPath, $requestPath) !== false + && strpos($existingRequestPath, $requestPath) === 0 ) { - $existingRequestPath = str_replace($requestPath, '', $existingRequestPath); + $existingRequestPath = preg_replace( + '/^' . preg_quote($requestPath, '/') . '/', '', $existingRequestPath + ); if (preg_match('#^-([0-9]+)$#i', $existingRequestPath)) { return $this->_rewrites[$idPath]->getRequestPath(); } diff --git a/app/code/core/Mage/Catalog/controllers/CategoryController.php b/app/code/core/Mage/Catalog/controllers/CategoryController.php index 8801359ecbcac..94f9cd49af6a5 100644 --- a/app/code/core/Mage/Catalog/controllers/CategoryController.php +++ b/app/code/core/Mage/Catalog/controllers/CategoryController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/controllers/IndexController.php b/app/code/core/Mage/Catalog/controllers/IndexController.php index e62be35372285..eb7be117fa3be 100644 --- a/app/code/core/Mage/Catalog/controllers/IndexController.php +++ b/app/code/core/Mage/Catalog/controllers/IndexController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/controllers/Product/CompareController.php b/app/code/core/Mage/Catalog/controllers/Product/CompareController.php index 518996a92a81b..c37faa4000c3d 100644 --- a/app/code/core/Mage/Catalog/controllers/Product/CompareController.php +++ b/app/code/core/Mage/Catalog/controllers/Product/CompareController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/controllers/ProductController.php b/app/code/core/Mage/Catalog/controllers/ProductController.php index c30282ceee87a..3ba82f2988db0 100644 --- a/app/code/core/Mage/Catalog/controllers/ProductController.php +++ b/app/code/core/Mage/Catalog/controllers/ProductController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/controllers/Seo/SitemapController.php b/app/code/core/Mage/Catalog/controllers/Seo/SitemapController.php index 5b23b7bf43b91..914ff48adefbf 100644 --- a/app/code/core/Mage/Catalog/controllers/Seo/SitemapController.php +++ b/app/code/core/Mage/Catalog/controllers/Seo/SitemapController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/data/catalog_setup/data-install-1.6.0.0.php b/app/code/core/Mage/Catalog/data/catalog_setup/data-install-1.6.0.0.php index e386348f78109..37fbb8d9d74e5 100644 --- a/app/code/core/Mage/Catalog/data/catalog_setup/data-install-1.6.0.0.php +++ b/app/code/core/Mage/Catalog/data/catalog_setup/data-install-1.6.0.0.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.4-1.6.0.0.5.php b/app/code/core/Mage/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.4-1.6.0.0.5.php index b921169d4ba33..afb034af56aac 100644 --- a/app/code/core/Mage/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.4-1.6.0.0.5.php +++ b/app/code/core/Mage/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.4-1.6.0.0.5.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.8-1.6.0.0.9.php b/app/code/core/Mage/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.8-1.6.0.0.9.php new file mode 100644 index 0000000000000..5d78b85626238 --- /dev/null +++ b/app/code/core/Mage/Catalog/data/catalog_setup/data-upgrade-1.6.0.0.8-1.6.0.0.9.php @@ -0,0 +1,36 @@ +getAttribute('catalog_product', 'weight'); + +if ($attribute) { + $installer->updateAttribute($attribute['entity_type_id'], $attribute['attribute_id'], + 'frontend_input', $attribute['attribute_code']); +} diff --git a/app/code/core/Mage/Catalog/etc/adminhtml.xml b/app/code/core/Mage/Catalog/etc/adminhtml.xml index 6845e60c0c575..870118d399a15 100644 --- a/app/code/core/Mage/Catalog/etc/adminhtml.xml +++ b/app/code/core/Mage/Catalog/etc/adminhtml.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Catalog/etc/api.xml b/app/code/core/Mage/Catalog/etc/api.xml index cc7a02ae18d72..389b61938a907 100644 --- a/app/code/core/Mage/Catalog/etc/api.xml +++ b/app/code/core/Mage/Catalog/etc/api.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Catalog/etc/config.xml b/app/code/core/Mage/Catalog/etc/config.xml index eaf855261b0f3..3bd81a75c911f 100644 --- a/app/code/core/Mage/Catalog/etc/config.xml +++ b/app/code/core/Mage/Catalog/etc/config.xml @@ -21,14 +21,14 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - 1.6.0.0.8 + 1.6.0.0.11 @@ -392,6 +392,9 @@ auto 100 + 10 + 0 + 9 diff --git a/app/code/core/Mage/Catalog/etc/convert.xml b/app/code/core/Mage/Catalog/etc/convert.xml index d661e84f4a87b..9b6bae2511c21 100644 --- a/app/code/core/Mage/Catalog/etc/convert.xml +++ b/app/code/core/Mage/Catalog/etc/convert.xml @@ -21,30 +21,30 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + /tmp test.xml - + products.xml - + Products - + - + @@ -54,15 +54,15 @@ catalog/product - + - + Products - + - + products.xml @@ -70,23 +70,23 @@ - + - + - + - + - + - + attachment; filename=catalog.xml diff --git a/app/code/core/Mage/Catalog/etc/fieldset.xml b/app/code/core/Mage/Catalog/etc/fieldset.xml index 7d7b53e173643..9310bb06098d4 100644 --- a/app/code/core/Mage/Catalog/etc/fieldset.xml +++ b/app/code/core/Mage/Catalog/etc/fieldset.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Catalog/etc/system.xml b/app/code/core/Mage/Catalog/etc/system.xml index edee67a3ea456..80eb337ed88a9 100644 --- a/app/code/core/Mage/Catalog/etc/system.xml +++ b/app/code/core/Mage/Catalog/etc/system.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -64,6 +64,7 @@ Comma-separated. text + validate-per-page-value-list 2 1 @@ -74,6 +75,7 @@ Must be in the allowed values list. text + validate-per-page-value 3 1 @@ -84,6 +86,7 @@ Comma-separated. text + validate-per-page-value-list 4 1 @@ -94,6 +97,7 @@ Must be in the allowed values list. text + validate-per-page-value 5 1 @@ -320,12 +324,46 @@ text + validate-number validate-number-range number-range-0.01-1000000000 2 1 1 1 manual + + + Maximum number of price intervals is 100 + text + validate-digits validate-digits-range digits-range-2-100 + 3 + 1 + 1 + 1 + manual + + + + This setting will be applied when all prices in the specific price interval are equal. + select + Mage_Adminhtml_Model_System_Config_Source_Yesno + 4 + 1 + 1 + 1 + auto + + + + Please specify the number of products, that will not be divided into subintervals. + text + 5 + 1 + 1 + 1 + validate-digits validate-digits-range digits-range-1-10000 + auto + diff --git a/app/code/core/Mage/Catalog/etc/view.xml b/app/code/core/Mage/Catalog/etc/view.xml index 76a39e60da123..de0d81c393a7c 100644 --- a/app/code/core/Mage/Catalog/etc/view.xml +++ b/app/code/core/Mage/Catalog/etc/view.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Catalog/etc/widget.xml b/app/code/core/Mage/Catalog/etc/widget.xml index 6d6e007177151..62044a87fc79a 100644 --- a/app/code/core/Mage/Catalog/etc/widget.xml +++ b/app/code/core/Mage/Catalog/etc/widget.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/install-1.6.0.0.php b/app/code/core/Mage/Catalog/sql/catalog_setup/install-1.6.0.0.php index 9ead1befc3ce9..b358144685410 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/install-1.6.0.0.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/install-1.6.0.0.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.6.0.0.8-1.6.0.0.9.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.6.0.0.8-1.6.0.0.9.php new file mode 100644 index 0000000000000..6c8b701809763 --- /dev/null +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.6.0.0.8-1.6.0.0.9.php @@ -0,0 +1,53 @@ +getConnection(); +$memoryTables = array( + 'catalog_category_anc_categs_index_tmp', + 'catalog_category_anc_products_index_tmp', + 'catalog_category_product_index_enbl_tmp', + 'catalog_category_product_index_tmp', + 'catalog_product_index_eav_decimal_tmp', + 'catalog_product_index_eav_tmp', + 'catalog_product_index_price_cfg_opt_agr_tmp', + 'catalog_product_index_price_cfg_opt_tmp', + 'catalog_product_index_price_final_tmp', + 'catalog_product_index_price_opt_agr_tmp', + 'catalog_product_index_price_opt_tmp', + 'catalog_product_index_price_tmp', +); + +foreach ($memoryTables as $table) { + $connection->changeTableEngine($installer->getTable($table), Varien_Db_Adapter_Pdo_Mysql::ENGINE_MEMORY); +} diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0-1.6.0.0.1.php b/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0-1.6.0.0.1.php index 6a72f55bfa172..6eb029d70c7d5 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0-1.6.0.0.1.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0-1.6.0.0.1.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php b/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php index b86687dafade8..0297c8e0643d8 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.1-1.6.0.0.2.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.10-1.6.0.0.11.php b/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.10-1.6.0.0.11.php new file mode 100644 index 0000000000000..05161ad2d0e0b --- /dev/null +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.10-1.6.0.0.11.php @@ -0,0 +1,31 @@ +getAttribute('catalog_product', 'group_price', 'attribute_id'); +$installer->updateAttribute('catalog_product', $attributeId, array(), null, 5); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.2-1.6.0.0.3.php b/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.2-1.6.0.0.3.php index 1ca57f4d7bc03..09815b5d601bb 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.2-1.6.0.0.3.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.2-1.6.0.0.3.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.3-1.6.0.0.4.php b/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.3-1.6.0.0.4.php index e2c7a5701a0d3..b6ab94d335eff 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.3-1.6.0.0.4.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.3-1.6.0.0.4.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.4-1.6.0.0.5.php b/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.4-1.6.0.0.5.php index 752f2bbde064f..4b2e297966824 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.4-1.6.0.0.5.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.4-1.6.0.0.5.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.5-1.6.0.0.6.php b/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.5-1.6.0.0.6.php index fd578cc350ba6..b3468b6cd58a2 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.5-1.6.0.0.6.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.5-1.6.0.0.6.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.6-1.6.0.0.7.php b/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.6-1.6.0.0.7.php index 009a51b26caf7..1408a7911fb67 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.6-1.6.0.0.7.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.6-1.6.0.0.7.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.7-1.6.0.0.8.php b/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.7-1.6.0.0.8.php index 3402e5fad6805..8bd9574ff64c3 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.7-1.6.0.0.8.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.7-1.6.0.0.8.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Catalog - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.9-1.6.0.0.10.php b/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.9-1.6.0.0.10.php new file mode 100644 index 0000000000000..e447c63a6a9f5 --- /dev/null +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.9-1.6.0.0.10.php @@ -0,0 +1,214 @@ +getConnection(); + +/** + * Create table 'catalog_product_entity_group_price' + */ +$table = $installer->getConnection() + ->newTable($installer->getTable('catalog_product_entity_group_price')) + ->addColumn('value_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array( + 'identity' => true, + 'nullable' => false, + 'primary' => true, + ), 'Value ID') + ->addColumn('entity_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array( + 'unsigned' => true, + 'nullable' => false, + 'default' => '0', + ), 'Entity ID') + ->addColumn('all_groups', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array( + 'unsigned' => true, + 'nullable' => false, + 'default' => '1', + ), 'Is Applicable To All Customer Groups') + ->addColumn('customer_group_id', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array( + 'unsigned' => true, + 'nullable' => false, + 'default' => '0', + ), 'Customer Group ID') + ->addColumn('value', Varien_Db_Ddl_Table::TYPE_DECIMAL, '12,4', array( + 'nullable' => false, + 'default' => '0.0000', + ), 'Value') + ->addColumn('website_id', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array( + 'unsigned' => true, + 'nullable' => false, + ), 'Website ID') + ->addIndex( + $installer->getIdxName( + 'catalog_product_entity_group_price', + array('entity_id', 'all_groups', 'customer_group_id', 'website_id'), + Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE + ), + array('entity_id', 'all_groups', 'customer_group_id', 'website_id'), + array('type' => Varien_Db_Adapter_Interface::INDEX_TYPE_UNIQUE)) + ->addIndex($installer->getIdxName('catalog_product_entity_group_price', array('entity_id')), + array('entity_id')) + ->addIndex($installer->getIdxName('catalog_product_entity_group_price', array('customer_group_id')), + array('customer_group_id')) + ->addIndex($installer->getIdxName('catalog_product_entity_group_price', array('website_id')), + array('website_id')) + ->addForeignKey( + $installer->getFkName( + 'catalog_product_entity_group_price', + 'customer_group_id', + 'customer_group', + 'customer_group_id' + ), + 'customer_group_id', $installer->getTable('customer_group'), 'customer_group_id', + Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE) + ->addForeignKey( + $installer->getFkName( + 'catalog_product_entity_group_price', + 'entity_id', + 'catalog_product_entity', + 'entity_id' + ), + 'entity_id', $installer->getTable('catalog_product_entity'), 'entity_id', + Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE) + ->addForeignKey( + $installer->getFkName( + 'catalog_product_entity_group_price', + 'website_id', + 'core_website', + 'website_id' + ), + 'website_id', $installer->getTable('core_website'), 'website_id', + Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE) + ->setComment('Catalog Product Group Price Attribute Backend Table'); +$installer->getConnection()->createTable($table); + +$installer->addAttribute('catalog_product', 'group_price', array( + 'type' => 'decimal', + 'label' => 'Group Price', + 'input' => 'text', + 'backend' => 'Mage_Catalog_Model_Product_Attribute_Backend_Groupprice', + 'required' => false, + 'sort_order' => 6, + 'global' => Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE, + 'apply_to' => 'simple,configurable,virtual', + 'group' => 'Prices', +)); + +/** + * Create table 'catalog_product_index_group_price' + */ +$table = $connection + ->newTable($installer->getTable('catalog_product_index_group_price')) + ->addColumn('entity_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array( + 'unsigned' => true, + 'nullable' => false, + 'primary' => true, + ), 'Entity ID') + ->addColumn('customer_group_id', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array( + 'unsigned' => true, + 'nullable' => false, + 'primary' => true, + ), 'Customer Group ID') + ->addColumn('website_id', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array( + 'unsigned' => true, + 'nullable' => false, + 'primary' => true, + ), 'Website ID') + ->addColumn('price', Varien_Db_Ddl_Table::TYPE_DECIMAL, '12,4', array( + ), 'Min Price') + ->addIndex($installer->getIdxName('catalog_product_index_group_price', array('customer_group_id')), + array('customer_group_id')) + ->addIndex($installer->getIdxName('catalog_product_index_group_price', array('website_id')), + array('website_id')) + ->addForeignKey( + $installer->getFkName( + 'catalog_product_index_group_price', + 'customer_group_id', + 'customer_group', + 'customer_group_id' + ), + 'customer_group_id', $installer->getTable('customer_group'), 'customer_group_id', + Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE) + ->addForeignKey( + $installer->getFkName( + 'catalog_product_index_group_price', + 'entity_id', + 'catalog_product_entity', + 'entity_id' + ), + 'entity_id', $installer->getTable('catalog_product_entity'), 'entity_id', + Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE) + ->addForeignKey( + $installer->getFkName( + 'catalog_product_index_group_price', + 'website_id', + 'core_website', + 'website_id' + ), + 'website_id', $installer->getTable('core_website'), 'website_id', + Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE) + ->setComment('Catalog Product Group Price Index Table'); +$connection->createTable($table); + +$finalPriceIndexerTables = array( + 'catalog_product_index_price_final_idx', + 'catalog_product_index_price_final_tmp', +); + +$priceIndexerTables = array( + 'catalog_product_index_price_opt_agr_idx', + 'catalog_product_index_price_opt_agr_tmp', + 'catalog_product_index_price_opt_idx', + 'catalog_product_index_price_opt_tmp', + 'catalog_product_index_price_idx', + 'catalog_product_index_price_tmp', + 'catalog_product_index_price_cfg_opt_agr_idx', + 'catalog_product_index_price_cfg_opt_agr_tmp', + 'catalog_product_index_price_cfg_opt_idx', + 'catalog_product_index_price_cfg_opt_tmp', + 'catalog_product_index_price', +); + +foreach ($finalPriceIndexerTables as $table) { + $connection->addColumn($installer->getTable($table), 'group_price', array( + 'type' => Varien_Db_Ddl_Table::TYPE_DECIMAL, + 'length' => '12,4', + 'comment' => 'Group price', + )); + $connection->addColumn($installer->getTable($table), 'base_group_price', array( + 'type' => Varien_Db_Ddl_Table::TYPE_DECIMAL, + 'length' => '12,4', + 'comment' => 'Base Group Price', + )); +} + +foreach ($priceIndexerTables as $table) { + $connection->addColumn($installer->getTable($table), 'group_price', array( + 'type' => Varien_Db_Ddl_Table::TYPE_DECIMAL, + 'length' => '12,4', + 'comment' => 'Group price', + )); +} diff --git a/app/code/core/Mage/Catalog/view/frontend/category/view.phtml b/app/code/core/Mage/Catalog/view/frontend/category/view.phtml index d562afa3c11a7..21c074e1fe354 100644 --- a/app/code/core/Mage/Catalog/view/frontend/category/view.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/category/view.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/category/widget/link/link_block.phtml b/app/code/core/Mage/Catalog/view/frontend/category/widget/link/link_block.phtml index 74c399057b367..5ffb7548195c3 100644 --- a/app/code/core/Mage/Catalog/view/frontend/category/widget/link/link_block.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/category/widget/link/link_block.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/category/widget/link/link_inline.phtml b/app/code/core/Mage/Catalog/view/frontend/category/widget/link/link_inline.phtml index c08c9a37e9c7d..60fac35e87f62 100644 --- a/app/code/core/Mage/Catalog/view/frontend/category/widget/link/link_inline.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/category/widget/link/link_inline.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/layer/filter.phtml b/app/code/core/Mage/Catalog/view/frontend/layer/filter.phtml index 012367c077c58..50977c6b21eb2 100644 --- a/app/code/core/Mage/Catalog/view/frontend/layer/filter.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/layer/filter.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/layer/state.phtml b/app/code/core/Mage/Catalog/view/frontend/layer/state.phtml index f6d7a7828c267..02395ab901fb0 100644 --- a/app/code/core/Mage/Catalog/view/frontend/layer/state.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/layer/state.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -40,9 +40,14 @@
  • __('Remove This Item') ?> __($_filter->getName()) ?>: stripTags($_filter->getLabel()) ?> + getClearLinkUrl(); + if ($clearLinkUrl): + ?> + +
  • -
    diff --git a/app/code/core/Mage/Catalog/view/frontend/layer/view.phtml b/app/code/core/Mage/Catalog/view/frontend/layer/view.phtml index ad6e3c36037d7..a7eda469aac84 100644 --- a/app/code/core/Mage/Catalog/view/frontend/layer/view.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/layer/view.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -51,6 +51,9 @@
    + getLayer()->getState()->getFilters()): ?> + +
    diff --git a/app/code/core/Mage/Catalog/view/frontend/layout.xml b/app/code/core/Mage/Catalog/view/frontend/layout.xml index 398c6e2e55e95..4109dfe718d64 100644 --- a/app/code/core/Mage/Catalog/view/frontend/layout.xml +++ b/app/code/core/Mage/Catalog/view/frontend/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Catalog/view/frontend/msrp.js b/app/code/core/Mage/Catalog/view/frontend/msrp.js index 79a7f2c5bbd06..a25b41a90474c 100644 --- a/app/code/core/Mage/Catalog/view/frontend/msrp.js +++ b/app/code/core/Mage/Catalog/view/frontend/msrp.js @@ -19,7 +19,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ if (!window.Catalog) { diff --git a/app/code/core/Mage/Catalog/view/frontend/msrp.xml b/app/code/core/Mage/Catalog/view/frontend/msrp.xml index 01712bcc628c1..06a6442ebba62 100644 --- a/app/code/core/Mage/Catalog/view/frontend/msrp.xml +++ b/app/code/core/Mage/Catalog/view/frontend/msrp.xml @@ -21,7 +21,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Catalog/view/frontend/msrp/popup.phtml b/app/code/core/Mage/Catalog/view/frontend/msrp/popup.phtml index 2b66de76c5ec6..07cec3b4b3d47 100644 --- a/app/code/core/Mage/Catalog/view/frontend/msrp/popup.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/msrp/popup.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/navigation/left.phtml b/app/code/core/Mage/Catalog/view/frontend/navigation/left.phtml index 6581f5781c403..26b5e87173625 100644 --- a/app/code/core/Mage/Catalog/view/frontend/navigation/left.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/navigation/left.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Catalog/view/frontend/navigation/top.phtml b/app/code/core/Mage/Catalog/view/frontend/navigation/top.phtml index f5914a1e089e4..26bd72708f8e0 100644 --- a/app/code/core/Mage/Catalog/view/frontend/navigation/top.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/navigation/top.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/compare/list.phtml b/app/code/core/Mage/Catalog/view/frontend/product/compare/list.phtml index a2320c34a7db7..94fd7656705db 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/compare/list.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/compare/list.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /* @var $this Mage_Catalog_Block_Product_Compare_List */ @@ -98,7 +98,9 @@ echo substr($this->getProductAttributeValue($_item, $_attribute),0,10); break; default: ?> - helper('Mage_Catalog_Helper_Output')->productAttribute($_item, $this->getProductAttributeValue($_item, $_attribute), $_attribute->getAttributeCode()) ?> +
    + helper('Mage_Catalog_Helper_Output')->productAttribute($_item, $this->getProductAttributeValue($_item, $_attribute), $_attribute->getAttributeCode()) ?> +
    diff --git a/app/code/core/Mage/Catalog/view/frontend/product/compare/sidebar.phtml b/app/code/core/Mage/Catalog/view/frontend/product/compare/sidebar.phtml index 2c58d9d28becc..5f9aab55d7fac 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/compare/sidebar.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/compare/sidebar.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /* @var $this Mage_Catalog_Block_Product_Compare_Sidebar */ diff --git a/app/code/core/Mage/Catalog/view/frontend/product/gallery.phtml b/app/code/core/Mage/Catalog/view/frontend/product/gallery.phtml index 94cf1e3528dcc..cc3e65c76bc13 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/gallery.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/gallery.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/list.phtml b/app/code/core/Mage/Catalog/view/frontend/product/list.phtml index cd40f7fb04d07..575deaf044ca1 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/list.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/list.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/list/related.phtml b/app/code/core/Mage/Catalog/view/frontend/product/list/related.phtml index 5a1db095cce1b..61df743cf284b 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/list/related.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/list/related.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/list/toolbar.phtml b/app/code/core/Mage/Catalog/view/frontend/product/list/toolbar.phtml index fb9e2aba884bf..7d1cb5d1c329b 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/list/toolbar.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/list/toolbar.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/list/upsell.phtml b/app/code/core/Mage/Catalog/view/frontend/product/list/upsell.phtml index 7dfc2254d8ef0..370be367d9260 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/list/upsell.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/list/upsell.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/new.phtml b/app/code/core/Mage/Catalog/view/frontend/product/new.phtml index ae59c3e0ef832..5e05660ca6bea 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/new.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/new.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/price.phtml b/app/code/core/Mage/Catalog/view/frontend/product/price.phtml index d7ba09bdfe7fd..8ba900687ec77 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/price.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/price.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -41,6 +41,7 @@ /* @var $_taxHelper Mage_Tax_Helper_Data */ $_product = $this->getProduct(); + $_storeId = $_product->getStoreId(); $_id = $_product->getId(); $_weeeSeparator = ''; $_simplePricesTax = ($_taxHelper->displayPriceIncludingTax() || $_taxHelper->displayBothPrices()); @@ -55,7 +56,7 @@ getProductWeeeAttributesForDisplay($_product); ?> - isTaxable()): ?> + isTaxable() && !$_taxHelper->priceIncludesTax($_storeId)): ?> getProductWeeeAttributesForRenderer($_product, null, null, null, true); ?> getAmountInclTaxes($_attributes); ?> @@ -211,13 +212,13 @@

    __('Special Price:') ?> - __('Excl. Tax:') ?> + helper('Mage_Tax_Helper_Data')->__('Excl. Tax:') ?> currency($_finalPrice+$_weeeTaxAmount,true,false) ?> - __('Incl. Tax:') ?> + helper('Mage_Tax_Helper_Data')->__('Incl. Tax:') ?> currency($_finalPriceInclTax+$_weeeTaxAmountInclTaxes,true,false) ?> @@ -227,7 +228,7 @@

    __('Special Price:') ?> - currency($_finalPrice+$_weeeTaxAmount,true,false) ?> + currency($_finalPrice+$_weeeTaxAmountInclTaxes,true,false) ?>

    @@ -243,7 +244,7 @@

    __('Special Price:') ?> - __('Excl. Tax:') ?> + helper('Mage_Tax_Helper_Data')->__('Excl. Tax:') ?> currency($_finalPrice+$_weeeTaxAmount,true,false) ?> @@ -256,7 +257,7 @@ ) - __('Incl. Tax:') ?> + helper('Mage_Tax_Helper_Data')->__('Incl. Tax:') ?> currency($_finalPriceInclTax+$_weeeTaxAmountInclTaxes,true,false) ?> @@ -273,7 +274,7 @@

    __('Special Price:') ?> - __('Excl. Tax:') ?> + helper('Mage_Tax_Helper_Data')->__('Excl. Tax:') ?> currency($_finalPrice+$_weeeTaxAmount,true,false) ?> @@ -303,7 +304,7 @@

    __('Special Price:') ?> - __('Excl. Tax:') ?> + helper('Mage_Tax_Helper_Data')->__('Excl. Tax:') ?> currency($_finalPrice,true,false) ?> @@ -332,7 +333,7 @@

    __('Special Price:') ?> - __('Excl. Tax:') ?> + helper('Mage_Tax_Helper_Data')->__('Excl. Tax:') ?> currency($_finalPrice,true,false) ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/price_msrp.phtml b/app/code/core/Mage/Catalog/view/frontend/product/price_msrp.phtml index 26dc4d8833b80..bb725886798a1 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/price_msrp.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/price_msrp.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_item.phtml b/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_item.phtml index 6568b92341511..e6222db00f043 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_item.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_item.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_noform.phtml b/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_noform.phtml index 929229520f85b..bface0a55155b 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_noform.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_noform.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_rss.phtml b/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_rss.phtml index ac14f4c123005..f0516b5cfe26a 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_rss.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/price_msrp_rss.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view.phtml index 580bf9b879c2b..c732dd6724757 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/additional.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/additional.phtml index eade95b3cb7be..ded93626f7112 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/additional.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/additional.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/addto.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/addto.phtml index 2e1e3b4197dc4..3cc816ca913a7 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/addto.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/addto.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/addtocart.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/addtocart.phtml index 9c3f4394996a6..747c7ea1957b7 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/addtocart.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/addtocart.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/attributes.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/attributes.phtml index 8332d84db511b..dd49710762ff4 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/attributes.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/attributes.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/description.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/description.phtml index dc388d3f68c9b..7b0f29a4c5b18 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/description.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/description.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/media.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/media.phtml index cd1c56a120614..e21f36a949e18 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/media.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/media.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/options.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/options.phtml index ab35faf6cbeec..67fddcdbe8de1 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/options.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/options.phtml @@ -20,9 +20,10 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ +/* @var $this Mage_Catalog_Block_Product_View_Options */ ?> decorateArray($this->getOptions()) ?> @@ -109,20 +110,20 @@ document.observe("dom:loaded", this.reloadPrice.bind(this)); }, reloadPrice : function(){ - price = new Number(); - oldPrice = new Number(); - config = this.config; - skipIds = []; - $$('.product-custom-option').each(function(element){ + var config = this.config; + var skipIds = []; + $$('body .product-custom-option').each(function(element){ var optionId = 0; element.name.sub(/[0-9]+/, function(match){ - optionId = match[0]; + optionId = parseInt(match[0], 10); }); - if (this.config[optionId]) { + if (config[optionId]) { + var configOptions = config[optionId]; + var curConfig = {price: 0}; if (element.type == 'checkbox' || element.type == 'radio') { if (element.checked) { - if (config[optionId][element.getValue()]['price']) { - price += parseFloat(config[optionId][element.getValue()]['price']); + if (typeof configOptions[element.getValue()] != 'undefined') { + curConfig = configOptions[element.getValue()]; } } } else if(element.hasClassName('datetime-picker') && !skipIds.include(optionId)) { @@ -133,35 +134,42 @@ } }); if (dateSelected) { - price += parseFloat(this.config[optionId]); + curConfig = configOptions; skipIds[optionId] = optionId; } } else if(element.type == 'select-one' || element.type == 'select-multiple') { - if (element.options) { + if ('options' in element) { $A(element.options).each(function(selectOption){ - try { - if (selectOption.selected) { - if (typeof(this.config[optionId][selectOption.value]['oldPrice']) !== undefined) { - price += parseFloat(this.config[optionId][selectOption.value]['price']); - oldPrice += parseFloat(this.config[optionId][selectOption.value]['oldPrice']); - } + if ('selected' in selectOption && selectOption.selected) { + if (typeof(configOptions[selectOption.value]) != 'undefined') { + curConfig = configOptions[selectOption.value]; } - } catch (e) {} + } }); } } else { if (element.getValue().strip() != '') { - price += parseFloat(this.config[optionId]); + curConfig = configOptions; } } + if(element.type == 'select-multiple' && ('options' in element)) { + $A(element.options).each(function(selectOption) { + if (('selected' in selectOption) && typeof(configOptions[selectOption.value]) != 'undefined') { + if (selectOption.selected) { + curConfig = configOptions[selectOption.value]; + } else { + curConfig = {price: 0}; + } + optionsPrice.addCustomPrices(optionId + '-' + selectOption.value, curConfig); + optionsPrice.reload(); + } + }); + } else { + optionsPrice.addCustomPrices(element.id || optionId, curConfig); + optionsPrice.reload(); + } } }); - try { - optionsPrice.changePrice('config', {'price': price, 'oldPrice': oldPrice, 'optionsPriceInclTax': price}); - optionsPrice.reload(); - } catch (e) { - - } } } function validateOptionsCallback(elmId, result){ diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/options/js.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/options/js.phtml index 19695b1e1b1eb..85afcffbe0a50 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/options/js.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/options/js.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/date.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/date.phtml index 1e46359d2ad23..9796705ddfcb4 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/date.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/date.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/default.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/default.phtml index 3754c7a5a7588..70958aaf2f476 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/default.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/default.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/file.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/file.phtml index 91019b28556d6..9b9f79255e38a 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/file.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/file.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/select.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/select.phtml index 8256d6f8afe49..0f092f81b2d0a 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/select.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/select.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/text.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/text.phtml index e580eb108a83d..36d28358f8199 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/text.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/options/type/text.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/options/wrapper.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/options/wrapper.phtml index 7ed615aeeb418..5a2af78ae8c0b 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/options/wrapper.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/options/wrapper.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/options/wrapper/bottom.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/options/wrapper/bottom.phtml index e60da29a9126c..9007511245059 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/options/wrapper/bottom.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/options/wrapper/bottom.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/price_clone.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/price_clone.phtml index 1f22129c7b6f7..b77641d050a8d 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/price_clone.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/price_clone.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/tierprices.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/tierprices.phtml index 9c49868864c97..a5b80e96cdfea 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/tierprices.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/tierprices.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/type/default.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/type/default.phtml index ab82c05408c20..508f32f44f278 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/type/default.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/type/default.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/type/grouped.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/type/grouped.phtml index afb2aeccc717a..2460e242a2ee6 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/type/grouped.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/type/grouped.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Catalog/view/frontend/product/view/type/options/configurable.phtml b/app/code/core/Mage/Catalog/view/frontend/product/view/type/options/configurable.phtml index dac89a053f8e6..7162053b47782 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/view/type/options/configurable.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/view/type/options/configurable.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/widget/link/link_block.phtml b/app/code/core/Mage/Catalog/view/frontend/product/widget/link/link_block.phtml index d8a1ffaad3f67..c4b133b7464ef 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/widget/link/link_block.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/widget/link/link_block.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/widget/link/link_inline.phtml b/app/code/core/Mage/Catalog/view/frontend/product/widget/link/link_inline.phtml index 1875524734b4d..548a71b071cbc 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/widget/link/link_inline.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/widget/link/link_inline.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/widget/new/column/new_default_list.phtml b/app/code/core/Mage/Catalog/view/frontend/product/widget/new/column/new_default_list.phtml index 83f44872d0a59..10fd6a5e7238d 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/widget/new/column/new_default_list.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/widget/new/column/new_default_list.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/widget/new/column/new_images_list.phtml b/app/code/core/Mage/Catalog/view/frontend/product/widget/new/column/new_images_list.phtml index 806ddc7470524..da0e0d5053ed6 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/widget/new/column/new_images_list.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/widget/new/column/new_images_list.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/widget/new/column/new_names_list.phtml b/app/code/core/Mage/Catalog/view/frontend/product/widget/new/column/new_names_list.phtml index e3d6af5fae8db..b5eb610c2ff3a 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/widget/new/column/new_names_list.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/widget/new/column/new_names_list.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/widget/new/content/new_grid.phtml b/app/code/core/Mage/Catalog/view/frontend/product/widget/new/content/new_grid.phtml index 1adc72c3504d2..4770cf8da447b 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/widget/new/content/new_grid.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/widget/new/content/new_grid.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/product/widget/new/content/new_list.phtml b/app/code/core/Mage/Catalog/view/frontend/product/widget/new/content/new_list.phtml index ed26427e30b51..8f62d3f9903d6 100644 --- a/app/code/core/Mage/Catalog/view/frontend/product/widget/new/content/new_list.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/product/widget/new/content/new_list.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/rss/product/price.phtml b/app/code/core/Mage/Catalog/view/frontend/rss/product/price.phtml index 3a8e28d1e8733..3c2cd2855c2e4 100644 --- a/app/code/core/Mage/Catalog/view/frontend/rss/product/price.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/rss/product/price.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/seo/sitemap.phtml b/app/code/core/Mage/Catalog/view/frontend/seo/sitemap.phtml index 9fe1bf3a0ae29..cd1af1042c9d8 100644 --- a/app/code/core/Mage/Catalog/view/frontend/seo/sitemap.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/seo/sitemap.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -33,7 +33,7 @@ getSize()): ?>

    diff --git a/app/code/core/Mage/Catalog/view/frontend/seo/sitemap/container.phtml b/app/code/core/Mage/Catalog/view/frontend/seo/sitemap/container.phtml index a9464a90823aa..871a26fb2f572 100644 --- a/app/code/core/Mage/Catalog/view/frontend/seo/sitemap/container.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/seo/sitemap/container.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/seo/tree.phtml b/app/code/core/Mage/Catalog/view/frontend/seo/tree.phtml index d95ec13e25116..91924777dbe5d 100644 --- a/app/code/core/Mage/Catalog/view/frontend/seo/tree.phtml +++ b/app/code/core/Mage/Catalog/view/frontend/seo/tree.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Catalog/view/frontend/widgets.css b/app/code/core/Mage/Catalog/view/frontend/widgets.css index 713fade8ced9f..3a8bf84e03703 100644 --- a/app/code/core/Mage/Catalog/view/frontend/widgets.css +++ b/app/code/core/Mage/Catalog/view/frontend/widgets.css @@ -19,7 +19,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Block/Adminhtml/Form/Field/Customergroup.php b/app/code/core/Mage/CatalogInventory/Block/Adminhtml/Form/Field/Customergroup.php index 13a67326b3c4c..7fa9ef4414dda 100644 --- a/app/code/core/Mage/CatalogInventory/Block/Adminhtml/Form/Field/Customergroup.php +++ b/app/code/core/Mage/CatalogInventory/Block/Adminhtml/Form/Field/Customergroup.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php b/app/code/core/Mage/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php index 988e1c25e037d..6bc28ac25303a 100644 --- a/app/code/core/Mage/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php +++ b/app/code/core/Mage/CatalogInventory/Block/Adminhtml/Form/Field/Minsaleqty.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Block/Qtyincrements.php b/app/code/core/Mage/CatalogInventory/Block/Qtyincrements.php index 30ae4b9ba8b84..9b31c74fb9e2b 100644 --- a/app/code/core/Mage/CatalogInventory/Block/Qtyincrements.php +++ b/app/code/core/Mage/CatalogInventory/Block/Qtyincrements.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Block/Stockqty/Abstract.php b/app/code/core/Mage/CatalogInventory/Block/Stockqty/Abstract.php index 8eb3caa7eebb8..92c2b2ce7feae 100644 --- a/app/code/core/Mage/CatalogInventory/Block/Stockqty/Abstract.php +++ b/app/code/core/Mage/CatalogInventory/Block/Stockqty/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Block/Stockqty/Composite.php b/app/code/core/Mage/CatalogInventory/Block/Stockqty/Composite.php index fa27818018b10..7764cfa676ba5 100644 --- a/app/code/core/Mage/CatalogInventory/Block/Stockqty/Composite.php +++ b/app/code/core/Mage/CatalogInventory/Block/Stockqty/Composite.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Block/Stockqty/Default.php b/app/code/core/Mage/CatalogInventory/Block/Stockqty/Default.php index a49c18982271a..693b75e9f02e2 100644 --- a/app/code/core/Mage/CatalogInventory/Block/Stockqty/Default.php +++ b/app/code/core/Mage/CatalogInventory/Block/Stockqty/Default.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Block/Stockqty/Type/Configurable.php b/app/code/core/Mage/CatalogInventory/Block/Stockqty/Type/Configurable.php index a03000a891be4..32030fc96f2a7 100644 --- a/app/code/core/Mage/CatalogInventory/Block/Stockqty/Type/Configurable.php +++ b/app/code/core/Mage/CatalogInventory/Block/Stockqty/Type/Configurable.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Block/Stockqty/Type/Grouped.php b/app/code/core/Mage/CatalogInventory/Block/Stockqty/Type/Grouped.php index f1f14a1efa9f4..1b65ed0ef8cbf 100644 --- a/app/code/core/Mage/CatalogInventory/Block/Stockqty/Type/Grouped.php +++ b/app/code/core/Mage/CatalogInventory/Block/Stockqty/Type/Grouped.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Helper/Data.php b/app/code/core/Mage/CatalogInventory/Helper/Data.php index de1f66b7f6313..e9a6f77a1e61d 100644 --- a/app/code/core/Mage/CatalogInventory/Helper/Data.php +++ b/app/code/core/Mage/CatalogInventory/Helper/Data.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Helper/Minsaleqty.php b/app/code/core/Mage/CatalogInventory/Helper/Minsaleqty.php index 4f4d34477dff3..18de40959e1ed 100644 --- a/app/code/core/Mage/CatalogInventory/Helper/Minsaleqty.php +++ b/app/code/core/Mage/CatalogInventory/Helper/Minsaleqty.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Model/Indexer/Stock.php b/app/code/core/Mage/CatalogInventory/Model/Indexer/Stock.php index b369a6876ecad..e23df7736a0db 100644 --- a/app/code/core/Mage/CatalogInventory/Model/Indexer/Stock.php +++ b/app/code/core/Mage/CatalogInventory/Model/Indexer/Stock.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Model/Observer.php b/app/code/core/Mage/CatalogInventory/Model/Observer.php index fd2a984f9f006..1d646c5134ec5 100644 --- a/app/code/core/Mage/CatalogInventory/Model/Observer.php +++ b/app/code/core/Mage/CatalogInventory/Model/Observer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock.php b/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock.php index cfd8821ba42bb..d6ee2e5f823fd 100755 --- a/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock.php +++ b/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Configurable.php b/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Configurable.php index c3876e8fc83d4..53b33ca3bbc9d 100755 --- a/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Configurable.php +++ b/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Configurable.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Default.php b/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Default.php index 2b468586db941..1bb04670cb68c 100755 --- a/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Default.php +++ b/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Default.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Grouped.php b/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Grouped.php index dbd0d3d32bce9..86a1e1b7f8d0b 100755 --- a/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Grouped.php +++ b/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Grouped.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Interface.php b/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Interface.php index 8447e16d0d71e..47a2bb86df8dd 100755 --- a/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Interface.php +++ b/app/code/core/Mage/CatalogInventory/Model/Resource/Indexer/Stock/Interface.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Model/Resource/Stock.php b/app/code/core/Mage/CatalogInventory/Model/Resource/Stock.php index 8a3b33d9806fa..9eff95199e5c2 100755 --- a/app/code/core/Mage/CatalogInventory/Model/Resource/Stock.php +++ b/app/code/core/Mage/CatalogInventory/Model/Resource/Stock.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Model/Resource/Stock/Item.php b/app/code/core/Mage/CatalogInventory/Model/Resource/Stock/Item.php index 53d03f519084e..137ced63c98fd 100755 --- a/app/code/core/Mage/CatalogInventory/Model/Resource/Stock/Item.php +++ b/app/code/core/Mage/CatalogInventory/Model/Resource/Stock/Item.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Model/Resource/Stock/Item/Collection.php b/app/code/core/Mage/CatalogInventory/Model/Resource/Stock/Item/Collection.php index ef93d8b338cca..5c1f8704aa7e0 100755 --- a/app/code/core/Mage/CatalogInventory/Model/Resource/Stock/Item/Collection.php +++ b/app/code/core/Mage/CatalogInventory/Model/Resource/Stock/Item/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Model/Resource/Stock/Status.php b/app/code/core/Mage/CatalogInventory/Model/Resource/Stock/Status.php index e3a3d28395ac9..6959996524652 100755 --- a/app/code/core/Mage/CatalogInventory/Model/Resource/Stock/Status.php +++ b/app/code/core/Mage/CatalogInventory/Model/Resource/Stock/Status.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Model/Source/Backorders.php b/app/code/core/Mage/CatalogInventory/Model/Source/Backorders.php index 320d1f4d14532..1a960597ed6e9 100644 --- a/app/code/core/Mage/CatalogInventory/Model/Source/Backorders.php +++ b/app/code/core/Mage/CatalogInventory/Model/Source/Backorders.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Model/Source/Stock.php b/app/code/core/Mage/CatalogInventory/Model/Source/Stock.php index 38532358978f7..55b7959708d5b 100644 --- a/app/code/core/Mage/CatalogInventory/Model/Source/Stock.php +++ b/app/code/core/Mage/CatalogInventory/Model/Source/Stock.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Model/Stock.php b/app/code/core/Mage/CatalogInventory/Model/Stock.php index a99862b0ca0c5..8789df2ab8f9d 100644 --- a/app/code/core/Mage/CatalogInventory/Model/Stock.php +++ b/app/code/core/Mage/CatalogInventory/Model/Stock.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Model/Stock/Item.php b/app/code/core/Mage/CatalogInventory/Model/Stock/Item.php index 3a5b450cfea64..6efd72ce0ee02 100644 --- a/app/code/core/Mage/CatalogInventory/Model/Stock/Item.php +++ b/app/code/core/Mage/CatalogInventory/Model/Stock/Item.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -269,10 +269,8 @@ public function assignProduct(Mage_Catalog_Model_Product $product) */ public function getMinQty() { - if ($this->getUseConfigMinQty()) { - return (float) Mage::getStoreConfig(self::XML_PATH_MIN_QTY); - } - return (float) $this->getData('min_qty'); + return (float)($this->getUseConfigMinQty() ? Mage::getStoreConfig(self::XML_PATH_MIN_QTY) + : $this->getData('min_qty')); } /** @@ -304,40 +302,37 @@ public function setCustomerGroupId($value) */ public function getMinSaleQty() { - if ($this->getCustomerGroupId()) { - $customerGroupId = $this->getCustomerGroupId(); - } else if (Mage::app()->getStore()->isAdmin()) { - $customerGroupId = Mage_Customer_Model_Group::CUST_GROUP_ALL; - } else { - $customerGroupId = Mage::getSingleton('Mage_Customer_Model_Session')->getCustomerGroupId(); + $customerGroupId = $this->getCustomerGroupId(); + if (!$customerGroupId) { + $customerGroupId = Mage::app()->getStore()->isAdmin() + ? Mage_Customer_Model_Group::CUST_GROUP_ALL + : Mage::getSingleton('Mage_Customer_Model_Session')->getCustomerGroupId(); } - if (!array_key_exists($customerGroupId, $this->_minSaleQtyCache)) { - if ($this->getUseConfigMinSaleQty()) { - $minSaleQty = Mage::helper('Mage_CatalogInventory_Helper_Minsaleqty')->getConfigValue($customerGroupId); - } else { - $minSaleQty = $this->getData('min_sale_qty'); - } - $minSaleQty = (!empty($minSaleQty) ? (float)$minSaleQty : null); - $this->_minSaleQtyCache[$customerGroupId] = $minSaleQty; + + if (!isset($this->_minSaleQtyCache[$customerGroupId])) { + $minSaleQty = $this->getUseConfigMinSaleQty() + ? Mage::helper('Mage_CatalogInventory_Helper_Minsaleqty')->getConfigValue($customerGroupId) + : $this->getData('min_sale_qty'); + + $this->_minSaleQtyCache[$customerGroupId] = empty($minSaleQty) ? 0 : (float)$minSaleQty; } - return $this->_minSaleQtyCache[$customerGroupId]; + + return $this->_minSaleQtyCache[$customerGroupId] ? $this->_minSaleQtyCache[$customerGroupId] : null; } /** - * Retrieve Maximum Qty Allowed in Shopping Cart data wraper + * Retrieve Maximum Qty Allowed in Shopping Cart data wrapper * * @return float */ public function getMaxSaleQty() { - if ($this->getUseConfigMaxSaleQty()) { - return (float) Mage::getStoreConfig(self::XML_PATH_MAX_SALE_QTY); - } - return (float) $this->getData('max_sale_qty'); + return (float)($this->getUseConfigMaxSaleQty() ? Mage::getStoreConfig(self::XML_PATH_MAX_SALE_QTY) + : $this->getData('max_sale_qty')); } /** - * Retrieve Notify for Quantity Below data wraper + * Retrieve Notify for Quantity Below data wrapper * * @return float */ @@ -462,49 +457,41 @@ public function checkQty($qty) } /** - * Returns suggested qty increments for the item based on requested qty + * Returns suggested qty that satisfies qty increments and minQty/maxQty/minSaleQty/maxSaleQty conditions + * or original qty if such value does not exist * * @param int|float $qty * @return int|float */ public function suggestQty($qty) { - $origQty = $qty; - $qty = (float) $qty; - - // Maybe some wrong value - if ($qty <= 0) { - return $origQty; - } - // We do not manage stock - if (!$this->getManageStock()) { - return $origQty; + if ($qty <= 0 || !$this->getManageStock()) { + return $qty; } - // No qty increments enabled - $qtyIncrements = $this->getQtyIncrements(); - $qtyIncrements = (int) $qtyIncrements; // Currently only integer increments supported - if (!$qtyIncrements || ($qtyIncrements == 1)) { - return $origQty; + $qtyIncrements = (int)$this->getQtyIncrements(); // Currently only integer increments supported + if ($qtyIncrements < 2) { + return $qty; } - // Fix qty to be integer if needed - if (!$this->getIsQtyDecimal()) { - $qty = (int) $qty; - } + $minQty = max($this->getMinSaleQty(), $qtyIncrements); + $divisibleMin = ceil($minQty / $qtyIncrements) * $qtyIncrements; + + $maxQty = min($this->getQty() - $this->getMinQty(), $this->getMaxSaleQty()); + $divisibleMax = floor($maxQty / $qtyIncrements) * $qtyIncrements; - // Maybe qty is evenly divided - no fixture needed - if ($qty % $qtyIncrements == 0) { + if ($qty < $minQty || $qty > $maxQty || $divisibleMin > $divisibleMax) { + // Do not perform rounding for qty that does not satisfy min/max conditions to not confuse customer return $qty; } - $qty = round($qty / $qtyIncrements) * $qtyIncrements; - if (!$qty) { - // Value was closer to zero, so suggest first lowest minimal increment - $qty = $qtyIncrements; - } - return $qty; + // Suggest value closest to given qty + $closestDivisibleLeft = floor($qty / $qtyIncrements) * $qtyIncrements; + $closestDivisibleRight = $closestDivisibleLeft + $qtyIncrements; + $acceptableLeft = min(max($divisibleMin, $closestDivisibleLeft), $divisibleMax); + $acceptableRight = max(min($divisibleMax, $closestDivisibleRight), $divisibleMin); + return abs($acceptableLeft - $qty) < abs($acceptableRight - $qty) ? $acceptableLeft : $acceptableRight; } /** @@ -523,9 +510,6 @@ public function checkQuoteItemQty($qty, $summaryQty, $origQty = 0) $result = new Varien_Object(); $result->setHasError(false); - /** @var $_helper Mage_CatalogInventory_Helper_Data */ - $_helper = Mage::helper('Mage_CatalogInventory_Helper_Data'); - if (!is_numeric($qty)) { $qty = Mage::app()->getLocale()->getNumber($qty); } @@ -551,22 +535,22 @@ public function checkQuoteItemQty($qty, $summaryQty, $origQty = 0) $result->setOrigQty($origQty); } - if ($this->getMinSaleQty() && ($qty) < $this->getMinSaleQty()) { + if ($this->getMinSaleQty() && $qty < $this->getMinSaleQty()) { $result->setHasError(true) ->setMessage( - $_helper->__('The minimum quantity allowed for purchase is %s.', $this->getMinSaleQty() * 1) + Mage::helper('Mage_CatalogInventory_Helper_Data')->__('The minimum quantity allowed for purchase is %s.', $this->getMinSaleQty() * 1) ) - ->setQuoteMessage($_helper->__('Some of the products cannot be ordered in requested quantity.')) + ->setQuoteMessage(Mage::helper('Mage_CatalogInventory_Helper_Data')->__('Some of the products cannot be ordered in requested quantity.')) ->setQuoteMessageIndex('qty'); return $result; } - if ($this->getMaxSaleQty() && ($qty) > $this->getMaxSaleQty()) { + if ($this->getMaxSaleQty() && $qty > $this->getMaxSaleQty()) { $result->setHasError(true) ->setMessage( - $_helper->__('The maximum quantity allowed for purchase is %s.', $this->getMaxSaleQty() * 1) + Mage::helper('Mage_CatalogInventory_Helper_Data')->__('The maximum quantity allowed for purchase is %s.', $this->getMaxSaleQty() * 1) ) - ->setQuoteMessage($_helper->__('Some of the products cannot be ordered in requested quantity.')) + ->setQuoteMessage(Mage::helper('Mage_CatalogInventory_Helper_Data')->__('Some of the products cannot be ordered in requested quantity.')) ->setQuoteMessageIndex('qty'); return $result; } @@ -583,15 +567,15 @@ public function checkQuoteItemQty($qty, $summaryQty, $origQty = 0) if (!$this->getIsInStock()) { $result->setHasError(true) - ->setMessage($_helper->__('This product is currently out of stock.')) - ->setQuoteMessage($_helper->__('Some of the products are currently out of stock')) + ->setMessage(Mage::helper('Mage_CatalogInventory_Helper_Data')->__('This product is currently out of stock.')) + ->setQuoteMessage(Mage::helper('Mage_CatalogInventory_Helper_Data')->__('Some of the products are currently out of stock')) ->setQuoteMessageIndex('stock'); $result->setItemUseOldQty(true); return $result; } if (!$this->checkQty($summaryQty) || !$this->checkQty($qty)) { - $message = $_helper->__('The requested quantity for "%s" is not available.', $this->getProductName()); + $message = Mage::helper('Mage_CatalogInventory_Helper_Data')->__('The requested quantity for "%s" is not available.', $this->getProductName()); $result->setHasError(true) ->setMessage($message) ->setQuoteMessage($message) @@ -621,16 +605,16 @@ public function checkQuoteItemQty($qty, $summaryQty, $origQty = 0) if ($this->getBackorders() == Mage_CatalogInventory_Model_Stock::BACKORDERS_YES_NOTIFY) { if (!$this->getIsChildItem()) { $result->setMessage( - $_helper->__('This product is not available in the requested quantity. %s of the items will be backordered.', ($backorderQty * 1)) + Mage::helper('Mage_CatalogInventory_Helper_Data')->__('This product is not available in the requested quantity. %s of the items will be backordered.', ($backorderQty * 1)) ); } else { $result->setMessage( - $_helper->__('"%s" is not available in the requested quantity. %s of the items will be backordered.', $this->getProductName(), ($backorderQty * 1)) + Mage::helper('Mage_CatalogInventory_Helper_Data')->__('"%s" is not available in the requested quantity. %s of the items will be backordered.', $this->getProductName(), ($backorderQty * 1)) ); } } elseif (Mage::app()->getStore()->isAdmin()) { $result->setMessage( - $_helper->__('The requested quantity for "%s" is not available.', $this->getProductName()) + Mage::helper('Mage_CatalogInventory_Helper_Data')->__('The requested quantity for "%s" is not available.', $this->getProductName()) ); } } @@ -786,13 +770,14 @@ public function verifyNotification($qty = null) } /** - * Process stock status index on item after save + * Reindex CatalogInventory save event * * @return Mage_CatalogInventory_Model_Stock_Item */ protected function _afterSave() { parent::_afterSave(); + /** @var $indexer Mage_Index_Model_Indexer */ $indexer = Mage::getSingleton('Mage_Index_Model_Indexer'); if ($this->_processIndexEvents) { diff --git a/app/code/core/Mage/CatalogInventory/Model/Stock/Item/Api.php b/app/code/core/Mage/CatalogInventory/Model/Stock/Item/Api.php index e18f1704b6ef0..ef5fd81930024 100644 --- a/app/code/core/Mage/CatalogInventory/Model/Stock/Item/Api.php +++ b/app/code/core/Mage/CatalogInventory/Model/Stock/Item/Api.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Model/Stock/Item/Api/V2.php b/app/code/core/Mage/CatalogInventory/Model/Stock/Item/Api/V2.php index 849ff33765297..f4ecc69e9b990 100644 --- a/app/code/core/Mage/CatalogInventory/Model/Stock/Item/Api/V2.php +++ b/app/code/core/Mage/CatalogInventory/Model/Stock/Item/Api/V2.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Model/Stock/Status.php b/app/code/core/Mage/CatalogInventory/Model/Stock/Status.php index a17abf6dc1a7d..65f85cfb05c4e 100644 --- a/app/code/core/Mage/CatalogInventory/Model/Stock/Status.php +++ b/app/code/core/Mage/CatalogInventory/Model/Stock/Status.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Model/System/Config/Backend/Minqty.php b/app/code/core/Mage/CatalogInventory/Model/System/Config/Backend/Minqty.php index e4c5b0e3c2388..74ae128db54f8 100644 --- a/app/code/core/Mage/CatalogInventory/Model/System/Config/Backend/Minqty.php +++ b/app/code/core/Mage/CatalogInventory/Model/System/Config/Backend/Minqty.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Model/System/Config/Backend/Minsaleqty.php b/app/code/core/Mage/CatalogInventory/Model/System/Config/Backend/Minsaleqty.php index b5b6a3092e2fc..3564060aeb157 100644 --- a/app/code/core/Mage/CatalogInventory/Model/System/Config/Backend/Minsaleqty.php +++ b/app/code/core/Mage/CatalogInventory/Model/System/Config/Backend/Minsaleqty.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/Model/System/Config/Backend/Qtyincrements.php b/app/code/core/Mage/CatalogInventory/Model/System/Config/Backend/Qtyincrements.php index e4609848a77c9..86373a28d3aa8 100644 --- a/app/code/core/Mage/CatalogInventory/Model/System/Config/Backend/Qtyincrements.php +++ b/app/code/core/Mage/CatalogInventory/Model/System/Config/Backend/Qtyincrements.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/etc/adminhtml.xml b/app/code/core/Mage/CatalogInventory/etc/adminhtml.xml index 4e9e10ccb1b9d..e4da40f01f7c6 100644 --- a/app/code/core/Mage/CatalogInventory/etc/adminhtml.xml +++ b/app/code/core/Mage/CatalogInventory/etc/adminhtml.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/CatalogInventory/etc/api.xml b/app/code/core/Mage/CatalogInventory/etc/api.xml index 645bbb1fbf2a3..cbd45a47d6645 100644 --- a/app/code/core/Mage/CatalogInventory/etc/api.xml +++ b/app/code/core/Mage/CatalogInventory/etc/api.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/CatalogInventory/etc/config.xml b/app/code/core/Mage/CatalogInventory/etc/config.xml index 6f0b4a7724f2a..846e3d9d679a0 100644 --- a/app/code/core/Mage/CatalogInventory/etc/config.xml +++ b/app/code/core/Mage/CatalogInventory/etc/config.xml @@ -21,14 +21,14 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - 1.6.0.0 + 1.6.0.0.1 @@ -250,6 +250,16 @@ + + + + + Mage_CatalogInventory_Model_Observer + reindexProductsMassAction + + + + diff --git a/app/code/core/Mage/CatalogInventory/etc/system.xml b/app/code/core/Mage/CatalogInventory/etc/system.xml index 61e32a1889ca5..080c5eae3826b 100644 --- a/app/code/core/Mage/CatalogInventory/etc/system.xml +++ b/app/code/core/Mage/CatalogInventory/etc/system.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/install-1.6.0.0.php b/app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/install-1.6.0.0.php index c64012236d7f4..117d5423ad713 100644 --- a/app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/install-1.6.0.0.php +++ b/app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/install-1.6.0.0.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogInventory - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-1.6.0.0-1.6.0.0.1.php b/app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-1.6.0.0-1.6.0.0.1.php new file mode 100644 index 0000000000000..c7ef341fed1fe --- /dev/null +++ b/app/code/core/Mage/CatalogInventory/sql/cataloginventory_setup/mysql4-upgrade-1.6.0.0-1.6.0.0.1.php @@ -0,0 +1,34 @@ +getConnection(); +$connection->changeTableEngine( + $installer->getTable('cataloginventory_stock_status_tmp'), + Varien_Db_Adapter_Pdo_Mysql::ENGINE_MEMORY +); diff --git a/app/code/core/Mage/CatalogInventory/view/frontend/layout.xml b/app/code/core/Mage/CatalogInventory/view/frontend/layout.xml index 97da2064e945e..2905be1db6261 100644 --- a/app/code/core/Mage/CatalogInventory/view/frontend/layout.xml +++ b/app/code/core/Mage/CatalogInventory/view/frontend/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/view/frontend/qtyincrements.phtml b/app/code/core/Mage/CatalogInventory/view/frontend/qtyincrements.phtml index 1934a1f975903..1b56042f7b675 100644 --- a/app/code/core/Mage/CatalogInventory/view/frontend/qtyincrements.phtml +++ b/app/code/core/Mage/CatalogInventory/view/frontend/qtyincrements.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/view/frontend/stockqty/composite.phtml b/app/code/core/Mage/CatalogInventory/view/frontend/stockqty/composite.phtml index dee5cb1078d68..2de516c264017 100644 --- a/app/code/core/Mage/CatalogInventory/view/frontend/stockqty/composite.phtml +++ b/app/code/core/Mage/CatalogInventory/view/frontend/stockqty/composite.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/CatalogInventory/view/frontend/stockqty/default.phtml b/app/code/core/Mage/CatalogInventory/view/frontend/stockqty/default.phtml index ba0a3c2d3f8d1..bf6f4977c4a46 100644 --- a/app/code/core/Mage/CatalogInventory/view/frontend/stockqty/default.phtml +++ b/app/code/core/Mage/CatalogInventory/view/frontend/stockqty/default.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/CatalogRule/Helper/Data.php b/app/code/core/Mage/CatalogRule/Helper/Data.php index f3237e51ebebe..9521b57dd1aa2 100644 --- a/app/code/core/Mage/CatalogRule/Helper/Data.php +++ b/app/code/core/Mage/CatalogRule/Helper/Data.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogRule - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogRule/Model/Observer.php b/app/code/core/Mage/CatalogRule/Model/Observer.php index 06a04d687aa65..545d6d85527e0 100644 --- a/app/code/core/Mage/CatalogRule/Model/Observer.php +++ b/app/code/core/Mage/CatalogRule/Model/Observer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogRule - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -29,6 +29,12 @@ */ class Mage_CatalogRule_Model_Observer { + /** + * Store calculated catalog rules prices for products + * Prices collected per website, customer group, date and product + * + * @var array + */ protected $_rulePrices = array(); /** @@ -50,14 +56,10 @@ public function applyAllRulesOnProduct($observer) ->addFieldToFilter('is_active', 1); foreach ($rules as $rule) { - if (!is_array($rule->getWebsiteIds())) { - $ruleWebsiteIds = (array)explode(',', $rule->getWebsiteIds()); - } else { - $ruleWebsiteIds = $rule->getWebsiteIds(); - } - $websiteIds = array_intersect($productWebsiteIds, $ruleWebsiteIds); + $websiteIds = array_intersect($productWebsiteIds, $rule->getWebsiteIds()); $rule->applyToProduct($product, $websiteIds); } + return $this; } @@ -66,6 +68,7 @@ public function applyAllRulesOnProduct($observer) * Handle cataolg_product_import_after event * * @param Varien_Event_Observer $observer + * * @return Mage_CatalogRule_Model_Observer */ public function applyAllRules($observer) @@ -73,12 +76,15 @@ public function applyAllRules($observer) $resource = Mage::getResourceSingleton('Mage_CatalogRule_Model_Resource_Rule'); $resource->applyAllRulesForDateRange($resource->formatDate(mktime(0,0,0))); Mage::app()->removeCache('catalog_rules_dirty'); + return $this; } /** * Apply catalog price rules to product on frontend * + * @param Varien_Event_Observer $observer + * * @return Mage_CatalogRule_Model_Observer */ public function processFrontFinalPrice($observer) @@ -123,6 +129,8 @@ public function processFrontFinalPrice($observer) /** * Apply catalog price rules to product in admin * + * @param Varien_Event_Observer $observer + * * @return Mage_CatalogRule_Model_Observer */ public function processAdminFinalPrice($observer) @@ -157,6 +165,7 @@ public function processAdminFinalPrice($observer) $product->setFinalPrice($finalPrice); } } + return $this; } @@ -164,6 +173,7 @@ public function processAdminFinalPrice($observer) * Calculate price using catalog price rules of configurable product * * @param Varien_Event_Observer $observer + * * @return Mage_CatalogRule_Model_Observer */ public function catalogProductTypeConfigurablePrice(Varien_Event_Observer $observer) @@ -178,6 +188,7 @@ public function catalogProductTypeConfigurablePrice(Varien_Event_Observer $obser $product->setConfigurablePrice($productPriceRule); } } + return $this; } @@ -188,14 +199,19 @@ public function catalogProductTypeConfigurablePrice(Varien_Event_Observer $obser * we should generate data for interval -1 day ... +1 day * * @param Varien_Event_Observer $observer + * * @return Mage_CatalogRule_Model_Observer */ public function dailyCatalogUpdate($observer) { Mage::getResourceSingleton('Mage_CatalogRule_Model_Resource_Rule')->applyAllRulesForDateRange(); + return $this; } + /** + * Clean out calculated catalog rule prices for products + */ public function flushPriceCache() { $this->_rulePrices = array(); @@ -215,7 +231,6 @@ public function prepareCatalogProductPriceIndexTable(Varien_Event_Observer $obse $entityId = $observer->getEvent()->getEntityId(); $customerGroupId = $observer->getEvent()->getCustomerGroupId(); $websiteId = $observer->getEvent()->getWebsiteId(); - $websiteDate = $observer->getEvent()->getWebsiteDate(); $updateFields = $observer->getEvent()->getUpdateFields(); @@ -231,6 +246,7 @@ public function prepareCatalogProductPriceIndexTable(Varien_Event_Observer $obse * If rules were found they will be set to inactive and notice will be add to admin session * * @param string $attributeCode + * * @return Mage_CatalogRule_Model_Observer */ protected function _checkCatalogRulesAvailability($attributeCode) @@ -263,6 +279,7 @@ protected function _checkCatalogRulesAvailability($attributeCode) * Remove catalog attribute condition by attribute code from rule conditions * * @param Mage_CatalogRule_Model_Rule_Condition_Combine $combine + * * @param string $attributeCode */ protected function _removeAttributeFromConditions($combine, $attributeCode) @@ -272,7 +289,7 @@ protected function _removeAttributeFromConditions($combine, $attributeCode) if ($condition instanceof Mage_CatalogRule_Model_Rule_Condition_Combine) { $this->_removeAttributeFromConditions($condition, $attributeCode); } - if ($condition instanceof Mage_CatalogRule_Model_Rule_Condition_Product) { + if ($condition instanceof Mage_Rule_Model_Condition_Product_Abstract) { if ($condition->getAttribute() == $attributeCode) { unset($conditions[$conditionId]); } @@ -285,6 +302,7 @@ protected function _removeAttributeFromConditions($combine, $attributeCode) * After save attribute if it is not used for promo rules already check rules for containing this attribute * * @param Varien_Event_Observer $observer + * * @return Mage_CatalogRule_Model_Observer */ public function catalogAttributeSaveAfter(Varien_Event_Observer $observer) diff --git a/app/code/core/Mage/CatalogRule/Model/Resource/Rule.php b/app/code/core/Mage/CatalogRule/Model/Resource/Rule.php index 0e131c2ae615a..22db5c346072e 100755 --- a/app/code/core/Mage/CatalogRule/Model/Resource/Rule.php +++ b/app/code/core/Mage/CatalogRule/Model/Resource/Rule.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogRule - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -32,13 +32,33 @@ * @package Mage_CatalogRule * @author Magento Core Team */ -class Mage_CatalogRule_Model_Resource_Rule extends Mage_Core_Model_Resource_Db_Abstract +class Mage_CatalogRule_Model_Resource_Rule extends Mage_Rule_Model_Resource_Abstract { + /** + * Store number of seconds in a day + */ const SECONDS_IN_DAY = 86400; /** - * Initialize main table and table id field + * Store associated with rule entities information map * + * @var array + */ + protected $_associatedEntitiesMap = array( + 'website' => array( + 'associations_table' => 'catalogrule_website', + 'rule_id_field' => 'rule_id', + 'entity_id_field' => 'website_id' + ), + 'customer_group' => array( + 'associations_table' => 'catalogrule_customer_group', + 'rule_id_field' => 'rule_id', + 'entity_id_field' => 'customer_group_id' + ) + ); + + /** + * Initialize main table and table id field */ protected function _construct() { @@ -46,43 +66,63 @@ protected function _construct() } /** - * Prepare object data for saving + * Add customer group ids and website ids to rule data after load * * @param Mage_Core_Model_Abstract $object + * + * @return Mage_CatalogRule_Model_Resource_Rule */ - public function _beforeSave(Mage_Core_Model_Abstract $object) + protected function _afterLoad(Mage_Core_Model_Abstract $object) { - if (!$object->getFromDate()) { - $date = Mage::app()->getLocale()->date(); - $date->setHour(0) - ->setMinute(0) - ->setSecond(0); - $object->setFromDate($date); - } - if ($object->getFromDate() instanceof Zend_Date) { - $object->setFromDate($object->getFromDate()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT)); - } + $object->setData('customer_group_ids', (array)$this->getCustomerGroupIds($object->getId())); + $object->setData('website_ids', (array)$this->getWebsiteIds($object->getId())); - if (!$object->getToDate()) { - $object->setToDate(new Zend_Db_Expr('NULL')); - } else { - if ($object->getToDate() instanceof Zend_Date) { - $object->setToDate($object->getToDate()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT)); + return parent::_afterLoad($object); + } + + /** + * Bind catalog rule to customer group(s) and website(s). + * Update products which are matched for rule. + * + * @param Mage_Core_Model_Abstract $object + * + * @return Mage_CatalogRule_Model_Resource_Rule + */ + protected function _afterSave(Mage_Core_Model_Abstract $object) + { + if ($object->hasWebsiteIds()) { + $websiteIds = $object->getWebsiteIds(); + if (!is_array($websiteIds)) { + $websiteIds = explode(',', (string)$websiteIds); + } + $this->bindRuleToEntity($object->getId(), $websiteIds, 'website'); + } + + if ($object->hasCustomerGroupIds()) { + $customerGroupIds = $object->getCustomerGroupIds(); + if (!is_array($customerGroupIds)) { + $customerGroupIds = explode(',', (string)$customerGroupIds); } + $this->bindRuleToEntity($object->getId(), $customerGroupIds, 'customer_group'); } - parent::_beforeSave($object); + + $this->updateRuleProductData($object); + + parent::_afterSave($object); + return $this; } /** * Update products which are matched for rule * * @param Mage_CatalogRule_Model_Rule $rule + * * @return Mage_CatalogRule_Model_Resource_Rule */ public function updateRuleProductData(Mage_CatalogRule_Model_Rule $rule) { $ruleId = $rule->getId(); - $write = $this->_getWriteAdapter(); + $write = $this->_getWriteAdapter(); $write->beginTransaction(); if ($rule->getProductsFilter()) { @@ -111,16 +151,15 @@ public function updateRuleProductData(Mage_CatalogRule_Model_Rule $rule) Magento_Profiler::start('__MATCH_PRODUCTS__'); $productIds = $rule->getMatchingProductIds(); Magento_Profiler::stop('__MATCH_PRODUCTS__'); - $customerGroupIds = $rule->getCustomerGroupIds(); - - $fromTime = strtotime($rule->getFromDate()); - $toTime = strtotime($rule->getToDate()); - $toTime = $toTime ? ($toTime + self::SECONDS_IN_DAY - 1) : 0; - $sortOrder = (int)$rule->getSortOrder(); - $actionOperator = $rule->getSimpleAction(); - $actionAmount = $rule->getDiscountAmount(); - $actionStop = $rule->getStopRulesProcessing(); + $customerGroupIds = $rule->getCustomerGroupIds(); + $fromTime = strtotime($rule->getFromDate()); + $toTime = strtotime($rule->getToDate()); + $toTime = $toTime ? ($toTime + self::SECONDS_IN_DAY - 1) : 0; + $sortOrder = (int)$rule->getSortOrder(); + $actionOperator = $rule->getSimpleAction(); + $actionAmount = $rule->getDiscountAmount(); + $actionStop = $rule->getStopRulesProcessing(); $rows = array(); @@ -138,8 +177,8 @@ public function updateRuleProductData(Mage_CatalogRule_Model_Rule $rule) 'action_operator' => $actionOperator, 'action_amount' => $actionAmount, 'action_stop' => $actionStop, - 'sort_order' => $sortOrder, - ); + 'sort_order' => $sortOrder + ); if (count($rows) == 1000) { $write->insertMultiple($this->getTable('catalogrule_product'), $rows); @@ -151,13 +190,12 @@ public function updateRuleProductData(Mage_CatalogRule_Model_Rule $rule) if (!empty($rows)) { $write->insertMultiple($this->getTable('catalogrule_product'), $rows); } - - $write->commit(); } catch (Exception $e) { $write->rollback(); throw $e; } + $write->commit(); return $this; } @@ -165,6 +203,7 @@ public function updateRuleProductData(Mage_CatalogRule_Model_Rule $rule) * Get all product ids matched for rule * * @param int $ruleId + * * @return array */ public function getRuleProductIds($ruleId) @@ -172,6 +211,7 @@ public function getRuleProductIds($ruleId) $read = $this->_getReadAdapter(); $select = $read->select()->from($this->getTable('catalogrule_product'), 'product_id') ->where('rule_id=?', $ruleId); + return $read->fetchCol($select); } @@ -181,6 +221,7 @@ public function getRuleProductIds($ruleId) * @param int|string $fromDate * @param int|string $toDate * @param int|null $productId + * * @return Mage_CatalogRule_Model_Resource_Rule */ public function removeCatalogPricesForDateRange($fromDate, $toDate, $productId = null) @@ -217,8 +258,9 @@ public function removeCatalogPricesForDateRange($fromDate, $toDate, $productId = /** * Delete old price rules data * - * @param unknown_type $date - * @param mixed $productId + * @param string $date + * @param int|null $productId + * * @return Mage_CatalogRule_Model_Resource_Rule */ public function deleteOldData($date, $productId = null) @@ -240,6 +282,7 @@ public function deleteOldData($date, $productId = null) * @param int $toDate * @param int|null $productId * @param int|null $websiteId + * * @return Zend_Db_Statement_Interface */ protected function _getRuleProductsStmt($fromDate, $toDate, $productId = null, $websiteId = null) @@ -257,8 +300,8 @@ protected function _getRuleProductsStmt($fromDate, $toDate, $productId = null, $ */ $select = $read->select() ->from(array('rp' => $this->getTable('catalogrule_product'))) - ->where($read->quoteInto('rp.from_time=0 or rp.from_time<=?', $toDate) - . ' or ' .$read->quoteInto('rp.to_time=0 or rp.to_time>=?', $fromDate)) + ->where($read->quoteInto('rp.from_time = 0 or rp.from_time <= ?', $toDate) + . ' OR ' . $read->quoteInto('rp.to_time = 0 or rp.to_time >= ?', $fromDate)) ->order(array('rp.website_id', 'rp.customer_group_id', 'rp.product_id', 'rp.sort_order', 'rp.rule_id')); if (!is_null($productId)) { @@ -306,20 +349,20 @@ protected function _getRuleProductsStmt($fromDate, $toDate, $productId = null, $ ); } else { foreach (Mage::app()->getWebsites() as $website) { - $websiteId = $website->getId(); - $defaultGroup = $website->getDefaultGroup(); + $websiteId = $website->getId(); + $defaultGroup = $website->getDefaultGroup(); if ($defaultGroup instanceof Mage_Core_Model_Store_Group) { - $storeId = $defaultGroup->getDefaultStoreId(); + $storeId = $defaultGroup->getDefaultStoreId(); } else { - $storeId = Mage_Core_Model_App::ADMIN_STORE_ID; + $storeId = Mage_Core_Model_App::ADMIN_STORE_ID; } - $tableAlias = 'pp'.$websiteId; - $fieldAlias = 'website_'.$websiteId.'_price'; + $tableAlias = 'pp' . $websiteId; + $fieldAlias = 'website_' . $websiteId . '_price'; $select->joinLeft( array($tableAlias => $priceTable), sprintf($joinCondition, $tableAlias, $storeId), - array($fieldAlias => $tableAlias . '.value') + array($fieldAlias => $tableAlias.'.value') ); } } @@ -335,6 +378,7 @@ protected function _getRuleProductsStmt($fromDate, $toDate, $productId = null, $ * @param int|string|null $fromDate * @param int|string|null $toDate * @param int $productId + * * @return Mage_CatalogRule_Model_Resource_Rule */ public function applyAllRulesForDateRange($fromDate = null, $toDate = null, $productId = null) @@ -492,6 +536,7 @@ public function applyAllRulesForDateRange($fromDate = null, $toDate = null, $pro * * @param array $ruleData * @param null|array $productData + * * @return float */ protected function _calcRuleProductPrice($ruleData, $productData = null) @@ -519,6 +564,7 @@ protected function _calcRuleProductPrice($ruleData, $productData = null) * Save rule prices for products to DB * * @param array $arrData + * * @return Mage_CatalogRule_Model_Resource_Rule */ protected function _saveRuleProductPrices($arrData) @@ -527,21 +573,34 @@ protected function _saveRuleProductPrices($arrData) return $this; } - foreach ($arrData as $key => $data) { - $productIds[$data['product_id']] = true; // to avoid dupes - $arrData[$key]['rule_date'] = $this->formatDate($data['rule_date'], false); - $arrData[$key]['latest_start_date'] = $this->formatDate($data['latest_start_date'], false); - $arrData[$key]['earliest_end_date'] = $this->formatDate($data['earliest_end_date'], false); - } + $adapter = $this->_getWriteAdapter(); + $productIds = array(); + + $adapter->beginTransaction(); + try { + foreach ($arrData as $key => $data) { + $productIds[$data['product_id']] = true; // to avoid dupes + $arrData[$key]['rule_date'] = $this->formatDate($data['rule_date'], false); + $arrData[$key]['latest_start_date'] = $this->formatDate($data['latest_start_date'], false); + $arrData[$key]['earliest_end_date'] = $this->formatDate($data['earliest_end_date'], false); + } + + foreach ($productIds as $id => $v) { + $adapter->delete($this->getTable('catalogrule_affected_product'), + array("product_id = $id")); + $adapter->insert($this->getTable('catalogrule_affected_product'), + array('product_id' => $id)); + } + + $adapter->insertOnDuplicate($this->getTable('catalogrule_product_price'), $arrData); + + } catch (Exception $e) { + $adapter->rollback(); + throw $e; - foreach ($productIds as $id => $v) { - $this->_getWriteAdapter()->delete($this->getTable('catalogrule_affected_product'), - array("product_id = $id")); - $this->_getWriteAdapter()->insert($this->getTable('catalogrule_affected_product'), - array('product_id' => $id)); } + $adapter->commit(); - $this->_getWriteAdapter()->insertOnDuplicate($this->getTable('catalogrule_product_price'), $arrData); return $this; } @@ -553,7 +612,8 @@ protected function _saveRuleProductPrices($arrData) * @param int $wId * @param int $gId * @param int $pId - * @return float | false + * + * @return float|bool */ public function getRulePrice($date, $wId, $gId, $pId) { @@ -566,13 +626,14 @@ public function getRulePrice($date, $wId, $gId, $pId) } /** - * Return product prices by catalog rule for specific date, website and customer group - * Return product - price pairs + * Retrieve product prices by catalog rule for specific date, website and customer group + * Collect data with product Id => price pairs * * @param int|string $date * @param int $websiteId * @param int $customerGroupId * @param array $productIds + * * @return array */ public function getRulePrices($date, $websiteId, $customerGroupId, $productIds) @@ -619,11 +680,12 @@ public function getRulesFromProduct($date, $websiteId, $customerGroupId, $produc } /** - * Get data about product prices for all customer groups + * Retrieve product price data for all customer groups * * @param int|string $date * @param int $wId * @param int $pId + * * @return array */ public function getRulesForProduct($date, $wId, $pId) @@ -634,6 +696,7 @@ public function getRulesForProduct($date, $wId, $pId) ->where('rule_date=?', $this->formatDate($date, false)) ->where('website_id=?', $wId) ->where('product_id=?', $pId); + return $read->fetchAll($select); } @@ -643,6 +706,7 @@ public function getRulesForProduct($date, $wId, $pId) * @param Mage_CatalogRule_Model_Rule $rule * @param Mage_Catalog_Model_Product $product * @param array $websiteIds + * * @return Mage_CatalogRule_Model_Resource_Rule */ public function applyToProduct($rule, $product, $websiteIds) @@ -651,7 +715,7 @@ public function applyToProduct($rule, $product, $websiteIds) return $this; } - $ruleId = $rule->getId(); + $ruleId = $rule->getId(); $productId = $product->getId(); $write = $this->_getWriteAdapter(); @@ -671,15 +735,13 @@ public function applyToProduct($rule, $product, $websiteIds) } $customerGroupIds = $rule->getCustomerGroupIds(); - - $fromTime = strtotime($rule->getFromDate()); - $toTime = strtotime($rule->getToDate()); - $toTime = $toTime ? $toTime+self::SECONDS_IN_DAY - 1 : 0; - - $sortOrder = (int)$rule->getSortOrder(); - $actionOperator = $rule->getSimpleAction(); - $actionAmount = $rule->getDiscountAmount(); - $actionStop = $rule->getStopRulesProcessing(); + $fromTime = strtotime($rule->getFromDate()); + $toTime = strtotime($rule->getToDate()); + $toTime = $toTime ? $toTime+self::SECONDS_IN_DAY-1 : 0; + $sortOrder = (int)$rule->getSortOrder(); + $actionOperator = $rule->getSimpleAction(); + $actionAmount = $rule->getDiscountAmount(); + $actionStop = $rule->getStopRulesProcessing(); $rows = array(); try { @@ -714,6 +776,7 @@ public function applyToProduct($rule, $product, $websiteIds) } $this->applyAllRulesForDateRange(null, null, $product); + $write->commit(); return $this; diff --git a/app/code/core/Mage/CatalogRule/Model/Resource/Rule/Collection.php b/app/code/core/Mage/CatalogRule/Model/Resource/Rule/Collection.php index f0d0dafde4fe2..1f10d0c1260f1 100755 --- a/app/code/core/Mage/CatalogRule/Model/Resource/Rule/Collection.php +++ b/app/code/core/Mage/CatalogRule/Model/Resource/Rule/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogRule - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -32,45 +32,27 @@ * @package Mage_CatalogRule * @author Magento Core Team */ -class Mage_CatalogRule_Model_Resource_Rule_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract +class Mage_CatalogRule_Model_Resource_Rule_Collection extends Mage_Rule_Model_Resource_Rule_Collection_Abstract { /** - * Enter description here ... + * Store associated with rule entities information map * + * @var array */ - protected function _construct() - { - $this->_init('Mage_CatalogRule_Model_Rule', 'Mage_CatalogRule_Model_Resource_Rule'); - } + protected $_associatedEntitiesMap = array( + 'website' => array( + 'associations_table' => 'catalogrule_website', + 'rule_id_field' => 'rule_id', + 'entity_id_field' => 'website_id' + ) + ); /** - * Enter description here ... - * + * Set resource model */ - protected function _afterLoad() - { - $this->walk('afterLoad'); - } - - /** - * Filter collection by specified website IDs - * - * @param int|array $websiteIds - * @return Mage_CatalogRule_Model_Resource_Rule_Collection - */ - public function addWebsiteFilter($websiteIds) + protected function _construct() { - if (!is_array($websiteIds)) { - $websiteIds = array($websiteIds); - } - $parts = array(); - foreach ($websiteIds as $websiteId) { - $parts[] = $this->getConnection()->prepareSqlCondition('main_table.website_ids', array('finset' => $websiteId)); - } - if ($parts) { - $this->getSelect()->where(new Zend_Db_Expr(implode(' OR ', $parts))); - } - return $this; + $this->_init('Mage_CatalogRule_Model_Rule', 'Mage_CatalogRule_Model_Resource_Rule'); } /** diff --git a/app/code/core/Mage/CatalogRule/Model/Resource/Rule/Product/Price.php b/app/code/core/Mage/CatalogRule/Model/Resource/Rule/Product/Price.php index 165933e8f13a4..4906ae1acbd9f 100755 --- a/app/code/core/Mage/CatalogRule/Model/Resource/Rule/Product/Price.php +++ b/app/code/core/Mage/CatalogRule/Model/Resource/Rule/Product/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogRule - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogRule/Model/Resource/Rule/Product/Price/Collection.php b/app/code/core/Mage/CatalogRule/Model/Resource/Rule/Product/Price/Collection.php index cdecd46158791..0ba36610d1819 100755 --- a/app/code/core/Mage/CatalogRule/Model/Resource/Rule/Product/Price/Collection.php +++ b/app/code/core/Mage/CatalogRule/Model/Resource/Rule/Product/Price/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogRule - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogRule/Model/Rule.php b/app/code/core/Mage/CatalogRule/Model/Rule.php index d218a7432d6f3..0ec31299f4f62 100644 --- a/app/code/core/Mage/CatalogRule/Model/Rule.php +++ b/app/code/core/Mage/CatalogRule/Model/Rule.php @@ -20,13 +20,13 @@ * * @category Mage * @package Mage_CatalogRule - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Enter description here ... + * Catalog Rule data model * * @method Mage_CatalogRule_Model_Resource_Rule _getResource() * @method Mage_CatalogRule_Model_Resource_Rule getResource() @@ -60,8 +60,11 @@ * @package Mage_CatalogRule * @author Magento Core Team */ -class Mage_CatalogRule_Model_Rule extends Mage_Rule_Model_Rule +class Mage_CatalogRule_Model_Rule extends Mage_Rule_Model_Abstract { + /** + * Related cache types config path + */ const XML_NODE_RELATED_CACHE = 'global/catalogrule/related_cache_types'; /** @@ -81,7 +84,7 @@ class Mage_CatalogRule_Model_Rule extends Mage_Rule_Model_Rule protected $_eventObject = 'rule'; /** - * Matched product ids array + * Store matched product Ids * * @var array */ @@ -94,6 +97,11 @@ class Mage_CatalogRule_Model_Rule extends Mage_Rule_Model_Rule */ protected $_productsFilter = null; + /** + * Store current date at "Y-m-d H:i:s" format + * + * @var string + */ protected $_now; /** @@ -114,106 +122,60 @@ protected function _construct() } /** - * Filtering products that must be checked for matching with rule + * Getter for rule conditions collection * - * @param int|array $productIds + * @return Mage_CatalogRule_Model_Rule_Condition_Combine */ - public function setProductsFilter($productIds) + public function getConditionsInstance() { - $this->_productsFilter = $productIds; + return Mage::getModel('Mage_CatalogRule_Model_Rule_Condition_Combine'); } /** - * Returns products filter + * Getter for rule actions collection * - * @return array|int|null + * @return Mage_CatalogRule_Model_Rule_Action_Collection */ - public function getProductsFilter() - { - return $this->_productsFilter; - } - - public function getConditionsInstance() - { - return Mage::getModel('Mage_CatalogRule_Model_Rule_Condition_Combine'); - } - public function getActionsInstance() { return Mage::getModel('Mage_CatalogRule_Model_Rule_Action_Collection'); } - public function getNow() - { - if (!$this->_now) { - return now(); - } - return $this->_now; - } - - public function setNow($now) - { - $this->_now = $now; - } - - public function toString($format='') - { - $str = Mage::helper('Mage_CatalogRule_Helper_Data')->__("Name: %s", $this->getName()) ."\n" - . Mage::helper('Mage_CatalogRule_Helper_Data')->__("Start at: %s", $this->getStartAt()) ."\n" - . Mage::helper('Mage_CatalogRule_Helper_Data')->__("Expire at: %s", $this->getExpireAt()) ."\n" - . Mage::helper('Mage_CatalogRule_Helper_Data')->__("Customer Registered: %s", $this->getCustomerRegistered()) ."\n" - . Mage::helper('Mage_CatalogRule_Helper_Data')->__("Customer is a New Buyer: %s", $this->getCustomerNewBuyer()) ."\n" - . Mage::helper('Mage_CatalogRule_Helper_Data')->__("Description: %s", $this->getDescription()) ."\n\n" - . $this->getConditions()->toStringRecursive() ."\n\n" - . $this->getActions()->toStringRecursive() ."\n\n"; - return $str; - } - /** - * Returns rule as an array for admin interface - * - * Output example: - * array( - * 'name'=>'Example rule', - * 'conditions'=>{condition_combine::toArray} - * 'actions'=>{action_collection::toArray} - * ) + * Get catalog rule customer group Ids * * @return array */ - public function toArray(array $arrAttributes = array()) + public function getCustomerGroupIds() { - $out = parent::toArray($arrAttributes); - $out['customer_registered'] = $this->getCustomerRegistered(); - $out['customer_new_buyer'] = $this->getCustomerNewBuyer(); - - return $out; + if (!$this->hasCustomerGroupIds()) { + $customerGroupIds = $this->_getResource()->getCustomerGroupIds($this->getId()); + $this->setData('customer_group_ids', (array)$customerGroupIds); + } + return $this->_getData('customer_group_ids'); } /** - * Invalidate related cache types + * Retrieve current date for current rule * - * @return Mage_CatalogRule_Model_Rule + * @return string */ - protected function _invalidateCache() + public function getNow() { - $types = Mage::getConfig()->getNode(self::XML_NODE_RELATED_CACHE); - if ($types) { - $types = $types->asArray(); - Mage::app()->getCacheInstance()->invalidateType(array_keys($types)); + if (!$this->_now) { + return now(); } - return $this; + return $this->_now; } /** - * Process rule related data after rule save + * Set current date for current rule * - * @return Mage_CatalogRule_Model_Rule + * @param string $now */ - protected function _afterSave() + public function setNow($now) { - $this->_getResource()->updateRuleProductData($this); - parent::_afterSave(); + $this->_now = $now; } /** @@ -226,18 +188,14 @@ public function getMatchingProductIds() if (is_null($this->_productIds)) { $this->_productIds = array(); $this->setCollectedAttributes(array()); - $websiteIds = $this->getWebsiteIds(); - if (!is_array($websiteIds)) { - $websiteIds = explode(',', $websiteIds); - } - if ($websiteIds) { - $productCollection = Mage::getResourceModel('Mage_Catalog_Model_Resource_Product_Collection') - ->addWebsiteFilter($websiteIds); + if ($this->getWebsiteIds()) { + /** @var $productCollection Mage_Catalog_Model_Resource_Product_Collection */ + $productCollection = Mage::getResourceModel('Mage_Catalog_Model_Resource_Product_Collection'); + $productCollection->addWebsiteFilter($this->getWebsiteIds()); if ($this->_productsFilter) { $productCollection->addIdFilter($this->_productsFilter); } - $this->getConditions()->collectValidatedAttributes($productCollection); Mage::getSingleton('Mage_Core_Model_Resource_Iterator')->walk( @@ -274,41 +232,21 @@ public function callbackValidateProduct($args) * Apply rule to product * * @param int|Mage_Catalog_Model_Product $product - * @param array $websiteIds + * @param array|null $websiteIds + * * @return void */ - public function applyToProduct($product, $websiteIds=null) + public function applyToProduct($product, $websiteIds = null) { if (is_numeric($product)) { $product = Mage::getModel('Mage_Catalog_Model_Product')->load($product); } if (is_null($websiteIds)) { - $websiteIds = explode(',', $this->getWebsiteIds()); + $websiteIds = $this->getWebsiteIds(); } $this->getResource()->applyToProduct($this, $product, $websiteIds); } - /** - * Get array of assigned customer group ids - * - * @return array - */ - public function getCustomerGroupIds() - { - $ids = $this->getData('customer_group_ids'); - if (($ids && !$this->getCustomerGroupChecked()) || is_string($ids)) { - if (is_string($ids)) { - $ids = explode(',', $ids); - } - - $groupIds = Mage::getModel('Mage_Customer_Model_Group')->getCollection()->getAllIds(); - $ids = array_intersect($ids, $groupIds); - $this->setData('customer_group_ids', $ids); - $this->setCustomerGroupChecked(true); - } - return $ids; - } - /** * Apply all price rules, invalidate related cache and refresh price index * @@ -354,8 +292,8 @@ public function applyAllRulesToProduct($product) /** * Calculate price using catalog price rule of product * - * @param Mage_Catalog_Model_Product $product - * @param float $price + * @param Mage_Catalog_Model_Product $product + * @param float $price * @return float|null */ public function calcProductPriceRule(Mage_Catalog_Model_Product $product, $price) @@ -409,4 +347,75 @@ public function calcProductPriceRule(Mage_Catalog_Model_Product $product, $price } return null; } + + /** + * Filtering products that must be checked for matching with rule + * + * @param int|array $productIds + */ + public function setProductsFilter($productIds) + { + $this->_productsFilter = $productIds; + } + + /** + * Returns products filter + * + * @return array|int|null + */ + public function getProductsFilter() + { + return $this->_productsFilter; + } + + /** + * Invalidate related cache types + * + * @return Mage_CatalogRule_Model_Rule + */ + protected function _invalidateCache() + { + $types = Mage::getConfig()->getNode(self::XML_NODE_RELATED_CACHE); + if ($types) { + $types = $types->asArray(); + Mage::app()->getCacheInstance()->invalidateType(array_keys($types)); + } + return $this; + } + + + + + /** + * @deprecated after 1.11.2.0 + * + * @param string $format + * + * @return string + */ + public function toString($format='') + { + return ''; + } + + /** + * Returns rule as an array for admin interface + * + * @deprecated after 1.11.2.0 + * + * @param array $arrAttributes + * + * Output example: + * array( + * 'name'=>'Example rule', + * 'conditions'=>{condition_combine::toArray} + * 'actions'=>{action_collection::toArray} + * ) + * + * @return array + */ + public function toArray(array $arrAttributes = array()) + { + return parent::toArray($arrAttributes); + } } diff --git a/app/code/core/Mage/CatalogRule/Model/Rule/Action/Collection.php b/app/code/core/Mage/CatalogRule/Model/Rule/Action/Collection.php index a1d245bef8b3b..211d95409285f 100644 --- a/app/code/core/Mage/CatalogRule/Model/Rule/Action/Collection.php +++ b/app/code/core/Mage/CatalogRule/Model/Rule/Action/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogRule - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogRule/Model/Rule/Action/Product.php b/app/code/core/Mage/CatalogRule/Model/Rule/Action/Product.php index cbfac100fb47d..a43538fd9d151 100644 --- a/app/code/core/Mage/CatalogRule/Model/Rule/Action/Product.php +++ b/app/code/core/Mage/CatalogRule/Model/Rule/Action/Product.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogRule - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogRule/Model/Rule/Condition/Combine.php b/app/code/core/Mage/CatalogRule/Model/Rule/Condition/Combine.php index 4b5c644561a8e..e7e73be49e398 100644 --- a/app/code/core/Mage/CatalogRule/Model/Rule/Condition/Combine.php +++ b/app/code/core/Mage/CatalogRule/Model/Rule/Condition/Combine.php @@ -20,11 +20,13 @@ * * @category Mage * @package Mage_CatalogRule - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - +/** + * Catalog Rule Combine Condition data model + */ class Mage_CatalogRule_Model_Rule_Condition_Combine extends Mage_Rule_Model_Condition_Combine { public function __construct() diff --git a/app/code/core/Mage/CatalogRule/Model/Rule/Condition/Product.php b/app/code/core/Mage/CatalogRule/Model/Rule/Condition/Product.php index 2cdaa08c3f5b7..e1f9bb2c80b8d 100644 --- a/app/code/core/Mage/CatalogRule/Model/Rule/Condition/Product.php +++ b/app/code/core/Mage/CatalogRule/Model/Rule/Condition/Product.php @@ -20,488 +20,15 @@ * * @category Mage * @package Mage_CatalogRule - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -class Mage_CatalogRule_Model_Rule_Condition_Product extends Mage_Rule_Model_Condition_Abstract +/** + * Catalog Rule Product Condition data model + */ +class Mage_CatalogRule_Model_Rule_Condition_Product extends Mage_Rule_Model_Condition_Product_Abstract { - /** - * All attribute values as array in form: - * array( - * [entity_id_1] => array( - * [store_id_1] => store_value_1, - * [store_id_2] => store_value_2, - * ... - * [store_id_n] => store_value_n - * ), - * ... - * ) - * - * Will be set only for not global scope attribute - * - * @var array - */ - protected $_entityAttributeValues = null; - - /** - * Attribute data key that indicates whether it should be used for rules - * - * @var string - */ - protected $_isUsedForRuleProperty = 'is_used_for_promo_rules'; - - /** - * Customize default operator input by type mapper for some types - * - * @return array - */ - public function getDefaultOperatorInputByType() - { - if (null === $this->_defaultOperatorInputByType) { - parent::getDefaultOperatorInputByType(); - /* - * '{}' and '!{}' are left for back-compatibility and equal to '==' and '!=' - */ - $this->_defaultOperatorInputByType['category'] = array('==', '!=', '{}', '!{}', '()', '!()'); - $this->_arrayInputTypes[] = 'category'; - } - return $this->_defaultOperatorInputByType; - } - - /** - * Retrieve attribute object - * - * @return Mage_Catalog_Model_Resource_Eav_Attribute - */ - public function getAttributeObject() - { - try { - $obj = Mage::getSingleton('Mage_Eav_Model_Config') - ->getAttribute(Mage_Catalog_Model_Product::ENTITY, $this->getAttribute()); - } - catch (Exception $e) { - $obj = new Varien_Object(); - $obj->setEntity(Mage::getResourceSingleton('Mage_Catalog_Model_Resource_Product')) - ->setFrontendInput('text'); - } - return $obj; - } - - /** - * Add special attributes - * - * @param array $attributes - */ - protected function _addSpecialAttributes(array &$attributes) - { - $attributes['attribute_set_id'] = Mage::helper('Mage_CatalogRule_Helper_Data')->__('Attribute Set'); - $attributes['category_ids'] = Mage::helper('Mage_CatalogRule_Helper_Data')->__('Category'); - } - - /** - * Load attribute options - * - * @return Mage_CatalogRule_Model_Rule_Condition_Product - */ - public function loadAttributeOptions() - { - $productAttributes = Mage::getResourceSingleton('Mage_Catalog_Model_Resource_Product') - ->loadAllAttributes() - ->getAttributesByCode(); - - $attributes = array(); - foreach ($productAttributes as $attribute) { - /* @var $attribute Mage_Catalog_Model_Resource_Eav_Attribute */ - if (!$attribute->isAllowedForRuleCondition() - || !$attribute->getDataUsingMethod($this->_isUsedForRuleProperty) - ) { - continue; - } - $attributes[$attribute->getAttributeCode()] = $attribute->getFrontendLabel(); - } - - $this->_addSpecialAttributes($attributes); - - asort($attributes); - $this->setAttributeOption($attributes); - - return $this; - } - - /** - * Prepares values options to be used as select options or hashed array - * Result is stored in following keys: - * 'value_select_options' - normal select array: array(array('value' => $value, 'label' => $label), ...) - * 'value_option' - hashed array: array($value => $label, ...), - * - * @return Mage_CatalogRule_Model_Rule_Condition_Product - */ - protected function _prepareValueOptions() - { - // Check that both keys exist. Maybe somehow only one was set not in this routine, but externally. - $selectReady = $this->getData('value_select_options'); - $hashedReady = $this->getData('value_option'); - if ($selectReady && $hashedReady) { - return $this; - } - - // Get array of select options. It will be used as source for hashed options - $selectOptions = null; - if ($this->getAttribute() === 'attribute_set_id') { - $entityTypeId = Mage::getSingleton('Mage_Eav_Model_Config') - ->getEntityType(Mage_Catalog_Model_Product::ENTITY)->getId(); - $selectOptions = Mage::getResourceModel('Mage_Eav_Model_Resource_Entity_Attribute_Set_Collection') - ->setEntityTypeFilter($entityTypeId) - ->load() - ->toOptionArray(); - } else if (is_object($this->getAttributeObject())) { - $attributeObject = $this->getAttributeObject(); - if ($attributeObject->usesSource()) { - if ($attributeObject->getFrontendInput() == 'multiselect') { - $addEmptyOption = false; - } else { - $addEmptyOption = true; - } - $selectOptions = $attributeObject->getSource()->getAllOptions($addEmptyOption); - } - } - - // Set new values only if we really got them - if ($selectOptions !== null) { - // Overwrite only not already existing values - if (!$selectReady) { - $this->setData('value_select_options', $selectOptions); - } - if (!$hashedReady) { - $hashedOptions = array(); - foreach ($selectOptions as $o) { - if (is_array($o['value'])) { - continue; // We cannot use array as index - } - $hashedOptions[$o['value']] = $o['label']; - } - $this->setData('value_option', $hashedOptions); - } - } - - return $this; - } - - /** - * Retrieve value by option - * - * @param mixed $option - * @return string - */ - public function getValueOption($option=null) - { - $this->_prepareValueOptions(); - return $this->getData('value_option'.(!is_null($option) ? '/'.$option : '')); - } - - /** - * Retrieve select option values - * - * @return array - */ - public function getValueSelectOptions() - { - $this->_prepareValueOptions(); - return $this->getData('value_select_options'); - } - - /** - * Retrieve after element HTML - * - * @return string - */ - public function getValueAfterElementHtml() - { - $html = ''; - - switch ($this->getAttribute()) { - case 'sku': case 'category_ids': - $image = Mage::getDesign()->getSkinUrl('images/rule_chooser_trigger.gif'); - break; - } - - if (!empty($image)) { - $html = ''; - } - return $html; - } - - /** - * Retrieve attribute element - * - * @return Varien_Form_Element_Abstract - */ - public function getAttributeElement() - { - $element = parent::getAttributeElement(); - $element->setShowAsText(true); - return $element; - } - - /** - * Collect validated attributes - * - * @param Mage_Catalog_Model_Resource_Product_Collection $productCollection - * @return Mage_CatalogRule_Model_Rule_Condition_Product - */ - public function collectValidatedAttributes($productCollection) - { - $attribute = $this->getAttribute(); - if ('category_ids' != $attribute) { - if ($this->getAttributeObject()->isScopeGlobal()) { - $attributes = $this->getRule()->getCollectedAttributes(); - $attributes[$attribute] = true; - $this->getRule()->setCollectedAttributes($attributes); - $productCollection->addAttributeToSelect($attribute, 'left'); - } else { - $this->_entityAttributeValues = $productCollection->getAllAttributeValues($attribute); - } - } - - return $this; - } - - /** - * Retrieve input type - * - * @return string - */ - public function getInputType() - { - if ($this->getAttribute()==='attribute_set_id') { - return 'select'; - } - if (!is_object($this->getAttributeObject())) { - return 'string'; - } - if ($this->getAttributeObject()->getAttributeCode() == 'category_ids') { - return 'category'; - } - switch ($this->getAttributeObject()->getFrontendInput()) { - case 'select': - return 'select'; - - case 'multiselect': - return 'multiselect'; - - case 'date': - return 'date'; - - case 'boolean': - return 'boolean'; - - default: - return 'string'; - } - } - - /** - * Retrieve value element type - * - * @return string - */ - public function getValueElementType() - { - if ($this->getAttribute()==='attribute_set_id') { - return 'select'; - } - if (!is_object($this->getAttributeObject())) { - return 'text'; - } - switch ($this->getAttributeObject()->getFrontendInput()) { - case 'select': - case 'boolean': - return 'select'; - - case 'multiselect': - return 'multiselect'; - - case 'date': - return 'date'; - - default: - return 'text'; - } - } - - /** - * Retrieve value element - * - * @return Varien_Data_Form_Element_Abstract - */ - public function getValueElement() - { - $element = parent::getValueElement(); - if (is_object($this->getAttributeObject())) { - switch ($this->getAttributeObject()->getFrontendInput()) { - case 'date': - $element->setImage(Mage::getDesign()->getSkinUrl('images/grid-cal.gif')); - break; - } - } - - return $element; - } - - /** - * Retrieve value element chooser URL - * - * @return string - */ - public function getValueElementChooserUrl() - { - $url = false; - switch ($this->getAttribute()) { - case 'sku': case 'category_ids': - $url = 'adminhtml/promo_widget/chooser' - .'/attribute/'.$this->getAttribute(); - if ($this->getJsFormObject()) { - $url .= '/form/'.$this->getJsFormObject(); - } - break; - } - return $url!==false ? Mage::helper('Mage_Adminhtml_Helper_Data')->getUrl($url) : ''; - } - - /** - * Retrieve Explicit Apply - * - * @return bool - */ - public function getExplicitApply() - { - switch ($this->getAttribute()) { - case 'sku': case 'category_ids': - return true; - } - if (is_object($this->getAttributeObject())) { - switch ($this->getAttributeObject()->getFrontendInput()) { - case 'date': - return true; - } - } - return false; - } - - /** - * Load array - * - * @param array $arr - * @return Mage_CatalogRule_Model_Rule_Condition_Product - */ - public function loadArray($arr) - { - $this->setAttribute(isset($arr['attribute']) ? $arr['attribute'] : false); - $attribute = $this->getAttributeObject(); - - $isContainsOperator = !empty($arr['operator']) && in_array($arr['operator'], array('{}', '!{}')); - if ($attribute && $attribute->getBackendType() == 'decimal' && !$isContainsOperator) { - if (isset($arr['value'])) { - if (!empty($arr['operator']) - && in_array($arr['operator'], array('!()', '()')) - && false !== strpos($arr['value'], ',')) { - - $tmp = array(); - foreach (explode(',', $arr['value']) as $value) { - $tmp[] = Mage::app()->getLocale()->getNumber($value); - } - $arr['value'] = implode(',', $tmp); - } else { - $arr['value'] = Mage::app()->getLocale()->getNumber($arr['value']); - } - } else { - $arr['value'] = false; - } - $arr['is_value_parsed'] = isset($arr['is_value_parsed']) - ? Mage::app()->getLocale()->getNumber($arr['is_value_parsed']) : false; - } - - return parent::loadArray($arr); - } - - /** - * Validate product attrbute value for condition - * - * @param Varien_Object $object - * @return bool - */ - public function validate(Varien_Object $object) - { - $attrCode = $this->getAttribute(); - - if ('category_ids' == $attrCode) { - return $this->validateAttribute($object->getAvailableInCategories()); - } elseif (! isset($this->_entityAttributeValues[$object->getId()])) { - $attr = $object->getResource()->getAttribute($attrCode); - - if ($attr && $attr->getBackendType() == 'datetime' && !is_int($this->getValue())) { - $this->setValue(strtotime($this->getValue())); - $value = strtotime($object->getData($attrCode)); - return $this->validateAttribute($value); - } - - if ($attr && $attr->getFrontendInput() == 'multiselect') { - $value = $object->getData($attrCode); - $value = strlen($value) ? explode(',', $value) : array(); - return $this->validateAttribute($value); - } - - return parent::validate($object); - } else { - $result = false; // any valid value will set it to TRUE - // remember old attribute state - $oldAttrValue = $object->hasData($attrCode) ? $object->getData($attrCode) : null; - - foreach ($this->_entityAttributeValues[$object->getId()] as $storeId => $value) { - $attr = $object->getResource()->getAttribute($attrCode); - if ($attr && $attr->getBackendType() == 'datetime') { - $value = strtotime($value); - } else if ($attr && $attr->getFrontendInput() == 'multiselect') { - $value = strlen($value) ? explode(',', $value) : array(); - } - - $object->setData($attrCode, $value); - $result |= parent::validate($object); - - if ($result) { - break; - } - } - - if (is_null($oldAttrValue)) { - $object->unsetData($attrCode); - } else { - $object->setData($attrCode, $oldAttrValue); - } - - return (bool) $result; - } - } - - /** - * Correct '==' and '!=' operators - * Categories can't be equal because product is included categories selected by administrator and in their parents - * - * @return string - */ - public function getOperatorForValidate() - { - $op = $this->getOperator(); - if ($this->getInputType() == 'category') { - if ($op == '==') { - $op = '{}'; - } elseif ($op == '!=') { - $op = '!{}'; - } - } - return $op; - } } diff --git a/app/code/core/Mage/CatalogRule/Model/Rule/Product/Price.php b/app/code/core/Mage/CatalogRule/Model/Rule/Product/Price.php index e3ceba5755568..fb33573303de1 100644 --- a/app/code/core/Mage/CatalogRule/Model/Rule/Product/Price.php +++ b/app/code/core/Mage/CatalogRule/Model/Rule/Product/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogRule - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogRule/etc/adminhtml.xml b/app/code/core/Mage/CatalogRule/etc/adminhtml.xml index 0f0659116c406..94b8a61f86665 100644 --- a/app/code/core/Mage/CatalogRule/etc/adminhtml.xml +++ b/app/code/core/Mage/CatalogRule/etc/adminhtml.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_CatalogRule - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/CatalogRule/etc/config.xml b/app/code/core/Mage/CatalogRule/etc/config.xml index b46c1a5bc83e9..9cf6fd46df091 100644 --- a/app/code/core/Mage/CatalogRule/etc/config.xml +++ b/app/code/core/Mage/CatalogRule/etc/config.xml @@ -21,14 +21,14 @@ * * @category Mage * @package Mage_CatalogRule - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - 1.6.0.1 + 1.6.0.2 diff --git a/app/code/core/Mage/CatalogRule/sql/catalogrule_setup/install-1.6.0.0.php b/app/code/core/Mage/CatalogRule/sql/catalogrule_setup/install-1.6.0.0.php index b0ae7618d3cae..3d275f1107ec4 100644 --- a/app/code/core/Mage/CatalogRule/sql/catalogrule_setup/install-1.6.0.0.php +++ b/app/code/core/Mage/CatalogRule/sql/catalogrule_setup/install-1.6.0.0.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogRule - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogRule/sql/catalogrule_setup/upgrade-1.6.0.0-1.6.0.1.php b/app/code/core/Mage/CatalogRule/sql/catalogrule_setup/upgrade-1.6.0.0-1.6.0.1.php index 4e8bc12a4fe80..3b291214c07d4 100644 --- a/app/code/core/Mage/CatalogRule/sql/catalogrule_setup/upgrade-1.6.0.0-1.6.0.1.php +++ b/app/code/core/Mage/CatalogRule/sql/catalogrule_setup/upgrade-1.6.0.0-1.6.0.1.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogRule - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogRule/sql/catalogrule_setup/upgrade-1.6.0.1-1.6.0.2.php b/app/code/core/Mage/CatalogRule/sql/catalogrule_setup/upgrade-1.6.0.1-1.6.0.2.php new file mode 100644 index 0000000000000..a158896bdb232 --- /dev/null +++ b/app/code/core/Mage/CatalogRule/sql/catalogrule_setup/upgrade-1.6.0.1-1.6.0.2.php @@ -0,0 +1,163 @@ +getConnection(); + +$rulesTable = $installer->getTable('catalogrule'); +$websitesTable = $installer->getTable('core_website'); +$customerGroupsTable = $installer->getTable('customer_group'); +$rulesWebsitesTable = $installer->getTable('catalogrule_website'); +$rulesCustomerGroupsTable = $installer->getTable('catalogrule_customer_group'); + +$installer->startSetup(); +/** + * Create table 'catalogrule_website' if not exists. This table will be used instead of + * column website_ids of main catalog rules table + */ +if (!$connection->isTableExists($rulesWebsitesTable)) { + $table = $connection->newTable($rulesWebsitesTable) + ->addColumn('rule_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array( + 'unsigned' => true, + 'nullable' => false, + 'primary' => true + ), + 'Rule Id' + ) + ->addColumn('website_id', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array( + 'unsigned' => true, + 'nullable' => false, + 'primary' => true + ), + 'Website Id' + ) + ->addIndex( + $installer->getIdxName('catalogrule_website', array('rule_id')), + array('rule_id') + ) + ->addIndex( + $installer->getIdxName('catalogrule_website', array('website_id')), + array('website_id') + ) + ->addForeignKey($installer->getFkName('catalogrule_website', 'rule_id', 'catalogrule', 'rule_id'), + 'rule_id', $rulesTable, 'rule_id', + Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE + ) + ->addForeignKey($installer->getFkName('catalogrule_website', 'website_id', 'core_website', 'website_id'), + 'website_id', $websitesTable, 'website_id', + Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE + ) + ->setComment('Catalog Rules To Websites Relations'); + + $connection->createTable($table); +} + +/** + * Create table 'catalogrule_customer_group' if not exists. This table will be used instead of + * column customer_group_ids of main catalog rules table + */ +if (!$connection->isTableExists($rulesCustomerGroupsTable)) { + $table = $connection->newTable($rulesCustomerGroupsTable) + ->addColumn('rule_id', Varien_Db_Ddl_Table::TYPE_INTEGER, null, array( + 'unsigned' => true, + 'nullable' => false, + 'primary' => true + ), + 'Rule Id' + ) + ->addColumn('customer_group_id', Varien_Db_Ddl_Table::TYPE_SMALLINT, null, array( + 'unsigned' => true, + 'nullable' => false, + 'primary' => true + ), + 'Customer Group Id' + ) + ->addIndex( + $installer->getIdxName('catalogrule_customer_group', array('rule_id')), + array('rule_id') + ) + ->addIndex( + $installer->getIdxName('catalogrule_customer_group', array('customer_group_id')), + array('customer_group_id') + ) + ->addForeignKey($installer->getFkName('catalogrule_customer_group', 'rule_id', 'catalogrule', 'rule_id'), + 'rule_id', $rulesTable, 'rule_id', + Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE + ) + ->addForeignKey( + $installer->getFkName('catalogrule_customer_group', 'customer_group_id', + 'customer_group', 'customer_group_id' + ), + 'customer_group_id', $customerGroupsTable, 'customer_group_id', + Varien_Db_Ddl_Table::ACTION_CASCADE, Varien_Db_Ddl_Table::ACTION_CASCADE + ) + ->setComment('Catalog Rules To Customer Groups Relations'); + + $connection->createTable($table); +} + +/** + * Fill out relation table 'catalogrule_website' with website Ids + */ +if ($connection->tableColumnExists($rulesTable, 'website_ids')) { + $select = $connection->select() + ->from(array('sr' => $rulesTable), array('sr.rule_id', 'cw.website_id')) + ->join( + array('cw' => $websitesTable), + $connection->prepareSqlCondition( + 'sr.website_ids', array('finset' => new Zend_Db_Expr('cw.website_id')) + ), + array() + ); + $query = $select->insertFromSelect($rulesWebsitesTable, array('rule_id', 'website_id')); + $connection->query($query); +} + +/** + * Fill out relation table 'catalogrule_customer_group' with customer group Ids + */ +if ($connection->tableColumnExists($rulesTable, 'customer_group_ids')) { + $select = $connection->select() + ->from(array('sr' => $rulesTable), array('sr.rule_id', 'cg.customer_group_id')) + ->join( + array('cg' => $customerGroupsTable), + $connection->prepareSqlCondition( + 'sr.customer_group_ids', array('finset' => new Zend_Db_Expr('cg.customer_group_id')) + ), + array() + ); + $query = $select->insertFromSelect($rulesCustomerGroupsTable, array('rule_id', 'customer_group_id')); + $connection->query($query); +} + +/** + * Eliminate obsolete columns + */ +$connection->dropColumn($rulesTable, 'website_ids'); +$connection->dropColumn($rulesTable, 'customer_group_ids'); + +$installer->endSetup(); diff --git a/app/code/core/Mage/CatalogSearch/Block/Advanced/Form.php b/app/code/core/Mage/CatalogSearch/Block/Advanced/Form.php index 56053346633f9..a4c41cf77d53d 100644 --- a/app/code/core/Mage/CatalogSearch/Block/Advanced/Form.php +++ b/app/code/core/Mage/CatalogSearch/Block/Advanced/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -81,6 +81,13 @@ public function getAttributeValidationClass($attribute) return $attribute->getFrontendClass(); } + /** + * Retrieve search string for given field from request + * + * @param string $attribute + * @param string $part + * @return mixed|string + */ public function getAttributeValue($attribute, $part=null) { $value = $this->getRequest()->getQuery($attribute->getAttributeCode()); @@ -93,12 +100,14 @@ public function getAttributeValue($attribute, $part=null) } } - if (!is_array($value)) { - $value = htmlspecialchars($value); - } return $value; } + /** + * Retrieve the list of available currencies + * + * @return array + */ public function getAvailableCurrencies() { $currencies = $this->getData('_currencies'); @@ -123,11 +132,22 @@ public function getAvailableCurrencies() return $currencies; } + /** + * Count available currencies + * + * @return int + */ public function getCurrencyCount() { return count($this->getAvailableCurrencies()); } + /** + * Retrieve currency code for attribute + * + * @param $attribute + * @return string + */ public function getCurrency($attribute) { return Mage::app()->getStore()->getCurrentCurrencyCode(); @@ -170,6 +190,12 @@ public function getAttributeInputType($attribute) return 'string'; } + /** + * Build attribute select element html string + * + * @param $attribute + * @return string + */ public function getAttributeSelectElement($attribute) { $extra = ''; @@ -186,8 +212,6 @@ public function getAttributeSelectElement($attribute) array_unshift($options, array('value'=>'', 'label'=>Mage::helper('Mage_CatalogSearch_Helper_Data')->__('All'))); } - - return $this->_getSelectBlock() ->setName($name) ->setId($attribute->getAttributeCode()) @@ -237,6 +261,7 @@ protected function _getDateBlock() } return $block; } + /** * Retrieve advanced search model object * @@ -247,11 +272,23 @@ public function getModel() return Mage::getSingleton('Mage_CatalogSearch_Model_Advanced'); } + /** + * Retrieve search form action string + * + * @return string + */ public function getSearchPostUrl() { return $this->getUrl('*/*/result'); } + /** + * Build date element html string for attribute + * + * @param $attribute + * @param string $part + * @return string + */ public function getDateInput($attribute, $part = 'from') { $name = $attribute->getAttributeCode() . '[' . $part . ']'; diff --git a/app/code/core/Mage/CatalogSearch/Block/Advanced/Result.php b/app/code/core/Mage/CatalogSearch/Block/Advanced/Result.php index d12acf8a7e878..15ab41f47541d 100644 --- a/app/code/core/Mage/CatalogSearch/Block/Advanced/Result.php +++ b/app/code/core/Mage/CatalogSearch/Block/Advanced/Result.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/Block/Autocomplete.php b/app/code/core/Mage/CatalogSearch/Block/Autocomplete.php index 1f2900547293f..482362ba4022c 100644 --- a/app/code/core/Mage/CatalogSearch/Block/Autocomplete.php +++ b/app/code/core/Mage/CatalogSearch/Block/Autocomplete.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/Block/Layer.php b/app/code/core/Mage/CatalogSearch/Block/Layer.php index 8d8f7a391b174..51e73ae841379 100644 --- a/app/code/core/Mage/CatalogSearch/Block/Layer.php +++ b/app/code/core/Mage/CatalogSearch/Block/Layer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/Block/Layer/Filter/Attribute.php b/app/code/core/Mage/CatalogSearch/Block/Layer/Filter/Attribute.php index 9cc0dea12b2c5..35287c3ecaa2c 100644 --- a/app/code/core/Mage/CatalogSearch/Block/Layer/Filter/Attribute.php +++ b/app/code/core/Mage/CatalogSearch/Block/Layer/Filter/Attribute.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/Block/Result.php b/app/code/core/Mage/CatalogSearch/Block/Result.php index 9f1a62b5f159d..13e6d644c1c2a 100644 --- a/app/code/core/Mage/CatalogSearch/Block/Result.php +++ b/app/code/core/Mage/CatalogSearch/Block/Result.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/Block/Term.php b/app/code/core/Mage/CatalogSearch/Block/Term.php index 8b05508a5ca76..ad85c9090c55b 100644 --- a/app/code/core/Mage/CatalogSearch/Block/Term.php +++ b/app/code/core/Mage/CatalogSearch/Block/Term.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/Helper/Data.php b/app/code/core/Mage/CatalogSearch/Helper/Data.php index 58a890d6a479a..f1b7adde523bc 100644 --- a/app/code/core/Mage/CatalogSearch/Helper/Data.php +++ b/app/code/core/Mage/CatalogSearch/Helper/Data.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -287,8 +287,9 @@ public function checkNotes($store = null) } $searchType = Mage::getStoreConfig(Mage_CatalogSearch_Model_Fulltext::XML_PATH_CATALOG_SEARCH_TYPE); - if ($searchType != Mage_CatalogSearch_Model_Fulltext::SEARCH_TYPE_COMBINE && - $searchType != Mage_CatalogSearch_Model_Fulltext::SEARCH_TYPE_LIKE) { + if ($searchType != Mage_CatalogSearch_Model_Fulltext::SEARCH_TYPE_COMBINE + && $searchType != Mage_CatalogSearch_Model_Fulltext::SEARCH_TYPE_LIKE + ) { return $this; } @@ -300,14 +301,13 @@ public function checkNotes($store = null) return $this; } - $wordsCut = array_diff($wordsFull, $wordsLike); - $wordsCut = array_map(array($this, 'escapeHtml'), $wordsCut); - $this->addNoteMessage( - $this->__('Maximum words count is %1$s. In your search query was cut next part: %2$s.', - $this->getMaxQueryWords(), - join(' ', $wordsCut) - ) - ); + if (count($wordsFull) > count($wordsLike)) { + $wordsCut = array_diff($wordsFull, $wordsLike); + $wordsCut = array_map(array($this, 'escapeHtml'), $wordsCut); + $this->addNoteMessage( + $this->__('Maximum words count is %1$s. In your search query was cut next part: %2$s.', $this->getMaxQueryWords(), join(' ', $wordsCut)) + ); + } return $this; } diff --git a/app/code/core/Mage/CatalogSearch/Model/Advanced.php b/app/code/core/Mage/CatalogSearch/Model/Advanced.php index 7be303b8d4bdc..b6801c949dde3 100644 --- a/app/code/core/Mage/CatalogSearch/Model/Advanced.php +++ b/app/code/core/Mage/CatalogSearch/Model/Advanced.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/Model/Fulltext.php b/app/code/core/Mage/CatalogSearch/Model/Fulltext.php index d954b6efe107b..18a4d14460861 100644 --- a/app/code/core/Mage/CatalogSearch/Model/Fulltext.php +++ b/app/code/core/Mage/CatalogSearch/Model/Fulltext.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -61,8 +61,9 @@ protected function _construct() * (1, 2) => Regenerate index for product Id=2 and its store view Id=1 * (null, 2) => Regenerate index for all store views of product Id=2 * - * @param int $storeId Store View Id - * @param int | array $productId Product Entity Id + * @param int|null $storeId Store View Id + * @param int|array|null $productIds Product Entity Id + * * @return Mage_CatalogSearch_Model_Fulltext */ public function rebuildIndex($storeId = null, $productIds = null) @@ -139,11 +140,34 @@ public function getSearchType($storeId = null) return Mage::getStoreConfig(self::XML_PATH_CATALOG_SEARCH_TYPE, $storeId); } + + + + + // Deprecated methods + + /** + * Set whether table changes are allowed + * + * @deprecated after 1.6.1.0 + * + * @param bool $value + * @return Mage_CatalogSearch_Model_Fulltext + */ + public function setAllowTableChanges($value = true) + { + $this->_allowTableChanges = $value; + return $this; + } + /** - * Update category'es products indexes + * Update category products indexes + * + * @deprecated after 1.6.2.0 * * @param array $productIds * @param array $categoryIds + * * @return Mage_CatalogSearch_Model_Fulltext */ public function updateCategoryIndex($productIds, $categoryIds) diff --git a/app/code/core/Mage/CatalogSearch/Model/Fulltext/Observer.php b/app/code/core/Mage/CatalogSearch/Model/Fulltext/Observer.php index e7e7dcbf99f0b..f8ecdcdf54ccf 100644 --- a/app/code/core/Mage/CatalogSearch/Model/Fulltext/Observer.php +++ b/app/code/core/Mage/CatalogSearch/Model/Fulltext/Observer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/Model/Indexer/Fulltext.php b/app/code/core/Mage/CatalogSearch/Model/Indexer/Fulltext.php index 1842d742d7d39..c34f2124f1c39 100644 --- a/app/code/core/Mage/CatalogSearch/Model/Indexer/Fulltext.php +++ b/app/code/core/Mage/CatalogSearch/Model/Indexer/Fulltext.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/Model/Layer.php b/app/code/core/Mage/CatalogSearch/Model/Layer.php index 623e2c4d8c958..5738780c03f86 100644 --- a/app/code/core/Mage/CatalogSearch/Model/Layer.php +++ b/app/code/core/Mage/CatalogSearch/Model/Layer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/Model/Layer/Filter/Attribute.php b/app/code/core/Mage/CatalogSearch/Model/Layer/Filter/Attribute.php index f7ef2f3de1cd9..6d9b2affd1f5f 100644 --- a/app/code/core/Mage/CatalogSearch/Model/Layer/Filter/Attribute.php +++ b/app/code/core/Mage/CatalogSearch/Model/Layer/Filter/Attribute.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/Model/Query.php b/app/code/core/Mage/CatalogSearch/Model/Query.php index d37a4fde1280f..e9f24303acd4e 100644 --- a/app/code/core/Mage/CatalogSearch/Model/Query.php +++ b/app/code/core/Mage/CatalogSearch/Model/Query.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/Model/Resource/Advanced.php b/app/code/core/Mage/CatalogSearch/Model/Resource/Advanced.php index dc6901efc4770..7f4160515210b 100755 --- a/app/code/core/Mage/CatalogSearch/Model/Resource/Advanced.php +++ b/app/code/core/Mage/CatalogSearch/Model/Resource/Advanced.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/Model/Resource/Advanced/Collection.php b/app/code/core/Mage/CatalogSearch/Model/Resource/Advanced/Collection.php index e3e270d572c00..57fa0fc90b4b5 100755 --- a/app/code/core/Mage/CatalogSearch/Model/Resource/Advanced/Collection.php +++ b/app/code/core/Mage/CatalogSearch/Model/Resource/Advanced/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php b/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php index d05efca0b3d1a..532ad06928776 100755 --- a/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php +++ b/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -89,22 +89,6 @@ public function getSeparator() return $this->_separator; } - /** - * Update category'es products indexes - * - * @param array $productIds - * @param array $categoryIds - * @return Mage_CatalogSearch_Model_Resource_Fulltext - */ - public function updateCategoryIndex($productIds, $categoryIds) - { - if ($this->_engine && $this->_engine->allowAdvancedIndex()) { - $this->_engine->updateCategoryIndex($productIds, $categoryIds); - } - - return $this; - } - /** * Regenerate search index for store(s) * @@ -138,11 +122,11 @@ protected function _rebuildStoreIndex($storeId, $productIds = null) $this->cleanIndex($storeId, $productIds); // prepare searchable attributes - $staticFields = array(); + $staticFields = array(); foreach ($this->_getSearchableAttributes('static') as $attribute) { $staticFields[] = $attribute->getAttributeCode(); } - $dynamicFields = array( + $dynamicFields = array( 'int' => array_keys($this->_getSearchableAttributes('int')), 'varchar' => array_keys($this->_getSearchableAttributes('varchar')), 'text' => array_keys($this->_getSearchableAttributes('text')), @@ -153,8 +137,8 @@ protected function _rebuildStoreIndex($storeId, $productIds = null) // status and visibility filter $visibility = $this->_getSearchableAttribute('visibility'); $status = $this->_getSearchableAttribute('status'); - $visibilityVals = Mage::getSingleton('Mage_Catalog_Model_Product_Visibility')->getVisibleInSearchIds(); $statusVals = Mage::getSingleton('Mage_Catalog_Model_Product_Status')->getVisibleStatusIds(); + $allowedVisibilityValues = $this->_engine->getAllowedVisibility(); $lastProductId = 0; while (true) { @@ -168,10 +152,10 @@ protected function _rebuildStoreIndex($storeId, $productIds = null) foreach ($products as $productData) { $lastProductId = $productData['entity_id']; $productAttributes[$productData['entity_id']] = $productData['entity_id']; - $productChilds = $this->_getProductChildIds($productData['entity_id'], $productData['type_id']); - $productRelations[$productData['entity_id']] = $productChilds; - if ($productChilds) { - foreach ($productChilds as $productChildId) { + $productChildren = $this->_getProductChildIds($productData['entity_id'], $productData['type_id']); + $productRelations[$productData['entity_id']] = $productChildren; + if ($productChildren) { + foreach ($productChildren as $productChildId) { $productAttributes[$productChildId] = $productChildId; } } @@ -180,30 +164,17 @@ protected function _rebuildStoreIndex($storeId, $productIds = null) $productIndexes = array(); $productAttributes = $this->_getProductAttributes($storeId, $productAttributes, $dynamicFields); foreach ($products as $productData) { - /* - * If using advanced index and there is no required fields - do not add to index. - * Skipping out of stock products if there are no prices for them in catalog_product_index_price table - */ - if ($this->_engine->allowAdvancedIndex() - && (!isset($productData[$this->_engine->getFieldsPrefix() . 'categories'])) - ) { - continue; - } if (!isset($productAttributes[$productData['entity_id']])) { continue; } $productAttr = $productAttributes[$productData['entity_id']]; if (!isset($productAttr[$visibility->getId()]) - || (!in_array($productAttr[$visibility->getId()], $visibilityVals) - && !$this->_engine->allowAdvancedIndex() - ) + || !in_array($productAttr[$visibility->getId()], $allowedVisibilityValues) ) { continue; } - if (!isset($productAttr[$status->getId()]) - || !in_array($productAttr[$status->getId()], $statusVals) - ) { + if (!isset($productAttr[$status->getId()]) || !in_array($productAttr[$status->getId()], $statusVals)) { continue; } @@ -211,8 +182,8 @@ protected function _rebuildStoreIndex($storeId, $productIds = null) $productData['entity_id'] => $productAttr ); - if ($productChilds = $productRelations[$productData['entity_id']]) { - foreach ($productChilds as $productChildId) { + if ($productChildren = $productRelations[$productData['entity_id']]) { + foreach ($productChildren as $productChildId) { if (isset($productAttributes[$productChildId])) { $productIndex[$productChildId] = $productAttributes[$productChildId]; } @@ -245,8 +216,10 @@ protected function _rebuildStoreIndex($storeId, $productIds = null) protected function _getSearchableProducts($storeId, array $staticFields, $productIds = null, $lastProductId = 0, $limit = 100) { - $store = Mage::app()->getStore($storeId); - $select = $this->_getWriteAdapter()->select() + $websiteId = Mage::app()->getStore($storeId)->getWebsiteId(); + $writeAdapter = $this->_getWriteAdapter(); + + $select = $writeAdapter->select() ->useStraightJoin(true) ->from( array('e' => $this->getTable('catalog_product_entity')), @@ -254,17 +227,17 @@ protected function _getSearchableProducts($storeId, array $staticFields, $produc ) ->join( array('website' => $this->getTable('catalog_product_website')), - $this->_getWriteAdapter()->quoteInto( + $writeAdapter->quoteInto( 'website.product_id=e.entity_id AND website.website_id=?', - $store->getWebsiteId() + $websiteId ), array() ) ->join( array('stock_status' => $this->getTable('cataloginventory_stock_status')), - $this->_getWriteAdapter()->quoteInto( + $writeAdapter->quoteInto( 'stock_status.product_id=e.entity_id AND stock_status.website_id=?', - $store->getWebsiteId() + $websiteId ), array('in_stock' => 'stock_status') ); @@ -277,12 +250,9 @@ protected function _getSearchableProducts($storeId, array $staticFields, $produc ->limit($limit) ->order('e.entity_id'); - $result = $this->_getWriteAdapter()->fetchAll($select); - if ($this->_engine && $this->_engine->allowAdvancedIndex() && count($result) > 0) { - return $this->_engine->addAdvancedIndex($result, $storeId, $productIds); - } else { - return $result; - } + $result = $writeAdapter->fetchAll($select); + + return $result; } /** @@ -313,6 +283,7 @@ public function cleanIndex($storeId = null, $productId = null) if ($this->_engine) { $this->_engine->cleanIndex($storeId, $productId); } + return $this; } @@ -361,18 +332,20 @@ public function prepareResult($object, $queryText, $query) ->where($mainTableAlias.'.store_id = ?', (int)$query->getStoreId()); if ($searchType == Mage_CatalogSearch_Model_Fulltext::SEARCH_TYPE_FULLTEXT - || $searchType == Mage_CatalogSearch_Model_Fulltext::SEARCH_TYPE_COMBINE) { + || $searchType == Mage_CatalogSearch_Model_Fulltext::SEARCH_TYPE_COMBINE + ) { $bind[':query'] = implode(' ', $preparedTerms[0]); $where = Mage::getResourceHelper('Mage_CatalogSearch') ->chooseFulltext($this->getMainTable(), $mainTableAlias, $select); } + if ($likeCond != '' && $searchType == Mage_CatalogSearch_Model_Fulltext::SEARCH_TYPE_COMBINE) { $where .= ($where ? ' OR ' : '') . $likeCond; - } - if ($likeCond != '' && $searchType == Mage_CatalogSearch_Model_Fulltext::SEARCH_TYPE_LIKE) { + } elseif ($likeCond != '' && $searchType == Mage_CatalogSearch_Model_Fulltext::SEARCH_TYPE_LIKE) { $select->columns(array('relevance' => new Zend_Db_Expr(0))); $where = $likeCond; } + if ($where != '') { $select->where($where); } @@ -400,7 +373,7 @@ public function getEavConfig() } /** - * Retrieve Searchable attributes + * Retrieve searchable attributes * * @param string $backendType * @return array @@ -410,13 +383,8 @@ protected function _getSearchableAttributes($backendType = null) if (is_null($this->_searchableAttributes)) { $this->_searchableAttributes = array(); - $entityType = $this->getEavConfig()->getEntityType(Mage_Catalog_Model_Product::ENTITY); - $entity = $entityType->getEntity(); + $productAttributeCollection = Mage::getResourceModel('Mage_Catalog_Model_Resource_Product_Attribute_Collection'); - $productAttributeCollection = Mage::getResourceModel( - 'Mage_Catalog_Model_Resource_Product_Attribute_Collection' - ) - ->setEntityTypeFilter($entityType->getEntityTypeId()); if ($this->_engine && $this->_engine->allowAdvancedIndex()) { $productAttributeCollection->addToIndexFilter(true); } else { @@ -424,16 +392,27 @@ protected function _getSearchableAttributes($backendType = null) } $attributes = $productAttributeCollection->getItems(); + Mage::dispatchEvent('catelogsearch_searchable_attributes_load_after', array( + 'engine' => $this->_engine, + 'attributes' => $attributes + )); + + $entity = $this->getEavConfig() + ->getEntityType(Mage_Catalog_Model_Product::ENTITY) + ->getEntity(); + foreach ($attributes as $attribute) { $attribute->setEntity($entity); - $this->_searchableAttributes[$attribute->getId()] = $attribute; } + + $this->_searchableAttributes = $attributes; } + if (!is_null($backendType)) { $attributes = array(); - foreach ($this->_searchableAttributes as $attribute) { + foreach ($this->_searchableAttributes as $attributeId => $attribute) { if ($attribute->getBackendType() == $backendType) { - $attributes[$attribute->getId()] = $attribute; + $attributes[$attributeId] = $attribute; } } @@ -456,14 +435,14 @@ protected function _getSearchableAttribute($attribute) if (isset($attributes[$attribute])) { return $attributes[$attribute]; } - } - elseif (is_string($attribute)) { + } elseif (is_string($attribute)) { foreach ($attributes as $attributeModel) { if ($attributeModel->getAttributeCode() == $attribute) { return $attributeModel; } } } + return $this->getEavConfig()->getAttribute(Mage_Catalog_Model_Product::ENTITY, $attribute); } @@ -587,6 +566,7 @@ protected function _getProductEmulator() { $productEmulator = new Varien_Object(); $productEmulator->setIdFieldName('entity_id'); + return $productEmulator; } @@ -623,33 +603,30 @@ protected function _prepareProductIndex($indexData, $productData, $storeId) } } - foreach ($indexData as $attributeData) { + foreach ($indexData as $entityId => $attributeData) { foreach ($attributeData as $attributeId => $attributeValue) { $value = $this->_getAttributeValue($attributeId, $attributeValue, $storeId); if (!is_null($value) && $value !== false) { - $code = $this->_getSearchableAttribute($attributeId)->getAttributeCode(); - //For grouped products - if (isset($index[$code])) { - if (!is_array($index[$code])) { - $index[$code] = array($index[$code]); - } - $index[$code][] = $value; - } - //For other types of products - else { - $index[$code] = $value; + $attributeCode = $this->_getSearchableAttribute($attributeId)->getAttributeCode(); + + if (isset($index[$attributeCode])) { + $index[$attributeCode][$entityId] = $value; + } else { + $index[$attributeCode] = array($entityId => $value); } } } } - $product = $this->_getProductEmulator() - ->setId($productData['entity_id']) - ->setTypeId($productData['type_id']) - ->setStoreId($storeId); - $typeInstance = $this->_getProductTypeInstance($productData['type_id']); - if ($data = $typeInstance->getSearchableData($product)) { - $index['options'] = $data; + if (!$this->_engine->allowAdvancedIndex()) { + $product = $this->_getProductEmulator() + ->setId($productData['entity_id']) + ->setTypeId($productData['type_id']) + ->setStoreId($storeId); + $typeInstance = $this->_getProductTypeInstance($productData['type_id']); + if ($data = $typeInstance->getSearchableData($product)) { + $index['options'] = $data; + } } if (isset($productData['in_stock'])) { @@ -657,10 +634,6 @@ protected function _prepareProductIndex($indexData, $productData, $storeId) } if ($this->_engine) { - if ($this->_engine->allowAdvancedIndex()) { - $index += $this->_engine->addAllowedAdvancedIndexField($productData); - } - return $this->_engine->prepareEntityIndex($index, $this->_separator); } @@ -678,33 +651,50 @@ protected function _prepareProductIndex($indexData, $productData, $storeId) protected function _getAttributeValue($attributeId, $value, $storeId) { $attribute = $this->_getSearchableAttribute($attributeId); - if (!($attribute->getIsSearchable() || - $attribute->getIsVisibleInAdvancedSearch() || - $attribute->getIsFilterable() || - $attribute->getIsFilterableInSearch())) { - return null; + if (!$attribute->getIsSearchable()) { + if ($this->_engine->allowAdvancedIndex()) { + if ($attribute->getAttributeCode() == 'visibility') { + return $value; + } elseif (!($attribute->getIsVisibleInAdvancedSearch() + || $attribute->getIsFilterable() + || $attribute->getIsFilterableInSearch() + || $attribute->getUsedForSortBy()) + ) { + return null; + } + } else { + return null; + } } if ($attribute->usesSource()) { + if ($this->_engine->allowAdvancedIndex()) { + return $value; + } + $attribute->setStoreId($storeId); $value = $attribute->getSource()->getOptionText($value); - } - if ($attribute->getBackendType() == 'datetime') { - $value = $this->_getStoreDate($storeId, $value); - } - $inputType = $attribute->getFrontend()->getInputType(); - if ($inputType == 'price') { - $value = Mage::app()->getStore($storeId)->roundPrice($value); - } + if (is_array($value)) { + $value = implode($this->_separator, $value); + } elseif (empty($value)) { + $inputType = $attribute->getFrontend()->getInputType(); + if ($inputType == 'select' || $inputType == 'multiselect') { + return null; + } + } - if (is_array($value)) { - $value = implode($this->_separator, $value); - } elseif (empty($value) && ($inputType == 'select' || $inputType == 'multiselect')) { - return null; + $value = preg_replace("#\s+#siu", ' ', trim(strip_tags($value))); + } elseif ($attribute->getBackendType() == 'datetime') { + $value = $this->_getStoreDate($storeId, $value); + } else { + $inputType = $attribute->getFrontend()->getInputType(); + if ($inputType == 'price') { + $value = Mage::app()->getStore($storeId)->roundPrice($value); + } } - return preg_replace("#\s+#siu", ' ', trim(strip_tags($value))); + return $value; } /** @@ -720,6 +710,7 @@ protected function _saveProductIndex($productId, $storeId, $index) if ($this->_engine) { $this->_engine->saveEntityIndex($productId, $storeId, $index); } + return $this; } @@ -735,6 +726,7 @@ protected function _saveProductIndexes($storeId, $productIndexes) if ($this->_engine) { $this->_engine->saveEntityIndexes($storeId, $productIndexes); } + return $this; } @@ -766,4 +758,24 @@ protected function _getStoreDate($storeId, $date = null) return null; } + + + + + + // Deprecated methods + + /** + * Update category products indexes + * + * deprecated after 1.6.2.0 + * + * @param array $productIds + * @param array $categoryIds + * @return Mage_CatalogSearch_Model_Resource_Fulltext + */ + public function updateCategoryIndex($productIds, $categoryIds) + { + return $this; + } } diff --git a/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext/Collection.php b/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext/Collection.php index 945d618fdabe3..4a0876f1acd88 100755 --- a/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext/Collection.php +++ b/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext/Engine.php b/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext/Engine.php index 24d1c79aa6016..ed4f9cef5d9a3 100755 --- a/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext/Engine.php +++ b/app/code/core/Mage/CatalogSearch/Model/Resource/Fulltext/Engine.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -72,10 +72,9 @@ public function saveEntityIndex($entityId, $storeId, $index, $entity = 'product' */ public function saveEntityIndexes($storeId, $entityIndexes, $entity = 'product') { - $adapter = $this->_getWriteAdapter(); $data = array(); $storeId = (int)$storeId; - foreach ($entityIndexes as $entityId => &$index) { + foreach ($entityIndexes as $entityId => $index) { $data[] = array( 'product_id' => (int)$entityId, 'store_id' => $storeId, @@ -91,6 +90,16 @@ public function saveEntityIndexes($storeId, $entityIndexes, $entity = 'product') return $this; } + /** + * Retrieve allowed visibility values for current engine + * + * @return array + */ + public function getAllowedVisibility() + { + return Mage::getSingleton('Mage_Catalog_Model_Product_Visibility')->getVisibleInSearchIds(); + } + /** * Define if current search engine supports advanced index * diff --git a/app/code/core/Mage/CatalogSearch/Model/Resource/Helper/Mysql4.php b/app/code/core/Mage/CatalogSearch/Model/Resource/Helper/Mysql4.php index 429a276c7767d..4659e58315a62 100644 --- a/app/code/core/Mage/CatalogSearch/Model/Resource/Helper/Mysql4.php +++ b/app/code/core/Mage/CatalogSearch/Model/Resource/Helper/Mysql4.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/Model/Resource/Indexer/Fulltext.php b/app/code/core/Mage/CatalogSearch/Model/Resource/Indexer/Fulltext.php index c30736df4b8e4..1c76213fdf27b 100644 --- a/app/code/core/Mage/CatalogSearch/Model/Resource/Indexer/Fulltext.php +++ b/app/code/core/Mage/CatalogSearch/Model/Resource/Indexer/Fulltext.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/Model/Resource/Query.php b/app/code/core/Mage/CatalogSearch/Model/Resource/Query.php index 2b41954da6f50..e4f845c3fbd53 100755 --- a/app/code/core/Mage/CatalogSearch/Model/Resource/Query.php +++ b/app/code/core/Mage/CatalogSearch/Model/Resource/Query.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/Model/Resource/Query/Collection.php b/app/code/core/Mage/CatalogSearch/Model/Resource/Query/Collection.php index 1508d4993daea..2bdfecf81f252 100755 --- a/app/code/core/Mage/CatalogSearch/Model/Resource/Query/Collection.php +++ b/app/code/core/Mage/CatalogSearch/Model/Resource/Query/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/Model/Resource/Search/Collection.php b/app/code/core/Mage/CatalogSearch/Model/Resource/Search/Collection.php index c8f3c97dbcdd5..8fd21589c6484 100755 --- a/app/code/core/Mage/CatalogSearch/Model/Resource/Search/Collection.php +++ b/app/code/core/Mage/CatalogSearch/Model/Resource/Search/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/Model/Session.php b/app/code/core/Mage/CatalogSearch/Model/Session.php index 618832dae2962..c5dffd0d761bd 100644 --- a/app/code/core/Mage/CatalogSearch/Model/Session.php +++ b/app/code/core/Mage/CatalogSearch/Model/Session.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/Model/System/Config/Backend/Sitemap.php b/app/code/core/Mage/CatalogSearch/Model/System/Config/Backend/Sitemap.php index 6112ae20bce25..81668bc5ba0d3 100644 --- a/app/code/core/Mage/CatalogSearch/Model/System/Config/Backend/Sitemap.php +++ b/app/code/core/Mage/CatalogSearch/Model/System/Config/Backend/Sitemap.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/controllers/AdvancedController.php b/app/code/core/Mage/CatalogSearch/controllers/AdvancedController.php index 37ffcab31eac2..0d85f235767bd 100644 --- a/app/code/core/Mage/CatalogSearch/controllers/AdvancedController.php +++ b/app/code/core/Mage/CatalogSearch/controllers/AdvancedController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/controllers/AjaxController.php b/app/code/core/Mage/CatalogSearch/controllers/AjaxController.php index 67aeaff046f81..0999c3cfb3128 100644 --- a/app/code/core/Mage/CatalogSearch/controllers/AjaxController.php +++ b/app/code/core/Mage/CatalogSearch/controllers/AjaxController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/controllers/ResultController.php b/app/code/core/Mage/CatalogSearch/controllers/ResultController.php index eead9256fc114..d6cf15e0fc16a 100644 --- a/app/code/core/Mage/CatalogSearch/controllers/ResultController.php +++ b/app/code/core/Mage/CatalogSearch/controllers/ResultController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -48,7 +48,7 @@ public function indexAction() $query->setStoreId(Mage::app()->getStore()->getId()); - if ($query->getQueryText()) { + if ($query->getQueryText() != '') { if (Mage::helper('Mage_CatalogSearch_Helper_Data')->isMinQueryLength()) { $query->setId(0) ->setIsActive(1) diff --git a/app/code/core/Mage/CatalogSearch/controllers/TermController.php b/app/code/core/Mage/CatalogSearch/controllers/TermController.php index 6fb464f2f428a..514a6bb98afe0 100644 --- a/app/code/core/Mage/CatalogSearch/controllers/TermController.php +++ b/app/code/core/Mage/CatalogSearch/controllers/TermController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/etc/adminhtml.xml b/app/code/core/Mage/CatalogSearch/etc/adminhtml.xml index 14b1beb37e88c..e35d35a25a851 100644 --- a/app/code/core/Mage/CatalogSearch/etc/adminhtml.xml +++ b/app/code/core/Mage/CatalogSearch/etc/adminhtml.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/CatalogSearch/etc/config.xml b/app/code/core/Mage/CatalogSearch/etc/config.xml index fa29e4e878ebd..6b14e58457b0d 100644 --- a/app/code/core/Mage/CatalogSearch/etc/config.xml +++ b/app/code/core/Mage/CatalogSearch/etc/config.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/CatalogSearch/etc/system.xml b/app/code/core/Mage/CatalogSearch/etc/system.xml index 3109ed77b5470..da257d44b51bc 100644 --- a/app/code/core/Mage/CatalogSearch/etc/system.xml +++ b/app/code/core/Mage/CatalogSearch/etc/system.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/CatalogSearch/sql/catalogsearch_setup/install-1.6.0.0.php b/app/code/core/Mage/CatalogSearch/sql/catalogsearch_setup/install-1.6.0.0.php index ef2dfc3965ce2..aa8ae1236c533 100644 --- a/app/code/core/Mage/CatalogSearch/sql/catalogsearch_setup/install-1.6.0.0.php +++ b/app/code/core/Mage/CatalogSearch/sql/catalogsearch_setup/install-1.6.0.0.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_CatalogSearch - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/view/frontend/advanced/form.phtml b/app/code/core/Mage/CatalogSearch/view/frontend/advanced/form.phtml index 2b72fa63e4093..3e8e85abf13ca 100644 --- a/app/code/core/Mage/CatalogSearch/view/frontend/advanced/form.phtml +++ b/app/code/core/Mage/CatalogSearch/view/frontend/advanced/form.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -31,6 +31,7 @@ * @see Mage_CatalogSearch_Block_Advanced_Form */ ?> +helper('Mage_CatalogSearch_Helper_Data')->getMaxQueryLength();?>

    __('Catalog Advanced Search') ?>

    @@ -46,16 +47,16 @@ getAttributeInputType($_attribute)): case 'number': ?>
    - + - - +
    - + - - + (getCurrency($_attribute); ?>)
    - +
    diff --git a/app/code/core/Mage/CatalogSearch/view/frontend/advanced/result.phtml b/app/code/core/Mage/CatalogSearch/view/frontend/advanced/result.phtml index 2c084b73f1a04..d8b08028640b0 100644 --- a/app/code/core/Mage/CatalogSearch/view/frontend/advanced/result.phtml +++ b/app/code/core/Mage/CatalogSearch/view/frontend/advanced/result.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/CatalogSearch/view/frontend/form.mini.phtml b/app/code/core/Mage/CatalogSearch/view/frontend/form.mini.phtml index 7aa1d383f99a8..55c58d50f7078 100644 --- a/app/code/core/Mage/CatalogSearch/view/frontend/form.mini.phtml +++ b/app/code/core/Mage/CatalogSearch/view/frontend/form.mini.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/CatalogSearch/view/frontend/layout.xml b/app/code/core/Mage/CatalogSearch/view/frontend/layout.xml index 826b331379e41..1eeb6d0f8e496 100644 --- a/app/code/core/Mage/CatalogSearch/view/frontend/layout.xml +++ b/app/code/core/Mage/CatalogSearch/view/frontend/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/CatalogSearch/view/frontend/result.phtml b/app/code/core/Mage/CatalogSearch/view/frontend/result.phtml index 99abb41fc109e..07edbd99bb81d 100644 --- a/app/code/core/Mage/CatalogSearch/view/frontend/result.phtml +++ b/app/code/core/Mage/CatalogSearch/view/frontend/result.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/CatalogSearch/view/frontend/term.phtml b/app/code/core/Mage/CatalogSearch/view/frontend/term.phtml index 3724a06b3af24..311edc6efbba3 100644 --- a/app/code/core/Mage/CatalogSearch/view/frontend/term.phtml +++ b/app/code/core/Mage/CatalogSearch/view/frontend/term.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Centinel/Block/Adminhtml/Validation.php b/app/code/core/Mage/Centinel/Block/Adminhtml/Validation.php index 4979a68fb1b03..eff8637bdc701 100644 --- a/app/code/core/Mage/Centinel/Block/Adminhtml/Validation.php +++ b/app/code/core/Mage/Centinel/Block/Adminhtml/Validation.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Centinel - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Centinel/Block/Adminhtml/Validation/Form.php b/app/code/core/Mage/Centinel/Block/Adminhtml/Validation/Form.php index a69802a32402a..fd8c93b714bb3 100644 --- a/app/code/core/Mage/Centinel/Block/Adminhtml/Validation/Form.php +++ b/app/code/core/Mage/Centinel/Block/Adminhtml/Validation/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Centinel - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Centinel/Block/Authentication.php b/app/code/core/Mage/Centinel/Block/Authentication.php index 777190794970b..593abb8400160 100644 --- a/app/code/core/Mage/Centinel/Block/Authentication.php +++ b/app/code/core/Mage/Centinel/Block/Authentication.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Centinel - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Centinel/Block/Authentication/Complete.php b/app/code/core/Mage/Centinel/Block/Authentication/Complete.php index 0304134ac4313..df9fac2aec2a3 100644 --- a/app/code/core/Mage/Centinel/Block/Authentication/Complete.php +++ b/app/code/core/Mage/Centinel/Block/Authentication/Complete.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Centinel - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Centinel/Block/Authentication/Start.php b/app/code/core/Mage/Centinel/Block/Authentication/Start.php index 6d44192db738b..56114b7a0fb6d 100644 --- a/app/code/core/Mage/Centinel/Block/Authentication/Start.php +++ b/app/code/core/Mage/Centinel/Block/Authentication/Start.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Centinel - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Centinel/Block/Logo.php b/app/code/core/Mage/Centinel/Block/Logo.php index 336015af8d7d9..4b9ca69a46970 100644 --- a/app/code/core/Mage/Centinel/Block/Logo.php +++ b/app/code/core/Mage/Centinel/Block/Logo.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Centinel - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Centinel/Helper/Data.php b/app/code/core/Mage/Centinel/Helper/Data.php index ae2b58cd1b2c4..8bdc60494ff27 100644 --- a/app/code/core/Mage/Centinel/Helper/Data.php +++ b/app/code/core/Mage/Centinel/Helper/Data.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Centinel - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Centinel/Model/Api.php b/app/code/core/Mage/Centinel/Model/Api.php index 09ec79f48cd19..4a179ca38080e 100644 --- a/app/code/core/Mage/Centinel/Model/Api.php +++ b/app/code/core/Mage/Centinel/Model/Api.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Centinel - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Centinel/Model/Config.php b/app/code/core/Mage/Centinel/Model/Config.php index 6356deec159c5..fdd1b36787cb6 100644 --- a/app/code/core/Mage/Centinel/Model/Config.php +++ b/app/code/core/Mage/Centinel/Model/Config.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Centinel - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Centinel/Model/Observer.php b/app/code/core/Mage/Centinel/Model/Observer.php index d5083110c9ac6..370b80dccc05c 100644 --- a/app/code/core/Mage/Centinel/Model/Observer.php +++ b/app/code/core/Mage/Centinel/Model/Observer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Centinel - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Centinel/Model/Service.php b/app/code/core/Mage/Centinel/Model/Service.php index e924959694af4..ea93cc9b7d73e 100644 --- a/app/code/core/Mage/Centinel/Model/Service.php +++ b/app/code/core/Mage/Centinel/Model/Service.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Centinel - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Centinel/Model/Session.php b/app/code/core/Mage/Centinel/Model/Session.php index 59943acfd4883..4096e0578728c 100644 --- a/app/code/core/Mage/Centinel/Model/Session.php +++ b/app/code/core/Mage/Centinel/Model/Session.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Centinel - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Centinel/Model/State/Jcb.php b/app/code/core/Mage/Centinel/Model/State/Jcb.php index 0a81840d91ad6..45fb5f967786e 100644 --- a/app/code/core/Mage/Centinel/Model/State/Jcb.php +++ b/app/code/core/Mage/Centinel/Model/State/Jcb.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Centinel - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Centinel/Model/State/Mastercard.php b/app/code/core/Mage/Centinel/Model/State/Mastercard.php index a2a6f5a75ee8d..b6a586b9e6c3c 100644 --- a/app/code/core/Mage/Centinel/Model/State/Mastercard.php +++ b/app/code/core/Mage/Centinel/Model/State/Mastercard.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Centinel - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Centinel/Model/State/Visa.php b/app/code/core/Mage/Centinel/Model/State/Visa.php index e4f2b51a0d1b1..080235c340579 100644 --- a/app/code/core/Mage/Centinel/Model/State/Visa.php +++ b/app/code/core/Mage/Centinel/Model/State/Visa.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Centinel - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Centinel/Model/StateAbstract.php b/app/code/core/Mage/Centinel/Model/StateAbstract.php index b235b128d310a..7da0655174d4f 100644 --- a/app/code/core/Mage/Centinel/Model/StateAbstract.php +++ b/app/code/core/Mage/Centinel/Model/StateAbstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Centinel - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Centinel/controllers/Adminhtml/Centinel/IndexController.php b/app/code/core/Mage/Centinel/controllers/Adminhtml/Centinel/IndexController.php index ba9915431c6d4..fbd33369be37a 100644 --- a/app/code/core/Mage/Centinel/controllers/Adminhtml/Centinel/IndexController.php +++ b/app/code/core/Mage/Centinel/controllers/Adminhtml/Centinel/IndexController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Centinel - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Centinel/controllers/IndexController.php b/app/code/core/Mage/Centinel/controllers/IndexController.php index 932fab32dfff5..e624e05c3ebbe 100644 --- a/app/code/core/Mage/Centinel/controllers/IndexController.php +++ b/app/code/core/Mage/Centinel/controllers/IndexController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Centinel - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Centinel/etc/config.xml b/app/code/core/Mage/Centinel/etc/config.xml index cccb09ad7fa24..42428bcc0a7f6 100644 --- a/app/code/core/Mage/Centinel/etc/config.xml +++ b/app/code/core/Mage/Centinel/etc/config.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Centinel - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Centinel/etc/system.xml b/app/code/core/Mage/Centinel/etc/system.xml index 9b35ddeb7ed6a..67eec97b25fc0 100644 --- a/app/code/core/Mage/Centinel/etc/system.xml +++ b/app/code/core/Mage/Centinel/etc/system.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Centinel - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Centinel/view/adminhtml/authentication/complete.phtml b/app/code/core/Mage/Centinel/view/adminhtml/authentication/complete.phtml index c7eaa698bc275..a1d5041761f83 100644 --- a/app/code/core/Mage/Centinel/view/adminhtml/authentication/complete.phtml +++ b/app/code/core/Mage/Centinel/view/adminhtml/authentication/complete.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Centinel/view/adminhtml/authentication/start.phtml b/app/code/core/Mage/Centinel/view/adminhtml/authentication/start.phtml index 7d57ed85cb668..11b2d86acf974 100644 --- a/app/code/core/Mage/Centinel/view/adminhtml/authentication/start.phtml +++ b/app/code/core/Mage/Centinel/view/adminhtml/authentication/start.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Centinel/view/adminhtml/layout.xml b/app/code/core/Mage/Centinel/view/adminhtml/layout.xml index 68c49300a3d4a..905bb6d663bb6 100644 --- a/app/code/core/Mage/Centinel/view/adminhtml/layout.xml +++ b/app/code/core/Mage/Centinel/view/adminhtml/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Centinel/view/adminhtml/order_create.js b/app/code/core/Mage/Centinel/view/adminhtml/order_create.js index bcd9d4149a614..2af500a14583a 100644 --- a/app/code/core/Mage/Centinel/view/adminhtml/order_create.js +++ b/app/code/core/Mage/Centinel/view/adminhtml/order_create.js @@ -19,7 +19,7 @@ * * @category Mage * @package Mage_Adminhtml - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ var centinelValidator = new Class.create(); diff --git a/app/code/core/Mage/Centinel/view/adminhtml/validation/form.phtml b/app/code/core/Mage/Centinel/view/adminhtml/validation/form.phtml index f572a48bf453a..afa509dd3fa81 100644 --- a/app/code/core/Mage/Centinel/view/adminhtml/validation/form.phtml +++ b/app/code/core/Mage/Centinel/view/adminhtml/validation/form.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -29,7 +29,7 @@ - + diff --git a/app/code/core/Mage/Paypal/view/frontend/express/review.phtml b/app/code/core/Mage/Paypal/view/frontend/express/review.phtml index 8844d19c2b24b..2c5493471147c 100644 --- a/app/code/core/Mage/Paypal/view/frontend/express/review.phtml +++ b/app/code/core/Mage/Paypal/view/frontend/express/review.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Paypal/view/frontend/express/review/details.phtml b/app/code/core/Mage/Paypal/view/frontend/express/review/details.phtml index 85c4f223c68e8..210c56f83eb88 100644 --- a/app/code/core/Mage/Paypal/view/frontend/express/review/details.phtml +++ b/app/code/core/Mage/Paypal/view/frontend/express/review/details.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Paypal/view/frontend/express/shortcut.phtml b/app/code/core/Mage/Paypal/view/frontend/express/shortcut.phtml index d6d53b27101be..2648cdb86fdd2 100644 --- a/app/code/core/Mage/Paypal/view/frontend/express/shortcut.phtml +++ b/app/code/core/Mage/Paypal/view/frontend/express/shortcut.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Paypal/view/frontend/hss/form.phtml b/app/code/core/Mage/Paypal/view/frontend/hss/form.phtml index 513d9d3a5481f..2567d7659b770 100644 --- a/app/code/core/Mage/Paypal/view/frontend/hss/form.phtml +++ b/app/code/core/Mage/Paypal/view/frontend/hss/form.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Paypal/view/frontend/hss/iframe.phtml b/app/code/core/Mage/Paypal/view/frontend/hss/iframe.phtml index 1746f4502e8b5..3bf2e229d507e 100644 --- a/app/code/core/Mage/Paypal/view/frontend/hss/iframe.phtml +++ b/app/code/core/Mage/Paypal/view/frontend/hss/iframe.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Paypal/view/frontend/hss/info.phtml b/app/code/core/Mage/Paypal/view/frontend/hss/info.phtml index bcc14191a7064..ac8abc841df9c 100644 --- a/app/code/core/Mage/Paypal/view/frontend/hss/info.phtml +++ b/app/code/core/Mage/Paypal/view/frontend/hss/info.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Paypal/view/frontend/hss/js.phtml b/app/code/core/Mage/Paypal/view/frontend/hss/js.phtml index e5ba7a3a85fb8..c3457797afbe5 100644 --- a/app/code/core/Mage/Paypal/view/frontend/hss/js.phtml +++ b/app/code/core/Mage/Paypal/view/frontend/hss/js.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Paypal/view/frontend/hss/redirect.phtml b/app/code/core/Mage/Paypal/view/frontend/hss/redirect.phtml index a1b7983356c54..37aff5c332de3 100644 --- a/app/code/core/Mage/Paypal/view/frontend/hss/redirect.phtml +++ b/app/code/core/Mage/Paypal/view/frontend/hss/redirect.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -32,6 +32,9 @@ diff --git a/app/code/core/Mage/Weee/Block/Element/Weee/Tax.php b/app/code/core/Mage/Weee/Block/Element/Weee/Tax.php index a83d7b2484c9c..967d49d247b27 100644 --- a/app/code/core/Mage/Weee/Block/Element/Weee/Tax.php +++ b/app/code/core/Mage/Weee/Block/Element/Weee/Tax.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Weee - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Weee/Block/Renderer/Weee/Tax.php b/app/code/core/Mage/Weee/Block/Renderer/Weee/Tax.php index 08e2dc7a15edb..a4559043cc6cb 100644 --- a/app/code/core/Mage/Weee/Block/Renderer/Weee/Tax.php +++ b/app/code/core/Mage/Weee/Block/Renderer/Weee/Tax.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Weee - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Weee/Helper/Data.php b/app/code/core/Mage/Weee/Helper/Data.php index 9e29af583c25b..d334636a43ed1 100644 --- a/app/code/core/Mage/Weee/Helper/Data.php +++ b/app/code/core/Mage/Weee/Helper/Data.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Weee - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Weee/Model/Attribute/Backend/Weee/Tax.php b/app/code/core/Mage/Weee/Model/Attribute/Backend/Weee/Tax.php index c58d79da58565..54185c68fd001 100644 --- a/app/code/core/Mage/Weee/Model/Attribute/Backend/Weee/Tax.php +++ b/app/code/core/Mage/Weee/Model/Attribute/Backend/Weee/Tax.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Weee - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Weee/Model/Config/Source/Display.php b/app/code/core/Mage/Weee/Model/Config/Source/Display.php index 87719766cc940..7d5d01a437445 100644 --- a/app/code/core/Mage/Weee/Model/Config/Source/Display.php +++ b/app/code/core/Mage/Weee/Model/Config/Source/Display.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Weee - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Weee_Model_Config_Source_Display diff --git a/app/code/core/Mage/Weee/Model/Observer.php b/app/code/core/Mage/Weee/Model/Observer.php index 90a0bfe028a6d..c3f7d09a3fc16 100644 --- a/app/code/core/Mage/Weee/Model/Observer.php +++ b/app/code/core/Mage/Weee/Model/Observer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Weee - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -200,15 +200,18 @@ public function updateCofigurableProductOptions(Varien_Event_Observer $observer) if (!$_product) { return $this; } - if (!Mage::helper('Mage_Weee_Helper_Data')->typeOfDisplay($_product, array(0, 1, 4))) { - return $this; - } + $amount = Mage::helper('Mage_Weee_Helper_Data')->getAmount($_product); $origAmount = Mage::helper('Mage_Weee_Helper_Data')->getOriginalAmount($_product); $options['oldPlusDisposition'] = $origAmount; $options['plusDisposition'] = $amount; + // Exclude Weee amount from excluding tax amount + if (!$weeeHelper->typeOfDisplay($_product, array(0, 1, 4))) { + $options['exclDisposition'] = true; + } + $response->setAdditionalOptions($options); return $this; @@ -222,7 +225,9 @@ public function updateCofigurableProductOptions(Varien_Event_Observer $observer) */ public function updateBundleProductOptions(Varien_Event_Observer $observer) { - if (!Mage::helper('Mage_Weee_Helper_Data')->isEnabled()) { + /* @var $weeeHelper Mage_Weee_Helper_Data */ + $weeeHelper = Mage::helper('Mage_Weee_Helper_Data'); + if (!$weeeHelper->isEnabled()) { return $this; } @@ -231,20 +236,25 @@ public function updateBundleProductOptions(Varien_Event_Observer $observer) $options = $response->getAdditionalOptions(); $_product = Mage::registry('current_product'); - if (!Mage::helper('Mage_Weee_Helper_Data')->typeOfDisplay($_product, array(0, 1, 4))) { - return $this; - } + $typeDynamic = Mage_Bundle_Block_Adminhtml_Catalog_Product_Edit_Tab_Attributes_Extend::DYNAMIC; if (!$_product || $_product->getPriceType() != $typeDynamic) { return $this; } - $amount = Mage::helper('Mage_Weee_Helper_Data')->getAmount($selection); - $options['plusDisposition'] = $amount; + $amount = $weeeHelper->getAmount($selection); + $attributes = $weeeHelper->getProductWeeeAttributes($_product, null, null, null, $weeeHelper->isTaxable()); + $amountInclTaxes = $weeeHelper->getAmountInclTaxes($attributes); + $taxes = $amountInclTaxes - $amount; + $options['plusDisposition'] = $amount; + $options['plusDispositionTax'] = ($taxes < 0) ? 0 : $taxes; + // Exclude Weee amount from excluding tax amount + if (!$weeeHelper->typeOfDisplay($_product, array(0, 1, 4))) { + $options['exclDisposition'] = true; + } $response->setAdditionalOptions($options); return $this; } } - diff --git a/app/code/core/Mage/Weee/Model/Resource/Attribute/Backend/Weee/Tax.php b/app/code/core/Mage/Weee/Model/Resource/Attribute/Backend/Weee/Tax.php index c6e86f91c1f36..81bd2d4833a6c 100755 --- a/app/code/core/Mage/Weee/Model/Resource/Attribute/Backend/Weee/Tax.php +++ b/app/code/core/Mage/Weee/Model/Resource/Attribute/Backend/Weee/Tax.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Weee - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Weee/Model/Resource/Setup.php b/app/code/core/Mage/Weee/Model/Resource/Setup.php index d736d91468e39..15738964c17e1 100755 --- a/app/code/core/Mage/Weee/Model/Resource/Setup.php +++ b/app/code/core/Mage/Weee/Model/Resource/Setup.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Weee - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Weee/Model/Resource/Tax.php b/app/code/core/Mage/Weee/Model/Resource/Tax.php index d438284a8e551..ea2f6b35d7e65 100755 --- a/app/code/core/Mage/Weee/Model/Resource/Tax.php +++ b/app/code/core/Mage/Weee/Model/Resource/Tax.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Weee - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Weee/Model/Tax.php b/app/code/core/Mage/Weee/Model/Tax.php index 78456a7d23051..4e9ca0a8f59ce 100644 --- a/app/code/core/Mage/Weee/Model/Tax.php +++ b/app/code/core/Mage/Weee/Model/Tax.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Weee - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -163,18 +163,17 @@ public function getProductWeeeAttributes( $taxAmount = $amount = 0; $amount = $value; - /** - * We can't use FPT imcluding/excluding tax - */ -// if ($calculateTax && Mage::helper('Mage_Weee_Helper_Data')->isTaxable($store)) { -// $defaultPercent = Mage::getModel('Mage_Tax_Model_Calculation') -// ->getRate($defaultRateRequest -// ->setProductClassId($product->getTaxClassId())); -// $currentPercent = $product->getTaxPercent(); -// -// $taxAmount = Mage::app()->getStore()->roundPrice($value/(100+$defaultPercent)*$currentPercent); -// $amount = $value - $taxAmount; -// } + if ($calculateTax && Mage::helper('Mage_Weee_Helper_Data')->isTaxable($store)) { + $defaultPercent = Mage::getModel('Mage_Tax_Model_Calculation') + ->getRate($defaultRateRequest + ->setProductClassId($product->getTaxClassId())); + $currentPercent = $product->getTaxPercent(); + if (Mage::helper('Mage_Tax_Helper_Data')->priceIncludesTax($store)) { + $taxAmount = Mage::app()->getStore()->roundPrice($value/(100+$defaultPercent)*$currentPercent); + } else { + $taxAmount = Mage::app()->getStore()->roundPrice($value*$defaultPercent/100); + } + } $one = new Varien_Object(); $one->setName(Mage::helper('Mage_Catalog_Helper_Data')->__($attribute->getFrontend()->getLabel())) diff --git a/app/code/core/Mage/Weee/Model/Total/Creditmemo/Weee.php b/app/code/core/Mage/Weee/Model/Total/Creditmemo/Weee.php index 68a681be72460..87f7574a2755d 100644 --- a/app/code/core/Mage/Weee/Model/Total/Creditmemo/Weee.php +++ b/app/code/core/Mage/Weee/Model/Total/Creditmemo/Weee.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Weee - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Weee/Model/Total/Invoice/Weee.php b/app/code/core/Mage/Weee/Model/Total/Invoice/Weee.php index 9f7e07a5464de..00124bcc8279b 100644 --- a/app/code/core/Mage/Weee/Model/Total/Invoice/Weee.php +++ b/app/code/core/Mage/Weee/Model/Total/Invoice/Weee.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Weee - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Weee/Model/Total/Quote/Nominal/Weee.php b/app/code/core/Mage/Weee/Model/Total/Quote/Nominal/Weee.php index bd99fbea00bc5..272a11074d73c 100644 --- a/app/code/core/Mage/Weee/Model/Total/Quote/Nominal/Weee.php +++ b/app/code/core/Mage/Weee/Model/Total/Quote/Nominal/Weee.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Weee - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Weee/Model/Total/Quote/Weee.php b/app/code/core/Mage/Weee/Model/Total/Quote/Weee.php index f9737c3319994..70fac9d460138 100644 --- a/app/code/core/Mage/Weee/Model/Total/Quote/Weee.php +++ b/app/code/core/Mage/Weee/Model/Total/Quote/Weee.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Weee - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Weee/etc/config.xml b/app/code/core/Mage/Weee/etc/config.xml index 476440bc5d89c..29be61b6ef4dc 100644 --- a/app/code/core/Mage/Weee/etc/config.xml +++ b/app/code/core/Mage/Weee/etc/config.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Weee - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Weee/etc/fieldset.xml b/app/code/core/Mage/Weee/etc/fieldset.xml index 07ffd225d3b71..70abfb0784dc0 100644 --- a/app/code/core/Mage/Weee/etc/fieldset.xml +++ b/app/code/core/Mage/Weee/etc/fieldset.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Weee - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Weee/etc/system.xml b/app/code/core/Mage/Weee/etc/system.xml index 0316bd947bc0c..c8f53007e1d51 100644 --- a/app/code/core/Mage/Weee/etc/system.xml +++ b/app/code/core/Mage/Weee/etc/system.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Weee - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Weee/sql/weee_setup/install-1.6.0.0.php b/app/code/core/Mage/Weee/sql/weee_setup/install-1.6.0.0.php index 78ae551b65cea..a244d6c26ef0b 100644 --- a/app/code/core/Mage/Weee/sql/weee_setup/install-1.6.0.0.php +++ b/app/code/core/Mage/Weee/sql/weee_setup/install-1.6.0.0.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Weee - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Weee/view/adminhtml/renderer/tax.phtml b/app/code/core/Mage/Weee/view/adminhtml/renderer/tax.phtml index b66a3891abfde..70e777c05da72 100644 --- a/app/code/core/Mage/Weee/view/adminhtml/renderer/tax.phtml +++ b/app/code/core/Mage/Weee/view/adminhtml/renderer/tax.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -69,7 +69,7 @@ - + diff --git a/app/code/core/Mage/Weee/view/frontend/layout.xml b/app/code/core/Mage/Weee/view/frontend/layout.xml index 66670252f092b..f2421dbe3d2be 100644 --- a/app/code/core/Mage/Weee/view/frontend/layout.xml +++ b/app/code/core/Mage/Weee/view/frontend/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Weee/view/frontend/tax_toggle.js b/app/code/core/Mage/Weee/view/frontend/tax_toggle.js index 8de29e41ba092..55646c4eeae71 100644 --- a/app/code/core/Mage/Weee/view/frontend/tax_toggle.js +++ b/app/code/core/Mage/Weee/view/frontend/tax_toggle.js @@ -19,7 +19,7 @@ * * @category Varien * @package js - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget.php index cfd6883374d94..a38f760aafa73 100644 --- a/app/code/core/Mage/Widget/Block/Adminhtml/Widget.php +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -40,7 +40,7 @@ public function __construct() $this->_blockGroup = 'Mage_Widget'; $this->_controller = 'adminhtml'; $this->_mode = 'widget'; - $this->_headerText = 'Widget Insertion'; + $this->_headerText = $this->helper('Mage_Widget_Helper_Data')->__('Widget Insertion'); $this->removeButton('reset'); $this->removeButton('back'); @@ -49,7 +49,8 @@ public function __construct() $this->_updateButton('save', 'id', 'insert_button'); $this->_updateButton('save', 'onclick', 'wWidget.insertWidget()'); - $this->_formScripts[] = 'wWidget = new WysiwygWidget.Widget("widget_options_form", "select_widget_type", "widget_options", "' - . $this->getUrl('*/*/loadOptions').'", "' . $this->getRequest()->getParam('widget_target_id') . '");'; + $this->_formScripts[] = 'wWidget = new WysiwygWidget.Widget(' + . '"widget_options_form", "select_widget_type", "widget_options", "' + . $this->getUrl('*/*/loadOptions') .'", "' . $this->getRequest()->getParam('widget_target_id') . '");'; } } diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Chooser.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Chooser.php index 1468f81924b0a..7a07bdaa1d69f 100644 --- a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Chooser.php +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Chooser.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -180,13 +180,26 @@ protected function _toHtml() - + '; } } diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Form.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Form.php index 454bafbc07643..1ff5053134b1b 100644 --- a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Form.php +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance.php index 21f41fc392bc0..9f1abd41ec16d 100644 --- a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance.php +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit.php index 2d2966b9debcd..951092b6ea4d9 100644 --- a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit.php +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Block.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Block.php index 40ae3e4df7073..d51e456c01fed 100644 --- a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Block.php +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Block.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -66,7 +66,7 @@ public function setAllowedBlocks($allowedBlocks) */ public function addAllowedBlock($block) { - $this->_allowedBlocks[] = $type; + $this->_allowedBlocks[] = $block; return $this; } @@ -92,7 +92,7 @@ public function setLayoutHandle($layoutHandle) if (is_string($layoutHandle)) { $layoutHandle = explode(',', $layoutHandle); } - $this->_layoutHandle = array_merge(array('default'), $layoutHandle); + $this->_layoutHandle = array_merge(array('default'), (array)$layoutHandle); return $this; } @@ -155,7 +155,8 @@ protected function _toHtml() $selectBlock = $this->getLayout()->createBlock('Mage_Core_Block_Html_Select') ->setName('block') ->setClass('required-entry select') - ->setExtraParams('onchange="WidgetInstance.loadSelectBoxByType(\'block_template\', this.up(\'div.group_container\'), this.value)"') + ->setExtraParams('onchange="WidgetInstance.loadSelectBoxByType(\'block_template\',' + .' this.up(\'div.group_container\'), this.value)"') ->setOptions($this->getBlocks()) ->setValue($this->getSelected()); return parent::_toHtml().$selectBlock->toHtml(); diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php index 3b04b3261713e..d28fe5d92d2d0 100644 --- a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Layout.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Template.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Template.php index 1067b6597befe..ee6ed0b3730b6 100644 --- a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Template.php +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Chooser/Template.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Form.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Form.php index dad034723344e..272c81afd4d03 100644 --- a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Form.php +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php index 37ede86133535..23cbd24608a1d 100644 --- a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php index 6ffd0393d028b..5776a2b03b78b 100644 --- a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Properties.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Properties.php index 0631ec0e13446..bb8446c9f3c3e 100644 --- a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Properties.php +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Properties.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php index a42357df1d5d6..c6cf1d79313f8 100644 --- a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Settings.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tabs.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tabs.php index 2a6376150062c..a99365770aeb8 100644 --- a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tabs.php +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Edit/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Grid.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Grid.php index 7b024e65f9c60..84833cb76ef94 100644 --- a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Grid.php +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Instance/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Options.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Options.php index 3bd05446d4494..b24e4e03e848d 100644 --- a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Options.php +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Options.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Widget/Block/Interface.php b/app/code/core/Mage/Widget/Block/Interface.php index e53e5cb17330b..caa8ce6375c16 100644 --- a/app/code/core/Mage/Widget/Block/Interface.php +++ b/app/code/core/Mage/Widget/Block/Interface.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Widget/Helper/Data.php b/app/code/core/Mage/Widget/Helper/Data.php index b1e121a2512a2..923988b5dd295 100644 --- a/app/code/core/Mage/Widget/Helper/Data.php +++ b/app/code/core/Mage/Widget/Helper/Data.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Widget/Model/Observer.php b/app/code/core/Mage/Widget/Model/Observer.php index 16aaf7f31fc03..087cde685cef1 100644 --- a/app/code/core/Mage/Widget/Model/Observer.php +++ b/app/code/core/Mage/Widget/Model/Observer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Widget/Model/Resource/Widget.php b/app/code/core/Mage/Widget/Model/Resource/Widget.php index 30021bf73dcdd..bdc15b844a9a7 100755 --- a/app/code/core/Mage/Widget/Model/Resource/Widget.php +++ b/app/code/core/Mage/Widget/Model/Resource/Widget.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Widget/Model/Resource/Widget/Instance.php b/app/code/core/Mage/Widget/Model/Resource/Widget/Instance.php index fe5eaf2545414..7349b13685fd0 100755 --- a/app/code/core/Mage/Widget/Model/Resource/Widget/Instance.php +++ b/app/code/core/Mage/Widget/Model/Resource/Widget/Instance.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Widget/Model/Resource/Widget/Instance/Collection.php b/app/code/core/Mage/Widget/Model/Resource/Widget/Instance/Collection.php index 2309187b1ab22..a7645e5a71eb9 100755 --- a/app/code/core/Mage/Widget/Model/Resource/Widget/Instance/Collection.php +++ b/app/code/core/Mage/Widget/Model/Resource/Widget/Instance/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -34,6 +34,14 @@ */ class Mage_Widget_Model_Resource_Widget_Instance_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract { + /** + * Fields map for corellation names & real selected fields + * + * @var array + */ + protected $_map = array('fields' => array('type' => 'instance_type')); + + /** * Constructor * diff --git a/app/code/core/Mage/Widget/Model/Template/Filter.php b/app/code/core/Mage/Widget/Model/Template/Filter.php index 4793ea368e9aa..7cfb6a8989a18 100644 --- a/app/code/core/Mage/Widget/Model/Template/Filter.php +++ b/app/code/core/Mage/Widget/Model/Template/Filter.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Widget/Model/Widget.php b/app/code/core/Mage/Widget/Model/Widget.php index 23adb8394ed07..6c9a7dee1ced7 100644 --- a/app/code/core/Mage/Widget/Model/Widget.php +++ b/app/code/core/Mage/Widget/Model/Widget.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Widget/Model/Widget/Config.php b/app/code/core/Mage/Widget/Model/Widget/Config.php index 0bbcccbbebc44..eba3297e9ca25 100644 --- a/app/code/core/Mage/Widget/Model/Widget/Config.php +++ b/app/code/core/Mage/Widget/Model/Widget/Config.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Widget/Model/Widget/Instance.php b/app/code/core/Mage/Widget/Model/Widget/Instance.php index 772cfa84b2198..2ae670d969a35 100644 --- a/app/code/core/Mage/Widget/Model/Widget/Instance.php +++ b/app/code/core/Mage/Widget/Model/Widget/Instance.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -318,7 +318,7 @@ public function getWidgetParameters() } else if (is_null($this->getData('widget_parameters'))) { return array(); } - return $this->getData('widget_parameters'); + return (is_array($this->getData('widget_parameters'))) ? $this->getData('widget_parameters') : array(); } /** diff --git a/app/code/core/Mage/Widget/controllers/Adminhtml/Widget/InstanceController.php b/app/code/core/Mage/Widget/controllers/Adminhtml/Widget/InstanceController.php index 3f3a0e04eeee1..b1aea553f47af 100644 --- a/app/code/core/Mage/Widget/controllers/Adminhtml/Widget/InstanceController.php +++ b/app/code/core/Mage/Widget/controllers/Adminhtml/Widget/InstanceController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -62,7 +62,7 @@ protected function _initAction() /** * Init widget instance object and set it to registry * - * @return age_Widget_Model_Widget_Instance|boolean + * @return Mage_Widget_Model_Widget_Instance|boolean */ protected function _initWidgetInstance() { @@ -127,6 +127,17 @@ public function editAction() $this->renderLayout(); } + /** + * Set body to response + * + * @param string $body + */ + private function setBody($body) + { + Mage::getSingleton('Mage_Core_Model_Translate_Inline')->processResponseBody($body); + $this->getResponse()->setBody($body); + } + /** * Validate action * @@ -143,7 +154,7 @@ public function validateAction() $response->setError(true); $response->setMessage($this->getLayout()->getMessagesBlock()->getGroupedHtml()); } - $this->getResponse()->setBody($response->toJson()); + $this->setBody($response->toJson()); } /** @@ -221,7 +232,7 @@ public function categoriesAction() ->setId(Mage::helper('Mage_Core_Helper_Data')->uniqHash('categories')) ->setIsAnchorOnly($isAnchorOnly) ->setSelectedCategories(explode(',', $selected)); - $this->getResponse()->setBody($chooser->toHtml()); + $this->setBody($chooser->toHtml()); } /** @@ -241,7 +252,7 @@ public function productsAction() /* @var $serializer Mage_Adminhtml_Block_Widget_Grid_Serializer */ $serializer = $this->getLayout()->createBlock('Mage_Adminhtml_Block_Widget_Grid_Serializer'); $serializer->initSerializerBlock($chooser, 'getSelectedProducts', 'selected_products', 'selected_products'); - $this->getResponse()->setBody($chooser->toHtml().$serializer->toHtml()); + $this->setBody($chooser->toHtml().$serializer->toHtml()); } /** @@ -262,7 +273,7 @@ public function blocksAction() ->setLayoutHandle($layout) ->setSelected($selected) ->setAllowedBlocks($widgetInstance->getWidgetSupportedBlocks()); - $this->getResponse()->setBody($blocksChooser->toHtml()); + $this->setBody($blocksChooser->toHtml()); } /** @@ -279,7 +290,7 @@ public function templateAction() ->createBlock('Mage_Widget_Block_Adminhtml_Widget_Instance_Edit_Chooser_Template') ->setSelected($selected) ->setWidgetTemplates($widgetInstance->getWidgetSupportedTemplatesByBlock($block)); - $this->getResponse()->setBody($templateChooser->toHtml()); + $this->setBody($templateChooser->toHtml()); } /** diff --git a/app/code/core/Mage/Widget/controllers/Adminhtml/WidgetController.php b/app/code/core/Mage/Widget/controllers/Adminhtml/WidgetController.php index 04c392afbb2c0..7923344246ba6 100644 --- a/app/code/core/Mage/Widget/controllers/Adminhtml/WidgetController.php +++ b/app/code/core/Mage/Widget/controllers/Adminhtml/WidgetController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Widget/etc/adminhtml.xml b/app/code/core/Mage/Widget/etc/adminhtml.xml index 0e3930d374667..fec21459c7dbc 100644 --- a/app/code/core/Mage/Widget/etc/adminhtml.xml +++ b/app/code/core/Mage/Widget/etc/adminhtml.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Widget/etc/config.xml b/app/code/core/Mage/Widget/etc/config.xml index ff6aa6ead2782..71efcaa0a55d5 100644 --- a/app/code/core/Mage/Widget/etc/config.xml +++ b/app/code/core/Mage/Widget/etc/config.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Widget/etc/translater.xml b/app/code/core/Mage/Widget/etc/translater.xml new file mode 100644 index 0000000000000..ca1dc019f9788 --- /dev/null +++ b/app/code/core/Mage/Widget/etc/translater.xml @@ -0,0 +1,34 @@ + + + + + + Insert Widget... + + + diff --git a/app/code/core/Mage/Widget/sql/widget_setup/install-1.6.0.0.php b/app/code/core/Mage/Widget/sql/widget_setup/install-1.6.0.0.php index 5868c78bc5604..82a4ab8859afe 100644 --- a/app/code/core/Mage/Widget/sql/widget_setup/install-1.6.0.0.php +++ b/app/code/core/Mage/Widget/sql/widget_setup/install-1.6.0.0.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Widget/view/adminhtml/instance/edit/layout.phtml b/app/code/core/Mage/Widget/view/adminhtml/instance/edit/layout.phtml index 8d9f7512ba0c3..93c2f29eda3fd 100644 --- a/app/code/core/Mage/Widget/view/adminhtml/instance/edit/layout.phtml +++ b/app/code/core/Mage/Widget/view/adminhtml/instance/edit/layout.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -41,7 +41,7 @@ var pageGroupTemplate = '
    '+ 'getRemoveLayoutButtonHtml() ?>'+ ''+ - 'getDisplayOnSelectHtml() ?>'+ + 'getDisplayOnSelectHtml(); ?>'+ '
    '+ getDisplayOnContainers() as $container): ?> '
    '+ @@ -87,7 +87,7 @@ var pageGroupTemplate = '
    '+ '

    ' + ' ' + - '' + + '' + '<?php echo $this->helper('Mage_Core_Helper_Data')->jsQuoteEscape(Mage::helper('Mage_Widget_Helper_Data')->__('Open Chooser')); ?>' + ' ' + '' + @@ -175,6 +175,8 @@ var WidgetInstance = { templatePattern : /(^|.|\r|\n)({{(\w+)}})/, count : 0, activePageGroups : $H({}), + selectedItems : {}, + addPageGroup : function(data) { if (this.pageGroupTemplate && (pageGroupContainer = $(this.pageGroupContainerId))) { if (!data.page_id) { @@ -183,6 +185,14 @@ var WidgetInstance = { data.entities = ''; } data.id = this.count++; + if (data[data.group + '_entities']) { + var selected_entities = data[data.group + '_entities'].split(','); + if (selected_entities.length > 0) { + for (var i = 0; i < selected_entities.length; i++) { + this.addProductItemToSelection(data.group + '_ids_' + data.id, selected_entities[i]); + } + } + } pageGroupTemplateObj = new Template(this.pageGroupTemplate, this.templatePattern); Element.insert(pageGroupContainer, {'top':pageGroupTemplateObj.evaluate(data)}); if (data.group) { @@ -196,7 +206,7 @@ var WidgetInstance = { if (data.group == 'pages') { layoutSelect = pageGroup.down('select#layout_handle'); if (layoutSelect) { - for (var i=0; i < layoutSelect.options.length; i++) { + for (var i = 0; i < layoutSelect.options.length; i++) { if (layoutSelect.options[i].value == data.layout_handle) { layoutSelect.options[i].selected = true; break; @@ -206,7 +216,7 @@ var WidgetInstance = { } if ($(this.pageGroupContainerId+'_'+data.id)) { selectGroupElm = $(this.pageGroupContainerId+'_'+data.id).down('select.page_group_select'); - for (var i=0; i < selectGroupElm.options.length; i++) { + for (var i = 0; i < selectGroupElm.options.length; i++) { if (selectGroupElm.options[i].value == data.group) { selectGroupElm.options[i].selected = true; break; @@ -234,6 +244,19 @@ var WidgetInstance = { container.remove(); } }, + addProductItemToSelection: function(groupId, item) { + if (undefined == this.selectedItems[groupId]) { + this.selectedItems[groupId] = $H({}); + } + if (!isNaN(parseInt(item))) { + this.selectedItems[groupId].set(item, 1); + } + }, + removeProductItemFromSelection: function(groupId, item) { + if (undefined !== this.selectedItems[groupId]) { + this.selectedItems[groupId].unset(item); + } + }, showBlockContainer : function(container) { container = $(container); if (container) { @@ -334,16 +357,17 @@ var WidgetInstance = { } }, checkProduct : function(event) { - chooser = event.target.up('div.chooser') - ids = []; - chooser.select('input[type="checkbox"].entities').each(function(elm){ - if (elm.checked) { - ids.push(elm.value); - } - }); - entitiesElm = chooser.up('div.chooser_container').down('input[type="text"].entities'); + var elm = event.memo.element, + container = event.target.up('div.chooser').up('div.chooser_container'), + selectionId = container.id, + entitiesElm = container.down('input[type="text"].entities'); + if (elm.checked) { + this.addProductItemToSelection(selectionId, elm.value); + } else { + this.removeProductItemFromSelection(selectionId, elm.value); + } if (entitiesElm) { - entitiesElm.value = ids.join(','); + entitiesElm.value = this.selectedItems[selectionId].keys().join(','); } }, checkCategory : function(event) { diff --git a/app/code/core/Mage/Widget/view/adminhtml/instance/js.phtml b/app/code/core/Mage/Widget/view/adminhtml/instance/js.phtml index a314f3519dbc8..642d258720f69 100644 --- a/app/code/core/Mage/Widget/view/adminhtml/instance/js.phtml +++ b/app/code/core/Mage/Widget/view/adminhtml/instance/js.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Widget/view/adminhtml/layout.xml b/app/code/core/Mage/Widget/view/adminhtml/layout.xml index 9fc637c5a8eb4..ad67cc27b4ceb 100644 --- a/app/code/core/Mage/Widget/view/adminhtml/layout.xml +++ b/app/code/core/Mage/Widget/view/adminhtml/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Widget/view/frontend/layout.xml b/app/code/core/Mage/Widget/view/frontend/layout.xml index 66d68045712e6..b6e38fd8e10b4 100644 --- a/app/code/core/Mage/Widget/view/frontend/layout.xml +++ b/app/code/core/Mage/Widget/view/frontend/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package Mage_Widget - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Widget/view/frontend/widgets.css b/app/code/core/Mage/Widget/view/frontend/widgets.css index e697a4e58eeaa..0c1316d2603ce 100644 --- a/app/code/core/Mage/Widget/view/frontend/widgets.css +++ b/app/code/core/Mage/Widget/view/frontend/widgets.css @@ -19,7 +19,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/Block/Abstract.php b/app/code/core/Mage/Wishlist/Block/Abstract.php index 4822ce6237e19..b9d07e19b9bdd 100644 --- a/app/code/core/Mage/Wishlist/Block/Abstract.php +++ b/app/code/core/Mage/Wishlist/Block/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/Block/Customer/Sharing.php b/app/code/core/Mage/Wishlist/Block/Customer/Sharing.php index 2a323d8eabbe5..879f281414979 100644 --- a/app/code/core/Mage/Wishlist/Block/Customer/Sharing.php +++ b/app/code/core/Mage/Wishlist/Block/Customer/Sharing.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/Block/Customer/Sidebar.php b/app/code/core/Mage/Wishlist/Block/Customer/Sidebar.php index ae2801a0e3490..be59aa097d27b 100644 --- a/app/code/core/Mage/Wishlist/Block/Customer/Sidebar.php +++ b/app/code/core/Mage/Wishlist/Block/Customer/Sidebar.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/Block/Customer/Wishlist.php b/app/code/core/Mage/Wishlist/Block/Customer/Wishlist.php index 398371ab1f3da..7d86e26d1f965 100644 --- a/app/code/core/Mage/Wishlist/Block/Customer/Wishlist.php +++ b/app/code/core/Mage/Wishlist/Block/Customer/Wishlist.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/Block/Customer/Wishlist/Item/Options.php b/app/code/core/Mage/Wishlist/Block/Customer/Wishlist/Item/Options.php index 0e07231d418f3..358ef1c01b0d7 100644 --- a/app/code/core/Mage/Wishlist/Block/Customer/Wishlist/Item/Options.php +++ b/app/code/core/Mage/Wishlist/Block/Customer/Wishlist/Item/Options.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/Block/Item/Configure.php b/app/code/core/Mage/Wishlist/Block/Item/Configure.php index 2771395014cad..f204d2cd1ce19 100644 --- a/app/code/core/Mage/Wishlist/Block/Item/Configure.php +++ b/app/code/core/Mage/Wishlist/Block/Item/Configure.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/Block/Links.php b/app/code/core/Mage/Wishlist/Block/Links.php index 5fb443a614a90..bd78b4663b6c3 100644 --- a/app/code/core/Mage/Wishlist/Block/Links.php +++ b/app/code/core/Mage/Wishlist/Block/Links.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/Block/Render/Item/Price.php b/app/code/core/Mage/Wishlist/Block/Render/Item/Price.php index 0d0cd9ff967dc..922d80b90e123 100644 --- a/app/code/core/Mage/Wishlist/Block/Render/Item/Price.php +++ b/app/code/core/Mage/Wishlist/Block/Render/Item/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/Block/Share/Email/Items.php b/app/code/core/Mage/Wishlist/Block/Share/Email/Items.php index 2cd6bc60f5f35..6d79ab38d9b69 100644 --- a/app/code/core/Mage/Wishlist/Block/Share/Email/Items.php +++ b/app/code/core/Mage/Wishlist/Block/Share/Email/Items.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/Block/Share/Email/Rss.php b/app/code/core/Mage/Wishlist/Block/Share/Email/Rss.php index ed93cab71d760..3df7dd114ef75 100644 --- a/app/code/core/Mage/Wishlist/Block/Share/Email/Rss.php +++ b/app/code/core/Mage/Wishlist/Block/Share/Email/Rss.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/Block/Share/Wishlist.php b/app/code/core/Mage/Wishlist/Block/Share/Wishlist.php index fc4c5879123ba..b67f0af2fbba1 100644 --- a/app/code/core/Mage/Wishlist/Block/Share/Wishlist.php +++ b/app/code/core/Mage/Wishlist/Block/Share/Wishlist.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/Controller/Abstract.php b/app/code/core/Mage/Wishlist/Controller/Abstract.php index 0425d4879df94..7d7484b26b619 100644 --- a/app/code/core/Mage/Wishlist/Controller/Abstract.php +++ b/app/code/core/Mage/Wishlist/Controller/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/Helper/Data.php b/app/code/core/Mage/Wishlist/Helper/Data.php index b8add4544d0d4..9242ed0bf36a8 100644 --- a/app/code/core/Mage/Wishlist/Helper/Data.php +++ b/app/code/core/Mage/Wishlist/Helper/Data.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/Model/Config.php b/app/code/core/Mage/Wishlist/Model/Config.php index 5cb5852c5c190..e5900b01e1451 100644 --- a/app/code/core/Mage/Wishlist/Model/Config.php +++ b/app/code/core/Mage/Wishlist/Model/Config.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/Model/Config/Source/Summary.php b/app/code/core/Mage/Wishlist/Model/Config/Source/Summary.php index 386173335e1fb..485240fbb1aa7 100644 --- a/app/code/core/Mage/Wishlist/Model/Config/Source/Summary.php +++ b/app/code/core/Mage/Wishlist/Model/Config/Source/Summary.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Wishlist_Model_Config_Source_Summary diff --git a/app/code/core/Mage/Wishlist/Model/Item.php b/app/code/core/Mage/Wishlist/Model/Item.php index def9b6c29cb0e..574ecad38d25d 100644 --- a/app/code/core/Mage/Wishlist/Model/Item.php +++ b/app/code/core/Mage/Wishlist/Model/Item.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -109,6 +109,18 @@ protected function _construct() $this->_init('Mage_Wishlist_Model_Resource_Item'); } + /** + * Set quantity. If quantity is less than 0 - set it to 1 + * + * @param int $qty + * @return Mage_Wishlist_Model_Item + */ + public function setQty($qty) + { + $this->setData('qty', ($qty >= 0) ? $qty : 1 ); + return $this; + } + /** * Retrieve resource instance wrapper * @@ -703,4 +715,4 @@ public function loadWithOptions($id, $optionsFilter = null) $this->setOptions($options->getOptionsByItem($this)); return $this; } -} +} \ No newline at end of file diff --git a/app/code/core/Mage/Wishlist/Model/Item/Option.php b/app/code/core/Mage/Wishlist/Model/Item/Option.php index b618988168df8..595f7311e89bd 100644 --- a/app/code/core/Mage/Wishlist/Model/Item/Option.php +++ b/app/code/core/Mage/Wishlist/Model/Item/Option.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/Model/Observer.php b/app/code/core/Mage/Wishlist/Model/Observer.php index ab84546cd0cb7..c0553510f8a32 100644 --- a/app/code/core/Mage/Wishlist/Model/Observer.php +++ b/app/code/core/Mage/Wishlist/Model/Observer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/Model/Resource/Item.php b/app/code/core/Mage/Wishlist/Model/Resource/Item.php index e65a41482dcae..d99c806ad533f 100755 --- a/app/code/core/Mage/Wishlist/Model/Resource/Item.php +++ b/app/code/core/Mage/Wishlist/Model/Resource/Item.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/Model/Resource/Item/Collection.php b/app/code/core/Mage/Wishlist/Model/Resource/Item/Collection.php index a76f284aeb098..00df05275b4e6 100755 --- a/app/code/core/Mage/Wishlist/Model/Resource/Item/Collection.php +++ b/app/code/core/Mage/Wishlist/Model/Resource/Item/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/Model/Resource/Item/Option.php b/app/code/core/Mage/Wishlist/Model/Resource/Item/Option.php index d43a80f67fe5f..4a831fb9adce1 100644 --- a/app/code/core/Mage/Wishlist/Model/Resource/Item/Option.php +++ b/app/code/core/Mage/Wishlist/Model/Resource/Item/Option.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/Model/Resource/Item/Option/Collection.php b/app/code/core/Mage/Wishlist/Model/Resource/Item/Option/Collection.php index ea934a330918a..2539e26870b7e 100644 --- a/app/code/core/Mage/Wishlist/Model/Resource/Item/Option/Collection.php +++ b/app/code/core/Mage/Wishlist/Model/Resource/Item/Option/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/Model/Resource/Wishlist.php b/app/code/core/Mage/Wishlist/Model/Resource/Wishlist.php index a0bf5a529daa3..2c00d53f48deb 100755 --- a/app/code/core/Mage/Wishlist/Model/Resource/Wishlist.php +++ b/app/code/core/Mage/Wishlist/Model/Resource/Wishlist.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/Model/Resource/Wishlist/Collection.php b/app/code/core/Mage/Wishlist/Model/Resource/Wishlist/Collection.php index c5c4f3a7f3eee..f480a66362974 100755 --- a/app/code/core/Mage/Wishlist/Model/Resource/Wishlist/Collection.php +++ b/app/code/core/Mage/Wishlist/Model/Resource/Wishlist/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/Model/Session.php b/app/code/core/Mage/Wishlist/Model/Session.php index 0e8f11bef7e9b..1087e78aa0926 100644 --- a/app/code/core/Mage/Wishlist/Model/Session.php +++ b/app/code/core/Mage/Wishlist/Model/Session.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/Model/Wishlist.php b/app/code/core/Mage/Wishlist/Model/Wishlist.php index d51edbed1e07d..001674e7659f6 100644 --- a/app/code/core/Mage/Wishlist/Model/Wishlist.php +++ b/app/code/core/Mage/Wishlist/Model/Wishlist.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/controllers/IndexController.php b/app/code/core/Mage/Wishlist/controllers/IndexController.php index 653fcce95788f..5d7218c306e2a 100644 --- a/app/code/core/Mage/Wishlist/controllers/IndexController.php +++ b/app/code/core/Mage/Wishlist/controllers/IndexController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -193,9 +193,7 @@ public function addAction() Mage::helper('Mage_Wishlist_Helper_Data')->calculate(); - $message = $this->__('%1$s has been added to your wishlist. Click here to continue shopping', - $product->getName(), Mage::helper('Mage_Core_Helper_Data')->escapeUrl($referer) - ); + $message = $this->__('%1$s has been added to your wishlist. Click here to continue shopping', $product->getName(), Mage::helper('Mage_Core_Helper_Data')->escapeUrl($referer)); $session->addSuccess($message); } catch (Mage_Core_Exception $e) { diff --git a/app/code/core/Mage/Wishlist/controllers/SharedController.php b/app/code/core/Mage/Wishlist/controllers/SharedController.php index 47584a74da920..edc10be7f2767 100644 --- a/app/code/core/Mage/Wishlist/controllers/SharedController.php +++ b/app/code/core/Mage/Wishlist/controllers/SharedController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/etc/adminhtml.xml b/app/code/core/Mage/Wishlist/etc/adminhtml.xml index 4680adf04f2e0..357419f25b7e2 100644 --- a/app/code/core/Mage/Wishlist/etc/adminhtml.xml +++ b/app/code/core/Mage/Wishlist/etc/adminhtml.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Wishlist/etc/config.xml b/app/code/core/Mage/Wishlist/etc/config.xml index 503870f0a2f2e..43262e7cab5ee 100644 --- a/app/code/core/Mage/Wishlist/etc/config.xml +++ b/app/code/core/Mage/Wishlist/etc/config.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Wishlist/etc/system.xml b/app/code/core/Mage/Wishlist/etc/system.xml index 50b71d97e409d..19ab364e4c684 100644 --- a/app/code/core/Mage/Wishlist/etc/system.xml +++ b/app/code/core/Mage/Wishlist/etc/system.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Wishlist/etc/view.xml b/app/code/core/Mage/Wishlist/etc/view.xml index 0f62553565873..d5739b5868272 100644 --- a/app/code/core/Mage/Wishlist/etc/view.xml +++ b/app/code/core/Mage/Wishlist/etc/view.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/Wishlist/sql/wishlist_setup/install-1.6.0.0.php b/app/code/core/Mage/Wishlist/sql/wishlist_setup/install-1.6.0.0.php index de2e689d27df0..42fd33a5f276f 100644 --- a/app/code/core/Mage/Wishlist/sql/wishlist_setup/install-1.6.0.0.php +++ b/app/code/core/Mage/Wishlist/sql/wishlist_setup/install-1.6.0.0.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_Wishlist - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/view/frontend/email/items.phtml b/app/code/core/Mage/Wishlist/view/frontend/email/items.phtml index 435d33624dd01..e1f36fd932770 100644 --- a/app/code/core/Mage/Wishlist/view/frontend/email/items.phtml +++ b/app/code/core/Mage/Wishlist/view/frontend/email/items.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /* @var $this Mage_Wishlist_Block_Share_Email_Items */ diff --git a/app/code/core/Mage/Wishlist/view/frontend/email/rss.phtml b/app/code/core/Mage/Wishlist/view/frontend/email/rss.phtml index 40f3a1bb0c92c..4e634735bfdb4 100644 --- a/app/code/core/Mage/Wishlist/view/frontend/email/rss.phtml +++ b/app/code/core/Mage/Wishlist/view/frontend/email/rss.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Wishlist/view/frontend/item/configure/addto.phtml b/app/code/core/Mage/Wishlist/view/frontend/item/configure/addto.phtml index f62068e0c78a6..e6315249195a4 100644 --- a/app/code/core/Mage/Wishlist/view/frontend/item/configure/addto.phtml +++ b/app/code/core/Mage/Wishlist/view/frontend/item/configure/addto.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Wishlist/view/frontend/layout.xml b/app/code/core/Mage/Wishlist/view/frontend/layout.xml index 1d11fe122ec48..989c927c202fc 100644 --- a/app/code/core/Mage/Wishlist/view/frontend/layout.xml +++ b/app/code/core/Mage/Wishlist/view/frontend/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/Wishlist/view/frontend/options_list.phtml b/app/code/core/Mage/Wishlist/view/frontend/options_list.phtml index 18856d56e8512..c484565b5285f 100644 --- a/app/code/core/Mage/Wishlist/view/frontend/options_list.phtml +++ b/app/code/core/Mage/Wishlist/view/frontend/options_list.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /* @var $this Mage_Wishlist_Block_Customer_Wishlist_Item_Options */ diff --git a/app/code/core/Mage/Wishlist/view/frontend/render/item/price.phtml b/app/code/core/Mage/Wishlist/view/frontend/render/item/price.phtml index cd91043ce677f..06e7e9b7dcf1f 100644 --- a/app/code/core/Mage/Wishlist/view/frontend/render/item/price.phtml +++ b/app/code/core/Mage/Wishlist/view/frontend/render/item/price.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /* @var $this Mage_Wishlist_Block_Customer_Wishlist_Render_Item_Price */ diff --git a/app/code/core/Mage/Wishlist/view/frontend/render/item/price_msrp_item.phtml b/app/code/core/Mage/Wishlist/view/frontend/render/item/price_msrp_item.phtml index c4e0b7c0514e9..d61bdefc8cbfd 100644 --- a/app/code/core/Mage/Wishlist/view/frontend/render/item/price_msrp_item.phtml +++ b/app/code/core/Mage/Wishlist/view/frontend/render/item/price_msrp_item.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Wishlist/view/frontend/render/item/price_msrp_rss.phtml b/app/code/core/Mage/Wishlist/view/frontend/render/item/price_msrp_rss.phtml index 1b2a37776f2ca..f6e2838326e9a 100644 --- a/app/code/core/Mage/Wishlist/view/frontend/render/item/price_msrp_rss.phtml +++ b/app/code/core/Mage/Wishlist/view/frontend/render/item/price_msrp_rss.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Wishlist/view/frontend/shared.phtml b/app/code/core/Mage/Wishlist/view/frontend/shared.phtml index 8b905ad62884f..1cd048bd1bd24 100644 --- a/app/code/core/Mage/Wishlist/view/frontend/shared.phtml +++ b/app/code/core/Mage/Wishlist/view/frontend/shared.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /* @var $this Mage_Wishlist_Block_Share_Wishlist */ diff --git a/app/code/core/Mage/Wishlist/view/frontend/sharing.phtml b/app/code/core/Mage/Wishlist/view/frontend/sharing.phtml index 29f72889e2ead..333de2010b82b 100644 --- a/app/code/core/Mage/Wishlist/view/frontend/sharing.phtml +++ b/app/code/core/Mage/Wishlist/view/frontend/sharing.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/Wishlist/view/frontend/sidebar.phtml b/app/code/core/Mage/Wishlist/view/frontend/sidebar.phtml index 5eff0770b15e4..e2f3f6b32ebda 100644 --- a/app/code/core/Mage/Wishlist/view/frontend/sidebar.phtml +++ b/app/code/core/Mage/Wishlist/view/frontend/sidebar.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /* @var $this Mage_Wishlist_Block_Customer_Sidebar */ diff --git a/app/code/core/Mage/Wishlist/view/frontend/view.phtml b/app/code/core/Mage/Wishlist/view/frontend/view.phtml index e0fe31f495e5d..4c89ddbb4aad3 100644 --- a/app/code/core/Mage/Wishlist/view/frontend/view.phtml +++ b/app/code/core/Mage/Wishlist/view/frontend/view.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /* @var $this Mage_Wishlist_Block_Customer_Wishlist */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/History.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/History.php index bbb719a297426..a1522934bf64f 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/History.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/History.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/History/Grid.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/History/Grid.php index e9765503c542d..de8d2260a02cf 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/History/Grid.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/History/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile.php index b3ece22a318a4..8f164b2c0ab31 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit.php index ec81fe9fba95c..e2696f1c09186 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Form.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Form.php index 31b57232c3e9e..01010d4f7d750 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Form.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Submission.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Submission.php index 6c1af9ac6ea6f..2318d01c85186 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Submission.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Submission.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Cache.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Cache.php index 94d3a4757163b..765c1ccef76a6 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Cache.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Cache.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Content.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Content.php index c105ea7043882..4e66b32d255a4 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Content.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Content.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design.php index ba2404019b8e0..25b98327523ba 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion.php index 5045b69c57fa1..ff110010fc389 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Images.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Images.php index 5838bfe81945c..e0adfde59c16d 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Images.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Images.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Tabs.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Tabs.php index 3f6efa5dd654c..f9d4219498335 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Tabs.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Themes.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Themes.php index dbb3c521ce40e..7363fea6b042f 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Themes.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Themes.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Preview.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Preview.php index f32953eb67da2..ea7b43423e7a7 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Preview.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Preview.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Themes.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Themes.php index 1911811edff1f..15ee00547ce61 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Themes.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Themes.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Flurryanalytics.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Flurryanalytics.php index be2831fb80263..e52bd729f3b52 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Flurryanalytics.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Flurryanalytics.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/General.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/General.php index e204b4b8cecbc..b43c2d8498b79 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/General.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/General.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Notification.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Notification.php index 3157ecd99b0dc..bb743274b36cd 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Notification.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Notification.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Payment.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Payment.php index 55ddfba566dc3..e155bbaf82b19 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Payment.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Payment.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Settings.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Settings.php index b1b0ebb81c7ab..972733b98e31c 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Settings.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Settings.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Social.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Social.php index 39f7718f26ed8..94f5536e68012 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Social.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Social.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Submission/History.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Submission/History.php index 589b371e567b7..b34407245f9ce 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Submission/History.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Submission/History.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tabs.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tabs.php index 31a172854f64e..eca82073a94e6 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tabs.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Addrow.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Addrow.php index 078f5261da2a3..9e02ab392d4b9 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Addrow.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Addrow.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -48,9 +48,9 @@ public function getElementHtml() . '" value="'.$this->getEscapedValue() . '" ' . $this->serialize($this->getHtmlAttributes()) - . ' >' + . ' >' . $this->getEscapedValue() - . '' + . '' . $this->getAfterElementHtml(); return $html; } diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Color.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Color.php index b4e7472c548c9..1bedd5149dc09 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Color.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Color.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Country.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Country.php index 75143b51d84da..432cdc0104244 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Country.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Country.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Datetime.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Datetime.php index cf421029ed900..0e4e4e15b7b59 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Datetime.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Datetime.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Font.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Font.php index ab86d400b112c..148f26ae4ba49 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Font.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Font.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Image.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Image.php index 55bcd454c2c51..387d118db6c4f 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Image.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Image.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Page.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Page.php index 4f4b464833c8f..0bf904b1dc3e4 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Page.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Page.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -100,8 +100,8 @@ public function getElementHtml() list($label, $element) = $this->getElements(); return $element->toHtml() . '' - . ''; + . ''; } } diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Tabs.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Tabs.php index 29d4ceae6731c..a4af5231ade52 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Tabs.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Theme.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Theme.php index aad6844dec748..40901de65d10b 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Theme.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Theme.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Grid.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Grid.php index b0fc01f65a8ae..f89e92ae009c4 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Grid.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Grid/Renderer/Bool.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Grid/Renderer/Bool.php index 516ae1377ec83..8764eb1397982 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Grid/Renderer/Bool.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Grid/Renderer/Bool.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Grid/Renderer/Type.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Grid/Renderer/Type.php index feb73832ba74b..c786558dfd25b 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Grid/Renderer/Type.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Grid/Renderer/Type.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Preview/Content.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Preview/Content.php index feda288c5943d..2b4fd85bfe3ab 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Preview/Content.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Preview/Content.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Preview/Tabitems.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Preview/Tabitems.php index ca128df55a5fe..a47d9fa97b4ac 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Preview/Tabitems.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Preview/Tabitems.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission.php index 6a002bef8fdc0..ece95470338ee 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Form.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Form.php index c68925f62d6e0..324b717b76764 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Form.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Renderer/Country/Androidmarket.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Renderer/Country/Androidmarket.php index e9ae209f37964..3d426273b09ad 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Renderer/Country/Androidmarket.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Renderer/Country/Androidmarket.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Renderer/Country/Istore.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Renderer/Country/Istore.php index 796ada4d0b770..1a99d008a4747 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Renderer/Country/Istore.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Renderer/Country/Istore.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Tab/Container.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Tab/Container.php index edaefabc954e1..88ce204c4f393 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Tab/Container.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Tab/Container.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Tab/Container/Submission.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Tab/Container/Submission.php index b7725239ce092..0cd27832792c0 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Tab/Container/Submission.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Tab/Container/Submission.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Tabs.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Tabs.php index 864ede27909f4..22e87602d1a97 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Tabs.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Widget/Form.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Widget/Form.php index 0fa378b3f72bc..abf8c39ee22a4 100644 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Widget/Form.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Widget/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue.php index bbb0d7d9e02d9..a9b0e60054f68 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Edit.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Edit.php index 0ab9e70206cbe..57a0d077b2e23 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Edit.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Edit/Form.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Edit/Form.php index e931b16fc8010..8a2051a190351 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Edit/Form.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid.php index 642bb7f25d2a1..ecfaef1b18057 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Action.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Action.php index 4c550dc62c3e9..d7e64838d19cc 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Action.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Action.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Application.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Application.php index b094db007e91f..622ba3b850bb9 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Application.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Application.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Id.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Id.php index d0e8ca4396e00..5f38dbda8574b 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Id.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Id.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Msgtitle.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Msgtitle.php index 29639ebcad369..d327133c999eb 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Msgtitle.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Msgtitle.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Pushtitle.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Pushtitle.php index 7e28ee3e6ae1a..b646151319fad 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Pushtitle.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Pushtitle.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Status.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Status.php index c097e2881c1c5..726ce287d3f7a 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Status.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Status.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Template.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Template.php index 622603e809468..4e0974a2412bd 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Template.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Template.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template.php index 7e276a6eab172..1a171780c697e 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Edit.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Edit.php index ba984a626dfe5..98f6ca0c2db85 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Edit.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Edit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Edit/Form.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Edit/Form.php index a99f8e85d4961..3940eb474b105 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Edit/Form.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Edit/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Grid.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Grid.php index f26cc93edfd7d..054cc663c7db7 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Grid.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Grid.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Grid/Renderer/Application.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Grid/Renderer/Application.php index bb47be885bb10..be448d7b66cd2 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Grid/Renderer/Application.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Grid/Renderer/Application.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Grid/Renderer/Name.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Grid/Renderer/Name.php index e2f3fce37b50d..d51810f6e722a 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Grid/Renderer/Name.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Grid/Renderer/Name.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Preview.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Preview.php index 26b9aaa5af4a9..5167a89c9f13d 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Preview.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Preview.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Preview/Form.php b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Preview/Form.php index 51b7d068e8ae7..d52ecd734761a 100755 --- a/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Preview/Form.php +++ b/app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Preview/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Cart.php b/app/code/core/Mage/XmlConnect/Block/Cart.php index 5de14c3a731b9..104174315d778 100644 --- a/app/code/core/Mage/XmlConnect/Block/Cart.php +++ b/app/code/core/Mage/XmlConnect/Block/Cart.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -62,7 +62,7 @@ protected function _toHtml() $itemXml->addChild('entity_id', $item->getProduct()->getId()); $itemXml->addChild('entity_type', $type); $itemXml->addChild('item_id', $item->getId()); - $itemXml->addChild('name', $xmlObject->xmlentities($renderer->getProductName())); + $itemXml->addChild('name', $xmlObject->escapeXml($renderer->getProductName())); $itemXml->addChild('code', 'cart[' . $item->getId() . '][qty]'); $itemXml->addChild('qty', $renderer->getQty()); $icon = $renderer->getProductThumbnail()->resize( @@ -192,27 +192,27 @@ protected function _toHtml() /** * Options list */ - if ($_options = $renderer->getOptionList()) { + $_options = $renderer->getOptionList(); + if ($_options) { $itemOptionsXml = $itemXml->addChild('options'); foreach ($_options as $_option) { $_formattedOptionValue = $renderer->getFormatedOptionValue($_option); $optionXml = $itemOptionsXml->addChild('option'); $optionXml->addAttribute('label', $xmlObject->xmlAttribute($_option['label'])); - $optionXml->addAttribute( - 'text', $xmlObject->xmlAttribute(strip_tags($_formattedOptionValue['value'])) - ); + $optionXml->addAttribute('text', $xmlObject->xmlAttribute($_formattedOptionValue['value'])); } } /** * Item messages */ - if ($messages = $renderer->getMessages()) { + $messages = $renderer->getMessages(); + if ($messages) { $itemMessagesXml = $itemXml->addChild('messages'); foreach ($messages as $message) { $messageXml = $itemMessagesXml->addChild('option'); $messageXml->addChild('type', $message['type']); - $messageXml->addChild('text', $xmlObject->xmlentities($message['text'])); + $messageXml->addChild('text', $xmlObject->escapeXml($message['text'])); } } } diff --git a/app/code/core/Mage/XmlConnect/Block/Cart/Crosssell.php b/app/code/core/Mage/XmlConnect/Block/Cart/Crosssell.php index 7f24a28af5a8a..0ede156381ef9 100644 --- a/app/code/core/Mage/XmlConnect/Block/Cart/Crosssell.php +++ b/app/code/core/Mage/XmlConnect/Block/Cart/Crosssell.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -55,7 +55,7 @@ protected function _toHtml() /** @var $product Mage_Catalog_Model_Product */ foreach ($this->getItems() as $product) { $itemXmlObj = $crossSellXmlObj->addChild('item'); - $itemXmlObj->addChild('name', $crossSellXmlObj->xmlentities($product->getName())); + $itemXmlObj->addChild('name', $crossSellXmlObj->escapeXml($product->getName())); $icon = $this->helper('Mage_Catalog_Helper_Image')->init($product, 'thumbnail') ->resize(Mage::helper('Mage_XmlConnect_Helper_Image')->getImageSizeForContent('product_small')); @@ -70,12 +70,13 @@ protected function _toHtml() /** * If product type is grouped than it has options as its grouped items */ - if ($product->getTypeId() == Mage_Catalog_Model_Product_Type_Grouped::TYPE_CODE) { + if ($product->getTypeId() == Mage_Catalog_Model_Product_Type_Grouped::TYPE_CODE + || $product->getTypeId() == Mage_Catalog_Model_Product_Type_Configurable::TYPE_CODE) { $product->setHasOptions(true); } $itemXmlObj->addChild('has_options', (int)$product->getHasOptions()); - $itemXmlObj->addChild('in_stock', (int)$product->getIsInStock()); + $itemXmlObj->addChild('in_stock', (int)$product->getStockItem()->getIsInStock()); if ($product->getTypeId() == Mage_Downloadable_Model_Product_Type::TYPE_DOWNLOADABLE) { $itemXmlObj->addChild('is_salable', 0); } else { @@ -96,4 +97,4 @@ protected function _toHtml() } return $crossSellXmlObj->asNiceXml(); } -} +} \ No newline at end of file diff --git a/app/code/core/Mage/XmlConnect/Block/Cart/Info.php b/app/code/core/Mage/XmlConnect/Block/Cart/Info.php index bd9b26600f09c..2f8089ee98c00 100644 --- a/app/code/core/Mage/XmlConnect/Block/Cart/Info.php +++ b/app/code/core/Mage/XmlConnect/Block/Cart/Info.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Cart/Item/Renderer.php b/app/code/core/Mage/XmlConnect/Block/Cart/Item/Renderer.php index c2b08b50279e1..b7d8e7bdefc3e 100644 --- a/app/code/core/Mage/XmlConnect/Block/Cart/Item/Renderer.php +++ b/app/code/core/Mage/XmlConnect/Block/Cart/Item/Renderer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -94,7 +94,7 @@ protected function _addSubtotalToXmlObj(Mage_XmlConnect_Model_Simplexml_Element $exclPrice = $_item->getRowTotal(); } $exclPrice = $this->_formatPrice($exclPrice); - $subtotalXmlObj->addAttribute('excluding_tax', $subtotalXmlObj->xmlentities($exclPrice)); + $subtotalXmlObj->addAttribute('excluding_tax', $subtotalXmlObj->escapeXml($exclPrice)); } if ($taxHelper->displayCartPriceInclTax() || $taxHelper->displayCartBothPrices()) { @@ -109,7 +109,7 @@ protected function _addSubtotalToXmlObj(Mage_XmlConnect_Model_Simplexml_Element } $inclPrice = $this->_formatPrice($inclPrice); - $subtotalXmlObj->addAttribute('including_tax', $subtotalXmlObj->xmlentities($inclPrice)); + $subtotalXmlObj->addAttribute('including_tax', $subtotalXmlObj->escapeXml($inclPrice)); } if ($weeeHelper->getApplied($_item)) { @@ -154,7 +154,7 @@ protected function _addPriceToXmlObj(Mage_XmlConnect_Model_Simplexml_Element $pr } $exclPrice = $this->_formatPrice($exclPrice); - $priceXmlObj->addAttribute('excluding_tax', $priceXmlObj->xmlentities($exclPrice)); + $priceXmlObj->addAttribute('excluding_tax', $priceXmlObj->escapeXml($exclPrice)); } if ($this->helper('Mage_Tax_Helper_Data')->displayCartPriceInclTax() @@ -171,7 +171,7 @@ protected function _addPriceToXmlObj(Mage_XmlConnect_Model_Simplexml_Element $pr } $inclPrice = $this->_formatPrice($inclPrice); - $priceXmlObj->addAttribute('including_tax', $priceXmlObj->xmlentities($inclPrice)); + $priceXmlObj->addAttribute('including_tax', $priceXmlObj->escapeXml($inclPrice)); } if (Mage::helper('Mage_Weee_Helper_Data')->getApplied($_item)) { @@ -244,10 +244,7 @@ protected function _addWeeeToXmlObj(Mage_XmlConnect_Model_Simplexml_Element $pri } $totalExcl = $this->_formatPrice($totalExcl); - $priceXmlObj->addAttribute( - 'total_excluding_tax', - $priceXmlObj->xmlentities($totalExcl) - ); + $priceXmlObj->addAttribute('total_excluding_tax', $priceXmlObj->escapeXml($totalExcl)); } if ($typeOfDisplay2 && $_item->getWeeeTaxAppliedAmount()) { @@ -258,7 +255,7 @@ protected function _addWeeeToXmlObj(Mage_XmlConnect_Model_Simplexml_Element $pri } $totalIncl = $this->_formatPrice($totalIncl); - $priceXmlObj->addAttribute('total_including_tax', $priceXmlObj->xmlentities($totalIncl)); + $priceXmlObj->addAttribute('total_including_tax', $priceXmlObj->escapeXml($totalIncl)); } return $priceXmlObj; diff --git a/app/code/core/Mage/XmlConnect/Block/Cart/Item/Renderer/Configurable.php b/app/code/core/Mage/XmlConnect/Block/Cart/Item/Renderer/Configurable.php index 109d55da6de6d..cbb4d713be688 100644 --- a/app/code/core/Mage/XmlConnect/Block/Cart/Item/Renderer/Configurable.php +++ b/app/code/core/Mage/XmlConnect/Block/Cart/Item/Renderer/Configurable.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Cart/Item/Renderer/Grouped.php b/app/code/core/Mage/XmlConnect/Block/Cart/Item/Renderer/Grouped.php index 49e539e4c625e..9d4a0870fce11 100644 --- a/app/code/core/Mage/XmlConnect/Block/Cart/Item/Renderer/Grouped.php +++ b/app/code/core/Mage/XmlConnect/Block/Cart/Item/Renderer/Grouped.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Details.php b/app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Details.php index 59561df5b87ba..b2be761c90f16 100644 --- a/app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Details.php +++ b/app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Details.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Review.php b/app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Review.php index 4ae4debe28e84..8075daa127e98 100644 --- a/app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Review.php +++ b/app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Review.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Shippingmethods.php b/app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Shippingmethods.php index 60c408b617918..16f70fd6e2ec6 100644 --- a/app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Shippingmethods.php +++ b/app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Shippingmethods.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mep/Totals.php b/app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mep/Totals.php index 4803a82aa777e..0640cd87eceb6 100644 --- a/app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mep/Totals.php +++ b/app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mep/Totals.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Cart/Totals.php b/app/code/core/Mage/XmlConnect/Block/Cart/Totals.php index 0453a5f78fa7a..76995d4a71dab 100644 --- a/app/code/core/Mage/XmlConnect/Block/Cart/Totals.php +++ b/app/code/core/Mage/XmlConnect/Block/Cart/Totals.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -112,7 +112,7 @@ protected function _toHtml() $title = $this->__('Gift Card (%s)', $cardCode['c']); $value = $cardCode['c']; $totalXmlObj = $totalsXmlObj->addChild($code); - $totalXmlObj->addChild('title', $totalsXmlObj->xmlentities($title)); + $totalXmlObj->addChild('title', $totalsXmlObj->escapeXml($title)); $totalXmlObj->addChild('value', $value); $value = Mage::helper('Mage_XmlConnect_Helper_Data')->formatPriceForXml($cardCode['a']); $formattedValue = $this->getQuote()->getStore()->formatPrice($value, false); @@ -149,7 +149,7 @@ protected function _addTotalDataToXmlObj($totalsXmlObj, $code, $title, $value) { $value = Mage::helper('Mage_XmlConnect_Helper_Data')->formatPriceForXml($value); $totalXmlObj = $totalsXmlObj->addChild($code); - $totalXmlObj->addChild('title', $totalsXmlObj->xmlentities($title)); + $totalXmlObj->addChild('title', $totalsXmlObj->escapeXml($title)); $formattedValue = $this->getQuote()->getStore()->formatPrice($value, false); $totalXmlObj->addChild('value', $value); $totalXmlObj->addChild('formated_value', $formattedValue); diff --git a/app/code/core/Mage/XmlConnect/Block/Catalog.php b/app/code/core/Mage/XmlConnect/Block/Catalog.php index 0ee1a1953dae0..8147086631d17 100644 --- a/app/code/core/Mage/XmlConnect/Block/Catalog.php +++ b/app/code/core/Mage/XmlConnect/Block/Catalog.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -67,7 +67,7 @@ public function getProductSortFeildsXmlObject() $item->addAttribute('isDefault', 1); } $item->addChild('code', $code); - $item->addChild('name', $ordersXmlObject->xmlentities(strip_tags($name))); + $item->addChild('name', $ordersXmlObject->escapeXml($name)); } return $ordersXmlObject; diff --git a/app/code/core/Mage/XmlConnect/Block/Catalog/Category.php b/app/code/core/Mage/XmlConnect/Block/Catalog/Category.php index 30c9e88c12035..3f40326ae907c 100644 --- a/app/code/core/Mage/XmlConnect/Block/Catalog/Category.php +++ b/app/code/core/Mage/XmlConnect/Block/Catalog/Category.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -78,7 +78,7 @@ protected function _toHtml() $item = Mage::getModel('Mage_Catalog_Model_Category')->load($item->getId()); $itemXmlObj = $itemsXmlObj->addChild('item'); - $itemXmlObj->addChild('label', $categoryXmlObj->xmlentities($item->getName())); + $itemXmlObj->addChild('label', $categoryXmlObj->escapeXml($item->getName())); $itemXmlObj->addChild('entity_id', $item->getId()); $itemXmlObj->addChild('content_type', $item->hasChildren() ? 'categories' : 'products'); if (!is_null($categoryId)) { diff --git a/app/code/core/Mage/XmlConnect/Block/Catalog/Category/Info.php b/app/code/core/Mage/XmlConnect/Block/Catalog/Category/Info.php index 7ecc09b293f7d..535f46bb86264 100644 --- a/app/code/core/Mage/XmlConnect/Block/Catalog/Category/Info.php +++ b/app/code/core/Mage/XmlConnect/Block/Catalog/Category/Info.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -50,7 +50,7 @@ public function getCategoryInfoXmlObject() */ $title = $this->__('Shop'); if ($category->getParentCategory()->getLevel() > 1) { - $title = $infoXmlObj->xmlentities($category->getParentCategory()->getName()); + $title = $infoXmlObj->escapeXml($category->getParentCategory()->getName()); } $infoXmlObj->addChild('parent_title', $title); diff --git a/app/code/core/Mage/XmlConnect/Block/Catalog/Filters.php b/app/code/core/Mage/XmlConnect/Block/Catalog/Filters.php index 908dde3513d4d..436929f5d6cf3 100644 --- a/app/code/core/Mage/XmlConnect/Block/Catalog/Filters.php +++ b/app/code/core/Mage/XmlConnect/Block/Catalog/Filters.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -51,14 +51,14 @@ protected function _toHtml() continue; } $itemXmlObj = $filtersXmlObj->addChild('item'); - $itemXmlObj->addChild('name', $categoryXmlObj->xmlentities($item->getName())); - $itemXmlObj->addChild('code', $categoryXmlObj->xmlentities($item->getCode())); + $itemXmlObj->addChild('name', $categoryXmlObj->escapeXml($item->getName())); + $itemXmlObj->addChild('code', $categoryXmlObj->escapeXml($item->getCode())); $valuesXmlObj = $itemXmlObj->addChild('values'); foreach ($item->getValues() as $value) { $valueXmlObj = $valuesXmlObj->addChild('value'); - $valueXmlObj->addChild('id', $categoryXmlObj->xmlentities($value->getValueString())); - $valueXmlObj->addChild('label', $categoryXmlObj->xmlentities(strip_tags($value->getLabel()))); + $valueXmlObj->addChild('id', $categoryXmlObj->escapeXml($value->getValueString())); + $valueXmlObj->addChild('label', $categoryXmlObj->escapeXml($value->getLabel())); $valueXmlObj->addChild('count', (int)$value->getProductsCount()); } } diff --git a/app/code/core/Mage/XmlConnect/Block/Catalog/Product.php b/app/code/core/Mage/XmlConnect/Block/Catalog/Product.php index 0bf4810baa037..b403c22197d2e 100644 --- a/app/code/core/Mage/XmlConnect/Block/Catalog/Product.php +++ b/app/code/core/Mage/XmlConnect/Block/Catalog/Product.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -46,9 +46,9 @@ public function productToXmlObject(Mage_Catalog_Model_Product $product, $itemNod $item = Mage::getModel('Mage_XmlConnect_Model_Simplexml_Element', '<' . $itemNodeName . '>'); if ($product && $product->getId()) { $item->addChild('entity_id', $product->getId()); - $item->addChild('name', $item->xmlentities($product->getName())); + $item->addChild('name', $item->escapeXml($product->getName())); $item->addChild('entity_type', $product->getTypeId()); - $item->addChild('short_description', $item->xmlentities($product->getShortDescription())); + $item->addChild('short_description', $item->escapeXml($product->getShortDescription())); $description = Mage::helper('Mage_XmlConnect_Helper_Data')->htmlize($item->xmlentities($product->getDescription())); $item->addChild('description', $description); $item->addChild('link', $product->getProductUrl()); @@ -81,7 +81,8 @@ public function productToXmlObject(Mage_Catalog_Model_Product $product, $itemNod /** * If product type is grouped than it has options as its grouped items */ - if ($product->getTypeId() == Mage_Catalog_Model_Product_Type_Grouped::TYPE_CODE) { + if ($product->getTypeId() == Mage_Catalog_Model_Product_Type_Grouped::TYPE_CODE + || $product->getTypeId() == Mage_Catalog_Model_Product_Type_Configurable::TYPE_CODE) { $product->setHasOptions(true); } $item->addChild('has_options', (int)$product->getHasOptions()); @@ -159,4 +160,4 @@ protected function _toHtml() return $productXmlObj->asNiceXml(); } -} +} \ No newline at end of file diff --git a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Attributes.php b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Attributes.php index 0993b8d7cc6a5..24d1e633e5c36 100644 --- a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Attributes.php +++ b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Attributes.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Gallery.php b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Gallery.php index 33cf9303b6adc..f8196ca3c90e5 100644 --- a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Gallery.php +++ b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Gallery.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/List.php b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/List.php index 6e0e95660acce..638d599b17494 100644 --- a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/List.php +++ b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/List.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options.php b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options.php index 40187b0e42402..601e018e4c826 100644 --- a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options.php +++ b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -87,7 +87,7 @@ public function getProductCustomOptionsXmlObject(Mage_Catalog_Model_Product $pro } $optionNode->addAttribute('code', $code); $optionNode->addAttribute('type', $type); - $optionNode->addAttribute('label', $xmlModel->xmlentities($option->getTitle())); + $optionNode->addAttribute('label', $xmlModel->escapeXml($option->getTitle())); if ($option->getIsRequire()) { $optionNode->addAttribute('is_required', 1); } @@ -105,7 +105,7 @@ public function getProductCustomOptionsXmlObject(Mage_Catalog_Model_Product $pro foreach ($option->getValues() as $value) { $valueNode = $optionNode->addChild('value'); $valueNode->addAttribute('code', $value->getId()); - $valueNode->addAttribute('label', $xmlModel->xmlentities($value->getTitle())); + $valueNode->addAttribute('label', $xmlModel->escapeXml($value->getTitle())); if ($value->getPrice() != 0) { $price = Mage::helper('Mage_XmlConnect_Helper_Data')->formatPriceForXml($value->getPrice()); diff --git a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Bundle.php b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Bundle.php index 5d437e4af1ac2..1149de2040bcc 100644 --- a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Bundle.php +++ b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Bundle.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -80,7 +80,7 @@ public function getProductOptionsXml(Mage_Catalog_Model_Product $product, $isObj } $optionNode->addAttribute('code', $code); $optionNode->addAttribute('type', $type); - $optionNode->addAttribute('label', $optionsXmlObj->xmlentities($_option->getTitle())); + $optionNode->addAttribute('label', $optionsXmlObj->escapeXml($_option->getTitle())); if ($_option->getRequired()) { $optionNode->addAttribute('is_required', 1); } @@ -93,7 +93,7 @@ public function getProductOptionsXml(Mage_Catalog_Model_Product $product, $isObj $valueNode = $optionNode->addChild('value'); $valueNode->addAttribute('code', $_selection->getSelectionId()); - $valueNode->addAttribute('label', $optionsXmlObj->xmlentities($_selection->getName())); + $valueNode->addAttribute('label', $optionsXmlObj->escapeXml($_selection->getName())); if (!$_option->isMultiSelection()) { if ($_selection->getSelectionCanChangeQty()) { $valueNode->addAttribute('is_qty_editable', 1); diff --git a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Configurable.php b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Configurable.php index 652a614256d82..7918147166b9c 100644 --- a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Configurable.php +++ b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Configurable.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -131,13 +131,13 @@ public function getProductOptionsXml(Mage_Catalog_Model_Product $product, $isObj $optionNode = $optionsXmlObj->addChild('option'); $optionNode->addAttribute('code', 'super_attribute[' . $id . ']'); $optionNode->addAttribute('type', 'select'); - $optionNode->addAttribute('label', $optionsXmlObj->xmlentities($attribute['label'])); + $optionNode->addAttribute('label', $optionsXmlObj->escapeXml($attribute['label'])); $optionNode->addAttribute('is_required', 1); if ($isFirst) { foreach ($attribute['options'] as $option) { $valueNode = $optionNode->addChild('value'); $valueNode->addAttribute('code', $option['id']); - $valueNode->addAttribute('label', $optionsXmlObj->xmlentities($option['label'])); + $valueNode->addAttribute('label', $optionsXmlObj->escapeXml($option['label'])); if ((float)$option['price'] != 0.00) { $valueNode->addAttribute('price', $option['price']); $valueNode->addAttribute('formated_price', $option['formated_price']); @@ -187,7 +187,7 @@ protected function _prepareRecursivelyRelatedValues(&$valueNode, $attributes, $p $_valueNode = $relatedNode->addChild('value'); $_valueNode->addAttribute('code', $option['id']); - $_valueNode->addAttribute('label', $_valueNode->xmlentities($option['label'])); + $_valueNode->addAttribute('label', $_valueNode->escapeXml($option['label'])); if ((float)$option['price'] != 0.00) { $_valueNode->addAttribute('price', $option['price']); $_valueNode->addAttribute('formated_price', $option['formated_price']); diff --git a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Giftcard.php b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Giftcard.php index 0760b5cd4d8b7..bf77b737a57aa 100755 --- a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Giftcard.php +++ b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Giftcard.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Grouped.php b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Grouped.php index 0418908d71814..4c4e154ddca35 100644 --- a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Grouped.php +++ b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Grouped.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -68,7 +68,7 @@ public function getProductOptionsXml(Mage_Catalog_Model_Product $product, $isObj $optionNode->addAttribute('code', 'super_group[' . $_item->getId() . ']'); $optionNode->addAttribute('type', 'product'); - $optionNode->addAttribute('label', $xmlModel->xmlentities($_item->getName())); + $optionNode->addAttribute('label', $xmlModel->escapeXml($_item->getName())); $optionNode->addAttribute('is_qty_editable', 1); $optionNode->addAttribute('qty', $_item->getQty()*1); diff --git a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Simple.php b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Simple.php index a4e1d42e0e1d9..a30022fb19998 100644 --- a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Simple.php +++ b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Simple.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Virtual.php b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Virtual.php index 8c6b189cd6ec3..dedeb1f853688 100644 --- a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Virtual.php +++ b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Virtual.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price.php b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price.php index 47b47b9f0ea4e..0ab89777346e9 100644 --- a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price.php +++ b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price/Bundle.php b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price/Bundle.php index 20f02386cc5e7..c6dc64a717fa9 100644 --- a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price/Bundle.php +++ b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price/Bundle.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -104,7 +104,7 @@ public function collectProductPrices( } $weeeItemXmlObj = $weeeXmlObj->addChild('item'); $weeeItemXmlObj->addAttribute( - 'name', $weeeItemXmlObj->xmlentities($_weeeTaxAttribute->getName()) + 'name', $weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName()) ); $weeeItemXmlObj->addAttribute( 'amount', $_coreHelper->currency($amount, true, false) @@ -132,7 +132,7 @@ public function collectProductPrices( } $weeeItemXmlObj = $weeeXmlObj->addChild('item'); $weeeItemXmlObj->addAttribute( - 'name', $weeeItemXmlObj->xmlentities($_weeeTaxAttribute->getName()) + 'name', $weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName()) ); $weeeItemXmlObj->addAttribute( 'amount', $_coreHelper->currency($amount, true, false) @@ -168,7 +168,7 @@ public function collectProductPrices( } $weeeItemXmlObj = $weeeXmlObj->addChild('item'); $weeeItemXmlObj->addAttribute( - 'name', $weeeItemXmlObj->xmlentities($_weeeTaxAttribute->getName()) + 'name', $weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName()) ); $weeeItemXmlObj->addAttribute( 'amount', $_coreHelper->currency($amount, true, false) @@ -194,7 +194,7 @@ public function collectProductPrices( } $weeeItemXmlObj = $weeeXmlObj->addChild('item'); $weeeItemXmlObj->addAttribute( - 'name', $weeeItemXmlObj->xmlentities($_weeeTaxAttribute->getName()) + 'name', $weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName()) ); $weeeItemXmlObj->addAttribute('amount', $_coreHelper->currency($amount, true, false)); } @@ -237,7 +237,7 @@ public function collectProductPrices( } $weeeItemXmlObj = $weeeXmlObj->addChild('item'); $weeeItemXmlObj->addAttribute( - 'name', $weeeItemXmlObj->xmlentities($_weeeTaxAttribute->getName()) + 'name', $weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName()) ); $weeeItemXmlObj->addAttribute( 'amount', $_coreHelper->currency($amount, true, false) @@ -265,7 +265,7 @@ public function collectProductPrices( } $weeeItemXmlObj = $weeeXmlObj->addChild('item'); $weeeItemXmlObj->addAttribute( - 'name', $weeeItemXmlObj->xmlentities($_weeeTaxAttribute->getName()) + 'name', $weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName()) ); $weeeItemXmlObj->addAttribute( 'amount', $_coreHelper->currency($amount, true, false) @@ -300,7 +300,7 @@ public function collectProductPrices( } $weeeItemXmlObj = $weeeXmlObj->addChild('item'); $weeeItemXmlObj->addAttribute( - 'name', $weeeItemXmlObj->xmlentities($_weeeTaxAttribute->getName()) + 'name', $weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName()) ); $weeeItemXmlObj->addAttribute( 'amount', $_coreHelper->currency($amount, true, false) @@ -328,7 +328,7 @@ public function collectProductPrices( } $weeeItemXmlObj = $weeeXmlObj->addChild('item'); $weeeItemXmlObj->addAttribute( - 'name', $weeeItemXmlObj->xmlentities($_weeeTaxAttribute->getName()) + 'name', $weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName()) ); $weeeItemXmlObj->addAttribute( 'amount', $_coreHelper->currency($amount, true, false) diff --git a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price/Default.php b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price/Default.php index 21a0878264ed7..3a1c266650641 100644 --- a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price/Default.php +++ b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price/Default.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -102,7 +102,7 @@ public function collectProductPrices( foreach ($_weeeTaxAttributes as $_weeeTaxAttribute) { $weeeItemXmlObj = $weeeXmlObj->addChild('item'); $weeeItemXmlObj->addAttribute( - 'name', $weeeItemXmlObj->xmlentities($_weeeTaxAttribute->getName()) + 'name', $weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName()) ); $weeeItemXmlObj->addAttribute( 'amount', $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, false) @@ -124,7 +124,7 @@ public function collectProductPrices( foreach ($_weeeTaxAttributes as $_weeeTaxAttribute) { $weeeItemXmlObj = $weeeXmlObj->addChild('item'); $weeeItemXmlObj->addAttribute( - 'name', $weeeItemXmlObj->xmlentities($_weeeTaxAttribute->getName()) + 'name', $weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName()) ); $weeeItemXmlObj->addAttribute('amount', $_coreHelper->currency( $_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, false @@ -139,7 +139,7 @@ public function collectProductPrices( foreach ($_weeeTaxAttributes as $_weeeTaxAttribute) { $weeeItemXmlObj = $weeeXmlObj->addChild('item'); $weeeItemXmlObj->addAttribute( - 'name', $weeeItemXmlObj->xmlentities($_weeeTaxAttribute->getName()) + 'name', $weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName()) ); $weeeItemXmlObj->addAttribute( 'amount', $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, false) @@ -178,7 +178,7 @@ public function collectProductPrices( foreach ($_weeeTaxAttributes as $_weeeTaxAttribute) { $weeeItemXmlObj = $weeeXmlObj->addChild('item'); $weeeItemXmlObj->addAttribute( - 'name', $weeeItemXmlObj->xmlentities($_weeeTaxAttribute->getName()) + 'name', $weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName()) ); $weeeItemXmlObj->addAttribute( 'amount', $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, false) @@ -197,7 +197,7 @@ public function collectProductPrices( foreach ($_weeeTaxAttributes as $_weeeTaxAttribute) { $weeeItemXmlObj = $weeeXmlObj->addChild('item'); $weeeItemXmlObj->addAttribute( - 'name', $weeeItemXmlObj->xmlentities($_weeeTaxAttribute->getName()) + 'name', $weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName()) ); $weeeItemXmlObj->addAttribute('amount', $_coreHelper->currency( $_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, false @@ -214,7 +214,7 @@ public function collectProductPrices( foreach ($_weeeTaxAttributes as $_weeeTaxAttribute) { $weeeItemXmlObj = $weeeXmlObj->addChild('item'); $weeeItemXmlObj->addAttribute( - 'name', $weeeItemXmlObj->xmlentities($_weeeTaxAttribute->getName()) + 'name', $weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName()) ); $weeeItemXmlObj->addAttribute( 'amount', $_coreHelper->currency($_weeeTaxAttribute->getAmount(), true, false) @@ -267,7 +267,7 @@ public function collectProductPrices( foreach ($_weeeTaxAttributes as $_weeeTaxAttribute) { $weeeItemXmlObj = $weeeXmlObj->addChild('item'); $weeeItemXmlObj->addAttribute( - 'name', $weeeItemXmlObj->xmlentities($_weeeTaxAttribute->getName()) + 'name', $weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName()) ); $weeeItemXmlObj->addAttribute('amount', $_coreHelper->currency( $_weeeTaxAttribute->getAmount(), true, false @@ -292,7 +292,7 @@ public function collectProductPrices( foreach ($_weeeTaxAttributes as $_weeeTaxAttribute) { $weeeItemXmlObj = $weeeXmlObj->addChild('item'); $weeeItemXmlObj->addAttribute( - 'name', $weeeItemXmlObj->xmlentities($_weeeTaxAttribute->getName()) + 'name', $weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName()) ); $weeeItemXmlObj->addAttribute('amount', $_coreHelper->currency( $_weeeTaxAttribute->getAmount() + $_weeeTaxAttribute->getTaxAmount(), true, false @@ -313,7 +313,7 @@ public function collectProductPrices( foreach ($_weeeTaxAttributes as $_weeeTaxAttribute) { $weeeItemXmlObj = $weeeXmlObj->addChild('item'); $weeeItemXmlObj->addAttribute( - 'name', $weeeItemXmlObj->xmlentities($_weeeTaxAttribute->getName()) + 'name', $weeeItemXmlObj->escapeXml($_weeeTaxAttribute->getName()) ); $weeeItemXmlObj->addAttribute('amount', $_coreHelper->currency( $_weeeTaxAttribute->getAmount(), true, false diff --git a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price/Giftcard.php b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price/Giftcard.php index 8ab6419f6b747..bbdb69bb43007 100755 --- a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price/Giftcard.php +++ b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price/Giftcard.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Related.php b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Related.php index efcfe55ccdc20..b7f1c28199993 100644 --- a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Related.php +++ b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Related.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Review.php b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Review.php index a1a28fb4aef17..9a876d6c9564a 100644 --- a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Review.php +++ b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Review.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -52,9 +52,9 @@ public function reviewToXmlObject(Mage_Review_Model_Review $review, $itemNodeNam if ($review->getId()) { $item->addChild('review_id', $review->getId()); $item->addChild('created_at', $this->formatDate($review->getCreatedAt())); - $item->addChild('title', $item->xmlentities($review->getTitle())); - $item->addChild('nickname', $item->xmlentities($review->getNickname())); - $detail = $item->xmlentities($review->getDetail()); + $item->addChild('title', $item->escapeXml($review->getTitle())); + $item->addChild('nickname', $item->escapeXml($review->getNickname())); + $detail = $item->escapeXml($review->getDetail()); if ($itemNodeName == 'item') { $remainder = ''; $deviceType = Mage::helper('Mage_XmlConnect_Helper_Data')->getDeviceType(); diff --git a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Review/List.php b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Review/List.php index e9189f76d42e8..666e957e97bdd 100644 --- a/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Review/List.php +++ b/app/code/core/Mage/XmlConnect/Block/Catalog/Product/Review/List.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Catalog/Search.php b/app/code/core/Mage/XmlConnect/Block/Catalog/Search.php index 67e371c593044..a4f621da9b993 100644 --- a/app/code/core/Mage/XmlConnect/Block/Catalog/Search.php +++ b/app/code/core/Mage/XmlConnect/Block/Catalog/Search.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -96,7 +96,7 @@ protected function _toHtml() continue; } $item = $filtersXmlObject->addChild('item'); - $item->addChild('name', $searchXmlObject->xmlentities($filter->getName())); + $item->addChild('name', $searchXmlObject->escapeXml($filter->getName())); $item->addChild('code', $filter->getRequestVar()); $values = $item->addChild('values'); @@ -107,9 +107,7 @@ protected function _toHtml() } $value = $values->addChild('value'); $value->addChild('id', $valueItem->getValueString()); - $value->addChild( - 'label', $searchXmlObject->xmlentities(strip_tags($valueItem->getLabel())) - ); + $value->addChild('label', $searchXmlObject->escapeXml($valueItem->getLabel())); $value->addChild('count', $count); } } diff --git a/app/code/core/Mage/XmlConnect/Block/Catalog/Search/Suggest.php b/app/code/core/Mage/XmlConnect/Block/Catalog/Search/Suggest.php index 31b8f5ceb92e8..d46156adb77cf 100644 --- a/app/code/core/Mage/XmlConnect/Block/Catalog/Search/Suggest.php +++ b/app/code/core/Mage/XmlConnect/Block/Catalog/Search/Suggest.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -58,7 +58,7 @@ protected function _toHtml() $items = ''; foreach ($suggestData as $item) { - $items .= $suggestXmlObj->xmlentities(strip_tags($item['title'])) . self::SUGGEST_ITEM_SEPARATOR + $items .= $suggestXmlObj->escapeXml($item['title']) . self::SUGGEST_ITEM_SEPARATOR . (int)$item['num_of_results'] . self::SUGGEST_ITEM_SEPARATOR; } diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Address/Billing.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Address/Billing.php index baec11a435299..a69a8cf485890 100644 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Address/Billing.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Address/Billing.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -55,7 +55,7 @@ protected function _toHtml() } $this->getChild('address_list')->prepareAddressData($address, $item); $item->addChild( - 'address_line', $billingXmlObj->xmlentities($address->format('oneline')) + 'address_line', $billingXmlObj->escapeXml($address->format('oneline')) ); } diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Address/Form.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Address/Form.php index 20ec75f1d3b6c..2beec2ad5e637 100644 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Address/Form.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Address/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Address/Shipping.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Address/Shipping.php index 8e6c40a1e0e87..f6b9d66968a28 100644 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Address/Shipping.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Address/Shipping.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -54,7 +54,7 @@ protected function _toHtml() $item->addAttribute('selected', 1); } $this->getChild('address_list')->prepareAddressData($address, $item); - $item->addChild('address_line', $shippingXmlObj->xmlentities($address->format('oneline'))); + $item->addChild('address_line', $shippingXmlObj->escapeXml($address->format('oneline'))); } return $shippingXmlObj->asNiceXml(); diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Agreements.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Agreements.php index 84f6a37fb8b89..6521d7388561b 100644 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Agreements.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Agreements.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -40,15 +40,18 @@ class Mage_XmlConnect_Block_Checkout_Agreements extends Mage_Checkout_Block_Agre */ protected function _toHtml() { + /** @var $agreementsXmlObj Mage_XmlConnect_Model_Simplexml_Element */ $agreementsXmlObj = Mage::getModel('Mage_XmlConnect_Model_Simplexml_Element', ''); if ($this->getAgreements()) { foreach ($this->getAgreements() as $agreement) { $itemXmlObj = $agreementsXmlObj->addChild('item'); - $content = $agreementsXmlObj->xmlentities($agreement->getContent()); + $content = $agreement->getContent(); if (!$agreement->getIsHtml()) { - $content = nl2br(strip_tags($content)); + $content = nl2br($agreementsXmlObj->escapeXml($content)); + } else { + $agreementsXmlObj->xmlentities($content); } - $agreementText = $agreementsXmlObj->xmlentities($agreement->getCheckboxText()); + $agreementText = $agreementsXmlObj->escapeXml($agreement->getCheckboxText()); $itemXmlObj->addChild('label', $agreementText); $itemXmlObj->addChild('content', $content); $itemXmlObj->addChild('code', 'agreement[' . $agreement->getId() . ']'); diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Order/Review.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Order/Review.php index 87002da20ca8c..b1136a6373286 100644 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Order/Review.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Order/Review.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Order/Review/Info.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Order/Review/Info.php index 77d8d5552aa80..07801f06ef138 100644 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Order/Review/Info.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Order/Review/Info.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -60,7 +60,7 @@ protected function _toHtml() $itemXml->addChild('entity_id', $item->getProduct()->getId()); $itemXml->addChild('entity_type', $type); $itemXml->addChild('item_id', $item->getId()); - $itemXml->addChild('name', $itemsXmlObj->xmlentities($renderer->getProductName())); + $itemXml->addChild('name', $itemsXmlObj->escapeXml($renderer->getProductName())); $itemXml->addChild('qty', $renderer->getQty()); $icon = $renderer->getProductThumbnail()->resize( Mage::helper('Mage_XmlConnect_Helper_Image')->getImageSizeForContent('product_small') @@ -174,16 +174,15 @@ protected function _toHtml() /** * Options list */ - if ($_options = $renderer->getOptionList()) { + $_options = $renderer->getOptionList(); + if ($_options) { $itemOptionsXml = $itemXml->addChild('options'); foreach ($_options as $_option) { $_formattedOptionValue = $renderer->getFormatedOptionValue($_option); $optionXml = $itemOptionsXml->addChild('option'); - $labelValue = $itemsXmlObj->xmlentities($_option['label']); + $labelValue = $itemsXmlObj->escapeXml($_option['label']); $optionXml->addAttribute('label', $labelValue); - $textValue = $itemsXmlObj->xmlentities( - strip_tags($_formattedOptionValue['value']) - ); + $textValue = $itemsXmlObj->escapeXml($_formattedOptionValue['value']); $optionXml->addAttribute('text', $textValue); } } diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Authorizenet.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Authorizenet.php index 26d49c717f9b1..ced918a75b9e8 100644 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Authorizenet.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Authorizenet.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Ccsave.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Ccsave.php index be19e88360aca..d7bc8fa01afb8 100644 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Ccsave.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Ccsave.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Checkmo.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Checkmo.php index 0bdd7caeb4c79..0cc603bf92f2e 100644 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Checkmo.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Checkmo.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Authorizenet.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Authorizenet.php index 5cc6f656f69f2..5769e517baba7 100755 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Authorizenet.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Authorizenet.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Ccsave.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Ccsave.php index 5b49907254e57..e0a006bd767dc 100755 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Ccsave.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Ccsave.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Checkmo.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Checkmo.php index 3cc288f1ab9c1..d702253319219 100755 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Checkmo.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Checkmo.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Free.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Free.php index 82a9ec85eb37b..680d6230b212a 100644 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Free.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Free.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Paypal/Abstract.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Paypal/Abstract.php index 807ef7d0694cb..2017fa0b26779 100644 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Paypal/Abstract.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Paypal/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Paypal/Express.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Paypal/Express.php index 1979debbd7e2f..f9d783d8dc08d 100644 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Paypal/Express.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Paypal/Express.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Paypal/Mecl.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Paypal/Mecl.php index ea2eec0dbb0dc..f20cb7cc97b19 100644 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Paypal/Mecl.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Paypal/Mecl.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Authorizenet.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Authorizenet.php index d0f6362706e32..bd9b9557987e5 100644 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Authorizenet.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Authorizenet.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Paypal/Direct.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Paypal/Direct.php index dd5080b97f9ad..c059afb4044e6 100644 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Paypal/Direct.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Paypal/Direct.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Paypaluk/Direct.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Paypaluk/Direct.php index 3b885046dc1d8..f721725c9ebda 100644 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Paypaluk/Direct.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Paypaluk/Direct.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Verisign.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Verisign.php index d614df0d69922..1626d14502f73 100644 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Verisign.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Verisign.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Purchaseorder.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Purchaseorder.php index e3b652f5013cc..8bc7dfb4bc9e1 100755 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Purchaseorder.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Purchaseorder.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/List.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/List.php index 2c2a2eb51cd63..710b094276a1b 100644 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/List.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/List.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -289,7 +289,7 @@ protected function _toHtml() $methodItemXmlObj = $methodsXmlObj->addChild('method'); $methodItemXmlObj->addAttribute('post_name', 'payment[method]'); $methodItemXmlObj->addAttribute('code', $method->getCode()); - $methodItemXmlObj->addAttribute('label', $methodsXmlObj->xmlentities($method->getTitle())); + $methodItemXmlObj->addAttribute('label', $methodsXmlObj->escapeXml($method->getTitle())); if ($this->getQuote()->getPayment()->getMethod() == $method->getCode()) { $methodItemXmlObj->addAttribute('selected', 1); } diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Paypal/Direct.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Paypal/Direct.php index 1acace7b3321e..d3ccc54585cfc 100644 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Paypal/Direct.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Paypal/Direct.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Paypal/Payflow.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Paypal/Payflow.php index ad219ffc962bc..b6d4b5230445d 100644 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Paypal/Payflow.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Paypal/Payflow.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Pbridge/Abstract.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Pbridge/Abstract.php index 7c4da4521f6ee..67ebc568fb3cd 100755 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Pbridge/Abstract.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Pbridge/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Purchaseorder.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Purchaseorder.php index 200c36c5e986e..a6a761e444f1f 100644 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Purchaseorder.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Purchaseorder.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Pbridge/Result.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Pbridge/Result.php index 48a6f63a03a87..1aa392fd8916d 100755 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Pbridge/Result.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Pbridge/Result.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Checkout/Shipping/Method/Available.php b/app/code/core/Mage/XmlConnect/Block/Checkout/Shipping/Method/Available.php index e1444ae4ce4e0..0cffb2dfb5692 100644 --- a/app/code/core/Mage/XmlConnect/Block/Checkout/Shipping/Method/Available.php +++ b/app/code/core/Mage/XmlConnect/Block/Checkout/Shipping/Method/Available.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -49,16 +49,16 @@ protected function _toHtml() $_sole = count($_shippingRateGroups) == 1; foreach ($_shippingRateGroups as $code => $_rates) { $methodXmlObj = $methodsXmlObj->addChild('method'); - $methodXmlObj->addAttribute('label', $methodsXmlObj->xmlentities($this->getCarrierName($code))); + $methodXmlObj->addAttribute('label', $methodsXmlObj->escapeXml($this->getCarrierName($code))); $ratesXmlObj = $methodXmlObj->addChild('rates'); $_sole = $_sole && count($_rates) == 1; foreach ($_rates as $_rate) { $rateXmlObj = $ratesXmlObj->addChild('rate'); - $rateXmlObj->addAttribute('label', $methodsXmlObj->xmlentities($_rate->getMethodTitle())); + $rateXmlObj->addAttribute('label', $methodsXmlObj->escapeXml($_rate->getMethodTitle())); $rateXmlObj->addAttribute('code', $_rate->getCode()); if ($_rate->getErrorMessage()) { - $rateXmlObj->addChild('error_message', $methodsXmlObj->xmlentities($_rate->getErrorMessage())); + $rateXmlObj->addChild('error_message', $methodsXmlObj->escapeXml($_rate->getErrorMessage())); } else { $price = Mage::helper('Mage_Tax_Helper_Data')->getShippingPrice( $_rate->getPrice(), diff --git a/app/code/core/Mage/XmlConnect/Block/Cms/Page.php b/app/code/core/Mage/XmlConnect/Block/Cms/Page.php index be878e713402b..dabd59c7e29a2 100644 --- a/app/code/core/Mage/XmlConnect/Block/Cms/Page.php +++ b/app/code/core/Mage/XmlConnect/Block/Cms/Page.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Configuration.php b/app/code/core/Mage/XmlConnect/Block/Configuration.php index 100f691920e46..983cac0e0d1e1 100644 --- a/app/code/core/Mage/XmlConnect/Block/Configuration.php +++ b/app/code/core/Mage/XmlConnect/Block/Configuration.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Customer/Address/Form.php b/app/code/core/Mage/XmlConnect/Block/Customer/Address/Form.php index 6fc1f1f667354..1010c5da40051 100644 --- a/app/code/core/Mage/XmlConnect/Block/Customer/Address/Form.php +++ b/app/code/core/Mage/XmlConnect/Block/Customer/Address/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -250,12 +250,12 @@ protected function _addPrefix(Mage_XmlConnect_Model_Simplexml_Form_Element_Field if ($this->getNameWidgetBlock()->getPrefixOptions() === false) { $contactInfoFieldset->addField($this->getNameWidgetBlock()->getFieldId('prefix'), 'text', array( - 'label' => $this->getNameWidgetBlock()->__('Prefix'), + 'label' => $this->__('Prefix'), 'name' => $this->getNameWidgetBlock()->getFieldName('prefix') ) + $attributes); } else { $contactInfoFieldset->addField($this->getNameWidgetBlock()->getFieldId('prefix'), 'select', array( - 'label' => $this->getNameWidgetBlock()->__('Prefix'), + 'label' => $this->__('Prefix'), 'name' => $this->getNameWidgetBlock()->getFieldName('prefix'), 'options' => $this->getNameWidgetBlock()->getPrefixOptions() ) + $attributes); @@ -284,12 +284,12 @@ protected function _addSuffix( if ($this->getNameWidgetBlock()->getSuffixOptions() === false) { $contactInfoFieldset->addField($this->getNameWidgetBlock()->getFieldId('suffix'), 'text', array( - 'label' => $this->getNameWidgetBlock()->__('Suffix'), + 'label' => $this->__('Suffix'), 'name' => $this->getNameWidgetBlock()->getFieldName('suffix') ) + $attributes); } else { $contactInfoFieldset->addField($this->getNameWidgetBlock()->getFieldId('suffix'), 'select', array( - 'label' => $this->getNameWidgetBlock()->__('Suffix'), + 'label' => $this->__('Suffix'), 'name' => $this->getNameWidgetBlock()->getFieldName('suffix'), 'options' => $this->getNameWidgetBlock()->getSuffixOptions() ) + $attributes); @@ -314,7 +314,7 @@ protected function _addMiddleName( ); $contactInfoFieldset->addField($this->getNameWidgetBlock()->getFieldId('middlename'), 'text', array( - 'label' => $this->getNameWidgetBlock()->__('M.I.'), + 'label' => $this->__('M.I.'), 'name' => $this->getNameWidgetBlock()->getFieldName('middlename') ) + $attributes); diff --git a/app/code/core/Mage/XmlConnect/Block/Customer/Address/List.php b/app/code/core/Mage/XmlConnect/Block/Customer/Address/List.php index 6f62ef0c4df4b..d4492b64dd664 100644 --- a/app/code/core/Mage/XmlConnect/Block/Customer/Address/List.php +++ b/app/code/core/Mage/XmlConnect/Block/Customer/Address/List.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -82,10 +82,8 @@ protected function _toHtml() * @return array */ public function prepareAddressData( - Mage_Customer_Model_Address $address, - Mage_XmlConnect_Model_Simplexml_Element $item - ) - { + Mage_Customer_Model_Address $address, Mage_XmlConnect_Model_Simplexml_Element $item + ) { if (!$address) { return array(); } @@ -123,7 +121,7 @@ public function prepareAddressData( if (empty($value)) { continue; } - $item->addChild($key, $item->xmlentities($value)); + $item->addChild($key, $item->escapeXml($value)); } } } diff --git a/app/code/core/Mage/XmlConnect/Block/Customer/Form.php b/app/code/core/Mage/XmlConnect/Block/Customer/Form.php index 331397c30adde..164f4ee46e00d 100644 --- a/app/code/core/Mage/XmlConnect/Block/Customer/Form.php +++ b/app/code/core/Mage/XmlConnect/Block/Customer/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -46,32 +46,32 @@ protected function _toHtml() $xmlModel = Mage::getModel('Mage_XmlConnect_Model_Simplexml_Element', ''); //Enterprise_Customer if ($editFlag == 1 && $customer && $customer->getId()) { - $firstname = $xmlModel->xmlentities($customer->getFirstname()); - $lastname = $xmlModel->xmlentities($customer->getLastname()); - $email = $xmlModel->xmlentities($customer->getEmail()); + $firstname = $xmlModel->escapeXml($customer->getFirstname()); + $lastname = $xmlModel->escapeXml($customer->getLastname()); + $email = $xmlModel->escapeXml($customer->getEmail()); } else { $firstname = $lastname = $email = ''; } if ($editFlag) { $passwordManageXml = ' - +

    - - - + + + - password + password
    '; } else { $passwordManageXml = ' - - + + - password + password '; @@ -80,11 +80,11 @@ protected function _toHtml() $xml = <<
    - - - + + + - + $passwordManageXml diff --git a/app/code/core/Mage/XmlConnect/Block/Customer/GiftcardCheck.php b/app/code/core/Mage/XmlConnect/Block/Customer/GiftcardCheck.php index dd46184c0e459..12a467aaecc76 100644 --- a/app/code/core/Mage/XmlConnect/Block/Customer/GiftcardCheck.php +++ b/app/code/core/Mage/XmlConnect/Block/Customer/GiftcardCheck.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Customer/Order/Details.php b/app/code/core/Mage/XmlConnect/Block/Customer/Order/Details.php index 21b23f6591cf6..f706762098880 100755 --- a/app/code/core/Mage/XmlConnect/Block/Customer/Order/Details.php +++ b/app/code/core/Mage/XmlConnect/Block/Customer/Order/Details.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Bundle.php b/app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Bundle.php index 01c67a1d5de7a..263b85982b1ca 100644 --- a/app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Bundle.php +++ b/app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Bundle.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Default.php b/app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Default.php index f92d2721a4fed..0a09e8a50bdc0 100644 --- a/app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Default.php +++ b/app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Default.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Downloadable.php b/app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Downloadable.php index be8193579d3f6..d863d910b4fbd 100644 --- a/app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Downloadable.php +++ b/app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Downloadable.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Grouped.php b/app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Grouped.php index 80024e3b47166..0cc93f53bc4e0 100644 --- a/app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Grouped.php +++ b/app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Grouped.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Customer/Order/Items.php b/app/code/core/Mage/XmlConnect/Block/Customer/Order/Items.php index 795509c56c6c5..3c6f03ac86ac9 100644 --- a/app/code/core/Mage/XmlConnect/Block/Customer/Order/Items.php +++ b/app/code/core/Mage/XmlConnect/Block/Customer/Order/Items.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Customer/Order/List.php b/app/code/core/Mage/XmlConnect/Block/Customer/Order/List.php index 7077c96dcf84e..5564d0d71f4e0 100644 --- a/app/code/core/Mage/XmlConnect/Block/Customer/Order/List.php +++ b/app/code/core/Mage/XmlConnect/Block/Customer/Order/List.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -67,7 +67,7 @@ protected function _toHtml() $item->addChild('number', $_order->getRealOrderId()); $item->addChild('date', $this->formatDate($_order->getCreatedAtStoreDate())); if ($_order->getShippingAddress()) { - $item->addChild('ship_to', $ordersXmlObj->xmlentities($_order->getShippingAddress()->getName())); + $item->addChild('ship_to', $ordersXmlObj->escapeXml($_order->getShippingAddress()->getName())); } $item->addChild('total', $_order->getOrderCurrency()->formatPrecision( $_order->getGrandTotal(), 2, array(), false, false diff --git a/app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals.php b/app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals.php index f3333e7114d14..557ce24094c84 100644 --- a/app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals.php +++ b/app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals/Tax.php b/app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals/Tax.php index bacca8d2337a6..70fbf92b4ba9b 100644 --- a/app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals/Tax.php +++ b/app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals/Tax.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Block/Customer/Storecredit.php b/app/code/core/Mage/XmlConnect/Block/Customer/Storecredit.php index 733de723ea901..aaa280671e864 100644 --- a/app/code/core/Mage/XmlConnect/Block/Customer/Storecredit.php +++ b/app/code/core/Mage/XmlConnect/Block/Customer/Storecredit.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -46,10 +46,8 @@ protected function _toHtml() $accountBalance = $this->getLayout() ->addBlock('Enterprise_CustomerBalance_Block_Account_Balance', 'account_balance'); - $customerBalanceHelper = Mage::helper('Enterprise_CustomerBalance_Helper_Data'); - $xmlModel->addCustomChild('balance', null, array( - 'label' => $customerBalanceHelper->__('Your current balance is:'), + 'label' => $this->__('Your current balance is:'), 'value' => $accountBalance->getBalance(), 'formatted_value' => Mage::helper('Mage_Core_Helper_Data')->currency($accountBalance->getBalance(), true, false) )); @@ -59,11 +57,11 @@ protected function _toHtml() if ($accountHistory->canShow() && $accountHistory->getEvents() && count($accountHistory->getEvents())) { $balanceHistory = $xmlModel->addCustomChild('balance_history', null, array( - 'label' => $customerBalanceHelper->__('Balance History'), - 'action_label' => $customerBalanceHelper->__('Action'), - 'balance_change_label' => $customerBalanceHelper->__('Balance Change'), - 'balance_label' => $customerBalanceHelper->__('Balance'), - 'date_label' => $customerBalanceHelper->__('Date') + 'label' => $this->__('Balance History'), + 'action_label' => $this->__('Action'), + 'balance_change_label' => $this->__('Balance Change'), + 'balance_label' => $this->__('Balance'), + 'date_label' => $this->__('Date') )); foreach ($accountHistory->getEvents() as $event) { @@ -88,4 +86,4 @@ protected function _toHtml() return $xmlModel->asNiceXml(); } -} +} \ No newline at end of file diff --git a/app/code/core/Mage/XmlConnect/Block/Home.php b/app/code/core/Mage/XmlConnect/Block/Home.php index 9335d0f1c4ff1..f03ca66742cd7 100644 --- a/app/code/core/Mage/XmlConnect/Block/Home.php +++ b/app/code/core/Mage/XmlConnect/Block/Home.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -69,7 +69,7 @@ protected function _toHtml() /** @var $item Mage_Catalog_Model_Category */ $item = Mage::getModel('Mage_Catalog_Model_Category')->load($item->getId()); $itemXmlObj = $itemsXmlObj->addChild('item'); - $itemXmlObj->addChild('label', $homeXmlObj->xmlentities($item->getName())); + $itemXmlObj->addChild('label', $homeXmlObj->escapeXml($item->getName())); $itemXmlObj->addChild('entity_id', $item->getId()); $itemXmlObj->addChild('content_type', $item->hasChildren() ? 'categories' : 'products'); $icon = Mage::helper('Mage_XmlConnect_Helper_Catalog_Category_Image')->initialize($item, 'thumbnail') diff --git a/app/code/core/Mage/XmlConnect/Block/Review/Form.php b/app/code/core/Mage/XmlConnect/Block/Review/Form.php index e31130b338e2c..00c7fbd714070 100644 --- a/app/code/core/Mage/XmlConnect/Block/Review/Form.php +++ b/app/code/core/Mage/XmlConnect/Block/Review/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -55,7 +55,7 @@ protected function _toHtml() $nickname = ''; if ($customer->getId()) { - $nickname = $xmlReview->xmlentities($customer->getFirstname()); + $nickname = $xmlReview->escapeXml($customer->getFirstname()); } if ($this->getRatings()) { diff --git a/app/code/core/Mage/XmlConnect/Block/Wishlist.php b/app/code/core/Mage/XmlConnect/Block/Wishlist.php index 94bf474c182d0..f293f14413e41 100644 --- a/app/code/core/Mage/XmlConnect/Block/Wishlist.php +++ b/app/code/core/Mage/XmlConnect/Block/Wishlist.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -70,13 +70,14 @@ protected function _toHtml() $itemXmlObj->addChild('item_id', $item->getWishlistItemId()); $itemXmlObj->addChild('entity_id', $item->getProductId()); $itemXmlObj->addChild('entity_type_id', $item->getProduct()->getTypeId()); - $itemXmlObj->addChild('name', $wishlistXmlObj->xmlentities($item->getName())); - $itemXmlObj->addChild('in_stock', (int)$item->getProduct()->getIsInStock()); + $itemXmlObj->addChild('name', $wishlistXmlObj->escapeXml($item->getName())); + $itemXmlObj->addChild('in_stock', (int)$item->getProduct()->getStockItem()->getIsInStock()); $itemXmlObj->addChild('is_salable', (int)$item->getProduct()->isSalable()); /** * If product type is grouped than it has options as its grouped items */ - if ($item->getProduct()->getTypeId() == Mage_Catalog_Model_Product_Type_Grouped::TYPE_CODE) { + if ($item->getProduct()->getTypeId() == Mage_Catalog_Model_Product_Type_Grouped::TYPE_CODE + || $item->getProduct()->getTypeId() == Mage_Catalog_Model_Product_Type_Configurable::TYPE_CODE) { $item->getProduct()->setHasOptions(true); } $itemXmlObj->addChild('has_options', (int)$item->getProduct()->getHasOptions()); @@ -89,10 +90,10 @@ protected function _toHtml() $file = Mage::helper('Mage_XmlConnect_Helper_Data')->urlToPath($icon); $iconXml->addAttribute('modification_time', filemtime($file)); - $description = $wishlistXmlObj->xmlentities(strip_tags($item->getDescription())); + $description = $wishlistXmlObj->escapeXml($item->getDescription()); $itemXmlObj->addChild('description', $description); - $addedDate = $wishlistXmlObj->xmlentities($this->getFormatedDate($item->getAddedAt())); + $addedDate = $wishlistXmlObj->escapeXml($this->getFormatedDate($item->getAddedAt())); $itemXmlObj->addChild('added_date', $addedDate); if ($this->getChild('product_price')) { diff --git a/app/code/core/Mage/XmlConnect/Controller/Action.php b/app/code/core/Mage/XmlConnect/Controller/Action.php index 9bba39debce23..1e38636849fac 100644 --- a/app/code/core/Mage/XmlConnect/Controller/Action.php +++ b/app/code/core/Mage/XmlConnect/Controller/Action.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Helper/Android.php b/app/code/core/Mage/XmlConnect/Helper/Android.php index e4fa964c089fa..4ad8845b4901d 100755 --- a/app/code/core/Mage/XmlConnect/Helper/Android.php +++ b/app/code/core/Mage/XmlConnect/Helper/Android.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Helper/Catalog/Category/Image.php b/app/code/core/Mage/XmlConnect/Helper/Catalog/Category/Image.php index 5799712ada0f8..33b32d1635982 100644 --- a/app/code/core/Mage/XmlConnect/Helper/Catalog/Category/Image.php +++ b/app/code/core/Mage/XmlConnect/Helper/Catalog/Category/Image.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Helper/Customer/Form/Renderer.php b/app/code/core/Mage/XmlConnect/Helper/Customer/Form/Renderer.php index ea40a65c31bdc..ca3dd410957f3 100644 --- a/app/code/core/Mage/XmlConnect/Helper/Customer/Form/Renderer.php +++ b/app/code/core/Mage/XmlConnect/Helper/Customer/Form/Renderer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -37,11 +37,11 @@ class Mage_XmlConnect_Helper_Customer_Form_Renderer extends Mage_Core_Helper_Abs * Get title and required attributes for a field * * @param Mage_XmlConnect_Model_Simplexml_Form_Abstract $fieldsetXmlObj - * @param Enterprise_Customer_Block_Form_Renderer_Abstract $blockObject + * @param Enterprise_Eav_Block_Form_Renderer_Abstract $blockObject * @return array */ public function addTitleAndRequiredAttr(Mage_XmlConnect_Model_Simplexml_Form_Abstract $fieldsetXmlObj, - Enterprise_Customer_Block_Form_Renderer_Abstract $blockObject + Enterprise_Eav_Block_Form_Renderer_Abstract $blockObject ) { $attributes = array(); diff --git a/app/code/core/Mage/XmlConnect/Helper/Customer/Order.php b/app/code/core/Mage/XmlConnect/Helper/Customer/Order.php index 7c8983e075d55..c555e0abfa0a6 100644 --- a/app/code/core/Mage/XmlConnect/Helper/Customer/Order.php +++ b/app/code/core/Mage/XmlConnect/Helper/Customer/Order.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -62,7 +62,7 @@ public function addPriceAndSubtotalToXml(Mage_Core_Block_Template $renderer, Mag $typesOfDisplay = $renderer->getTypesOfDisplay(); if ($isIncludeTax) { $nodeName = 'including_tax'; - $nodeLabel = $renderer->__('Incl. Tax'); + $nodeLabel = Mage::helper('Mage_Tax_Helper_Data')->__('Incl. Tax'); $inclPrice = $renderer->helper('Mage_Checkout_Helper_Data')->getPriceInclTax($item); $inclSubtotal = $renderer->helper('Mage_Checkout_Helper_Data')->getSubtotalInclTax($item); @@ -77,7 +77,7 @@ public function addPriceAndSubtotalToXml(Mage_Core_Block_Template $renderer, Mag $weeeParams['include'] = $inclPrice; } else { $nodeName = 'excluding_tax'; - $nodeLabel = $renderer->__('Excl. Tax'); + $nodeLabel = Mage::helper('Mage_Tax_Helper_Data')->__('Excl. Tax'); if ($typesOfDisplay[self::PRICE_DISPLAY_TYPE_14]) { $price = $item->getPrice() + $renderer->getWeeeTaxAppliedAmount() @@ -221,19 +221,19 @@ public function addQuantityToXml(Mage_Core_Block_Template $renderer, ) { $qty = 1 * $item->getQtyOrdered(); if ($qty > 0) { - $quantityXml->addCustomChild('value', $qty, array('label' => $renderer->__('Ordered'))); + $quantityXml->addCustomChild('value', $qty, array('label' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Ordered'))); } $qty = 1 * $item->getQtyShipped(); if ($qty > 0) { - $quantityXml->addCustomChild('value', $qty, array('label' => $renderer->__('Shipped'))); + $quantityXml->addCustomChild('value', $qty, array('label' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Shipped'))); } $qty = 1 * $item->getQtyCanceled(); if ($qty > 0) { - $quantityXml->addCustomChild('value', $qty, array('label' => $renderer->__('Canceled'))); + $quantityXml->addCustomChild('value', $qty, array('label' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Canceled'))); } $qty = 1 * $item->getQtyRefunded(); if ($qty > 0) { - $quantityXml->addCustomChild('value', $qty, array('label' => $renderer->__('Refunded'))); + $quantityXml->addCustomChild('value', $qty, array('label' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Refunded'))); } } diff --git a/app/code/core/Mage/XmlConnect/Helper/Data.php b/app/code/core/Mage/XmlConnect/Helper/Data.php index 805c66208944f..43b25799690a0 100644 --- a/app/code/core/Mage/XmlConnect/Helper/Data.php +++ b/app/code/core/Mage/XmlConnect/Helper/Data.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -43,6 +43,11 @@ class Mage_XmlConnect_Helper_Data extends Mage_Core_Helper_Abstract */ const MESSAGE_TITLE_LENGTH = 255; + /** + * Curl default timeout + */ + const CURLOPT_DEFAULT_TIMEOUT = 60; + /** * List of the keys for xml config that have to be excluded form application config * @@ -425,7 +430,6 @@ public function htmlize($body) { $w3cUrl = 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'; return <<getAppCode(); + $applicationId = Mage::getModel('Mage_XmlConnect_Model_Template')->load($queue->getTemplateId())->getApplicationId(); /** @var $app Mage_XmlConnect_Model_Application */ - $app = Mage::getModel('Mage_XmlConnect_Model_Application')->loadByCode($appCode); + $app = Mage::getModel('Mage_XmlConnect_Model_Application')->load($applicationId); if (!$app->getId()) { Mage::throwException( - Mage::helper('Mage_XmlConnect_Helper_Data')->__('Can\'t load application with code "%s"', $appCode) + Mage::helper('Mage_XmlConnect_Helper_Data')->__('Can\'t load application with id "%s"', $applicationId) ); } @@ -627,8 +631,6 @@ public function sendBroadcastMessage(Mage_XmlConnect_Model_Queue $queue) return; } - $userpwd = $app->getUserpwd(); - $sendType = $queue->getData('type'); switch ($sendType) { case Mage_XmlConnect_Model_Queue::MESSAGE_TYPE_AIRMAIL: @@ -643,29 +645,21 @@ public function sendBroadcastMessage(Mage_XmlConnect_Model_Queue $queue) break; } - $curlHandler = curl_init(Mage::getStoreConfig($configPath)); + $curl = new Varien_Http_Adapter_Curl(); + $curl->setConfig($this->_getCurlConfig($app->getUserpwd())); - $httpHeaders = $this->getHttpHeaders(); + $urbanUrl = Mage::getStoreConfig($configPath); + $curl->write( + Zend_Http_Client::POST, $urbanUrl, HTTP_REQUEST_HTTP_VER_1_1, $this->getHttpHeaders(), $params + ); - curl_setopt($curlHandler, CURLOPT_POST, 1); - curl_setopt($curlHandler, CURLOPT_HTTPHEADER, $httpHeaders); - curl_setopt($curlHandler, CURLOPT_POSTFIELDS, $params); - curl_setopt($curlHandler, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($curlHandler, CURLOPT_USERPWD, $userpwd); - curl_setopt($curlHandler, CURLOPT_TIMEOUT, 60); - - // Execute the request. - $result = curl_exec($curlHandler); - $succeeded = curl_errno($curlHandler) == 0 ? true : false; - - // close cURL resource, and free up system resources - curl_close($curlHandler); - - if ($succeeded && (is_null($result) || strtolower($result) == 'null')) { + if ($curl->read() && $curl->getInfo(CURLINFO_HTTP_CODE) == 200) { $queue->setStatus(Mage_XmlConnect_Model_Queue::STATUS_COMPLETED); } - $queue->setIsSent(true); + $curl->close(); + $queue->setIsSent(true); + $queue->save(); return; } catch (Exception $e) { Mage::logException($e); @@ -676,12 +670,23 @@ public function sendBroadcastMessage(Mage_XmlConnect_Model_Queue $queue) /** * Get headers for broadcast message * - * @return string + * @return array */ public function getHttpHeaders() { - $httpHeaders = array('Content-Type: application/json'); - return $httpHeaders; + return array('Content-Type: application/json'); + } + + /** + * Get urban airship curl request configuration + * + * @param string $userPwd + * @param int $timeout + * @return array + */ + protected function _getCurlConfig($userPwd, $timeout = self::CURLOPT_DEFAULT_TIMEOUT) + { + return array ('timeout' => $timeout, 'userpwd' => $userPwd); } /** diff --git a/app/code/core/Mage/XmlConnect/Helper/Image.php b/app/code/core/Mage/XmlConnect/Helper/Image.php index 049b61f35ba34..070d5a8e93628 100644 --- a/app/code/core/Mage/XmlConnect/Helper/Image.php +++ b/app/code/core/Mage/XmlConnect/Helper/Image.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Helper/Ipad.php b/app/code/core/Mage/XmlConnect/Helper/Ipad.php index 05a7237178847..9458b4724855c 100755 --- a/app/code/core/Mage/XmlConnect/Helper/Ipad.php +++ b/app/code/core/Mage/XmlConnect/Helper/Ipad.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Helper/Iphone.php b/app/code/core/Mage/XmlConnect/Helper/Iphone.php index 29827d45e374c..a744e5d8a856a 100644 --- a/app/code/core/Mage/XmlConnect/Helper/Iphone.php +++ b/app/code/core/Mage/XmlConnect/Helper/Iphone.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Helper/Theme.php b/app/code/core/Mage/XmlConnect/Helper/Theme.php index 63855dbae37f9..61cf16e9276d3 100644 --- a/app/code/core/Mage/XmlConnect/Helper/Theme.php +++ b/app/code/core/Mage/XmlConnect/Helper/Theme.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Adminhtml/System/Config/Backend/Baseurl.php b/app/code/core/Mage/XmlConnect/Model/Adminhtml/System/Config/Backend/Baseurl.php index a8ebefe46b607..b92be073efc6f 100644 --- a/app/code/core/Mage/XmlConnect/Model/Adminhtml/System/Config/Backend/Baseurl.php +++ b/app/code/core/Mage/XmlConnect/Model/Adminhtml/System/Config/Backend/Baseurl.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Adminhtml/System/Config/Backend/Currency/Default.php b/app/code/core/Mage/XmlConnect/Model/Adminhtml/System/Config/Backend/Currency/Default.php index 8802f1f30c4f0..a4f7a7452fe7b 100644 --- a/app/code/core/Mage/XmlConnect/Model/Adminhtml/System/Config/Backend/Currency/Default.php +++ b/app/code/core/Mage/XmlConnect/Model/Adminhtml/System/Config/Backend/Currency/Default.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Application.php b/app/code/core/Mage/XmlConnect/Model/Application.php index 61677907c3a72..0b9e7dff75bf6 100644 --- a/app/code/core/Mage/XmlConnect/Model/Application.php +++ b/app/code/core/Mage/XmlConnect/Model/Application.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Catalog/Category/Image.php b/app/code/core/Mage/XmlConnect/Model/Catalog/Category/Image.php index d54cd9a79989c..220133eaed4d4 100644 --- a/app/code/core/Mage/XmlConnect/Model/Catalog/Category/Image.php +++ b/app/code/core/Mage/XmlConnect/Model/Catalog/Category/Image.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Catalog/Category/Media/Config.php b/app/code/core/Mage/XmlConnect/Model/Catalog/Category/Media/Config.php index f4b47d32c5f2a..7b99a5fc00469 100644 --- a/app/code/core/Mage/XmlConnect/Model/Catalog/Category/Media/Config.php +++ b/app/code/core/Mage/XmlConnect/Model/Catalog/Category/Media/Config.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/ConfigData.php b/app/code/core/Mage/XmlConnect/Model/ConfigData.php index 6154d18b2d4dd..2aa05b250b6eb 100644 --- a/app/code/core/Mage/XmlConnect/Model/ConfigData.php +++ b/app/code/core/Mage/XmlConnect/Model/ConfigData.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/History.php b/app/code/core/Mage/XmlConnect/Model/History.php index 94b4c97b95a2a..54143db9c584b 100644 --- a/app/code/core/Mage/XmlConnect/Model/History.php +++ b/app/code/core/Mage/XmlConnect/Model/History.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Observer.php b/app/code/core/Mage/XmlConnect/Model/Observer.php index edd3882ed5ddb..e1f3dd5c683b9 100644 --- a/app/code/core/Mage/XmlConnect/Model/Observer.php +++ b/app/code/core/Mage/XmlConnect/Model/Observer.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -112,8 +112,7 @@ public function scheduledSend() foreach ($collection as $message) { if ($message->getId()) { Mage::helper('Mage_XmlConnect_Helper_Data')->sendBroadcastMessage($message); - $message->save(); } } } -} +} \ No newline at end of file diff --git a/app/code/core/Mage/XmlConnect/Model/Payment/Method/Paypal/Config.php b/app/code/core/Mage/XmlConnect/Model/Payment/Method/Paypal/Config.php index 30ff9fab3ee5b..9088db2f0c028 100644 --- a/app/code/core/Mage/XmlConnect/Model/Payment/Method/Paypal/Config.php +++ b/app/code/core/Mage/XmlConnect/Model/Payment/Method/Paypal/Config.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Payment/Method/Paypal/Mecl.php b/app/code/core/Mage/XmlConnect/Model/Payment/Method/Paypal/Mecl.php index fc131055fbfdc..5193aa2bda023 100644 --- a/app/code/core/Mage/XmlConnect/Model/Payment/Method/Paypal/Mecl.php +++ b/app/code/core/Mage/XmlConnect/Model/Payment/Method/Paypal/Mecl.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Payment/Method/Paypal/Mep.php b/app/code/core/Mage/XmlConnect/Model/Payment/Method/Paypal/Mep.php index 3697ee83bed1f..beaf1e457cebf 100644 --- a/app/code/core/Mage/XmlConnect/Model/Payment/Method/Paypal/Mep.php +++ b/app/code/core/Mage/XmlConnect/Model/Payment/Method/Paypal/Mep.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Paypal/Mecl/Checkout.php b/app/code/core/Mage/XmlConnect/Model/Paypal/Mecl/Checkout.php index 02ce8c2ead217..ef4cc78dde491 100644 --- a/app/code/core/Mage/XmlConnect/Model/Paypal/Mecl/Checkout.php +++ b/app/code/core/Mage/XmlConnect/Model/Paypal/Mecl/Checkout.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Paypal/Mep/Checkout.php b/app/code/core/Mage/XmlConnect/Model/Paypal/Mep/Checkout.php index 386339e7b23c2..4d130118f736f 100644 --- a/app/code/core/Mage/XmlConnect/Model/Paypal/Mep/Checkout.php +++ b/app/code/core/Mage/XmlConnect/Model/Paypal/Mep/Checkout.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Preview/Abstract.php b/app/code/core/Mage/XmlConnect/Model/Preview/Abstract.php index b331cffee24e1..f2d54c93b0fb4 100755 --- a/app/code/core/Mage/XmlConnect/Model/Preview/Abstract.php +++ b/app/code/core/Mage/XmlConnect/Model/Preview/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Preview/Android.php b/app/code/core/Mage/XmlConnect/Model/Preview/Android.php index 275b65b639a65..29adb1324428e 100755 --- a/app/code/core/Mage/XmlConnect/Model/Preview/Android.php +++ b/app/code/core/Mage/XmlConnect/Model/Preview/Android.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Preview/Ipad.php b/app/code/core/Mage/XmlConnect/Model/Preview/Ipad.php index dd0a124a60116..a87c55d2a5fa6 100755 --- a/app/code/core/Mage/XmlConnect/Model/Preview/Ipad.php +++ b/app/code/core/Mage/XmlConnect/Model/Preview/Ipad.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Preview/Iphone.php b/app/code/core/Mage/XmlConnect/Model/Preview/Iphone.php index 9a946e12e5555..ecb427aad0dfe 100755 --- a/app/code/core/Mage/XmlConnect/Model/Preview/Iphone.php +++ b/app/code/core/Mage/XmlConnect/Model/Preview/Iphone.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Queue.php b/app/code/core/Mage/XmlConnect/Model/Queue.php index 9518b9d22bce8..a1aa5eed28b5c 100755 --- a/app/code/core/Mage/XmlConnect/Model/Queue.php +++ b/app/code/core/Mage/XmlConnect/Model/Queue.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Resource/Application.php b/app/code/core/Mage/XmlConnect/Model/Resource/Application.php index eabdf1efc538d..acd83b42a702f 100755 --- a/app/code/core/Mage/XmlConnect/Model/Resource/Application.php +++ b/app/code/core/Mage/XmlConnect/Model/Resource/Application.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Resource/Application/Collection.php b/app/code/core/Mage/XmlConnect/Model/Resource/Application/Collection.php index 73fc0740cff19..76a2f26172356 100755 --- a/app/code/core/Mage/XmlConnect/Model/Resource/Application/Collection.php +++ b/app/code/core/Mage/XmlConnect/Model/Resource/Application/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Resource/Cms/Page/Collection.php b/app/code/core/Mage/XmlConnect/Model/Resource/Cms/Page/Collection.php index 46fd005de2fd7..c81b20662917f 100755 --- a/app/code/core/Mage/XmlConnect/Model/Resource/Cms/Page/Collection.php +++ b/app/code/core/Mage/XmlConnect/Model/Resource/Cms/Page/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Resource/ConfigData.php b/app/code/core/Mage/XmlConnect/Model/Resource/ConfigData.php index d362abf839af4..98933031af454 100644 --- a/app/code/core/Mage/XmlConnect/Model/Resource/ConfigData.php +++ b/app/code/core/Mage/XmlConnect/Model/Resource/ConfigData.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Resource/ConfigData/Collection.php b/app/code/core/Mage/XmlConnect/Model/Resource/ConfigData/Collection.php index 0d821787938a9..99ccc99686bac 100644 --- a/app/code/core/Mage/XmlConnect/Model/Resource/ConfigData/Collection.php +++ b/app/code/core/Mage/XmlConnect/Model/Resource/ConfigData/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Resource/Filter/Collection.php b/app/code/core/Mage/XmlConnect/Model/Resource/Filter/Collection.php index 99f73c25f1ab4..375a6fb43a448 100755 --- a/app/code/core/Mage/XmlConnect/Model/Resource/Filter/Collection.php +++ b/app/code/core/Mage/XmlConnect/Model/Resource/Filter/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Resource/History.php b/app/code/core/Mage/XmlConnect/Model/Resource/History.php index fb7d929e9a403..ff8902b2c830b 100755 --- a/app/code/core/Mage/XmlConnect/Model/Resource/History.php +++ b/app/code/core/Mage/XmlConnect/Model/Resource/History.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Resource/History/Collection.php b/app/code/core/Mage/XmlConnect/Model/Resource/History/Collection.php index fc6e369e4f2d5..8a88027cc189b 100755 --- a/app/code/core/Mage/XmlConnect/Model/Resource/History/Collection.php +++ b/app/code/core/Mage/XmlConnect/Model/Resource/History/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Resource/Queue.php b/app/code/core/Mage/XmlConnect/Model/Resource/Queue.php index da3046042f1a6..f12c1c70f9663 100755 --- a/app/code/core/Mage/XmlConnect/Model/Resource/Queue.php +++ b/app/code/core/Mage/XmlConnect/Model/Resource/Queue.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Resource/Queue/Collection.php b/app/code/core/Mage/XmlConnect/Model/Resource/Queue/Collection.php index be70461365c7a..3b7209ed6c2bc 100755 --- a/app/code/core/Mage/XmlConnect/Model/Resource/Queue/Collection.php +++ b/app/code/core/Mage/XmlConnect/Model/Resource/Queue/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Resource/Setup.php b/app/code/core/Mage/XmlConnect/Model/Resource/Setup.php index 38fd72590540f..132cd9817efb4 100755 --- a/app/code/core/Mage/XmlConnect/Model/Resource/Setup.php +++ b/app/code/core/Mage/XmlConnect/Model/Resource/Setup.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Resource/Template.php b/app/code/core/Mage/XmlConnect/Model/Resource/Template.php index 68a50a1d48449..f26503c2f65eb 100755 --- a/app/code/core/Mage/XmlConnect/Model/Resource/Template.php +++ b/app/code/core/Mage/XmlConnect/Model/Resource/Template.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Resource/Template/Collection.php b/app/code/core/Mage/XmlConnect/Model/Resource/Template/Collection.php index d6670cb6384b8..acd309be2486b 100755 --- a/app/code/core/Mage/XmlConnect/Model/Resource/Template/Collection.php +++ b/app/code/core/Mage/XmlConnect/Model/Resource/Template/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Simplexml/Element.php b/app/code/core/Mage/XmlConnect/Model/Simplexml/Element.php index 67aea94c7ac99..884e07ad82941 100644 --- a/app/code/core/Mage/XmlConnect/Model/Simplexml/Element.php +++ b/app/code/core/Mage/XmlConnect/Model/Simplexml/Element.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -60,18 +60,55 @@ public function appendChild($source) return $this; } + /** + * Escape xml entities + * + * @param mixed $data + * @param bool $stripTags + * @param array $allowedTags + * @return mixed + */ + public function escapeXml($data, $stripTags = true, $allowedTags = null) + { + if (is_array($data)) { + $result = array(); + foreach ($data as $item) { + if ($stripTags) { + $item = Mage::helper('Mage_Core_Helper_Data')->stripTags($item, $allowedTags); + } + $result[] = $this->xmlentities($item); + } + } else { + if (is_null($data)) { + $data = $this; + } + $data = (string)$data; + + if ($stripTags) { + $data = Mage::helper('Mage_Core_Helper_Data')->stripTags($data, $allowedTags); + } + $result = $this->xmlentities($data); + } + return $result; + } + /** * Converts meaningful xml character (") to xml attribute specification * * @param string $value + * @param bool $stripTags * @return string|this */ - public function xmlAttribute($value = null) + public function xmlAttribute($value = null, $stripTags = true) { if (is_null($value)) { $value = $this; } $value = (string)$value; + + if ($stripTags) { + $value = Mage::helper('Mage_Core_Helper_Data')->stripTags($value); + } $value = str_replace(array('&', '"', '<', '>'), array('&', '"', '<', '>'), $value); return $value; } diff --git a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form.php b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form.php index 8e58472a9e135..1fcc360ca79b2 100644 --- a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form.php +++ b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Abstract.php b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Abstract.php index 84f7cb2fca9c2..819e5765372f0 100644 --- a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Abstract.php +++ b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -182,7 +182,7 @@ public function addType($type, $className) public function getElements() { if (empty($this->_elements)) { - $this->_elements = Mage::getModel('Mage_XmlConnect_Model_Simplexml_Form_Element_Collection'); + $this->_elements = Mage::getModel('Mage_XmlConnect_Model_Simplexml_Form_Element_Collection', $this); } return $this->_elements; } diff --git a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Abstract.php b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Abstract.php index 2aed90b3343c1..c7be7c237a9a6 100644 --- a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Abstract.php +++ b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Checkbox.php b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Checkbox.php index 62bf94a76bddf..ee8fc1605c10e 100644 --- a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Checkbox.php +++ b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Checkbox.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Collection.php b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Collection.php index 0694dd4d9ad8e..1ea98bb64faa1 100644 --- a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Collection.php +++ b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Collection.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/CountryListSelect.php b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/CountryListSelect.php index 69e54c017fdea..86ecc27e7f9b3 100644 --- a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/CountryListSelect.php +++ b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/CountryListSelect.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Date.php b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Date.php index 921364960ff22..27797d28439e8 100644 --- a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Date.php +++ b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Date.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Email.php b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Email.php index 382b75fdcc936..6b00f4b2efbe3 100644 --- a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Email.php +++ b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Email.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Fieldset.php b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Fieldset.php index aa6fa3c0e04c6..865f50d00b994 100644 --- a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Fieldset.php +++ b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Fieldset.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/File.php b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/File.php index 286b8ef8f4aef..d58c73f06b257 100644 --- a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/File.php +++ b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/File.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Image.php b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Image.php index ca7570af62934..3203054ec1948 100644 --- a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Image.php +++ b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Image.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Multiline.php b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Multiline.php index 3936345f9cc93..4128f130d7243 100644 --- a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Multiline.php +++ b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Multiline.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Multiselect.php b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Multiselect.php index 7349989dca9dd..2dbc66dad8f5f 100644 --- a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Multiselect.php +++ b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Multiselect.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Renderer/Interface.php b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Renderer/Interface.php index c71fd3795a985..cf5bdbe481c3f 100644 --- a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Renderer/Interface.php +++ b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Renderer/Interface.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Select.php b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Select.php index 7eda8e14d2e96..ac5c798b3f5bc 100644 --- a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Select.php +++ b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Select.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Text.php b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Text.php index c664e9c4e0ea7..38d96a3c736b9 100644 --- a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Text.php +++ b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Text.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Textarea.php b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Textarea.php index 92e1b3c9dae5b..b342fe9cce89e 100644 --- a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Textarea.php +++ b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Textarea.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Validator.php b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Validator.php index 5449685a94abf..9faec81d938ab 100644 --- a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Validator.php +++ b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Validator.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Validator/Abstract.php b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Validator/Abstract.php index c592fc28ed473..de63badd5c825 100644 --- a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Validator/Abstract.php +++ b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Validator/Abstract.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -71,22 +71,21 @@ public function __construct($attributes = array()) */ protected function _setDefaultValidatorTypeMessages() { - $helper = Mage::helper('Mage_XmlConnect_Helper_Data'); $this->_validatorTypeMessages = array( - 'min_length' => $helper->__('Text length does not satisfy specified min text range.'), - 'max_length' => $helper->__('Text length does not satisfy specified max text range.'), - 'alphanumeric' => $helper->__('Please use only letters (a-z or A-Z) or numbers (0-9) only in this field. No spaces or other characters are allowed.'), - 'email' => $helper->__('Please enter a valid email address. For example johndoe@domain.com.'), - 'required' => $helper->__('This is a required field.'), - 'required_select' => $helper->__('Please select an option.'), - 'numeric' => $helper->__('Please use numbers only in this field. Please avoid spaces or other characters such as dots or commas.'), - 'alpha' => $helper->__('Please use letters only (a-z or A-Z) in this field.'), - 'url' => $helper->__('Please enter a valid URL. Protocol is required (http://, https:// or ftp://)'), - 'date' => $helper->__('Please enter a valid date.'), - 'max_file_size' => $helper->__('\'%s\' exceeds the allowed file size: %d (bytes)', $this->getFieldLabel(), $this->getValue()), - 'file_extensions' => $helper->__('\'%s\' is not a valid file extension. Allowed extensions: %s', $this->getFieldLabel(), $this->getValue()), - 'max_image_width' => $helper->__('\'%s\' width exceeds allowed value of %d px', $this->getFieldLabel(), $this->getValue()), - 'max_image_height' => $helper->__('\'%s\' height exceeds allowed value of %d px', $this->getFieldLabel(), $this->getValue()) + 'min_length' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Text length does not satisfy specified min text range.'), + 'max_length' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Text length does not satisfy specified max text range.'), + 'alphanumeric' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Please use only letters (a-z or A-Z) or numbers (0-9) only in this field. No spaces or other characters are allowed.'), + 'email' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Please enter a valid email address. For example johndoe@domain.com.'), + 'required' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('This is a required field.'), + 'required_select' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Please select an option.'), + 'numeric' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Please use numbers only in this field. Please avoid spaces or other characters such as dots or commas.'), + 'alpha' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Please use letters only (a-z or A-Z) in this field.'), + 'url' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Please enter a valid URL. Protocol is required (http://, https:// or ftp://)'), + 'date' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('Please enter a valid date.'), + 'max_file_size' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('\'%s\' exceeds the allowed file size: %d (bytes)', $this->getFieldLabel(), $this->getValue()), + 'file_extensions' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('\'%s\' is not a valid file extension. Allowed extensions: %s', $this->getFieldLabel(), $this->getValue()), + 'max_image_width' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('\'%s\' width exceeds allowed value of %d px', $this->getFieldLabel(), $this->getValue()), + 'max_image_height' => Mage::helper('Mage_XmlConnect_Helper_Data')->__('\'%s\' height exceeds allowed value of %d px', $this->getFieldLabel(), $this->getValue()) ); return $this; } diff --git a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Validator/Rule.php b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Validator/Rule.php index bd47829a6f234..0eee1fcf729c4 100644 --- a/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Validator/Rule.php +++ b/app/code/core/Mage/XmlConnect/Model/Simplexml/Form/Element/Validator/Rule.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Tabs.php b/app/code/core/Mage/XmlConnect/Model/Tabs.php index fbb8232ff936c..9bd968fbd5914 100644 --- a/app/code/core/Mage/XmlConnect/Model/Tabs.php +++ b/app/code/core/Mage/XmlConnect/Model/Tabs.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Template.php b/app/code/core/Mage/XmlConnect/Model/Template.php index bd11e9e724165..017f1c890721e 100755 --- a/app/code/core/Mage/XmlConnect/Model/Template.php +++ b/app/code/core/Mage/XmlConnect/Model/Template.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/Model/Theme.php b/app/code/core/Mage/XmlConnect/Model/Theme.php index c855922f8bcb6..54d22bf259df9 100644 --- a/app/code/core/Mage/XmlConnect/Model/Theme.php +++ b/app/code/core/Mage/XmlConnect/Model/Theme.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/controllers/Adminhtml/MobileController.php b/app/code/core/Mage/XmlConnect/controllers/Adminhtml/MobileController.php index 5b3df9be47ef2..eac013491f187 100644 --- a/app/code/core/Mage/XmlConnect/controllers/Adminhtml/MobileController.php +++ b/app/code/core/Mage/XmlConnect/controllers/Adminhtml/MobileController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -317,25 +317,29 @@ protected function _clearSessionData() protected function _processPostRequest() { try { + /** @var $app Mage_XmlConnect_Model_Application */ $app = Mage::helper('Mage_XmlConnect_Helper_Data')->getApplication(); $params = $app->getSubmitParams(); $appConnectorUrl = Mage::getStoreConfig('xmlconnect/mobile_application/magentocommerce_url'); - $curlHandler = curl_init($appConnectorUrl . $params['key']); - - // set URL and other appropriate options - curl_setopt($curlHandler, CURLOPT_POST, 1); - curl_setopt($curlHandler, CURLOPT_POSTFIELDS, $params); - curl_setopt($curlHandler, CURLOPT_SSL_VERIFYHOST, 2); - curl_setopt($curlHandler, CURLOPT_RETURNTRANSFER, 1); - curl_setopt($curlHandler, CURLOPT_SSL_VERIFYPEER, FALSE); - curl_setopt($curlHandler, CURLOPT_TIMEOUT, 60); - // Execute the request. - $result = curl_exec($curlHandler); - - // close cURL resource, and free up system resources - curl_close($curlHandler); + $curl = new Varien_Http_Adapter_Curl(); + $verifyPeerValue = Mage::getStoreConfig('xmlconnect/mobile_application/curl_ssl_verifypeer'); + $curl->setConfig(array( + 'timeout' => Mage_XmlConnect_Helper_Data::CURLOPT_DEFAULT_TIMEOUT, + 'verifypeer' => $verifyPeerValue, 'verifyhost' => 2, 'header' => false + )); + + $mCommerceUrl = $appConnectorUrl . $params['key']; + $curl->write(Zend_Http_Client::POST, $mCommerceUrl, CURL_HTTP_VERSION_1_1, array(), $params); + + $result = $curl->read(); + if(false === $result) { + Mage::log('Curl error: ' . $curl->getError()); + $curl->close(); + Mage::throwException($this->__('Request internal error.')); + } + $curl->close(); // Assert that we received an expected message in reponse. $resultArray = json_decode($result, true); @@ -1313,13 +1317,13 @@ public function queueMessageAction() } if (isset($template)) { - $appCode = $template->getAppCode(); + $applicationId = $template->getApplicationId(); } else { - $appCode = Mage::getModel('Mage_XmlConnect_Model_Template')->load($message->getTemplateId())->getAppCode(); + $applicationId = Mage::getModel('Mage_XmlConnect_Model_Template')->load($message->getTemplateId())->getApplicationId(); } /** @var $app Mage_XmlConnect_Model_Application */ - $app = Mage::getModel('Mage_XmlConnect_Model_Application')->loadByCode($appCode); + $app = Mage::getModel('Mage_XmlConnect_Model_Application')->load($applicationId); if(!$app->isNotificationsActive()) { $this->_getSession()->addError( diff --git a/app/code/core/Mage/XmlConnect/controllers/CartController.php b/app/code/core/Mage/XmlConnect/controllers/CartController.php index 8231e99f98bba..ea9ac81dc5500 100644 --- a/app/code/core/Mage/XmlConnect/controllers/CartController.php +++ b/app/code/core/Mage/XmlConnect/controllers/CartController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/controllers/CatalogController.php b/app/code/core/Mage/XmlConnect/controllers/CatalogController.php index ce777ba163840..99cac50163ffd 100644 --- a/app/code/core/Mage/XmlConnect/controllers/CatalogController.php +++ b/app/code/core/Mage/XmlConnect/controllers/CatalogController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -295,14 +295,7 @@ public function sendEmailAction() $model->setWebsiteId(Mage::app()->getStore()->getWebsiteId()); Mage::register('send_to_friend_model', $model); -/* - if ($model->getMaxSendsToFriend()) { - $this->_message($this->__('Messages cannot be sent more than %d times in an hour.', - $model->getMaxSendsToFriend()), - self::MESSAGE_STATUS_WARNING); - return $this; - } -*/ + $data = $this->getRequest()->getPost(); if (!$data) { diff --git a/app/code/core/Mage/XmlConnect/controllers/CheckoutController.php b/app/code/core/Mage/XmlConnect/controllers/CheckoutController.php index 3a36dee02340d..8547d9ba40d04 100644 --- a/app/code/core/Mage/XmlConnect/controllers/CheckoutController.php +++ b/app/code/core/Mage/XmlConnect/controllers/CheckoutController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -333,8 +333,7 @@ public function saveShippingMethodAction() if (!$result) { Mage::dispatchEvent('checkout_controller_onepage_save_shipping_method', array( - 'request' => $this->getRequest(), - 'quote' => $this->getOnepage()->getQuote() + 'request' => $this->getRequest(), 'quote' => $this->getOnepage()->getQuote() )); $this->getOnepage()->getQuote()->collectTotals()->save(); @@ -344,8 +343,7 @@ public function saveShippingMethodAction() $result['message'] = array($result['message']); } Mage::dispatchEvent('checkout_controller_onepage_save_shipping_method', array( - 'request' => $this->getRequest(), - 'quote' => $this->getOnepage()->getQuote() + 'request' => $this->getRequest(), 'quote' => $this->getOnepage()->getQuote() )); $this->getOnepage()->getQuote()->collectTotals()->save(); $this->_message(implode('. ', $result['message']), self::MESSAGE_STATUS_ERROR); diff --git a/app/code/core/Mage/XmlConnect/controllers/CmsController.php b/app/code/core/Mage/XmlConnect/controllers/CmsController.php index 0ea582df1ed07..e9618778b3b87 100644 --- a/app/code/core/Mage/XmlConnect/controllers/CmsController.php +++ b/app/code/core/Mage/XmlConnect/controllers/CmsController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/controllers/ConfigurationController.php b/app/code/core/Mage/XmlConnect/controllers/ConfigurationController.php index a8af5651f8c1f..2495bdd5304fa 100644 --- a/app/code/core/Mage/XmlConnect/controllers/ConfigurationController.php +++ b/app/code/core/Mage/XmlConnect/controllers/ConfigurationController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/controllers/CustomerController.php b/app/code/core/Mage/XmlConnect/controllers/CustomerController.php index 9b7f939e5e163..6ae3b82aaf114 100644 --- a/app/code/core/Mage/XmlConnect/controllers/CustomerController.php +++ b/app/code/core/Mage/XmlConnect/controllers/CustomerController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -367,7 +367,6 @@ public function forgotPasswordAction() public function addressAction() { if (!$this->_getSession()->isLoggedIn()) { - Mage::log('address:'.$this->_getSession()->getSessionId()); $this->_message( $this->__('Customer not logged in.'), self::MESSAGE_STATUS_ERROR, array('logged_in' => '0') ); diff --git a/app/code/core/Mage/XmlConnect/controllers/IndexController.php b/app/code/core/Mage/XmlConnect/controllers/IndexController.php index f4c8c2281b601..b5c90257cb589 100644 --- a/app/code/core/Mage/XmlConnect/controllers/IndexController.php +++ b/app/code/core/Mage/XmlConnect/controllers/IndexController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/controllers/Paypal/MeclController.php b/app/code/core/Mage/XmlConnect/controllers/Paypal/MeclController.php index edf2469cddcc5..e10fdeac172a3 100644 --- a/app/code/core/Mage/XmlConnect/controllers/Paypal/MeclController.php +++ b/app/code/core/Mage/XmlConnect/controllers/Paypal/MeclController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/controllers/Paypal/MepController.php b/app/code/core/Mage/XmlConnect/controllers/Paypal/MepController.php index f985c33567dbd..0444e45eb5215 100644 --- a/app/code/core/Mage/XmlConnect/controllers/Paypal/MepController.php +++ b/app/code/core/Mage/XmlConnect/controllers/Paypal/MepController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/controllers/PbridgeController.php b/app/code/core/Mage/XmlConnect/controllers/PbridgeController.php index 1b98b041f461f..b8eb39d6af94a 100755 --- a/app/code/core/Mage/XmlConnect/controllers/PbridgeController.php +++ b/app/code/core/Mage/XmlConnect/controllers/PbridgeController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -60,9 +60,7 @@ protected function _initActionLayout() protected function _checkPbridge() { if (!is_object(Mage::getConfig()->getNode('modules/Enterprise_Pbridge'))) { - $this->getResponse()->setBody( - $this->__('Payment Bridge module unavailable.') - ); + $this->getResponse()->setBody($this->__('Payment Bridge module unavailable.')); return false; } return true; diff --git a/app/code/core/Mage/XmlConnect/controllers/ReviewController.php b/app/code/core/Mage/XmlConnect/controllers/ReviewController.php index 1f15cfc062d24..cef3132ed12da 100644 --- a/app/code/core/Mage/XmlConnect/controllers/ReviewController.php +++ b/app/code/core/Mage/XmlConnect/controllers/ReviewController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/controllers/WishlistController.php b/app/code/core/Mage/XmlConnect/controllers/WishlistController.php index 5c51f3c6f6021..91d04a3f9a896 100644 --- a/app/code/core/Mage/XmlConnect/controllers/WishlistController.php +++ b/app/code/core/Mage/XmlConnect/controllers/WishlistController.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/etc/adminhtml.xml b/app/code/core/Mage/XmlConnect/etc/adminhtml.xml index 8eb579cc59ad9..2ae741a420537 100644 --- a/app/code/core/Mage/XmlConnect/etc/adminhtml.xml +++ b/app/code/core/Mage/XmlConnect/etc/adminhtml.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/XmlConnect/etc/config.xml b/app/code/core/Mage/XmlConnect/etc/config.xml index 87a1460f14087..7d2712e00990c 100644 --- a/app/code/core/Mage/XmlConnect/etc/config.xml +++ b/app/code/core/Mage/XmlConnect/etc/config.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> @@ -29,7 +29,7 @@ 1.6.0.0 - 22.0 + 22.1 @@ -359,6 +359,7 @@ + 1 www.magentocommerce.com/products/index.php/mobile/activate/index/key/ http://www.magentocommerce.com/product/mobile http://www.magentocommerce.com/product/mobile#resubmission diff --git a/app/code/core/Mage/XmlConnect/etc/system.xml b/app/code/core/Mage/XmlConnect/etc/system.xml index cc5cae9e3d31e..5958369b9489f 100644 --- a/app/code/core/Mage/XmlConnect/etc/system.xml +++ b/app/code/core/Mage/XmlConnect/etc/system.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/XmlConnect/etc/themes/custom.xml b/app/code/core/Mage/XmlConnect/etc/themes/custom.xml index d8c449bd7d7d4..74c9f48c814fa 100644 --- a/app/code/core/Mage/XmlConnect/etc/themes/custom.xml +++ b/app/code/core/Mage/XmlConnect/etc/themes/custom.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/XmlConnect/etc/themes/default.xml b/app/code/core/Mage/XmlConnect/etc/themes/default.xml index 91bc7204182d4..bd6f134a3726c 100644 --- a/app/code/core/Mage/XmlConnect/etc/themes/default.xml +++ b/app/code/core/Mage/XmlConnect/etc/themes/default.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/XmlConnect/etc/themes/funk_leaf.xml b/app/code/core/Mage/XmlConnect/etc/themes/funk_leaf.xml index d7f42d4f6c1dc..fdfe64bc47cf2 100644 --- a/app/code/core/Mage/XmlConnect/etc/themes/funk_leaf.xml +++ b/app/code/core/Mage/XmlConnect/etc/themes/funk_leaf.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/XmlConnect/etc/themes/hot_red.xml b/app/code/core/Mage/XmlConnect/etc/themes/hot_red.xml index 29c9a52ad2744..afc7e3dc0d9b1 100644 --- a/app/code/core/Mage/XmlConnect/etc/themes/hot_red.xml +++ b/app/code/core/Mage/XmlConnect/etc/themes/hot_red.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/XmlConnect/etc/themes/sky_blue.xml b/app/code/core/Mage/XmlConnect/etc/themes/sky_blue.xml index 71e571ad92621..186d6f79a14d0 100644 --- a/app/code/core/Mage/XmlConnect/etc/themes/sky_blue.xml +++ b/app/code/core/Mage/XmlConnect/etc/themes/sky_blue.xml @@ -21,7 +21,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/XmlConnect/sql/xmlconnect_setup/install-1.6.0.0.php b/app/code/core/Mage/XmlConnect/sql/xmlconnect_setup/install-1.6.0.0.php index f9f41045f60dc..20b0f3b0ac0fd 100755 --- a/app/code/core/Mage/XmlConnect/sql/xmlconnect_setup/install-1.6.0.0.php +++ b/app/code/core/Mage/XmlConnect/sql/xmlconnect_setup/install-1.6.0.0.php @@ -20,7 +20,7 @@ * * @category Mage * @package Mage_XmlConnect - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/css/boxes.css b/app/code/core/Mage/XmlConnect/view/adminhtml/css/boxes.css index 009b40ae03092..9b2da1ef36f99 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/css/boxes.css +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/css/boxes.css @@ -17,7 +17,7 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/css/dropdown.css b/app/code/core/Mage/XmlConnect/view/adminhtml/css/dropdown.css index f5d294c84f1ad..7332ae2807ecc 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/css/dropdown.css +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/css/dropdown.css @@ -19,7 +19,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ .dropdown { float:left; width:200px; border:1px solid #ccc; position:relative; } diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/css/mobile-android.css b/app/code/core/Mage/XmlConnect/view/adminhtml/css/mobile-android.css index f7ad7b3e07997..ae84a060b174f 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/css/mobile-android.css +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/css/mobile-android.css @@ -17,7 +17,7 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/css/mobile-catalog.css b/app/code/core/Mage/XmlConnect/view/adminhtml/css/mobile-catalog.css index 93b7420196810..d9392c8c419bf 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/css/mobile-catalog.css +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/css/mobile-catalog.css @@ -17,7 +17,7 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/css/mobile-home.css b/app/code/core/Mage/XmlConnect/view/adminhtml/css/mobile-home.css index fc2fcf355ceec..b3a9170a11e85 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/css/mobile-home.css +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/css/mobile-home.css @@ -17,7 +17,7 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/css/mobile-ipad-catalog.css b/app/code/core/Mage/XmlConnect/view/adminhtml/css/mobile-ipad-catalog.css index b9c609647866c..1548ec01ceb9d 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/css/mobile-ipad-catalog.css +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/css/mobile-ipad-catalog.css @@ -17,7 +17,7 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/css/mobile-ipad-home.css b/app/code/core/Mage/XmlConnect/view/adminhtml/css/mobile-ipad-home.css index 2c5dbad9fdc0e..edcea0430c589 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/css/mobile-ipad-home.css +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/css/mobile-ipad-home.css @@ -17,7 +17,7 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/css/styles.css b/app/code/core/Mage/XmlConnect/view/adminhtml/css/styles.css index eed238eae9ccb..e000675372594 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/css/styles.css +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/css/styles.css @@ -19,7 +19,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ .wrapper { min-width:1150px !important; } diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design.phtml index 4b51138652a4e..f8de94e6cef8c 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/catalog_android.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/catalog_android.phtml index de09851d3efd6..96dfd17ae1949 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/catalog_android.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/catalog_android.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/catalog_hor_ipad.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/catalog_hor_ipad.phtml index e62d30825b063..ac57e9f5fe3fc 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/catalog_hor_ipad.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/catalog_hor_ipad.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/catalog_ipad.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/catalog_ipad.phtml index edfa4d520b00a..5839adb68433e 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/catalog_ipad.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/catalog_ipad.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/catalog_iphone.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/catalog_iphone.phtml index f64ad2f02ac10..9509d952dbb1a 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/catalog_iphone.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/catalog_iphone.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/home_android.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/home_android.phtml index a7cced5ed6118..fbf816c234b39 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/home_android.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/home_android.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/home_hor_ipad.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/home_hor_ipad.phtml index 8c68c6ad8873a..2d405e697939f 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/home_hor_ipad.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/home_hor_ipad.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/home_ipad.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/home_ipad.phtml index 83ef2fb6fa11a..15c0e6a244671 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/home_ipad.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/home_ipad.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/home_iphone.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/home_iphone.phtml index e70dd83d5e988..ccd918156da19 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/home_iphone.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/home_iphone.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/productinfo_iphone.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/productinfo_iphone.phtml index 2dc6bbc94fcdb..6ebf1ac8897b0 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/productinfo_iphone.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/productinfo_iphone.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/tab_items_android.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/tab_items_android.phtml index 752bfc6c50e16..6630dc34c6299 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/tab_items_android.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/tab_items_android.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/tab_items_ipad.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/tab_items_ipad.phtml index 4007dc2ae5abd..6bc2cebee2cef 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/tab_items_ipad.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/tab_items_ipad.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/tab_items_iphone.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/tab_items_iphone.phtml index 6b74b21aa94e5..f9ad024843ee4 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/tab_items_iphone.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview/tab_items_iphone.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview_android.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview_android.phtml index 1fdd5c9a967d9..086d86d9f3eb4 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview_android.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview_android.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -30,7 +30,7 @@
    - +


    To preview the newly uploaded images, please save your application first.

    diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview_ipad.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview_ipad.phtml index 29415067ec2f3..99303986d77e7 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview_ipad.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview_ipad.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -39,8 +39,8 @@
    - - + +


    To preview the newly uploaded images, please save your application first.

    diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview_iphone.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview_iphone.phtml index aa8c1976db6b2..c5a7281591d54 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview_iphone.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/edit/tab/design/preview_iphone.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -30,7 +30,7 @@
    - +


    To preview the newly uploaded images, please save your application first.

    diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/addrow.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/addrow.phtml index 5235ede188156..b25da331c741a 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/addrow.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/addrow.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -58,8 +58,8 @@ function getTdValueInnerHtml() { * @return string */ function getTdButtonInnerHtml(id) { - return ''; + return ''; } /** diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/app_tabs_android.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/app_tabs_android.phtml index ed2bda19d4a79..ef5be042bafd3 100755 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/app_tabs_android.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/app_tabs_android.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/app_tabs_ipad.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/app_tabs_ipad.phtml index 08c83c6f986c9..37ed6123cf569 100755 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/app_tabs_ipad.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/app_tabs_ipad.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/app_tabs_iphone.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/app_tabs_iphone.phtml index bef6d431e2c2b..1a66487dbf568 100755 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/app_tabs_iphone.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/app_tabs_iphone.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/country/androidmarket.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/country/androidmarket.phtml index 5e5544a90ad28..08ace20ee4260 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/country/androidmarket.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/country/androidmarket.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/country/istore.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/country/istore.phtml index c500135794486..a6d3360d0768c 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/country/istore.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/country/istore.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/themes.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/themes.phtml index d8c872bbad32d..f51ab6e632a02 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/themes.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/form/element/themes.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -500,10 +500,10 @@ function deleteTheme() {
    @@ -516,10 +516,10 @@ function deleteTheme() {
    @@ -601,11 +601,11 @@ $id2observe = array();
    diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/images/mobile_preview/mobile-catalog.css b/app/code/core/Mage/XmlConnect/view/adminhtml/images/mobile_preview/mobile-catalog.css index f3a499853ae75..e1ab1fc4b9952 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/images/mobile_preview/mobile-catalog.css +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/images/mobile_preview/mobile-catalog.css @@ -19,7 +19,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ body { margin: 0; padding: 0 } diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/images/mobile_preview/mobile-home.css b/app/code/core/Mage/XmlConnect/view/adminhtml/images/mobile_preview/mobile-home.css index 00c25521e35a5..60c8ea9698a2c 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/images/mobile_preview/mobile-home.css +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/images/mobile_preview/mobile-home.css @@ -19,7 +19,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ body { margin: 0; padding: 0 } diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/layout.xml b/app/code/core/Mage/XmlConnect/view/adminhtml/layout.xml index e744dd6fd0d7e..a40ee8c3ec569 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/layout.xml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/mobile/notification_helper.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/mobile/notification_helper.phtml index ff65bbe1515d9..10852de298a5d 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/mobile/notification_helper.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/mobile/notification_helper.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/submission/app_icons_preview.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/submission/app_icons_preview.phtml index 4b87ce3c33d0a..a4b3cca97707a 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/submission/app_icons_preview.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/submission/app_icons_preview.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/submission/container.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/submission/container.phtml index 86980133bb10b..dc8a3dcb146b1 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/submission/container.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/submission/container.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/XmlConnect/view/adminhtml/template/preview.phtml b/app/code/core/Mage/XmlConnect/view/adminhtml/template/preview.phtml index 66930b8fe9717..3564334a1028a 100644 --- a/app/code/core/Mage/XmlConnect/view/adminhtml/template/preview.phtml +++ b/app/code/core/Mage/XmlConnect/view/adminhtml/template/preview.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Mage/XmlConnect/view/frontend/layout.xml b/app/code/core/Mage/XmlConnect/view/frontend/layout.xml index 9ee5bfdfe2f60..9b7b01284409e 100644 --- a/app/code/core/Mage/XmlConnect/view/frontend/layout.xml +++ b/app/code/core/Mage/XmlConnect/view/frontend/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/code/core/Mage/XmlConnect/view/frontend/pbridge/result.phtml b/app/code/core/Mage/XmlConnect/view/frontend/pbridge/result.phtml index ccb79a8532762..7d1c317a49a58 100755 --- a/app/code/core/Mage/XmlConnect/view/frontend/pbridge/result.phtml +++ b/app/code/core/Mage/XmlConnect/view/frontend/pbridge/result.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/code/core/Zend/Date.php b/app/code/core/Zend/Date.php new file mode 100644 index 0000000000000..1992f51bdb0ef --- /dev/null +++ b/app/code/core/Zend/Date.php @@ -0,0 +1,5008 @@ + 'iso', // format for date strings 'iso' or 'php' + 'fix_dst' => true, // fix dst on summer/winter time change + 'extend_month' => false, // false - addMonth like SQL, true like excel + 'cache' => null, // cache to set + 'timesync' => null // timesync server to set + ); + + // Class wide Date Constants + const DAY = 'dd'; + const DAY_SHORT = 'd'; + const DAY_SUFFIX = 'SS'; + const DAY_OF_YEAR = 'D'; + const WEEKDAY = 'EEEE'; + const WEEKDAY_SHORT = 'EEE'; + const WEEKDAY_NARROW = 'E'; + const WEEKDAY_NAME = 'EE'; + const WEEKDAY_8601 = 'eee'; + const WEEKDAY_DIGIT = 'e'; + const WEEK = 'ww'; + const MONTH = 'MM'; + const MONTH_SHORT = 'M'; + const MONTH_DAYS = 'ddd'; + const MONTH_NAME = 'MMMM'; + const MONTH_NAME_SHORT = 'MMM'; + const MONTH_NAME_NARROW = 'MMMMM'; + const YEAR = 'y'; + const YEAR_SHORT = 'yy'; + const YEAR_8601 = 'Y'; + const YEAR_SHORT_8601 = 'YY'; + const LEAPYEAR = 'l'; + const MERIDIEM = 'a'; + const SWATCH = 'B'; + const HOUR = 'HH'; + const HOUR_SHORT = 'H'; + const HOUR_AM = 'hh'; + const HOUR_SHORT_AM = 'h'; + const MINUTE = 'mm'; + const MINUTE_SHORT = 'm'; + const SECOND = 'ss'; + const SECOND_SHORT = 's'; + const MILLISECOND = 'S'; + const TIMEZONE_NAME = 'zzzz'; + const DAYLIGHT = 'I'; + const GMT_DIFF = 'Z'; + const GMT_DIFF_SEP = 'ZZZZ'; + const TIMEZONE = 'z'; + const TIMEZONE_SECS = 'X'; + const ISO_8601 = 'c'; + const RFC_2822 = 'r'; + const TIMESTAMP = 'U'; + const ERA = 'G'; + const ERA_NAME = 'GGGG'; + const ERA_NARROW = 'GGGGG'; + const DATES = 'F'; + const DATE_FULL = 'FFFFF'; + const DATE_LONG = 'FFFF'; + const DATE_MEDIUM = 'FFF'; + const DATE_SHORT = 'FF'; + const TIMES = 'WW'; + const TIME_FULL = 'TTTTT'; + const TIME_LONG = 'TTTT'; + const TIME_MEDIUM = 'TTT'; + const TIME_SHORT = 'TT'; + const DATETIME = 'K'; + const DATETIME_FULL = 'KKKKK'; + const DATETIME_LONG = 'KKKK'; + const DATETIME_MEDIUM = 'KKK'; + const DATETIME_SHORT = 'KK'; + const ATOM = 'OOO'; + const COOKIE = 'CCC'; + const RFC_822 = 'R'; + const RFC_850 = 'RR'; + const RFC_1036 = 'RRR'; + const RFC_1123 = 'RRRR'; + const RFC_3339 = 'RRRRR'; + const RSS = 'SSS'; + const W3C = 'WWW'; + + /** + * Minimum allowed year value + */ + const YEAR_MIN_VALUE = -10000; + + /** + * Maximum allowed year value + */ + const YEAR_MAX_VALUE = 10000; + + /** + * Generates the standard date object, could be a unix timestamp, localized date, + * string, integer, array and so on. Also parts of dates or time are supported + * Always set the default timezone: http://php.net/date_default_timezone_set + * For example, in your bootstrap: date_default_timezone_set('America/Los_Angeles'); + * For detailed instructions please look in the docu. + * + * @param string|integer|Zend_Date|array $date OPTIONAL Date value or value of date part to set + * ,depending on $part. If null the actual time is set + * @param string $part OPTIONAL Defines the input format of $date + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date + * @throws Zend_Date_Exception + */ + public function __construct($date = null, $part = null, $locale = null) + { + if (is_object($date) and !($date instanceof Zend_TimeSync_Protocol) and + !($date instanceof Zend_Date)) { + if ($locale instanceof Zend_Locale) { + $locale = $date; + $date = null; + $part = null; + } else { + $date = (string) $date; + } + } + + if (($date !== null) and !is_array($date) and !($date instanceof Zend_TimeSync_Protocol) and + !($date instanceof Zend_Date) and !defined($date) and Zend_Locale::isLocale($date, true, false)) { + $locale = $date; + $date = null; + $part = null; + } else if (($part !== null) and !defined($part) and Zend_Locale::isLocale($part, true, false)) { + $locale = $part; + $part = null; + } + + $this->setLocale($locale); + if (is_string($date) && ($part === null) && (strlen($date) <= 5)) { + $part = $date; + $date = null; + } + + if ($date === null) { + if ($part === null) { + $date = time(); + } else if ($part !== self::TIMESTAMP) { + $date = self::now($locale); + $date = $date->get($part); + } + } + + if ($date instanceof Zend_TimeSync_Protocol) { + $date = $date->getInfo(); + $date = $this->_getTime($date['offset']); + $part = null; + } else if (parent::$_defaultOffset != 0) { + $date = $this->_getTime(parent::$_defaultOffset); + } + + // set the timezone and offset for $this + $zone = @date_default_timezone_get(); + $this->setTimezone($zone); + + // try to get timezone from date-string + if (!is_int($date)) { + $zone = $this->getTimezoneFromString($date); + $this->setTimezone($zone); + } + + // set datepart + if (($part !== null && $part !== self::TIMESTAMP) or (!is_numeric($date))) { + // switch off dst handling for value setting + $this->setUnixTimestamp($this->getGmtOffset()); + $this->set($date, $part, $this->_locale); + + // DST fix + if (is_array($date) === true) { + if (!isset($date['hour'])) { + $date['hour'] = 0; + } + + $hour = $this->toString('H', 'iso', true); + $hour = $date['hour'] - $hour; + switch ($hour) { + case 1 : + case -23 : + $this->addTimestamp(3600); + break; + case -1 : + case 23 : + $this->subTimestamp(3600); + break; + case 2 : + case -22 : + $this->addTimestamp(7200); + break; + case -2 : + case 22 : + $this->subTimestamp(7200); + break; + } + } + } else { + $this->setUnixTimestamp($date); + } + } + + /** + * Sets class wide options, if no option was given, the actual set options will be returned + * + * @param array $options Options to set + * @throws Zend_Date_Exception + * @return Options array if no option was given + */ + public static function setOptions(array $options = array()) + { + if (empty($options)) { + return self::$_options; + } + + foreach ($options as $name => $value) { + $name = strtolower($name); + + if (array_key_exists($name, self::$_options)) { + switch($name) { + case 'format_type' : + if ((strtolower($value) != 'php') && (strtolower($value) != 'iso')) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("Unknown format type ($value) for dates, only 'iso' and 'php' supported", 0, null, $value); + } + break; + case 'fix_dst' : + if (!is_bool($value)) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("'fix_dst' has to be boolean", 0, null, $value); + } + break; + case 'extend_month' : + if (!is_bool($value)) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("'extend_month' has to be boolean", 0, null, $value); + } + break; + case 'cache' : + if ($value === null) { + parent::$_cache = null; + } else { + if (!$value instanceof Zend_Cache_Core) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("Instance of Zend_Cache expected"); + } + + parent::$_cache = $value; + parent::$_cacheTags = Zend_Date_DateObject::_getTagSupportForCache(); + Zend_Locale_Data::setCache($value); + } + break; + case 'timesync' : + if ($value === null) { + parent::$_defaultOffset = 0; + } else { + if (!$value instanceof Zend_TimeSync_Protocol) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("Instance of Zend_TimeSync expected"); + } + + $date = $value->getInfo(); + parent::$_defaultOffset = $date['offset']; + } + break; + } + self::$_options[$name] = $value; + } + else { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("Unknown option: $name = $value"); + } + } + } + + /** + * Returns this object's internal UNIX timestamp (equivalent to Zend_Date::TIMESTAMP). + * If the timestamp is too large for integers, then the return value will be a string. + * This function does not return the timestamp as an object. + * Use clone() or copyPart() instead. + * + * @return integer|string UNIX timestamp + */ + public function getTimestamp() + { + return $this->getUnixTimestamp(); + } + + /** + * Returns the calculated timestamp + * HINT: timestamps are always GMT + * + * @param string $calc Type of calculation to make + * @param string|integer|array|Zend_Date $stamp Timestamp to calculate, when null the actual timestamp is calculated + * @return Zend_Date|integer + * @throws Zend_Date_Exception + */ + private function _timestamp($calc, $stamp) + { + if ($stamp instanceof Zend_Date) { + // extract timestamp from object + $stamp = $stamp->getTimestamp(); + } + + if (is_array($stamp)) { + if (isset($stamp['timestamp']) === true) { + $stamp = $stamp['timestamp']; + } else { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception('no timestamp given in array'); + } + } + + if ($calc === 'set') { + $return = $this->setUnixTimestamp($stamp); + } else { + $return = $this->_calcdetail($calc, $stamp, self::TIMESTAMP, null); + } + if ($calc != 'cmp') { + return $this; + } + return $return; + } + + /** + * Sets a new timestamp + * + * @param integer|string|array|Zend_Date $timestamp Timestamp to set + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function setTimestamp($timestamp) + { + return $this->_timestamp('set', $timestamp); + } + + /** + * Adds a timestamp + * + * @param integer|string|array|Zend_Date $timestamp Timestamp to add + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function addTimestamp($timestamp) + { + return $this->_timestamp('add', $timestamp); + } + + /** + * Subtracts a timestamp + * + * @param integer|string|array|Zend_Date $timestamp Timestamp to sub + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function subTimestamp($timestamp) + { + return $this->_timestamp('sub', $timestamp); + } + + /** + * Compares two timestamps, returning the difference as integer + * + * @param integer|string|array|Zend_Date $timestamp Timestamp to compare + * @return integer 0 = equal, 1 = later, -1 = earlier + * @throws Zend_Date_Exception + */ + public function compareTimestamp($timestamp) + { + return $this->_timestamp('cmp', $timestamp); + } + + /** + * Returns a string representation of the object + * Supported format tokens are: + * G - era, y - year, Y - ISO year, M - month, w - week of year, D - day of year, d - day of month + * E - day of week, e - number of weekday (1-7), h - hour 1-12, H - hour 0-23, m - minute, s - second + * A - milliseconds of day, z - timezone, Z - timezone offset, S - fractional second, a - period of day + * + * Additionally format tokens but non ISO conform are: + * SS - day suffix, eee - php number of weekday(0-6), ddd - number of days per month + * l - Leap year, B - swatch internet time, I - daylight saving time, X - timezone offset in seconds + * r - RFC2822 format, U - unix timestamp + * + * Not supported ISO tokens are + * u - extended year, Q - quarter, q - quarter, L - stand alone month, W - week of month + * F - day of week of month, g - modified julian, c - stand alone weekday, k - hour 0-11, K - hour 1-24 + * v - wall zone + * + * @param string $format OPTIONAL Rule for formatting output. If null the default date format is used + * @param string $type OPTIONAL Type for the format string which overrides the standard setting + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return string + */ + public function toString($format = null, $type = null, $locale = null) + { + if (is_object($format)) { + if ($format instanceof Zend_Locale) { + $locale = $format; + $format = null; + } else { + $format = (string) $format; + } + } + + if (is_object($type)) { + if ($type instanceof Zend_Locale) { + $locale = $type; + $type = null; + } else { + $type = (string) $type; + } + } + + if (($format !== null) && !defined($format) + && ($format != 'ee') && ($format != 'ss') && ($format != 'GG') && ($format != 'MM') && ($format != 'EE') && ($format != 'TT') + && Zend_Locale::isLocale($format, null, false)) { + $locale = $format; + $format = null; + } + + if (($type !== null) and ($type != 'php') and ($type != 'iso') and + Zend_Locale::isLocale($type, null, false)) { + $locale = $type; + $type = null; + } + + if ($locale === null) { + $locale = $this->getLocale(); + } + + if ($format === null) { + $format = Zend_Locale_Format::getDateFormat($locale) . ' ' . Zend_Locale_Format::getTimeFormat($locale); + } else if (((self::$_options['format_type'] == 'php') && ($type === null)) or ($type == 'php')) { + $format = Zend_Locale_Format::convertPhpToIsoFormat($format); + } + + return $this->date($this->_toToken($format, $locale), $this->getUnixTimestamp(), false); + } + + /** + * Returns a string representation of the date which is equal with the timestamp + * + * @return string + */ + public function __toString() + { + return $this->toString(null, $this->_locale); + } + + /** + * Returns a integer representation of the object + * But returns false when the given part is no value f.e. Month-Name + * + * @param string|integer|Zend_Date $part OPTIONAL Defines the date or datepart to return as integer + * @return integer|false + */ + public function toValue($part = null) + { + $result = $this->get($part); + if (is_numeric($result)) { + return intval("$result"); + } else { + return false; + } + } + + /** + * Returns an array representation of the object + * + * @return array + */ + public function toArray() + { + return array('day' => $this->toString(self::DAY_SHORT, 'iso'), + 'month' => $this->toString(self::MONTH_SHORT, 'iso'), + 'year' => $this->toString(self::YEAR, 'iso'), + 'hour' => $this->toString(self::HOUR_SHORT, 'iso'), + 'minute' => $this->toString(self::MINUTE_SHORT, 'iso'), + 'second' => $this->toString(self::SECOND_SHORT, 'iso'), + 'timezone' => $this->toString(self::TIMEZONE, 'iso'), + 'timestamp' => $this->toString(self::TIMESTAMP, 'iso'), + 'weekday' => $this->toString(self::WEEKDAY_8601, 'iso'), + 'dayofyear' => $this->toString(self::DAY_OF_YEAR, 'iso'), + 'week' => $this->toString(self::WEEK, 'iso'), + 'gmtsecs' => $this->toString(self::TIMEZONE_SECS, 'iso')); + } + + /** + * Returns a representation of a date or datepart + * This could be for example a localized monthname, the time without date, + * the era or only the fractional seconds. There are about 50 different supported date parts. + * For a complete list of supported datepart values look into the docu + * + * @param string $part OPTIONAL Part of the date to return, if null the timestamp is returned + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return string date or datepart + */ + public function get($part = null, $locale = null) + { + if ($locale === null) { + $locale = $this->getLocale(); + } + + if (($part !== null) && !defined($part) + && ($part != 'ee') && ($part != 'ss') && ($part != 'GG') && ($part != 'MM') && ($part != 'EE') && ($part != 'TT') + && Zend_Locale::isLocale($part, null, false)) { + $locale = $part; + $part = null; + } + + if ($part === null) { + $part = self::TIMESTAMP; + } else if (self::$_options['format_type'] == 'php') { + $part = Zend_Locale_Format::convertPhpToIsoFormat($part); + } + + return $this->date($this->_toToken($part, $locale), $this->getUnixTimestamp(), false); + } + + /** + * Internal method to apply tokens + * + * @param string $part + * @param string $locale + * @return string + */ + private function _toToken($part, $locale) { + // get format tokens + $comment = false; + $format = ''; + $orig = ''; + for ($i = 0; isset($part[$i]); ++$i) { + if ($part[$i] == "'") { + $comment = $comment ? false : true; + if (isset($part[$i+1]) && ($part[$i+1] == "'")) { + $comment = $comment ? false : true; + $format .= "\\'"; + ++$i; + } + + $orig = ''; + continue; + } + + if ($comment) { + $format .= '\\' . $part[$i]; + $orig = ''; + } else { + $orig .= $part[$i]; + if (!isset($part[$i+1]) || (isset($orig[0]) && ($orig[0] != $part[$i+1]))) { + $format .= $this->_parseIsoToDate($orig, $locale); + $orig = ''; + } + } + } + + return $format; + } + + /** + * Internal parsing method + * + * @param string $token + * @param string $locale + * @return string + */ + private function _parseIsoToDate($token, $locale) { + switch($token) { + case self::DAY : + return 'd'; + break; + + case self::WEEKDAY_SHORT : + $weekday = strtolower($this->date('D', $this->getUnixTimestamp(), false)); + $day = Zend_Locale_Data::getContent($locale, 'day', array('gregorian', 'format', 'wide', $weekday)); + return $this->_toComment(iconv_substr($day, 0, 3, 'UTF-8')); + break; + + case self::DAY_SHORT : + return 'j'; + break; + + case self::WEEKDAY : + $weekday = strtolower($this->date('D', $this->getUnixTimestamp(), false)); + return $this->_toComment(Zend_Locale_Data::getContent($locale, 'day', array('gregorian', 'format', 'wide', $weekday))); + break; + + case self::WEEKDAY_8601 : + return 'N'; + break; + + case 'ee' : + return $this->_toComment(str_pad($this->date('N', $this->getUnixTimestamp(), false), 2, '0', STR_PAD_LEFT)); + break; + + case self::DAY_SUFFIX : + return 'S'; + break; + + case self::WEEKDAY_DIGIT : + return 'w'; + break; + + case self::DAY_OF_YEAR : + return 'z'; + break; + + case 'DDD' : + return $this->_toComment(str_pad($this->date('z', $this->getUnixTimestamp(), false), 3, '0', STR_PAD_LEFT)); + break; + + case 'DD' : + return $this->_toComment(str_pad($this->date('z', $this->getUnixTimestamp(), false), 2, '0', STR_PAD_LEFT)); + break; + + case self::WEEKDAY_NARROW : + case 'EEEEE' : + $weekday = strtolower($this->date('D', $this->getUnixTimestamp(), false)); + $day = Zend_Locale_Data::getContent($locale, 'day', array('gregorian', 'format', 'abbreviated', $weekday)); + return $this->_toComment(iconv_substr($day, 0, 1, 'UTF-8')); + break; + + case self::WEEKDAY_NAME : + $weekday = strtolower($this->date('D', $this->getUnixTimestamp(), false)); + return $this->_toComment(Zend_Locale_Data::getContent($locale, 'day', array('gregorian', 'format', 'abbreviated', $weekday))); + break; + + case 'w' : + $week = $this->date('W', $this->getUnixTimestamp(), false); + return $this->_toComment(($week[0] == '0') ? $week[1] : $week); + break; + + case self::WEEK : + return 'W'; + break; + + case self::MONTH_NAME : + $month = $this->date('n', $this->getUnixTimestamp(), false); + return $this->_toComment(Zend_Locale_Data::getContent($locale, 'month', array('gregorian', 'format', 'wide', $month))); + break; + + case self::MONTH : + return 'm'; + break; + + case self::MONTH_NAME_SHORT : + $month = $this->date('n', $this->getUnixTimestamp(), false); + return $this->_toComment(Zend_Locale_Data::getContent($locale, 'month', array('gregorian', 'format', 'abbreviated', $month))); + break; + + case self::MONTH_SHORT : + return 'n'; + break; + + case self::MONTH_DAYS : + return 't'; + break; + + case self::MONTH_NAME_NARROW : + $month = $this->date('n', $this->getUnixTimestamp(), false); + $mon = Zend_Locale_Data::getContent($locale, 'month', array('gregorian', 'format', 'abbreviated', $month)); + return $this->_toComment(iconv_substr($mon, 0, 1, 'UTF-8')); + break; + + case self::LEAPYEAR : + return 'L'; + break; + + case self::YEAR_8601 : + return 'o'; + break; + + case self::YEAR : + return 'Y'; + break; + + case self::YEAR_SHORT : + return 'y'; + break; + + case self::YEAR_SHORT_8601 : + return $this->_toComment(substr($this->date('o', $this->getUnixTimestamp(), false), -2, 2)); + break; + + case self::MERIDIEM : + $am = $this->date('a', $this->getUnixTimestamp(), false); + if ($am == 'am') { + return $this->_toComment(Zend_Locale_Data::getContent($locale, 'am')); + } + + return $this->_toComment(Zend_Locale_Data::getContent($locale, 'pm')); + break; + + case self::SWATCH : + return 'B'; + break; + + case self::HOUR_SHORT_AM : + return 'g'; + break; + + case self::HOUR_SHORT : + return 'G'; + break; + + case self::HOUR_AM : + return 'h'; + break; + + case self::HOUR : + return 'H'; + break; + + case self::MINUTE : + return $this->_toComment(str_pad($this->date('i', $this->getUnixTimestamp(), false), 2, '0', STR_PAD_LEFT)); + break; + + case self::SECOND : + return $this->_toComment(str_pad($this->date('s', $this->getUnixTimestamp(), false), 2, '0', STR_PAD_LEFT)); + break; + + case self::MINUTE_SHORT : + return 'i'; + break; + + case self::SECOND_SHORT : + return 's'; + break; + + case self::MILLISECOND : + return $this->_toComment($this->getMilliSecond()); + break; + + case self::TIMEZONE_NAME : + case 'vvvv' : + return 'e'; + break; + + case self::DAYLIGHT : + return 'I'; + break; + + case self::GMT_DIFF : + case 'ZZ' : + case 'ZZZ' : + return 'O'; + break; + + case self::GMT_DIFF_SEP : + return 'P'; + break; + + case self::TIMEZONE : + case 'v' : + case 'zz' : + case 'zzz' : + return 'T'; + break; + + case self::TIMEZONE_SECS : + return 'Z'; + break; + + case self::ISO_8601 : + return 'c'; + break; + + case self::RFC_2822 : + return 'r'; + break; + + case self::TIMESTAMP : + return 'U'; + break; + + case self::ERA : + case 'GG' : + case 'GGG' : + $year = $this->date('Y', $this->getUnixTimestamp(), false); + if ($year < 0) { + return $this->_toComment(Zend_Locale_Data::getContent($locale, 'era', array('gregorian', 'Abbr', '0'))); + } + + return $this->_toComment(Zend_Locale_Data::getContent($locale, 'era', array('gregorian', 'Abbr', '1'))); + break; + + case self::ERA_NARROW : + $year = $this->date('Y', $this->getUnixTimestamp(), false); + if ($year < 0) { + return $this->_toComment(iconv_substr(Zend_Locale_Data::getContent($locale, 'era', array('gregorian', 'Abbr', '0')), 0, 1, 'UTF-8')) . '.'; + } + + return $this->_toComment(iconv_substr(Zend_Locale_Data::getContent($locale, 'era', array('gregorian', 'Abbr', '1')), 0, 1, 'UTF-8')) . '.'; + break; + + case self::ERA_NAME : + $year = $this->date('Y', $this->getUnixTimestamp(), false); + if ($year < 0) { + return $this->_toComment(Zend_Locale_Data::getContent($locale, 'era', array('gregorian', 'Names', '0'))); + } + + return $this->_toComment(Zend_Locale_Data::getContent($locale, 'era', array('gregorian', 'Names', '1'))); + break; + + case self::DATES : + return $this->_toToken(Zend_Locale_Format::getDateFormat($locale), $locale); + break; + + case self::DATE_FULL : + return $this->_toToken(Zend_Locale_Data::getContent($locale, 'date', array('gregorian', 'full')), $locale); + break; + + case self::DATE_LONG : + return $this->_toToken(Zend_Locale_Data::getContent($locale, 'date', array('gregorian', 'long')), $locale); + break; + + case self::DATE_MEDIUM : + return $this->_toToken(Zend_Locale_Data::getContent($locale, 'date', array('gregorian', 'medium')), $locale); + break; + + case self::DATE_SHORT : + return $this->_toToken(Zend_Locale_Data::getContent($locale, 'date', array('gregorian', 'short')), $locale); + break; + + case self::TIMES : + return $this->_toToken(Zend_Locale_Format::getTimeFormat($locale), $locale); + break; + + case self::TIME_FULL : + return $this->_toToken(Zend_Locale_Data::getContent($locale, 'time', 'full'), $locale); + break; + + case self::TIME_LONG : + return $this->_toToken(Zend_Locale_Data::getContent($locale, 'time', 'long'), $locale); + break; + + case self::TIME_MEDIUM : + return $this->_toToken(Zend_Locale_Data::getContent($locale, 'time', 'medium'), $locale); + break; + + case self::TIME_SHORT : + return $this->_toToken(Zend_Locale_Data::getContent($locale, 'time', 'short'), $locale); + break; + + case self::DATETIME : + return $this->_toToken(Zend_Locale_Format::getDateTimeFormat($locale), $locale); + break; + + case self::DATETIME_FULL : + return $this->_toToken(Zend_Locale_Data::getContent($locale, 'datetime', array('gregorian', 'full')), $locale); + break; + + case self::DATETIME_LONG : + return $this->_toToken(Zend_Locale_Data::getContent($locale, 'datetime', array('gregorian', 'long')), $locale); + break; + + case self::DATETIME_MEDIUM : + return $this->_toToken(Zend_Locale_Data::getContent($locale, 'datetime', array('gregorian', 'medium')), $locale); + break; + + case self::DATETIME_SHORT : + return $this->_toToken(Zend_Locale_Data::getContent($locale, 'datetime', array('gregorian', 'short')), $locale); + break; + + case self::ATOM : + return 'Y\-m\-d\TH\:i\:sP'; + break; + + case self::COOKIE : + return 'l\, d\-M\-y H\:i\:s e'; + break; + + case self::RFC_822 : + return 'D\, d M y H\:i\:s O'; + break; + + case self::RFC_850 : + return 'l\, d\-M\-y H\:i\:s e'; + break; + + case self::RFC_1036 : + return 'D\, d M y H\:i\:s O'; + break; + + case self::RFC_1123 : + return 'D\, d M Y H\:i\:s O'; + break; + + case self::RFC_3339 : + return 'Y\-m\-d\TH\:i\:sP'; + break; + + case self::RSS : + return 'D\, d M Y H\:i\:s O'; + break; + + case self::W3C : + return 'Y\-m\-d\TH\:i\:sP'; + break; + } + + if ($token == '') { + return ''; + } + + switch ($token[0]) { + case 'y' : + if ((strlen($token) == 4) && (abs($this->getUnixTimestamp()) <= 0x7FFFFFFF)) { + return 'Y'; + } + + $length = iconv_strlen($token, 'UTF-8'); + return $this->_toComment(str_pad($this->date('Y', $this->getUnixTimestamp(), false), $length, '0', STR_PAD_LEFT)); + break; + + case 'Y' : + if ((strlen($token) == 4) && (abs($this->getUnixTimestamp()) <= 0x7FFFFFFF)) { + return 'o'; + } + + $length = iconv_strlen($token, 'UTF-8'); + return $this->_toComment(str_pad($this->date('o', $this->getUnixTimestamp(), false), $length, '0', STR_PAD_LEFT)); + break; + + case 'A' : + $length = iconv_strlen($token, 'UTF-8'); + $result = substr($this->getMilliSecond(), 0, 3); + $result += $this->date('s', $this->getUnixTimestamp(), false) * 1000; + $result += $this->date('i', $this->getUnixTimestamp(), false) * 60000; + $result += $this->date('H', $this->getUnixTimestamp(), false) * 3600000; + + return $this->_toComment(str_pad($result, $length, '0', STR_PAD_LEFT)); + break; + } + + return $this->_toComment($token); + } + + /** + * Private function to make a comment of a token + * + * @param string $token + * @return string + */ + private function _toComment($token) + { + $token = str_split($token); + $result = ''; + foreach ($token as $tok) { + $result .= '\\' . $tok; + } + + return $result; + } + + /** + * Return digit from standard names (english) + * Faster implementation than locale aware searching + * + * @param string $name + * @return integer Number of this month + * @throws Zend_Date_Exception + */ + private function _getDigitFromName($name) + { + switch($name) { + case "Jan": + return 1; + + case "Feb": + return 2; + + case "Mar": + return 3; + + case "Apr": + return 4; + + case "May": + return 5; + + case "Jun": + return 6; + + case "Jul": + return 7; + + case "Aug": + return 8; + + case "Sep": + return 9; + + case "Oct": + return 10; + + case "Nov": + return 11; + + case "Dec": + return 12; + + default: + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception('Month ($name) is not a known month'); + } + } + + /** + * Counts the exact year number + * < 70 - 2000 added, >70 < 100 - 1900, others just returned + * + * @param integer $value year number + * @return integer Number of year + */ + public static function getFullYear($value) + { + if ($value >= 0) { + if ($value < 70) { + $value += 2000; + } else if ($value < 100) { + $value += 1900; + } + } + return $value; + } + + /** + * Sets the given date as new date or a given datepart as new datepart returning the new datepart + * This could be for example a localized dayname, the date without time, + * the month or only the seconds. There are about 50 different supported date parts. + * For a complete list of supported datepart values look into the docu + * + * @param string|integer|array|Zend_Date $date Date or datepart to set + * @param string $part OPTIONAL Part of the date to set, if null the timestamp is set + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function set($date, $part = null, $locale = null) + { + if (self::$_options['format_type'] == 'php') { + $part = Zend_Locale_Format::convertPhpToIsoFormat($part); + } + + $zone = $this->getTimezoneFromString($date); + $this->setTimezone($zone); + + $this->_calculate('set', $date, $part, $locale); + return $this; + } + + /** + * Adds a date or datepart to the existing date, by extracting $part from $date, + * and modifying this object by adding that part. The $part is then extracted from + * this object and returned as an integer or numeric string (for large values, or $part's + * corresponding to pre-defined formatted date strings). + * This could be for example a ISO 8601 date, the hour the monthname or only the minute. + * There are about 50 different supported date parts. + * For a complete list of supported datepart values look into the docu. + * + * @param string|integer|array|Zend_Date $date Date or datepart to add + * @param string $part OPTIONAL Part of the date to add, if null the timestamp is added + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function add($date, $part = self::TIMESTAMP, $locale = null) + { + if (self::$_options['format_type'] == 'php') { + $part = Zend_Locale_Format::convertPhpToIsoFormat($part); + } + + $this->_calculate('add', $date, $part, $locale); + return $this; + } + + /** + * Subtracts a date from another date. + * This could be for example a RFC2822 date, the time, + * the year or only the timestamp. There are about 50 different supported date parts. + * For a complete list of supported datepart values look into the docu + * Be aware: Adding -2 Months is not equal to Subtracting 2 Months !!! + * + * @param string|integer|array|Zend_Date $date Date or datepart to subtract + * @param string $part OPTIONAL Part of the date to sub, if null the timestamp is subtracted + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function sub($date, $part = self::TIMESTAMP, $locale = null) + { + if (self::$_options['format_type'] == 'php') { + $part = Zend_Locale_Format::convertPhpToIsoFormat($part); + } + + $this->_calculate('sub', $date, $part, $locale); + return $this; + } + + /** + * Compares a date or datepart with the existing one. + * Returns -1 if earlier, 0 if equal and 1 if later. + * + * @param string|integer|array|Zend_Date $date Date or datepart to compare with the date object + * @param string $part OPTIONAL Part of the date to compare, if null the timestamp is subtracted + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return integer 0 = equal, 1 = later, -1 = earlier + * @throws Zend_Date_Exception + */ + public function compare($date, $part = self::TIMESTAMP, $locale = null) + { + if (self::$_options['format_type'] == 'php') { + $part = Zend_Locale_Format::convertPhpToIsoFormat($part); + } + + $compare = $this->_calculate('cmp', $date, $part, $locale); + + if ($compare > 0) { + return 1; + } else if ($compare < 0) { + return -1; + } + return 0; + } + + /** + * Returns a new instance of Zend_Date with the selected part copied. + * To make an exact copy, use PHP's clone keyword. + * For a complete list of supported date part values look into the docu. + * If a date part is copied, all other date parts are set to standard values. + * For example: If only YEAR is copied, the returned date object is equal to + * 01-01-YEAR 00:00:00 (01-01-1970 00:00:00 is equal to timestamp 0) + * If only HOUR is copied, the returned date object is equal to + * 01-01-1970 HOUR:00:00 (so $this contains a timestamp equal to a timestamp of 0 plus HOUR). + * + * @param string $part Part of the date to compare, if null the timestamp is subtracted + * @param string|Zend_Locale $locale OPTIONAL New object's locale. No adjustments to timezone are made. + * @return Zend_Date New clone with requested part + */ + public function copyPart($part, $locale = null) + { + $clone = clone $this; // copy all instance variables + $clone->setUnixTimestamp(0); // except the timestamp + if ($locale != null) { + $clone->setLocale($locale); // set an other locale if selected + } + $clone->set($this, $part); + return $clone; + } + + /** + * Internal function, returns the offset of a given timezone + * + * @param string $zone + * @return integer + */ + public function getTimezoneFromString($zone) + { + if (is_array($zone)) { + return $this->getTimezone(); + } + + if ($zone instanceof Zend_Date) { + return $zone->getTimezone(); + } + + $match = array(); + preg_match('/\dZ$/', $zone, $match); + if (!empty($match)) { + return "Etc/UTC"; + } + + preg_match('/([+-]\d{2}):{0,1}\d{2}/', $zone, $match); + if (!empty($match) and ($match[count($match) - 1] <= 12) and ($match[count($match) - 1] >= -12)) { + $zone = "Etc/GMT"; + $zone .= ($match[count($match) - 1] < 0) ? "+" : "-"; + $zone .= (int) abs($match[count($match) - 1]); + return $zone; + } + + preg_match('/([[:alpha:]\/]{3,30})(?!.*([[:alpha:]\/]{3,30}))/', $zone, $match); + try { + if (!empty($match) and (!is_int($match[count($match) - 1]))) { + $oldzone = $this->getTimezone(); + $this->setTimezone($match[count($match) - 1]); + $result = $this->getTimezone(); + $this->setTimezone($oldzone); + if ($result !== $oldzone) { + return $match[count($match) - 1]; + } + } + } catch (Exception $e) { + // fall through + } + + return $this->getTimezone(); + } + + /** + * Calculates the date or object + * + * @param string $calc Calculation to make + * @param string|integer $date Date for calculation + * @param string|integer $comp Second date for calculation + * @param boolean|integer $dst Use dst correction if option is set + * @return integer|string|Zend_Date new timestamp or Zend_Date depending on calculation + */ + private function _assign($calc, $date, $comp = 0, $dst = false) + { + switch ($calc) { + case 'set' : + if (!empty($comp)) { + $this->setUnixTimestamp(call_user_func(Zend_Locale_Math::$sub, $this->getUnixTimestamp(), $comp)); + } + $this->setUnixTimestamp(call_user_func(Zend_Locale_Math::$add, $this->getUnixTimestamp(), $date)); + $value = $this->getUnixTimestamp(); + break; + case 'add' : + $this->setUnixTimestamp(call_user_func(Zend_Locale_Math::$add, $this->getUnixTimestamp(), $date)); + $value = $this->getUnixTimestamp(); + break; + case 'sub' : + $this->setUnixTimestamp(call_user_func(Zend_Locale_Math::$sub, $this->getUnixTimestamp(), $date)); + $value = $this->getUnixTimestamp(); + break; + default : + // cmp - compare + return call_user_func(Zend_Locale_Math::$comp, $comp, $date); + break; + } + + // dst-correction if 'fix_dst' = true and dst !== false but only for non UTC and non GMT + if ((self::$_options['fix_dst'] === true) and ($dst !== false) and ($this->_dst === true)) { + $hour = $this->toString(self::HOUR, 'iso'); + if ($hour != $dst) { + if (($dst == ($hour + 1)) or ($dst == ($hour - 23))) { + $value += 3600; + } else if (($dst == ($hour - 1)) or ($dst == ($hour + 23))) { + $value -= 3600; + } + $this->setUnixTimestamp($value); + } + } + return $this->getUnixTimestamp(); + } + + + /** + * Calculates the date or object + * + * @param string $calc Calculation to make, one of: 'add'|'sub'|'cmp'|'copy'|'set' + * @param string|integer|array|Zend_Date $date Date or datepart to calculate with + * @param string $part Part of the date to calculate, if null the timestamp is used + * @param string|Zend_Locale $locale Locale for parsing input + * @return integer|string|Zend_Date new timestamp + * @throws Zend_Date_Exception + */ + private function _calculate($calc, $date, $part, $locale) + { + if ($date === null) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception('parameter $date must be set, null is not allowed'); + } + + if (($part !== null) && (strlen($part) !== 2) && (Zend_Locale::isLocale($part, null, false))) { + $locale = $part; + $part = null; + } + + if ($locale === null) { + $locale = $this->getLocale(); + } + + $locale = (string) $locale; + + // Create date parts + $year = $this->toString(self::YEAR, 'iso'); + $month = $this->toString(self::MONTH_SHORT, 'iso'); + $day = $this->toString(self::DAY_SHORT, 'iso'); + $hour = $this->toString(self::HOUR_SHORT, 'iso'); + $minute = $this->toString(self::MINUTE_SHORT, 'iso'); + $second = $this->toString(self::SECOND_SHORT, 'iso'); + // If object extract value + if ($date instanceof Zend_Date) { + $date = $date->toString($part, 'iso', $locale); + } + + if (is_array($date) === true) { + if (empty($part) === false) { + switch($part) { + // Fall through + case self::DAY: + case self::DAY_SHORT: + if (isset($date['day']) === true) { + $date = $date['day']; + } + break; + // Fall through + case self::WEEKDAY_SHORT: + case self::WEEKDAY: + case self::WEEKDAY_8601: + case self::WEEKDAY_DIGIT: + case self::WEEKDAY_NARROW: + case self::WEEKDAY_NAME: + if (isset($date['weekday']) === true) { + $date = $date['weekday']; + $part = self::WEEKDAY_DIGIT; + } + break; + case self::DAY_OF_YEAR: + if (isset($date['day_of_year']) === true) { + $date = $date['day_of_year']; + } + break; + // Fall through + case self::MONTH: + case self::MONTH_SHORT: + case self::MONTH_NAME: + case self::MONTH_NAME_SHORT: + case self::MONTH_NAME_NARROW: + if (isset($date['month']) === true) { + $date = $date['month']; + } + break; + // Fall through + case self::YEAR: + case self::YEAR_SHORT: + case self::YEAR_8601: + case self::YEAR_SHORT_8601: + if (isset($date['year']) === true) { + $date = $date['year']; + } + break; + // Fall through + case self::HOUR: + case self::HOUR_AM: + case self::HOUR_SHORT: + case self::HOUR_SHORT_AM: + if (isset($date['hour']) === true) { + $date = $date['hour']; + } + break; + // Fall through + case self::MINUTE: + case self::MINUTE_SHORT: + if (isset($date['minute']) === true) { + $date = $date['minute']; + } + break; + // Fall through + case self::SECOND: + case self::SECOND_SHORT: + if (isset($date['second']) === true) { + $date = $date['second']; + } + break; + // Fall through + case self::TIMEZONE: + case self::TIMEZONE_NAME: + if (isset($date['timezone']) === true) { + $date = $date['timezone']; + } + break; + case self::TIMESTAMP: + if (isset($date['timestamp']) === true) { + $date = $date['timestamp']; + } + break; + case self::WEEK: + if (isset($date['week']) === true) { + $date = $date['week']; + } + break; + case self::TIMEZONE_SECS: + if (isset($date['gmtsecs']) === true) { + $date = $date['gmtsecs']; + } + break; + default: + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("datepart for part ($part) not found in array"); + break; + } + } else { + $hours = 0; + if (isset($date['hour']) === true) { + $hours = $date['hour']; + } + $minutes = 0; + if (isset($date['minute']) === true) { + $minutes = $date['minute']; + } + $seconds = 0; + if (isset($date['second']) === true) { + $seconds = $date['second']; + } + $months = 0; + if (isset($date['month']) === true) { + $months = $date['month']; + } + $days = 0; + if (isset($date['day']) === true) { + $days = $date['day']; + } + $years = 0; + if (isset($date['year']) === true) { + $years = $date['year']; + } + return $this->_assign($calc, $this->mktime($hours, $minutes, $seconds, $months, $days, $years, true), + $this->mktime($hour, $minute, $second, $month, $day, $year, true), $hour); + } + } + + // $date as object, part of foreign date as own date + switch($part) { + + // day formats + case self::DAY: + if (is_numeric($date)) { + return $this->_assign($calc, $this->mktime(0, 0, 0, 1, 1 + intval($date), 1970, true), + $this->mktime(0, 0, 0, 1, 1 + intval($day), 1970, true), $hour); + } + + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, day expected", 0, null, $date); + break; + + case self::WEEKDAY_SHORT: + $daylist = Zend_Locale_Data::getList($locale, 'day'); + $weekday = (int) $this->toString(self::WEEKDAY_DIGIT, 'iso', $locale); + $cnt = 0; + + foreach ($daylist as $key => $value) { + if (strtoupper(iconv_substr($value, 0, 3, 'UTF-8')) == strtoupper($date)) { + $found = $cnt; + break; + } + ++$cnt; + } + + // Weekday found + if ($cnt < 7) { + return $this->_assign($calc, $this->mktime(0, 0, 0, 1, 1 + $found, 1970, true), + $this->mktime(0, 0, 0, 1, 1 + $weekday, 1970, true), $hour); + } + + // Weekday not found + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, weekday expected", 0, null, $date); + break; + + case self::DAY_SHORT: + if (is_numeric($date)) { + return $this->_assign($calc, $this->mktime(0, 0, 0, 1, 1 + intval($date), 1970, true), + $this->mktime(0, 0, 0, 1, 1 + intval($day), 1970, true), $hour); + } + + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, day expected", 0, null, $date); + break; + + case self::WEEKDAY: + $daylist = Zend_Locale_Data::getList($locale, 'day'); + $weekday = (int) $this->toString(self::WEEKDAY_DIGIT, 'iso', $locale); + $cnt = 0; + + foreach ($daylist as $key => $value) { + if (strtoupper($value) == strtoupper($date)) { + $found = $cnt; + break; + } + ++$cnt; + } + + // Weekday found + if ($cnt < 7) { + return $this->_assign($calc, $this->mktime(0, 0, 0, 1, 1 + $found, 1970, true), + $this->mktime(0, 0, 0, 1, 1 + $weekday, 1970, true), $hour); + } + + // Weekday not found + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, weekday expected", 0, null, $date); + break; + + case self::WEEKDAY_8601: + $weekday = (int) $this->toString(self::WEEKDAY_8601, 'iso', $locale); + if ((intval($date) > 0) and (intval($date) < 8)) { + return $this->_assign($calc, $this->mktime(0, 0, 0, 1, 1 + intval($date), 1970, true), + $this->mktime(0, 0, 0, 1, 1 + $weekday, 1970, true), $hour); + } + + // Weekday not found + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, weekday expected", 0, null, $date); + break; + + case self::DAY_SUFFIX: + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception('day suffix not supported', 0, null, $date); + break; + + case self::WEEKDAY_DIGIT: + $weekday = (int) $this->toString(self::WEEKDAY_DIGIT, 'iso', $locale); + if (is_numeric($date) and (intval($date) >= 0) and (intval($date) < 7)) { + return $this->_assign($calc, $this->mktime(0, 0, 0, 1, 1 + $date, 1970, true), + $this->mktime(0, 0, 0, 1, 1 + $weekday, 1970, true), $hour); + } + + // Weekday not found + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, weekday expected", 0, null, $date); + break; + + case self::DAY_OF_YEAR: + if (is_numeric($date)) { + if (($calc == 'add') || ($calc == 'sub')) { + $year = 1970; + ++$date; + ++$day; + } + + return $this->_assign($calc, $this->mktime(0, 0, 0, 1, $date, $year, true), + $this->mktime(0, 0, 0, $month, $day, $year, true), $hour); + } + + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, day expected", 0, null, $date); + break; + + case self::WEEKDAY_NARROW: + $daylist = Zend_Locale_Data::getList($locale, 'day', array('gregorian', 'format', 'abbreviated')); + $weekday = (int) $this->toString(self::WEEKDAY_DIGIT, 'iso', $locale); + $cnt = 0; + foreach ($daylist as $key => $value) { + if (strtoupper(iconv_substr($value, 0, 1, 'UTF-8')) == strtoupper($date)) { + $found = $cnt; + break; + } + ++$cnt; + } + + // Weekday found + if ($cnt < 7) { + return $this->_assign($calc, $this->mktime(0, 0, 0, 1, 1 + $found, 1970, true), + $this->mktime(0, 0, 0, 1, 1 + $weekday, 1970, true), $hour); + } + + // Weekday not found + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, weekday expected", 0, null, $date); + break; + + case self::WEEKDAY_NAME: + $daylist = Zend_Locale_Data::getList($locale, 'day', array('gregorian', 'format', 'abbreviated')); + $weekday = (int) $this->toString(self::WEEKDAY_DIGIT, 'iso', $locale); + $cnt = 0; + foreach ($daylist as $key => $value) { + if (strtoupper($value) == strtoupper($date)) { + $found = $cnt; + break; + } + ++$cnt; + } + + // Weekday found + if ($cnt < 7) { + return $this->_assign($calc, $this->mktime(0, 0, 0, 1, 1 + $found, 1970, true), + $this->mktime(0, 0, 0, 1, 1 + $weekday, 1970, true), $hour); + } + + // Weekday not found + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, weekday expected", 0, null, $date); + break; + + // week formats + case self::WEEK: + if (is_numeric($date)) { + $week = (int) $this->toString(self::WEEK, 'iso', $locale); + return $this->_assign($calc, parent::mktime(0, 0, 0, 1, 1 + ($date * 7), 1970, true), + parent::mktime(0, 0, 0, 1, 1 + ($week * 7), 1970, true), $hour); + } + + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, week expected", 0, null, $date); + break; + + // month formats + case self::MONTH_NAME: + $monthlist = Zend_Locale_Data::getList($locale, 'month'); + $cnt = 0; + foreach ($monthlist as $key => $value) { + if (strtoupper($value) == strtoupper($date)) { + $found = $key; + break; + } + ++$cnt; + } + $date = array_search($date, $monthlist); + + // Monthname found + if ($cnt < 12) { + $fixday = 0; + if ($calc == 'add') { + $date += $found; + $calc = 'set'; + if (self::$_options['extend_month'] == false) { + $parts = $this->getDateParts($this->mktime($hour, $minute, $second, $date, $day, $year, false)); + if ($parts['mday'] != $day) { + $fixday = ($parts['mday'] < $day) ? -$parts['mday'] : ($parts['mday'] - $day); + } + } + } else if ($calc == 'sub') { + $date = $month - $found; + $calc = 'set'; + if (self::$_options['extend_month'] == false) { + $parts = $this->getDateParts($this->mktime($hour, $minute, $second, $date, $day, $year, false)); + if ($parts['mday'] != $day) { + $fixday = ($parts['mday'] < $day) ? -$parts['mday'] : ($parts['mday'] - $day); + } + } + } + return $this->_assign($calc, $this->mktime(0, 0, 0, $date, $day + $fixday, $year, true), + $this->mktime(0, 0, 0, $month, $day, $year, true), $hour); + } + + // Monthname not found + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, month expected", 0, null, $date); + break; + + case self::MONTH: + if (is_numeric($date)) { + $fixday = 0; + if ($calc == 'add') { + $date += $month; + $calc = 'set'; + if (self::$_options['extend_month'] == false) { + $parts = $this->getDateParts($this->mktime($hour, $minute, $second, $date, $day, $year, false)); + if ($parts['mday'] != $day) { + $fixday = ($parts['mday'] < $day) ? -$parts['mday'] : ($parts['mday'] - $day); + } + } + } else if ($calc == 'sub') { + $date = $month - $date; + $calc = 'set'; + if (self::$_options['extend_month'] == false) { + $parts = $this->getDateParts($this->mktime($hour, $minute, $second, $date, $day, $year, false)); + if ($parts['mday'] != $day) { + $fixday = ($parts['mday'] < $day) ? -$parts['mday'] : ($parts['mday'] - $day); + } + } + } + return $this->_assign($calc, $this->mktime(0, 0, 0, $date, $day + $fixday, $year, true), + $this->mktime(0, 0, 0, $month, $day, $year, true), $hour); + } + + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, month expected", 0, null, $date); + break; + + case self::MONTH_NAME_SHORT: + $monthlist = Zend_Locale_Data::getList($locale, 'month', array('gregorian', 'format', 'abbreviated')); + $cnt = 0; + foreach ($monthlist as $key => $value) { + if (strtoupper($value) == strtoupper($date)) { + $found = $key; + break; + } + ++$cnt; + } + $date = array_search($date, $monthlist); + + // Monthname found + if ($cnt < 12) { + $fixday = 0; + if ($calc == 'add') { + $date += $found; + $calc = 'set'; + if (self::$_options['extend_month'] === false) { + $parts = $this->getDateParts($this->mktime($hour, $minute, $second, $date, $day, $year, false)); + if ($parts['mday'] != $day) { + $fixday = ($parts['mday'] < $day) ? -$parts['mday'] : ($parts['mday'] - $day); + } + } + } else if ($calc == 'sub') { + $date = $month - $found; + $calc = 'set'; + if (self::$_options['extend_month'] === false) { + $parts = $this->getDateParts($this->mktime($hour, $minute, $second, $date, $day, $year, false)); + if ($parts['mday'] != $day) { + $fixday = ($parts['mday'] < $day) ? -$parts['mday'] : ($parts['mday'] - $day); + } + } + } + return $this->_assign($calc, $this->mktime(0, 0, 0, $date, $day + $fixday, $year, true), + $this->mktime(0, 0, 0, $month, $day, $year, true), $hour); + } + + // Monthname not found + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, month expected", 0, null, $date); + break; + + case self::MONTH_SHORT: + if (is_numeric($date) === true) { + $fixday = 0; + if ($calc === 'add') { + $date += $month; + $calc = 'set'; + if (self::$_options['extend_month'] === false) { + $parts = $this->getDateParts($this->mktime($hour, $minute, $second, $date, $day, $year, false)); + if ($parts['mday'] != $day) { + $fixday = ($parts['mday'] < $day) ? -$parts['mday'] : ($parts['mday'] - $day); + } + } + } else if ($calc === 'sub') { + $date = $month - $date; + $calc = 'set'; + if (self::$_options['extend_month'] === false) { + $parts = $this->getDateParts($this->mktime($hour, $minute, $second, $date, $day, $year, false)); + if ($parts['mday'] != $day) { + $fixday = ($parts['mday'] < $day) ? -$parts['mday'] : ($parts['mday'] - $day); + } + } + } + + return $this->_assign($calc, $this->mktime(0, 0, 0, $date, $day + $fixday, $year, true), + $this->mktime(0, 0, 0, $month, $day, $year, true), $hour); + } + + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, month expected", 0, null, $date); + break; + + case self::MONTH_DAYS: + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception('month days not supported', 0, null, $date); + break; + + case self::MONTH_NAME_NARROW: + $monthlist = Zend_Locale_Data::getList($locale, 'month', array('gregorian', 'stand-alone', 'narrow')); + $cnt = 0; + foreach ($monthlist as $key => $value) { + if (strtoupper($value) === strtoupper($date)) { + $found = $key; + break; + } + ++$cnt; + } + $date = array_search($date, $monthlist); + + // Monthname found + if ($cnt < 12) { + $fixday = 0; + if ($calc === 'add') { + $date += $found; + $calc = 'set'; + if (self::$_options['extend_month'] === false) { + $parts = $this->getDateParts($this->mktime($hour, $minute, $second, $date, $day, $year, false)); + if ($parts['mday'] != $day) { + $fixday = ($parts['mday'] < $day) ? -$parts['mday'] : ($parts['mday'] - $day); + } + } + } else if ($calc === 'sub') { + $date = $month - $found; + $calc = 'set'; + if (self::$_options['extend_month'] === false) { + $parts = $this->getDateParts($this->mktime($hour, $minute, $second, $date, $day, $year, false)); + if ($parts['mday'] != $day) { + $fixday = ($parts['mday'] < $day) ? -$parts['mday'] : ($parts['mday'] - $day); + } + } + } + return $this->_assign($calc, $this->mktime(0, 0, 0, $date, $day + $fixday, $year, true), + $this->mktime(0, 0, 0, $month, $day, $year, true), $hour); + } + + // Monthname not found + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, month expected", 0, null, $date); + break; + + // year formats + case self::LEAPYEAR: + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception('leap year not supported', 0, null, $date); + break; + + case self::YEAR_8601: + if (is_numeric($date)) { + if ($calc === 'add') { + $date += $year; + $calc = 'set'; + } else if ($calc === 'sub') { + $date = $year - $date; + $calc = 'set'; + } + + return $this->_assign($calc, $this->mktime(0, 0, 0, $month, $day, intval($date), true), + $this->mktime(0, 0, 0, $month, $day, $year, true), false); + } + + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, year expected", 0, null, $date); + break; + + case self::YEAR: + if (is_numeric($date)) { + if ($calc === 'add') { + $date += $year; + $calc = 'set'; + } else if ($calc === 'sub') { + $date = $year - $date; + $calc = 'set'; + } + + return $this->_assign($calc, $this->mktime(0, 0, 0, $month, $day, intval($date), true), + $this->mktime(0, 0, 0, $month, $day, $year, true), false); + } + + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, year expected", 0, null, $date); + break; + + case self::YEAR_SHORT: + if (is_numeric($date)) { + $date = intval($date); + if (($calc == 'set') || ($calc == 'cmp')) { + $date = self::getFullYear($date); + } + if ($calc === 'add') { + $date += $year; + $calc = 'set'; + } else if ($calc === 'sub') { + $date = $year - $date; + $calc = 'set'; + } + + return $this->_assign($calc, $this->mktime(0, 0, 0, $month, $day, $date, true), + $this->mktime(0, 0, 0, $month, $day, $year, true), false); + } + + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, year expected", 0, null, $date); + break; + + case self::YEAR_SHORT_8601: + if (is_numeric($date)) { + $date = intval($date); + if (($calc === 'set') || ($calc === 'cmp')) { + $date = self::getFullYear($date); + } + if ($calc === 'add') { + $date += $year; + $calc = 'set'; + } else if ($calc === 'sub') { + $date = $year - $date; + $calc = 'set'; + } + + return $this->_assign($calc, $this->mktime(0, 0, 0, $month, $day, $date, true), + $this->mktime(0, 0, 0, $month, $day, $year, true), false); + } + + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, year expected", 0, null, $date); + break; + + // time formats + case self::MERIDIEM: + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception('meridiem not supported', 0, null, $date); + break; + + case self::SWATCH: + if (is_numeric($date)) { + $rest = intval($date); + $hours = floor($rest * 24 / 1000); + $rest = $rest - ($hours * 1000 / 24); + $minutes = floor($rest * 1440 / 1000); + $rest = $rest - ($minutes * 1000 / 1440); + $seconds = floor($rest * 86400 / 1000); + return $this->_assign($calc, $this->mktime($hours, $minutes, $seconds, 1, 1, 1970, true), + $this->mktime($hour, $minute, $second, 1, 1, 1970, true), false); + } + + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, swatchstamp expected", 0, null, $date); + break; + + case self::HOUR_SHORT_AM: + if (is_numeric($date)) { + return $this->_assign($calc, $this->mktime(intval($date), 0, 0, 1, 1, 1970, true), + $this->mktime($hour, 0, 0, 1, 1, 1970, true), false); + } + + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, hour expected", 0, null, $date); + break; + + case self::HOUR_SHORT: + if (is_numeric($date)) { + return $this->_assign($calc, $this->mktime(intval($date), 0, 0, 1, 1, 1970, true), + $this->mktime($hour, 0, 0, 1, 1, 1970, true), false); + } + + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, hour expected", 0, null, $date); + break; + + case self::HOUR_AM: + if (is_numeric($date)) { + return $this->_assign($calc, $this->mktime(intval($date), 0, 0, 1, 1, 1970, true), + $this->mktime($hour, 0, 0, 1, 1, 1970, true), false); + } + + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, hour expected", 0, null, $date); + break; + + case self::HOUR: + if (is_numeric($date)) { + return $this->_assign($calc, $this->mktime(intval($date), 0, 0, 1, 1, 1970, true), + $this->mktime($hour, 0, 0, 1, 1, 1970, true), false); + } + + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, hour expected", 0, null, $date); + break; + + case self::MINUTE: + if (is_numeric($date)) { + return $this->_assign($calc, $this->mktime(0, intval($date), 0, 1, 1, 1970, true), + $this->mktime(0, $minute, 0, 1, 1, 1970, true), false); + } + + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, minute expected", 0, null, $date); + break; + + case self::SECOND: + if (is_numeric($date)) { + return $this->_assign($calc, $this->mktime(0, 0, intval($date), 1, 1, 1970, true), + $this->mktime(0, 0, $second, 1, 1, 1970, true), false); + } + + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, second expected", 0, null, $date); + break; + + case self::MILLISECOND: + if (is_numeric($date)) { + switch($calc) { + case 'set' : + return $this->setMillisecond($date); + break; + case 'add' : + return $this->addMillisecond($date); + break; + case 'sub' : + return $this->subMillisecond($date); + break; + } + + return $this->compareMillisecond($date); + } + + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, milliseconds expected", 0, null, $date); + break; + + case self::MINUTE_SHORT: + if (is_numeric($date)) { + return $this->_assign($calc, $this->mktime(0, intval($date), 0, 1, 1, 1970, true), + $this->mktime(0, $minute, 0, 1, 1, 1970, true), false); + } + + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, minute expected", 0, null, $date); + break; + + case self::SECOND_SHORT: + if (is_numeric($date)) { + return $this->_assign($calc, $this->mktime(0, 0, intval($date), 1, 1, 1970, true), + $this->mktime(0, 0, $second, 1, 1, 1970, true), false); + } + + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, second expected", 0, null, $date); + break; + + // timezone formats + // break intentionally omitted + case self::TIMEZONE_NAME: + case self::TIMEZONE: + case self::TIMEZONE_SECS: + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception('timezone not supported', 0, null, $date); + break; + + case self::DAYLIGHT: + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception('daylight not supported', 0, null, $date); + break; + + case self::GMT_DIFF: + case self::GMT_DIFF_SEP: + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception('gmtdiff not supported', 0, null, $date); + break; + + // date strings + case self::ISO_8601: + // (-)YYYY-MM-dd + preg_match('/^(-{0,1}\d{4})-(\d{2})-(\d{2})/', $date, $datematch); + // (-)YY-MM-dd + if (empty($datematch)) { + preg_match('/^(-{0,1}\d{2})-(\d{2})-(\d{2})/', $date, $datematch); + } + // (-)YYYYMMdd + if (empty($datematch)) { + preg_match('/^(-{0,1}\d{4})(\d{2})(\d{2})/', $date, $datematch); + } + // (-)YYMMdd + if (empty($datematch)) { + preg_match('/^(-{0,1}\d{2})(\d{2})(\d{2})/', $date, $datematch); + } + $tmpdate = $date; + if (!empty($datematch)) { + $dateMatchCharCount = iconv_strlen($datematch[0], 'UTF-8'); + $tmpdate = iconv_substr($date, + $dateMatchCharCount, + iconv_strlen($date, 'UTF-8') - $dateMatchCharCount, + 'UTF-8'); + } + // (T)hh:mm:ss + preg_match('/[T,\s]{0,1}(\d{2}):(\d{2}):(\d{2})/', $tmpdate, $timematch); + if (empty($timematch)) { + preg_match('/[T,\s]{0,1}(\d{2})(\d{2})(\d{2})/', $tmpdate, $timematch); + } + if (empty($datematch) and empty($timematch)) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("unsupported ISO8601 format ($date)", 0, null, $date); + } + if (!empty($timematch)) { + $timeMatchCharCount = iconv_strlen($timematch[0], 'UTF-8'); + $tmpdate = iconv_substr($tmpdate, + $timeMatchCharCount, + iconv_strlen($tmpdate, 'UTF-8') - $timeMatchCharCount, + 'UTF-8'); + } + if (empty($datematch)) { + $datematch[1] = 1970; + $datematch[2] = 1; + $datematch[3] = 1; + } else if (iconv_strlen($datematch[1], 'UTF-8') == 2) { + $datematch[1] = self::getFullYear($datematch[1]); + } + if (empty($timematch)) { + $timematch[1] = 0; + $timematch[2] = 0; + $timematch[3] = 0; + } + + if (($calc == 'set') || ($calc == 'cmp')) { + --$datematch[2]; + --$month; + --$datematch[3]; + --$day; + $datematch[1] -= 1970; + $year -= 1970; + } + return $this->_assign($calc, $this->mktime($timematch[1], $timematch[2], $timematch[3], 1 + $datematch[2], 1 + $datematch[3], 1970 + $datematch[1], false), + $this->mktime($hour, $minute, $second, 1 + $month, 1 + $day, 1970 + $year, false), false); + break; + + case self::RFC_2822: + $result = preg_match('/^\w{3},\s(\d{1,2})\s(\w{3})\s(\d{4})\s(\d{2}):(\d{2}):{0,1}(\d{0,2})\s([+-]{1}\d{4})$/', $date, $match); + if (!$result) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("no RFC 2822 format ($date)", 0, null, $date); + } + + $months = $this->_getDigitFromName($match[2]); + + if (($calc == 'set') || ($calc == 'cmp')) { + --$months; + --$month; + --$match[1]; + --$day; + $match[3] -= 1970; + $year -= 1970; + } + return $this->_assign($calc, $this->mktime($match[4], $match[5], $match[6], 1 + $months, 1 + $match[1], 1970 + $match[3], false), + $this->mktime($hour, $minute, $second, 1 + $month, 1 + $day, 1970 + $year, false), false); + break; + + case self::TIMESTAMP: + if (is_numeric($date)) { + return $this->_assign($calc, $date, $this->getUnixTimestamp()); + } + + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, timestamp expected", 0, null, $date); + break; + + // additional formats + // break intentionally omitted + case self::ERA: + case self::ERA_NAME: + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception('era not supported', 0, null, $date); + break; + + case self::DATES: + try { + $parsed = Zend_Locale_Format::getDate($date, array('locale' => $locale, 'format_type' => 'iso', 'fix_date' => true)); + + if (($calc == 'set') || ($calc == 'cmp')) { + --$parsed['month']; + --$month; + --$parsed['day']; + --$day; + $parsed['year'] -= 1970; + $year -= 1970; + } + + return $this->_assign($calc, $this->mktime(0, 0, 0, 1 + $parsed['month'], 1 + $parsed['day'], 1970 + $parsed['year'], true), + $this->mktime(0, 0, 0, 1 + $month, 1 + $day, 1970 + $year, true), $hour); + } catch (Zend_Locale_Exception $e) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception($e->getMessage(), 0, $e, $date); + } + break; + + case self::DATE_FULL: + try { + $format = Zend_Locale_Data::getContent($locale, 'date', array('gregorian', 'full')); + $parsed = Zend_Locale_Format::getDate($date, array('date_format' => $format, 'format_type' => 'iso', 'locale' => $locale)); + + if (($calc == 'set') || ($calc == 'cmp')) { + --$parsed['month']; + --$month; + --$parsed['day']; + --$day; + $parsed['year'] -= 1970; + $year -= 1970; + } + return $this->_assign($calc, $this->mktime(0, 0, 0, 1 + $parsed['month'], 1 + $parsed['day'], 1970 + $parsed['year'], true), + $this->mktime(0, 0, 0, 1 + $month, 1 + $day, 1970 + $year, true), $hour); + } catch (Zend_Locale_Exception $e) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception($e->getMessage(), 0, $e, $date); + } + break; + + case self::DATE_LONG: + try { + $format = Zend_Locale_Data::getContent($locale, 'date', array('gregorian', 'long')); + $parsed = Zend_Locale_Format::getDate($date, array('date_format' => $format, 'format_type' => 'iso', 'locale' => $locale)); + + if (($calc == 'set') || ($calc == 'cmp')){ + --$parsed['month']; + --$month; + --$parsed['day']; + --$day; + $parsed['year'] -= 1970; + $year -= 1970; + } + return $this->_assign($calc, $this->mktime(0, 0, 0, 1 + $parsed['month'], 1 + $parsed['day'], 1970 + $parsed['year'], true), + $this->mktime(0, 0, 0, 1 + $month, 1 + $day, 1970 + $year, true), $hour); + } catch (Zend_Locale_Exception $e) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception($e->getMessage(), 0, $e, $date); + } + break; + + case self::DATE_MEDIUM: + try { + $format = Zend_Locale_Data::getContent($locale, 'date', array('gregorian', 'medium')); + $parsed = Zend_Locale_Format::getDate($date, array('date_format' => $format, 'format_type' => 'iso', 'locale' => $locale)); + + if (($calc == 'set') || ($calc == 'cmp')) { + --$parsed['month']; + --$month; + --$parsed['day']; + --$day; + $parsed['year'] -= 1970; + $year -= 1970; + } + return $this->_assign($calc, $this->mktime(0, 0, 0, 1 + $parsed['month'], 1 + $parsed['day'], 1970 + $parsed['year'], true), + $this->mktime(0, 0, 0, 1 + $month, 1 + $day, 1970 + $year, true), $hour); + } catch (Zend_Locale_Exception $e) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception($e->getMessage(), 0, $e, $date); + } + break; + + case self::DATE_SHORT: + try { + $format = Zend_Locale_Data::getContent($locale, 'date', array('gregorian', 'short')); + $parsed = Zend_Locale_Format::getDate($date, array('date_format' => $format, 'format_type' => 'iso', 'locale' => $locale)); + + $parsed['year'] = self::getFullYear($parsed['year']); + + if (($calc == 'set') || ($calc == 'cmp')) { + --$parsed['month']; + --$month; + --$parsed['day']; + --$day; + $parsed['year'] -= 1970; + $year -= 1970; + } + return $this->_assign($calc, $this->mktime(0, 0, 0, 1 + $parsed['month'], 1 + $parsed['day'], 1970 + $parsed['year'], true), + $this->mktime(0, 0, 0, 1 + $month, 1 + $day, 1970 + $year, true), $hour); + } catch (Zend_Locale_Exception $e) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception($e->getMessage(), 0, $e, $date); + } + break; + + case self::TIMES: + try { + if ($calc != 'set') { + $month = 1; + $day = 1; + $year = 1970; + } + $parsed = Zend_Locale_Format::getTime($date, array('locale' => $locale, 'format_type' => 'iso', 'fix_date' => true)); + return $this->_assign($calc, $this->mktime($parsed['hour'], $parsed['minute'], $parsed['second'], $month, $day, $year, true), + $this->mktime($hour, $minute, $second, $month, $day, $year, true), false); + } catch (Zend_Locale_Exception $e) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception($e->getMessage(), 0, $e, $date); + } + break; + + case self::TIME_FULL: + try { + $format = Zend_Locale_Data::getContent($locale, 'time', array('gregorian', 'full')); + $parsed = Zend_Locale_Format::getTime($date, array('date_format' => $format, 'format_type' => 'iso', 'locale' => $locale)); + if ($calc != 'set') { + $month = 1; + $day = 1; + $year = 1970; + } + + if (!isset($parsed['second'])) { + $parsed['second'] = 0; + } + + return $this->_assign($calc, $this->mktime($parsed['hour'], $parsed['minute'], $parsed['second'], $month, $day, $year, true), + $this->mktime($hour, $minute, $second, $month, $day, $year, true), false); + } catch (Zend_Locale_Exception $e) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception($e->getMessage(), 0, $e, $date); + } + break; + + case self::TIME_LONG: + try { + $format = Zend_Locale_Data::getContent($locale, 'time', array('gregorian', 'long')); + $parsed = Zend_Locale_Format::getTime($date, array('date_format' => $format, 'format_type' => 'iso', 'locale' => $locale)); + if ($calc != 'set') { + $month = 1; + $day = 1; + $year = 1970; + } + return $this->_assign($calc, $this->mktime($parsed['hour'], $parsed['minute'], $parsed['second'], $month, $day, $year, true), + $this->mktime($hour, $minute, $second, $month, $day, $year, true), false); + } catch (Zend_Locale_Exception $e) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception($e->getMessage(), 0, $e, $date); + } + break; + + case self::TIME_MEDIUM: + try { + $format = Zend_Locale_Data::getContent($locale, 'time', array('gregorian', 'medium')); + $parsed = Zend_Locale_Format::getTime($date, array('date_format' => $format, 'format_type' => 'iso', 'locale' => $locale)); + if ($calc != 'set') { + $month = 1; + $day = 1; + $year = 1970; + } + return $this->_assign($calc, $this->mktime($parsed['hour'], $parsed['minute'], $parsed['second'], $month, $day, $year, true), + $this->mktime($hour, $minute, $second, $month, $day, $year, true), false); + } catch (Zend_Locale_Exception $e) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception($e->getMessage(), 0, $e, $date); + } + break; + + case self::TIME_SHORT: + try { + $format = Zend_Locale_Data::getContent($locale, 'time', array('gregorian', 'short')); + $parsed = Zend_Locale_Format::getTime($date, array('date_format' => $format, 'format_type' => 'iso', 'locale' => $locale)); + if ($calc != 'set') { + $month = 1; + $day = 1; + $year = 1970; + } + + if (!isset($parsed['second'])) { + $parsed['second'] = 0; + } + + return $this->_assign($calc, $this->mktime($parsed['hour'], $parsed['minute'], $parsed['second'], $month, $day, $year, true), + $this->mktime($hour, $minute, $second, $month, $day, $year, true), false); + } catch (Zend_Locale_Exception $e) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception($e->getMessage(), 0, $e, $date); + } + break; + + case self::DATETIME: + try { + $parsed = Zend_Locale_Format::getDateTime($date, array('locale' => $locale, 'format_type' => 'iso', 'fix_date' => true)); + if (($calc == 'set') || ($calc == 'cmp')) { + --$parsed['month']; + --$month; + --$parsed['day']; + --$day; + $parsed['year'] -= 1970; + $year -= 1970; + } + return $this->_assign($calc, $this->mktime($parsed['hour'], $parsed['minute'], $parsed['second'], 1 + $parsed['month'], 1 + $parsed['day'], 1970 + $parsed['year'], true), + $this->mktime($hour, $minute, $second, 1 + $month, 1 + $day, 1970 + $year, true), $hour); + } catch (Zend_Locale_Exception $e) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception($e->getMessage(), 0, $e, $date); + } + break; + + case self::DATETIME_FULL: + try { + $format = Zend_Locale_Data::getContent($locale, 'datetime', array('gregorian', 'full')); + $parsed = Zend_Locale_Format::getDateTime($date, array('date_format' => $format, 'format_type' => 'iso', 'locale' => $locale)); + + if (($calc == 'set') || ($calc == 'cmp')) { + --$parsed['month']; + --$month; + --$parsed['day']; + --$day; + $parsed['year'] -= 1970; + $year -= 1970; + } + + if (!isset($parsed['second'])) { + $parsed['second'] = 0; + } + + return $this->_assign($calc, $this->mktime($parsed['hour'], $parsed['minute'], $parsed['second'], 1 + $parsed['month'], 1 + $parsed['day'], 1970 + $parsed['year'], true), + $this->mktime($hour, $minute, $second, 1 + $month, 1 + $day, 1970 + $year, true), $hour); + } catch (Zend_Locale_Exception $e) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception($e->getMessage(), 0, $e, $date); + } + break; + + case self::DATETIME_LONG: + try { + $format = Zend_Locale_Data::getContent($locale, 'datetime', array('gregorian', 'long')); + $parsed = Zend_Locale_Format::getDateTime($date, array('date_format' => $format, 'format_type' => 'iso', 'locale' => $locale)); + + if (($calc == 'set') || ($calc == 'cmp')){ + --$parsed['month']; + --$month; + --$parsed['day']; + --$day; + $parsed['year'] -= 1970; + $year -= 1970; + } + return $this->_assign($calc, $this->mktime($parsed['hour'], $parsed['minute'], $parsed['second'], 1 + $parsed['month'], 1 + $parsed['day'], 1970 + $parsed['year'], true), + $this->mktime($hour, $minute, $second, 1 + $month, 1 + $day, 1970 + $year, true), $hour); + } catch (Zend_Locale_Exception $e) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception($e->getMessage(), 0, $e, $date); + } + break; + + case self::DATETIME_MEDIUM: + try { + $format = Zend_Locale_Data::getContent($locale, 'datetime', array('gregorian', 'medium')); + $parsed = Zend_Locale_Format::getDateTime($date, array('date_format' => $format, 'format_type' => 'iso', 'locale' => $locale)); + if (($calc == 'set') || ($calc == 'cmp')) { + --$parsed['month']; + --$month; + --$parsed['day']; + --$day; + $parsed['year'] -= 1970; + $year -= 1970; + } + return $this->_assign($calc, $this->mktime($parsed['hour'], $parsed['minute'], $parsed['second'], 1 + $parsed['month'], 1 + $parsed['day'], 1970 + $parsed['year'], true), + $this->mktime($hour, $minute, $second, 1 + $month, 1 + $day, 1970 + $year, true), $hour); + } catch (Zend_Locale_Exception $e) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception($e->getMessage(), 0, $e, $date); + } + break; + + case self::DATETIME_SHORT: + try { + $format = Zend_Locale_Data::getContent($locale, 'datetime', array('gregorian', 'short')); + $parsed = Zend_Locale_Format::getDateTime($date, array('date_format' => $format, 'format_type' => 'iso', 'locale' => $locale)); + + $parsed['year'] = self::getFullYear($parsed['year']); + + if (($calc == 'set') || ($calc == 'cmp')) { + --$parsed['month']; + --$month; + --$parsed['day']; + --$day; + $parsed['year'] -= 1970; + $year -= 1970; + } + + if (!isset($parsed['second'])) { + $parsed['second'] = 0; + } + + return $this->_assign($calc, $this->mktime($parsed['hour'], $parsed['minute'], $parsed['second'], 1 + $parsed['month'], 1 + $parsed['day'], 1970 + $parsed['year'], true), + $this->mktime($hour, $minute, $second, 1 + $month, 1 + $day, 1970 + $year, true), $hour); + } catch (Zend_Locale_Exception $e) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception($e->getMessage(), 0, $e, $date); + } + break; + + // ATOM and RFC_3339 are identical + case self::ATOM: + case self::RFC_3339: + $result = preg_match('/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})\d{0,4}([+-]{1}\d{2}:\d{2}|Z)$/', $date, $match); + if (!$result) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, ATOM format expected", 0, null, $date); + } + + if (($calc == 'set') || ($calc == 'cmp')) { + --$match[2]; + --$month; + --$match[3]; + --$day; + $match[1] -= 1970; + $year -= 1970; + } + return $this->_assign($calc, $this->mktime($match[4], $match[5], $match[6], 1 + $match[2], 1 + $match[3], 1970 + $match[1], true), + $this->mktime($hour, $minute, $second, 1 + $month, 1 + $day, 1970 + $year, true), false); + break; + + case self::COOKIE: + $result = preg_match("/^\w{6,9},\s(\d{2})-(\w{3})-(\d{2})\s(\d{2}):(\d{2}):(\d{2})\s.{3,20}$/", $date, $match); + if (!$result) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, COOKIE format expected", 0, null, $date); + } + $matchStartPos = iconv_strpos($match[0], ' ', 0, 'UTF-8') + 1; + $match[0] = iconv_substr($match[0], + $matchStartPos, + iconv_strlen($match[0], 'UTF-8') - $matchStartPos, + 'UTF-8'); + + $months = $this->_getDigitFromName($match[2]); + $match[3] = self::getFullYear($match[3]); + + if (($calc == 'set') || ($calc == 'cmp')) { + --$months; + --$month; + --$match[1]; + --$day; + $match[3] -= 1970; + $year -= 1970; + } + return $this->_assign($calc, $this->mktime($match[4], $match[5], $match[6], 1 + $months, 1 + $match[1], 1970 + $match[3], true), + $this->mktime($hour, $minute, $second, 1 + $month, 1 + $day, 1970 + $year, true), false); + break; + + case self::RFC_822: + case self::RFC_1036: + // new RFC 822 format, identical to RFC 1036 standard + $result = preg_match('/^\w{0,3},{0,1}\s{0,1}(\d{1,2})\s(\w{3})\s(\d{2})\s(\d{2}):(\d{2}):{0,1}(\d{0,2})\s([+-]{1}\d{4}|\w{1,20})$/', $date, $match); + if (!$result) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, RFC 822 date format expected", 0, null, $date); + } + + $months = $this->_getDigitFromName($match[2]); + $match[3] = self::getFullYear($match[3]); + + if (($calc == 'set') || ($calc == 'cmp')) { + --$months; + --$month; + --$match[1]; + --$day; + $match[3] -= 1970; + $year -= 1970; + } + return $this->_assign($calc, $this->mktime($match[4], $match[5], $match[6], 1 + $months, 1 + $match[1], 1970 + $match[3], false), + $this->mktime($hour, $minute, $second, 1 + $month, 1 + $day, 1970 + $year, false), false); + break; + + case self::RFC_850: + $result = preg_match('/^\w{6,9},\s(\d{2})-(\w{3})-(\d{2})\s(\d{2}):(\d{2}):(\d{2})\s.{3,21}$/', $date, $match); + if (!$result) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, RFC 850 date format expected", 0, null, $date); + } + + $months = $this->_getDigitFromName($match[2]); + $match[3] = self::getFullYear($match[3]); + + if (($calc == 'set') || ($calc == 'cmp')) { + --$months; + --$month; + --$match[1]; + --$day; + $match[3] -= 1970; + $year -= 1970; + } + return $this->_assign($calc, $this->mktime($match[4], $match[5], $match[6], 1 + $months, 1 + $match[1], 1970 + $match[3], true), + $this->mktime($hour, $minute, $second, 1 + $month, 1 + $day, 1970 + $year, true), false); + break; + + case self::RFC_1123: + $result = preg_match('/^\w{0,3},{0,1}\s{0,1}(\d{1,2})\s(\w{3})\s(\d{2,4})\s(\d{2}):(\d{2}):{0,1}(\d{0,2})\s([+-]{1}\d{4}|\w{1,20})$/', $date, $match); + if (!$result) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, RFC 1123 date format expected", 0, null, $date); + } + + $months = $this->_getDigitFromName($match[2]); + + if (($calc == 'set') || ($calc == 'cmp')) { + --$months; + --$month; + --$match[1]; + --$day; + $match[3] -= 1970; + $year -= 1970; + } + return $this->_assign($calc, $this->mktime($match[4], $match[5], $match[6], 1 + $months, 1 + $match[1], 1970 + $match[3], true), + $this->mktime($hour, $minute, $second, 1 + $month, 1 + $day, 1970 + $year, true), false); + break; + + case self::RSS: + $result = preg_match('/^\w{3},\s(\d{2})\s(\w{3})\s(\d{2,4})\s(\d{1,2}):(\d{2}):(\d{2})\s.{1,21}$/', $date, $match); + if (!$result) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, RSS date format expected", 0, null, $date); + } + + $months = $this->_getDigitFromName($match[2]); + $match[3] = self::getFullYear($match[3]); + + if (($calc == 'set') || ($calc == 'cmp')) { + --$months; + --$month; + --$match[1]; + --$day; + $match[3] -= 1970; + $year -= 1970; + } + return $this->_assign($calc, $this->mktime($match[4], $match[5], $match[6], 1 + $months, 1 + $match[1], 1970 + $match[3], true), + $this->mktime($hour, $minute, $second, 1 + $month, 1 + $day, 1970 + $year, true), false); + break; + + case self::W3C: + $result = preg_match('/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})[+-]{1}\d{2}:\d{2}$/', $date, $match); + if (!$result) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid date ($date) operand, W3C date format expected", 0, null, $date); + } + + if (($calc == 'set') || ($calc == 'cmp')) { + --$match[2]; + --$month; + --$match[3]; + --$day; + $match[1] -= 1970; + $year -= 1970; + } + return $this->_assign($calc, $this->mktime($match[4], $match[5], $match[6], 1 + $match[2], 1 + $match[3], 1970 + $match[1], true), + $this->mktime($hour, $minute, $second, 1 + $month, 1 + $day, 1970 + $year, true), false); + break; + + default: + if (!is_numeric($date) || !empty($part)) { + try { + if (empty($part)) { + $part = Zend_Locale_Format::getDateFormat($locale) . " "; + $part .= Zend_Locale_Format::getTimeFormat($locale); + } + + $parsed = Zend_Locale_Format::getDate($date, array('date_format' => $part, 'locale' => $locale, 'fix_date' => true, 'format_type' => 'iso')); + if ((strpos(strtoupper($part), 'YY') !== false) and (strpos(strtoupper($part), 'YYYY') === false)) { + $parsed['year'] = self::getFullYear($parsed['year']); + } + + if (($calc == 'set') || ($calc == 'cmp')) { + if (isset($parsed['month'])) { + --$parsed['month']; + } else { + $parsed['month'] = 0; + } + + if (isset($parsed['day'])) { + --$parsed['day']; + } else { + $parsed['day'] = 0; + } + + if (isset($parsed['year'])) { + $parsed['year'] -= 1970; + } else { + $parsed['year'] = 0; + } + } + + return $this->_assign($calc, $this->mktime( + isset($parsed['hour']) ? $parsed['hour'] : 0, + isset($parsed['minute']) ? $parsed['minute'] : 0, + isset($parsed['second']) ? $parsed['second'] : 0, + isset($parsed['month']) ? (1 + $parsed['month']) : 1, + isset($parsed['day']) ? (1 + $parsed['day']) : 1, + isset($parsed['year']) ? (1970 + $parsed['year']) : 1970, + false), $this->getUnixTimestamp(), false); + } catch (Zend_Locale_Exception $e) { + if (!is_numeric($date)) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception($e->getMessage(), 0, $e, $date); + } + } + } + + return $this->_assign($calc, $date, $this->getUnixTimestamp(), false); + break; + } + } + + /** + * Returns true when both date objects or date parts are equal. + * For example: + * 15.May.2000 <-> 15.June.2000 Equals only for Day or Year... all other will return false + * + * @param string|integer|array|Zend_Date $date Date or datepart to equal with + * @param string $part OPTIONAL Part of the date to compare, if null the timestamp is used + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return boolean + * @throws Zend_Date_Exception + */ + public function equals($date, $part = self::TIMESTAMP, $locale = null) + { + $result = $this->compare($date, $part, $locale); + + if ($result == 0) { + return true; + } + + return false; + } + + /** + * Returns if the given date or datepart is earlier + * For example: + * 15.May.2000 <-> 13.June.1999 will return true for day, year and date, but not for month + * + * @param string|integer|array|Zend_Date $date Date or datepart to compare with + * @param string $part OPTIONAL Part of the date to compare, if null the timestamp is used + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return boolean + * @throws Zend_Date_Exception + */ + public function isEarlier($date, $part = null, $locale = null) + { + $result = $this->compare($date, $part, $locale); + + if ($result == -1) { + return true; + } + + return false; + } + + /** + * Returns if the given date or datepart is later + * For example: + * 15.May.2000 <-> 13.June.1999 will return true for month but false for day, year and date + * Returns if the given date is later + * + * @param string|integer|array|Zend_Date $date Date or datepart to compare with + * @param string $part OPTIONAL Part of the date to compare, if null the timestamp is used + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return boolean + * @throws Zend_Date_Exception + */ + public function isLater($date, $part = null, $locale = null) + { + $result = $this->compare($date, $part, $locale); + + if ($result == 1) { + return true; + } + + return false; + } + + /** + * Returns only the time of the date as new Zend_Date object + * For example: + * 15.May.2000 10:11:23 will return a dateobject equal to 01.Jan.1970 10:11:23 + * + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date + */ + public function getTime($locale = null) + { + if (self::$_options['format_type'] == 'php') { + $format = 'H:i:s'; + } else { + $format = self::TIME_MEDIUM; + } + + return $this->copyPart($format, $locale); + } + + /** + * Returns the calculated time + * + * @param string $calc Calculation to make + * @param string|integer|array|Zend_Date $time Time to calculate with, if null the actual time is taken + * @param string $format Timeformat for parsing input + * @param string|Zend_Locale $locale Locale for parsing input + * @return integer|Zend_Date new time + * @throws Zend_Date_Exception + */ + private function _time($calc, $time, $format, $locale) + { + if ($time === null) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception('parameter $time must be set, null is not allowed'); + } + + if ($time instanceof Zend_Date) { + // extract time from object + $time = $time->toString('HH:mm:ss', 'iso'); + } else { + if (is_array($time)) { + if ((isset($time['hour']) === true) or (isset($time['minute']) === true) or + (isset($time['second']) === true)) { + $parsed = $time; + } else { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("no hour, minute or second given in array"); + } + } else { + if (self::$_options['format_type'] == 'php') { + $format = Zend_Locale_Format::convertPhpToIsoFormat($format); + } + try { + if ($locale === null) { + $locale = $this->getLocale(); + } + + $parsed = Zend_Locale_Format::getTime($time, array('date_format' => $format, 'locale' => $locale, 'format_type' => 'iso')); + } catch (Zend_Locale_Exception $e) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception($e->getMessage(), 0, $e); + } + } + + if (!array_key_exists('hour', $parsed)) { + $parsed['hour'] = 0; + } + + if (!array_key_exists('minute', $parsed)) { + $parsed['minute'] = 0; + } + + if (!array_key_exists('second', $parsed)) { + $parsed['second'] = 0; + } + + $time = str_pad($parsed['hour'], 2, '0', STR_PAD_LEFT) . ":"; + $time .= str_pad($parsed['minute'], 2, '0', STR_PAD_LEFT) . ":"; + $time .= str_pad($parsed['second'], 2, '0', STR_PAD_LEFT); + } + + $return = $this->_calcdetail($calc, $time, self::TIMES, 'de'); + if ($calc != 'cmp') { + return $this; + } + + return $return; + } + + + /** + * Sets a new time for the date object. Format defines how to parse the time string. + * Also a complete date can be given, but only the time is used for setting. + * For example: dd.MMMM.yyTHH:mm' and 'ss sec'-> 10.May.07T25:11 and 44 sec => 1h11min44sec + 1 day + * Returned is the new date object and the existing date is left as it was before + * + * @param string|integer|array|Zend_Date $time Time to set + * @param string $format OPTIONAL Timeformat for parsing input + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function setTime($time, $format = null, $locale = null) + { + return $this->_time('set', $time, $format, $locale); + } + + + /** + * Adds a time to the existing date. Format defines how to parse the time string. + * If only parts are given the other parts are set to 0. + * If no format is given, the standardformat of this locale is used. + * For example: HH:mm:ss -> 10 -> +10 hours + * + * @param string|integer|array|Zend_Date $time Time to add + * @param string $format OPTIONAL Timeformat for parsing input + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function addTime($time, $format = null, $locale = null) + { + return $this->_time('add', $time, $format, $locale); + } + + + /** + * Subtracts a time from the existing date. Format defines how to parse the time string. + * If only parts are given the other parts are set to 0. + * If no format is given, the standardformat of this locale is used. + * For example: HH:mm:ss -> 10 -> -10 hours + * + * @param string|integer|array|Zend_Date $time Time to sub + * @param string $format OPTIONAL Timeformat for parsing input + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid inteface + * @throws Zend_Date_Exception + */ + public function subTime($time, $format = null, $locale = null) + { + return $this->_time('sub', $time, $format, $locale); + } + + + /** + * Compares the time from the existing date. Format defines how to parse the time string. + * If only parts are given the other parts are set to default. + * If no format us given, the standardformat of this locale is used. + * For example: HH:mm:ss -> 10 -> 10 hours + * + * @param string|integer|array|Zend_Date $time Time to compare + * @param string $format OPTIONAL Timeformat for parsing input + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return integer 0 = equal, 1 = later, -1 = earlier + * @throws Zend_Date_Exception + */ + public function compareTime($time, $format = null, $locale = null) + { + return $this->_time('cmp', $time, $format, $locale); + } + + /** + * Returns a clone of $this, with the time part set to 00:00:00. + * + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date + */ + public function getDate($locale = null) + { + $orig = self::$_options['format_type']; + if (self::$_options['format_type'] == 'php') { + self::$_options['format_type'] = 'iso'; + } + + $date = $this->copyPart(self::DATE_MEDIUM, $locale); + $date->addTimestamp($this->getGmtOffset()); + self::$_options['format_type'] = $orig; + + return $date; + } + + /** + * Returns the calculated date + * + * @param string $calc Calculation to make + * @param string|integer|array|Zend_Date $date Date to calculate with, if null the actual date is taken + * @param string $format Date format for parsing + * @param string|Zend_Locale $locale Locale for parsing input + * @return integer|Zend_Date new date + * @throws Zend_Date_Exception + */ + private function _date($calc, $date, $format, $locale) + { + if ($date === null) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception('parameter $date must be set, null is not allowed'); + } + + if ($date instanceof Zend_Date) { + // extract date from object + $date = $date->toString('d.M.y', 'iso'); + } else { + if (is_array($date)) { + if ((isset($date['year']) === true) or (isset($date['month']) === true) or + (isset($date['day']) === true)) { + $parsed = $date; + } else { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("no day,month or year given in array"); + } + } else { + if ((self::$_options['format_type'] == 'php') && !defined($format)) { + $format = Zend_Locale_Format::convertPhpToIsoFormat($format); + } + try { + if ($locale === null) { + $locale = $this->getLocale(); + } + + $parsed = Zend_Locale_Format::getDate($date, array('date_format' => $format, 'locale' => $locale, 'format_type' => 'iso')); + if ((strpos(strtoupper($format), 'YY') !== false) and (strpos(strtoupper($format), 'YYYY') === false)) { + $parsed['year'] = self::getFullYear($parsed['year']); + } + } catch (Zend_Locale_Exception $e) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception($e->getMessage(), 0, $e); + } + } + + if (!array_key_exists('day', $parsed)) { + $parsed['day'] = 1; + } + + if (!array_key_exists('month', $parsed)) { + $parsed['month'] = 1; + } + + if (!array_key_exists('year', $parsed)) { + $parsed['year'] = 0; + } + + $date = $parsed['day'] . "." . $parsed['month'] . "." . $parsed['year']; + } + + $return = $this->_calcdetail($calc, $date, self::DATE_MEDIUM, 'de'); + if ($calc != 'cmp') { + return $this; + } + return $return; + } + + + /** + * Sets a new date for the date object. Format defines how to parse the date string. + * Also a complete date with time can be given, but only the date is used for setting. + * For example: MMMM.yy HH:mm-> May.07 22:11 => 01.May.07 00:00 + * Returned is the new date object and the existing time is left as it was before + * + * @param string|integer|array|Zend_Date $date Date to set + * @param string $format OPTIONAL Date format for parsing + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function setDate($date, $format = null, $locale = null) + { + return $this->_date('set', $date, $format, $locale); + } + + + /** + * Adds a date to the existing date object. Format defines how to parse the date string. + * If only parts are given the other parts are set to 0. + * If no format is given, the standardformat of this locale is used. + * For example: MM.dd.YYYY -> 10 -> +10 months + * + * @param string|integer|array|Zend_Date $date Date to add + * @param string $format OPTIONAL Date format for parsing input + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function addDate($date, $format = null, $locale = null) + { + return $this->_date('add', $date, $format, $locale); + } + + + /** + * Subtracts a date from the existing date object. Format defines how to parse the date string. + * If only parts are given the other parts are set to 0. + * If no format is given, the standardformat of this locale is used. + * For example: MM.dd.YYYY -> 10 -> -10 months + * Be aware: Subtracting 2 months is not equal to Adding -2 months !!! + * + * @param string|integer|array|Zend_Date $date Date to sub + * @param string $format OPTIONAL Date format for parsing input + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function subDate($date, $format = null, $locale = null) + { + return $this->_date('sub', $date, $format, $locale); + } + + + /** + * Compares the date from the existing date object, ignoring the time. + * Format defines how to parse the date string. + * If only parts are given the other parts are set to 0. + * If no format is given, the standardformat of this locale is used. + * For example: 10.01.2000 => 10.02.1999 -> false + * + * @param string|integer|array|Zend_Date $date Date to compare + * @param string $format OPTIONAL Date format for parsing input + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return integer 0 = equal, 1 = later, -1 = earlier + * @throws Zend_Date_Exception + */ + public function compareDate($date, $format = null, $locale = null) + { + return $this->_date('cmp', $date, $format, $locale); + } + + + /** + * Returns the full ISO 8601 date from the date object. + * Always the complete ISO 8601 specifiction is used. If an other ISO date is needed + * (ISO 8601 defines several formats) use toString() instead. + * This function does not return the ISO date as object. Use copy() instead. + * + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return string + */ + public function getIso($locale = null) + { + return $this->toString(self::ISO_8601, 'iso', $locale); + } + + + /** + * Sets a new date for the date object. Not given parts are set to default. + * Only supported ISO 8601 formats are accepted. + * For example: 050901 -> 01.Sept.2005 00:00:00, 20050201T10:00:30 -> 01.Feb.2005 10h00m30s + * Returned is the new date object + * + * @param string|integer|Zend_Date $date ISO Date to set + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function setIso($date, $locale = null) + { + return $this->_calcvalue('set', $date, 'iso', self::ISO_8601, $locale); + } + + + /** + * Adds a ISO date to the date object. Not given parts are set to default. + * Only supported ISO 8601 formats are accepted. + * For example: 050901 -> + 01.Sept.2005 00:00:00, 10:00:00 -> +10h + * Returned is the new date object + * + * @param string|integer|Zend_Date $date ISO Date to add + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function addIso($date, $locale = null) + { + return $this->_calcvalue('add', $date, 'iso', self::ISO_8601, $locale); + } + + + /** + * Subtracts a ISO date from the date object. Not given parts are set to default. + * Only supported ISO 8601 formats are accepted. + * For example: 050901 -> - 01.Sept.2005 00:00:00, 10:00:00 -> -10h + * Returned is the new date object + * + * @param string|integer|Zend_Date $date ISO Date to sub + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function subIso($date, $locale = null) + { + return $this->_calcvalue('sub', $date, 'iso', self::ISO_8601, $locale); + } + + + /** + * Compares a ISO date with the date object. Not given parts are set to default. + * Only supported ISO 8601 formats are accepted. + * For example: 050901 -> - 01.Sept.2005 00:00:00, 10:00:00 -> -10h + * Returns if equal, earlier or later + * + * @param string|integer|Zend_Date $date ISO Date to sub + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return integer 0 = equal, 1 = later, -1 = earlier + * @throws Zend_Date_Exception + */ + public function compareIso($date, $locale = null) + { + return $this->_calcvalue('cmp', $date, 'iso', self::ISO_8601, $locale); + } + + + /** + * Returns a RFC 822 compilant datestring from the date object. + * This function does not return the RFC date as object. Use copy() instead. + * + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return string + */ + public function getArpa($locale = null) + { + if (self::$_options['format_type'] == 'php') { + $format = 'D\, d M y H\:i\:s O'; + } else { + $format = self::RFC_822; + } + + return $this->toString($format, 'iso', $locale); + } + + + /** + * Sets a RFC 822 date as new date for the date object. + * Only RFC 822 compilant date strings are accepted. + * For example: Sat, 14 Feb 09 00:31:30 +0100 + * Returned is the new date object + * + * @param string|integer|Zend_Date $date RFC 822 to set + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function setArpa($date, $locale = null) + { + return $this->_calcvalue('set', $date, 'arpa', self::RFC_822, $locale); + } + + + /** + * Adds a RFC 822 date to the date object. + * ARPA messages are used in emails or HTTP Headers. + * Only RFC 822 compilant date strings are accepted. + * For example: Sat, 14 Feb 09 00:31:30 +0100 + * Returned is the new date object + * + * @param string|integer|Zend_Date $date RFC 822 Date to add + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function addArpa($date, $locale = null) + { + return $this->_calcvalue('add', $date, 'arpa', self::RFC_822, $locale); + } + + + /** + * Subtracts a RFC 822 date from the date object. + * ARPA messages are used in emails or HTTP Headers. + * Only RFC 822 compilant date strings are accepted. + * For example: Sat, 14 Feb 09 00:31:30 +0100 + * Returned is the new date object + * + * @param string|integer|Zend_Date $date RFC 822 Date to sub + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function subArpa($date, $locale = null) + { + return $this->_calcvalue('sub', $date, 'arpa', self::RFC_822, $locale); + } + + + /** + * Compares a RFC 822 compilant date with the date object. + * ARPA messages are used in emails or HTTP Headers. + * Only RFC 822 compilant date strings are accepted. + * For example: Sat, 14 Feb 09 00:31:30 +0100 + * Returns if equal, earlier or later + * + * @param string|integer|Zend_Date $date RFC 822 Date to sub + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return integer 0 = equal, 1 = later, -1 = earlier + * @throws Zend_Date_Exception + */ + public function compareArpa($date, $locale = null) + { + return $this->_calcvalue('cmp', $date, 'arpa', self::RFC_822, $locale); + } + + + /** + * Check if location is supported + * + * @param $location array - locations array + * @return $horizon float + */ + private function _checkLocation($location) + { + if (!isset($location['longitude']) or !isset($location['latitude'])) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception('Location must include \'longitude\' and \'latitude\'', 0, null, $location); + } + if (($location['longitude'] > 180) or ($location['longitude'] < -180)) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception('Longitude must be between -180 and 180', 0, null, $location); + } + if (($location['latitude'] > 90) or ($location['latitude'] < -90)) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception('Latitude must be between -90 and 90', 0, null, $location); + } + + if (!isset($location['horizon'])){ + $location['horizon'] = 'effective'; + } + + switch ($location['horizon']) { + case 'civil' : + return -0.104528; + break; + case 'nautic' : + return -0.207912; + break; + case 'astronomic' : + return -0.309017; + break; + default : + return -0.0145439; + break; + } + } + + + /** + * Returns the time of sunrise for this date and a given location as new date object + * For a list of cities and correct locations use the class Zend_Date_Cities + * + * @param $location array - location of sunrise + * ['horizon'] -> civil, nautic, astronomical, effective (default) + * ['longitude'] -> longitude of location + * ['latitude'] -> latitude of location + * @return Zend_Date + * @throws Zend_Date_Exception + */ + public function getSunrise($location) + { + $horizon = $this->_checkLocation($location); + $result = clone $this; + $result->set($this->calcSun($location, $horizon, true), self::TIMESTAMP); + return $result; + } + + + /** + * Returns the time of sunset for this date and a given location as new date object + * For a list of cities and correct locations use the class Zend_Date_Cities + * + * @param $location array - location of sunset + * ['horizon'] -> civil, nautic, astronomical, effective (default) + * ['longitude'] -> longitude of location + * ['latitude'] -> latitude of location + * @return Zend_Date + * @throws Zend_Date_Exception + */ + public function getSunset($location) + { + $horizon = $this->_checkLocation($location); + $result = clone $this; + $result->set($this->calcSun($location, $horizon, false), self::TIMESTAMP); + return $result; + } + + + /** + * Returns an array with the sunset and sunrise dates for all horizon types + * For a list of cities and correct locations use the class Zend_Date_Cities + * + * @param $location array - location of suninfo + * ['horizon'] -> civil, nautic, astronomical, effective (default) + * ['longitude'] -> longitude of location + * ['latitude'] -> latitude of location + * @return array - [sunset|sunrise][effective|civil|nautic|astronomic] + * @throws Zend_Date_Exception + */ + public function getSunInfo($location) + { + $suninfo = array(); + for ($i = 0; $i < 4; ++$i) { + switch ($i) { + case 0 : + $location['horizon'] = 'effective'; + break; + case 1 : + $location['horizon'] = 'civil'; + break; + case 2 : + $location['horizon'] = 'nautic'; + break; + case 3 : + $location['horizon'] = 'astronomic'; + break; + } + $horizon = $this->_checkLocation($location); + $result = clone $this; + $result->set($this->calcSun($location, $horizon, true), self::TIMESTAMP); + $suninfo['sunrise'][$location['horizon']] = $result; + $result = clone $this; + $result->set($this->calcSun($location, $horizon, false), self::TIMESTAMP); + $suninfo['sunset'][$location['horizon']] = $result; + } + return $suninfo; + } + + + /** + * Check a given year for leap year. + * + * @param integer|array|Zend_Date $year Year to check + * @return boolean + */ + public static function checkLeapYear($year) + { + if ($year instanceof Zend_Date) { + $year = (int) $year->toString(self::YEAR, 'iso'); + } + + if (is_array($year)) { + if (isset($year['year']) === true) { + $year = $year['year']; + } else { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("no year given in array"); + } + } + + if (!is_numeric($year)) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("year ($year) has to be integer for checkLeapYear()", 0, null, $year); + } + + return (bool) parent::isYearLeapYear($year); + } + + + /** + * Returns true, if the year is a leap year. + * + * @return boolean + */ + public function isLeapYear() + { + return self::checkLeapYear($this); + } + + + /** + * Returns if the set date is todays date + * + * @return boolean + */ + public function isToday() + { + $today = $this->date('Ymd', $this->_getTime()); + $day = $this->date('Ymd', $this->getUnixTimestamp()); + return ($today == $day); + } + + + /** + * Returns if the set date is yesterdays date + * + * @return boolean + */ + public function isYesterday() + { + list($year, $month, $day) = explode('-', $this->date('Y-m-d', $this->_getTime())); + // adjusts for leap days and DST changes that are timezone specific + $yesterday = $this->date('Ymd', $this->mktime(0, 0, 0, $month, $day -1, $year)); + $day = $this->date('Ymd', $this->getUnixTimestamp()); + return $day == $yesterday; + } + + + /** + * Returns if the set date is tomorrows date + * + * @return boolean + */ + public function isTomorrow() + { + list($year, $month, $day) = explode('-', $this->date('Y-m-d', $this->_getTime())); + // adjusts for leap days and DST changes that are timezone specific + $tomorrow = $this->date('Ymd', $this->mktime(0, 0, 0, $month, $day +1, $year)); + $day = $this->date('Ymd', $this->getUnixTimestamp()); + return $day == $tomorrow; + } + + /** + * Returns the actual date as new date object + * + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date + */ + public static function now($locale = null) + { + return new Zend_Date(time(), self::TIMESTAMP, $locale); + } + + /** + * Calculate date details + * + * @param string $calc Calculation to make + * @param string|integer|array|Zend_Date $date Date or Part to calculate + * @param string $part Datepart for Calculation + * @param string|Zend_Locale $locale Locale for parsing input + * @return integer|string new date + * @throws Zend_Date_Exception + */ + private function _calcdetail($calc, $date, $type, $locale) + { + $old = false; + if (self::$_options['format_type'] == 'php') { + self::$_options['format_type'] = 'iso'; + $old = true; + } + + switch($calc) { + case 'set' : + $return = $this->set($date, $type, $locale); + break; + case 'add' : + $return = $this->add($date, $type, $locale); + break; + case 'sub' : + $return = $this->sub($date, $type, $locale); + break; + default : + $return = $this->compare($date, $type, $locale); + break; + } + + if ($old) { + self::$_options['format_type'] = 'php'; + } + + return $return; + } + + /** + * Internal calculation, returns the requested date type + * + * @param string $calc Calculation to make + * @param string|integer|Zend_Date $value Datevalue to calculate with, if null the actual value is taken + * @param string|Zend_Locale $locale Locale for parsing input + * @return integer|Zend_Date new date + * @throws Zend_Date_Exception + */ + private function _calcvalue($calc, $value, $type, $parameter, $locale) + { + if ($value === null) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("parameter $type must be set, null is not allowed"); + } + + if ($locale === null) { + $locale = $this->getLocale(); + } + + if ($value instanceof Zend_Date) { + // extract value from object + $value = $value->toString($parameter, 'iso', $locale); + } else if (!is_array($value) && !is_numeric($value) && ($type != 'iso') && ($type != 'arpa')) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid $type ($value) operand", 0, null, $value); + } + + $return = $this->_calcdetail($calc, $value, $parameter, $locale); + if ($calc != 'cmp') { + return $this; + } + return $return; + } + + + /** + * Returns only the year from the date object as new object. + * For example: 10.May.2000 10:30:00 -> 01.Jan.2000 00:00:00 + * + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date + */ + public function getYear($locale = null) + { + if (self::$_options['format_type'] == 'php') { + $format = 'Y'; + } else { + $format = self::YEAR; + } + + return $this->copyPart($format, $locale); + } + + + /** + * Sets a new year + * If the year is between 0 and 69, 2000 will be set (2000-2069) + * If the year if between 70 and 99, 1999 will be set (1970-1999) + * 3 or 4 digit years are set as expected. If you need to set year 0-99 + * use set() instead. + * Returned is the new date object + * + * @param string|integer|array|Zend_Date $date Year to set + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function setYear($year, $locale = null) + { + return $this->_calcvalue('set', $year, 'year', self::YEAR, $locale); + } + + + /** + * Adds the year to the existing date object + * If the year is between 0 and 69, 2000 will be added (2000-2069) + * If the year if between 70 and 99, 1999 will be added (1970-1999) + * 3 or 4 digit years are added as expected. If you need to add years from 0-99 + * use add() instead. + * Returned is the new date object + * + * @param string|integer|array|Zend_Date $date Year to add + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function addYear($year, $locale = null) + { + return $this->_calcvalue('add', $year, 'year', self::YEAR, $locale); + } + + + /** + * Subs the year from the existing date object + * If the year is between 0 and 69, 2000 will be subtracted (2000-2069) + * If the year if between 70 and 99, 1999 will be subtracted (1970-1999) + * 3 or 4 digit years are subtracted as expected. If you need to subtract years from 0-99 + * use sub() instead. + * Returned is the new date object + * + * @param string|integer|array|Zend_Date $date Year to sub + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function subYear($year, $locale = null) + { + return $this->_calcvalue('sub', $year, 'year', self::YEAR, $locale); + } + + + /** + * Compares the year with the existing date object, ignoring other date parts. + * For example: 10.03.2000 -> 15.02.2000 -> true + * Returns if equal, earlier or later + * + * @param string|integer|array|Zend_Date $year Year to compare + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return integer 0 = equal, 1 = later, -1 = earlier + * @throws Zend_Date_Exception + */ + public function compareYear($year, $locale = null) + { + return $this->_calcvalue('cmp', $year, 'year', self::YEAR, $locale); + } + + + /** + * Returns only the month from the date object as new object. + * For example: 10.May.2000 10:30:00 -> 01.May.1970 00:00:00 + * + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date + */ + public function getMonth($locale = null) + { + if (self::$_options['format_type'] == 'php') { + $format = 'm'; + } else { + $format = self::MONTH; + } + + return $this->copyPart($format, $locale); + } + + + /** + * Returns the calculated month + * + * @param string $calc Calculation to make + * @param string|integer|array|Zend_Date $month Month to calculate with, if null the actual month is taken + * @param string|Zend_Locale $locale Locale for parsing input + * @return integer|Zend_Date new time + * @throws Zend_Date_Exception + */ + private function _month($calc, $month, $locale) + { + if ($month === null) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception('parameter $month must be set, null is not allowed'); + } + + if ($locale === null) { + $locale = $this->getLocale(); + } + + if ($month instanceof Zend_Date) { + // extract month from object + $found = $month->toString(self::MONTH_SHORT, 'iso', $locale); + } else { + if (is_numeric($month)) { + $found = $month; + } else if (is_array($month)) { + if (isset($month['month']) === true) { + $month = $month['month']; + } else { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("no month given in array"); + } + } else { + $monthlist = Zend_Locale_Data::getList($locale, 'month'); + $monthlist2 = Zend_Locale_Data::getList($locale, 'month', array('gregorian', 'format', 'abbreviated')); + + $monthlist = array_merge($monthlist, $monthlist2); + $found = 0; + $cnt = 0; + foreach ($monthlist as $key => $value) { + if (strtoupper($value) == strtoupper($month)) { + $found = ($key % 12) + 1; + break; + } + ++$cnt; + } + if ($found == 0) { + foreach ($monthlist2 as $key => $value) { + if (strtoupper(iconv_substr($value, 0, 1, 'UTF-8')) == strtoupper($month)) { + $found = $key + 1; + break; + } + ++$cnt; + } + } + if ($found == 0) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("unknown month name ($month)", 0, null, $month); + } + } + } + $return = $this->_calcdetail($calc, $found, self::MONTH_SHORT, $locale); + if ($calc != 'cmp') { + return $this; + } + return $return; + } + + + /** + * Sets a new month + * The month can be a number or a string. Setting months lower then 0 and greater then 12 + * will result in adding or subtracting the relevant year. (12 months equal one year) + * If a localized monthname is given it will be parsed with the default locale or the optional + * set locale. + * Returned is the new date object + * + * @param string|integer|array|Zend_Date $month Month to set + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function setMonth($month, $locale = null) + { + return $this->_month('set', $month, $locale); + } + + + /** + * Adds months to the existing date object. + * The month can be a number or a string. Adding months lower then 0 and greater then 12 + * will result in adding or subtracting the relevant year. (12 months equal one year) + * If a localized monthname is given it will be parsed with the default locale or the optional + * set locale. + * Returned is the new date object + * + * @param string|integer|array|Zend_Date $month Month to add + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function addMonth($month, $locale = null) + { + return $this->_month('add', $month, $locale); + } + + + /** + * Subtracts months from the existing date object. + * The month can be a number or a string. Subtracting months lower then 0 and greater then 12 + * will result in adding or subtracting the relevant year. (12 months equal one year) + * If a localized monthname is given it will be parsed with the default locale or the optional + * set locale. + * Returned is the new date object + * + * @param string|integer|array|Zend_Date $month Month to sub + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function subMonth($month, $locale = null) + { + return $this->_month('sub', $month, $locale); + } + + + /** + * Compares the month with the existing date object, ignoring other date parts. + * For example: 10.03.2000 -> 15.03.1950 -> true + * Returns if equal, earlier or later + * + * @param string|integer|array|Zend_Date $month Month to compare + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return integer 0 = equal, 1 = later, -1 = earlier + * @throws Zend_Date_Exception + */ + public function compareMonth($month, $locale = null) + { + return $this->_month('cmp', $month, $locale); + } + + + /** + * Returns the day as new date object + * Example: 20.May.1986 -> 20.Jan.1970 00:00:00 + * + * @param $locale string|Zend_Locale OPTIONAL Locale for parsing input + * @return Zend_Date + */ + public function getDay($locale = null) + { + return $this->copyPart(self::DAY_SHORT, $locale); + } + + + /** + * Returns the calculated day + * + * @param $calc string Type of calculation to make + * @param $day string|integer|Zend_Date Day to calculate, when null the actual day is calculated + * @param $locale string|Zend_Locale Locale for parsing input + * @return Zend_Date|integer + */ + private function _day($calc, $day, $locale) + { + if ($day === null) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception('parameter $day must be set, null is not allowed'); + } + + if ($locale === null) { + $locale = $this->getLocale(); + } + + if ($day instanceof Zend_Date) { + $day = $day->toString(self::DAY_SHORT, 'iso', $locale); + } + + if (is_numeric($day)) { + $type = self::DAY_SHORT; + } else if (is_array($day)) { + if (isset($day['day']) === true) { + $day = $day['day']; + $type = self::WEEKDAY; + } else { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("no day given in array"); + } + } else { + switch (iconv_strlen($day, 'UTF-8')) { + case 1 : + $type = self::WEEKDAY_NARROW; + break; + case 2: + $type = self::WEEKDAY_NAME; + break; + case 3: + $type = self::WEEKDAY_SHORT; + break; + default: + $type = self::WEEKDAY; + break; + } + } + $return = $this->_calcdetail($calc, $day, $type, $locale); + if ($calc != 'cmp') { + return $this; + } + return $return; + } + + + /** + * Sets a new day + * The day can be a number or a string. Setting days lower then 0 or greater than the number of this months days + * will result in adding or subtracting the relevant month. + * If a localized dayname is given it will be parsed with the default locale or the optional + * set locale. + * Returned is the new date object + * Example: setDay('Montag', 'de_AT'); will set the monday of this week as day. + * + * @param string|integer|array|Zend_Date $month Day to set + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function setDay($day, $locale = null) + { + return $this->_day('set', $day, $locale); + } + + + /** + * Adds days to the existing date object. + * The day can be a number or a string. Adding days lower then 0 or greater than the number of this months days + * will result in adding or subtracting the relevant month. + * If a localized dayname is given it will be parsed with the default locale or the optional + * set locale. + * + * @param string|integer|array|Zend_Date $month Day to add + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function addDay($day, $locale = null) + { + return $this->_day('add', $day, $locale); + } + + + /** + * Subtracts days from the existing date object. + * The day can be a number or a string. Subtracting days lower then 0 or greater than the number of this months days + * will result in adding or subtracting the relevant month. + * If a localized dayname is given it will be parsed with the default locale or the optional + * set locale. + * + * @param string|integer|array|Zend_Date $month Day to sub + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function subDay($day, $locale = null) + { + return $this->_day('sub', $day, $locale); + } + + + /** + * Compares the day with the existing date object, ignoring other date parts. + * For example: 'Monday', 'en' -> 08.Jan.2007 -> 0 + * Returns if equal, earlier or later + * + * @param string|integer|array|Zend_Date $day Day to compare + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return integer 0 = equal, 1 = later, -1 = earlier + * @throws Zend_Date_Exception + */ + public function compareDay($day, $locale = null) + { + return $this->_day('cmp', $day, $locale); + } + + + /** + * Returns the weekday as new date object + * Weekday is always from 1-7 + * Example: 09-Jan-2007 -> 2 = Tuesday -> 02-Jan-1970 (when 02.01.1970 is also Tuesday) + * + * @param $locale string|Zend_Locale OPTIONAL Locale for parsing input + * @return Zend_Date + */ + public function getWeekday($locale = null) + { + if (self::$_options['format_type'] == 'php') { + $format = 'l'; + } else { + $format = self::WEEKDAY; + } + + return $this->copyPart($format, $locale); + } + + + /** + * Returns the calculated weekday + * + * @param $calc string Type of calculation to make + * @param $weekday string|integer|array|Zend_Date Weekday to calculate, when null the actual weekday is calculated + * @param $locale string|Zend_Locale Locale for parsing input + * @return Zend_Date|integer + * @throws Zend_Date_Exception + */ + private function _weekday($calc, $weekday, $locale) + { + if ($weekday === null) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception('parameter $weekday must be set, null is not allowed'); + } + + if ($locale === null) { + $locale = $this->getLocale(); + } + + if ($weekday instanceof Zend_Date) { + $weekday = $weekday->toString(self::WEEKDAY_8601, 'iso', $locale); + } + + if (is_numeric($weekday)) { + $type = self::WEEKDAY_8601; + } else if (is_array($weekday)) { + if (isset($weekday['weekday']) === true) { + $weekday = $weekday['weekday']; + $type = self::WEEKDAY; + } else { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("no weekday given in array"); + } + } else { + switch(iconv_strlen($weekday, 'UTF-8')) { + case 1: + $type = self::WEEKDAY_NARROW; + break; + case 2: + $type = self::WEEKDAY_NAME; + break; + case 3: + $type = self::WEEKDAY_SHORT; + break; + default: + $type = self::WEEKDAY; + break; + } + } + $return = $this->_calcdetail($calc, $weekday, $type, $locale); + if ($calc != 'cmp') { + return $this; + } + return $return; + } + + + /** + * Sets a new weekday + * The weekday can be a number or a string. If a localized weekday name is given, + * then it will be parsed as a date in $locale (defaults to the same locale as $this). + * Returned is the new date object. + * Example: setWeekday(3); will set the wednesday of this week as day. + * + * @param string|integer|array|Zend_Date $month Weekday to set + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function setWeekday($weekday, $locale = null) + { + return $this->_weekday('set', $weekday, $locale); + } + + + /** + * Adds weekdays to the existing date object. + * The weekday can be a number or a string. + * If a localized dayname is given it will be parsed with the default locale or the optional + * set locale. + * Returned is the new date object + * Example: addWeekday(3); will add the difference of days from the begining of the month until + * wednesday. + * + * @param string|integer|array|Zend_Date $month Weekday to add + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function addWeekday($weekday, $locale = null) + { + return $this->_weekday('add', $weekday, $locale); + } + + + /** + * Subtracts weekdays from the existing date object. + * The weekday can be a number or a string. + * If a localized dayname is given it will be parsed with the default locale or the optional + * set locale. + * Returned is the new date object + * Example: subWeekday(3); will subtract the difference of days from the begining of the month until + * wednesday. + * + * @param string|integer|array|Zend_Date $month Weekday to sub + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function subWeekday($weekday, $locale = null) + { + return $this->_weekday('sub', $weekday, $locale); + } + + + /** + * Compares the weekday with the existing date object, ignoring other date parts. + * For example: 'Monday', 'en' -> 08.Jan.2007 -> 0 + * Returns if equal, earlier or later + * + * @param string|integer|array|Zend_Date $weekday Weekday to compare + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return integer 0 = equal, 1 = later, -1 = earlier + * @throws Zend_Date_Exception + */ + public function compareWeekday($weekday, $locale = null) + { + return $this->_weekday('cmp', $weekday, $locale); + } + + + /** + * Returns the day of year as new date object + * Example: 02.Feb.1986 10:00:00 -> 02.Feb.1970 00:00:00 + * + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date + */ + public function getDayOfYear($locale = null) + { + if (self::$_options['format_type'] == 'php') { + $format = 'D'; + } else { + $format = self::DAY_OF_YEAR; + } + + return $this->copyPart($format, $locale); + } + + + /** + * Sets a new day of year + * The day of year is always a number. + * Returned is the new date object + * Example: 04.May.2004 -> setDayOfYear(10) -> 10.Jan.2004 + * + * @param string|integer|array|Zend_Date $day Day of Year to set + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function setDayOfYear($day, $locale = null) + { + return $this->_calcvalue('set', $day, 'day of year', self::DAY_OF_YEAR, $locale); + } + + + /** + * Adds a day of year to the existing date object. + * The day of year is always a number. + * Returned is the new date object + * Example: addDayOfYear(10); will add 10 days to the existing date object. + * + * @param string|integer|array|Zend_Date $day Day of Year to add + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function addDayOfYear($day, $locale = null) + { + return $this->_calcvalue('add', $day, 'day of year', self::DAY_OF_YEAR, $locale); + } + + + /** + * Subtracts a day of year from the existing date object. + * The day of year is always a number. + * Returned is the new date object + * Example: subDayOfYear(10); will subtract 10 days from the existing date object. + * + * @param string|integer|array|Zend_Date $day Day of Year to sub + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function subDayOfYear($day, $locale = null) + { + return $this->_calcvalue('sub', $day, 'day of year', self::DAY_OF_YEAR, $locale); + } + + + /** + * Compares the day of year with the existing date object. + * For example: compareDayOfYear(33) -> 02.Feb.2007 -> 0 + * Returns if equal, earlier or later + * + * @param string|integer|array|Zend_Date $day Day of Year to compare + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return integer 0 = equal, 1 = later, -1 = earlier + * @throws Zend_Date_Exception + */ + public function compareDayOfYear($day, $locale = null) + { + return $this->_calcvalue('cmp', $day, 'day of year', self::DAY_OF_YEAR, $locale); + } + + + /** + * Returns the hour as new date object + * Example: 02.Feb.1986 10:30:25 -> 01.Jan.1970 10:00:00 + * + * @param $locale string|Zend_Locale OPTIONAL Locale for parsing input + * @return Zend_Date + */ + public function getHour($locale = null) + { + return $this->copyPart(self::HOUR, $locale); + } + + + /** + * Sets a new hour + * The hour is always a number. + * Returned is the new date object + * Example: 04.May.1993 13:07:25 -> setHour(7); -> 04.May.1993 07:07:25 + * + * @param string|integer|array|Zend_Date $hour Hour to set + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function setHour($hour, $locale = null) + { + return $this->_calcvalue('set', $hour, 'hour', self::HOUR_SHORT, $locale); + } + + + /** + * Adds hours to the existing date object. + * The hour is always a number. + * Returned is the new date object + * Example: 04.May.1993 13:07:25 -> addHour(12); -> 05.May.1993 01:07:25 + * + * @param string|integer|array|Zend_Date $hour Hour to add + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function addHour($hour, $locale = null) + { + return $this->_calcvalue('add', $hour, 'hour', self::HOUR_SHORT, $locale); + } + + + /** + * Subtracts hours from the existing date object. + * The hour is always a number. + * Returned is the new date object + * Example: 04.May.1993 13:07:25 -> subHour(6); -> 05.May.1993 07:07:25 + * + * @param string|integer|array|Zend_Date $hour Hour to sub + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function subHour($hour, $locale = null) + { + return $this->_calcvalue('sub', $hour, 'hour', self::HOUR_SHORT, $locale); + } + + + /** + * Compares the hour with the existing date object. + * For example: 10:30:25 -> compareHour(10) -> 0 + * Returns if equal, earlier or later + * + * @param string|integer|array|Zend_Date $hour Hour to compare + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return integer 0 = equal, 1 = later, -1 = earlier + * @throws Zend_Date_Exception + */ + public function compareHour($hour, $locale = null) + { + return $this->_calcvalue('cmp', $hour, 'hour', self::HOUR_SHORT, $locale); + } + + + /** + * Returns the minute as new date object + * Example: 02.Feb.1986 10:30:25 -> 01.Jan.1970 00:30:00 + * + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date + */ + public function getMinute($locale = null) + { + if (self::$_options['format_type'] == 'php') { + $format = 'i'; + } else { + $format = self::MINUTE; + } + + return $this->copyPart($format, $locale); + } + + + /** + * Sets a new minute + * The minute is always a number. + * Returned is the new date object + * Example: 04.May.1993 13:07:25 -> setMinute(29); -> 04.May.1993 13:29:25 + * + * @param string|integer|array|Zend_Date $minute Minute to set + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function setMinute($minute, $locale = null) + { + return $this->_calcvalue('set', $minute, 'minute', self::MINUTE_SHORT, $locale); + } + + + /** + * Adds minutes to the existing date object. + * The minute is always a number. + * Returned is the new date object + * Example: 04.May.1993 13:07:25 -> addMinute(65); -> 04.May.1993 13:12:25 + * + * @param string|integer|array|Zend_Date $minute Minute to add + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function addMinute($minute, $locale = null) + { + return $this->_calcvalue('add', $minute, 'minute', self::MINUTE_SHORT, $locale); + } + + + /** + * Subtracts minutes from the existing date object. + * The minute is always a number. + * Returned is the new date object + * Example: 04.May.1993 13:07:25 -> subMinute(9); -> 04.May.1993 12:58:25 + * + * @param string|integer|array|Zend_Date $minute Minute to sub + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function subMinute($minute, $locale = null) + { + return $this->_calcvalue('sub', $minute, 'minute', self::MINUTE_SHORT, $locale); + } + + + /** + * Compares the minute with the existing date object. + * For example: 10:30:25 -> compareMinute(30) -> 0 + * Returns if equal, earlier or later + * + * @param string|integer|array|Zend_Date $minute Hour to compare + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return integer 0 = equal, 1 = later, -1 = earlier + * @throws Zend_Date_Exception + */ + public function compareMinute($minute, $locale = null) + { + return $this->_calcvalue('cmp', $minute, 'minute', self::MINUTE_SHORT, $locale); + } + + + /** + * Returns the second as new date object + * Example: 02.Feb.1986 10:30:25 -> 01.Jan.1970 00:00:25 + * + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date + */ + public function getSecond($locale = null) + { + if (self::$_options['format_type'] == 'php') { + $format = 's'; + } else { + $format = self::SECOND; + } + + return $this->copyPart($format, $locale); + } + + + /** + * Sets new seconds to the existing date object. + * The second is always a number. + * Returned is the new date object + * Example: 04.May.1993 13:07:25 -> setSecond(100); -> 04.May.1993 13:08:40 + * + * @param string|integer|array|Zend_Date $second Second to set + * @param string|Zend_Locale $locale (Optional) Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function setSecond($second, $locale = null) + { + return $this->_calcvalue('set', $second, 'second', self::SECOND_SHORT, $locale); + } + + + /** + * Adds seconds to the existing date object. + * The second is always a number. + * Returned is the new date object + * Example: 04.May.1993 13:07:25 -> addSecond(65); -> 04.May.1993 13:08:30 + * + * @param string|integer|array|Zend_Date $second Second to add + * @param string|Zend_Locale $locale (Optional) Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function addSecond($second, $locale = null) + { + return $this->_calcvalue('add', $second, 'second', self::SECOND_SHORT, $locale); + } + + + /** + * Subtracts seconds from the existing date object. + * The second is always a number. + * Returned is the new date object + * Example: 04.May.1993 13:07:25 -> subSecond(10); -> 04.May.1993 13:07:15 + * + * @param string|integer|array|Zend_Date $second Second to sub + * @param string|Zend_Locale $locale (Optional) Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function subSecond($second, $locale = null) + { + return $this->_calcvalue('sub', $second, 'second', self::SECOND_SHORT, $locale); + } + + + /** + * Compares the second with the existing date object. + * For example: 10:30:25 -> compareSecond(25) -> 0 + * Returns if equal, earlier or later + * + * @param string|integer|array|Zend_Date $second Second to compare + * @param string|Zend_Locale $locale (Optional) Locale for parsing input + * @return integer 0 = equal, 1 = later, -1 = earlier + * @throws Zend_Date_Exception + */ + public function compareSecond($second, $locale = null) + { + return $this->_calcvalue('cmp', $second, 'second', self::SECOND_SHORT, $locale); + } + + + /** + * Returns the precision for fractional seconds + * + * @return integer + */ + public function getFractionalPrecision() + { + return $this->_precision; + } + + + /** + * Sets a new precision for fractional seconds + * + * @param integer $precision Precision for the fractional datepart 3 = milliseconds + * @throws Zend_Date_Exception + * @return Zend_Date Provides fluid interface + */ + public function setFractionalPrecision($precision) + { + if (!intval($precision) or ($precision < 0) or ($precision > 9)) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("precision ($precision) must be a positive integer less than 10", 0, null, $precision); + } + + $this->_precision = (int) $precision; + if ($this->_precision < strlen($this->_fractional)) { + $this->_fractional = substr($this->_fractional, 0, $this->_precision); + } else { + $this->_fractional = str_pad($this->_fractional, $this->_precision, '0', STR_PAD_RIGHT); + } + + return $this; + } + + + /** + * Returns the milliseconds of the date object + * + * @return string + */ + public function getMilliSecond() + { + return $this->_fractional; + } + + + /** + * Sets new milliseconds for the date object + * Example: setMilliSecond(550, 2) -> equals +5 Sec +50 MilliSec + * + * @param integer|Zend_Date $milli (Optional) Millisecond to set, when null the actual millisecond is set + * @param integer $precision (Optional) Fraction precision of the given milliseconds + * @return Zend_Date Provides fluid interface + */ + public function setMilliSecond($milli = null, $precision = null) + { + if ($milli === null) { + list($milli, $time) = explode(" ", microtime()); + $milli = intval($milli); + $precision = 6; + } else if (!is_numeric($milli)) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid milli second ($milli) operand", 0, null, $milli); + } + + if ($precision === null) { + $precision = $this->_precision; + } + + if (!is_int($precision) || $precision < 1 || $precision > 9) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("precision ($precision) must be a positive integer less than 10", 0, null, $precision); + } + + $this->_fractional = 0; + $this->addMilliSecond($milli, $precision); + return $this; + } + + + /** + * Adds milliseconds to the date object + * + * @param integer|Zend_Date $milli (Optional) Millisecond to add, when null the actual millisecond is added + * @param integer $precision (Optional) Fractional precision for the given milliseconds + * @return Zend_Date Provides fluid interface + */ + public function addMilliSecond($milli = null, $precision = null) + { + if ($milli === null) { + list($milli, $time) = explode(" ", microtime()); + $milli = intval($milli); + } else if (!is_numeric($milli)) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid milli second ($milli) operand", 0, null, $milli); + } + + if ($precision === null) { + $precision = strlen($milli); + if ($milli < 0) { + --$precision; + } + } + + if (!is_int($precision) || $precision < 1 || $precision > 9) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("precision ($precision) must be a positive integer less than 10", 0, null, $precision); + } + + $this->_fractional += $milli; + + // Add/sub milliseconds + add/sub seconds + $max = pow(10, $this->_precision); + // Milli includes seconds + if ($this->_fractional >= $max) { + while ($this->_fractional >= $max) { + $this->addSecond(1); + $this->_fractional -= $max; + } + } + + if ($this->_fractional < 0) { + while ($this->_fractional < 0) { + $this->subSecond(1); + $this->_fractional += $max; + } + } + + if ($this->_precision > strlen($this->_fractional)) { + $this->_fractional = str_pad($this->_fractional, $this->_precision, '0', STR_PAD_LEFT); + } + + return $this; + } + + + /** + * Subtracts a millisecond + * + * @param integer|Zend_Date $milli (Optional) Millisecond to sub, when null the actual millisecond is subtracted + * @param integer $precision (Optional) Fractional precision for the given milliseconds + * @return Zend_Date Provides fluid interface + */ + public function subMilliSecond($milli = null, $precision = null) + { + $this->addMilliSecond(0 - $milli, $precision); + return $this; + } + + /** + * Compares only the millisecond part, returning the difference + * + * @param integer|Zend_Date $milli OPTIONAL Millisecond to compare, when null the actual millisecond is compared + * @param integer $precision OPTIONAL Fractional precision for the given milliseconds + * @throws Zend_Date_Exception On invalid input + * @return integer 0 = equal, 1 = later, -1 = earlier + */ + public function compareMilliSecond($milli = null, $precision = null) + { + if ($milli === null) { + list($milli, $time) = explode(" ", microtime()); + $milli = intval($milli); + } else if (is_numeric($milli) === false) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("invalid milli second ($milli) operand", 0, null, $milli); + } + + if ($precision === null) { + $precision = strlen($milli); + } else if (!is_int($precision) || $precision < 1 || $precision > 9) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception("precision ($precision) must be a positive integer less than 10", 0, null, $precision); + } + + if ($precision === 0) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception('precision is 0'); + } + + if ($precision != $this->_precision) { + if ($precision > $this->_precision) { + $diff = $precision - $this->_precision; + $milli = (int) ($milli / (10 * $diff)); + } else { + $diff = $this->_precision - $precision; + $milli = (int) ($milli * (10 * $diff)); + } + } + + $comp = $this->_fractional - $milli; + if ($comp < 0) { + return -1; + } else if ($comp > 0) { + return 1; + } + return 0; + } + + /** + * Returns the week as new date object using monday as begining of the week + * Example: 12.Jan.2007 -> 08.Jan.1970 00:00:00 + * + * @param $locale string|Zend_Locale OPTIONAL Locale for parsing input + * @return Zend_Date + */ + public function getWeek($locale = null) + { + if (self::$_options['format_type'] == 'php') { + $format = 'W'; + } else { + $format = self::WEEK; + } + + return $this->copyPart($format, $locale); + } + + /** + * Sets a new week. The week is always a number. The day of week is not changed. + * Returned is the new date object + * Example: 09.Jan.2007 13:07:25 -> setWeek(1); -> 02.Jan.2007 13:07:25 + * + * @param string|integer|array|Zend_Date $week Week to set + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function setWeek($week, $locale = null) + { + return $this->_calcvalue('set', $week, 'week', self::WEEK, $locale); + } + + /** + * Adds a week. The week is always a number. The day of week is not changed. + * Returned is the new date object + * Example: 09.Jan.2007 13:07:25 -> addWeek(1); -> 16.Jan.2007 13:07:25 + * + * @param string|integer|array|Zend_Date $week Week to add + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function addWeek($week, $locale = null) + { + return $this->_calcvalue('add', $week, 'week', self::WEEK, $locale); + } + + /** + * Subtracts a week. The week is always a number. The day of week is not changed. + * Returned is the new date object + * Example: 09.Jan.2007 13:07:25 -> subWeek(1); -> 02.Jan.2007 13:07:25 + * + * @param string|integer|array|Zend_Date $week Week to sub + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return Zend_Date Provides fluid interface + * @throws Zend_Date_Exception + */ + public function subWeek($week, $locale = null) + { + return $this->_calcvalue('sub', $week, 'week', self::WEEK, $locale); + } + + /** + * Compares only the week part, returning the difference + * Returned is the new date object + * Returns if equal, earlier or later + * Example: 09.Jan.2007 13:07:25 -> compareWeek(2); -> 0 + * + * @param string|integer|array|Zend_Date $week Week to compare + * @param string|Zend_Locale $locale OPTIONAL Locale for parsing input + * @return integer 0 = equal, 1 = later, -1 = earlier + */ + public function compareWeek($week, $locale = null) + { + return $this->_calcvalue('cmp', $week, 'week', self::WEEK, $locale); + } + + /** + * Sets a new standard locale for the date object. + * This locale will be used for all functions + * Returned is the really set locale. + * Example: 'de_XX' will be set to 'de' because 'de_XX' does not exist + * 'xx_YY' will be set to 'root' because 'xx' does not exist + * + * @param string|Zend_Locale $locale (Optional) Locale for parsing input + * @throws Zend_Date_Exception When the given locale does not exist + * @return Zend_Date Provides fluent interface + */ + public function setLocale($locale = null) + { + try { + $this->_locale = Zend_Locale::findLocale($locale); + } catch (Zend_Locale_Exception $e) { + #require_once 'Zend/Date/Exception.php'; + throw new Zend_Date_Exception($e->getMessage(), 0, $e); + } + + return $this; + } + + /** + * Returns the actual set locale + * + * @return string + */ + public function getLocale() + { + return $this->_locale; + } + + /** + * Checks if the given date is a real date or datepart. + * Returns false if a expected datepart is missing or a datepart exceeds its possible border. + * But the check will only be done for the expected dateparts which are given by format. + * If no format is given the standard dateformat for the actual locale is used. + * f.e. 30.February.2007 will return false if format is 'dd.MMMM.YYYY' + * + * @param string|array|Zend_Date $date Date to parse for correctness + * @param string $format (Optional) Format for parsing the date string + * @param string|Zend_Locale $locale (Optional) Locale for parsing date parts + * @return boolean True when all date parts are correct + */ + public static function isDate($date, $format = null, $locale = null) + { + if (!is_string($date) && !is_numeric($date) && !($date instanceof Zend_Date) && + !is_array($date)) { + return false; + } + + if (($format !== null) && ($format != 'ee') && ($format != 'ss') && ($format != 'GG') && ($format != 'MM') && ($format != 'EE') && ($format != 'TT') + && (Zend_Locale::isLocale($format, null, false))) { + $locale = $format; + $format = null; + } + + $locale = Zend_Locale::findLocale($locale); + + if ($format === null) { + $format = Zend_Locale_Format::getDateFormat($locale); + } else if ((self::$_options['format_type'] == 'php') && !defined($format)) { + $format = Zend_Locale_Format::convertPhpToIsoFormat($format); + } + + $format = self::_getLocalizedToken($format, $locale); + if (!is_array($date)) { + try { + $parsed = Zend_Locale_Format::getDate($date, array('locale' => $locale, + 'date_format' => $format, 'format_type' => 'iso', + 'fix_date' => false)); + } catch (Zend_Locale_Exception $e) { + // Date can not be parsed + return false; + } + } else { + $parsed = $date; + } + + if (((strpos($format, 'Y') !== false) or (strpos($format, 'y') !== false)) and + (!isset($parsed['year']))) { + // Year expected but not found + return false; + } + + if ((strpos($format, 'M') !== false) and (!isset($parsed['month']))) { + // Month expected but not found + return false; + } + + if ((strpos($format, 'd') !== false) and (!isset($parsed['day']))) { + // Day expected but not found + return false; + } + + if (((strpos($format, 'H') !== false) or (strpos($format, 'h') !== false)) and + (!isset($parsed['hour']))) { + // Hour expected but not found + return false; + } + + if ((strpos($format, 'm') !== false) and (!isset($parsed['minute']))) { + // Minute expected but not found + return false; + } + + if ((strpos($format, 's') !== false) and (!isset($parsed['second']))) { + // Second expected but not found + return false; + } + + // Set not given dateparts + if (isset($parsed['hour']) === false) { + $parsed['hour'] = 12; + } + + if (isset($parsed['minute']) === false) { + $parsed['minute'] = 0; + } + + if (isset($parsed['second']) === false) { + $parsed['second'] = 0; + } + + if (isset($parsed['month']) === false) { + $parsed['month'] = 1; + } + + if (isset($parsed['day']) === false) { + $parsed['day'] = 1; + } + + if (isset($parsed['year']) === false) { + $parsed['year'] = 1970; + } + + if (self::isYearLeapYear($parsed['year'])) { + $parsed['year'] = 1972; + } else { + $parsed['year'] = 1971; + } + + $date = new self($parsed, null, $locale); + $timestamp = $date->mktime($parsed['hour'], $parsed['minute'], $parsed['second'], + $parsed['month'], $parsed['day'], $parsed['year']); + + if ($parsed['year'] != $date->date('Y', $timestamp)) { + // Given year differs from parsed year + return false; + } + + if ($parsed['month'] != $date->date('n', $timestamp)) { + // Given month differs from parsed month + return false; + } + + if ($parsed['day'] != $date->date('j', $timestamp)) { + // Given day differs from parsed day + return false; + } + + if ($parsed['hour'] != $date->date('G', $timestamp)) { + // Given hour differs from parsed hour + return false; + } + + if ($parsed['minute'] != $date->date('i', $timestamp)) { + // Given minute differs from parsed minute + return false; + } + + if ($parsed['second'] != $date->date('s', $timestamp)) { + // Given second differs from parsed second + return false; + } + + return true; + } + + /** + * Returns the ISO Token for all localized constants + * + * @param string $token Token to normalize + * @param string $locale Locale to search + * @return string + */ + protected static function _getLocalizedToken($token, $locale) + { + switch($token) { + case self::ISO_8601 : + return "yyyy-MM-ddThh:mm:ss"; + break; + case self::RFC_2822 : + return "EEE, dd MMM yyyy HH:mm:ss"; + break; + case self::DATES : + return Zend_Locale_Data::getContent($locale, 'date'); + break; + case self::DATE_FULL : + return Zend_Locale_Data::getContent($locale, 'date', array('gregorian', 'full')); + break; + case self::DATE_LONG : + return Zend_Locale_Data::getContent($locale, 'date', array('gregorian', 'long')); + break; + case self::DATE_MEDIUM : + return Zend_Locale_Data::getContent($locale, 'date', array('gregorian', 'medium')); + break; + case self::DATE_SHORT : + return Zend_Locale_Data::getContent($locale, 'date', array('gregorian', 'short')); + break; + case self::TIMES : + return Zend_Locale_Data::getContent($locale, 'time'); + break; + case self::TIME_FULL : + return Zend_Locale_Data::getContent($locale, 'time', array('gregorian', 'full')); + break; + case self::TIME_LONG : + return Zend_Locale_Data::getContent($locale, 'time', array('gregorian', 'long')); + break; + case self::TIME_MEDIUM : + return Zend_Locale_Data::getContent($locale, 'time', array('gregorian', 'medium')); + break; + case self::TIME_SHORT : + return Zend_Locale_Data::getContent($locale, 'time', array('gregorian', 'short')); + break; + case self::DATETIME : + return Zend_Locale_Data::getContent($locale, 'datetime'); + break; + case self::DATETIME_FULL : + return Zend_Locale_Data::getContent($locale, 'datetime', array('gregorian', 'full')); + break; + case self::DATETIME_LONG : + return Zend_Locale_Data::getContent($locale, 'datetime', array('gregorian', 'long')); + break; + case self::DATETIME_MEDIUM : + return Zend_Locale_Data::getContent($locale, 'datetime', array('gregorian', 'medium')); + break; + case self::DATETIME_SHORT : + return Zend_Locale_Data::getContent($locale, 'datetime', array('gregorian', 'short')); + break; + case self::ATOM : + case self::RFC_3339 : + case self::W3C : + return "yyyy-MM-DD HH:mm:ss"; + break; + case self::COOKIE : + case self::RFC_850 : + return "EEEE, dd-MM-yyyy HH:mm:ss"; + break; + case self::RFC_822 : + case self::RFC_1036 : + case self::RFC_1123 : + case self::RSS : + return "EEE, dd MM yyyy HH:mm:ss"; + break; + } + + return $token; + } + + /** + * Get unix timestamp. + * Added limitation: $year value must be between -10 000 and 10 000 + * Parent method implementation causes 504 error if it gets too big(small) year value + * + * @see Zend_Date_DateObject::mktime + * @throws Zend_Date_Exception + * @param $hour + * @param $minute + * @param $second + * @param $month + * @param $day + * @param $year + * @param bool $gmt + * @return float|int + */ + protected function mktime($hour, $minute, $second, $month, $day, $year, $gmt = false) + { + $day = intval($day); + $month = intval($month); + $year = intval($year); + + // correct months > 12 and months < 1 + if ($month > 12) { + $overlap = floor($month / 12); + $year += $overlap; + $month -= $overlap * 12; + } else { + $overlap = ceil((1 - $month) / 12); + $year -= $overlap; + $month += $overlap * 12; + } + + if ($year > self::YEAR_MAX_VALUE || $year < self::YEAR_MIN_VALUE) { + throw new Zend_Date_Exception('Invalid year, it must be between ' . self::YEAR_MIN_VALUE . ' and ' + . self::YEAR_MAX_VALUE); + } + + return parent::mktime($hour, $minute, $second, $month, $day, $year, $gmt); + } +} diff --git a/app/design/adminhtml/default/default/local.xml b/app/design/adminhtml/default/default/local.xml index 91889db13506f..9a8889f9f5e87 100644 --- a/app/design/adminhtml/default/default/local.xml +++ b/app/design/adminhtml/default/default/local.xml @@ -21,7 +21,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/adminhtml/default/default/skin/default/below_ie7.css b/app/design/adminhtml/default/default/skin/default/below_ie7.css index 1ce5d15b22f1e..537a1cf8fc562 100644 --- a/app/design/adminhtml/default/default/skin/default/below_ie7.css +++ b/app/design/adminhtml/default/default/skin/default/below_ie7.css @@ -17,7 +17,7 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /* Set min-width */ diff --git a/app/design/adminhtml/default/default/skin/default/boxes.css b/app/design/adminhtml/default/default/skin/default/boxes.css index 681cb8f2631f2..dbaac45d1bbc2 100644 --- a/app/design/adminhtml/default/default/skin/default/boxes.css +++ b/app/design/adminhtml/default/default/skin/default/boxes.css @@ -17,7 +17,7 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -90,9 +90,9 @@ position:fixed; top:45%; left:50%; - width:120px; - margin-left:-60px; - padding:15px 60px; + width:150px; + margin-left:-105px; + padding:15px 30px; background:#fff4e9; border:2px solid #f1af73; color:#d85909; @@ -134,6 +134,9 @@ .grid th { white-space:nowrap; } .grid td.editable input.input-text { width:50px !important; margin-left:4px !important; } .grid td input.input-text { width:86%; } +.grid td input.input-text-export-filter { width:272px; } +.grid td input.input-text-range { width:104px; } +.grid td input.input-text-range-date { width:87px; } .grid td input.input-inactive { background:#eee; } .grid table td { border-width:0 1px 1px 0; border-color:#dadfe0; border-style:solid; } .grid table.border td { background:#fff !important; } @@ -205,7 +208,9 @@ table.actions td { vertical-align:top; } .grid tr.filter .range select { float:right; width:56px !important; margin-top:0; } .grid tr.filter .range .label { display:block; width:36px; float:left; padding-left:2px; } .grid tr.filter .date img { width:15px; height:15px; cursor:pointer; vertical-align:middle; } -.grid .head-massaction select { width:50px !important; } +.grid .head-massaction select { width:auto !important; max-width:90px; } +.grid select.select-export-filter, +.grid select.multiselect-export-filter { width:278px; } /* Grid Footer */ .grid table tfoot tr { background:#D7E5EF; } @@ -270,7 +275,7 @@ ul.tabs a.changed { font-style:italic; } ul.tabs-horiz { margin:0 0 18px 0; background:url(images/horiz_tabs_ul_bg.gif) repeat-x 0 100% #f8f8f8; padding:8px 0 0 5px; } ul.tabs-horiz li { float:left; margin:0 4px; } ul.tabs-horiz li a { display:block; background:#e2e2e2; border:1px solid #ccc; padding:2px 10px; color:#333 !important; text-decoration:none !important; } -ul.tabs-horiz li a.notloaded { color:#999 !important; } +ul.tabs-horiz li a.notloaded { /* not used for now */ } ul.tabs-horiz li a.active { border-bottom:1px solid #fff; background:#fff; } @@ -335,6 +340,7 @@ table.form-edit { width:100%; } label.inline { float:none !important; width:auto !important; } .nested-content .entry-edit { margin-left:2em; } .nested-content .entry-edit .entry-edit { margin-left:0; } +#coupon_container .entry-edit { min-width:310px; } /* Form Elements */ input.input-text,textarea,select { border-width:1px; border-style:solid; border-color:#aaa #c8c8c8 #c8c8c8 #aaa; background:#fff; font:12px arial, helvetica, sans-serif; } @@ -352,7 +358,10 @@ select.multiselect option { padding:3px 4px; border-bottom:1px solid #ddd; .field-100 { background-color:#fff; border-width:1px; border-style:solid; border-color:#aaa #c8c8c8 #c8c8c8 #aaa; padding:2px; } .field-100 textarea, .field-100 input.input-text { float:left; width:100% !important; border:0 !important; padding:0 !important; } - +@media screen and (-webkit-min-device-pixel-ratio:0) { + select option:disabled, + select:disabled option { color:#c9c9c9!important;color:#cacaca!important; text-shadow:2px 2px 2px #000; } +} /* Form List */ /* Table for default form data */ .form-list { width:auto; border:0 !important; } @@ -369,6 +378,7 @@ select.multiselect option { padding:3px 4px; border-bottom:1px solid #ddd; .form-list td.value textarea { width:274px; } .form-list td.value textarea { height:15em; } .form-list td.value select { width:280px; } +.form-list td.value select.select-date { width:87px; } .form-list td.note { background:url(images/note_cell_bg.gif) 6px 10px no-repeat !important; padding-left:18px; } .form-list td.scope-label { padding-left:5px; color:#6f8992; font-size:.9em; } .form-list p.note { margin:0; padding:0 0 0 13px; background:url(images/note_bg.gif) 1px 6px no-repeat; font-size:11px; } @@ -403,7 +413,7 @@ span.delete-file { padding:0; } /* Form Button */ .content-buttons.form-buttons, -.content-header .form-buttons { text-align:right; margin-bottom:0; white-space:nowrap; } +.content-header .form-buttons { text-align:right; margin-bottom:0; } .content-header .content-buttons-placeholder { display:inline !important; } .content-header .form-buttons { float:right; } .content-header td.form-buttons { float:none; } @@ -414,6 +424,7 @@ button, button:hover { background:#f77c16 url(images/btn_over_bg.gif) repeat-x 0 0; } button:active { background:#f77c16 url(images/btn_on_bg.gif) repeat-x 0 0; } button span { line-height:1.35em; background-repeat:no-repeat; background-position:0 50%; } +button span span { background:none !important; padding:0 !important; margin:0 !important; display:inline !important; } button.delete, button.save, button.add { padding-left:6px; } @@ -424,12 +435,18 @@ button.add span, button.back span, button.add-image span, button.add-widget span { padding-left:20px; } +/* Google Chrome specific fix for empty buttons */ +button.add span:after, +button.delete span:after { display:inline-block; clear:both; content:"."; font-size:0; line-height:0; height:0; overflow:hidden; } button.back { border-color:#ccc #aaa #aaa #ccc; background-color:#fff; background-image:url(images/btn_back_bg.gif); color:#555; } button.back span { background-image:url(images/icon_btn_back.gif); } +button.fail, button.cancel, button.delete { border-color:#d24403 #a92000 #a92000 #d24403; background-image:url(images/cancel_btn_bg.gif); background-color:#fcaf81; color:#fff; } +button.fail:hover, button.cancel:hover, button.delete:hover { background-image:url(images/cancel_btn_over_bg.gif); } +button.fail:active, button.cancel:active, button.delete:active { background-image:url(images/cancel_btn_active_bg.gif); background-color:#e0612f; } button.cancel span, @@ -442,6 +459,9 @@ button.add-widget span { background-image:url(images/btn_add-widget_icon2.gif); button.add-variable span { background-image:url(images/btn_add-variable_icon.gif); padding-left:26px; } button.go span { background-image:url(images/btn_go.gif); padding-left:16px; } button.btn-chooser { display:block; margin:0 0 10px; } +button.success { background-image:url(images/btn_gr_bg.gif); border-color:#46745E; } +button.success:hover { background:url(images/btn_gr_over.gif) #6cac46; } +button.success:active { background:url(images/btn_gr_on.gif) repeat-x 0 0 #3fa05e; } button.disabled, button.disabled:hover, @@ -461,6 +481,7 @@ button.icon-btn span { text-indent:-999em; display:block; width:16px; padding:0; .side-col .switcher select { width:100%; } /*.side-col .switcher { margin-right:20px; margin-bottom:20px; }*/ .catalog-categories .side-col .switcher { margin-right:0; margin-bottom:15px; } +.link-storeScope { display:inline-block; vertical-align:middle; margin:0 0 1px; width:16px; height:16px; background:url(images/i_question-mark.png) 0 0 no-repeat; text-decoration:none !important; text-indent:-999em; overflow:hidden; } /* SPACE @@ -693,7 +714,24 @@ div.autocomplete ul li { padding:.5em .7em; min-height:32px; cursor:pointer; tex .login-container .legal { margin:0; background:url(images/login_box_legal_bg.gif) no-repeat; padding:8px 8px 5px 8px; font-size:.95em; } .login-form .validation-advice { margin:3px 0 0 0; } .login-form .forgot-link { margin:0 17px 0 0; text-align:right; } - +.login-form .captcha { padding:10px 0 0; } +.login-form .captcha-image { border:1px solid #aaa; margin:1.5em 0 0; position:relative; } +.login-form .captcha-image img { vertical-align:bottom; } +.login-form .captcha-reload { cursor:pointer; position: absolute; top:2px; right:2px; } +.login-form .captcha-reload.refreshing { animation:rotate 1.5s infinite linear; -webkit-animation:rotate 1.5s infinite linear; -moz-animation:rotate 1.5s infinite linear; } + +@-webkit-keyframes rotate { + 0% { -webkit-transform:rotate(0); } + 0% { -webkit-transform:rotate(360deg); } +} +@-moz-keyframes rotate { + 0% { -moz-transform:rotate(0); } + 0% { -moz-transform:rotate(360deg); } +} +@keyframes rotate { + 0% { transform:rotate(0); } + 0% { transform:rotate(360deg); } +} /* DASHBOARD @@ -758,9 +796,10 @@ ul.item-options li { padding-left:.7em; } .entry-edit .order-address td.label label { width:100px; } .entry-edit .order-address input.input-text, -.entry-edit .order-address .textarea { width:95% !important; } -.entry-edit .order-address .select { width:96.5%; } -.order-search-items .entry-edit .grid { height:610px; overflow:auto; } +.entry-edit .order-address .textarea { width:95% !important; } +.entry-edit .order-address .select { width:96.5%; } +.entry-edit .order-address .validate-vat { text-align:right; padding:10px 0 0; width:96%; } +.order-search-items .entry-edit .grid { height:610px; overflow:auto; } .order-search-items .entry-edit .grid table { width:99.9%; } /* .create-order-totals { background:url(images/bg_create_order_totals.gif) repeat-y 50% 0 !important; } */ @@ -959,6 +998,7 @@ ul.tabs a.paypal-section:hover { background:url(images/tabs_span_bg.gif) repeat- .x-tree-node { margin:0 !important; } .x-tree-node .leaf .x-tree-node-icon { background-image:url(images/fam_leaf.png); } .x-tree-node .system-leaf .x-tree-node-icon { background-image:url(images/fam_application_form_delete.png); } +.x-tree-node-ct { overflow:hidden; } /* Product - Websites */ .webiste-groups { padding:10px 20px; } @@ -1392,6 +1432,19 @@ ul.super-product-attributes { padding-left:15px; } #catalog-wysiwyg-editor .magento_message { padding:0 7px; } #catalog-wysiwyg-editor .magento_buttons { padding-left:7px; padding-right:7px; } +/* Backups */ +.backup-dialog { background-color:#6f8992; background:rgba(111, 137, 146, 0.5); cursor:default; left:50%; margin:0 0 0 -271px; position:fixed; top:50%; width:470px; padding:8px; z-index:400; -moz-box-shadow:0 0 100px #ccc; -webkit-box-shadow:0 0 100px #ccc; box-shadow:0 0 100px #ccc; } +.backup-dialog .entry-edit { border:1px solid #6f8992; } +.backup-dialog .content { background:#fff; border-bottom:1px solid #ccc; max-height:400px; overflow:auto; } +.backup-dialog .question {margin-top: 15px;} +.backup-dialog .buttons-set { border-top:1px solid #ddd; background:#eee; margin:0; overflow:hidden; padding:7px 10px 8px; width:448px; } +.backup-dialog .buttons-set button { margin:0 0 0 5px; } +.backup-dialog #ftp-credentials-container {margin-top: 25px;} +.backup-dialog .password-box-container {margin-top: 15px;} +.backup-dialog #ftp-credentials-container fieldset {margin-bottom: 0;} +.backup-dialog input[type=text], .backup-dialog input[type=password] {width: 180px} +.backup-dialog .exclude-media-checkbox-container {margin-top: 15px;} +.backup-dialog td.maintenance-checkbox-container {margin-top: 0; padding-top: 4px;} /*****************************************/ /******** ALIGNMENTS AND CLEARS **********/ diff --git a/app/design/adminhtml/default/default/skin/default/custom.css b/app/design/adminhtml/default/default/skin/default/custom.css index dc3d9ddb53a57..3bb862c984992 100644 --- a/app/design/adminhtml/default/default/skin/default/custom.css +++ b/app/design/adminhtml/default/default/skin/default/custom.css @@ -17,6 +17,6 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/adminhtml/default/default/skin/default/ie7.css b/app/design/adminhtml/default/default/skin/default/ie7.css index 027bba3038152..215456a47b455 100644 --- a/app/design/adminhtml/default/default/skin/default/ie7.css +++ b/app/design/adminhtml/default/default/skin/default/ie7.css @@ -17,7 +17,7 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/adminhtml/default/default/skin/default/iestyles.css b/app/design/adminhtml/default/default/skin/default/iestyles.css index 0e1d5d6fdf698..f530b2a7c24e8 100644 --- a/app/design/adminhtml/default/default/skin/default/iestyles.css +++ b/app/design/adminhtml/default/default/skin/default/iestyles.css @@ -17,7 +17,7 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /* Clearing */ @@ -93,7 +93,7 @@ button, .form-button { width:auto; margin-left:5px; overflow:visible; button.icon-btn { width:31px; } .nested-content .content-header { position:relative; zoom:1; } -dl.accordion dt a, +dl.accordion dt a, div.collapseable a { width:100%; } .product-image-gallery .grid tbody td { padding: 4px !important; } .massaction .entry-edit fieldset{ float: right;} @@ -108,4 +108,6 @@ div.collapseable a { width:100%; } .grid-severity-critical, .grid-severity-major, -.grid-severity-minor { margin:3px 0; } \ No newline at end of file +.grid-severity-minor { margin:3px 0; } +button.add span, +button.delete span { display:inline-block; height:16px;} diff --git a/app/design/adminhtml/default/default/skin/default/images/btn_gr_bg.gif b/app/design/adminhtml/default/default/skin/default/images/btn_gr_bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..d91a78b537f489ee43baeef28397625dace4b425 GIT binary patch literal 148 zcmZ?wbhEHbWMmLwIKseSGczh+cah_=MB6zr_6y?Nw`F_p%(I>r;k&EAd3B1@%H)te zrFQdUUDl;}?8ph+UF@(V!EH;X>&6TQ;(+2$7O+Ac5DBuAfmQIqCzg(fA``EubTJ5? LVPJ6QV6X-NlQ<+x literal 0 HcmV?d00001 diff --git a/app/design/adminhtml/default/default/skin/default/images/btn_gr_on.gif b/app/design/adminhtml/default/default/skin/default/images/btn_gr_on.gif new file mode 100644 index 0000000000000000000000000000000000000000..b9f7bdeedbf052964092bed39af7ceca9ed05e05 GIT binary patch literal 137 zcmZ?wbhEHbWMp7tIKseS))i>KAkJz^xN)z&!VDof9B*;z%R<;B~ K1}4E425SIopbOOi literal 0 HcmV?d00001 diff --git a/app/design/adminhtml/default/default/skin/default/images/btn_gr_over.gif b/app/design/adminhtml/default/default/skin/default/images/btn_gr_over.gif new file mode 100644 index 0000000000000000000000000000000000000000..73afeb6200c4dd4752393730b631114da01382a0 GIT binary patch literal 147 zcmZ?wbhEHbWMmL#IKse?ailHwK&{iN=XPIOlys=kduN`@ zy0rewOWihSR-c*bzCAntcz59L;__3I7>EOkKUu&EbwDJ@P6k$i1%?JE94&-cR2&60 L{Wo(cGFSruG2ket literal 0 HcmV?d00001 diff --git a/app/design/adminhtml/default/default/skin/default/images/i_question-mark.png b/app/design/adminhtml/default/default/skin/default/images/i_question-mark.png new file mode 100644 index 0000000000000000000000000000000000000000..889bf696e2fdac4c51300a90ef6a5dec6b09d7cd GIT binary patch literal 1654 zcmbVNX;2eq7>;Nefie-O2UhDEN6{9tN6uY{n6QZiIYTU=YKJ9Rk`eQo31x2B#SXvLJDhdUqOlhT7t&ViVVf(}BkM7LwcRkPhKJW3( z7RSe~_4Qup&ExTWwUM}v8|S#+*`C~Y$=Eo-4S}rMz$VgZtdn3!p3+38l7QAqm`NQ; zm~t{Z$S@vnW*Vh8u!fju%t%{>gc~DtS?wH~#|sO0*$HDh$pWdQnX)Maqo-N~0A*4L zk|Z%uj6H(1P?5O|nV1`^H|C}rQIjBiH4x^)I0IIaB>;uU zVbc|YNl}KFcp!piNI)WlLX40U2BcykEQU}q8Vn#141q8LLb4DT!Xz>bf`O?=zCSBTBAY}x`&I*bfu zXDQkSxGfT?bQY@+a7rgbu-ao{UK+MJrV_=a40I885Eeq9)#{FG0_|XR?Eio9ds6BOY?{pF?!O(mft(sFj-j}s5E(da%(9X;R*NeH+=2tVnO(bWJf6osEw0qNdiN%7h zMZJIBXHTQBqOU|ndKS+*#9y8_w;uSTyMW)jF3#Uik-_&={7@PX5cB7JIBQAQ#rbXD zrIM=#eY3M~G1qS`cA5vfqRkcW>h3%z`fA3vjLU|eU3n}z+1xKbySQ>o=!v^g1IfG4 z4qXGa5QoDKJt#Z;sOi`k@F{Gwf6*9JYdNu%KHj=BmapG`@Z>II@;qeIWubL&=acQ9 z96fvH_R!YmHkpNL3C{o{+q3a=t%XI8!Ug)63kUQ8BTs|w9wEKzTAm&jZyH7VPM;bW zFQL9qtgf3ytUK3T#wU_nKQ2`Lv^f~plmsrb%}Bou4O^>QPdXb5J4ea`y6@fX+*9@- z#n5`ch9BzZCA%_zX#K2uk!q0UcSD!tCQZFERVhf`eb@k!aqXYM~C@&-R&KCd%x3>66k9# z>GA7LIC3U1FG}3xJ;VOhfdmQBQhc>)03KO$KPbQpv(_99PpT~7RrcqKN~@w%r;-zsL^G|mT zk3CWAckC@N|LM)HZ)+&e4a+z@vwr(_{{^@AA0v&KA=?^vEc!XqV{_T%`Zyo`oA#Rt zyjtU$qWtUq;n0)chia?EuU*O_`vMH#`~~?8cb1Mn-PTl&)t#wRGJ=n;6(SXbpQpaq z!T(h~V>udh^%}b{nbNwt!@U}xpU)WxuKBGT-8A#wx5wHKR;*YHckR=SNUHmO`Em*P zpza;R*JItmi^_bQ&rV%h(Y#TIsvE%8VgIpX)rH2JfR^hfSL NfmR)hH>* diff --git a/app/design/frontend/default/default/local.xml b/app/design/frontend/default/default/local.xml index a5104e5d54135..d18da11220731 100644 --- a/app/design/frontend/default/default/local.xml +++ b/app/design/frontend/default/default/local.xml @@ -21,7 +21,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/default/skin/blank/css/print.css b/app/design/frontend/default/default/skin/blank/css/print.css index e482327e08452..d13dfa76aa903 100644 --- a/app/design/frontend/default/default/skin/blank/css/print.css +++ b/app/design/frontend/default/default/skin/blank/css/print.css @@ -19,7 +19,7 @@ * * @category design * @package default_blank - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/frontend/default/default/skin/blank/css/styles-ie.css b/app/design/frontend/default/default/skin/blank/css/styles-ie.css index d6df618c51973..4f98d99c62e6c 100644 --- a/app/design/frontend/default/default/skin/blank/css/styles-ie.css +++ b/app/design/frontend/default/default/skin/blank/css/styles-ie.css @@ -19,7 +19,7 @@ * * @category design * @package default_blank - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/frontend/default/default/skin/blank/css/styles.css b/app/design/frontend/default/default/skin/blank/css/styles.css index 4d1858ef27061..f9aceacee1c3a 100644 --- a/app/design/frontend/default/default/skin/blank/css/styles.css +++ b/app/design/frontend/default/default/skin/blank/css/styles.css @@ -19,7 +19,7 @@ * * @category design * @package default_blank - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -373,7 +373,7 @@ tr.summary-details-excluded { font-style:italic; } .std ul.disc { list-style:disc outside; padding-left:18px; margin:0 0 10px; } .std dl dt { font-weight:bold; } .std dl dd { margin:0 0 10px; } -/*.std ul, +.std ul, .std ol, .std dl, .std p, @@ -393,7 +393,7 @@ tr.summary-details-excluded { font-style:italic; } .std b, .std strong { font-weight:bold; } .std i, -.std em { font-style:italic; }*/ +.std em { font-style:italic; } /* Misc */ .links li { display:inline; } @@ -1061,6 +1061,27 @@ tr.summary-details-excluded { font-style:italic; } .account-create {} /* Account Login/Create Pages ============================================================ */ +/* Captcha */ +.captcha-note {} +.captcha-image { float:left; position:relative; } +.captcha-img { border:1px solid #ccc; } +.registered-users .captcha-image {} +#checkout-step-login .captcha-image {} +.captcha-reload { position:absolute; top:2px; right:2px;} +.captcha-reload.refreshing { animation:rotate 1.5s infinite linear; -webkit-animation:rotate 1.5s infinite linear; -moz-animation:rotate 1.5s infinite linear; } + +@-webkit-keyframes rotate { + 0% { -webkit-transform:rotate(0); } + 0% { -webkit-transform:rotate(-360deg); } +} +@-moz-keyframes rotate { + 0% { -moz-transform:rotate(0); } + 0% { -moz-transform:rotate(-360deg); } +} +@keyframes rotate { + 0% { transform:rotate(0); } + 0% { transform:rotate(-360deg); } +} /* Remember Me Popup ===================================================================== */ .window-overlay { background:rgba(0, 0, 0, 0.35); position:absolute; top:0; left:0; height:100%; width:100%; z-index:990; } diff --git a/app/design/frontend/default/default/skin/blue/css/styles-ie.css b/app/design/frontend/default/default/skin/blue/css/styles-ie.css index 94cb13e5a43b7..a2fe506af8259 100644 --- a/app/design/frontend/default/default/skin/blue/css/styles-ie.css +++ b/app/design/frontend/default/default/skin/blue/css/styles-ie.css @@ -19,7 +19,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/frontend/default/default/skin/blue/css/styles.css b/app/design/frontend/default/default/skin/blue/css/styles.css index 5df120b046ae3..1297140c97e7d 100644 --- a/app/design/frontend/default/default/skin/blue/css/styles.css +++ b/app/design/frontend/default/default/skin/blue/css/styles.css @@ -19,7 +19,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -406,7 +406,7 @@ tr.summary-details-excluded { font-style:italic; } .std ul.disc { list-style:disc outside; padding-left:18px; margin:0 0 10px; } .std dl dt { font-weight:bold; } .std dl dd { margin:0 0 10px; } -/*.std ul, +std ul, .std ol, .std dl, .std p, @@ -426,7 +426,7 @@ tr.summary-details-excluded { font-style:italic; } .std b, .std strong { font-weight:bold; } .std i, -.std em { font-style:italic; }*/ +.std em { font-style:italic; } /* Misc */ .links li { display:inline; } @@ -1407,7 +1407,7 @@ tr.summary-details-excluded { font-style:italic; } /* Account Login/Create Pages ============================================================ */ -.account-login .content { min-height:240px; padding:14px 21px; background:#faf7ee url(../images/bkg_login-box.gif) 0 0 repeat-x; border:1px solid #bbb6a5; border-bottom:0; } +.account-login .content { min-height:345px; padding:14px 21px; background:#faf7ee url(../images/bkg_login-box.gif) 0 0 repeat-x; border:1px solid #bbb6a5; border-bottom:0; } .account-login .content h2 { font-weight:bold; font-size:13px; margin:0 0 14px; padding:0 0 5px 23px; border-bottom:1px solid #ddd; background-position:0 1px; background-repeat:no-repeat; text-transform:uppercase; color:#e76200; } .account-login .new-users h2 { background-image:url(../images/i_page1.gif)} .account-login .registered-users h2 { background-image:url(../images/i_page2.gif); } @@ -1416,6 +1416,26 @@ tr.summary-details-excluded { font-style:italic; } .account-create {} /* Account Login/Create Pages ============================================================ */ +/* Captcha */ +.captcha-note { clear:left; padding-top:5px; } +.captcha-image { float:left; display:inline; margin:0; position:relative; width:258px; } +.captcha-image .captcha-img { border:1px solid #b6b6b6; vertical-align:bottom; width:100%; } +.registered-users .captcha-image { margin:0; } +.captcha-reload { cursor:pointer; position:absolute; top:2px; right:2px;} +.captcha-reload.refreshing { animation:rotate 1.5s infinite linear; -webkit-animation:rotate 1.5s infinite linear; -moz-animation:rotate 1.5s infinite linear; } + +@-webkit-keyframes rotate { + 0% { -webkit-transform:rotate(0); } + 0% { -webkit-transform:rotate(-360deg); } +} +@-moz-keyframes rotate { + 0% { -moz-transform:rotate(0); } + 0% { -moz-transform:rotate(-360deg); } +} +@keyframes rotate { + 0% { transform:rotate(0); } + 0% { transform:rotate(-360deg); } +} /* Remember Me Popup ===================================================================== */ .window-overlay {background:rgba(0, 0, 0, 0.35); position:absolute; top:0; left:0; height:100%; width:100%; z-index:990; } diff --git a/app/design/frontend/default/default/skin/default/css/print.css b/app/design/frontend/default/default/skin/default/css/print.css index cb7f55d533e6d..7ce27af597312 100644 --- a/app/design/frontend/default/default/skin/default/css/print.css +++ b/app/design/frontend/default/default/skin/default/css/print.css @@ -19,7 +19,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/frontend/default/default/skin/default/css/styles-ie.css b/app/design/frontend/default/default/skin/default/css/styles-ie.css index cf56a043df0da..efb88a1d12234 100644 --- a/app/design/frontend/default/default/skin/default/css/styles-ie.css +++ b/app/design/frontend/default/default/skin/default/css/styles-ie.css @@ -19,7 +19,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/frontend/default/default/skin/default/css/styles.css b/app/design/frontend/default/default/skin/default/css/styles.css index aa4cc247aced8..94cc5a16f7d9b 100644 --- a/app/design/frontend/default/default/skin/default/css/styles.css +++ b/app/design/frontend/default/default/skin/default/css/styles.css @@ -19,7 +19,7 @@ * * @category design * @package default_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -435,7 +435,7 @@ tr.summary-details-excluded { font-style:italic; } .std ul.disc { list-style:disc outside; padding-left:18px; margin:0 0 10px; } .std dl dt { font-weight:bold; } .std dl dd { margin:0 0 10px; } -/*.std ul, +.std ul, .std ol, .std dl, .std p, @@ -455,7 +455,7 @@ tr.summary-details-excluded { font-style:italic; } .std b, .std strong { font-weight:bold; } .std i, -.std em { font-style:italic; }*/ +.std em { font-style:italic; } /* Misc */ .links li { display:inline; } @@ -1445,15 +1445,34 @@ tr.summary-details-excluded { font-style:italic; } /* Account Login/Create Pages ============================================================ */ -.account-login .content { min-height:240px; padding:14px 21px; background:#faf7ee url(../images/bkg_login-box.gif) 0 0 repeat-x; border:1px solid #bbb6a5; border-bottom:0; } +.account-login .content { min-height:345px; padding:14px 21px; background:#faf7ee url(../images/bkg_login-box.gif) 0 0 repeat-x; border:1px solid #bbb6a5; border-bottom:0; } .account-login .content h2 { font-weight:bold; font-size:13px; margin:0 0 14px; padding:0 0 5px 23px; border-bottom:1px solid #ddd; background-position:0 1px; background-repeat:no-repeat; text-transform:uppercase; color:#e76200; } .account-login .new-users h2 { background-image:url(../images/i_page1.gif)} .account-login .registered-users h2 { background-image:url(../images/i_page2.gif); } .account-login .buttons-set { border:1px solid #bbb6a5; border-top:0; margin:0; padding:8px 13px; background:#dee5e8 url(../images/bkg_buttons-set1.gif) 0 0 repeat-x; } .account-create {} -/* Account Login/Create Pages ============================================================ */ +/* Captcha ================================================================================ */ +.captcha-note { clear:left; padding-top:5px; } +.captcha-image { float:left; display:inline; margin:0; position:relative; width:258px; } +.captcha-image .captcha-img { border:1px solid #b6b6b6; vertical-align:bottom; width:100%; } +.registered-users .captcha-image { margin:0;} +.captcha-reload { cursor:pointer; position:absolute; top:2px; right:2px;} +.captcha-reload.refreshing { animation:rotate 1.5s infinite linear; -webkit-animation:rotate 1.5s infinite linear; -moz-animation:rotate 1.5s infinite linear; } + +@-webkit-keyframes rotate { + 0% { -webkit-transform:rotate(0); } + 0% { -webkit-transform:rotate(-360deg); } +} +@-moz-keyframes rotate { + 0% { -moz-transform:rotate(0); } + 0% { -moz-transform:rotate(-360deg); } +} +@keyframes rotate { + 0% { transform:rotate(0); } + 0% { transform:rotate(-360deg); } +} /* Remember Me Popup ===================================================================== */ .window-overlay { background:rgba(0, 0, 0, 0.35); position:absolute; top:0; left:0; height:100%; width:100%; z-index:990; } diff --git a/app/design/frontend/default/default/theme.xml b/app/design/frontend/default/default/theme.xml index 45b319d3a8b63..349c67c5c2eed 100644 --- a/app/design/frontend/default/default/theme.xml +++ b/app/design/frontend/default/default/theme.xml @@ -20,7 +20,7 @@ * * @category Magento * @package Design - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/Mage_Bundle/sales/order/items/renderer.phtml b/app/design/frontend/default/iphone/Mage_Bundle/sales/order/items/renderer.phtml index c18e2444e5f5a..b71b5b2f6d918 100644 --- a/app/design/frontend/default/iphone/Mage_Bundle/sales/order/items/renderer.phtml +++ b/app/design/frontend/default/iphone/Mage_Bundle/sales/order/items/renderer.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/Mage_Catalog/layer/view.phtml b/app/design/frontend/default/iphone/Mage_Catalog/layer/view.phtml index ecf077e4e3e79..9bf8a22920b35 100644 --- a/app/design/frontend/default/iphone/Mage_Catalog/layer/view.phtml +++ b/app/design/frontend/default/iphone/Mage_Catalog/layer/view.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/Mage_Catalog/layout.xml b/app/design/frontend/default/iphone/Mage_Catalog/layout.xml index 7ca1cf82725ed..cd75bba4169af 100644 --- a/app/design/frontend/default/iphone/Mage_Catalog/layout.xml +++ b/app/design/frontend/default/iphone/Mage_Catalog/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package default_iphone - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/frontend/default/iphone/Mage_Catalog/navigation/top.phtml b/app/design/frontend/default/iphone/Mage_Catalog/navigation/top.phtml index 01595f708da4b..de8d3510af1c5 100644 --- a/app/design/frontend/default/iphone/Mage_Catalog/navigation/top.phtml +++ b/app/design/frontend/default/iphone/Mage_Catalog/navigation/top.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/Mage_Catalog/product/compare/list.phtml b/app/design/frontend/default/iphone/Mage_Catalog/product/compare/list.phtml index 194ce8f44d977..9b3f34f051698 100644 --- a/app/design/frontend/default/iphone/Mage_Catalog/product/compare/list.phtml +++ b/app/design/frontend/default/iphone/Mage_Catalog/product/compare/list.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /* @var $this Mage_Catalog_Block_Product_Compare_List */ @@ -30,9 +30,6 @@ $_imageSize = $this->getVar('product_compare_small_image_size', 'Mage_Catalog'); ?> getItems()->getSize() ?> - getItems() as $_item): ?> @@ -46,14 +43,19 @@ $_imageSize = $this->getVar('product_compare_small_image_size', 'Mage_Catalog'); getItems() as $_item): ?> - + diff --git a/app/design/frontend/default/modern/Mage_Checkout/layout.xml b/app/design/frontend/default/modern/Mage_Checkout/layout.xml index 0b4e1682de97e..ad1bb5e209314 100644 --- a/app/design/frontend/default/modern/Mage_Checkout/layout.xml +++ b/app/design/frontend/default/modern/Mage_Checkout/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package default_modern - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/frontend/default/modern/Mage_Contacts/layout.xml b/app/design/frontend/default/modern/Mage_Contacts/layout.xml index f3af686bb4251..a6798c446ac45 100644 --- a/app/design/frontend/default/modern/Mage_Contacts/layout.xml +++ b/app/design/frontend/default/modern/Mage_Contacts/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package default_modern - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/modern/Mage_Customer/layout.xml b/app/design/frontend/default/modern/Mage_Customer/layout.xml index 61073ddef783a..d38b2f7268d6d 100644 --- a/app/design/frontend/default/modern/Mage_Customer/layout.xml +++ b/app/design/frontend/default/modern/Mage_Customer/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package default_modern - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -262,4 +262,4 @@ Customer account address edit page - + \ No newline at end of file diff --git a/app/design/frontend/default/modern/Mage_Newsletter/layout.xml b/app/design/frontend/default/modern/Mage_Newsletter/layout.xml index 8675ae7bd560e..26944eaa61d73 100644 --- a/app/design/frontend/default/modern/Mage_Newsletter/layout.xml +++ b/app/design/frontend/default/modern/Mage_Newsletter/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package default_modern - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/frontend/default/modern/Mage_Newsletter/subscribe.phtml b/app/design/frontend/default/modern/Mage_Newsletter/subscribe.phtml index c020b50ca7d72..123d60f881721 100644 --- a/app/design/frontend/default/modern/Mage_Newsletter/subscribe.phtml +++ b/app/design/frontend/default/modern/Mage_Newsletter/subscribe.phtml @@ -20,14 +20,15 @@ * * @category design * @package default_modern - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?>
      + + Clear All + <?php echo $this->stripTags($_item->getName(), null, true) ?> - +

    helper('Mage_Catalog_Helper_Output')->productAttribute($_item, $_item->getName(), 'name') ?>

    getReviewsSummaryHtml($_item, 'short') ?> getPriceHtml($_item, true, '-compare-list-top') ?> @@ -132,19 +134,79 @@ $_imageSize = $this->getVar('product_compare_small_image_size', 'Mage_Catalog'); - \ No newline at end of file + diff --git a/app/design/frontend/default/iphone/Mage_Catalog/product/compare/sidebar.phtml b/app/design/frontend/default/iphone/Mage_Catalog/product/compare/sidebar.phtml index 542b4acdd88c5..1befcfc246075 100644 --- a/app/design/frontend/default/iphone/Mage_Catalog/product/compare/sidebar.phtml +++ b/app/design/frontend/default/iphone/Mage_Catalog/product/compare/sidebar.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /* @var $this Mage_Catalog_Block_Product_Compare_Sidebar */ diff --git a/app/design/frontend/default/iphone/Mage_Catalog/product/gallery.phtml b/app/design/frontend/default/iphone/Mage_Catalog/product/gallery.phtml index 8a6b7d0dffca5..2e6adceb1bfb6 100644 --- a/app/design/frontend/default/iphone/Mage_Catalog/product/gallery.phtml +++ b/app/design/frontend/default/iphone/Mage_Catalog/product/gallery.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/Mage_Catalog/product/list.phtml b/app/design/frontend/default/iphone/Mage_Catalog/product/list.phtml index 62c8545629467..d841a11231757 100644 --- a/app/design/frontend/default/iphone/Mage_Catalog/product/list.phtml +++ b/app/design/frontend/default/iphone/Mage_Catalog/product/list.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/Mage_Catalog/product/list/toolbar.phtml b/app/design/frontend/default/iphone/Mage_Catalog/product/list/toolbar.phtml index f3742d93474f2..e07735a8b20ae 100644 --- a/app/design/frontend/default/iphone/Mage_Catalog/product/list/toolbar.phtml +++ b/app/design/frontend/default/iphone/Mage_Catalog/product/list/toolbar.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/Mage_Catalog/product/list/upsell.phtml b/app/design/frontend/default/iphone/Mage_Catalog/product/list/upsell.phtml index 2555c9073ae3d..9c0df625992b9 100644 --- a/app/design/frontend/default/iphone/Mage_Catalog/product/list/upsell.phtml +++ b/app/design/frontend/default/iphone/Mage_Catalog/product/list/upsell.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/Mage_Catalog/product/price.phtml b/app/design/frontend/default/iphone/Mage_Catalog/product/price.phtml index 4ba806ea1dab7..8c72c060514f7 100644 --- a/app/design/frontend/default/iphone/Mage_Catalog/product/price.phtml +++ b/app/design/frontend/default/iphone/Mage_Catalog/product/price.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/Mage_Catalog/product/view.phtml b/app/design/frontend/default/iphone/Mage_Catalog/product/view.phtml index 34fe4d9208028..52fe51a1e336c 100644 --- a/app/design/frontend/default/iphone/Mage_Catalog/product/view.phtml +++ b/app/design/frontend/default/iphone/Mage_Catalog/product/view.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -120,7 +120,7 @@ try { var originalImg = $$('.product-image-wrap .product-image img')[0]; originalImg.up('.product-image-wrap').insert(originalImg.clone().addClassName('cloned')); - setTimeout(function () {$$('.cloned')[0].addClassName('animate');}, 1); + setTimeout(function () {$$('.cloned')[0].setStyle({'webkitTransform' : 'translate3d(' + (document.body.offsetWidth - 190) + 'px, -150px, 2px) scale(0) rotate(200deg)'});}, 1); $$('.product-image-wrap .cloned')[0].observe('webkitTransitionEnd', function(e) { this.form.submit(); }.bind(this)); diff --git a/app/design/frontend/default/iphone/Mage_Catalog/product/view/addto.phtml b/app/design/frontend/default/iphone/Mage_Catalog/product/view/addto.phtml index 53bca847d2ad5..7a29901d5100e 100644 --- a/app/design/frontend/default/iphone/Mage_Catalog/product/view/addto.phtml +++ b/app/design/frontend/default/iphone/Mage_Catalog/product/view/addto.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/Mage_Catalog/product/view/addtocart.phtml b/app/design/frontend/default/iphone/Mage_Catalog/product/view/addtocart.phtml index 19095baf3074f..86bb545e5aa89 100644 --- a/app/design/frontend/default/iphone/Mage_Catalog/product/view/addtocart.phtml +++ b/app/design/frontend/default/iphone/Mage_Catalog/product/view/addtocart.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/Mage_Catalog/product/view/addtowishlist.phtml b/app/design/frontend/default/iphone/Mage_Catalog/product/view/addtowishlist.phtml index afaf9576bd7f8..2761933d8c07d 100644 --- a/app/design/frontend/default/iphone/Mage_Catalog/product/view/addtowishlist.phtml +++ b/app/design/frontend/default/iphone/Mage_Catalog/product/view/addtowishlist.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_iphone - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/frontend/default/iphone/Mage_Catalog/product/view/media.phtml b/app/design/frontend/default/iphone/Mage_Catalog/product/view/media.phtml index 516eb740efdb2..8b2a813bdf57b 100644 --- a/app/design/frontend/default/iphone/Mage_Catalog/product/view/media.phtml +++ b/app/design/frontend/default/iphone/Mage_Catalog/product/view/media.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/frontend/default/iphone/Mage_Catalog/product/view/type/grouped.phtml b/app/design/frontend/default/iphone/Mage_Catalog/product/view/type/grouped.phtml index 221f139bcbe87..0c9772677bc47 100644 --- a/app/design/frontend/default/iphone/Mage_Catalog/product/view/type/grouped.phtml +++ b/app/design/frontend/default/iphone/Mage_Catalog/product/view/type/grouped.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/frontend/default/iphone/Mage_Catalog/product/view/type/grouped_grid.phtml b/app/design/frontend/default/iphone/Mage_Catalog/product/view/type/grouped_grid.phtml index c1ae86e922204..361fc7e2adb6d 100644 --- a/app/design/frontend/default/iphone/Mage_Catalog/product/view/type/grouped_grid.phtml +++ b/app/design/frontend/default/iphone/Mage_Catalog/product/view/type/grouped_grid.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/Mage_CatalogSearch/form.mini.phtml b/app/design/frontend/default/iphone/Mage_CatalogSearch/form.mini.phtml index 3113f0cccbedd..7526290880cdb 100644 --- a/app/design/frontend/default/iphone/Mage_CatalogSearch/form.mini.phtml +++ b/app/design/frontend/default/iphone/Mage_CatalogSearch/form.mini.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_iphone - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/Mage_CatalogSearch/layout.xml b/app/design/frontend/default/iphone/Mage_CatalogSearch/layout.xml index 799f767ca5484..6e4a0223922d4 100644 --- a/app/design/frontend/default/iphone/Mage_CatalogSearch/layout.xml +++ b/app/design/frontend/default/iphone/Mage_CatalogSearch/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/frontend/default/iphone/Mage_CatalogSearch/result.phtml b/app/design/frontend/default/iphone/Mage_CatalogSearch/result.phtml index b2993fde8382f..f8c4c77c9f7cd 100644 --- a/app/design/frontend/default/iphone/Mage_CatalogSearch/result.phtml +++ b/app/design/frontend/default/iphone/Mage_CatalogSearch/result.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/Mage_Checkout/cart.phtml b/app/design/frontend/default/iphone/Mage_Checkout/cart.phtml index 24a5c34d3317a..8ac6063ab720a 100644 --- a/app/design/frontend/default/iphone/Mage_Checkout/cart.phtml +++ b/app/design/frontend/default/iphone/Mage_Checkout/cart.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_iphone - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/Mage_Checkout/cart/item/default.phtml b/app/design/frontend/default/iphone/Mage_Checkout/cart/item/default.phtml index ef00e5e88f5c6..1a148553a18b5 100644 --- a/app/design/frontend/default/iphone/Mage_Checkout/cart/item/default.phtml +++ b/app/design/frontend/default/iphone/Mage_Checkout/cart/item/default.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_iphone - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/Mage_Checkout/cart/no_items_header.phtml b/app/design/frontend/default/iphone/Mage_Checkout/cart/no_items_header.phtml index 94cd3283462fc..71fea202f4475 100644 --- a/app/design/frontend/default/iphone/Mage_Checkout/cart/no_items_header.phtml +++ b/app/design/frontend/default/iphone/Mage_Checkout/cart/no_items_header.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/Mage_Checkout/cart/sidebar.phtml b/app/design/frontend/default/iphone/Mage_Checkout/cart/sidebar.phtml index 9a41522d11091..99c569716b9b3 100644 --- a/app/design/frontend/default/iphone/Mage_Checkout/cart/sidebar.phtml +++ b/app/design/frontend/default/iphone/Mage_Checkout/cart/sidebar.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/frontend/default/iphone/Mage_Checkout/cartheader.phtml b/app/design/frontend/default/iphone/Mage_Checkout/cartheader.phtml index e24bc648f8f2f..6b0e05aae1440 100644 --- a/app/design/frontend/default/iphone/Mage_Checkout/cartheader.phtml +++ b/app/design/frontend/default/iphone/Mage_Checkout/cartheader.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_iphone - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/Mage_Checkout/layout.xml b/app/design/frontend/default/iphone/Mage_Checkout/layout.xml index 71ceea539f830..2a460daabe763 100644 --- a/app/design/frontend/default/iphone/Mage_Checkout/layout.xml +++ b/app/design/frontend/default/iphone/Mage_Checkout/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package default_iphone - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/frontend/default/iphone/Mage_Checkout/onepage/login.phtml b/app/design/frontend/default/iphone/Mage_Checkout/onepage/login.phtml index 5770289776a95..cede25986c288 100644 --- a/app/design/frontend/default/iphone/Mage_Checkout/onepage/login.phtml +++ b/app/design/frontend/default/iphone/Mage_Checkout/onepage/login.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -79,6 +79,7 @@ + getChildHtml('form.additional.info'); ?> diff --git a/app/design/frontend/default/iphone/Mage_Cms/layout.xml b/app/design/frontend/default/iphone/Mage_Cms/layout.xml index d2b586fb26228..924ccff79ea7f 100644 --- a/app/design/frontend/default/iphone/Mage_Cms/layout.xml +++ b/app/design/frontend/default/iphone/Mage_Cms/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/Mage_Contacts/layout.xml b/app/design/frontend/default/iphone/Mage_Contacts/layout.xml index 5dadc86e94e2a..18e811c5137b2 100644 --- a/app/design/frontend/default/iphone/Mage_Contacts/layout.xml +++ b/app/design/frontend/default/iphone/Mage_Contacts/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/Mage_Customer/form/edit.phtml b/app/design/frontend/default/iphone/Mage_Customer/form/edit.phtml index 91f23f9a83598..f33ebbfeb4eea 100644 --- a/app/design/frontend/default/iphone/Mage_Customer/form/edit.phtml +++ b/app/design/frontend/default/iphone/Mage_Customer/form/edit.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/Mage_Customer/form/forgotpassword.phtml b/app/design/frontend/default/iphone/Mage_Customer/form/forgotpassword.phtml index 2868d68ae23f0..9f143a8a18abd 100644 --- a/app/design/frontend/default/iphone/Mage_Customer/form/forgotpassword.phtml +++ b/app/design/frontend/default/iphone/Mage_Customer/form/forgotpassword.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_iphone - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/Mage_Customer/form/login.phtml b/app/design/frontend/default/iphone/Mage_Customer/form/login.phtml index f2438b0cd5d26..6aa88f55b9fe0 100644 --- a/app/design/frontend/default/iphone/Mage_Customer/form/login.phtml +++ b/app/design/frontend/default/iphone/Mage_Customer/form/login.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_iphone - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -46,6 +46,7 @@ + getChildHtml('form.additional.info'); ?> __('Forgot your password?') ?> + getChildHtml('form.additional.info'); ?> getChildHtml('persistent.remember.me'); ?> diff --git a/app/design/frontend/default/iphone/Mage_Persistent/customer/form/login.phtml b/app/design/frontend/default/iphone/Mage_Persistent/customer/form/login.phtml index 9f98d14c0e7d1..25ee9b1d37c85 100644 --- a/app/design/frontend/default/iphone/Mage_Persistent/customer/form/login.phtml +++ b/app/design/frontend/default/iphone/Mage_Persistent/customer/form/login.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_iphone - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -55,6 +55,7 @@ + getChildHtml('form.additional.info'); ?> getChildHtml('persistent.remember.me'); ?> getChildHtml('persistent.remember.me.tooltip'); ?>__('Forgot your password?') ?> diff --git a/app/design/frontend/default/iphone/Mage_Persistent/customer/form/register.phtml b/app/design/frontend/default/iphone/Mage_Persistent/customer/form/register.phtml index dd7da50d83e2e..ce0ca885db91c 100644 --- a/app/design/frontend/default/iphone/Mage_Persistent/customer/form/register.phtml +++ b/app/design/frontend/default/iphone/Mage_Persistent/customer/form/register.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -164,6 +164,7 @@ + getChildHtml('form.additional.info'); ?> getChildHtml('persistent.remember.me'); ?> diff --git a/app/design/frontend/default/iphone/Mage_Persistent/layout.xml b/app/design/frontend/default/iphone/Mage_Persistent/layout.xml index 2d7d079a7c61f..96732d460b101 100644 --- a/app/design/frontend/default/iphone/Mage_Persistent/layout.xml +++ b/app/design/frontend/default/iphone/Mage_Persistent/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package default_iphone - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/Mage_Review/layout.xml b/app/design/frontend/default/iphone/Mage_Review/layout.xml index 254c5f6c174ee..e78c5d71f32bd 100644 --- a/app/design/frontend/default/iphone/Mage_Review/layout.xml +++ b/app/design/frontend/default/iphone/Mage_Review/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package default_iphone - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/frontend/default/iphone/Mage_Sales/order/history.phtml b/app/design/frontend/default/iphone/Mage_Sales/order/history.phtml index 9ab60555a9543..eb38f82e98458 100644 --- a/app/design/frontend/default/iphone/Mage_Sales/order/history.phtml +++ b/app/design/frontend/default/iphone/Mage_Sales/order/history.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_iphone - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/Mage_Sales/order/items.phtml b/app/design/frontend/default/iphone/Mage_Sales/order/items.phtml index d4d110eed7c55..632b2c1a61253 100644 --- a/app/design/frontend/default/iphone/Mage_Sales/order/items.phtml +++ b/app/design/frontend/default/iphone/Mage_Sales/order/items.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/Mage_Sales/order/recent.phtml b/app/design/frontend/default/iphone/Mage_Sales/order/recent.phtml index f930d3e65ef4b..36aa40b80b7ff 100644 --- a/app/design/frontend/default/iphone/Mage_Sales/order/recent.phtml +++ b/app/design/frontend/default/iphone/Mage_Sales/order/recent.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_iphone - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/Mage_Sales/order/totals.phtml b/app/design/frontend/default/iphone/Mage_Sales/order/totals.phtml index 10ad108319f66..b4c2112353951 100644 --- a/app/design/frontend/default/iphone/Mage_Sales/order/totals.phtml +++ b/app/design/frontend/default/iphone/Mage_Sales/order/totals.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /** diff --git a/app/design/frontend/default/iphone/Mage_Sendfriend/layout.xml b/app/design/frontend/default/iphone/Mage_Sendfriend/layout.xml index 5042315e4ab7e..0bd3ca88fef87 100644 --- a/app/design/frontend/default/iphone/Mage_Sendfriend/layout.xml +++ b/app/design/frontend/default/iphone/Mage_Sendfriend/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/Mage_Sendfriend/send.phtml b/app/design/frontend/default/iphone/Mage_Sendfriend/send.phtml index 6bd065783193d..5d02f145a958f 100644 --- a/app/design/frontend/default/iphone/Mage_Sendfriend/send.phtml +++ b/app/design/frontend/default/iphone/Mage_Sendfriend/send.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /* @var $this Mage_Sendfriend_Block_Send */ diff --git a/app/design/frontend/default/iphone/Mage_Shipping/tracking/ajax.phtml b/app/design/frontend/default/iphone/Mage_Shipping/tracking/ajax.phtml index 5fded9cea371d..fed14d7732dcb 100644 --- a/app/design/frontend/default/iphone/Mage_Shipping/tracking/ajax.phtml +++ b/app/design/frontend/default/iphone/Mage_Shipping/tracking/ajax.phtml @@ -20,6 +20,6 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ \ No newline at end of file diff --git a/app/design/frontend/default/iphone/Mage_Shipping/tracking/popup.phtml b/app/design/frontend/default/iphone/Mage_Shipping/tracking/popup.phtml index a136d9a3f4d7f..892cb69a05d5b 100644 --- a/app/design/frontend/default/iphone/Mage_Shipping/tracking/popup.phtml +++ b/app/design/frontend/default/iphone/Mage_Shipping/tracking/popup.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_iphone - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/Mage_Tag/layout.xml b/app/design/frontend/default/iphone/Mage_Tag/layout.xml index 868ded54b276f..507175ef3f766 100644 --- a/app/design/frontend/default/iphone/Mage_Tag/layout.xml +++ b/app/design/frontend/default/iphone/Mage_Tag/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package default_iphone - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/frontend/default/iphone/Mage_Tag/list.phtml b/app/design/frontend/default/iphone/Mage_Tag/list.phtml index 1292a86ae9cf9..65f4b758b5d7a 100644 --- a/app/design/frontend/default/iphone/Mage_Tag/list.phtml +++ b/app/design/frontend/default/iphone/Mage_Tag/list.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/iphone/Mage_Wishlist/view.phtml b/app/design/frontend/default/iphone/Mage_Wishlist/view.phtml index ad30bc2066f77..b8cbbfc5b5e1e 100644 --- a/app/design/frontend/default/iphone/Mage_Wishlist/view.phtml +++ b/app/design/frontend/default/iphone/Mage_Wishlist/view.phtml @@ -20,7 +20,7 @@ * * @category design * @package base_default - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ /* @var $this Mage_Wishlist_Block_Customer_Wishlist */ diff --git a/app/design/frontend/default/iphone/local.xml b/app/design/frontend/default/iphone/local.xml index 3199c69890e7f..7f457881f73ce 100644 --- a/app/design/frontend/default/iphone/local.xml +++ b/app/design/frontend/default/iphone/local.xml @@ -21,7 +21,7 @@ * * @category design * @package default_iphone - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/skin/default/css/iphone.css b/app/design/frontend/default/iphone/skin/default/css/iphone.css index aad0703eeac23..14bd89ffb94f3 100644 --- a/app/design/frontend/default/iphone/skin/default/css/iphone.css +++ b/app/design/frontend/default/iphone/skin/default/css/iphone.css @@ -19,7 +19,7 @@ * * @category design * @package default_iphone - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -46,6 +46,23 @@ h2 { font-size:12px; font-weight:normal; line-height:20px; } legend { display:none; } +.messages .notice-msg, +.messages .success-msg { + background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #FFE38D), color-stop(100%, #FFD040)); + padding:10px; + color:#222; + font-weight:bold; + text-shadow:0 1px 0 #eee; + -webkit-box-shadow:0 3px 3px #ccc; +} +.messages .success-msg { + background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957)); + border:solid #3D773D; + border-width:1px 0; + color:#fff; + text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25); + margin-bottom:10px; +} /* Header -----------------------------*/ @@ -228,7 +245,7 @@ body > header dt.search > a { background-image:url(../images/i_menu_search.png); background-position:18px 10px; background-repeat:no-repeat; - text-indent:-99000px; + text-indent:-999em; } body > header dt.cart:before, @@ -252,7 +269,7 @@ body > header dt.cart > span:first-child { background-image:url(../images/i_menu_cart.png); background-position:center 10px; background-repeat:no-repeat; - text-indent:-99000px; + text-indent:-999em; } body > header dt.active span:first-child { margin:-1px -6px -7px; @@ -593,7 +610,7 @@ select { border-radius:2px; color:#333; font-size:15px; - padding:3px 20px 3px 7px; + padding:3px 30px 3px 7px; -webkit-appearance:none; -webkit-box-sizing:border-box; } @@ -1009,7 +1026,7 @@ section .category-title { display:none; } display:inline-block; vertical-align:middle; top:-2px; - text-indent:-9999px; + text-indent:-999em; margin-right:2px; } @@ -1124,7 +1141,7 @@ section .category-title { display:none; } position:relative; height:27px; width:27px; - text-indent:-9999px; + text-indent:-999em; -webkit-box-shadow:0 0 5px rgba(0, 0, 0, 0.15); -webkit-background-clip:padding-box; } @@ -1466,27 +1483,7 @@ section .category-title { display:none; } /* Product Info Box -----------------------------*/ -.catalog-product-view .messages { - margin:0 -10px 0; -} -.catalog-product-view .messages .notice-msg { - background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #FFE38D), color-stop(100%, #FFD040)); - padding:10px; - color:#222; - font-weight:bold; - text-shadow:0 1px 0 #eee; -} -.catalog-product-view .messages .success-msg { - background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957)); - border:solid #3D773D; - border-width:1px 0; - color:#fff; - font-weight:bold; - text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25); - margin-bottom:10px; - padding:10px; - -webkit-box-shadow:0 3px 3px #ccc; -} +.catalog-product-view .messages { margin:0 -10px 0; } .product-view { padding:0 0 0; } .product-shop { padding:8px 0 0; } .product-shop .product-image-and-actions { float:left; margin:0 10px 0 0; } @@ -1506,10 +1503,7 @@ section .category-title { display:none; } z-index:1; } .product-shop .product-image-wrap img { -webkit-border-radius:1px; -webkit-box-shadow:0 0 3px #D1D1D1; -webkit-transition:-webkit-transform ease-in 300ms; position:relative; } -.product-shop .product-image-wrap img.animate { -webkit-transform:translate3d(100%,-150px,1px) scale(0) rotate(200deg); z-index:1000; } -@media (orientation: landscape) { - .product-shop .product-image-wrap img.animate { -webkit-transform:translate3d(310px,-150px,1px) scale(0) rotate(200deg); } -} +.product-shop .product-image-wrap img.animate { z-index:101; } .product-shop .product-image-wrap img.cloned { position:absolute; top:0; left:0; } .product-shop .product-image .carousel-items li { padding:2px 2px 0; } .product-shop .product-image .more-views { padding:3px 0 0 0; } @@ -1535,7 +1529,9 @@ section .category-title { display:none; } .product-essential .availability span { font-weight:normal; } .product-essential .product-options dt label { font-size:14px; font-weight:bold; } .product-essential .product-options dt label em { float:left; margin:0 4px 0 0; color:#F9721F; } -.product-essential .product-options dd { border-bottom:1px dotted #555; margin:0 0 10px; padding:0 0 10px; } +.product-essential .product-options dd { border-bottom:1px solid #bbb; padding:0 0 10px; } +.product-essential .product-options dd + dt { border-top:1px solid rgba(255, 255, 255, 0.75); padding:10px 0 0; } +.product-essential .product-options dd:last-child { border:none; } .product-essential .product-options select { width:100%; } .product-essential .product-options input[type=text] { font-size:12px; width:20%; } .product-essential .product-options input[type=text]:disabled { background:#ddd; } @@ -1559,7 +1555,7 @@ section .category-title { display:none; } .product-shop .product-desc .ratings { overflow:hidden; } .product-shop .product-desc .ratings, .product-shop .product-desc .ratings a { color:#FB6B36; } -.rating-box { width:75px; height:15px; margin:3px 0; } +.rating-box { background:url(../images/i_star_black.png) repeat-x center left; background-size:15px 15px; width:75px; height:15px; margin:3px 0; } .rating-box .rating { height:15px; background:url(../images/i_star.png) repeat-x center left; background-size:15px 15px; } .product-shop .product-options-bottom .price-box { font-size:14px; font-weight:bold; text-align:right; } @@ -1754,13 +1750,11 @@ section .category-title { display:none; } .compare-back-link { - position:fixed; - top:0; - left:0; - right:0; - padding:5px 5px 5px 20px; + position:absolute; + padding:0 0 0 10px; z-index:10; } +.compare-clear-all, .compare-back-link a { background:-webkit-gradient(linear, 0 0, 0 100%, from(#ddd), to(#eee)); color:#000; @@ -1774,6 +1768,18 @@ section .category-title { display:none; } z-index:4; -webkit-transform:scale(0.95); } +.compare-clear-all { + color:#fff; + background:-webkit-gradient(linear, left top, left bottom, color-stop(0%,#f85032), color-stop(50%,#f16f5c), color-stop(51%,#f6290c), color-stop(71%,#f02f17), color-stop(100%,#e73827)); + border:1px solid #777; + border-radius:5px; + display:inline-block; + font-weight:normal; + padding:5px 10px; + margin-left:60px; + position:static; + text-shadow:0 1px 0 #000; +} .compare-back-link:before { content:''; background:-webkit-gradient(linear, 0 0, 0 100%, from(#ddd), to(#eee)); @@ -1781,18 +1787,57 @@ section .category-title { display:none; } height:18px; width:18px; position:absolute; - top:10px; - left:11px; + top:5px; + left:1px; -webkit-transform:rotate(45deg) scale(1.001); z-index:3; } -.compare-table { border-collapse:collapse; border-spacing:0; table-layout:fixed; } +.compare-table { border-collapse:collapse; border-spacing:0; table-layout:fixed; -webkit-backface-visibility:hidden; } .compare-table th, -.compare-table td { border:1px solid #ccc; padding:5px 15px; vertical-align:top; } +.compare-table td { background:#fff; border:1px solid #ccc; padding:5px 15px; vertical-align:top; } .compare-table td a { color:#fb6b36; } .compare-table th { background:url(../images/fabric.jpg) repeat; border:none; -webkit-box-shadow:inset -3px 0 3px -3px #ccc; text-shadow:1px 1px 1px #fff; text-align:left; position:relative; padding:5px 10px 5px 10px; } .compare-table tr:nth-child(even) td { background:#f6f6f6; } +.compare-table .move-left, +.compare-table .move-right { + background:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#eee)); + border:1px solid #c4c4c4; + border-radius:5px; + display:inline-block; + padding:5px 10px; + position:relative; + height:16px; + width:10px; + -webkit-box-shadow:0 0 2px rgba(0, 0, 0, 0.15); +} +.compare-table .move-left:after, +.compare-table .move-right:after { content:''; position:absolute; top:8px; z-index:2; font-size:0; line-height:0; width:0; } +.compare-table .move-left:after { border-top:5px solid transparent; border-right:10px solid #888; border-bottom:5px solid transparent; right:11px; } +.compare-table .move-right:after { border-top:5px solid transparent; border-left:10px solid #888; border-bottom:5px solid transparent; left:11px; } +.compare-table .move-right { + float:right; +} +.compare-table.hide-controls .moved-right .move-right, +.compare-table.hide-controls .moved-right .move-left, +.compare-table.hide-controls .moved-left .move-right, +.compare-table.hide-controls .moved-left .move-left { + visibility:hidden; +} .compare-table .nobr { display:block; padding:1px 20px 1px 10px; white-space:nowrap; position:relative; text-shadow:1px 1px 0 #fff; } +.compare-table .product-shop-row td:last-child .move-right, +.compare-table .product-shop-row td:nth-child(2) .move-left { visibility:hidden; } +.compare-table .product-shop-row td:only-of-type .move-left, +.compare-table .product-shop-row td:only-of-type .move-right { display:none; } +.compare-table .move-right-animation, +.compare-table .move-left-animation { + -webkit-transition:-webkit-transform 300ms linear; + -webkit-transform:translate3d(0, 0, -5px) !important; +} +.compare-table .move-right-animation-scale, +.compare-table .move-left-animation-scale { + -webkit-transition:-webkit-transform 300ms linear; + -webkit-transform:translate3d(0, 0, 5px) !important; +} .compare-table .collapsible .nobr { background:-webkit-gradient(linear, 0 0, 0 100%, from(#f6f6f6), to(#bbb)); border:1px solid #aaa; border-radius:7px; -webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.15), 0 1px 0 #fff; } .compare-table .collapsible .nobr:active, .compare-table .collapsible.collapsed .nobr { background:-webkit-gradient(linear, 0 0, 0 100%, from(#ddd), to(#ccc)); } @@ -1828,6 +1873,7 @@ section .category-title { display:none; } -webkit-box-shadow:0 3px 3px 0 #9F9F9F; -webkit-background-clip:padding-box; } +.compare-table .btn-remove { -webkit-transform:translate3d(0, 0, 0); } .compare-table .product-image { background:#fff; display:inline-block; margin:4px 0 10px; padding:3px; position:relative; border:1px solid #ccc; -webkit-box-shadow:0 1px 2px #ccc; text-align:center; } .compare-table .product-image img {} .compare-table .loader { background:url(../images/loader.gif) no-repeat center rgba(0, 0, 0, 0.05); background-size:20px 20px; float:right; height:20px; width:20px; } @@ -2557,6 +2603,7 @@ section .category-title { display:none; } -webkit-background-clip:padding-box; } .wishlist-wrap { position:relative; } +.wishlist-wrap.grouped-items #wishlist-list li { min-height:initial; position:static; } .wishlist-wrap .remove-all { display:none; top:12px; right:10px; } .wishlist-index-index .my-account > a { display:none; } @@ -2594,24 +2641,6 @@ section .category-title { display:none; } .checkout-cart-index .messages { margin:0 -10px 0 !important; } -.checkout-cart-index .messages .notice-msg, -.checkout-cart-index .messages .success-msg, -.my-account .messages .success-msg { - background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #FFE38D), color-stop(100%, #FFD040)); - padding:10px; - color:#222; - font-weight:bold; - text-shadow:0 1px 0 #eee; -} -.checkout-cart-index .messages .success-msg, -.my-account .messages .success-msg { - background:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957)); - border:solid #3D773D; - border-width:1px 0; - color:#fff; - text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25); - margin-bottom:10px; -} .checkout-onepage-index .page-title { background:-webkit-gradient(linear, 0 0, 0 100%, from(#fff), to(#ccc)); border:solid #999; border-width:1px 0; border-top-color:#ccc; margin:0 -10px 10px; padding:10px; } #checkoutSteps { margin:-7px; padding:0; list-style:none; -webkit-box-shadow:3px -3px 2px 0 #F0F0F0; color:#636363; } @@ -2770,11 +2799,12 @@ section .category-title { display:none; } -----------------------------*/ .contacts-index-index .page-title { display:none; } .contacts-index-index .fieldset h2 { display:none; } +.contacts-index-index .messages { margin:0 -10px 0; } .contacts-index-index form { display:block; border:1px solid #D1D1D1; margin:2px -7px -7px; padding:9px; border-radius:2px 2px 5px 5px; background:-webkit-gradient(linear, 0 0, 0 100%,color-stop(0, #FCFDFD), color-stop(0.8, #EEEEEE), color-stop(1, #E8E9E9)); } -.contacts-index-index textarea { width:99%; height:200px; } -.contacts-index-index .fields .field { margin:0 0 8px 0; } .contacts-index-index label { color:#5E5E5E; font-weight:bold; } .contacts-index-index label em { margin:0 3px 0 0; color:#F4641E; } +.contacts-index-index textarea { width:99%; height:200px; } +.contacts-index-index .fields .field { margin:0 0 8px 0; } .contacts-index-index .buttons-set .required { float:right; font-size:12px; font-weight:bold; color:#F4641E; } .contacts-index-index .buttons-set button { padding:5px 10px; background:-webkit-gradient(linear, 0 0, 0 100%, from(#F39823), to(#F37221)); font-size:12px; color:#FFF; border:1px solid #FFF; border-radius:5px; -webkit-box-shadow:0 3px 3px 0 #9F9F9F; } diff --git a/app/design/frontend/default/iphone/skin/default/images/i_star_black.png b/app/design/frontend/default/iphone/skin/default/images/i_star_black.png new file mode 100644 index 0000000000000000000000000000000000000000..eba185915410f4311e72bd22a25cd5e520f94e44 GIT binary patch literal 3540 zcmaJ^c{r49-yX)2Bo#u5X`*DA#WsvJV@b%qZ;dgSFf+_(>1j4tX~ zvRVl1RXD)K`kpEOJj7~5$@=zWD}pDPf)2m}E_e{!u^=Nqv=`PAi}nciXJ9n|03aA= zZBMp0H9=wseh~CN1`^~)WU&DN4ecNz8smc{gWR!RIJ_p9+0YCI;XE|KcFLwOQz8oM zjk_2UfVB#_Y>f%=!KitFwY5MRK}eQ>AC`;;1^M~nNys2g@SnO!R)2pQ3I_cNA^T{8 z|1xE7Y7RmX0AP#8iU4nry%&!H`Y=^hRb72JTn~XzR`|u$BVYpkuz2z>uE&45YQN>~N5PNCs;q|%z+J<77z7af zKz}Y7iTk}5mXF_g`HSoEdoPIJa-l3U(EWq`pM(B2#Y)e9_n+9Z2LA*fi)W=hfEDXt zx?~mraPXp$-UaKR(ZMVylk^eMm~U}yT+Ox??gpf%)*_E<;f2U9+X(bi3xIkY?*CT+X&vP(64p+ zH=piO*>u+)bFbfByvf(T-sWuHk0`g83RF)@tLD>q zVr;ee?FY8KTAsmR%n2Mj7M0dSo_Y~i|4r3eWX`>i1~0LRi;I&A4i2tZTJjD4&_fTK z>&{JhxLD}0u_d@1dZ+-LmywY%dk7|WxMA*1&eNdxwSEl;%7irrPVC-dr<{n?UKC3K zu8YGmKh1o}ntaNe{7^_xa7ji+#__~%KOOT@%bWNI-Pil8QAkJ#L_Fi63lIo|V zG8kW4e-tggE0_JGw#Qu*KU0r8KWqr-VXqUo-PF|79Uj$R6xn+W@Y6p$JY0TmukS|q zk4;mddD5pZH$iV^=UlBZks7`N89IzYJ&uwb>h9?eP=dENQRlk(DdC`O=_+{yV#utP z?0tXn@x6Pexp$u5;8hl2t8-;MiL5V6krkRz{Eev!!>PuV%2a}8tqfiM#xHfKi9wCCT9A6du*y0iTxl??;Z5mxg` zF1haOlMJ9qqut8Jcgw60K5!Q1Zj|N3^rZJ{zqiHNBM0g_J3DvE%gblhZTbfW6kjco ziOmVjAd7n-CS{6=<1r4&|Wj& zH#WAS>(7CF^`&xfelKKe6&-yiK2X1Z+65`jwbT5ig>ay8H!CYEKTd|->?);EQML;z zcJEo9X6P)(R;gVj-mN}hrbig+8g}R*=eE#03BHg=uW7>1VtfqEh54QLjy4ZS`W*bg z5R{BLhTd^*xA*dTcqX*uRe4t?bZ?oJR$(Vc$LYy#hR#dJQ?Ah}%VE=;(OZJF*O}t7 z-Wa~lIQI*eq!=ho-JtEyNhcA>yh_cXCZL${(z0|4j*nklV=FKsB0@WITUPq^zthua zKIGtVG8-)eZBVyoJG0Y_wB}~g+~t$e76HLWMgPTgO6jseQ5$12YuK!?ieuzR!wQGs zr`Bd-1 zcN5#WPZC^pUqT8B3nc+BKRp0i_WyX+GP6Q;C~l&|l^hIeN(_ihXtB!boBTCawmoBIv9+=!0UB#SuTPJ0lA!ll2#PgbySRT^36?9qh zx;%i_x*(mcZwI2VEInqzW!~uCJ~&BeXa9P_%+l$_ZcAbm>0sb$iS0`gEp;Ov(A6cw z&0*idQvyO>PhN8cl+TQvz#4E(+~EuJI+4YrQ4uLWqk%DKdDx3NE&m)PnlYYnJU$GS z;JT1-bs@1UFfcIb1Hq}*cSIXO7;D7!-Pcza8CKAgWtNT#dOsPBZ_DVnqk1SUp47zw z&d;L!ZHwhJOUB*ST0<$!vEAC*+Rdqr#i8cbwthOOC6=~|CoR8Em$i#v&nyk9wC~bL zKlD}05V3pKADSO=E4Y$UOO@T>rJF2bMU_JlqvMycl<)7#oxCpRA~!@F*Y7-+7NIxw zChp$25Y8#DHM4WhI;+T=f;2RA)UT=W89EMh9=B1e7(f*LY`<9%2OTPpPrMIq`p4T3aC&hkg&S6L|xN2FQ$$= z7=##N#*SorTfMB-QVsvqUu1laHm^%9ub|OroWx;4{ial(R*{_ffv}B*x7?})dDQY3 z{-?Xut3P|F-01K$NjJ?=F(RV|$A#y&e4-$4sA3A$B6o3}UNb9-vUj2M6Jm3SF?B&Q*Yh^=@IaTl@fyr+w)xgBTIjcxH^#=svPZ7COTRX`n)XC!F<N(o}qyaLbl+|>J_J|E3NmVx%p*mw41LjJM!`rnJxB7_fC~@Q=ffopq$f<)o?uP zY6il@r2nh%ljq3sY~3t(Amqqsb6NnPEbWhaGqG9+v+YA$k{NFGFLaK@Ke!U==g||# zpZCSu#-_+$8=yHmGd*3{;>SO!s5hGFaDF9T-?TXAtD%Svzr=hD*p+SQ+5M}Bh3vM2 zSXT>V_TApW!P`2-YZdl%cY7)JA%Um9BexExC>~*lQe*vpR&n8<6pth@69b#nq=>c~ zsoLBJULStl6Z_#>rp+GiDq!?@#$0@SJbUQol96=*Teq>JS?qhQ$Dayzy>ywls-qi? z*LrkUa7&b}V!9CxaIm%Aq9PP*tBnUF;{c;_kKZ$>rn9OYH85)1H35d4%wUHc(L~)V zd~-Aun6e#H|kbt2wXY;4FtHCnDU+c5HuC0)T++1@I01#;_av P|5--*m-Q-iuSER^p5<0S literal 0 HcmV?d00001 diff --git a/app/design/frontend/default/iphone/skin/default/js/iphone.js b/app/design/frontend/default/iphone/skin/default/js/iphone.js index 080da6fc83edf..84d0e46a9031a 100644 --- a/app/design/frontend/default/iphone/skin/default/js/iphone.js +++ b/app/design/frontend/default/iphone/skin/default/js/iphone.js @@ -19,7 +19,7 @@ * * @category design * @package default_iphone - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ @@ -51,8 +51,11 @@ document.observe("dom:loaded", function() { }); } + + var supportsOrientationChange = "onorientationchange" in window, + orientationEvent = supportsOrientationChange ? "orientationchange" : "resize"; - Event.observe(window, 'orientationchange', function() { + Event.observe(window, orientationEvent, function() { var orientation, page; @@ -72,23 +75,25 @@ document.observe("dom:loaded", function() { if ( $('nav-container') ) { - $$("#nav-container ul").each(function(ul) { - ul.setStyle({'width' : document.body.offsetWidth + "px"}); - }); - - page = Math.floor(Math.abs(sliderPosition/viewportWidth)); - sliderPosition = (sliderPosition + viewportWidth*page) - document.body.offsetWidth*page; - viewportWidth = document.body.offsetWidth; - - $("nav-container").setStyle({"-webkit-transform" : "translate3d(" + sliderPosition + "px, 0, 0)"}); + setTimeout(function () { + $$("#nav-container ul").each(function(ul) { + ul.setStyle({'width' : document.body.offsetWidth + "px"}); + }); + + page = Math.floor(Math.abs(sliderPosition/viewportWidth)); + sliderPosition = (sliderPosition + viewportWidth*page) - document.body.offsetWidth*page; + viewportWidth = document.body.offsetWidth; + + $("nav-container").setStyle({"-webkit-transform" : "translate3d(" + sliderPosition + "px, 0, 0)"}); - if ( upSellCarousel ) { - if (orientation === 'landscape') { - upSellCarousel.resize(3); - } else { - upSellCarousel.resize(2); + if ( upSellCarousel ) { + if (orientation === 'landscape') { + upSellCarousel.resize(3); + } else { + upSellCarousel.resize(2); + } } - } + }, 400); } diff --git a/app/design/frontend/default/iphone/theme.xml b/app/design/frontend/default/iphone/theme.xml index 10e73d61a592d..e4fb26c28bd86 100644 --- a/app/design/frontend/default/iphone/theme.xml +++ b/app/design/frontend/default/iphone/theme.xml @@ -20,7 +20,7 @@ * * @category Magento * @package Design - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/iphone/view.xml b/app/design/frontend/default/iphone/view.xml index 40bceb48c57f0..d22ed102437b6 100644 --- a/app/design/frontend/default/iphone/view.xml +++ b/app/design/frontend/default/iphone/view.xml @@ -21,7 +21,7 @@ * * @category Mage * @package modern_theme - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> diff --git a/app/design/frontend/default/modern/Mage_Catalog/layout.xml b/app/design/frontend/default/modern/Mage_Catalog/layout.xml index 4e481032f5a71..c9bc531de0f50 100644 --- a/app/design/frontend/default/modern/Mage_Catalog/layout.xml +++ b/app/design/frontend/default/modern/Mage_Catalog/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package default_modern - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/frontend/default/modern/Mage_Catalog/product/list.phtml b/app/design/frontend/default/modern/Mage_Catalog/product/list.phtml index 1ea8c58b3c267..788d41db2e11c 100644 --- a/app/design/frontend/default/modern/Mage_Catalog/product/list.phtml +++ b/app/design/frontend/default/modern/Mage_Catalog/product/list.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_modern - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/modern/Mage_Catalog/product/list/upsell.phtml b/app/design/frontend/default/modern/Mage_Catalog/product/list/upsell.phtml index a578afa85ebc9..76ed77fa6072e 100644 --- a/app/design/frontend/default/modern/Mage_Catalog/product/list/upsell.phtml +++ b/app/design/frontend/default/modern/Mage_Catalog/product/list/upsell.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_modern - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/modern/Mage_Catalog/product/view.phtml b/app/design/frontend/default/modern/Mage_Catalog/product/view.phtml index 34983dd8b9f21..36eb9b9db444c 100644 --- a/app/design/frontend/default/modern/Mage_Catalog/product/view.phtml +++ b/app/design/frontend/default/modern/Mage_Catalog/product/view.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_modern - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/frontend/default/modern/Mage_Catalog/product/view/media.phtml b/app/design/frontend/default/modern/Mage_Catalog/product/view/media.phtml index f1347d716b955..05108f38ce760 100644 --- a/app/design/frontend/default/modern/Mage_Catalog/product/view/media.phtml +++ b/app/design/frontend/default/modern/Mage_Catalog/product/view/media.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_modern - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/frontend/default/modern/Mage_Catalog/product/view/tabs.phtml b/app/design/frontend/default/modern/Mage_Catalog/product/view/tabs.phtml index b9693992f18e1..ca88182f1c642 100644 --- a/app/design/frontend/default/modern/Mage_Catalog/product/view/tabs.phtml +++ b/app/design/frontend/default/modern/Mage_Catalog/product/view/tabs.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_modern - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/frontend/default/modern/Mage_CatalogSearch/form.mini.phtml b/app/design/frontend/default/modern/Mage_CatalogSearch/form.mini.phtml index 8c5cb9a75d8ed..507a9522c0b3e 100644 --- a/app/design/frontend/default/modern/Mage_CatalogSearch/form.mini.phtml +++ b/app/design/frontend/default/modern/Mage_CatalogSearch/form.mini.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_modern - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> diff --git a/app/design/frontend/default/modern/Mage_CatalogSearch/layout.xml b/app/design/frontend/default/modern/Mage_CatalogSearch/layout.xml index 9654cfe8f4971..73073969cab31 100644 --- a/app/design/frontend/default/modern/Mage_CatalogSearch/layout.xml +++ b/app/design/frontend/default/modern/Mage_CatalogSearch/layout.xml @@ -21,7 +21,7 @@ * * @category design * @package default_modern - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ diff --git a/app/design/frontend/default/modern/Mage_Checkout/cart.phtml b/app/design/frontend/default/modern/Mage_Checkout/cart.phtml index 2e04c6854c57c..646b7e82c295f 100644 --- a/app/design/frontend/default/modern/Mage_Checkout/cart.phtml +++ b/app/design/frontend/default/modern/Mage_Checkout/cart.phtml @@ -20,7 +20,7 @@ * * @category design * @package default_modern - * @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com) + * @copyright Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> @@ -99,7 +99,8 @@ getContinueShoppingUrl()): ?> - + +