From 61c419b054485505b67b498cfb3f297890c08644 Mon Sep 17 00:00:00 2001 From: Lee Saferite Date: Thu, 18 Feb 2010 13:29:41 -0500 Subject: [PATCH] Import Magento 1.4.0.0 --- app/Mage.php | 67 +- app/code/core/Mage/Admin/Model/Observer.php | 11 + app/code/core/Mage/Admin/Model/User.php | 10 +- .../Mage/AdminNotification/Model/Survey.php | 112 + .../Mage/AdminNotification/etc/config.xml | 7 + .../Mage/Adminhtml/Block/Api/Tab/Roleinfo.php | 2 + .../Block/Catalog/Category/Abstract.php | 2 +- .../Block/Catalog/Category/Tab/Attributes.php | 3 +- .../Block/Catalog/Product/Attribute/Edit.php | 1 + .../Product/Attribute/Edit/Tab/Main.php | 7 + .../Catalog/Product/Edit/Tab/Attributes.php | 6 +- .../Catalog/Product/Edit/Tab/Categories.php | 5 +- .../Block/Customer/Edit/Tab/View/Sales.php | 39 +- .../Block/Notification/Survey.php} | 40 +- .../Block/Permissions/Tab/Roleinfo.php | 2 + .../Block/Poll/Edit/Tab/Answers/List.php | 2 +- .../Block/Promo/Quote/Edit/Tab/Actions.php | 2 + .../Adminhtml/Block/Report/Filter/Form.php | 82 +- .../Block/Report/Refresh/Statistics/Grid.php | 50 +- .../Adminhtml/Block/Report/Sales/Coupons.php | 4 +- .../Block/Report/Sales/Coupons/Grid.php | 3 +- .../Sales/Grid/Column/Renderer/Date.php | 112 + .../Adminhtml/Block/Report/Sales/Invoiced.php | 4 +- .../Block/Report/Sales/Invoiced/Grid.php | 3 +- .../Adminhtml/Block/Report/Sales/Refunded.php | 4 +- .../Block/Report/Sales/Refunded/Grid.php | 3 +- .../Adminhtml/Block/Report/Sales/Sales.php | 4 +- .../Block/Report/Sales/Sales/Grid.php | 3 +- .../Adminhtml/Block/Report/Sales/Shipping.php | 4 +- .../Block/Report/Sales/Shipping/Grid.php | 3 +- .../Mage/Adminhtml/Block/Report/Sales/Tax.php | 4 +- .../Adminhtml/Block/Report/Sales/Tax/Grid.php | 3 +- .../core/Mage/Adminhtml/Block/Review/Grid.php | 2 + .../Sales/Order/Create/Customer/Grid.php | 14 +- .../Block/Sales/Order/Create/Data.php | 2 +- .../Block/Sales/Order/Create/Form/Address.php | 5 + .../Block/Sales/Order/Create/Items/Grid.php | 7 +- .../Sales/Order/Creditmemo/Create/Items.php | 25 +- .../Sales/Order/Invoice/Create/Items.php | 29 +- .../Adminhtml/Block/Sales/Order/Payment.php | 3 - .../Sales/Order/Shipment/Create/Items.php | 2 +- .../Order/View/Items/Renderer/Default.php | 3 - .../Block/Sales/Order/View/Tab/Info.php | 3 - .../System/Convert/Gui/Edit/Tab/View.php | 7 +- .../System/Convert/Profile/Edit/Tab/Edit.php | 7 +- .../System/Convert/Profile/Edit/Tab/Run.php | 1 + .../Block/System/Convert/Profile/Run.php | 5 +- .../Block/System/Variable/Edit/Form.php | 5 +- .../Adminhtml/Block/System/Variable/Grid.php | 4 +- .../Mage/Adminhtml/Block/Tax/Rate/Form.php | 6 +- .../core/Mage/Adminhtml/Block/Widget/Grid.php | 2 +- .../Adminhtml/Block/Widget/Grid/Column.php | 37 +- .../Widget/Grid/Column/Filter/Select.php | 2 +- .../Widget/Grid/Column/Renderer/Abstract.php | 12 +- .../Widget/Grid/Column/Renderer/Currency.php | 5 +- .../Widget/Grid/Column/Renderer/Datetime.php | 3 +- .../Widget/Grid/Column/Renderer/Number.php | 6 +- .../core/Mage/Adminhtml/Controller/Action.php | 28 - .../Adminhtml/Controller/Sales/Invoice.php | 2 + .../Adminhtml/Controller/Sales/Shipment.php | 2 + .../Adminhtml/Model/Sales/Order/Create.php | 106 +- .../Model/System/Config/Backend/Baseurl.php | 25 + .../Model/System/Config/Source/Admin/Page.php | 6 +- .../Config/Source/Shipping/Allowedmethods.php | 3 + .../Mage/Adminhtml/Model/System/Store.php | 6 +- .../controllers/Api/RoleController.php | 31 +- .../controllers/Api/UserController.php | 13 +- .../Adminhtml/controllers/CacheController.php | 2 + .../Catalog/CategoryController.php | 8 + .../Product/Action/AttributeController.php | 2 +- .../Catalog/Product/AttributeController.php | 23 +- .../Catalog/Product/GalleryController.php | 1 + .../Catalog/Product/ReviewController.php | 26 +- .../Catalog/Product/SetController.php | 15 + .../controllers/Catalog/ProductController.php | 18 + .../controllers/Catalog/SearchController.php | 6 + .../Checkout/AgreementController.php | 6 + .../controllers/Cms/BlockController.php | 6 + .../controllers/Cms/PageController.php | 10 + .../controllers/Customer/GroupController.php | 10 +- .../controllers/Customer/OnlineController.php | 2 + .../controllers/CustomerController.php | 59 +- .../controllers/DashboardController.php | 2 + .../Newsletter/ProblemController.php | 2 + .../Newsletter/QueueController.php | 10 +- .../Newsletter/SubscriberController.php | 2 + .../Newsletter/TemplateController.php | 6 + .../controllers/NotificationController.php | 2 + .../Permissions/RoleController.php | 91 +- .../Permissions/UserController.php | 11 + .../Adminhtml/controllers/PollController.php | 5 + .../controllers/Promo/CatalogController.php | 6 + .../controllers/Promo/QuoteController.php | 6 + .../controllers/RatingController.php | 11 + .../controllers/Report/CustomerController.php | 12 + .../controllers/Report/ProductController.php | 20 + .../controllers/Report/ReviewController.php | 13 + .../controllers/Report/SalesController.php | 21 +- .../controllers/Report/ShopcartController.php | 12 + .../controllers/Report/TagController.php | 12 + .../controllers/ReportController.php | 2 + .../Sales/CreditmemoController.php | 9 + .../Sales/Order/CreateController.php | 10 +- .../Sales/Order/CreditmemoController.php | 18 +- .../Sales/Order/EditController.php | 13 + .../Sales/Order/InvoiceController.php | 5 + .../Sales/Order/ShipmentController.php | 10 +- .../controllers/Sales/OrderController.php | 58 +- .../controllers/SitemapController.php | 6 + .../controllers/SurveyController.php} | 34 +- .../controllers/System/AccountController.php | 2 + .../controllers/System/BackupController.php | 2 + .../controllers/System/ConfigController.php | 15 +- .../System/Convert/GuiController.php | 6 + .../System/Convert/ProfileController.php | 12 +- .../controllers/System/CurrencyController.php | 2 + .../controllers/System/DesignController.php | 6 + .../System/Email/TemplateController.php | 6 + .../controllers/System/StoreController.php | 15 + .../controllers/System/VariableController.php | 9 +- .../Adminhtml/controllers/TagController.php | 15 + .../Tax/Class/CustomerController.php | 10 + .../Tax/Class/ProductController.php | 10 + .../controllers/Tax/RateController.php | 30 +- .../controllers/Tax/RuleController.php | 10 + .../controllers/UrlrewriteController.php | 5 + app/code/core/Mage/Adminhtml/etc/config.xml | 8 + .../Block/Adminhtml/Shipping/Methods.php | 103 - .../Mage/AmazonPayments/Block/Cba/Form.php | 46 - .../AmazonPayments/Block/Cba/Redirect.php | 69 - .../core/Mage/AmazonPayments/Block/Form.php | 46 - .../AmazonPayments/Block/Link/Shortcut.php | 90 - .../AmazonPayments/Model/Api/Abstract.php | 157 - .../Mage/AmazonPayments/Model/Api/Asp.php | 217 - .../AmazonPayments/Model/Api/Asp/Abstract.php | 109 - .../AmazonPayments/Model/Api/Asp/Amount.php | 139 - .../Mage/AmazonPayments/Model/Api/Asp/Fps.php | 217 - .../Model/Api/Asp/Fps/Request/Abstract.php | 86 - .../Model/Api/Asp/Fps/Request/Cancel.php | 68 - .../Model/Api/Asp/Fps/Request/Refund.php | 92 - .../Model/Api/Asp/Fps/Request/Settle.php | 69 - .../Model/Api/Asp/Fps/Response/Abstract.php | 107 - .../Model/Api/Asp/Fps/Response/Cancel.php | 67 - .../Model/Api/Asp/Fps/Response/Error.php | 80 - .../Model/Api/Asp/Fps/Response/Refund.php | 67 - .../Model/Api/Asp/Fps/Response/Settle.php | 68 - .../Model/Api/Asp/Ipn/Request.php | 215 - .../Mage/AmazonPayments/Model/Api/Cba.php | 1007 ---- .../AmazonPayments/Model/Api/Cba/Document.php | 476 -- .../Mage/AmazonPayments/Model/Api/Debug.php | 44 - .../AmazonPayments/Model/Mysql4/Api/Debug.php | 45 - .../Model/Mysql4/Api/Debug/Collection.php | 45 - .../AmazonPayments/Model/Mysql4/Setup.php | 31 - .../Mage/AmazonPayments/Model/Observer.php | 58 - .../Mage/AmazonPayments/Model/Payment.php | 54 - .../Mage/AmazonPayments/Model/Payment/Asp.php | 435 -- .../Model/Payment/Asp/Abstract.php | 30 - .../AmazonPayments/Model/Payment/Asp/Fps.php | 35 - .../Model/Payment/Asp/Notification.php | 544 -- .../Payment/Asp/Source/PaymentAction.php | 49 - .../Mage/AmazonPayments/Model/Payment/Cba.php | 598 -- .../Mage/AmazonPayments/Model/Session.php | 39 - .../controllers/AspController.php | 155 - .../controllers/CbaController.php | 167 - .../core/Mage/AmazonPayments/etc/config.xml | 227 - .../core/Mage/AmazonPayments/etc/system.xml | 443 -- .../mysql4-install-0.1.2.php | 45 - .../mysql4-upgrade-0.1.0-0.1.1.php | 45 - .../mysql4-upgrade-0.1.1-0.1.2.php | 45 - .../Bundle/Model/Mysql4/Indexer/Price.php | 12 +- .../Bundle/Model/Mysql4/Indexer/Stock.php | 11 +- .../core/Mage/Bundle/Model/Product/Price.php | 11 +- .../core/Mage/Catalog/Block/Category/View.php | 37 +- .../Catalog/Block/Product/List/Toolbar.php | 136 +- .../core/Mage/Catalog/Block/Product/View.php | 15 +- .../core/Mage/Catalog/Helper/Category.php | 15 +- app/code/core/Mage/Catalog/Helper/Image.php | 15 + app/code/core/Mage/Catalog/Helper/Output.php | 13 + app/code/core/Mage/Catalog/Helper/Product.php | 16 +- .../Catalog/Model/Category/Indexer/Flat.php | 2 +- .../Model/Product/Attribute/Backend/Price.php | 5 +- .../core/Mage/Catalog/Model/Product/Image.php | 3 + .../core/Mage/Catalog/Model/Product/Type.php | 2 +- .../Mage/Catalog/Model/Product/Type/Price.php | 2 +- .../core/Mage/Catalog/Model/Product/Url.php | 9 +- .../Model/Resource/Eav/Mysql4/Abstract.php | 81 +- .../Eav/Mysql4/Category/Indexer/Product.php | 2 +- .../Resource/Eav/Mysql4/Category/Tree.php | 2 +- .../Eav/Mysql4/Product/Collection.php | 63 +- .../Product/Compare/Item/Collection.php | 6 +- .../Eav/Mysql4/Product/Indexer/Price.php | 51 +- .../Mysql4/Product/Indexer/Price/Default.php | 8 +- .../Catalog/Model/Resource/Eav/Mysql4/Url.php | 30 +- app/code/core/Mage/Catalog/Model/Url.php | 2 + .../controllers/Product/CompareController.php | 2 +- app/code/core/Mage/Catalog/etc/config.xml | 6 +- app/code/core/Mage/Catalog/etc/system.xml | 18 + .../mysql4-upgrade-1.4.0.0.18-1.4.0.0.19.php} | 15 +- .../mysql4-upgrade-1.4.0.0.19-1.4.0.0.20.php | 58 + .../mysql4-upgrade-1.4.0.0.20-1.4.0.0.21.php} | 17 +- .../CatalogIndex/Model/Mysql4/Aggregation.php | 13 + .../Model/Mysql4/Stock/Item.php | 15 +- app/code/core/Mage/CatalogRule/Model/Rule.php | 40 +- .../Model/Rule/Condition/Product.php | 87 +- .../core/Mage/CatalogSearch/Helper/Data.php | 2 +- .../Block/Adminhtml/Validation.php} | 46 +- .../Block/Adminhtml/Validation/Form.php} | 38 +- .../Block/Authentication.php} | 36 +- .../Block/Authentication/Complete.php} | 26 +- .../Block/Authentication/Start.php} | 24 +- .../Info.php => Centinel/Block/Logo.php} | 20 +- app/code/core/Mage/Centinel/Helper/Data.php | 181 + app/code/core/Mage/Centinel/Model/Api.php | 231 + app/code/core/Mage/Centinel/Model/Config.php | 140 + .../core/Mage/Centinel/Model/Observer.php | 105 + app/code/core/Mage/Centinel/Model/Service.php | 381 ++ .../Model/Session.php | 11 +- .../Mage/Centinel/Model/State/Mastercard.php | 173 + .../core/Mage/Centinel/Model/State/Visa.php | 184 + .../Mage/Centinel/Model/StateAbstract.php | 147 + .../Adminhtml/Centinel/IndexController.php | 116 + .../Centinel/controllers/IndexController.php | 87 + app/code/core/Mage/Centinel/etc/config.xml | 150 + app/code/core/Mage/Centinel/etc/system.xml | 87 + .../Checkout/Block/Multishipping/Overview.php | 67 + .../Mage/Checkout/Model/Type/Abstract.php | 3 + .../Checkout/Model/Type/Multishipping.php | 9 + .../core/Mage/Checkout/Model/Type/Onepage.php | 2 +- .../Checkout/controllers/CartController.php | 5 +- .../controllers/MultishippingController.php | 12 + .../controllers/OnepageController.php | 30 +- app/code/core/Mage/Chronopay/Block/Form.php | 42 - app/code/core/Mage/Chronopay/Block/Info.php | 48 - .../Mage/Chronopay/Block/Standard/Failure.php | 37 - .../Mage/Chronopay/Block/Standard/Form.php | 43 - .../Chronopay/Block/Standard/Redirect.php | 59 - app/code/core/Mage/Chronopay/Helper/Data.php | 38 - .../core/Mage/Chronopay/Model/Api/Debug.php | 41 - app/code/core/Mage/Chronopay/Model/Config.php | 126 - .../core/Mage/Chronopay/Model/Gateway.php | 336 -- .../Mage/Chronopay/Model/Gateway/Request.php | 38 - .../Mage/Chronopay/Model/Gateway/Result.php | 38 - .../Mage/Chronopay/Model/Mysql4/Api/Debug.php | 42 - .../Model/Mysql4/Api/Debug/Collection.php | 41 - .../Mage/Chronopay/Model/Mysql4/Setup.php | 39 - .../Mage/Chronopay/Model/Source/Cctype.php | 40 - .../Mage/Chronopay/Model/Source/Language.php | 50 - .../Chronopay/Model/Source/PaymentAction.php | 49 - .../core/Mage/Chronopay/Model/Standard.php | 269 - .../controllers/StandardController.php | 219 - app/code/core/Mage/Chronopay/etc/config.xml | 147 - app/code/core/Mage/Chronopay/etc/system.xml | 272 - .../chronopay_setup/mysql4-install-0.1.0.php | 45 - .../core/Mage/Cms/Block/Widget/Page/Link.php | 8 +- app/code/core/Mage/Cms/Model/Mysql4/Page.php | 46 +- .../sql/cms_setup/mysql4-install-0.7.0.php | 2 +- .../cms_setup/mysql4-upgrade-0.7.7-0.7.8.php | 2 +- .../controllers/ProcessController.php | 2 + app/code/core/Mage/Core/Block/Abstract.php | 13 +- app/code/core/Mage/Core/Block/Html/Select.php | 2 +- app/code/core/Mage/Core/Block/Template.php | 7 +- .../Mage/Core/Controller/Varien/Action.php | 56 + .../Mage/Core/Controller/Varien/Front.php | 39 + .../Controller/Varien/Router/Standard.php | 33 +- app/code/core/Mage/Core/Model/Config.php | 2 +- app/code/core/Mage/Core/Model/Cookie.php | 22 + .../core/Mage/Core/Model/Design/Package.php | 3 + .../core/Mage/Core/Model/Email/Template.php | 4 +- app/code/core/Mage/Core/Model/Flag.php | 4 + .../Mage/Core/Model/Mysql4/Email/Template.php | 5 +- .../core/Mage/Core/Model/Mysql4/Session.php | 12 +- .../Mage/Core/Model/Resource/Abstract.php | 5 +- .../Core/Model/Session/Abstract/Varien.php | 45 +- app/code/core/Mage/Core/Model/Url.php | 12 +- app/code/core/Mage/Core/Model/Variable.php | 4 +- app/code/core/Mage/Core/etc/config.xml | 3 +- app/code/core/Mage/Core/etc/system.xml | 10 + .../mysql4-upgrade-0.8.24-0.8.25.php} | 9 +- app/code/core/Mage/Cron/Model/Observer.php | 2 +- .../Model/Convert/Adapter/Customer.php | 8 +- .../core/Mage/Customer/Model/Customer.php | 73 +- .../Address/Attribute/Backend/Region.php | 15 +- .../controllers/AccountController.php | 39 +- app/code/core/Mage/Customer/etc/config.xml | 2 +- .../mysql4-upgrade-1.4.0.0.5-1.4.0.0.6.php} | 8 +- app/code/core/Mage/Cybermut/Block/Error.php | 37 - app/code/core/Mage/Cybermut/Block/Form.php | 43 - .../core/Mage/Cybermut/Block/Redirect.php | 67 - app/code/core/Mage/Cybermut/Helper/Data.php | 38 - .../core/Mage/Cybermut/Model/Api/Debug.php | 41 - .../Mage/Cybermut/Model/Mysql4/Api/Debug.php | 42 - .../Model/Mysql4/Api/Debug/Collection.php | 41 - .../core/Mage/Cybermut/Model/Mysql4/Setup.php | 39 - app/code/core/Mage/Cybermut/Model/Payment.php | 369 -- .../core/Mage/Cybermut/Model/Source/Bank.php | 49 - .../Mage/Cybermut/Model/Source/Language.php | 52 - .../controllers/PaymentController.php | 207 - app/code/core/Mage/Cybermut/etc/config.xml | 110 - app/code/core/Mage/Cybermut/etc/system.xml | 174 - .../cybermut_setup/mysql4-install-0.1.0.php | 45 - app/code/core/Mage/Cybersource/Block/Form.php | 96 - app/code/core/Mage/Cybersource/Block/Info.php | 75 - .../core/Mage/Cybersource/Helper/Data.php | 33 - .../core/Mage/Cybersource/Model/Api/Debug.php | 38 - .../Model/Api/ExtendedSoapClient.php | 121 - .../core/Mage/Cybersource/Model/Config.php | 62 - .../Cybersource/Model/Mysql4/Api/Debug.php | 39 - .../Model/Mysql4/Api/Debug/Collection.php | 39 - .../Mage/Cybersource/Model/Mysql4/Setup.php | 38 - app/code/core/Mage/Cybersource/Model/Soap.php | 579 -- .../Mage/Cybersource/Model/Source/Cctype.php | 33 - .../Model/Source/PaymentAction.php | 42 - app/code/core/Mage/Cybersource/etc/config.xml | 138 - app/code/core/Mage/Cybersource/etc/system.xml | 160 - .../mysql4-install-0.7.0.php | 54 - .../core/Mage/Directory/Block/Currency.php | 13 +- app/code/core/Mage/Directory/Helper/Url.php | 10 +- .../Model/Mysql4/Country/Collection.php | 2 +- app/code/core/Mage/Directory/etc/system.xml | 3 + .../Mage/Downloadable/Helper/Download.php | 4 +- .../core/Mage/Downloadable/Helper/File.php | 3 +- .../Mage/Downloadable/Model/Product/Type.php | 4 +- .../Model/Entity/Attribute/Source/Config.php | 3 +- app/code/core/Mage/Eav/Model/Entity/Setup.php | 1 + app/code/core/Mage/Eway/Block/Form.php | 42 - app/code/core/Mage/Eway/Block/Info.php | 48 - app/code/core/Mage/Eway/Block/Secure/Form.php | 41 - .../core/Mage/Eway/Block/Secure/Redirect.php | 57 - .../core/Mage/Eway/Block/Shared/Failure.php | 55 - app/code/core/Mage/Eway/Block/Shared/Form.php | 42 - .../core/Mage/Eway/Block/Shared/Redirect.php | 58 - .../core/Mage/Eway/Controller/Abstract.php | 178 - app/code/core/Mage/Eway/Helper/Data.php | 37 - app/code/core/Mage/Eway/Model/Api/Debug.php | 40 - app/code/core/Mage/Eway/Model/Direct.php | 296 - .../core/Mage/Eway/Model/Mysql4/Api/Debug.php | 40 - .../Model/Mysql4/Api/Debug/Collection.php | 40 - .../core/Mage/Eway/Model/Mysql4/Setup.php | 38 - app/code/core/Mage/Eway/Model/Secure.php | 54 - app/code/core/Mage/Eway/Model/Shared.php | 252 - .../core/Mage/Eway/Model/Source/Cctype.php | 40 - .../Eway/controllers/SharedController.php | 42 - app/code/core/Mage/Eway/etc/config.xml | 147 - app/code/core/Mage/Eway/etc/system.xml | 354 -- .../sql/eway_setup/mysql4-install-0.1.0.php | 46 - app/code/core/Mage/Flo2Cash/Block/Form.php | 41 - app/code/core/Mage/Flo2Cash/Block/Info.php | 48 - app/code/core/Mage/Flo2Cash/Helper/Data.php | 37 - .../core/Mage/Flo2Cash/Model/Api/Debug.php | 40 - .../Mage/Flo2Cash/Model/Mysql4/Api/Debug.php | 40 - .../Model/Mysql4/Api/Debug/Collection.php | 40 - .../core/Mage/Flo2Cash/Model/Mysql4/Setup.php | 37 - .../Mage/Flo2Cash/Model/Source/Cctype.php | 40 - .../Flo2Cash/Model/Source/PaymentAction.php | 49 - app/code/core/Mage/Flo2Cash/Model/Web.php | 298 - app/code/core/Mage/Flo2Cash/etc/config.xml | 121 - app/code/core/Mage/Flo2Cash/etc/system.xml | 176 - .../flo2cash_setup/mysql4-install-0.1.0.php | 47 - .../core/Mage/GiftMessage/Helper/Message.php | 6 +- .../core/Mage/GoogleAnalytics/Block/Ga.php | 26 +- .../core/Mage/GoogleBase/Model/Service.php | 22 +- .../Mage/GoogleBase/Model/Service/Item.php | 10 +- .../controllers/ItemsController.php | 35 +- .../controllers/TypesController.php | 17 + .../GoogleCheckout/Model/Api/Xml/Callback.php | 44 +- .../GoogleCheckout/Model/Api/Xml/Checkout.php | 9 +- .../controllers/RedirectController.php | 2 +- .../core/Mage/GoogleCheckout/etc/system.xml | 7 + .../Product/Edit/Tab/Googleoptimizer.php | 2 +- .../Block/Adminhtml/Cms/Page/Edit/Enable.php | 6 +- .../Cms/Page/Edit/Tab/Googleoptimizer.php | 4 +- .../core/Mage/GoogleOptimizer/Model/Code.php | 6 +- .../GoogleOptimizer/Model/Code/Category.php | 6 +- .../Mage/GoogleOptimizer/Model/Observer.php | 26 +- .../Mage/Ideal/Block/Advanced/Failure.php | 55 - .../core/Mage/Ideal/Block/Advanced/Form.php | 52 - .../core/Mage/Ideal/Block/Advanced/Info.php | 63 - .../Mage/Ideal/Block/Advanced/Redirect.php | 45 - .../core/Mage/Ideal/Block/Basic/Failure.php | 55 - app/code/core/Mage/Ideal/Block/Basic/Form.php | 42 - .../core/Mage/Ideal/Block/Basic/Redirect.php | 59 - app/code/core/Mage/Ideal/Helper/Data.php | 46 - app/code/core/Mage/Ideal/Model/Advanced.php | 227 - .../core/Mage/Ideal/Model/Api/Advanced.php | 507 -- .../Api/Advanced/AcquirerStatusRequest.php | 61 - .../Api/Advanced/AcquirerStatusResponse.php | 44 - .../Model/Api/Advanced/AcquirerTrxRequest.php | 84 - .../Api/Advanced/AcquirerTrxResponse.php | 41 - .../Model/Api/Advanced/DirectoryRequest.php | 36 - .../Model/Api/Advanced/DirectoryResponse.php | 50 - .../Mage/Ideal/Model/Api/Advanced/Issuer.php | 41 - .../Mage/Ideal/Model/Api/Advanced/Request.php | 80 - .../Ideal/Model/Api/Advanced/Response.php | 54 - .../Ideal/Model/Api/Advanced/Security.php | 155 - app/code/core/Mage/Ideal/Model/Api/Debug.php | 40 - app/code/core/Mage/Ideal/Model/Basic.php | 217 - .../Mage/Ideal/Model/Mysql4/Api/Debug.php | 42 - .../Model/Mysql4/Api/Debug/Collection.php | 41 - .../core/Mage/Ideal/Model/Mysql4/Setup.php | 37 - app/code/core/Mage/Ideal/Model/Observer.php | 58 - .../core/Mage/Ideal/Model/Source/Language.php | 47 - .../Ideal/controllers/AdvancedController.php | 195 - .../Ideal/controllers/BasicController.php | 247 - app/code/core/Mage/Ideal/etc/config.xml | 136 - app/code/core/Mage/Ideal/etc/system.xml | 326 -- .../sql/ideal_setup/mysql4-install-0.1.0.php | 51 - .../Adminhtml/ProcessController.php | 8 + app/code/core/Mage/Install/Block/End.php | 21 +- .../Install/controllers/WizardController.php | 2 + .../Model/Mysql4/Subscriber/Collection.php | 30 +- app/code/core/Mage/Ogone/Block/Form.php | 39 - app/code/core/Mage/Ogone/Block/Paypage.php | 41 - app/code/core/Mage/Ogone/Block/Placeform.php | 90 - app/code/core/Mage/Ogone/Helper/Data.php | 70 - app/code/core/Mage/Ogone/Model/Api.php | 257 - app/code/core/Mage/Ogone/Model/Api/Debug.php | 40 - app/code/core/Mage/Ogone/Model/Config.php | 151 - .../Mage/Ogone/Model/Mysql4/Api/Debug.php | 40 - .../Mage/Ogone/Model/Source/PaymentAction.php | 45 - .../core/Mage/Ogone/Model/Source/Pmlist.php | 45 - .../core/Mage/Ogone/Model/Source/Template.php | 44 - .../Mage/Ogone/controllers/ApiController.php | 492 -- app/code/core/Mage/Ogone/etc/config.xml | 137 - app/code/core/Mage/Ogone/etc/system.xml | 236 - .../sql/ogone_setup/mysql4-install-0.0.1.php | 46 - .../Oscommerce/Block/Adminhtml/Import.php | 43 - .../Block/Adminhtml/Import/Edit.php | 68 - .../Block/Adminhtml/Import/Edit/Form.php | 52 - .../Adminhtml/Import/Edit/Tab/General.php | 110 - .../Block/Adminhtml/Import/Edit/Tab/Run.php | 239 - .../Block/Adminhtml/Import/Edit/Tabs.php | 66 - .../Block/Adminhtml/Import/Grid.php | 94 - .../Oscommerce/Block/Adminhtml/Import/Run.php | 293 - .../Mage/Oscommerce/Block/Adminhtml/Order.php | 43 - .../Oscommerce/Block/Adminhtml/Order/Grid.php | 128 - .../Oscommerce/Block/Adminhtml/Order/View.php | 102 - .../core/Mage/Oscommerce/Block/Order/List.php | 73 - .../core/Mage/Oscommerce/Block/Order/View.php | 69 - app/code/core/Mage/Oscommerce/Helper/Data.php | 35 - .../core/Mage/Oscommerce/Model/Config.php | 49 - .../Oscommerce/Model/Mysql4/Oscommerce.php | 2113 ------- .../Model/Mysql4/Oscommerce/Collection.php | 38 - .../Model/Mysql4/Oscommerce/Order.php | 81 - .../Mysql4/Oscommerce/Order/Collection.php | 55 - .../core/Mage/Oscommerce/Model/Oscommerce.php | 87 - .../Oscommerce/Model/Oscommerce/Order.php | 55 - .../Adminhtml/ImportController.php | 422 -- .../controllers/Adminhtml/OrderController.php | 101 - .../controllers/OrderController.php | 100 - .../core/Mage/Oscommerce/etc/adminhtml.xml | 80 - .../core/Mage/Oscommerce/etc/charsets.xml | 595 -- app/code/core/Mage/Oscommerce/etc/config.xml | 159 - .../oscommerce_setup/mysql4-install-0.8.0.php | 72 - .../mysql4-upgrade-0.8.1-0.8.2.php | 41 - .../mysql4-upgrade-0.8.2-0.8.3.php | 125 - .../mysql4-upgrade-0.8.4-0.8.5.php | 37 - .../mysql4-upgrade-0.8.6-0.8.7.php | 39 - .../mysql4-upgrade-0.8.7-0.8.8.php | 41 - .../mysql4-upgrade-0.8.8-0.8.9.php | 41 - app/code/core/Mage/Page/Block/Html/Head.php | 5 +- app/code/core/Mage/Page/Block/Html/Pager.php | 51 +- .../core/Mage/Page/Block/Html/Wrapper.php | 29 +- .../Failure.php => Page/Block/Js/Cookie.php} | 40 +- .../Mage/Paybox/Block/Adminhtml/Cart/Type.php | 46 - .../core/Mage/Paybox/Block/Direct/Form.php | 42 - .../core/Mage/Paybox/Block/System/Error.php | 93 - .../core/Mage/Paybox/Block/System/Form.php | 42 - .../Mage/Paybox/Block/System/Redirect.php | 57 - app/code/core/Mage/Paybox/Helper/Data.php | 37 - app/code/core/Mage/Paybox/Model/Api/Debug.php | 40 - app/code/core/Mage/Paybox/Model/Direct.php | 506 -- .../Mage/Paybox/Model/Mysql4/Api/Debug.php | 40 - .../Model/Mysql4/Api/Debug/Collection.php | 40 - .../Paybox/Model/Mysql4/Question/Number.php | 41 - .../core/Mage/Paybox/Model/Mysql4/Setup.php | 37 - .../Mage/Paybox/Model/Question/Number.php | 95 - .../Mage/Paybox/Model/Source/CartType.php | 61 - .../core/Mage/Paybox/Model/Source/Cctype.php | 40 - .../Mage/Paybox/Model/Source/Language.php | 50 - .../Paybox/Model/Source/ManagementMode.php | 48 - .../Mage/Paybox/Model/Source/MethodCall.php | 45 - .../Paybox/Model/Source/PaymentAction.php | 43 - .../Mage/Paybox/Model/Source/PaymentMode.php | 45 - .../Mage/Paybox/Model/Source/PaymentType.php | 48 - app/code/core/Mage/Paybox/Model/System.php | 529 -- .../Paybox/controllers/SystemController.php | 364 -- app/code/core/Mage/Paybox/etc/config.xml | 120 - app/code/core/Mage/Paybox/etc/currency.xml | 209 - app/code/core/Mage/Paybox/etc/system.xml | 459 -- .../sql/paybox_setup/mysql4-install-0.1.0.php | 47 - .../mysql4-upgrade-0.1.1-0.1.2.php | 44 - .../core/Mage/Paygate/Model/Authorizenet.php | 6 +- .../core/Mage/Paygate/Model/Payflow/Pro.php | 53 +- app/code/core/Mage/Paygate/etc/system.xml | 30 + app/code/core/Mage/Payment/Block/Form/Cc.php | 43 + app/code/core/Mage/Payment/Block/Info.php | 56 +- app/code/core/Mage/Payment/Block/Info/Cc.php | 64 +- .../core/Mage/Payment/Block/Info/Ccsave.php | 34 +- app/code/core/Mage/Payment/Helper/Data.php | 2 +- .../core/Mage/Payment/Model/Method/Cc.php | 139 +- app/code/core/Mage/Payment/Model/Observer.php | 8 +- app/code/core/Mage/Payment/etc/adminhtml.xml | 3 + app/code/core/Mage/Payment/etc/config.xml | 5 + app/code/core/Mage/Payment/etc/system.xml | 39 +- .../core/Mage/Paypal/Block/Express/Review.php | 25 + .../Paypal/Block/Express/Review/Details.php | 10 - .../Mage/Paypal/Block/Express/Shortcut.php | 84 +- .../core/Mage/Paypal/Block/Payment/Info.php | 63 +- .../core/Mage/Paypal/Block/Standard/Form.php | 2 +- .../Paypal/Controller/Express/Abstract.php | 315 ++ .../Mage/Paypal/Controller/Ipn/Abstract.php | 81 + app/code/core/Mage/Paypal/Helper/Currency.php | 230 - app/code/core/Mage/Paypal/Helper/Data.php | 30 + .../core/Mage/Paypal/Model/Api/Abstract.php | 53 +- app/code/core/Mage/Paypal/Model/Api/Nvp.php | 142 +- .../core/Mage/Paypal/Model/Api/Standard.php | 3 +- app/code/core/Mage/Paypal/Model/Config.php | 119 +- app/code/core/Mage/Paypal/Model/Direct.php | 74 +- app/code/core/Mage/Paypal/Model/Express.php | 43 +- .../Mage/Paypal/Model/Express/Checkout.php | 71 +- app/code/core/Mage/Paypal/Model/Info.php | 6 +- app/code/core/Mage/Paypal/Model/Ipn.php | 5 +- app/code/core/Mage/Paypal/Model/Pro.php | 106 +- .../Paypal/controllers/ExpressController.php | 249 +- .../Mage/Paypal/controllers/IpnController.php | 44 +- app/code/core/Mage/Paypal/etc/system.xml | 62 +- .../core/Mage/PaypalUk/Block/Direct/Form.php | 106 - .../core/Mage/PaypalUk/Block/Direct/Info.php | 74 - .../core/Mage/PaypalUk/Block/Express/Form.php | 13 +- .../core/Mage/PaypalUk/Block/Express/Info.php | 60 - .../Mage/PaypalUk/Block/Express/Review.php | 116 - .../PaypalUk/Block/Express/Review/Details.php | 65 - .../Mage/PaypalUk/Block/Link/Shortcut.php | 65 - .../core/Mage/PaypalUk/Model/Api/Abstract.php | 312 -- app/code/core/Mage/PaypalUk/Model/Api/Nvp.php | 485 ++ app/code/core/Mage/PaypalUk/Model/Api/Pro.php | 555 -- .../core/Mage/PaypalUk/Model/Api/Result.php | 38 - app/code/core/Mage/PaypalUk/Model/Config.php | 198 + app/code/core/Mage/PaypalUk/Model/Direct.php | 208 +- app/code/core/Mage/PaypalUk/Model/Express.php | 469 +- .../Model/Express/Checkout.php} | 22 +- .../Mage/PaypalUk/Model/Express/Review.php | 154 - .../Mage/PaypalUk/Model/Mysql4/Api/Debug.php | 34 - .../Model/Mysql4/Api/Debug/Collection.php | 34 - app/code/core/Mage/PaypalUk/Model/Pro.php | 126 + .../Mage/PaypalUk/Model/Source/Cctype.php | 33 - .../PaypalUk/Model/Source/PaymentAction.php | 42 - .../controllers/ExpressController.php | 298 +- .../controllers/IpnController.php} | 33 +- app/code/core/Mage/PaypalUk/etc/config.xml | 27 - app/code/core/Mage/PaypalUk/etc/system.xml | 76 +- .../Mage/Protx/Block/Standard/Failure.php | 56 - .../core/Mage/Protx/Block/Standard/Form.php | 43 - .../Mage/Protx/Block/Standard/Redirect.php | 58 - app/code/core/Mage/Protx/Helper/Data.php | 38 - app/code/core/Mage/Protx/Model/Api/Debug.php | 41 - app/code/core/Mage/Protx/Model/Config.php | 179 - .../Mage/Protx/Model/Mysql4/Api/Debug.php | 42 - .../Model/Mysql4/Api/Debug/Collection.php | 41 - .../core/Mage/Protx/Model/Mysql4/Setup.php | 39 - app/code/core/Mage/Protx/Model/Session.php | 42 - .../Mage/Protx/Model/Source/ModeAction.php | 49 - .../Mage/Protx/Model/Source/PaymentAction.php | 46 - app/code/core/Mage/Protx/Model/Standard.php | 456 -- .../Protx/controllers/StandardController.php | 279 - app/code/core/Mage/Protx/etc/config.xml | 109 - app/code/core/Mage/Protx/etc/system.xml | 167 - .../sql/protx_setup/mysql4-install-0.1.0.php | 46 - .../Model/Mysql4/Report/Collection.php | 48 +- app/code/core/Mage/Reports/etc/adminhtml.xml | 6 +- .../core/Mage/Review/Block/Customer/View.php | 10 + .../Review/controllers/CustomerController.php | 13 + .../core/Mage/Rss/Block/Catalog/Special.php | 2 +- .../Mage/Rule/Model/Condition/Abstract.php | 7 +- .../core/Mage/Sales/Block/Items/Abstract.php | 20 +- .../core/Mage/Sales/Block/Reorder/Sidebar.php | 5 +- .../core/Mage/Sales/Model/Mysql4/Order.php | 4 +- .../Sales/Model/Mysql4/Report/Invoiced.php | 11 +- .../Sales/Model/Mysql4/Report/Refunded.php | 11 +- .../Sales/Model/Mysql4/Report/Shipping.php | 10 +- .../Sales/Model/Mysql4/Sale/Collection.php | 113 +- .../core/Mage/Sales/Model/Mysql4/Setup.php | 2 + app/code/core/Mage/Sales/Model/Order.php | 91 +- .../core/Mage/Sales/Model/Order/Config.php | 3 +- .../Mage/Sales/Model/Order/Creditmemo.php | 1 + .../core/Mage/Sales/Model/Order/Invoice.php | 47 +- .../core/Mage/Sales/Model/Order/Payment.php | 209 +- app/code/core/Mage/Sales/Model/Quote.php | 2 +- .../core/Mage/Sales/Model/Quote/Address.php | 5 +- app/code/core/Mage/Sales/etc/config.xml | 20 +- .../mysql4-upgrade-0.8.8-0.8.9.php | 16 +- .../mysql4-upgrade-0.9.45-0.9.46.php | 15 +- .../mysql4-upgrade-0.9.46-0.9.47.php | 34 +- .../mysql4-upgrade-0.9.47-0.9.48.php | 35 +- .../mysql4-upgrade-0.9.48-0.9.49.php | 37 +- .../mysql4-upgrade-0.9.49-0.9.50.php | 34 +- .../mysql4-upgrade-0.9.5-0.9.6.php | 16 +- .../mysql4-upgrade-0.9.54-0.9.55.php} | 12 +- .../mysql4-upgrade-0.9.55-0.9.56.php} | 9 +- .../core/Mage/SalesRule/Model/Mysql4/Rule.php | 4 +- .../Model/Rule/Condition/Address.php | 5 + .../mysql4-upgrade-0.7.10-0.7.11.php | 32 +- app/code/core/Mage/Shipping/Helper/Data.php | 3 +- .../Model/Mysql4/Carrier/Tablerate.php | 13 +- .../core/Mage/Shipping/Model/Shipping.php | 1 + app/code/core/Mage/Shipping/etc/system.xml | 3 + app/code/core/Mage/Sitemap/Model/Sitemap.php | 14 +- app/code/core/Mage/Strikeiron/Helper/Data.php | 38 - .../Model/Currency/Import/Strikeiron.php | 104 - .../Mage/Strikeiron/Model/Mysql4/Taxrate.php | 106 - .../Model/Mysql4/Taxrate/Collection.php | 51 - .../Model/Service/AddressVerification.php | 49 - .../Mage/Strikeiron/Model/Service/Base.php | 61 - .../Model/Service/EmailVerification.php | 48 - .../Model/Service/ForeignExchangeRates.php | 45 - .../Strikeiron/Model/Service/SalesUseTax.php | 40 - .../Model/Service/SalesUseTaxBasic.php | 45 - .../Model/Service/SalesUseTaxComplete.php | 45 - .../Model/Service/UsAddressVerification.php | 45 - .../core/Mage/Strikeiron/Model/Session.php | 39 - .../Model/Source/ErrorAddressAction.php | 42 - .../Strikeiron/Model/Source/SalesTaxType.php | 42 - .../Model/Source/Salestaxminmax.php | 42 - .../Model/Source/UndeterminedEmailAction.php | 42 - .../core/Mage/Strikeiron/Model/Strikeiron.php | 391 -- .../core/Mage/Strikeiron/Model/Taxrate.php | 37 - .../Strikeiron/controllers/TestController.php | 42 - .../core/Mage/Strikeiron/etc/adminhtml.xml | 49 - app/code/core/Mage/Strikeiron/etc/config.xml | 140 - app/code/core/Mage/Strikeiron/etc/system.xml | 291 - .../strikeiron_setup/mysql4-install-0.9.1.php | 48 - .../Mage/Tag/controllers/IndexController.php | 3 +- app/code/core/Mage/Tag/etc/config.xml | 2 +- .../tag_setup/mysql4-upgrade-0.7.4-0.7.5.php} | 32 +- .../core/Mage/Tax/Block/Sales/Order/Tax.php | 5 +- app/code/core/Mage/Tax/Helper/Data.php | 16 +- app/code/core/Mage/Tax/Model/Calculation.php | 10 +- app/code/core/Mage/Tax/Model/Mysql4/Tax.php | 2 +- .../Tax/Model/Sales/Total/Quote/Subtotal.php | 4 +- .../Mage/Tax/Model/Sales/Total/Quote/Tax.php | 19 +- .../mysql4-upgrade-0.7.10-0.7.11.php | 18 +- .../Usa/Model/Shipping/Carrier/Abstract.php | 23 +- .../Mage/Usa/Model/Shipping/Carrier/Usps.php | 39 +- app/code/core/Mage/Usa/etc/config.xml | 4 +- app/code/core/Mage/Usa/etc/system.xml | 10 + .../Mage/Widget/Block/Adminhtml/Widget.php | 2 +- .../Widget/Block/Adminhtml/Widget/Form.php | 2 +- .../Mage/Widget/Model/Template/Filter.php | 8 +- .../Adminhtml/Widget/InstanceController.php | 7 + .../Mage/Wishlist/Controller/Abstract.php | 2 +- .../default/layout/adminnotification.xml} | 15 +- .../default/default/layout/centinel.xml | 70 + .../adminhtml/default/default/layout/main.xml | 6 +- .../template/api/role_users_grid_js.phtml | 9 +- .../creditmemo/create/items/renderer.phtml | 4 +- .../creditmemo/view/items/renderer.phtml | 4 +- .../sales/invoice/create/items/renderer.phtml | 4 +- .../sales/invoice/view/items/renderer.phtml | 4 +- .../sales/order/view/items/renderer.phtml | 4 +- .../shipment/create/items/renderer.phtml | 4 +- .../sales/shipment/view/items/renderer.phtml | 4 +- .../template/catalog/category/edit/form.phtml | 2 +- .../form/renderer/fieldset/element.phtml | 2 +- .../catalog/product/attribute/js.phtml | 10 +- .../catalog/product/attribute/set/main.phtml | 4 +- .../template/catalog/product/created.phtml | 1 + .../catalog/product/edit/categories.phtml | 7 +- .../catalog/product/edit/price/tier.phtml | 8 +- .../catalog/product/edit/super/config.phtml | 9 + .../default/template/catalog/wysiwyg/js.phtml | 10 + .../authentication/complete.phtml} | 19 +- .../authentication/start.phtml} | 19 +- .../validation/form.phtml} | 12 +- .../default/template/chronopay/form.phtml | 81 - .../default/template/chronopay/info.phtml | 31 - .../template/customer/tab/addresses.phtml | 4 +- .../template/customer/tab/view/sales.phtml | 8 +- .../default/template/cybersource/form.phtml | 162 - .../default/template/cybersource/info.phtml | 39 - .../template/cybersource/pdf/info.phtml | 43 - .../column/downloadable/creditmemo/name.phtml | 4 +- .../column/downloadable/invoice/name.phtml | 4 +- .../items/column/downloadable/name.phtml | 4 +- .../default/default/template/eway/form.phtml | 82 - .../default/default/template/eway/info.phtml | 30 - .../default/template/eway/pdf/info.phtml | 31 - .../default/template/flo2cash/form.phtml | 82 - .../default/template/flo2cash/info.phtml | 31 - .../template/ideal/advanced/pdf/info.phtml | 29 - .../default/template/media/editor.phtml | 1 + .../default/template/media/uploader.phtml | 1 + .../template/notification/survey.phtml | 56 + .../default/default/template/ogone/info.phtml | 29 - .../template/oscommerce/convert/run.phtml | 252 - .../template/oscommerce/order/view.phtml | 241 - .../default/template/page/header.phtml | 2 +- .../paybox/adminhtml/cart/type/select.phtml | 45 - .../default/template/paybox/direct/form.phtml | 82 - .../default/template/paybox/direct/info.phtml | 31 - .../template/paybox/direct/pdf/info.phtml | 33 - .../default/template/payment/form/cc.phtml | 2 +- .../template/payment/form/ccsave.phtml | 2 +- .../default/template/payment/info/cc.phtml | 41 - .../template/payment/info/ccsave.phtml | 34 - .../template/payment/info/pdf/cc.phtml | 42 - .../template/payment/info/pdf/ccsave.phtml | 31 - .../template/paypaluk/direct/form.phtml | 165 - .../template/paypaluk/direct/info.phtml | 38 - .../template/paypaluk/direct/pdf/info.phtml | 41 - .../template/paypaluk/express/info.phtml | 28 - .../template/paypaluk/express/pdf/info.phtml | 30 - .../permissions/role_users_grid_js.phtml | 3 + .../default/template/poll/answers/list.phtml | 11 +- .../template/report/grid/container.phtml | 2 +- .../template/report/store/switcher.phtml | 2 +- .../report/store/switcher/enhanced.phtml | 2 +- .../template/sales/items/column/name.phtml | 6 +- .../sales/items/renderer/default.phtml | 4 +- .../template/sales/order/create/data.phtml | 10 +- .../sales/order/create/items/grid.phtml | 4 +- .../sales/order/create/sidebar/items.phtml | 2 +- .../template/sales/order/create/totals.phtml | 2 +- .../sales/order/invoice/create/items.phtml | 31 +- .../sales/order/shipment/view/tracking.phtml | 4 +- .../template/sales/order/view/info.phtml | 2 +- .../default/template/store/switcher.phtml | 2 +- .../template/system/cache/additional.phtml | 2 +- .../template/system/email/template/edit.phtml | 2 +- .../default/template/weee/renderer/tax.phtml | 8 +- .../frontend/base/default/etc/widget.xml | 12 +- .../base/default/layout/amazonpayments.xml | 61 - .../frontend/base/default/layout/bundle.xml | 22 + .../frontend/base/default/layout/catalog.xml | 7 +- .../layout/{oscommerce.xml => centinel.xml} | 26 +- .../frontend/base/default/layout/checkout.xml | 14 +- .../base/default/layout/chronopay.xml | 42 - .../frontend/base/default/layout/customer.xml | 4 +- .../frontend/base/default/layout/cybermut.xml | 40 - .../base/default/layout/downloadable.xml | 22 + .../frontend/base/default/layout/eway.xml | 53 - .../base/default/layout/googleanalytics.xml | 2 +- .../frontend/base/default/layout/ideal.xml | 51 - .../base/default/layout/newsletter.xml | 6 +- .../frontend/base/default/layout/ogone.xml | 59 - .../frontend/base/default/layout/page.xml | 2 + .../frontend/base/default/layout/paybox.xml | 56 - .../frontend/base/default/layout/paypal.xml | 14 +- .../frontend/base/default/layout/paypaluk.xml | 71 +- .../frontend/base/default/layout/protx.xml | 43 - .../frontend/base/default/layout/review.xml | 6 +- .../frontend/base/default/layout/tag.xml | 6 +- .../template/amazonpayments/asp/form.phtml | 32 - .../amazonpayments/asp/redirect.phtml | 39 - .../amazonpayments/asp/shortcut.phtml | 31 - .../template/amazonpayments/cba/form.phtml | 32 - .../template/amazonpayments/cba/success.phtml | 35 - .../template/amazonpayments/link.phtml | 51 - .../order/items/creditmemo/default.phtml | 16 +- .../email/order/items/invoice/default.phtml | 16 +- .../email/order/items/order/default.phtml | 14 +- .../email/order/items/shipment/default.phtml | 4 +- .../order/creditmemo/items/renderer.phtml | 4 +- .../sales/order/invoice/items/renderer.phtml | 4 +- .../bundle/sales/order/items/renderer.phtml | 4 +- .../sales/order/shipment/items/renderer.phtml | 4 +- .../default/template/callouts/left_col.phtml | 6 +- .../default/template/callouts/right_col.phtml | 10 +- .../template/catalog/category/view.phtml | 2 +- .../template/catalog/navigation/left.phtml | 4 +- .../template/catalog/navigation/top.phtml | 12 +- .../catalog/product/compare/list.phtml | 2 +- .../template/catalog/product/list.phtml | 4 +- .../template/catalog/product/view.phtml | 4 +- .../template/catalog/product/view/media.phtml | 2 +- .../catalog/product/view/options/js.phtml | 7 +- .../template/catalogsearch/form.mini.phtml | 2 +- .../template/catalogsearch/result.phtml | 2 +- .../template/centinel/authentication.phtml | 71 + .../centinel/authentication/complete.phtml} | 15 +- .../centinel/authentication/start.phtml} | 24 +- .../base/default/template/centinel/logo.phtml | 33 + .../base/default/template/checkout/cart.phtml | 3 +- .../template/checkout/cart/coupon.phtml | 22 +- .../template/checkout/cart/crosssell.phtml | 3 +- .../template/checkout/cart/item/default.phtml | 4 +- .../template/checkout/cart/shipping.phtml | 193 +- .../checkout/multishipping/agreements.phtml | 2 +- .../checkout/multishipping/billing.phtml | 2 +- .../checkout/multishipping/item/default.phtml | 2 +- .../checkout/multishipping/overview.phtml | 138 +- .../multishipping/overview}/item.phtml | 54 +- .../checkout/multishipping/shipping.phtml | 8 +- .../checkout/onepage/agreements.phtml | 2 +- .../template/checkout/onepage/link.phtml | 2 +- .../template/checkout/onepage/login.phtml | 1 + .../template/checkout/onepage/payment.phtml | 2 +- .../template/checkout/onepage/review.phtml | 26 +- .../checkout/onepage/review/info.phtml | 63 +- .../onepage/shipping_method/additional.phtml | 4 +- .../onepage/shipping_method/available.phtml | 2 +- .../template/checkout/total/default.phtml | 4 +- .../default/template/chronopay/form.phtml | 90 - .../default/template/chronopay/info.phtml | 34 - .../template/chronopay/standard/failure.phtml | 30 - .../template/chronopay/standard/form.phtml | 30 - .../template/customer/address/book.phtml | 27 +- .../template/customer/form/newsletter.phtml | 1 + .../template/customer/form/register.phtml | 1 + .../default/template/cybermut/error.phtml | 30 - .../base/default/template/cybermut/form.phtml | 30 - .../default/template/cybersource/form.phtml | 190 - .../default/template/cybersource/info.phtml | 38 - .../default/template/directory/currency.phtml | 15 +- .../checkout/cart/item/default.phtml | 2 +- .../multishipping/item/downloadable.phtml | 2 +- .../checkout/onepage/review/item.phtml | 2 +- .../downloadable/customer/products/list.phtml | 2 +- .../order/items/creditmemo/downloadable.phtml | 4 +- .../order/items/invoice/downloadable.phtml | 4 +- .../order/items/order/downloadable.phtml | 4 +- .../items/renderer/downloadable.phtml | 4 +- .../invoice/items/renderer/downloadable.phtml | 4 +- .../order/items/renderer/downloadable.phtml | 4 +- .../order/items/creditmemo/default.phtml | 16 +- .../email/order/items/invoice/default.phtml | 16 +- .../email/order/items/order/default.phtml | 16 +- .../email/order/items/shipment/default.phtml | 4 +- .../template/email/productalert/price.phtml | 2 +- .../template/email/productalert/stock.phtml | 2 +- .../base/default/template/eway/form.phtml | 91 - .../base/default/template/eway/info.phtml | 33 - .../template/eway/secure/failure.phtml | 31 - .../default/template/eway/secure/form.phtml | 30 - .../template/eway/shared/failure.phtml | 31 - .../default/template/eway/shared/form.phtml | 30 - .../base/default/template/flo2cash/form.phtml | 90 - .../base/default/template/flo2cash/info.phtml | 34 - .../template/ideal/advanced/failure.phtml | 31 - .../template/ideal/advanced/form.phtml | 42 - .../template/ideal/advanced/info.phtml | 33 - .../template/ideal/basic/failure.phtml | 31 - .../default/template/ideal/basic/form.phtml | 30 - .../base/default/template/ogone/form.phtml | 33 - .../base/default/template/ogone/info.phtml | 27 - .../base/default/template/ogone/paypage.phtml | 28 - .../default/template/ogone/placeform.phtml | 43 - .../template/oscommerce/order/list.phtml | 56 - .../template/oscommerce/order/view.phtml | 141 - .../base/default/template/page/1column.phtml | 1 + .../default/template/page/2columns-left.phtml | 1 + .../template/page/2columns-right.phtml | 1 + .../base/default/template/page/3columns.phtml | 1 + .../base/default/template/page/empty.phtml | 11 +- .../info.phtml => page/js/cookie.phtml} | 13 +- .../base/default/template/page/popup.phtml | 1 + .../default/template/paybox/direct/form.phtml | 92 - .../default/template/paybox/direct/info.phtml | 34 - .../template/paybox/system/error.phtml | 31 - .../default/template/paybox/system/form.phtml | 30 - .../default/template/payment/form/cc.phtml | 107 +- .../template/payment/form/ccsave.phtml | 1 + .../default/template/payment/info/cc.phtml | 41 - .../template/payment/info/ccsave.phtml | 29 - .../template/payment/info/default.phtml | 14 +- .../template/paypal/express/review.phtml | 171 +- .../paypal/express/review/details.phtml | 55 +- .../template/paypal/express/shortcut.phtml | 2 +- .../template/paypal/payment/mark.phtml | 2 +- .../template/paypaluk/direct/form.phtml | 127 - .../template/paypaluk/direct/info.phtml | 41 - .../template/paypaluk/express/form.phtml | 37 - .../template/paypaluk/express/review.phtml | 145 - .../paypaluk/express/review/details.phtml | 75 - .../base/default/template/paypaluk/link.phtml | 27 - .../base/default/template/poll/active.phtml | 4 +- .../base/default/template/poll/result.phtml | 4 +- .../template/protx/standard/failure.phtml | 31 - .../template/protx/standard/form.phtml | 30 - .../template/review/customer/view.phtml | 8 +- .../base/default/template/review/form.phtml | 1 + .../review/helper/summary_short.phtml | 4 +- .../creditmemo/items/renderer/default.phtml | 4 +- .../template/sales/order/details.phtml | 4 +- .../default/template/sales/order/info.phtml | 5 +- .../invoice/items/renderer/default.phtml | 4 +- .../sales/order/items/renderer/default.phtml | 4 +- .../shipment/items/renderer/default.phtml | 4 +- .../default/template/sales/order/view.phtml | 6 +- .../template/shipping/tracking/popup.phtml | 4 +- .../template/tag/customer/recent.phtml | 2 +- .../default/template/tag/customer/view.phtml | 2 +- .../base/default/template/tag/list.phtml | 1 + .../base/default/template/wishlist/view.phtml | 6 +- .../frontend/default/blank/etc/widget.xml | 12 +- .../frontend/default/default/etc/widget.xml | 12 +- .../frontend/default/iphone/etc/widget.xml | 12 +- .../default/iphone/layout/amazonpayments.xml | 61 - .../frontend/default/iphone/layout/bundle.xml | 11 + .../default/iphone/layout/checkout.xml | 2 + .../default/iphone/layout/chronopay.xml | 42 - .../default/iphone/layout/cybermut.xml | 40 - .../default/iphone/layout/downloadable.xml | 11 + .../frontend/default/iphone/layout/eway.xml | 53 - .../default/iphone/layout/googleanalytics.xml | 2 +- .../frontend/default/iphone/layout/ideal.xml | 51 - .../frontend/default/iphone/layout/ogone.xml | 59 - .../default/iphone/layout/oscommerce.xml | 41 - .../frontend/default/iphone/layout/page.xml | 2 + .../frontend/default/iphone/layout/paybox.xml | 56 - .../frontend/default/iphone/layout/protx.xml | 43 - .../template/amazonpayments/asp/form.phtml | 35 - .../amazonpayments/asp/redirect.phtml | 37 - .../amazonpayments/asp/shortcut.phtml | 33 - .../template/amazonpayments/cba/form.phtml | 35 - .../template/amazonpayments/cba/success.phtml | 35 - .../iphone/template/amazonpayments/link.phtml | 49 - .../bundle/catalog/product/list/partof.phtml | 52 - .../bundle/catalog/product/price.phtml | 263 - .../bundle/catalog/product/view/price.phtml | 93 - .../catalog/product/view/tierprices.phtml | 41 - .../view/type/bundle/option/checkbox.phtml | 49 - .../view/type/bundle/option/multi.phtml | 46 - .../view/type/bundle/option/radio.phtml | 79 - .../view/type/bundle/option/select.phtml | 68 - .../product/view/type/bundle/options.phtml | 45 - .../order/items/creditmemo/default.phtml | 168 - .../email/order/items/invoice/default.phtml | 169 - .../email/order/items/order/default.phtml | 174 - .../email/order/items/shipment/default.phtml | 92 - .../order/creditmemo/items/renderer.phtml | 372 -- .../sales/order/invoice/items/renderer.phtml | 353 -- .../bundle/sales/order/items/renderer.phtml | 376 -- .../sales/order/shipment/items/renderer.phtml | 112 - .../iphone/template/callouts/left_col.phtml | 38 - .../iphone/template/callouts/right_col.phtml | 30 - .../template/catalog/product/list.phtml | 2 +- .../catalog/product/view/bundle.phtml | 2 +- .../catalog/product/view/description.phtml | 2 +- .../catalog/product/view/options/js.phtml | 6 +- .../template/checkout/cart/item/default.phtml | 4 +- .../template/checkout/cart/shipping.phtml | 19 + .../template/checkout/cart/sidebar.phtml | 2 +- .../checkout/multishipping/item/default.phtml | 2 +- .../checkout/multishipping/overview.phtml | 1 + .../checkout/multishipping/shipping.phtml | 8 +- .../checkout/onepage/review/info.phtml | 1 + .../onepage/shipping_method/additional.phtml | 4 +- .../onepage/shipping_method/available.phtml | 2 +- .../iphone/template/chronopay/form.phtml | 89 - .../iphone/template/chronopay/info.phtml | 34 - .../template/chronopay/standard/failure.phtml | 30 - .../template/chronopay/standard/form.phtml | 34 - .../template/customer/address/book.phtml | 27 +- .../iphone/template/cybermut/error.phtml | 30 - .../iphone/template/cybermut/form.phtml | 34 - .../iphone/template/cybersource/form.phtml | 185 - .../iphone/template/cybersource/info.phtml | 38 - .../iphone/template/directory/currency.phtml | 54 - .../template/directory/currency/switch.phtml | 31 - .../downloadable/catalog/product/links.phtml | 111 - .../catalog/product/samples.phtml | 45 - .../downloadable/catalog/product/type.phtml | 45 - .../checkout/cart/item/default.phtml | 103 - .../multishipping/item/downloadable.phtml | 57 - .../checkout/onepage/review/item.phtml | 72 - .../downloadable/checkout/success.phtml | 29 - .../downloadable/customer/products/list.phtml | 66 - .../order/items/creditmemo/downloadable.phtml | 128 - .../order/items/invoice/downloadable.phtml | 131 - .../order/items/order/downloadable.phtml | 137 - .../items/renderer/downloadable.phtml | 112 - .../invoice/items/renderer/downloadable.phtml | 109 - .../order/items/renderer/downloadable.phtml | 131 - .../email/order/creditmemo/items.phtml | 51 - .../template/email/order/invoice/items.phtml | 51 - .../iphone/template/email/order/items.phtml | 59 - .../order/items/creditmemo/default.phtml | 120 - .../email/order/items/invoice/default.phtml | 120 - .../email/order/items/order/default.phtml | 126 - .../email/order/items/shipment/default.phtml | 43 - .../template/email/order/shipment/items.phtml | 47 - .../template/email/order/shipment/track.phtml | 46 - .../template/email/productalert/price.phtml | 50 - .../template/email/productalert/stock.phtml | 50 - .../default/iphone/template/eway/form.phtml | 90 - .../default/iphone/template/eway/info.phtml | 33 - .../iphone/template/eway/secure/failure.phtml | 31 - .../iphone/template/eway/secure/form.phtml | 34 - .../iphone/template/eway/shared/failure.phtml | 31 - .../iphone/template/eway/shared/form.phtml | 34 - .../iphone/template/flo2cash/form.phtml | 89 - .../iphone/template/flo2cash/info.phtml | 34 - .../template/ideal/advanced/failure.phtml | 31 - .../iphone/template/ideal/advanced/form.phtml | 44 - .../iphone/template/ideal/advanced/info.phtml | 33 - .../iphone/template/ideal/basic/failure.phtml | 31 - .../iphone/template/ideal/basic/form.phtml | 34 - .../default/iphone/template/ogone/form.phtml | 35 - .../default/iphone/template/ogone/info.phtml | 27 - .../iphone/template/ogone/paypage.phtml | 28 - .../iphone/template/ogone/placeform.phtml | 42 - .../template/oscommerce/order/list.phtml | 56 - .../template/oscommerce/order/view.phtml | 139 - .../iphone/template/page/1column.phtml | 1 + .../iphone/template/page/2columns-left.phtml | 1 + .../iphone/template/page/2columns-right.phtml | 1 + .../iphone/template/page/3columns.phtml | 1 + .../iphone/template/page/dashboard.phtml | 1 + .../iphone/template/page/one-column.phtml | 1 + .../iphone/template/paybox/direct/form.phtml | 90 - .../iphone/template/paybox/direct/info.phtml | 34 - .../iphone/template/paybox/system/error.phtml | 31 - .../iphone/template/paybox/system/form.phtml | 34 - .../iphone/template/payment/info/ccsave.phtml | 29 - .../iphone/template/paypal/express/form.phtml | 34 - .../iphone/template/paypal/express/info.phtml | 28 - .../template/paypal/express/review.phtml | 170 - .../paypal/express/review/details.phtml | 74 - .../default/iphone/template/paypal/link.phtml | 27 - .../template/paypal/standard/form.phtml | 34 - .../template/paypaluk/direct/form.phtml | 126 - .../template/paypaluk/direct/info.phtml | 37 - .../template/paypaluk/express/form.phtml | 34 - .../template/paypaluk/express/info.phtml | 28 - .../template/paypaluk/express/review.phtml | 170 - .../paypaluk/express/review/details.phtml | 74 - .../iphone/template/paypaluk/link.phtml | 27 - .../default/iphone/template/poll/active.phtml | 4 +- .../default/iphone/template/poll/result.phtml | 4 +- .../template/protx/standard/failure.phtml | 31 - .../iphone/template/protx/standard/form.phtml | 34 - .../template/review/customer/view.phtml | 8 +- .../template/sales/order/creditmemo.phtml | 4 +- .../iphone/template/sales/order/details.phtml | 2 +- .../iphone/template/sales/order/invoice.phtml | 4 +- .../sales/order/items/renderer/default.phtml | 4 +- .../iphone/template/sales/order/print.phtml | 2 +- .../sales/order/print/creditmemo.phtml | 4 +- .../template/sales/order/print/shipment.phtml | 4 +- .../template/sales/order/shipment.phtml | 4 +- .../iphone/template/sales/order/view.phtml | 2 +- .../template/shipping/tracking/popup.phtml | 4 +- .../iphone/template/tag/customer/view.phtml | 2 +- .../iphone/template/tag/product/result.phtml | 2 +- .../modern/assets/button_templates.psd | Bin 1391169 -> 0 bytes .../frontend/default/modern/etc/widget.xml | 12 +- .../default/modern/layout/amazonpayments.xml | 61 - .../frontend/default/modern/layout/bundle.xml | 319 -- .../default/modern/layout/catalog.xml | 118 +- .../default/modern/layout/catalogsearch.xml | 32 +- .../default/modern/layout/checkout.xml | 23 +- .../default/modern/layout/chronopay.xml | 42 - .../frontend/default/modern/layout/cms.xml | 83 - .../frontend/default/modern/layout/core.xml | 33 - .../default/modern/layout/customer.xml | 34 +- .../default/modern/layout/cybermut.xml | 40 - .../default/modern/layout/directory.xml | 74 - .../default/modern/layout/downloadable.xml | 169 - .../frontend/default/modern/layout/eway.xml | 53 - .../default/modern/layout/giftmessage.xml | 74 - .../default/modern/layout/googleanalytics.xml | 41 - .../default/modern/layout/googlecheckout.xml | 53 - .../default/modern/layout/googleoptimizer.xml | 153 - .../frontend/default/modern/layout/ideal.xml | 51 - .../default/modern/layout/newsletter.xml | 13 +- .../frontend/default/modern/layout/ogone.xml | 59 - .../default/modern/layout/oscommerce.xml | 41 - .../frontend/default/modern/layout/page.xml | 53 +- .../frontend/default/modern/layout/paybox.xml | 56 - .../frontend/default/modern/layout/poll.xml | 57 - .../default/modern/layout/productalert.xml | 40 - .../frontend/default/modern/layout/protx.xml | 43 - .../frontend/default/modern/layout/review.xml | 12 +- .../frontend/default/modern/layout/rss.xml | 2 +- .../frontend/default/modern/layout/sales.xml | 20 +- .../default/modern/layout/shipping.xml | 52 - .../frontend/default/modern/layout/tag.xml | 27 +- .../default/modern/layout/wishlist.xml | 18 +- .../template/amazonpayments/asp/form.phtml | 35 - .../amazonpayments/asp/redirect.phtml | 37 - .../amazonpayments/asp/shortcut.phtml | 33 - .../template/amazonpayments/cba/form.phtml | 35 - .../template/amazonpayments/cba/success.phtml | 35 - .../modern/template/amazonpayments/form.phtml | 34 - .../modern/template/amazonpayments/link.phtml | 49 - .../bundle/catalog/product/list/partof.phtml | 52 - .../bundle/catalog/product/price.phtml | 263 - .../bundle/catalog/product/view/price.phtml | 93 - .../catalog/product/view/tierprices.phtml | 41 - .../catalog/product/view/type/bundle.phtml | 43 - .../order/items/creditmemo/default.phtml | 168 - .../email/order/items/invoice/default.phtml | 169 - .../email/order/items/order/default.phtml | 174 - .../email/order/items/shipment/default.phtml | 92 - .../order/creditmemo/items/renderer.phtml | 329 -- .../sales/order/invoice/items/renderer.phtml | 353 -- .../bundle/sales/order/items/renderer.phtml | 376 -- .../sales/order/shipment/items/renderer.phtml | 112 - .../modern/template/callouts/left_col.phtml | 38 - .../modern/template/callouts/right_col.phtml | 30 - .../template/catalog/category/page.phtml | 32 - .../template/catalog/category/view.phtml | 91 - .../template/catalog/layer/filter.phtml | 45 - .../modern/template/catalog/layer/state.phtml | 48 - .../modern/template/catalog/layer/view.phtml | 63 - .../template/catalog/navigation/left.phtml | 62 - .../template/catalog/navigation/top.phtml | 40 - .../catalog/product/compare/list.phtml | 127 - .../catalog/product/compare/sidebar.phtml | 56 - .../template/catalog/product/gallery.phtml | 52 - .../template/catalog/product/list.phtml | 176 +- .../catalog/product/list/related.phtml | 97 - .../catalog/product/list/toolbar.phtml | 92 - .../catalog/product/list/upsell.phtml | 12 +- .../modern/template/catalog/product/new.phtml | 67 - .../template/catalog/product/price.phtml | 350 -- .../template/catalog/product/view.phtml | 86 +- .../catalog/product/view/additional.phtml | 31 - .../template/catalog/product/view/addto.phtml | 39 - .../catalog/product/view/addtocart.phtml | 39 - .../catalog/product/view/attributes.phtml | 49 - .../catalog/product/view/description.phtml | 35 - .../template/catalog/product/view/media.phtml | 18 +- .../template/catalog/product/view/price.phtml | 30 - .../catalog/product/view/price_clone.phtml | 28 - .../template/catalog/product/view/tabs.phtml | 20 +- .../catalog/product/view/tierprices.phtml | 181 - .../product/view/type/configurable.phtml | 41 - .../catalog/product/view/type/grouped.phtml | 80 - .../catalog/product/view/type/simple.phtml | 41 - .../catalog/product/view/type/virtual.phtml | 41 - .../modern/template/catalog/seo/sitemap.phtml | 45 - .../catalog/seo/sitemap/container.phtml | 36 - .../modern/template/catalog/seo/tree.phtml | 43 - .../catalogsearch/advanced/form.phtml | 94 - .../catalogsearch/advanced/result.phtml | 68 - .../template/catalogsearch/form.mini.phtml | 26 +- .../template/catalogsearch/result.phtml | 52 - .../modern/template/catalogsearch/term.phtml | 44 - .../modern/template/checkout/cart.phtml | 178 +- .../template/checkout/cart/coupon.phtml | 52 - .../template/checkout/cart/crosssell.phtml | 63 - .../template/checkout/cart/item/default.phtml | 269 - .../template/checkout/cart/noItems.phtml | 32 - .../checkout/cart/render/default.phtml | 68 - .../checkout/cart/render/simple.phtml | 68 - .../template/checkout/cart/shipping.phtml | 103 - .../template/checkout/cart/sidebar.phtml | 69 - .../checkout/cart/sidebar/default.phtml | 141 - .../template/checkout/cart/totals.phtml | 41 - .../modern/template/checkout/links.phtml | 26 - .../multishipping/address/select.phtml | 60 - .../checkout/multishipping/addresses.phtml | 81 - .../checkout/multishipping/agreements.phtml | 50 - .../checkout/multishipping/billing.phtml | 117 - .../multishipping/billing/items.phtml | 60 - .../checkout/multishipping/link.phtml | 27 - .../checkout/multishipping/overview.phtml | 291 - .../checkout/multishipping/shipping.phtml | 132 - .../checkout/multishipping/state.phtml | 40 - .../checkout/multishipping/success.phtml | 53 - .../modern/template/checkout/onepage.phtml | 58 - .../checkout/onepage/agreements.phtml | 52 - .../template/checkout/onepage/billing.phtml | 142 - .../template/checkout/onepage/link.phtml | 35 - .../template/checkout/onepage/login.phtml | 120 - .../template/checkout/onepage/payment.phtml | 73 - .../template/checkout/onepage/progress.phtml | 107 - .../template/checkout/onepage/review.phtml | 48 - .../onepage/review/configurable.phtml | 61 - .../checkout/onepage/review/info.phtml | 59 - .../checkout/onepage/review/totals.phtml | 43 - .../template/checkout/onepage/shipping.phtml | 108 - .../checkout/onepage/shipping_method.phtml | 50 - .../onepage/shipping_method/additional.phtml | 27 - .../onepage/shipping_method/available.phtml | 63 - .../modern/template/checkout/success.phtml | 46 - .../template/checkout/total/default.phtml | 13 - .../modern/template/checkout/total/tax.phtml | 67 - .../modern/template/chronopay/form.phtml | 89 - .../modern/template/chronopay/info.phtml | 34 - .../template/chronopay/standard/failure.phtml | 30 - .../template/chronopay/standard/form.phtml | 34 - .../default/modern/template/cms/content.phtml | 27 - .../modern/template/cms/content_heading.phtml | 27 - .../modern/template/cms/default/home.phtml | 1 - .../template/cms/default/no-route.phtml | 1 - .../default/modern/template/cms/meta.phtml | 32 - .../modern/template/contacts/form.phtml | 77 - .../modern/template/core/formkey.phtml | 27 - .../default/modern/template/core/link.phtml | 27 - .../modern/template/core/messages.phtml | 46 - .../template/customer/account/dashboard.phtml | 46 - .../customer/account/dashboard/address.phtml | 47 - .../customer/account/dashboard/hello.phtml | 29 - .../customer/account/dashboard/info.phtml | 57 - .../account/dashboard/newsletter.phtml | 34 - .../customer/account/dashboard/sidebar.phtml | 26 - .../template/customer/account/link/back.phtml | 5 - .../customer/account/navigation.phtml | 46 - .../modern/template/customer/address.phtml | 92 - .../template/customer/address/book.phtml | 121 - .../template/customer/address/edit.phtml | 142 - .../modern/template/customer/balance.phtml | 31 - .../modern/template/customer/dashboard.phtml | 85 - .../template/customer/form/address.phtml | 123 - .../customer/form/changepassword.phtml | 58 - .../template/customer/form/confirmation.phtml | 48 - .../modern/template/customer/form/edit.phtml | 113 - .../customer/form/forgotpassword.phtml | 48 - .../modern/template/customer/form/login.phtml | 78 - .../template/customer/form/mini.login.phtml | 33 - .../customer/form/mini.newsletter.phtml | 42 - .../template/customer/form/newsletter.phtml | 43 - .../template/customer/form/register.phtml | 161 - .../modern/template/customer/order/view.phtml | 88 - .../modern/template/customer/orders.phtml | 63 - .../modern/template/customer/widget/dob.phtml | 92 - .../template/customer/widget/gender.phtml | 34 - .../template/customer/widget/name.phtml | 158 - .../template/customer/widget/taxvat.phtml | 40 - .../modern/template/customer/wishlist.phtml | 60 - .../modern/template/cybermut/error.phtml | 30 - .../modern/template/cybermut/form.phtml | 34 - .../modern/template/cybersource/form.phtml | 183 - .../modern/template/cybersource/info.phtml | 38 - .../modern/template/directory/currency.phtml | 52 - .../template/directory/currency/switch.phtml | 31 - .../downloadable/catalog/product/links.phtml | 111 - .../catalog/product/samples.phtml | 45 - .../downloadable/catalog/product/type.phtml | 45 - .../checkout/cart/item/default.phtml | 276 - .../multishipping/item/downloadable.phtml | 57 - .../checkout/onepage/review/item.phtml | 247 - .../downloadable/checkout/success.phtml | 29 - .../downloadable/customer/products/list.phtml | 69 - .../order/items/creditmemo/downloadable.phtml | 128 - .../order/items/invoice/downloadable.phtml | 131 - .../order/items/order/downloadable.phtml | 137 - .../items/renderer/downloadable.phtml | 112 - .../invoice/items/renderer/downloadable.phtml | 109 - .../order/items/renderer/downloadable.phtml | 131 - .../email/order/creditmemo/items.phtml | 51 - .../template/email/order/invoice/items.phtml | 51 - .../modern/template/email/order/items.phtml | 59 - .../order/items/creditmemo/default.phtml | 120 - .../email/order/items/invoice/default.phtml | 120 - .../email/order/items/order/default.phtml | 126 - .../email/order/items/shipment/default.phtml | 43 - .../template/email/order/shipment/items.phtml | 47 - .../template/email/order/shipment/track.phtml | 46 - .../template/email/productalert/price.phtml | 50 - .../template/email/productalert/stock.phtml | 50 - .../default/modern/template/eway/form.phtml | 90 - .../default/modern/template/eway/info.phtml | 33 - .../modern/template/eway/secure/failure.phtml | 31 - .../modern/template/eway/secure/form.phtml | 34 - .../modern/template/eway/shared/failure.phtml | 31 - .../modern/template/eway/shared/form.phtml | 34 - .../modern/template/flo2cash/form.phtml | 89 - .../modern/template/flo2cash/info.phtml | 34 - .../modern/template/giftmessage/form.phtml | 81 - .../modern/template/giftmessage/helper.phtml | 80 - .../modern/template/giftmessage/inline.phtml | 266 - .../modern/template/googlecheckout/form.phtml | 34 - .../modern/template/googlecheckout/link.phtml | 38 - .../template/ideal/advanced/failure.phtml | 31 - .../modern/template/ideal/advanced/form.phtml | 44 - .../modern/template/ideal/advanced/info.phtml | 33 - .../modern/template/ideal/basic/failure.phtml | 31 - .../modern/template/ideal/basic/form.phtml | 34 - .../template/newsletter/subscribe.phtml | 17 +- .../default/modern/template/ogone/form.phtml | 35 - .../default/modern/template/ogone/info.phtml | 27 - .../modern/template/ogone/paypage.phtml | 28 - .../modern/template/ogone/placeform.phtml | 42 - .../template/oscommerce/order/list.phtml | 56 - .../template/oscommerce/order/view.phtml | 138 - .../modern/template/page/1column.phtml | 73 - .../modern/template/page/2columns-left.phtml | 80 - .../modern/template/page/2columns-right.phtml | 79 - .../modern/template/page/3columns.phtml | 55 +- .../default/modern/template/page/empty.phtml | 42 - .../template/page/html/breadcrumbs.phtml | 45 - .../modern/template/page/html/footer.phtml | 28 +- .../modern/template/page/html/head.phtml | 43 - .../modern/template/page/html/header.phtml | 22 +- .../modern/template/page/html/notices.phtml | 44 - .../modern/template/page/html/pager.phtml | 116 - .../modern/template/page/html/top.links.phtml | 34 - .../modern/template/page/js/calendar.phtml | 94 - .../modern/template/page/one-column.phtml | 42 - .../default/modern/template/page/print.phtml | 52 - .../modern/template/page/redirect.phtml | 39 - .../modern/template/page/switch/flags.phtml | 38 - .../template/page/switch/languages.phtml | 45 - .../modern/template/page/switch/stores.phtml | 48 - .../template/page/template/container.phtml | 35 - .../template/page/template/footer_links.phtml | 39 - .../modern/template/page/template/links.phtml | 39 - .../modern/template/paybox/direct/form.phtml | 90 - .../modern/template/paybox/direct/info.phtml | 34 - .../modern/template/paybox/system/error.phtml | 31 - .../modern/template/paybox/system/form.phtml | 34 - .../modern/template/payment/form/cc.phtml | 87 - .../modern/template/payment/form/ccsave.phtml | 86 - .../template/payment/form/checkmo.phtml | 45 - .../template/payment/form/purchaseorder.phtml | 36 - .../modern/template/payment/info/ccsave.phtml | 29 - .../template/payment/info/checkmo.phtml | 38 - .../template/payment/info/purchaseorder.phtml | 29 - .../template/paypal/express/review.phtml | 170 - .../paypal/express/review/details.phtml | 75 - .../template/paypaluk/express/review.phtml | 170 - .../paypaluk/express/review/details.phtml | 75 - .../default/modern/template/poll/active.phtml | 66 - .../default/modern/template/poll/result.phtml | 50 - .../modern/template/productalert/price.phtml | 29 - .../modern/template/productalert/stock.phtml | 29 - .../template/protx/standard/failure.phtml | 31 - .../modern/template/protx/standard/form.phtml | 34 - .../modern/template/rating/detailed.phtml | 44 - .../modern/template/rating/empty.phtml | 1 - .../reports/home_product_compared.phtml | 66 - .../reports/home_product_viewed.phtml | 71 - .../reports/product/widget/compared.phtml | 67 - .../reports/product/widget/viewed.phtml | 70 - .../template/reports/product_compared.phtml | 42 - .../template/reports/product_viewed.phtml | 42 - .../template/review/customer/list.phtml | 78 - .../template/review/customer/recent.phtml | 52 - .../template/review/customer/view.phtml | 66 - .../default/modern/template/review/form.phtml | 116 - .../template/review/helper/summary.phtml | 45 - .../review/helper/summary_short.phtml | 45 - .../template/review/product/view/count.phtml | 29 - .../template/review/product/view/list.phtml | 64 - .../default/modern/template/review/view.phtml | 70 - .../default/modern/template/rss/list.phtml | 61 - .../default/modern/template/rss/nofeed.phtml | 1 - .../modern/template/rss/order/details.phtml | 102 - .../template/sales/order/creditmemo.phtml | 63 - .../sales/order/creditmemo/items.phtml | 67 - .../creditmemo/items/renderer/default.phtml | 298 - .../modern/template/sales/order/details.phtml | 107 - .../modern/template/sales/order/history.phtml | 73 - .../modern/template/sales/order/info.phtml | 95 - .../modern/template/sales/order/invoice.phtml | 63 - .../template/sales/order/invoice/items.phtml | 63 - .../invoice/items/renderer/default.phtml | 294 - .../modern/template/sales/order/items.phtml | 69 - .../sales/order/items/renderer/default.phtml | 316 -- .../modern/template/sales/order/print.phtml | 87 - .../sales/order/print/creditmemo.phtml | 107 - .../template/sales/order/print/invoice.phtml | 103 - .../template/sales/order/print/shipment.phtml | 114 - .../modern/template/sales/order/recent.phtml | 68 - .../template/sales/order/shipment.phtml | 63 - .../template/sales/order/shipment/items.phtml | 88 - .../shipment/items/renderer/default.phtml | 60 - .../modern/template/sales/order/totals.phtml | 52 - .../template/sales/order/trackinginfo.phtml | 68 - .../modern/template/sales/order/view.phtml | 102 - .../template/sales/reorder/sidebar.phtml | 83 - .../default/modern/template/sample/home.phtml | 41 +- .../modern/template/sendfriend/send.phtml | 135 - .../template/shipping/tracking/ajax.phtml | 1 - .../template/shipping/tracking/popup.phtml | 175 - .../default/modern/template/tag/cloud.phtml | 42 - .../modern/template/tag/customer/edit.phtml | 49 - .../modern/template/tag/customer/recent.phtml | 49 - .../modern/template/tag/customer/tags.phtml | 48 - .../modern/template/tag/customer/view.phtml | 75 - .../default/modern/template/tag/list.phtml | 56 - .../default/modern/template/tag/mytags.phtml | 75 - .../default/modern/template/tag/popular.phtml | 39 - .../modern/template/tag/product/result.phtml | 66 - .../default/modern/template/tag/result.phtml | 42 - .../default/modern/template/tag/search.phtml | 42 - .../template/tax/checkout/discount.phtml | 25 - .../template/tax/checkout/grandtotal.phtml | 58 - .../template/tax/checkout/shipping.phtml | 66 - .../template/tax/checkout/subtotal.phtml | 57 - .../modern/template/tax/checkout/tax.phtml | 74 - .../modern/template/tax/order/tax.phtml | 81 - .../template/wishlist/email/items.phtml | 53 - .../modern/template/wishlist/email/rss.phtml | 31 - .../modern/template/wishlist/shared.phtml | 77 - .../modern/template/wishlist/sharing.phtml | 84 - .../modern/template/wishlist/sidebar.phtml | 70 - .../modern/template/wishlist/view.phtml | 110 - .../default/template/install/end.phtml | 3 + app/etc/modules/Mage_All.xml | 4 +- app/etc/modules/Mage_AmazonPayments.xml | 39 - .../{Mage_Eway.xml => Mage_Centinel.xml} | 7 +- app/etc/modules/Mage_Chronopay.xml | 38 - app/etc/modules/Mage_Cybermut.xml | 38 - app/etc/modules/Mage_Cybersource.xml | 38 - app/etc/modules/Mage_Flo2Cash.xml | 38 - app/etc/modules/Mage_Ideal.xml | 38 - app/etc/modules/Mage_Ogone.xml | 39 - app/etc/modules/Mage_Oscommerce.xml | 41 - app/etc/modules/Mage_Paybox.xml | 38 - app/etc/modules/Mage_Protx.xml | 38 - app/etc/modules/Mage_Strikeiron.xml | 38 - app/locale/en_US/Mage_Adminhtml.csv | 99 +- app/locale/en_US/Mage_Api.csv | 9 +- app/locale/en_US/Mage_Catalog.csv | 26 +- app/locale/en_US/Mage_CatalogRule.csv | 1 - app/locale/en_US/Mage_CatalogSearch.csv | 1 - app/locale/en_US/Mage_Centinel.csv | 31 + app/locale/en_US/Mage_Checkout.csv | 10 +- app/locale/en_US/Mage_Chronopay.csv | 48 - app/locale/en_US/Mage_Compiler.csv | 2 + app/locale/en_US/Mage_Core.csv | 11 +- app/locale/en_US/Mage_Customer.csv | 24 +- app/locale/en_US/Mage_Cybermut.csv | 35 - app/locale/en_US/Mage_Cybersource.csv | 41 - app/locale/en_US/Mage_Downloadable.csv | 3 - app/locale/en_US/Mage_Eway.csv | 38 - app/locale/en_US/Mage_Flo2Cash.csv | 27 - app/locale/en_US/Mage_GiftMessage.csv | 10 - app/locale/en_US/Mage_GoogleBase.csv | 4 + app/locale/en_US/Mage_Ideal.csv | 60 - app/locale/en_US/Mage_Index.csv | 1 - app/locale/en_US/Mage_Newsletter.csv | 4 +- app/locale/en_US/Mage_Ogone.csv | 76 - app/locale/en_US/Mage_Oscommerce.csv | 124 - app/locale/en_US/Mage_Page.csv | 6 +- app/locale/en_US/Mage_Paybox.csv | 106 - app/locale/en_US/Mage_Paygate.csv | 3 + app/locale/en_US/Mage_Payment.csv | 23 +- app/locale/en_US/Mage_Paypal.csv | 31 +- app/locale/en_US/Mage_PaypalUk.csv | 38 +- app/locale/en_US/Mage_Protx.csv | 32 - app/locale/en_US/Mage_Reports.csv | 22 +- app/locale/en_US/Mage_Review.csv | 3 +- app/locale/en_US/Mage_Rss.csv | 5 +- app/locale/en_US/Mage_Rule.csv | 5 - app/locale/en_US/Mage_Sales.csv | 13 +- app/locale/en_US/Mage_Shipping.csv | 1 + app/locale/en_US/Mage_Strikeiron.csv | 47 - app/locale/en_US/Mage_Tag.csv | 6 - app/locale/en_US/Mage_Widget.csv | 1 + app/locale/en_US/Mage_Wishlist.csv | 1 - .../en_US/template/email/account_new.html | 6 +- .../email/account_new_confirmation.html | 4 +- .../template/email/account_new_confirmed.html | 4 +- .../template/email/admin_password_new.html | 2 +- ...amazonpayments_asp_notification_error.html | 12 - .../email/newsletter_subscr_confirm.html | 2 +- .../en_US/template/email/password_new.html | 2 +- .../template/email/sales/creditmemo_new.html | 4 +- .../email/sales/creditmemo_new_guest.html | 4 +- .../email/sales/creditmemo_update.html | 6 +- .../email/sales/creditmemo_update_guest.html | 6 +- .../template/email/sales/invoice_new.html | 4 +- .../email/sales/invoice_new_guest.html | 4 +- .../template/email/sales/invoice_update.html | 6 +- .../email/sales/invoice_update_guest.html | 6 +- .../en_US/template/email/sales/order_new.html | 4 +- .../template/email/sales/order_new_guest.html | 4 +- .../template/email/sales/order_update.html | 6 +- .../email/sales/order_update_guest.html | 6 +- .../template/email/sales/shipment_new.html | 4 +- .../email/sales/shipment_new_guest.html | 4 +- .../template/email/sales/shipment_update.html | 6 +- .../email/sales/shipment_update_guest.html | 6 +- .../email/strikeiron_email_warning.html | 10 - .../en_US/template/email/wishlist_share.html | 2 +- downloader/Maged/Model/Session.php | 8 +- downloader/template/login.phtml | 7 +- errors/.htaccess | 6 +- errors/404.php | 19 +- errors/503.php | 19 +- errors/default/.htaccess | 2 - errors/default/404.phtml | 26 + errors/default/503.phtml | 26 + errors/{skin => }/default/css/styles.css | 25 + errors/{skin => }/default/images/bkg_body.gif | Bin .../{skin => }/default/images/bkg_header.jpg | Bin .../{skin => }/default/images/bkg_main1.gif | Bin .../{skin => }/default/images/bkg_main2.gif | Bin errors/{skin => }/default/images/favicon.ico | Bin .../{skin => }/default/images/i_msg-error.gif | Bin .../{skin => }/default/images/i_msg-note.gif | Bin .../default/images/i_msg-success.gif | Bin errors/{skin => }/default/images/logo.gif | Bin errors/default/page.phtml | 42 +- errors/default/report.phtml | 60 +- errors/functions.php | 112 - errors/{config.xml => local.xml.sample} | 9 +- errors/processor.php | 579 ++ errors/report.php | 107 +- index.php | 2 +- js/extjs/css/README.txt | 6 +- js/extjs/css/basic-dialog.css | 570 +- js/extjs/css/box.css | 16 +- js/extjs/css/button.css | 294 +- js/extjs/css/combo.css | 16 +- js/extjs/css/core.css | 584 +- js/extjs/css/date-picker.css | 16 +- js/extjs/css/dd.css | 120 +- js/extjs/css/debug.css | 16 +- js/extjs/css/editor.css | 116 +- js/extjs/css/ext-all.css | 4848 ++++++++--------- js/extjs/css/form.css | 16 +- js/extjs/css/grid.css | 898 +-- js/extjs/css/layout.css | 502 +- js/extjs/css/menu.css | 236 +- js/extjs/css/panel.css | 16 +- js/extjs/css/qtips.css | 238 +- js/extjs/css/reset-min.css | 16 +- js/extjs/css/resizable.css | 286 +- js/extjs/css/tabs.css | 268 +- js/extjs/css/toolbar.css | 346 +- js/extjs/css/tree.css | 358 +- js/extjs/css/ytheme-aero.css | 1402 ++--- js/extjs/css/ytheme-gray.css | 874 +-- js/extjs/css/ytheme-vista.css | 1020 ++-- js/extjs/ext-tree-checkbox.js | 624 +-- js/extjs/resources/css/README.txt | 6 +- js/extjs/resources/css/basic-dialog.css | 570 +- js/extjs/resources/css/box.css | 16 +- js/extjs/resources/css/button.css | 294 +- js/extjs/resources/css/combo.css | 16 +- js/extjs/resources/css/core.css | 584 +- js/extjs/resources/css/date-picker.css | 16 +- js/extjs/resources/css/dd.css | 120 +- js/extjs/resources/css/debug.css | 16 +- js/extjs/resources/css/editor.css | 116 +- js/extjs/resources/css/ext-all.css | 4300 +++++++-------- js/extjs/resources/css/form.css | 16 +- js/extjs/resources/css/grid.css | 588 +- js/extjs/resources/css/layout.css | 502 +- js/extjs/resources/css/menu.css | 236 +- js/extjs/resources/css/panel.css | 16 +- js/extjs/resources/css/qtips.css | 238 +- js/extjs/resources/css/reset-min.css | 16 +- js/extjs/resources/css/resizable.css | 286 +- js/extjs/resources/css/tabs.css | 268 +- js/extjs/resources/css/toolbar.css | 348 +- js/extjs/resources/css/tree.css | 358 +- js/extjs/resources/css/ytheme-aero.css | 1162 ++-- js/extjs/resources/css/ytheme-galdaka.css | 1064 ++-- js/extjs/resources/css/ytheme-gray.css | 874 +-- js/extjs/resources/css/ytheme-magento.css | 1260 ++--- js/extjs/resources/css/ytheme-vista.css | 1020 ++-- js/flash/AC_RunActiveContent.js | 584 +- js/lib/FABridge.js | 613 +++ js/lib/boxover.js | 742 +-- js/lib/flex.js | 1184 ++-- js/mage/adminhtml/accordion.js | 8 +- js/mage/adminhtml/browser.js | 48 +- js/mage/adminhtml/events.js | 7 +- js/mage/adminhtml/flexuploader.js | 8 +- js/mage/adminhtml/form.js | 6 +- js/mage/adminhtml/giftmessage.js | 6 +- js/mage/adminhtml/grid.js | 9 +- js/mage/adminhtml/hash.js | 300 +- js/mage/adminhtml/image.js | 58 +- js/mage/adminhtml/loader.js | 6 +- js/mage/adminhtml/magento-all.js | 25 + js/mage/adminhtml/product.js | 39 +- js/mage/adminhtml/rules.js | 12 +- js/mage/adminhtml/sales.js | 84 +- js/mage/adminhtml/sales/centinel.js | 71 + js/mage/adminhtml/scrollbar.js | 792 +-- js/mage/adminhtml/tabs.js | 8 +- js/mage/adminhtml/tools.js | 14 +- js/mage/adminhtml/uploader.js | 514 +- js/mage/adminhtml/variables.js | 17 +- .../plugins/magentovariable/editor_plugin.js | 4 +- .../plugins/magentowidget/editor_plugin.js | 6 +- js/mage/adminhtml/wysiwyg/tiny_mce/setup.js | 51 +- .../themes/advanced/skins/default/content.css | 27 +- .../themes/advanced/skins/default/dialog.css | 27 +- js/mage/adminhtml/wysiwyg/widget.js | 25 +- js/mage/cookies.js | 20 +- js/mage/translate.js | 10 +- js/mage/translate_inline.css | 27 +- js/mage/translate_inline.js | 8 +- js/prototype/validation.js | 2 +- js/varien/accordion.js | 222 +- js/varien/form.js | 6 +- js/varien/iehover-fix.js | 10 +- js/varien/js.js | 6 +- js/varien/menu.js | 64 +- js/varien/payment.js | 6 +- js/varien/product.js | 6 +- js/varien/telephone.js | 260 +- js/varien/weee.js | 25 + lib/3Dsecure/CentinelClient.php | 323 +- lib/3Dsecure/CentinelErrors.php | 42 +- lib/3Dsecure/XMLParser.php | 177 +- lib/LinLibertineFont/OFL.txt | 196 +- lib/Varien/Convert/Action.php | 74 +- lib/Varien/Convert/Adapter/Db/Table.php | 106 +- lib/Varien/Convert/Adapter/Zend/Cache.php | 110 +- lib/Varien/Convert/Adapter/Zend/Db.php | 106 +- lib/Varien/Convert/Container/Collection.php | 144 +- lib/Varien/Convert/Container/Generic.php | 74 +- lib/Varien/Convert/Profile.php | 74 +- lib/Varien/Convert/Profile/Collection.php | 318 +- lib/Varien/Data/Form/Element/Button.php | 82 +- lib/Varien/Data/Form/Element/Date.php | 2 +- lib/Varien/Data/Form/Element/Multiselect.php | 6 +- lib/Varien/Data/Form/Element/Password.php | 94 +- lib/Varien/Data/Form/Element/Reset.php | 82 +- lib/Varien/Data/Form/Element/Select.php | 4 +- lib/Varien/Data/Tree/Dbp.php | 4 +- lib/Varien/Db/Adapter/Pdo/Mysql.php | 5 +- lib/Varien/Db/Tree/Node.php | 214 +- lib/Varien/File/Uploader.php | 90 +- lib/Varien/File/Uploader/Image.php | 2 + lib/Varien/Http/Adapter/Curl.php | 24 +- lib/Varien/Object/Mapper.php | 1 + lib/Varien/Pear/Package.php | 376 +- lib/flex/uploader/uploader.mxml | 146 +- lib/flex/uploader/uploaderSingle.mxml | 176 +- lib/flex/varien/varien/upload/Uploader.as | 1254 ++--- .../varien/varien/upload/UploaderEvent.as | 162 +- .../varien/varien/upload/UploaderSingle.as | 180 +- pkginfo/Mage_Cybermut.txt | 1 - pkginfo/Mage_Paybox.txt | 1 - shell/abstract.php | 49 +- skin/adminhtml/default/default/boxes.css | 35 +- .../adminhtml/default/default/print.css | 25 +- skin/frontend/base/default/css/widgets.css | 12 +- .../images/centinel/sc_learn_62x34.gif | Bin 0 -> 846 bytes .../images/centinel/v_activate_steps.gif | Bin 0 -> 13388 bytes .../images/centinel/vbv_ltbg_71x57.gif | Bin 0 -> 1077 bytes .../blue => base/default}/images/cvv.gif | Bin .../images/moneybookers/banner_120_de.png | Bin 12952 -> 0 bytes .../images/moneybookers/banner_120_fr.png | Bin 11729 -> 0 bytes .../images/moneybookers/banner_120_int.png | Bin 12118 -> 0 bytes .../images/moneybookers/banner_120_pl.png | Bin 13602 -> 0 bytes .../images/moneybookers/banner_120_sp.png | Bin 10802 -> 0 bytes .../images/moneybookers/moneybookers_acc.png | Bin 8029 -> 0 bytes .../images/moneybookers/moneybookers_csi.gif | Bin 3339 -> 0 bytes .../images/moneybookers/moneybookers_did.gif | Bin 2205 -> 0 bytes .../images/moneybookers/moneybookers_dnk.gif | Bin 2546 -> 0 bytes .../images/moneybookers/moneybookers_ebt.gif | Bin 2527 -> 0 bytes .../images/moneybookers/moneybookers_ent.gif | Bin 2871 -> 0 bytes .../images/moneybookers/moneybookers_gcb.gif | Bin 2582 -> 0 bytes .../images/moneybookers/moneybookers_gir.gif | Bin 2003 -> 0 bytes .../images/moneybookers/moneybookers_idl.gif | Bin 2534 -> 0 bytes .../images/moneybookers/moneybookers_lsr.gif | Bin 1904 -> 0 bytes .../images/moneybookers/moneybookers_npy.gif | Bin 2609 -> 0 bytes .../images/moneybookers/moneybookers_pli.gif | Bin 2494 -> 0 bytes .../images/moneybookers/moneybookers_psp.gif | Bin 4654 -> 0 bytes .../images/moneybookers/moneybookers_pwy.gif | Bin 2863 -> 0 bytes .../images/moneybookers/moneybookers_sft.gif | Bin 2538 -> 0 bytes .../images/moneybookers/moneybookers_so2.gif | Bin 2527 -> 0 bytes .../images/moneybookers/moneybookers_wlt.gif | Bin 3235 -> 0 bytes .../base/default/js/checkout/review.js | 7 +- skin/frontend/base/default/js/opcheckout.js | 84 +- skin/frontend/default/blank/css/styles-ie.css | 7 +- skin/frontend/default/blank/css/styles.css | 75 +- .../blank/images/btn_google_checkout.gif | Bin 2940 -> 0 bytes .../blank/images/btn_paypal_checkout.gif | Bin 3062 -> 0 bytes .../default/blank/images/cookies/firefox.png | Bin 12133 -> 0 bytes .../default/blank/images/cookies/ie6-1.gif | Bin 19710 -> 0 bytes .../default/blank/images/cookies/ie6-2.gif | Bin 48085 -> 0 bytes .../default/blank/images/cookies/ie7-1.gif | Bin 3538 -> 0 bytes .../default/blank/images/cookies/ie7-2.gif | Bin 14575 -> 0 bytes .../default/blank/images/cookies/ie7-3.gif | Bin 19023 -> 0 bytes .../default/blank/images/cookies/ie7-4.gif | Bin 9137 -> 0 bytes .../default/blank/images/cookies/ie7-5.gif | Bin 9066 -> 0 bytes .../default/blank/images/cookies/ie7-6.gif | Bin 6485 -> 0 bytes .../default/blank/images/cookies/opera.png | Bin 17813 -> 0 bytes .../blank/images/media/404_callout1.jpg | Bin 17781 -> 0 bytes .../blank/images/media/404_callout2.jpg | Bin 23222 -> 0 bytes .../blank/images/media/about_us_img.jpg | Bin 11123 -> 0 bytes .../blank/images/media/col_left_callout.jpg | Bin 19102 -> 0 bytes .../blank/images/media/col_right_callout.jpg | Bin 14703 -> 0 bytes skin/frontend/default/blank/js/bundle.js | 191 - skin/frontend/default/blank/js/giftmessage.js | 129 - skin/frontend/default/blank/js/ie6.js | 64 - skin/frontend/default/blank/js/opcheckout.js | 792 --- skin/frontend/default/blue/css/styles-ie.css | 6 +- skin/frontend/default/blue/css/styles.css | 123 +- .../blue/images/btn_google_checkout.gif | Bin 2940 -> 0 bytes .../blue/images/btn_paypal_checkout.gif | Bin 3062 -> 0 bytes .../default/blue/images/btn_place_order.gif | Bin 2929 -> 0 bytes .../blue/images/btn_proceed_to_checkout.gif | Bin 3048 -> 0 bytes .../images/btn_proceed_to_checkout_dis.gif | Bin 3084 -> 0 bytes .../images/currency_converter_head_bg.gif | Bin 1021 -> 0 bytes skin/frontend/default/blue/images/cvv.jpg | Bin 68060 -> 0 bytes .../blue/images/free_shipping_callout.jpg | Bin 14639 -> 0 bytes .../default/blue/images/home_left_callout.jpg | Bin 11802 -> 0 bytes .../default/blue/images/home_main_callout.jpg | Bin 36053 -> 0 bytes .../default/blue/images/i_type_grid.gif | Bin 105 -> 0 bytes .../default/blue/images/i_type_list.gif | Bin 99 -> 0 bytes .../blue/images/media/404_callout1.jpg | Bin 17781 -> 0 bytes .../blue/images/media/404_callout2.jpg | Bin 23222 -> 0 bytes .../blue/images/media/about_us_img.jpg | Bin 11123 -> 0 bytes .../blue/images/media/best_selling_img01.jpg | Bin 1817 -> 0 bytes .../blue/images/media/best_selling_img02.jpg | Bin 3118 -> 0 bytes .../blue/images/media/best_selling_img03.jpg | Bin 2516 -> 0 bytes .../blue/images/media/best_selling_img04.jpg | Bin 2455 -> 0 bytes .../blue/images/media/best_selling_img05.jpg | Bin 2799 -> 0 bytes .../blue/images/media/best_selling_img06.jpg | Bin 4898 -> 0 bytes .../media/cell_phone_landing_banner1.jpg | Bin 21259 -> 0 bytes .../blue/images/media/col_left_callout.jpg | Bin 19102 -> 0 bytes .../blue/images/media/col_right_callout.jpg | Bin 14703 -> 0 bytes .../images/media/electronics_cellphones.jpg | Bin 42440 -> 0 bytes .../media/electronics_digitalcameras.jpg | Bin 57481 -> 0 bytes .../blue/images/media/electronics_laptops.jpg | Bin 44643 -> 0 bytes .../images/media/furniture_callout_spot.jpg | Bin 31312 -> 0 bytes .../blue/images/media/furnitures_bed_room.jpg | Bin 2193 -> 0 bytes .../images/media/furnitures_living_room.jpg | Bin 2541 -> 0 bytes .../media/head_electronics_cellphones.gif | Bin 1039 -> 0 bytes .../media/head_electronics_digicamera.gif | Bin 1211 -> 0 bytes .../images/media/head_electronics_laptops.gif | Bin 949 -> 0 bytes .../blue/images/media/laptop_callout_mid1.jpg | Bin 12145 -> 0 bytes .../blue/images/media/laptop_callout_mid2.jpg | Bin 10540 -> 0 bytes .../blue/images/media/laptop_callout_mid3.jpg | Bin 11699 -> 0 bytes .../blue/images/media/laptop_callout_spot.jpg | Bin 30482 -> 0 bytes .../images/media/shirts_landing_banner1.jpg | Bin 27352 -> 0 bytes .../default/blue/images/np_cart_thumb.gif | Bin 1372 -> 0 bytes .../default/blue/images/np_more_img.gif | Bin 908 -> 0 bytes .../default/blue/images/np_product_main.gif | Bin 4683 -> 0 bytes .../frontend/default/blue/images/np_thumb.gif | Bin 1945 -> 0 bytes .../default/blue/images/np_thumb2.gif | Bin 1779 -> 0 bytes .../blue/images/ph_callout_left_rebel.jpg | Bin 14035 -> 0 bytes .../blue/images/ph_callout_left_top.gif | Bin 29101 -> 0 bytes skin/frontend/default/default/css/print.css | 3 +- .../default/default/css/styles-ie.css | 6 +- skin/frontend/default/default/css/styles.css | 99 +- .../images/currency_converter_head_bg.gif | Bin 1021 -> 0 bytes skin/frontend/default/iphone/favicon.ico | Bin 0 -> 1150 bytes .../default/iphone/images/cookies/firefox.png | Bin 12133 -> 0 bytes .../default/iphone/images/cookies/ie6-1.gif | Bin 19710 -> 0 bytes .../default/iphone/images/cookies/ie6-2.gif | Bin 48085 -> 0 bytes .../default/iphone/images/cookies/ie7-1.gif | Bin 3538 -> 0 bytes .../default/iphone/images/cookies/ie7-2.gif | Bin 14575 -> 0 bytes .../default/iphone/images/cookies/ie7-3.gif | Bin 19023 -> 0 bytes .../default/iphone/images/cookies/ie7-4.gif | Bin 9137 -> 0 bytes .../default/iphone/images/cookies/ie7-5.gif | Bin 9066 -> 0 bytes .../default/iphone/images/cookies/ie7-6.gif | Bin 6485 -> 0 bytes .../default/iphone/images/cookies/opera.png | Bin 17813 -> 0 bytes skin/frontend/default/iphone/js/bundle.js | 191 - .../frontend/default/iphone/js/giftmessage.js | 130 - skin/frontend/default/iphone/js/opcheckout.js | 72 + skin/frontend/default/modern/css/boxes.css | 1348 ----- skin/frontend/default/modern/css/clears.css | 68 - skin/frontend/default/modern/css/ie7minus.css | 35 - skin/frontend/default/modern/css/iestyles.css | 88 - skin/frontend/default/modern/css/menu.css | 68 - skin/frontend/default/modern/css/print.css | 87 +- skin/frontend/default/modern/css/reset.css | 73 - .../frontend/default/modern/css/styles-ie.css | 163 + skin/frontend/default/modern/css/styles.css | 1593 ++++++ skin/frontend/default/modern/css/widgets.css | 90 + .../modern/images/base_mini_content_bg.gif | Bin 235 -> 0 bytes .../images/{add_to_bg.gif => bkg_add-to.gif} | Bin ...ead_bg.gif => bkg_block-layered-title.gif} | Bin .../images/{body_bg.gif => bkg_body.gif} | Bin .../default/modern/images/bkg_btn-green.gif | Bin 0 -> 526 bytes .../default/modern/images/bkg_btn-small.gif | Bin 0 -> 1440 bytes .../default/modern/images/bkg_btn-small.png | Bin 0 -> 876 bytes .../default/modern/images/bkg_btn.gif | Bin 0 -> 1651 bytes .../default/modern/images/bkg_btn.png | Bin 0 -> 890 bytes ...cart_totals_bg.gif => bkg_cart-totals.gif} | Bin .../default/modern/images/bkg_collapse-gm.gif | Bin 0 -> 89 bytes .../{bg_collapse.gif => bkg_collapse.gif} | Bin .../default/modern/images/bkg_grid.gif | Bin 0 -> 53 bytes ...av_parent_arrow.gif => bkg_nav_parent.gif} | Bin ...av_top_level_arrow.gif => bkg_nav_top.gif} | Bin .../{links_separator.gif => bkg_pipe1.gif} | Bin .../default/modern/images/bkg_pipe2.gif | Bin 0 -> 51 bytes .../default/modern/images/bkg_pipe3.gif | Bin 0 -> 44 bytes .../default/modern/images/bkg_rating.gif | Bin 0 -> 375 bytes ...rt_subtotal_count.gif => bkg_subtotal.gif} | Bin .../images/{tabs_bg.gif => bkg_tabs.gif} | Bin .../images/{pager_bg.gif => bkg_toolbar.gif} | Bin ...{side_logo_promo.gif => bkg_top-promo.gif} | Bin .../modern/images/btn_add_all_to_cart.gif | Bin 1655 -> 0 bytes .../modern/images/btn_add_recipient.gif | Bin 1145 -> 0 bytes .../default/modern/images/btn_add_tags.gif | Bin 1331 -> 0 bytes .../default/modern/images/btn_add_to_cart.gif | Bin 1416 -> 0 bytes .../modern/images/btn_add_to_cart_sm.gif | Bin 1064 -> 0 bytes .../default/modern/images/btn_cart_apply.gif | Bin 515 -> 0 bytes .../default/modern/images/btn_cart_cancel.gif | Bin 748 -> 0 bytes .../modern/images/btn_cart_get_a_quote.gif | Bin 585 -> 0 bytes .../default/modern/images/btn_checkout.gif | Bin 0 -> 3906 bytes .../modern/images/btn_close_window.gif | Bin 1600 -> 0 bytes .../default/modern/images/btn_compare.gif | Bin 1037 -> 0 bytes .../default/modern/images/btn_continue.gif | Bin 1131 -> 0 bytes .../modern/images/btn_continue_shopping.gif | Bin 1806 -> 0 bytes .../modern/images/btn_create_account.gif | Bin 1619 -> 0 bytes .../modern/images/btn_enter_new_address.gif | Bin 1655 -> 0 bytes .../frontend/default/modern/images/btn_go.gif | Bin 668 -> 0 bytes .../default/modern/images/btn_login.gif | Bin 974 -> 0 bytes .../modern/images/btn_newsletter_signup.gif | Bin 1281 -> 0 bytes .../default/modern/images/btn_place_order.gif | Bin 2344 -> 0 bytes .../default/modern/images/btn_print-order.gif | Bin 1327 -> 0 bytes .../modern/images/btn_proceed_to_checkout.gif | Bin 2694 -> 0 bytes .../images/btn_proceed_to_checkout_dis.gif | Bin 1781 -> 0 bytes .../{list_remove_btn.gif => btn_remove.gif} | Bin .../default/modern/images/btn_reorder.gif | Bin 890 -> 0 bytes .../default/modern/images/btn_save.gif | Bin 889 -> 0 bytes .../default/modern/images/btn_search.gif | Bin 1268 -> 0 bytes .../default/modern/images/btn_send_email.gif | Bin 1184 -> 0 bytes .../modern/images/btn_share_wishlist.gif | Bin 1638 -> 0 bytes .../default/modern/images/btn_submit.gif | Bin 1022 -> 0 bytes .../default/modern/images/btn_submit_mini.gif | Bin 905 -> 0 bytes .../default/modern/images/btn_trash.gif | Bin 0 -> 643 bytes .../default/modern/images/btn_update_qty.gif | Bin 1047 -> 0 bytes .../modern/images/btn_update_total.gif | Bin 657 -> 0 bytes .../modern/images/btn_update_wishlist.gif | Bin 1631 -> 0 bytes .../default/modern/images/btn_vote.gif | Bin 975 -> 0 bytes .../modern/images/btn_window_close.gif | Bin 0 -> 211 bytes .../default/modern/images/calendar.gif | Bin 0 -> 391 bytes .../default/modern/images/cookies/firefox.png | Bin 12133 -> 0 bytes .../default/modern/images/cookies/ie6-1.gif | Bin 19710 -> 0 bytes .../default/modern/images/cookies/ie6-2.gif | Bin 48085 -> 0 bytes .../default/modern/images/cookies/ie7-1.gif | Bin 3538 -> 0 bytes .../default/modern/images/cookies/ie7-2.gif | Bin 14575 -> 0 bytes .../default/modern/images/cookies/ie7-3.gif | Bin 19023 -> 0 bytes .../default/modern/images/cookies/ie7-4.gif | Bin 9137 -> 0 bytes .../default/modern/images/cookies/ie7-5.gif | Bin 9066 -> 0 bytes .../default/modern/images/cookies/ie7-6.gif | Bin 6485 -> 0 bytes .../default/modern/images/cookies/opera.png | Bin 17813 -> 0 bytes skin/frontend/default/modern/images/cvv.gif | Bin 0 -> 18112 bytes .../default/modern/images/fam_book_open.png | Bin 0 -> 622 bytes .../modern/images/gift-message-collapse.gif | Bin 70 -> 0 bytes .../modern/images/gift-message-expand.gif | Bin 70 -> 0 bytes .../default/modern/images/grid-cal.gif | Bin 0 -> 391 bytes .../default/modern/images/head_search.gif | Bin 321 -> 0 bytes .../default/modern/images/i_asc_arrow.gif | Bin 0 -> 115 bytes .../default/modern/images/i_desc_arrow.gif | Bin 0 -> 114 bytes .../default/modern/images/i_msg-error.gif | Bin 0 -> 1013 bytes .../default/modern/images/i_msg-note.gif | Bin 0 -> 1022 bytes .../default/modern/images/i_msg-success.gif | Bin 0 -> 1024 bytes ...pager_arrow_right.gif => i_pager-next.gif} | Bin ...{pager_arrow_left.gif => i_pager-prev.gif} | Bin .../images/{icon_printer.gif => i_print.gif} | Bin .../default/modern/images/i_rss-big.png | Bin 0 -> 791 bytes skin/frontend/default/modern/images/i_rss.gif | Bin 0 -> 350 bytes .../default/modern/images/icon_feed.gif | Bin 351 -> 0 bytes skin/frontend/default/modern/images/logo.gif | Bin 2291 -> 1964 bytes .../default/modern/images/logo_email.gif | Bin 3407 -> 1964 bytes .../default/modern/images/logo_print.gif | Bin 3407 -> 1964 bytes .../modern/images/media/404_callout1.jpg | Bin 17781 -> 0 bytes .../modern/images/media/404_callout2.jpg | Bin 23222 -> 0 bytes .../modern/images/media/col_left_callout.jpg | Bin 19102 -> 0 bytes .../modern/images/media/col_right_callout.jpg | Bin 14703 -> 0 bytes .../default/modern/images/opc-ajax-loader.gif | Bin 0 -> 673 bytes .../images/product_rating_blank_star.gif | Bin 302 -> 0 bytes .../images/product_rating_full_star.gif | Bin 407 -> 0 bytes .../frontend/default/modern/images/spacer.gif | Bin 0 -> 43 bytes .../modern/images/widgets/i_widget-link.gif | Bin 0 -> 57 bytes skin/frontend/default/modern/js/bundle.js | 191 - .../frontend/default/modern/js/giftmessage.js | 130 - skin/frontend/default/modern/js/opcheckout.js | 809 --- 1857 files changed, 33056 insertions(+), 99669 deletions(-) create mode 100644 app/code/core/Mage/AdminNotification/Model/Survey.php rename app/code/core/Mage/{Paybox/Block/System/Failure.php => Adminhtml/Block/Notification/Survey.php} (56%) create mode 100644 app/code/core/Mage/Adminhtml/Block/Report/Sales/Grid/Column/Renderer/Date.php rename app/code/core/Mage/{Paybox/Block/Adminhtml/Cart/Type/Select.php => Adminhtml/controllers/SurveyController.php} (62%) delete mode 100644 app/code/core/Mage/AmazonPayments/Block/Adminhtml/Shipping/Methods.php delete mode 100644 app/code/core/Mage/AmazonPayments/Block/Cba/Form.php delete mode 100644 app/code/core/Mage/AmazonPayments/Block/Cba/Redirect.php delete mode 100644 app/code/core/Mage/AmazonPayments/Block/Form.php delete mode 100644 app/code/core/Mage/AmazonPayments/Block/Link/Shortcut.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Api/Abstract.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Api/Asp.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Api/Asp/Abstract.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Api/Asp/Amount.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Request/Abstract.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Request/Cancel.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Request/Refund.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Request/Settle.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Response/Abstract.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Response/Cancel.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Response/Error.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Response/Refund.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Response/Settle.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Api/Asp/Ipn/Request.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Api/Cba.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Api/Cba/Document.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Api/Debug.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Mysql4/Api/Debug.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Mysql4/Api/Debug/Collection.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Mysql4/Setup.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Observer.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Payment.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Payment/Asp.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Payment/Asp/Abstract.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Payment/Asp/Fps.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Payment/Asp/Notification.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Payment/Asp/Source/PaymentAction.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Payment/Cba.php delete mode 100644 app/code/core/Mage/AmazonPayments/Model/Session.php delete mode 100644 app/code/core/Mage/AmazonPayments/controllers/AspController.php delete mode 100644 app/code/core/Mage/AmazonPayments/controllers/CbaController.php delete mode 100644 app/code/core/Mage/AmazonPayments/etc/config.xml delete mode 100644 app/code/core/Mage/AmazonPayments/etc/system.xml delete mode 100644 app/code/core/Mage/AmazonPayments/sql/amazonpayments_setup/mysql4-install-0.1.2.php delete mode 100644 app/code/core/Mage/AmazonPayments/sql/amazonpayments_setup/mysql4-upgrade-0.1.0-0.1.1.php delete mode 100644 app/code/core/Mage/AmazonPayments/sql/amazonpayments_setup/mysql4-upgrade-0.1.1-0.1.2.php rename app/code/core/Mage/{Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.5-0.8.6.php => Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.18-1.4.0.0.19.php} (76%) create mode 100644 app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.19-1.4.0.0.20.php rename app/code/core/Mage/{Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.9-0.8.10.php => Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.20-1.4.0.0.21.php} (76%) rename app/code/core/Mage/{AmazonPayments/Block/Asp/Redirect.php => Centinel/Block/Adminhtml/Validation.php} (54%) rename app/code/core/Mage/{AmazonPayments/Block/Asp/Shortcut.php => Centinel/Block/Adminhtml/Validation/Form.php} (56%) rename app/code/core/Mage/{Paybox/Block/Direct/Info.php => Centinel/Block/Authentication.php} (60%) rename app/code/core/Mage/{AmazonPayments/Helper/Data.php => Centinel/Block/Authentication/Complete.php} (67%) rename app/code/core/Mage/{AmazonPayments/Block/Cba/Success.php => Centinel/Block/Authentication/Start.php} (66%) rename app/code/core/Mage/{Ogone/Block/Info.php => Centinel/Block/Logo.php} (76%) create mode 100644 app/code/core/Mage/Centinel/Helper/Data.php create mode 100644 app/code/core/Mage/Centinel/Model/Api.php create mode 100644 app/code/core/Mage/Centinel/Model/Config.php create mode 100644 app/code/core/Mage/Centinel/Model/Observer.php create mode 100644 app/code/core/Mage/Centinel/Model/Service.php rename app/code/core/Mage/{Oscommerce => Centinel}/Model/Session.php (83%) create mode 100644 app/code/core/Mage/Centinel/Model/State/Mastercard.php create mode 100644 app/code/core/Mage/Centinel/Model/State/Visa.php create mode 100644 app/code/core/Mage/Centinel/Model/StateAbstract.php create mode 100644 app/code/core/Mage/Centinel/controllers/Adminhtml/Centinel/IndexController.php create mode 100644 app/code/core/Mage/Centinel/controllers/IndexController.php create mode 100644 app/code/core/Mage/Centinel/etc/config.xml create mode 100644 app/code/core/Mage/Centinel/etc/system.xml delete mode 100644 app/code/core/Mage/Chronopay/Block/Form.php delete mode 100644 app/code/core/Mage/Chronopay/Block/Info.php delete mode 100644 app/code/core/Mage/Chronopay/Block/Standard/Failure.php delete mode 100644 app/code/core/Mage/Chronopay/Block/Standard/Form.php delete mode 100644 app/code/core/Mage/Chronopay/Block/Standard/Redirect.php delete mode 100644 app/code/core/Mage/Chronopay/Helper/Data.php delete mode 100644 app/code/core/Mage/Chronopay/Model/Api/Debug.php delete mode 100644 app/code/core/Mage/Chronopay/Model/Config.php delete mode 100644 app/code/core/Mage/Chronopay/Model/Gateway.php delete mode 100644 app/code/core/Mage/Chronopay/Model/Gateway/Request.php delete mode 100644 app/code/core/Mage/Chronopay/Model/Gateway/Result.php delete mode 100644 app/code/core/Mage/Chronopay/Model/Mysql4/Api/Debug.php delete mode 100644 app/code/core/Mage/Chronopay/Model/Mysql4/Api/Debug/Collection.php delete mode 100644 app/code/core/Mage/Chronopay/Model/Mysql4/Setup.php delete mode 100644 app/code/core/Mage/Chronopay/Model/Source/Cctype.php delete mode 100644 app/code/core/Mage/Chronopay/Model/Source/Language.php delete mode 100644 app/code/core/Mage/Chronopay/Model/Source/PaymentAction.php delete mode 100644 app/code/core/Mage/Chronopay/Model/Standard.php delete mode 100644 app/code/core/Mage/Chronopay/controllers/StandardController.php delete mode 100644 app/code/core/Mage/Chronopay/etc/config.xml delete mode 100644 app/code/core/Mage/Chronopay/etc/system.xml delete mode 100644 app/code/core/Mage/Chronopay/sql/chronopay_setup/mysql4-install-0.1.0.php rename app/code/core/Mage/{Paybox/sql/paybox_setup/mysql4-upgrade-0.1.2-0.1.3.php => Core/sql/core_setup/mysql4-upgrade-0.8.24-0.8.25.php} (83%) rename app/code/core/Mage/{Flo2Cash/sql/flo2cash_setup/mysql4-upgrade-0.1.0-0.1.1.php => Customer/sql/customer_setup/mysql4-upgrade-1.4.0.0.5-1.4.0.0.6.php} (86%) delete mode 100644 app/code/core/Mage/Cybermut/Block/Error.php delete mode 100644 app/code/core/Mage/Cybermut/Block/Form.php delete mode 100644 app/code/core/Mage/Cybermut/Block/Redirect.php delete mode 100644 app/code/core/Mage/Cybermut/Helper/Data.php delete mode 100644 app/code/core/Mage/Cybermut/Model/Api/Debug.php delete mode 100644 app/code/core/Mage/Cybermut/Model/Mysql4/Api/Debug.php delete mode 100644 app/code/core/Mage/Cybermut/Model/Mysql4/Api/Debug/Collection.php delete mode 100644 app/code/core/Mage/Cybermut/Model/Mysql4/Setup.php delete mode 100644 app/code/core/Mage/Cybermut/Model/Payment.php delete mode 100644 app/code/core/Mage/Cybermut/Model/Source/Bank.php delete mode 100644 app/code/core/Mage/Cybermut/Model/Source/Language.php delete mode 100644 app/code/core/Mage/Cybermut/controllers/PaymentController.php delete mode 100644 app/code/core/Mage/Cybermut/etc/config.xml delete mode 100644 app/code/core/Mage/Cybermut/etc/system.xml delete mode 100644 app/code/core/Mage/Cybermut/sql/cybermut_setup/mysql4-install-0.1.0.php delete mode 100644 app/code/core/Mage/Cybersource/Block/Form.php delete mode 100644 app/code/core/Mage/Cybersource/Block/Info.php delete mode 100644 app/code/core/Mage/Cybersource/Helper/Data.php delete mode 100644 app/code/core/Mage/Cybersource/Model/Api/Debug.php delete mode 100644 app/code/core/Mage/Cybersource/Model/Api/ExtendedSoapClient.php delete mode 100644 app/code/core/Mage/Cybersource/Model/Config.php delete mode 100644 app/code/core/Mage/Cybersource/Model/Mysql4/Api/Debug.php delete mode 100644 app/code/core/Mage/Cybersource/Model/Mysql4/Api/Debug/Collection.php delete mode 100644 app/code/core/Mage/Cybersource/Model/Mysql4/Setup.php delete mode 100644 app/code/core/Mage/Cybersource/Model/Soap.php delete mode 100644 app/code/core/Mage/Cybersource/Model/Source/Cctype.php delete mode 100644 app/code/core/Mage/Cybersource/Model/Source/PaymentAction.php delete mode 100644 app/code/core/Mage/Cybersource/etc/config.xml delete mode 100644 app/code/core/Mage/Cybersource/etc/system.xml delete mode 100644 app/code/core/Mage/Cybersource/sql/cybersource_setup/mysql4-install-0.7.0.php delete mode 100644 app/code/core/Mage/Eway/Block/Form.php delete mode 100644 app/code/core/Mage/Eway/Block/Info.php delete mode 100644 app/code/core/Mage/Eway/Block/Secure/Form.php delete mode 100644 app/code/core/Mage/Eway/Block/Secure/Redirect.php delete mode 100644 app/code/core/Mage/Eway/Block/Shared/Failure.php delete mode 100644 app/code/core/Mage/Eway/Block/Shared/Form.php delete mode 100644 app/code/core/Mage/Eway/Block/Shared/Redirect.php delete mode 100644 app/code/core/Mage/Eway/Controller/Abstract.php delete mode 100644 app/code/core/Mage/Eway/Helper/Data.php delete mode 100644 app/code/core/Mage/Eway/Model/Api/Debug.php delete mode 100644 app/code/core/Mage/Eway/Model/Direct.php delete mode 100644 app/code/core/Mage/Eway/Model/Mysql4/Api/Debug.php delete mode 100644 app/code/core/Mage/Eway/Model/Mysql4/Api/Debug/Collection.php delete mode 100644 app/code/core/Mage/Eway/Model/Mysql4/Setup.php delete mode 100644 app/code/core/Mage/Eway/Model/Secure.php delete mode 100644 app/code/core/Mage/Eway/Model/Shared.php delete mode 100644 app/code/core/Mage/Eway/Model/Source/Cctype.php delete mode 100644 app/code/core/Mage/Eway/controllers/SharedController.php delete mode 100644 app/code/core/Mage/Eway/etc/config.xml delete mode 100644 app/code/core/Mage/Eway/etc/system.xml delete mode 100644 app/code/core/Mage/Eway/sql/eway_setup/mysql4-install-0.1.0.php delete mode 100644 app/code/core/Mage/Flo2Cash/Block/Form.php delete mode 100644 app/code/core/Mage/Flo2Cash/Block/Info.php delete mode 100644 app/code/core/Mage/Flo2Cash/Helper/Data.php delete mode 100644 app/code/core/Mage/Flo2Cash/Model/Api/Debug.php delete mode 100644 app/code/core/Mage/Flo2Cash/Model/Mysql4/Api/Debug.php delete mode 100644 app/code/core/Mage/Flo2Cash/Model/Mysql4/Api/Debug/Collection.php delete mode 100644 app/code/core/Mage/Flo2Cash/Model/Mysql4/Setup.php delete mode 100644 app/code/core/Mage/Flo2Cash/Model/Source/Cctype.php delete mode 100644 app/code/core/Mage/Flo2Cash/Model/Source/PaymentAction.php delete mode 100644 app/code/core/Mage/Flo2Cash/Model/Web.php delete mode 100644 app/code/core/Mage/Flo2Cash/etc/config.xml delete mode 100644 app/code/core/Mage/Flo2Cash/etc/system.xml delete mode 100644 app/code/core/Mage/Flo2Cash/sql/flo2cash_setup/mysql4-install-0.1.0.php delete mode 100644 app/code/core/Mage/Ideal/Block/Advanced/Failure.php delete mode 100755 app/code/core/Mage/Ideal/Block/Advanced/Form.php delete mode 100644 app/code/core/Mage/Ideal/Block/Advanced/Info.php delete mode 100755 app/code/core/Mage/Ideal/Block/Advanced/Redirect.php delete mode 100644 app/code/core/Mage/Ideal/Block/Basic/Failure.php delete mode 100755 app/code/core/Mage/Ideal/Block/Basic/Form.php delete mode 100755 app/code/core/Mage/Ideal/Block/Basic/Redirect.php delete mode 100755 app/code/core/Mage/Ideal/Helper/Data.php delete mode 100755 app/code/core/Mage/Ideal/Model/Advanced.php delete mode 100755 app/code/core/Mage/Ideal/Model/Api/Advanced.php delete mode 100755 app/code/core/Mage/Ideal/Model/Api/Advanced/AcquirerStatusRequest.php delete mode 100755 app/code/core/Mage/Ideal/Model/Api/Advanced/AcquirerStatusResponse.php delete mode 100755 app/code/core/Mage/Ideal/Model/Api/Advanced/AcquirerTrxRequest.php delete mode 100755 app/code/core/Mage/Ideal/Model/Api/Advanced/AcquirerTrxResponse.php delete mode 100755 app/code/core/Mage/Ideal/Model/Api/Advanced/DirectoryRequest.php delete mode 100755 app/code/core/Mage/Ideal/Model/Api/Advanced/DirectoryResponse.php delete mode 100755 app/code/core/Mage/Ideal/Model/Api/Advanced/Issuer.php delete mode 100755 app/code/core/Mage/Ideal/Model/Api/Advanced/Request.php delete mode 100755 app/code/core/Mage/Ideal/Model/Api/Advanced/Response.php delete mode 100755 app/code/core/Mage/Ideal/Model/Api/Advanced/Security.php delete mode 100644 app/code/core/Mage/Ideal/Model/Api/Debug.php delete mode 100755 app/code/core/Mage/Ideal/Model/Basic.php delete mode 100644 app/code/core/Mage/Ideal/Model/Mysql4/Api/Debug.php delete mode 100644 app/code/core/Mage/Ideal/Model/Mysql4/Api/Debug/Collection.php delete mode 100755 app/code/core/Mage/Ideal/Model/Mysql4/Setup.php delete mode 100644 app/code/core/Mage/Ideal/Model/Observer.php delete mode 100644 app/code/core/Mage/Ideal/Model/Source/Language.php delete mode 100755 app/code/core/Mage/Ideal/controllers/AdvancedController.php delete mode 100755 app/code/core/Mage/Ideal/controllers/BasicController.php delete mode 100755 app/code/core/Mage/Ideal/etc/config.xml delete mode 100755 app/code/core/Mage/Ideal/etc/system.xml delete mode 100755 app/code/core/Mage/Ideal/sql/ideal_setup/mysql4-install-0.1.0.php delete mode 100644 app/code/core/Mage/Ogone/Block/Form.php delete mode 100644 app/code/core/Mage/Ogone/Block/Paypage.php delete mode 100644 app/code/core/Mage/Ogone/Block/Placeform.php delete mode 100644 app/code/core/Mage/Ogone/Helper/Data.php delete mode 100644 app/code/core/Mage/Ogone/Model/Api.php delete mode 100644 app/code/core/Mage/Ogone/Model/Api/Debug.php delete mode 100644 app/code/core/Mage/Ogone/Model/Config.php delete mode 100644 app/code/core/Mage/Ogone/Model/Mysql4/Api/Debug.php delete mode 100644 app/code/core/Mage/Ogone/Model/Source/PaymentAction.php delete mode 100644 app/code/core/Mage/Ogone/Model/Source/Pmlist.php delete mode 100644 app/code/core/Mage/Ogone/Model/Source/Template.php delete mode 100644 app/code/core/Mage/Ogone/controllers/ApiController.php delete mode 100644 app/code/core/Mage/Ogone/etc/config.xml delete mode 100644 app/code/core/Mage/Ogone/etc/system.xml delete mode 100644 app/code/core/Mage/Ogone/sql/ogone_setup/mysql4-install-0.0.1.php delete mode 100644 app/code/core/Mage/Oscommerce/Block/Adminhtml/Import.php delete mode 100644 app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Edit.php delete mode 100644 app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Edit/Form.php delete mode 100644 app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Edit/Tab/General.php delete mode 100644 app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Edit/Tab/Run.php delete mode 100644 app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Edit/Tabs.php delete mode 100644 app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Grid.php delete mode 100644 app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Run.php delete mode 100644 app/code/core/Mage/Oscommerce/Block/Adminhtml/Order.php delete mode 100644 app/code/core/Mage/Oscommerce/Block/Adminhtml/Order/Grid.php delete mode 100644 app/code/core/Mage/Oscommerce/Block/Adminhtml/Order/View.php delete mode 100644 app/code/core/Mage/Oscommerce/Block/Order/List.php delete mode 100644 app/code/core/Mage/Oscommerce/Block/Order/View.php delete mode 100644 app/code/core/Mage/Oscommerce/Helper/Data.php delete mode 100644 app/code/core/Mage/Oscommerce/Model/Config.php delete mode 100644 app/code/core/Mage/Oscommerce/Model/Mysql4/Oscommerce.php delete mode 100755 app/code/core/Mage/Oscommerce/Model/Mysql4/Oscommerce/Collection.php delete mode 100644 app/code/core/Mage/Oscommerce/Model/Mysql4/Oscommerce/Order.php delete mode 100644 app/code/core/Mage/Oscommerce/Model/Mysql4/Oscommerce/Order/Collection.php delete mode 100755 app/code/core/Mage/Oscommerce/Model/Oscommerce.php delete mode 100644 app/code/core/Mage/Oscommerce/Model/Oscommerce/Order.php delete mode 100644 app/code/core/Mage/Oscommerce/controllers/Adminhtml/ImportController.php delete mode 100644 app/code/core/Mage/Oscommerce/controllers/Adminhtml/OrderController.php delete mode 100644 app/code/core/Mage/Oscommerce/controllers/OrderController.php delete mode 100644 app/code/core/Mage/Oscommerce/etc/adminhtml.xml delete mode 100644 app/code/core/Mage/Oscommerce/etc/charsets.xml delete mode 100755 app/code/core/Mage/Oscommerce/etc/config.xml delete mode 100755 app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-install-0.8.0.php delete mode 100644 app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.1-0.8.2.php delete mode 100644 app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.2-0.8.3.php delete mode 100644 app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.4-0.8.5.php delete mode 100644 app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.6-0.8.7.php delete mode 100644 app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.7-0.8.8.php delete mode 100644 app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.8-0.8.9.php rename app/code/core/Mage/{Eway/Block/Secure/Failure.php => Page/Block/Js/Cookie.php} (59%) delete mode 100644 app/code/core/Mage/Paybox/Block/Adminhtml/Cart/Type.php delete mode 100644 app/code/core/Mage/Paybox/Block/Direct/Form.php delete mode 100644 app/code/core/Mage/Paybox/Block/System/Error.php delete mode 100644 app/code/core/Mage/Paybox/Block/System/Form.php delete mode 100644 app/code/core/Mage/Paybox/Block/System/Redirect.php delete mode 100644 app/code/core/Mage/Paybox/Helper/Data.php delete mode 100644 app/code/core/Mage/Paybox/Model/Api/Debug.php delete mode 100644 app/code/core/Mage/Paybox/Model/Direct.php delete mode 100644 app/code/core/Mage/Paybox/Model/Mysql4/Api/Debug.php delete mode 100644 app/code/core/Mage/Paybox/Model/Mysql4/Api/Debug/Collection.php delete mode 100644 app/code/core/Mage/Paybox/Model/Mysql4/Question/Number.php delete mode 100644 app/code/core/Mage/Paybox/Model/Mysql4/Setup.php delete mode 100644 app/code/core/Mage/Paybox/Model/Question/Number.php delete mode 100644 app/code/core/Mage/Paybox/Model/Source/CartType.php delete mode 100644 app/code/core/Mage/Paybox/Model/Source/Cctype.php delete mode 100644 app/code/core/Mage/Paybox/Model/Source/Language.php delete mode 100644 app/code/core/Mage/Paybox/Model/Source/ManagementMode.php delete mode 100644 app/code/core/Mage/Paybox/Model/Source/MethodCall.php delete mode 100644 app/code/core/Mage/Paybox/Model/Source/PaymentAction.php delete mode 100644 app/code/core/Mage/Paybox/Model/Source/PaymentMode.php delete mode 100644 app/code/core/Mage/Paybox/Model/Source/PaymentType.php delete mode 100644 app/code/core/Mage/Paybox/Model/System.php delete mode 100644 app/code/core/Mage/Paybox/controllers/SystemController.php delete mode 100644 app/code/core/Mage/Paybox/etc/config.xml delete mode 100644 app/code/core/Mage/Paybox/etc/currency.xml delete mode 100644 app/code/core/Mage/Paybox/etc/system.xml delete mode 100644 app/code/core/Mage/Paybox/sql/paybox_setup/mysql4-install-0.1.0.php delete mode 100644 app/code/core/Mage/Paybox/sql/paybox_setup/mysql4-upgrade-0.1.1-0.1.2.php create mode 100644 app/code/core/Mage/Paypal/Controller/Express/Abstract.php create mode 100644 app/code/core/Mage/Paypal/Controller/Ipn/Abstract.php delete mode 100644 app/code/core/Mage/Paypal/Helper/Currency.php delete mode 100644 app/code/core/Mage/PaypalUk/Block/Direct/Form.php delete mode 100644 app/code/core/Mage/PaypalUk/Block/Direct/Info.php delete mode 100644 app/code/core/Mage/PaypalUk/Block/Express/Info.php delete mode 100644 app/code/core/Mage/PaypalUk/Block/Express/Review.php delete mode 100644 app/code/core/Mage/PaypalUk/Block/Express/Review/Details.php delete mode 100644 app/code/core/Mage/PaypalUk/Block/Link/Shortcut.php delete mode 100644 app/code/core/Mage/PaypalUk/Model/Api/Abstract.php create mode 100644 app/code/core/Mage/PaypalUk/Model/Api/Nvp.php delete mode 100644 app/code/core/Mage/PaypalUk/Model/Api/Pro.php delete mode 100644 app/code/core/Mage/PaypalUk/Model/Api/Result.php create mode 100644 app/code/core/Mage/PaypalUk/Model/Config.php rename app/code/core/Mage/{Eway/controllers/SecureController.php => PaypalUk/Model/Express/Checkout.php} (69%) delete mode 100644 app/code/core/Mage/PaypalUk/Model/Express/Review.php delete mode 100644 app/code/core/Mage/PaypalUk/Model/Mysql4/Api/Debug.php delete mode 100644 app/code/core/Mage/PaypalUk/Model/Mysql4/Api/Debug/Collection.php create mode 100644 app/code/core/Mage/PaypalUk/Model/Pro.php delete mode 100644 app/code/core/Mage/PaypalUk/Model/Source/Cctype.php delete mode 100644 app/code/core/Mage/PaypalUk/Model/Source/PaymentAction.php rename app/code/core/Mage/{AmazonPayments/Block/Asp/Form.php => PaypalUk/controllers/IpnController.php} (63%) delete mode 100644 app/code/core/Mage/Protx/Block/Standard/Failure.php delete mode 100644 app/code/core/Mage/Protx/Block/Standard/Form.php delete mode 100644 app/code/core/Mage/Protx/Block/Standard/Redirect.php delete mode 100644 app/code/core/Mage/Protx/Helper/Data.php delete mode 100644 app/code/core/Mage/Protx/Model/Api/Debug.php delete mode 100644 app/code/core/Mage/Protx/Model/Config.php delete mode 100644 app/code/core/Mage/Protx/Model/Mysql4/Api/Debug.php delete mode 100644 app/code/core/Mage/Protx/Model/Mysql4/Api/Debug/Collection.php delete mode 100644 app/code/core/Mage/Protx/Model/Mysql4/Setup.php delete mode 100644 app/code/core/Mage/Protx/Model/Session.php delete mode 100644 app/code/core/Mage/Protx/Model/Source/ModeAction.php delete mode 100644 app/code/core/Mage/Protx/Model/Source/PaymentAction.php delete mode 100644 app/code/core/Mage/Protx/Model/Standard.php delete mode 100644 app/code/core/Mage/Protx/controllers/StandardController.php delete mode 100644 app/code/core/Mage/Protx/etc/config.xml delete mode 100644 app/code/core/Mage/Protx/etc/system.xml delete mode 100644 app/code/core/Mage/Protx/sql/protx_setup/mysql4-install-0.1.0.php rename app/code/core/Mage/{Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.3-0.8.4.php => Sales/sql/sales_setup/mysql4-upgrade-0.9.54-0.9.55.php} (77%) rename app/code/core/Mage/{Paybox/sql/paybox_setup/mysql4-upgrade-0.1.0-0.1.1.php => Sales/sql/sales_setup/mysql4-upgrade-0.9.55-0.9.56.php} (86%) delete mode 100644 app/code/core/Mage/Strikeiron/Helper/Data.php delete mode 100644 app/code/core/Mage/Strikeiron/Model/Currency/Import/Strikeiron.php delete mode 100644 app/code/core/Mage/Strikeiron/Model/Mysql4/Taxrate.php delete mode 100644 app/code/core/Mage/Strikeiron/Model/Mysql4/Taxrate/Collection.php delete mode 100644 app/code/core/Mage/Strikeiron/Model/Service/AddressVerification.php delete mode 100644 app/code/core/Mage/Strikeiron/Model/Service/Base.php delete mode 100644 app/code/core/Mage/Strikeiron/Model/Service/EmailVerification.php delete mode 100644 app/code/core/Mage/Strikeiron/Model/Service/ForeignExchangeRates.php delete mode 100644 app/code/core/Mage/Strikeiron/Model/Service/SalesUseTax.php delete mode 100644 app/code/core/Mage/Strikeiron/Model/Service/SalesUseTaxBasic.php delete mode 100644 app/code/core/Mage/Strikeiron/Model/Service/SalesUseTaxComplete.php delete mode 100644 app/code/core/Mage/Strikeiron/Model/Service/UsAddressVerification.php delete mode 100644 app/code/core/Mage/Strikeiron/Model/Session.php delete mode 100644 app/code/core/Mage/Strikeiron/Model/Source/ErrorAddressAction.php delete mode 100644 app/code/core/Mage/Strikeiron/Model/Source/SalesTaxType.php delete mode 100644 app/code/core/Mage/Strikeiron/Model/Source/Salestaxminmax.php delete mode 100644 app/code/core/Mage/Strikeiron/Model/Source/UndeterminedEmailAction.php delete mode 100644 app/code/core/Mage/Strikeiron/Model/Strikeiron.php delete mode 100644 app/code/core/Mage/Strikeiron/Model/Taxrate.php delete mode 100644 app/code/core/Mage/Strikeiron/controllers/TestController.php delete mode 100644 app/code/core/Mage/Strikeiron/etc/adminhtml.xml delete mode 100644 app/code/core/Mage/Strikeiron/etc/config.xml delete mode 100644 app/code/core/Mage/Strikeiron/etc/system.xml delete mode 100644 app/code/core/Mage/Strikeiron/sql/strikeiron_setup/mysql4-install-0.9.1.php rename app/code/core/Mage/{Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.0-0.8.1.php => Tag/sql/tag_setup/mysql4-upgrade-0.7.4-0.7.5.php} (59%) mode change 100755 => 100644 rename app/design/{frontend/default/modern/layout/reports.xml => adminhtml/default/default/layout/adminnotification.xml} (66%) create mode 100644 app/design/adminhtml/default/default/layout/centinel.xml rename app/design/adminhtml/default/default/template/{ideal/advanced/info.phtml => centinel/authentication/complete.phtml} (70%) rename app/design/adminhtml/default/default/template/{flo2cash/pdf/info.phtml => centinel/authentication/start.phtml} (66%) rename app/design/adminhtml/default/default/template/{chronopay/pdf/info.phtml => centinel/validation/form.phtml} (62%) delete mode 100644 app/design/adminhtml/default/default/template/chronopay/form.phtml delete mode 100644 app/design/adminhtml/default/default/template/chronopay/info.phtml delete mode 100644 app/design/adminhtml/default/default/template/cybersource/form.phtml delete mode 100644 app/design/adminhtml/default/default/template/cybersource/info.phtml delete mode 100644 app/design/adminhtml/default/default/template/cybersource/pdf/info.phtml delete mode 100644 app/design/adminhtml/default/default/template/eway/form.phtml delete mode 100644 app/design/adminhtml/default/default/template/eway/info.phtml delete mode 100644 app/design/adminhtml/default/default/template/eway/pdf/info.phtml delete mode 100644 app/design/adminhtml/default/default/template/flo2cash/form.phtml delete mode 100644 app/design/adminhtml/default/default/template/flo2cash/info.phtml delete mode 100644 app/design/adminhtml/default/default/template/ideal/advanced/pdf/info.phtml create mode 100644 app/design/adminhtml/default/default/template/notification/survey.phtml delete mode 100644 app/design/adminhtml/default/default/template/ogone/info.phtml delete mode 100755 app/design/adminhtml/default/default/template/oscommerce/convert/run.phtml delete mode 100644 app/design/adminhtml/default/default/template/oscommerce/order/view.phtml delete mode 100644 app/design/adminhtml/default/default/template/paybox/adminhtml/cart/type/select.phtml delete mode 100644 app/design/adminhtml/default/default/template/paybox/direct/form.phtml delete mode 100644 app/design/adminhtml/default/default/template/paybox/direct/info.phtml delete mode 100644 app/design/adminhtml/default/default/template/paybox/direct/pdf/info.phtml delete mode 100644 app/design/adminhtml/default/default/template/payment/info/cc.phtml delete mode 100644 app/design/adminhtml/default/default/template/payment/info/ccsave.phtml delete mode 100644 app/design/adminhtml/default/default/template/payment/info/pdf/cc.phtml delete mode 100644 app/design/adminhtml/default/default/template/payment/info/pdf/ccsave.phtml delete mode 100644 app/design/adminhtml/default/default/template/paypaluk/direct/form.phtml delete mode 100644 app/design/adminhtml/default/default/template/paypaluk/direct/info.phtml delete mode 100644 app/design/adminhtml/default/default/template/paypaluk/direct/pdf/info.phtml delete mode 100644 app/design/adminhtml/default/default/template/paypaluk/express/info.phtml delete mode 100644 app/design/adminhtml/default/default/template/paypaluk/express/pdf/info.phtml delete mode 100755 app/design/frontend/base/default/layout/amazonpayments.xml rename app/design/frontend/base/default/layout/{oscommerce.xml => centinel.xml} (53%) delete mode 100644 app/design/frontend/base/default/layout/chronopay.xml delete mode 100644 app/design/frontend/base/default/layout/cybermut.xml delete mode 100644 app/design/frontend/base/default/layout/eway.xml delete mode 100644 app/design/frontend/base/default/layout/ideal.xml delete mode 100644 app/design/frontend/base/default/layout/ogone.xml delete mode 100644 app/design/frontend/base/default/layout/paybox.xml delete mode 100644 app/design/frontend/base/default/layout/protx.xml delete mode 100644 app/design/frontend/base/default/template/amazonpayments/asp/form.phtml delete mode 100644 app/design/frontend/base/default/template/amazonpayments/asp/redirect.phtml delete mode 100644 app/design/frontend/base/default/template/amazonpayments/asp/shortcut.phtml delete mode 100644 app/design/frontend/base/default/template/amazonpayments/cba/form.phtml delete mode 100644 app/design/frontend/base/default/template/amazonpayments/cba/success.phtml delete mode 100644 app/design/frontend/base/default/template/amazonpayments/link.phtml create mode 100644 app/design/frontend/base/default/template/centinel/authentication.phtml rename app/design/frontend/{default/modern/template/customer/logout.phtml => base/default/template/centinel/authentication/complete.phtml} (73%) rename app/design/frontend/{default/iphone/template/bundle/catalog/product/view/type/bundle.phtml => base/default/template/centinel/authentication/start.phtml} (65%) create mode 100644 app/design/frontend/base/default/template/centinel/logo.phtml rename app/design/frontend/{default/modern/template/checkout/onepage/review => base/default/template/checkout/multishipping/overview}/item.phtml (91%) delete mode 100644 app/design/frontend/base/default/template/chronopay/form.phtml delete mode 100644 app/design/frontend/base/default/template/chronopay/info.phtml delete mode 100644 app/design/frontend/base/default/template/chronopay/standard/failure.phtml delete mode 100644 app/design/frontend/base/default/template/chronopay/standard/form.phtml delete mode 100644 app/design/frontend/base/default/template/cybermut/error.phtml delete mode 100644 app/design/frontend/base/default/template/cybermut/form.phtml delete mode 100644 app/design/frontend/base/default/template/cybersource/form.phtml delete mode 100644 app/design/frontend/base/default/template/cybersource/info.phtml delete mode 100644 app/design/frontend/base/default/template/eway/form.phtml delete mode 100644 app/design/frontend/base/default/template/eway/info.phtml delete mode 100644 app/design/frontend/base/default/template/eway/secure/failure.phtml delete mode 100644 app/design/frontend/base/default/template/eway/secure/form.phtml delete mode 100644 app/design/frontend/base/default/template/eway/shared/failure.phtml delete mode 100644 app/design/frontend/base/default/template/eway/shared/form.phtml delete mode 100644 app/design/frontend/base/default/template/flo2cash/form.phtml delete mode 100644 app/design/frontend/base/default/template/flo2cash/info.phtml delete mode 100644 app/design/frontend/base/default/template/ideal/advanced/failure.phtml delete mode 100755 app/design/frontend/base/default/template/ideal/advanced/form.phtml delete mode 100644 app/design/frontend/base/default/template/ideal/advanced/info.phtml delete mode 100644 app/design/frontend/base/default/template/ideal/basic/failure.phtml delete mode 100755 app/design/frontend/base/default/template/ideal/basic/form.phtml delete mode 100644 app/design/frontend/base/default/template/ogone/form.phtml delete mode 100644 app/design/frontend/base/default/template/ogone/info.phtml delete mode 100644 app/design/frontend/base/default/template/ogone/paypage.phtml delete mode 100644 app/design/frontend/base/default/template/ogone/placeform.phtml delete mode 100644 app/design/frontend/base/default/template/oscommerce/order/list.phtml delete mode 100644 app/design/frontend/base/default/template/oscommerce/order/view.phtml rename app/design/frontend/base/default/template/{paypaluk/express/info.phtml => page/js/cookie.phtml} (79%) delete mode 100644 app/design/frontend/base/default/template/paybox/direct/form.phtml delete mode 100644 app/design/frontend/base/default/template/paybox/direct/info.phtml delete mode 100644 app/design/frontend/base/default/template/paybox/system/error.phtml delete mode 100644 app/design/frontend/base/default/template/paybox/system/form.phtml delete mode 100644 app/design/frontend/base/default/template/payment/info/cc.phtml delete mode 100644 app/design/frontend/base/default/template/payment/info/ccsave.phtml delete mode 100644 app/design/frontend/base/default/template/paypaluk/direct/form.phtml delete mode 100644 app/design/frontend/base/default/template/paypaluk/direct/info.phtml delete mode 100644 app/design/frontend/base/default/template/paypaluk/express/form.phtml delete mode 100644 app/design/frontend/base/default/template/paypaluk/express/review.phtml delete mode 100644 app/design/frontend/base/default/template/paypaluk/express/review/details.phtml delete mode 100644 app/design/frontend/base/default/template/paypaluk/link.phtml delete mode 100644 app/design/frontend/base/default/template/protx/standard/failure.phtml delete mode 100644 app/design/frontend/base/default/template/protx/standard/form.phtml delete mode 100755 app/design/frontend/default/iphone/layout/amazonpayments.xml delete mode 100644 app/design/frontend/default/iphone/layout/chronopay.xml delete mode 100644 app/design/frontend/default/iphone/layout/cybermut.xml delete mode 100644 app/design/frontend/default/iphone/layout/eway.xml delete mode 100644 app/design/frontend/default/iphone/layout/ideal.xml delete mode 100644 app/design/frontend/default/iphone/layout/ogone.xml delete mode 100644 app/design/frontend/default/iphone/layout/oscommerce.xml delete mode 100644 app/design/frontend/default/iphone/layout/paybox.xml delete mode 100644 app/design/frontend/default/iphone/layout/protx.xml delete mode 100644 app/design/frontend/default/iphone/template/amazonpayments/asp/form.phtml delete mode 100644 app/design/frontend/default/iphone/template/amazonpayments/asp/redirect.phtml delete mode 100644 app/design/frontend/default/iphone/template/amazonpayments/asp/shortcut.phtml delete mode 100644 app/design/frontend/default/iphone/template/amazonpayments/cba/form.phtml delete mode 100644 app/design/frontend/default/iphone/template/amazonpayments/cba/success.phtml delete mode 100644 app/design/frontend/default/iphone/template/amazonpayments/link.phtml delete mode 100644 app/design/frontend/default/iphone/template/bundle/catalog/product/list/partof.phtml delete mode 100644 app/design/frontend/default/iphone/template/bundle/catalog/product/price.phtml delete mode 100644 app/design/frontend/default/iphone/template/bundle/catalog/product/view/price.phtml delete mode 100644 app/design/frontend/default/iphone/template/bundle/catalog/product/view/tierprices.phtml delete mode 100644 app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle/option/checkbox.phtml delete mode 100644 app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle/option/multi.phtml delete mode 100644 app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle/option/radio.phtml delete mode 100644 app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle/option/select.phtml delete mode 100644 app/design/frontend/default/iphone/template/bundle/catalog/product/view/type/bundle/options.phtml delete mode 100644 app/design/frontend/default/iphone/template/bundle/email/order/items/creditmemo/default.phtml delete mode 100644 app/design/frontend/default/iphone/template/bundle/email/order/items/invoice/default.phtml delete mode 100644 app/design/frontend/default/iphone/template/bundle/email/order/items/order/default.phtml delete mode 100644 app/design/frontend/default/iphone/template/bundle/email/order/items/shipment/default.phtml delete mode 100644 app/design/frontend/default/iphone/template/bundle/sales/order/creditmemo/items/renderer.phtml delete mode 100644 app/design/frontend/default/iphone/template/bundle/sales/order/invoice/items/renderer.phtml delete mode 100644 app/design/frontend/default/iphone/template/bundle/sales/order/items/renderer.phtml delete mode 100644 app/design/frontend/default/iphone/template/bundle/sales/order/shipment/items/renderer.phtml delete mode 100644 app/design/frontend/default/iphone/template/callouts/left_col.phtml delete mode 100644 app/design/frontend/default/iphone/template/callouts/right_col.phtml delete mode 100644 app/design/frontend/default/iphone/template/chronopay/form.phtml delete mode 100644 app/design/frontend/default/iphone/template/chronopay/info.phtml delete mode 100644 app/design/frontend/default/iphone/template/chronopay/standard/failure.phtml delete mode 100644 app/design/frontend/default/iphone/template/chronopay/standard/form.phtml delete mode 100644 app/design/frontend/default/iphone/template/cybermut/error.phtml delete mode 100644 app/design/frontend/default/iphone/template/cybermut/form.phtml delete mode 100644 app/design/frontend/default/iphone/template/cybersource/form.phtml delete mode 100644 app/design/frontend/default/iphone/template/cybersource/info.phtml delete mode 100644 app/design/frontend/default/iphone/template/directory/currency.phtml delete mode 100644 app/design/frontend/default/iphone/template/directory/currency/switch.phtml delete mode 100644 app/design/frontend/default/iphone/template/downloadable/catalog/product/links.phtml delete mode 100644 app/design/frontend/default/iphone/template/downloadable/catalog/product/samples.phtml delete mode 100644 app/design/frontend/default/iphone/template/downloadable/catalog/product/type.phtml delete mode 100644 app/design/frontend/default/iphone/template/downloadable/checkout/cart/item/default.phtml delete mode 100644 app/design/frontend/default/iphone/template/downloadable/checkout/multishipping/item/downloadable.phtml delete mode 100644 app/design/frontend/default/iphone/template/downloadable/checkout/onepage/review/item.phtml delete mode 100644 app/design/frontend/default/iphone/template/downloadable/checkout/success.phtml delete mode 100644 app/design/frontend/default/iphone/template/downloadable/customer/products/list.phtml delete mode 100644 app/design/frontend/default/iphone/template/downloadable/email/order/items/creditmemo/downloadable.phtml delete mode 100644 app/design/frontend/default/iphone/template/downloadable/email/order/items/invoice/downloadable.phtml delete mode 100644 app/design/frontend/default/iphone/template/downloadable/email/order/items/order/downloadable.phtml delete mode 100644 app/design/frontend/default/iphone/template/downloadable/sales/order/creditmemo/items/renderer/downloadable.phtml delete mode 100644 app/design/frontend/default/iphone/template/downloadable/sales/order/invoice/items/renderer/downloadable.phtml delete mode 100644 app/design/frontend/default/iphone/template/downloadable/sales/order/items/renderer/downloadable.phtml delete mode 100644 app/design/frontend/default/iphone/template/email/order/creditmemo/items.phtml delete mode 100644 app/design/frontend/default/iphone/template/email/order/invoice/items.phtml delete mode 100644 app/design/frontend/default/iphone/template/email/order/items.phtml delete mode 100644 app/design/frontend/default/iphone/template/email/order/items/creditmemo/default.phtml delete mode 100644 app/design/frontend/default/iphone/template/email/order/items/invoice/default.phtml delete mode 100644 app/design/frontend/default/iphone/template/email/order/items/order/default.phtml delete mode 100644 app/design/frontend/default/iphone/template/email/order/items/shipment/default.phtml delete mode 100644 app/design/frontend/default/iphone/template/email/order/shipment/items.phtml delete mode 100644 app/design/frontend/default/iphone/template/email/order/shipment/track.phtml delete mode 100644 app/design/frontend/default/iphone/template/email/productalert/price.phtml delete mode 100644 app/design/frontend/default/iphone/template/email/productalert/stock.phtml delete mode 100644 app/design/frontend/default/iphone/template/eway/form.phtml delete mode 100644 app/design/frontend/default/iphone/template/eway/info.phtml delete mode 100644 app/design/frontend/default/iphone/template/eway/secure/failure.phtml delete mode 100644 app/design/frontend/default/iphone/template/eway/secure/form.phtml delete mode 100644 app/design/frontend/default/iphone/template/eway/shared/failure.phtml delete mode 100644 app/design/frontend/default/iphone/template/eway/shared/form.phtml delete mode 100644 app/design/frontend/default/iphone/template/flo2cash/form.phtml delete mode 100644 app/design/frontend/default/iphone/template/flo2cash/info.phtml delete mode 100644 app/design/frontend/default/iphone/template/ideal/advanced/failure.phtml delete mode 100755 app/design/frontend/default/iphone/template/ideal/advanced/form.phtml delete mode 100644 app/design/frontend/default/iphone/template/ideal/advanced/info.phtml delete mode 100644 app/design/frontend/default/iphone/template/ideal/basic/failure.phtml delete mode 100755 app/design/frontend/default/iphone/template/ideal/basic/form.phtml delete mode 100644 app/design/frontend/default/iphone/template/ogone/form.phtml delete mode 100644 app/design/frontend/default/iphone/template/ogone/info.phtml delete mode 100644 app/design/frontend/default/iphone/template/ogone/paypage.phtml delete mode 100644 app/design/frontend/default/iphone/template/ogone/placeform.phtml delete mode 100644 app/design/frontend/default/iphone/template/oscommerce/order/list.phtml delete mode 100644 app/design/frontend/default/iphone/template/oscommerce/order/view.phtml delete mode 100644 app/design/frontend/default/iphone/template/paybox/direct/form.phtml delete mode 100644 app/design/frontend/default/iphone/template/paybox/direct/info.phtml delete mode 100644 app/design/frontend/default/iphone/template/paybox/system/error.phtml delete mode 100644 app/design/frontend/default/iphone/template/paybox/system/form.phtml delete mode 100644 app/design/frontend/default/iphone/template/payment/info/ccsave.phtml delete mode 100644 app/design/frontend/default/iphone/template/paypal/express/form.phtml delete mode 100644 app/design/frontend/default/iphone/template/paypal/express/info.phtml delete mode 100644 app/design/frontend/default/iphone/template/paypal/express/review.phtml delete mode 100644 app/design/frontend/default/iphone/template/paypal/express/review/details.phtml delete mode 100644 app/design/frontend/default/iphone/template/paypal/link.phtml delete mode 100644 app/design/frontend/default/iphone/template/paypal/standard/form.phtml delete mode 100644 app/design/frontend/default/iphone/template/paypaluk/direct/form.phtml delete mode 100644 app/design/frontend/default/iphone/template/paypaluk/direct/info.phtml delete mode 100644 app/design/frontend/default/iphone/template/paypaluk/express/form.phtml delete mode 100644 app/design/frontend/default/iphone/template/paypaluk/express/info.phtml delete mode 100644 app/design/frontend/default/iphone/template/paypaluk/express/review.phtml delete mode 100644 app/design/frontend/default/iphone/template/paypaluk/express/review/details.phtml delete mode 100644 app/design/frontend/default/iphone/template/paypaluk/link.phtml delete mode 100644 app/design/frontend/default/iphone/template/protx/standard/failure.phtml delete mode 100644 app/design/frontend/default/iphone/template/protx/standard/form.phtml delete mode 100644 app/design/frontend/default/modern/assets/button_templates.psd delete mode 100755 app/design/frontend/default/modern/layout/amazonpayments.xml delete mode 100644 app/design/frontend/default/modern/layout/bundle.xml delete mode 100644 app/design/frontend/default/modern/layout/chronopay.xml delete mode 100644 app/design/frontend/default/modern/layout/cms.xml delete mode 100644 app/design/frontend/default/modern/layout/core.xml delete mode 100644 app/design/frontend/default/modern/layout/cybermut.xml delete mode 100644 app/design/frontend/default/modern/layout/directory.xml delete mode 100644 app/design/frontend/default/modern/layout/downloadable.xml delete mode 100644 app/design/frontend/default/modern/layout/eway.xml delete mode 100644 app/design/frontend/default/modern/layout/giftmessage.xml delete mode 100644 app/design/frontend/default/modern/layout/googleanalytics.xml delete mode 100644 app/design/frontend/default/modern/layout/googlecheckout.xml delete mode 100644 app/design/frontend/default/modern/layout/googleoptimizer.xml delete mode 100644 app/design/frontend/default/modern/layout/ideal.xml delete mode 100644 app/design/frontend/default/modern/layout/ogone.xml delete mode 100644 app/design/frontend/default/modern/layout/oscommerce.xml delete mode 100644 app/design/frontend/default/modern/layout/paybox.xml delete mode 100644 app/design/frontend/default/modern/layout/poll.xml delete mode 100644 app/design/frontend/default/modern/layout/productalert.xml delete mode 100644 app/design/frontend/default/modern/layout/protx.xml delete mode 100644 app/design/frontend/default/modern/layout/shipping.xml delete mode 100644 app/design/frontend/default/modern/template/amazonpayments/asp/form.phtml delete mode 100644 app/design/frontend/default/modern/template/amazonpayments/asp/redirect.phtml delete mode 100644 app/design/frontend/default/modern/template/amazonpayments/asp/shortcut.phtml delete mode 100644 app/design/frontend/default/modern/template/amazonpayments/cba/form.phtml delete mode 100644 app/design/frontend/default/modern/template/amazonpayments/cba/success.phtml delete mode 100644 app/design/frontend/default/modern/template/amazonpayments/form.phtml delete mode 100644 app/design/frontend/default/modern/template/amazonpayments/link.phtml delete mode 100644 app/design/frontend/default/modern/template/bundle/catalog/product/list/partof.phtml delete mode 100644 app/design/frontend/default/modern/template/bundle/catalog/product/price.phtml delete mode 100644 app/design/frontend/default/modern/template/bundle/catalog/product/view/price.phtml delete mode 100644 app/design/frontend/default/modern/template/bundle/catalog/product/view/tierprices.phtml delete mode 100644 app/design/frontend/default/modern/template/bundle/catalog/product/view/type/bundle.phtml delete mode 100644 app/design/frontend/default/modern/template/bundle/email/order/items/creditmemo/default.phtml delete mode 100644 app/design/frontend/default/modern/template/bundle/email/order/items/invoice/default.phtml delete mode 100644 app/design/frontend/default/modern/template/bundle/email/order/items/order/default.phtml delete mode 100644 app/design/frontend/default/modern/template/bundle/email/order/items/shipment/default.phtml delete mode 100644 app/design/frontend/default/modern/template/bundle/sales/order/creditmemo/items/renderer.phtml delete mode 100644 app/design/frontend/default/modern/template/bundle/sales/order/invoice/items/renderer.phtml delete mode 100644 app/design/frontend/default/modern/template/bundle/sales/order/items/renderer.phtml delete mode 100644 app/design/frontend/default/modern/template/bundle/sales/order/shipment/items/renderer.phtml delete mode 100644 app/design/frontend/default/modern/template/callouts/left_col.phtml delete mode 100644 app/design/frontend/default/modern/template/callouts/right_col.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/category/page.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/category/view.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/layer/filter.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/layer/state.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/layer/view.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/navigation/left.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/navigation/top.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/product/compare/list.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/product/compare/sidebar.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/product/gallery.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/product/list/related.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/product/list/toolbar.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/product/new.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/product/price.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/product/view/additional.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/product/view/addto.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/product/view/addtocart.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/product/view/attributes.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/product/view/description.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/product/view/price.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/product/view/price_clone.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/product/view/tierprices.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/product/view/type/configurable.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/product/view/type/grouped.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/product/view/type/simple.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/product/view/type/virtual.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/seo/sitemap.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/seo/sitemap/container.phtml delete mode 100644 app/design/frontend/default/modern/template/catalog/seo/tree.phtml delete mode 100644 app/design/frontend/default/modern/template/catalogsearch/advanced/form.phtml delete mode 100644 app/design/frontend/default/modern/template/catalogsearch/advanced/result.phtml delete mode 100644 app/design/frontend/default/modern/template/catalogsearch/result.phtml delete mode 100644 app/design/frontend/default/modern/template/catalogsearch/term.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/cart/coupon.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/cart/crosssell.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/cart/item/default.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/cart/noItems.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/cart/render/default.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/cart/render/simple.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/cart/shipping.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/cart/sidebar.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/cart/sidebar/default.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/cart/totals.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/links.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/multishipping/address/select.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/multishipping/addresses.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/multishipping/agreements.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/multishipping/billing.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/multishipping/billing/items.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/multishipping/link.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/multishipping/overview.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/multishipping/shipping.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/multishipping/state.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/multishipping/success.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/onepage.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/onepage/agreements.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/onepage/billing.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/onepage/link.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/onepage/login.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/onepage/payment.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/onepage/progress.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/onepage/review.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/onepage/review/configurable.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/onepage/review/info.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/onepage/review/totals.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/onepage/shipping.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/onepage/shipping_method.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/onepage/shipping_method/additional.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/onepage/shipping_method/available.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/success.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/total/default.phtml delete mode 100644 app/design/frontend/default/modern/template/checkout/total/tax.phtml delete mode 100644 app/design/frontend/default/modern/template/chronopay/form.phtml delete mode 100644 app/design/frontend/default/modern/template/chronopay/info.phtml delete mode 100644 app/design/frontend/default/modern/template/chronopay/standard/failure.phtml delete mode 100644 app/design/frontend/default/modern/template/chronopay/standard/form.phtml delete mode 100644 app/design/frontend/default/modern/template/cms/content.phtml delete mode 100644 app/design/frontend/default/modern/template/cms/content_heading.phtml delete mode 100644 app/design/frontend/default/modern/template/cms/default/home.phtml delete mode 100644 app/design/frontend/default/modern/template/cms/default/no-route.phtml delete mode 100644 app/design/frontend/default/modern/template/cms/meta.phtml delete mode 100644 app/design/frontend/default/modern/template/contacts/form.phtml delete mode 100644 app/design/frontend/default/modern/template/core/formkey.phtml delete mode 100644 app/design/frontend/default/modern/template/core/link.phtml delete mode 100644 app/design/frontend/default/modern/template/core/messages.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/account/dashboard.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/account/dashboard/address.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/account/dashboard/hello.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/account/dashboard/info.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/account/dashboard/newsletter.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/account/dashboard/sidebar.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/account/link/back.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/account/navigation.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/address.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/address/book.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/address/edit.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/balance.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/dashboard.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/form/address.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/form/changepassword.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/form/confirmation.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/form/edit.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/form/forgotpassword.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/form/login.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/form/mini.login.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/form/mini.newsletter.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/form/newsletter.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/form/register.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/order/view.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/orders.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/widget/dob.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/widget/gender.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/widget/name.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/widget/taxvat.phtml delete mode 100644 app/design/frontend/default/modern/template/customer/wishlist.phtml delete mode 100644 app/design/frontend/default/modern/template/cybermut/error.phtml delete mode 100644 app/design/frontend/default/modern/template/cybermut/form.phtml delete mode 100644 app/design/frontend/default/modern/template/cybersource/form.phtml delete mode 100644 app/design/frontend/default/modern/template/cybersource/info.phtml delete mode 100644 app/design/frontend/default/modern/template/directory/currency.phtml delete mode 100644 app/design/frontend/default/modern/template/directory/currency/switch.phtml delete mode 100644 app/design/frontend/default/modern/template/downloadable/catalog/product/links.phtml delete mode 100644 app/design/frontend/default/modern/template/downloadable/catalog/product/samples.phtml delete mode 100644 app/design/frontend/default/modern/template/downloadable/catalog/product/type.phtml delete mode 100644 app/design/frontend/default/modern/template/downloadable/checkout/cart/item/default.phtml delete mode 100644 app/design/frontend/default/modern/template/downloadable/checkout/multishipping/item/downloadable.phtml delete mode 100644 app/design/frontend/default/modern/template/downloadable/checkout/onepage/review/item.phtml delete mode 100644 app/design/frontend/default/modern/template/downloadable/checkout/success.phtml delete mode 100644 app/design/frontend/default/modern/template/downloadable/customer/products/list.phtml delete mode 100644 app/design/frontend/default/modern/template/downloadable/email/order/items/creditmemo/downloadable.phtml delete mode 100644 app/design/frontend/default/modern/template/downloadable/email/order/items/invoice/downloadable.phtml delete mode 100644 app/design/frontend/default/modern/template/downloadable/email/order/items/order/downloadable.phtml delete mode 100644 app/design/frontend/default/modern/template/downloadable/sales/order/creditmemo/items/renderer/downloadable.phtml delete mode 100644 app/design/frontend/default/modern/template/downloadable/sales/order/invoice/items/renderer/downloadable.phtml delete mode 100644 app/design/frontend/default/modern/template/downloadable/sales/order/items/renderer/downloadable.phtml delete mode 100644 app/design/frontend/default/modern/template/email/order/creditmemo/items.phtml delete mode 100644 app/design/frontend/default/modern/template/email/order/invoice/items.phtml delete mode 100644 app/design/frontend/default/modern/template/email/order/items.phtml delete mode 100644 app/design/frontend/default/modern/template/email/order/items/creditmemo/default.phtml delete mode 100644 app/design/frontend/default/modern/template/email/order/items/invoice/default.phtml delete mode 100644 app/design/frontend/default/modern/template/email/order/items/order/default.phtml delete mode 100644 app/design/frontend/default/modern/template/email/order/items/shipment/default.phtml delete mode 100644 app/design/frontend/default/modern/template/email/order/shipment/items.phtml delete mode 100644 app/design/frontend/default/modern/template/email/order/shipment/track.phtml delete mode 100644 app/design/frontend/default/modern/template/email/productalert/price.phtml delete mode 100644 app/design/frontend/default/modern/template/email/productalert/stock.phtml delete mode 100644 app/design/frontend/default/modern/template/eway/form.phtml delete mode 100644 app/design/frontend/default/modern/template/eway/info.phtml delete mode 100644 app/design/frontend/default/modern/template/eway/secure/failure.phtml delete mode 100644 app/design/frontend/default/modern/template/eway/secure/form.phtml delete mode 100644 app/design/frontend/default/modern/template/eway/shared/failure.phtml delete mode 100644 app/design/frontend/default/modern/template/eway/shared/form.phtml delete mode 100644 app/design/frontend/default/modern/template/flo2cash/form.phtml delete mode 100644 app/design/frontend/default/modern/template/flo2cash/info.phtml delete mode 100644 app/design/frontend/default/modern/template/giftmessage/form.phtml delete mode 100644 app/design/frontend/default/modern/template/giftmessage/helper.phtml delete mode 100644 app/design/frontend/default/modern/template/giftmessage/inline.phtml delete mode 100644 app/design/frontend/default/modern/template/googlecheckout/form.phtml delete mode 100644 app/design/frontend/default/modern/template/googlecheckout/link.phtml delete mode 100644 app/design/frontend/default/modern/template/ideal/advanced/failure.phtml delete mode 100644 app/design/frontend/default/modern/template/ideal/advanced/form.phtml delete mode 100644 app/design/frontend/default/modern/template/ideal/advanced/info.phtml delete mode 100644 app/design/frontend/default/modern/template/ideal/basic/failure.phtml delete mode 100644 app/design/frontend/default/modern/template/ideal/basic/form.phtml delete mode 100644 app/design/frontend/default/modern/template/ogone/form.phtml delete mode 100644 app/design/frontend/default/modern/template/ogone/info.phtml delete mode 100644 app/design/frontend/default/modern/template/ogone/paypage.phtml delete mode 100644 app/design/frontend/default/modern/template/ogone/placeform.phtml delete mode 100644 app/design/frontend/default/modern/template/oscommerce/order/list.phtml delete mode 100644 app/design/frontend/default/modern/template/oscommerce/order/view.phtml delete mode 100644 app/design/frontend/default/modern/template/page/1column.phtml delete mode 100644 app/design/frontend/default/modern/template/page/2columns-left.phtml delete mode 100644 app/design/frontend/default/modern/template/page/2columns-right.phtml delete mode 100644 app/design/frontend/default/modern/template/page/empty.phtml delete mode 100644 app/design/frontend/default/modern/template/page/html/breadcrumbs.phtml delete mode 100644 app/design/frontend/default/modern/template/page/html/head.phtml delete mode 100644 app/design/frontend/default/modern/template/page/html/notices.phtml delete mode 100644 app/design/frontend/default/modern/template/page/html/pager.phtml delete mode 100644 app/design/frontend/default/modern/template/page/html/top.links.phtml delete mode 100644 app/design/frontend/default/modern/template/page/js/calendar.phtml delete mode 100644 app/design/frontend/default/modern/template/page/one-column.phtml delete mode 100644 app/design/frontend/default/modern/template/page/print.phtml delete mode 100644 app/design/frontend/default/modern/template/page/redirect.phtml delete mode 100644 app/design/frontend/default/modern/template/page/switch/flags.phtml delete mode 100644 app/design/frontend/default/modern/template/page/switch/languages.phtml delete mode 100644 app/design/frontend/default/modern/template/page/switch/stores.phtml delete mode 100644 app/design/frontend/default/modern/template/page/template/container.phtml delete mode 100644 app/design/frontend/default/modern/template/page/template/footer_links.phtml delete mode 100644 app/design/frontend/default/modern/template/page/template/links.phtml delete mode 100644 app/design/frontend/default/modern/template/paybox/direct/form.phtml delete mode 100644 app/design/frontend/default/modern/template/paybox/direct/info.phtml delete mode 100644 app/design/frontend/default/modern/template/paybox/system/error.phtml delete mode 100644 app/design/frontend/default/modern/template/paybox/system/form.phtml delete mode 100644 app/design/frontend/default/modern/template/payment/form/cc.phtml delete mode 100644 app/design/frontend/default/modern/template/payment/form/ccsave.phtml delete mode 100644 app/design/frontend/default/modern/template/payment/form/checkmo.phtml delete mode 100644 app/design/frontend/default/modern/template/payment/form/purchaseorder.phtml delete mode 100644 app/design/frontend/default/modern/template/payment/info/ccsave.phtml delete mode 100644 app/design/frontend/default/modern/template/payment/info/checkmo.phtml delete mode 100644 app/design/frontend/default/modern/template/payment/info/purchaseorder.phtml delete mode 100644 app/design/frontend/default/modern/template/paypal/express/review.phtml delete mode 100644 app/design/frontend/default/modern/template/paypal/express/review/details.phtml delete mode 100644 app/design/frontend/default/modern/template/paypaluk/express/review.phtml delete mode 100644 app/design/frontend/default/modern/template/paypaluk/express/review/details.phtml delete mode 100644 app/design/frontend/default/modern/template/poll/active.phtml delete mode 100644 app/design/frontend/default/modern/template/poll/result.phtml delete mode 100644 app/design/frontend/default/modern/template/productalert/price.phtml delete mode 100644 app/design/frontend/default/modern/template/productalert/stock.phtml delete mode 100644 app/design/frontend/default/modern/template/protx/standard/failure.phtml delete mode 100644 app/design/frontend/default/modern/template/protx/standard/form.phtml delete mode 100644 app/design/frontend/default/modern/template/rating/detailed.phtml delete mode 100644 app/design/frontend/default/modern/template/rating/empty.phtml delete mode 100644 app/design/frontend/default/modern/template/reports/home_product_compared.phtml delete mode 100644 app/design/frontend/default/modern/template/reports/home_product_viewed.phtml delete mode 100644 app/design/frontend/default/modern/template/reports/product/widget/compared.phtml delete mode 100644 app/design/frontend/default/modern/template/reports/product/widget/viewed.phtml delete mode 100644 app/design/frontend/default/modern/template/reports/product_compared.phtml delete mode 100644 app/design/frontend/default/modern/template/reports/product_viewed.phtml delete mode 100644 app/design/frontend/default/modern/template/review/customer/list.phtml delete mode 100644 app/design/frontend/default/modern/template/review/customer/recent.phtml delete mode 100644 app/design/frontend/default/modern/template/review/customer/view.phtml delete mode 100644 app/design/frontend/default/modern/template/review/form.phtml delete mode 100644 app/design/frontend/default/modern/template/review/helper/summary.phtml delete mode 100644 app/design/frontend/default/modern/template/review/helper/summary_short.phtml delete mode 100644 app/design/frontend/default/modern/template/review/product/view/count.phtml delete mode 100644 app/design/frontend/default/modern/template/review/product/view/list.phtml delete mode 100644 app/design/frontend/default/modern/template/review/view.phtml delete mode 100644 app/design/frontend/default/modern/template/rss/list.phtml delete mode 100644 app/design/frontend/default/modern/template/rss/nofeed.phtml delete mode 100644 app/design/frontend/default/modern/template/rss/order/details.phtml delete mode 100644 app/design/frontend/default/modern/template/sales/order/creditmemo.phtml delete mode 100644 app/design/frontend/default/modern/template/sales/order/creditmemo/items.phtml delete mode 100644 app/design/frontend/default/modern/template/sales/order/creditmemo/items/renderer/default.phtml delete mode 100644 app/design/frontend/default/modern/template/sales/order/details.phtml delete mode 100644 app/design/frontend/default/modern/template/sales/order/history.phtml delete mode 100644 app/design/frontend/default/modern/template/sales/order/info.phtml delete mode 100644 app/design/frontend/default/modern/template/sales/order/invoice.phtml delete mode 100644 app/design/frontend/default/modern/template/sales/order/invoice/items.phtml delete mode 100644 app/design/frontend/default/modern/template/sales/order/invoice/items/renderer/default.phtml delete mode 100644 app/design/frontend/default/modern/template/sales/order/items.phtml delete mode 100644 app/design/frontend/default/modern/template/sales/order/items/renderer/default.phtml delete mode 100644 app/design/frontend/default/modern/template/sales/order/print.phtml delete mode 100644 app/design/frontend/default/modern/template/sales/order/print/creditmemo.phtml delete mode 100644 app/design/frontend/default/modern/template/sales/order/print/invoice.phtml delete mode 100644 app/design/frontend/default/modern/template/sales/order/print/shipment.phtml delete mode 100644 app/design/frontend/default/modern/template/sales/order/recent.phtml delete mode 100644 app/design/frontend/default/modern/template/sales/order/shipment.phtml delete mode 100644 app/design/frontend/default/modern/template/sales/order/shipment/items.phtml delete mode 100644 app/design/frontend/default/modern/template/sales/order/shipment/items/renderer/default.phtml delete mode 100644 app/design/frontend/default/modern/template/sales/order/totals.phtml delete mode 100644 app/design/frontend/default/modern/template/sales/order/trackinginfo.phtml delete mode 100644 app/design/frontend/default/modern/template/sales/order/view.phtml delete mode 100644 app/design/frontend/default/modern/template/sales/reorder/sidebar.phtml delete mode 100644 app/design/frontend/default/modern/template/sendfriend/send.phtml delete mode 100644 app/design/frontend/default/modern/template/shipping/tracking/ajax.phtml delete mode 100644 app/design/frontend/default/modern/template/shipping/tracking/popup.phtml delete mode 100644 app/design/frontend/default/modern/template/tag/cloud.phtml delete mode 100644 app/design/frontend/default/modern/template/tag/customer/edit.phtml delete mode 100644 app/design/frontend/default/modern/template/tag/customer/recent.phtml delete mode 100644 app/design/frontend/default/modern/template/tag/customer/tags.phtml delete mode 100644 app/design/frontend/default/modern/template/tag/customer/view.phtml delete mode 100644 app/design/frontend/default/modern/template/tag/list.phtml delete mode 100644 app/design/frontend/default/modern/template/tag/mytags.phtml delete mode 100644 app/design/frontend/default/modern/template/tag/popular.phtml delete mode 100644 app/design/frontend/default/modern/template/tag/product/result.phtml delete mode 100644 app/design/frontend/default/modern/template/tag/result.phtml delete mode 100644 app/design/frontend/default/modern/template/tag/search.phtml delete mode 100644 app/design/frontend/default/modern/template/tax/checkout/discount.phtml delete mode 100644 app/design/frontend/default/modern/template/tax/checkout/grandtotal.phtml delete mode 100644 app/design/frontend/default/modern/template/tax/checkout/shipping.phtml delete mode 100644 app/design/frontend/default/modern/template/tax/checkout/subtotal.phtml delete mode 100644 app/design/frontend/default/modern/template/tax/checkout/tax.phtml delete mode 100644 app/design/frontend/default/modern/template/tax/order/tax.phtml delete mode 100644 app/design/frontend/default/modern/template/wishlist/email/items.phtml delete mode 100644 app/design/frontend/default/modern/template/wishlist/email/rss.phtml delete mode 100644 app/design/frontend/default/modern/template/wishlist/shared.phtml delete mode 100644 app/design/frontend/default/modern/template/wishlist/sharing.phtml delete mode 100644 app/design/frontend/default/modern/template/wishlist/sidebar.phtml delete mode 100644 app/design/frontend/default/modern/template/wishlist/view.phtml delete mode 100644 app/etc/modules/Mage_AmazonPayments.xml rename app/etc/modules/{Mage_Eway.xml => Mage_Centinel.xml} (91%) delete mode 100644 app/etc/modules/Mage_Chronopay.xml delete mode 100644 app/etc/modules/Mage_Cybermut.xml delete mode 100644 app/etc/modules/Mage_Cybersource.xml delete mode 100644 app/etc/modules/Mage_Flo2Cash.xml delete mode 100644 app/etc/modules/Mage_Ideal.xml delete mode 100644 app/etc/modules/Mage_Ogone.xml delete mode 100644 app/etc/modules/Mage_Oscommerce.xml delete mode 100644 app/etc/modules/Mage_Paybox.xml delete mode 100644 app/etc/modules/Mage_Protx.xml delete mode 100644 app/etc/modules/Mage_Strikeiron.xml create mode 100644 app/locale/en_US/Mage_Centinel.csv delete mode 100644 app/locale/en_US/Mage_Chronopay.csv delete mode 100644 app/locale/en_US/Mage_Cybermut.csv delete mode 100644 app/locale/en_US/Mage_Cybersource.csv delete mode 100644 app/locale/en_US/Mage_Eway.csv delete mode 100644 app/locale/en_US/Mage_Flo2Cash.csv delete mode 100644 app/locale/en_US/Mage_Ideal.csv delete mode 100644 app/locale/en_US/Mage_Ogone.csv delete mode 100644 app/locale/en_US/Mage_Oscommerce.csv delete mode 100644 app/locale/en_US/Mage_Paybox.csv delete mode 100644 app/locale/en_US/Mage_Protx.csv delete mode 100644 app/locale/en_US/Mage_Strikeiron.csv delete mode 100644 app/locale/en_US/template/email/amazonpayments_asp_notification_error.html delete mode 100644 app/locale/en_US/template/email/strikeiron_email_warning.html delete mode 100644 errors/default/.htaccess rename errors/{skin => }/default/css/styles.css (90%) rename errors/{skin => }/default/images/bkg_body.gif (100%) rename errors/{skin => }/default/images/bkg_header.jpg (100%) rename errors/{skin => }/default/images/bkg_main1.gif (100%) rename errors/{skin => }/default/images/bkg_main2.gif (100%) rename errors/{skin => }/default/images/favicon.ico (100%) rename errors/{skin => }/default/images/i_msg-error.gif (100%) rename errors/{skin => }/default/images/i_msg-note.gif (100%) rename errors/{skin => }/default/images/i_msg-success.gif (100%) rename errors/{skin => }/default/images/logo.gif (100%) delete mode 100644 errors/functions.php rename errors/{config.xml => local.xml.sample} (84%) create mode 100644 errors/processor.php create mode 100644 js/lib/FABridge.js create mode 100644 js/mage/adminhtml/sales/centinel.js delete mode 100644 pkginfo/Mage_Cybermut.txt delete mode 100644 pkginfo/Mage_Paybox.txt rename errors/design.xml => skin/adminhtml/default/default/print.css (63%) create mode 100644 skin/frontend/base/default/images/centinel/sc_learn_62x34.gif create mode 100644 skin/frontend/base/default/images/centinel/v_activate_steps.gif create mode 100644 skin/frontend/base/default/images/centinel/vbv_ltbg_71x57.gif rename skin/frontend/{default/blue => base/default}/images/cvv.gif (100%) delete mode 100644 skin/frontend/base/default/images/moneybookers/banner_120_de.png delete mode 100644 skin/frontend/base/default/images/moneybookers/banner_120_fr.png delete mode 100644 skin/frontend/base/default/images/moneybookers/banner_120_int.png delete mode 100644 skin/frontend/base/default/images/moneybookers/banner_120_pl.png delete mode 100644 skin/frontend/base/default/images/moneybookers/banner_120_sp.png delete mode 100644 skin/frontend/base/default/images/moneybookers/moneybookers_acc.png delete mode 100644 skin/frontend/base/default/images/moneybookers/moneybookers_csi.gif delete mode 100644 skin/frontend/base/default/images/moneybookers/moneybookers_did.gif delete mode 100644 skin/frontend/base/default/images/moneybookers/moneybookers_dnk.gif delete mode 100644 skin/frontend/base/default/images/moneybookers/moneybookers_ebt.gif delete mode 100644 skin/frontend/base/default/images/moneybookers/moneybookers_ent.gif delete mode 100644 skin/frontend/base/default/images/moneybookers/moneybookers_gcb.gif delete mode 100644 skin/frontend/base/default/images/moneybookers/moneybookers_gir.gif delete mode 100644 skin/frontend/base/default/images/moneybookers/moneybookers_idl.gif delete mode 100644 skin/frontend/base/default/images/moneybookers/moneybookers_lsr.gif delete mode 100644 skin/frontend/base/default/images/moneybookers/moneybookers_npy.gif delete mode 100644 skin/frontend/base/default/images/moneybookers/moneybookers_pli.gif delete mode 100644 skin/frontend/base/default/images/moneybookers/moneybookers_psp.gif delete mode 100644 skin/frontend/base/default/images/moneybookers/moneybookers_pwy.gif delete mode 100644 skin/frontend/base/default/images/moneybookers/moneybookers_sft.gif delete mode 100644 skin/frontend/base/default/images/moneybookers/moneybookers_so2.gif delete mode 100644 skin/frontend/base/default/images/moneybookers/moneybookers_wlt.gif delete mode 100644 skin/frontend/default/blank/images/btn_google_checkout.gif delete mode 100644 skin/frontend/default/blank/images/btn_paypal_checkout.gif delete mode 100644 skin/frontend/default/blank/images/cookies/firefox.png delete mode 100644 skin/frontend/default/blank/images/cookies/ie6-1.gif delete mode 100644 skin/frontend/default/blank/images/cookies/ie6-2.gif delete mode 100644 skin/frontend/default/blank/images/cookies/ie7-1.gif delete mode 100644 skin/frontend/default/blank/images/cookies/ie7-2.gif delete mode 100644 skin/frontend/default/blank/images/cookies/ie7-3.gif delete mode 100644 skin/frontend/default/blank/images/cookies/ie7-4.gif delete mode 100644 skin/frontend/default/blank/images/cookies/ie7-5.gif delete mode 100644 skin/frontend/default/blank/images/cookies/ie7-6.gif delete mode 100644 skin/frontend/default/blank/images/cookies/opera.png delete mode 100644 skin/frontend/default/blank/images/media/404_callout1.jpg delete mode 100644 skin/frontend/default/blank/images/media/404_callout2.jpg delete mode 100644 skin/frontend/default/blank/images/media/about_us_img.jpg delete mode 100644 skin/frontend/default/blank/images/media/col_left_callout.jpg delete mode 100644 skin/frontend/default/blank/images/media/col_right_callout.jpg delete mode 100644 skin/frontend/default/blank/js/bundle.js delete mode 100644 skin/frontend/default/blank/js/giftmessage.js delete mode 100644 skin/frontend/default/blank/js/ie6.js delete mode 100644 skin/frontend/default/blank/js/opcheckout.js delete mode 100644 skin/frontend/default/blue/images/btn_google_checkout.gif delete mode 100644 skin/frontend/default/blue/images/btn_paypal_checkout.gif delete mode 100644 skin/frontend/default/blue/images/btn_place_order.gif delete mode 100644 skin/frontend/default/blue/images/btn_proceed_to_checkout.gif delete mode 100644 skin/frontend/default/blue/images/btn_proceed_to_checkout_dis.gif delete mode 100644 skin/frontend/default/blue/images/currency_converter_head_bg.gif delete mode 100644 skin/frontend/default/blue/images/cvv.jpg delete mode 100644 skin/frontend/default/blue/images/free_shipping_callout.jpg delete mode 100644 skin/frontend/default/blue/images/home_left_callout.jpg delete mode 100644 skin/frontend/default/blue/images/home_main_callout.jpg delete mode 100644 skin/frontend/default/blue/images/i_type_grid.gif delete mode 100644 skin/frontend/default/blue/images/i_type_list.gif delete mode 100644 skin/frontend/default/blue/images/media/404_callout1.jpg delete mode 100644 skin/frontend/default/blue/images/media/404_callout2.jpg delete mode 100644 skin/frontend/default/blue/images/media/about_us_img.jpg delete mode 100644 skin/frontend/default/blue/images/media/best_selling_img01.jpg delete mode 100644 skin/frontend/default/blue/images/media/best_selling_img02.jpg delete mode 100644 skin/frontend/default/blue/images/media/best_selling_img03.jpg delete mode 100644 skin/frontend/default/blue/images/media/best_selling_img04.jpg delete mode 100644 skin/frontend/default/blue/images/media/best_selling_img05.jpg delete mode 100644 skin/frontend/default/blue/images/media/best_selling_img06.jpg delete mode 100644 skin/frontend/default/blue/images/media/cell_phone_landing_banner1.jpg delete mode 100644 skin/frontend/default/blue/images/media/col_left_callout.jpg delete mode 100644 skin/frontend/default/blue/images/media/col_right_callout.jpg delete mode 100644 skin/frontend/default/blue/images/media/electronics_cellphones.jpg delete mode 100644 skin/frontend/default/blue/images/media/electronics_digitalcameras.jpg delete mode 100644 skin/frontend/default/blue/images/media/electronics_laptops.jpg delete mode 100644 skin/frontend/default/blue/images/media/furniture_callout_spot.jpg delete mode 100644 skin/frontend/default/blue/images/media/furnitures_bed_room.jpg delete mode 100644 skin/frontend/default/blue/images/media/furnitures_living_room.jpg delete mode 100644 skin/frontend/default/blue/images/media/head_electronics_cellphones.gif delete mode 100644 skin/frontend/default/blue/images/media/head_electronics_digicamera.gif delete mode 100644 skin/frontend/default/blue/images/media/head_electronics_laptops.gif delete mode 100644 skin/frontend/default/blue/images/media/laptop_callout_mid1.jpg delete mode 100644 skin/frontend/default/blue/images/media/laptop_callout_mid2.jpg delete mode 100644 skin/frontend/default/blue/images/media/laptop_callout_mid3.jpg delete mode 100644 skin/frontend/default/blue/images/media/laptop_callout_spot.jpg delete mode 100644 skin/frontend/default/blue/images/media/shirts_landing_banner1.jpg delete mode 100644 skin/frontend/default/blue/images/np_cart_thumb.gif delete mode 100644 skin/frontend/default/blue/images/np_more_img.gif delete mode 100644 skin/frontend/default/blue/images/np_product_main.gif delete mode 100644 skin/frontend/default/blue/images/np_thumb.gif delete mode 100644 skin/frontend/default/blue/images/np_thumb2.gif delete mode 100644 skin/frontend/default/blue/images/ph_callout_left_rebel.jpg delete mode 100644 skin/frontend/default/blue/images/ph_callout_left_top.gif delete mode 100644 skin/frontend/default/default/images/currency_converter_head_bg.gif create mode 100644 skin/frontend/default/iphone/favicon.ico delete mode 100644 skin/frontend/default/iphone/images/cookies/firefox.png delete mode 100644 skin/frontend/default/iphone/images/cookies/ie6-1.gif delete mode 100644 skin/frontend/default/iphone/images/cookies/ie6-2.gif delete mode 100644 skin/frontend/default/iphone/images/cookies/ie7-1.gif delete mode 100644 skin/frontend/default/iphone/images/cookies/ie7-2.gif delete mode 100644 skin/frontend/default/iphone/images/cookies/ie7-3.gif delete mode 100644 skin/frontend/default/iphone/images/cookies/ie7-4.gif delete mode 100644 skin/frontend/default/iphone/images/cookies/ie7-5.gif delete mode 100644 skin/frontend/default/iphone/images/cookies/ie7-6.gif delete mode 100644 skin/frontend/default/iphone/images/cookies/opera.png delete mode 100644 skin/frontend/default/iphone/js/bundle.js delete mode 100644 skin/frontend/default/iphone/js/giftmessage.js delete mode 100644 skin/frontend/default/modern/css/boxes.css delete mode 100644 skin/frontend/default/modern/css/clears.css delete mode 100644 skin/frontend/default/modern/css/ie7minus.css delete mode 100644 skin/frontend/default/modern/css/iestyles.css delete mode 100644 skin/frontend/default/modern/css/menu.css delete mode 100644 skin/frontend/default/modern/css/reset.css create mode 100644 skin/frontend/default/modern/css/styles-ie.css create mode 100644 skin/frontend/default/modern/css/styles.css create mode 100644 skin/frontend/default/modern/css/widgets.css delete mode 100644 skin/frontend/default/modern/images/base_mini_content_bg.gif rename skin/frontend/default/modern/images/{add_to_bg.gif => bkg_add-to.gif} (100%) rename skin/frontend/default/modern/images/{layered_nav_head_bg.gif => bkg_block-layered-title.gif} (100%) rename skin/frontend/default/modern/images/{body_bg.gif => bkg_body.gif} (100%) create mode 100644 skin/frontend/default/modern/images/bkg_btn-green.gif create mode 100644 skin/frontend/default/modern/images/bkg_btn-small.gif create mode 100644 skin/frontend/default/modern/images/bkg_btn-small.png create mode 100644 skin/frontend/default/modern/images/bkg_btn.gif create mode 100644 skin/frontend/default/modern/images/bkg_btn.png rename skin/frontend/default/modern/images/{cart_totals_bg.gif => bkg_cart-totals.gif} (100%) create mode 100644 skin/frontend/default/modern/images/bkg_collapse-gm.gif rename skin/frontend/default/modern/images/{bg_collapse.gif => bkg_collapse.gif} (100%) create mode 100644 skin/frontend/default/modern/images/bkg_grid.gif rename skin/frontend/default/modern/images/{nav_parent_arrow.gif => bkg_nav_parent.gif} (100%) rename skin/frontend/default/modern/images/{nav_top_level_arrow.gif => bkg_nav_top.gif} (100%) rename skin/frontend/default/modern/images/{links_separator.gif => bkg_pipe1.gif} (100%) create mode 100644 skin/frontend/default/modern/images/bkg_pipe2.gif create mode 100644 skin/frontend/default/modern/images/bkg_pipe3.gif create mode 100644 skin/frontend/default/modern/images/bkg_rating.gif rename skin/frontend/default/modern/images/{cart_subtotal_count.gif => bkg_subtotal.gif} (100%) rename skin/frontend/default/modern/images/{tabs_bg.gif => bkg_tabs.gif} (100%) rename skin/frontend/default/modern/images/{pager_bg.gif => bkg_toolbar.gif} (100%) rename skin/frontend/default/modern/images/{side_logo_promo.gif => bkg_top-promo.gif} (100%) delete mode 100644 skin/frontend/default/modern/images/btn_add_all_to_cart.gif delete mode 100644 skin/frontend/default/modern/images/btn_add_recipient.gif delete mode 100644 skin/frontend/default/modern/images/btn_add_tags.gif delete mode 100644 skin/frontend/default/modern/images/btn_add_to_cart.gif delete mode 100644 skin/frontend/default/modern/images/btn_add_to_cart_sm.gif delete mode 100644 skin/frontend/default/modern/images/btn_cart_apply.gif delete mode 100644 skin/frontend/default/modern/images/btn_cart_cancel.gif delete mode 100644 skin/frontend/default/modern/images/btn_cart_get_a_quote.gif create mode 100644 skin/frontend/default/modern/images/btn_checkout.gif delete mode 100644 skin/frontend/default/modern/images/btn_close_window.gif delete mode 100644 skin/frontend/default/modern/images/btn_compare.gif delete mode 100644 skin/frontend/default/modern/images/btn_continue.gif delete mode 100644 skin/frontend/default/modern/images/btn_continue_shopping.gif delete mode 100644 skin/frontend/default/modern/images/btn_create_account.gif delete mode 100644 skin/frontend/default/modern/images/btn_enter_new_address.gif delete mode 100644 skin/frontend/default/modern/images/btn_go.gif delete mode 100644 skin/frontend/default/modern/images/btn_login.gif delete mode 100644 skin/frontend/default/modern/images/btn_newsletter_signup.gif delete mode 100644 skin/frontend/default/modern/images/btn_place_order.gif delete mode 100644 skin/frontend/default/modern/images/btn_print-order.gif delete mode 100644 skin/frontend/default/modern/images/btn_proceed_to_checkout.gif delete mode 100644 skin/frontend/default/modern/images/btn_proceed_to_checkout_dis.gif rename skin/frontend/default/modern/images/{list_remove_btn.gif => btn_remove.gif} (100%) delete mode 100644 skin/frontend/default/modern/images/btn_reorder.gif delete mode 100644 skin/frontend/default/modern/images/btn_save.gif delete mode 100644 skin/frontend/default/modern/images/btn_search.gif delete mode 100644 skin/frontend/default/modern/images/btn_send_email.gif delete mode 100644 skin/frontend/default/modern/images/btn_share_wishlist.gif delete mode 100644 skin/frontend/default/modern/images/btn_submit.gif delete mode 100644 skin/frontend/default/modern/images/btn_submit_mini.gif create mode 100644 skin/frontend/default/modern/images/btn_trash.gif delete mode 100644 skin/frontend/default/modern/images/btn_update_qty.gif delete mode 100644 skin/frontend/default/modern/images/btn_update_total.gif delete mode 100644 skin/frontend/default/modern/images/btn_update_wishlist.gif delete mode 100644 skin/frontend/default/modern/images/btn_vote.gif create mode 100644 skin/frontend/default/modern/images/btn_window_close.gif create mode 100644 skin/frontend/default/modern/images/calendar.gif delete mode 100644 skin/frontend/default/modern/images/cookies/firefox.png delete mode 100644 skin/frontend/default/modern/images/cookies/ie6-1.gif delete mode 100644 skin/frontend/default/modern/images/cookies/ie6-2.gif delete mode 100644 skin/frontend/default/modern/images/cookies/ie7-1.gif delete mode 100644 skin/frontend/default/modern/images/cookies/ie7-2.gif delete mode 100644 skin/frontend/default/modern/images/cookies/ie7-3.gif delete mode 100644 skin/frontend/default/modern/images/cookies/ie7-4.gif delete mode 100644 skin/frontend/default/modern/images/cookies/ie7-5.gif delete mode 100644 skin/frontend/default/modern/images/cookies/ie7-6.gif delete mode 100644 skin/frontend/default/modern/images/cookies/opera.png create mode 100644 skin/frontend/default/modern/images/cvv.gif create mode 100644 skin/frontend/default/modern/images/fam_book_open.png delete mode 100644 skin/frontend/default/modern/images/gift-message-collapse.gif delete mode 100644 skin/frontend/default/modern/images/gift-message-expand.gif create mode 100644 skin/frontend/default/modern/images/grid-cal.gif delete mode 100644 skin/frontend/default/modern/images/head_search.gif create mode 100644 skin/frontend/default/modern/images/i_asc_arrow.gif create mode 100644 skin/frontend/default/modern/images/i_desc_arrow.gif create mode 100644 skin/frontend/default/modern/images/i_msg-error.gif create mode 100644 skin/frontend/default/modern/images/i_msg-note.gif create mode 100644 skin/frontend/default/modern/images/i_msg-success.gif rename skin/frontend/default/modern/images/{pager_arrow_right.gif => i_pager-next.gif} (100%) rename skin/frontend/default/modern/images/{pager_arrow_left.gif => i_pager-prev.gif} (100%) rename skin/frontend/default/modern/images/{icon_printer.gif => i_print.gif} (100%) create mode 100644 skin/frontend/default/modern/images/i_rss-big.png create mode 100644 skin/frontend/default/modern/images/i_rss.gif delete mode 100644 skin/frontend/default/modern/images/icon_feed.gif delete mode 100644 skin/frontend/default/modern/images/media/404_callout1.jpg delete mode 100644 skin/frontend/default/modern/images/media/404_callout2.jpg delete mode 100644 skin/frontend/default/modern/images/media/col_left_callout.jpg delete mode 100644 skin/frontend/default/modern/images/media/col_right_callout.jpg create mode 100644 skin/frontend/default/modern/images/opc-ajax-loader.gif delete mode 100644 skin/frontend/default/modern/images/product_rating_blank_star.gif delete mode 100644 skin/frontend/default/modern/images/product_rating_full_star.gif create mode 100644 skin/frontend/default/modern/images/spacer.gif create mode 100644 skin/frontend/default/modern/images/widgets/i_widget-link.gif delete mode 100644 skin/frontend/default/modern/js/bundle.js delete mode 100644 skin/frontend/default/modern/js/giftmessage.js delete mode 100644 skin/frontend/default/modern/js/opcheckout.js diff --git a/app/Mage.php b/app/Mage.php index 18eb858763..6cb3d5ab06 100644 --- a/app/Mage.php +++ b/app/Mage.php @@ -154,8 +154,8 @@ public static function getVersionInfo() 'minor' => '4', 'revision' => '0', 'patch' => '0', - 'stability' => 'rc', - 'number' => '1', + 'stability' => '', + 'number' => '', ); } @@ -599,14 +599,7 @@ public static function run($code = '', $type = 'store', $options=array()) header('Location: ' . self::getBaseUrl()); die(); } catch (Mage_Core_Model_Store_Exception $e) { - $baseUrl = rtrim(self::getScriptSystemUrl('errors'), '/') . '/errors/404.php'; - if (!headers_sent()) { - header('Location: ' . $baseUrl); - } else { - print ''; - } + require_once(self::getBaseDir() . DS . 'errors' . DS . '404.php'); die(); } catch (Exception $e) { if (self::isInstalled() || self::$_isDownloader) { @@ -672,19 +665,24 @@ public static function log($message, $level = null, $file = '') return; } - if (!self::$_isDeveloperMode) { - if (!self::getStoreConfig('dev/log/active')) { - return; + try { + $logActive = self::getStoreConfig('dev/log/active'); + if (empty($file)) { + $file = self::getStoreConfig('dev/log/file'); } } + catch (Exception $e) { + $logActive = true; + } + + if (!self::$_isDeveloperMode && !$logActive) { + return; + } static $loggers = array(); $level = is_null($level) ? Zend_Log::DEBUG : $level; - if (empty($file)) { - $file = self::getStoreConfig('dev/log/file'); - $file = empty($file) ? 'system.log' : $file; - } + $file = empty($file) ? 'system.log' : $file; try { if (!isset($loggers[$file])) { @@ -770,37 +768,30 @@ public static function printException(Exception $e, $extra = '') print $e->getTraceAsString(); print ''; } else { - self::getConfig()->createDirIfNotExists(self::getBaseDir('var') . DS . 'report'); - $reportId = abs(intval(microtime(true) * rand(100, 1000))); - $reportFile = self::getBaseDir('var') . DS . 'report' . DS . $reportId; + $reportData = array( !empty($extra) ? $extra . "\n\n" : '' . $e->getMessage(), $e->getTraceAsString() ); - if (isset($_SERVER) && isset($_SERVER['REQUEST_URI'])) { - $reportData[] = $_SERVER['REQUEST_URI']; - } - $reportData = serialize($reportData); - file_put_contents($reportFile, $reportData); - chmod($reportFile, 0777); + // retrieve server data + if (isset($_SERVER)) { + if (isset($_SERVER['REQUEST_URI'])) { + $reportData['url'] = $_SERVER['REQUEST_URI']; + } + if (isset($_SERVER['SCRIPT_NAME'])) { + $reportData['script_name'] = $_SERVER['SCRIPT_NAME']; + } + } - $storeCode = 'default'; + // attempt to specify store as a skin try { $storeCode = self::app()->getStore()->getCode(); - } catch (Exception $e) { + $reportData['skin'] = $storeCode; } + catch (Exception $e) {} - $baseUrl = self::getScriptSystemUrl('errors', true); - $reportUrl = rtrim($baseUrl, '/') . '/errors/report.php?id=' . $reportId . '&s=' . $storeCode; - - if (!headers_sent()) { - header('Location: ' . $reportUrl); - } else { - print ''; - } + require_once(self::getBaseDir() . DS . 'errors' . DS . 'report.php'); } die(); diff --git a/app/code/core/Mage/Admin/Model/Observer.php b/app/code/core/Mage/Admin/Model/Observer.php index fb8f2c6f91..6f4ac11782 100644 --- a/app/code/core/Mage/Admin/Model/Observer.php +++ b/app/code/core/Mage/Admin/Model/Observer.php @@ -81,4 +81,15 @@ public function actionPreDispatchAdmin($event) $session->refreshAcl(); } + + /** + * Unset session first visit flag after displaying page + * + * @param Varien_Event_Observer $event + */ + public function actionPostDispatchAdmin($event) + { + $session = Mage::getSingleton('admin/session'); + $session->unsetData('is_first_visit'); + } } diff --git a/app/code/core/Mage/Admin/Model/User.php b/app/code/core/Mage/Admin/Model/User.php index 29199ccb3c..9e093ffdc5 100644 --- a/app/code/core/Mage/Admin/Model/User.php +++ b/app/code/core/Mage/Admin/Model/User.php @@ -78,14 +78,10 @@ protected function _beforeSave() $data['username'] = $this->getUsername(); } - if ($this->getPassword()) { - $data['password'] = $this->_getEncodedPassword($this->getPassword()); - } - - if ($this->getNewPassword()) { + if ($this->getNewPassword()) { // change password $data['password'] = $this->_getEncodedPassword($this->getNewPassword()); - } elseif ($this->getPassword()) { - $data['new_password'] = $this->getPassword(); + } elseif ($this->getPassword() && $this->getPassword() != $this->getOrigData('password')) { // new user password + $data['password'] = $this->_getEncodedPassword($this->getPassword()); } if ( !is_null($this->getIsActive()) ) { diff --git a/app/code/core/Mage/AdminNotification/Model/Survey.php b/app/code/core/Mage/AdminNotification/Model/Survey.php new file mode 100644 index 0000000000..d0ce1f4204 --- /dev/null +++ b/app/code/core/Mage/AdminNotification/Model/Survey.php @@ -0,0 +1,112 @@ + + */ +class Mage_AdminNotification_Model_Survey +{ + protected static $_flagCode = 'admin_notification_survey'; + protected static $_flagModel = null; + + const SURVEY_URL = 'www.magentocommerce.com/instsurvey.html'; + + /** + * Check if survey url valid (exists) or not + * + * @return boolen + */ + public static function isSurveyUrlValid() + { + $curl = new Varien_Http_Adapter_Curl(); + $curl->setConfig(array('timeout' => 5)) + ->write(Zend_Http_Client::GET, self::getSurveyUrl(), '1.0'); + $response = $curl->read(); + if (Zend_Http_Response::extractCode($response) == 200) { + return true; + } + return false; + } + + /** + * Return survey url + * + * @return string + */ + public static function getSurveyUrl() + { + $host = Mage::app()->getRequest()->isSecure()?'https://':'http://'; + return $host . self::SURVEY_URL; + } + + /** + * Return core flag model + * + * @return Mage_Core_Model_Flag + */ + protected static function _getFlagModel() + { + if (self::$_flagModel === null) { + self::$_flagModel = Mage::getModel('core/flag', array('flag_code' => self::$_flagCode))->loadSelf(); + } + return self::$_flagModel; + } + + /** + * Check if survey question was already asked + * or survey url was viewed during installation process + * + * @return boolean + */ + public static function isSurveyViewed() + { + $flagData = self::_getFlagModel()->getFlagData(); + if (isset($flagData['survey_viewed']) && $flagData['survey_viewed'] == 1) { + return true; + } + return false; + } + + /** + * Save survey viewed flag in core flag + * + * @param boolean $viewed + */ + public static function saveSurveyViewed($viewed) + { + $flagData = self::_getFlagModel()->getFlagData(); + if (is_null($flagData)) { + $flagData = array(); + } + $flagData = array_merge($flagData, array('survey_viewed' => (bool)$viewed)); + self::_getFlagModel()->setFlagData($flagData)->save(); + } +} diff --git a/app/code/core/Mage/AdminNotification/etc/config.xml b/app/code/core/Mage/AdminNotification/etc/config.xml index 91e4633b01..ca99192da4 100644 --- a/app/code/core/Mage/AdminNotification/etc/config.xml +++ b/app/code/core/Mage/AdminNotification/etc/config.xml @@ -86,6 +86,13 @@ + + + + adminnotification.xml + + + 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 08474f9e6c..09d5757915 100644 --- a/app/code/core/Mage/Adminhtml/Block/Api/Tab/Roleinfo.php +++ b/app/code/core/Mage/Adminhtml/Block/Api/Tab/Roleinfo.php @@ -73,6 +73,8 @@ protected function _initForm() ) ); + $fieldset->addField('in_role_user_old', 'hidden', array('name' => 'in_role_user_old')); + $form->setValues($this->getRole()->getData()); $this->setForm($form); } 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 8805020f60..ed91e0678d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Abstract.php +++ b/app/code/core/Mage/Adminhtml/Block/Catalog/Category/Abstract.php @@ -103,7 +103,7 @@ public function getRoot($parentNodeCategory=null, $recursionLevel=3) } $tree = Mage::getResourceSingleton('catalog/category_tree') - ->load($rootId, $recursionLevel); + ->load(null, $recursionLevel); if ($this->getCategory()) { $tree->loadEnsuredNodes($this->getCategory(), $tree->getNodeById($rootId)); 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 22f3b7f3a9..f065296a1f 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 @@ -78,7 +78,8 @@ protected function _prepareForm() { $form->setDataObject($this->getCategory()); $fieldset = $form->addFieldset('fieldset_group_' . $group->getId(), array( - 'legend' => Mage::helper('catalog')->__($group->getAttributeGroupName()) + 'legend' => Mage::helper('catalog')->__($group->getAttributeGroupName()), + 'class' => 'fieldset-wide', )); if ($this->getAddHiddenFields()) { 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 e64c913ba4..4f04508fb8 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 @@ -66,6 +66,7 @@ public function __construct() } $this->_updateButton('save', 'label', Mage::helper('catalog')->__('Save Attribute')); + $this->_updateButton('save', 'onclick', 'saveAttribute()'); if (! Mage::registry('entity_attribute')->getIsUserDefined()) { $this->_removeButton('delete'); 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 89f1afa23d..c7f857e82a 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 @@ -230,6 +230,13 @@ protected function _prepareForm() $form->getElement('apply_to')->addClass('no-display ignore-validate'); } + // define field dependencies + $this->setChild('form_after', $this->getLayout()->createBlock('adminhtml/widget_form_element_dependence') + ->addFieldMap("is_wysiwyg_enabled", 'wysiwyg_enabled') + ->addFieldMap("is_html_allowed_on_front", 'html_allowed_on_front') + ->addFieldDependence('html_allowed_on_front', 'wysiwyg_enabled', '0') + ); + return $this; } 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 b478940dd6..5849b55757 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 @@ -55,8 +55,10 @@ protected function _prepareForm() $form->setDataObject(Mage::registry('product')); $fieldset = $form->addFieldset('group_fields'.$group->getId(), - array('legend'=>Mage::helper('catalog')->__($group->getAttributeGroupName())) - ); + array( + 'legend'=>Mage::helper('catalog')->__($group->getAttributeGroupName()), + 'class'=>'fieldset-wide', + )); $attributes = $this->getGroupAttributes(); 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 f87b49336a..d42cbff1c2 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 @@ -170,8 +170,11 @@ protected function _getSelectedNodes() { if ($this->_selectedNodes === null) { $this->_selectedNodes = array(); + $root = $this->getRoot(); foreach ($this->getCategoryIds() as $categoryId) { - $this->_selectedNodes[] = $this->getRoot()->getTree()->getNodeById($categoryId); + if ($root) { + $this->_selectedNodes[] = $root->getTree()->getNodeById($categoryId); + } } } 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 111f1cc503..f0006eba84 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 @@ -35,7 +35,7 @@ class Mage_Adminhtml_Block_Customer_Edit_Tab_View_Sales extends Mage_Adminhtml_B { /** - * Enter description here... + * Sales entity collection * * @var Mage_Sales_Model_Entity_Sale_Collection */ @@ -45,7 +45,7 @@ class Mage_Adminhtml_Block_Customer_Edit_Tab_View_Sales extends Mage_Adminhtml_B protected $_websiteCounts; /** - * Enter description here... + * Currency model * * @var Mage_Directory_Model_Currency */ @@ -65,6 +65,7 @@ public function _beforeToHtml() $this->_collection = Mage::getResourceModel('sales/sale_collection') ->setCustomerFilter(Mage::registry('current_customer')) + ->setOrderStateFilter(Mage_Sales_Model_Order::STATE_CANCELED, true) ->load() ; @@ -112,25 +113,27 @@ public function getTotals() return $this->_collection->getTotals(); } + /** + * @deprecated after 1.4.0.0-rc1 + * + * @param float $price + * @return string + */ public function getPriceFormatted($price) { return $this->_currency->format($price); } -} - - - - - - - - - - - - - - - + /** + * Format price by specified website + * + * @param float $price + * @param null|int $websiteId + * @return string + */ + public function formatCurrency($price, $websiteId = null) + { + return Mage::app()->getWebsite($websiteId)->getBaseCurrency()->format($price); + } +} diff --git a/app/code/core/Mage/Paybox/Block/System/Failure.php b/app/code/core/Mage/Adminhtml/Block/Notification/Survey.php similarity index 56% rename from app/code/core/Mage/Paybox/Block/System/Failure.php rename to app/code/core/Mage/Adminhtml/Block/Notification/Survey.php index 67eedec864..e97ee271d9 100644 --- a/app/code/core/Mage/Paybox/Block/System/Failure.php +++ b/app/code/core/Mage/Adminhtml/Block/Notification/Survey.php @@ -19,43 +19,45 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Paybox + * @package Mage_Adminhtml * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - /** - * Paybox System Error Block + * Adminhtml AdminNotification survey question block * * @category Mage - * @package Mage_Paybox + * @package Mage_Adminhtml * @author Magento Core Team */ -class Mage_Paybox_Block_System_Failure extends Mage_Core_Block_Template +class Mage_Adminhtml_Block_Notification_Survey extends Mage_Adminhtml_Block_Template { /** - * Enter description here... + * Check whether survey question can show * - * @return Mage_Checkout_Model_Session + * @return boolean */ - public function getCheckout() + public function canShow() { - return Mage::getSingleton('checkout/session'); - } - - public function getErrorMessage() - { - $msg = Mage::helper('paybox')->__($this->getCheckout()->getPayboxErrorMessage()); - $this->getCheckout()->unsPayboxErrorMessage(); - return $msg; + $adminSession = Mage::getSingleton('admin/session'); + $seconds = intval(date('s', time())); + if ($adminSession->getHideSurveyQuestion() || !$adminSession->isAllowed('all') + || Mage_AdminNotification_Model_Survey::isSurveyViewed() + || !Mage_AdminNotification_Model_Survey::isSurveyUrlValid()) + { + return false; + } + return true; } /** - * Get continue shopping url + * Return survey url + * + * @return string */ - public function getContinueShoppingUrl() + public function getSurveyUrl() { - return Mage::getUrl('checkout/cart', array('_secure' => true)); + return Mage_AdminNotification_Model_Survey::getSurveyUrl(); } } 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 916b26e433..071937e2c6 100644 --- a/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Roleinfo.php +++ b/app/code/core/Mage/Adminhtml/Block/Permissions/Tab/Roleinfo.php @@ -88,6 +88,8 @@ protected function _initForm() ) ); + $fieldset->addField('in_role_user_old', 'hidden', array('name' => 'in_role_user_old')); + $form->setValues($this->getRole()->getData()); $this->setForm($form); } 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 669cca7aa6..8708d37a59 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 @@ -60,7 +60,7 @@ protected function _prepareLayout() ->setData(array( 'label' => Mage::helper('poll')->__('Delete'), 'onclick' => 'answer.del(this)', - 'class' => 'delete f-right' + 'class' => 'delete' )) ); 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 b03e589261..423054b75e 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 @@ -159,6 +159,8 @@ protected function _prepareForm() 'required' => true, ))->setRule($model)->setRenderer(Mage::getBlockSingleton('rule/actions')); + Mage::dispatchEvent('adminhtml_block_salesrule_actions_prepareform', array('form' => $form)); + $form->setValues($model->getData()); if ($model->isReadonly()) { 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 a1e45e7432..cc5c046f57 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Filter/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Filter/Form.php @@ -58,6 +58,8 @@ protected function _prepareForm() $form = new Varien_Data_Form( array('id' => 'filter_form', 'action' => $actionUrl, 'method' => 'get') ); + $htmlIdPrefix = 'sales_report_'; + $form->setHtmlIdPrefix($htmlIdPrefix); $fieldset = $form->addFieldset('base_fieldset', array('legend'=>Mage::helper('reports')->__('Filter'))); $dateFormatIso = Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT); @@ -66,6 +68,35 @@ protected function _prepareForm() 'name' => 'store_ids' )); + $statuses = Mage::getModel('sales/order_config')->getStatuses(); + $values = array(); + foreach ($statuses as $code => $label) { + if (false === strpos($code, 'pending')) { + $values[] = array( + 'label' => Mage::helper('reports')->__($label), + 'value' => $code + ); + } + } + + $fieldset->addField('report_type', 'select', array( + 'name' => 'report_type', + 'options' => $this->_reportTypeOptions, + 'label' => Mage::helper('reports')->__('Report Type'), + 'title' => Mage::helper('reports')->__('Report Type') + )); + + $fieldset->addField('period_type', 'select', array( + 'name' => 'period_type', + 'options' => array( + 'day' => Mage::helper('reports')->__('Day'), + 'month' => Mage::helper('reports')->__('Month'), + 'year' => Mage::helper('reports')->__('Year') + ), + 'label' => Mage::helper('reports')->__('Period'), + 'title' => Mage::helper('reports')->__('Period') + )); + $fieldset->addField('from', 'date', array( 'name' => 'from', 'format' => $dateFormatIso, @@ -84,40 +115,21 @@ protected function _prepareForm() 'required' => true )); - $fieldset->addField('period_type', 'select', array( - 'name' => 'period_type', - 'options' => array( - 'day' => Mage::helper('reports')->__('Day'), - 'month' => Mage::helper('reports')->__('Month'), - 'year' => Mage::helper('reports')->__('Year') - ), - 'label' => Mage::helper('reports')->__('Period Type'), - 'title' => Mage::helper('reports')->__('Period Type') - )); - - $fieldset->addField('report_type', 'select', array( - 'name' => 'report_type', - 'options' => $this->_reportTypeOptions, - 'label' => Mage::helper('reports')->__('Report Type'), - 'title' => Mage::helper('reports')->__('Report Type') + $fieldset->addField('show_order_statuses', 'select', array( + 'name' => 'show_order_statuses', + 'label' => Mage::helper('reports')->__('Order Status'), + 'title' => Mage::helper('reports')->__('Order Status'), + 'options' => array( + '0' => Mage::helper('reports')->__('Any'), + '1' => Mage::helper('reports')->__('Specified'), + ), + 'note' => Mage::helper('reports')->__('Applies to Any of the Specified Order Statuses'), )); - $statuses = Mage::getModel('sales/order_config')->getStatuses(); - $values = array(); - foreach ($statuses as $code => $label) { - if (false === strpos($code, 'pending')) { - $values[] = array( - 'label' => Mage::helper('reports')->__($label), - 'value' => $code - ); - } - } - $fieldset->addField('order_statuses', 'multiselect', array( 'name' => 'order_statuses', 'values' => $values, - 'label' => Mage::helper('reports')->__('Status'), - 'title' => Mage::helper('reports')->__('Status') + 'display' => 'none' )); $fieldset->addField('show_empty_rows', 'select', array( @@ -126,13 +138,21 @@ protected function _prepareForm() '1' => 'Yes', '0' => 'No' ), - 'label' => Mage::helper('reports')->__('Show Empty Rows'), - 'title' => Mage::helper('reports')->__('Show Empty Rows') + 'label' => Mage::helper('reports')->__('Empty Rows'), + 'title' => Mage::helper('reports')->__('Empty Rows') )); $form->addValues($this->getFilterData()->getData()); $form->setUseContainer(true); $this->setForm($form); + + // define field dependencies + $this->setChild('form_after', $this->getLayout()->createBlock('adminhtml/widget_form_element_dependence') + ->addFieldMap("{$htmlIdPrefix}show_order_statuses", 'show_order_statuses') + ->addFieldMap("{$htmlIdPrefix}order_statuses", 'order_statuses') + ->addFieldDependence('order_statuses', 'show_order_statuses', '1') + ); + return parent::_prepareForm(); } } 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 0a26020be6..5afaf923eb 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 @@ -45,8 +45,10 @@ protected function _getUpdatedAt($reportCode) { $flag = Mage::getModel('reports/flag')->setReportFlagCode($reportCode)->loadSelf(); return ($flag->hasData()) - ? Mage::app()->getLocale()->storeDate(0, $flag->getLastUpdate(), true) - : Mage::helper('reports')->__('undefined'); + ? Mage::app()->getLocale()->storeDate( + 0, new Zend_Date($flag->getLastUpdate(), Varien_Date::DATETIME_INTERNAL_FORMAT), true + ) + : ''; } protected function _prepareCollection() @@ -57,37 +59,37 @@ protected function _prepareCollection() array( 'id' => 'sales', 'report' => Mage::helper('reports')->__('Sales'), - 'comment' => '', + 'comment' => Mage::helper('reports')->__('Total Ordered Report'), 'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_ORDER_FLAG_CODE) ), array( 'id' => 'tax', 'report' => Mage::helper('reports')->__('Tax'), - 'comment' => '', + 'comment' => Mage::helper('reports')->__('Order Taxes Report Grouped by Tax Rates'), 'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_TAX_FLAG_CODE) ), array( 'id' => 'shipping', 'report' => Mage::helper('reports')->__('Shipping'), - 'comment' => '', + 'comment' => Mage::helper('reports')->__('Total Shipped Report'), 'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_SHIPPING_FLAG_CODE) ), array( 'id' => 'invoiced', 'report' => Mage::helper('reports')->__('Total Invoiced'), - 'comment' => '', + 'comment' => Mage::helper('reports')->__('Total Invoiced VS Paid Report'), 'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_INVOICE_FLAG_CODE) ), array( 'id' => 'refunded', 'report' => Mage::helper('reports')->__('Total Refunded'), - 'comment' => '', + 'comment' => Mage::helper('reports')->__('Total Refunded Report'), 'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_REFUNDED_FLAG_CODE) ), array( 'id' => 'coupons', 'report' => Mage::helper('reports')->__('Coupons'), - 'comment' => '', + 'comment' => Mage::helper('reports')->__('Promotion Coupons Usage Report'), 'updated_at' => $this->_getUpdatedAt(Mage_Reports_Model_Flag::REPORT_COUPNS_FLAG_CODE) ) ); @@ -114,7 +116,7 @@ protected function _prepareColumns() )); $this->addColumn('comment', array( - 'header' => Mage::helper('reports')->__('Comment'), + 'header' => Mage::helper('reports')->__('Description'), 'index' => 'comment', 'type' => 'string', 'sortable' => false @@ -123,26 +125,11 @@ protected function _prepareColumns() $this->addColumn('updated_at', array( 'header' => Mage::helper('reports')->__('Updated At'), 'index' => 'updated_at', - 'type' => 'string', + 'type' => 'datetime', 'width' => 200, 'sortable' => false )); - $this->addColumn('action', array( - 'header' => Mage::helper('reports')->__('Action'), - 'index' => 'id', - 'type' => 'action', - 'actions' => array( - array( - 'caption' => Mage::helper('index')->__('Refresh Recent'), - 'url' => array('base'=>'*/*/refreshRecent'), - 'field' => 'code' - ), - ), - 'width' => 100, - 'sortable' => false - )); - return parent::_prepareColumns(); } @@ -152,15 +139,16 @@ protected function _prepareMassaction() $this->getMassactionBlock()->setFormFieldName('code'); $this->getMassactionBlock()->addItem('refresh_lifetime', array( - 'label' => Mage::helper('reports')->__('Refresh Lifetime Statistics'), - 'url' => $this->getUrl('*/*/refreshLifetime'), - 'confirm' => Mage::helper('reports')->__('Are you sure you want to refresh lifetime statistics? There can be performance impact during this operation.') + 'label' => Mage::helper('reports')->__('Refresh Lifetime Statistics'), + 'url' => $this->getUrl('*/*/refreshLifetime'), + 'confirm' => Mage::helper('reports')->__('Are you sure you want to refresh lifetime statistics? There can be performance impact during this operation.') )); $this->getMassactionBlock()->addItem('refresh_recent', array( - 'label' => Mage::helper('reports')->__('Refresh Statistics for Last Day'), - 'url' => $this->getUrl('*/*/refreshRecent'), - 'confirm' => Mage::helper('reports')->__('Are you sure?') + 'label' => Mage::helper('reports')->__('Refresh Statistics for Last Day'), + 'url' => $this->getUrl('*/*/refreshRecent'), + 'confirm' => Mage::helper('reports')->__('Are you sure?'), + 'selected' => true )); return $this; 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 7ab5f1d668..c3a681dbe9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Coupons.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Coupons.php @@ -37,12 +37,12 @@ class Mage_Adminhtml_Block_Report_Sales_Coupons extends Mage_Adminhtml_Block_Wid public function __construct() { $this->_controller = 'report_sales_coupons'; - $this->_headerText = Mage::helper('reports')->__('Coupons'); + $this->_headerText = Mage::helper('reports')->__('Coupons Usage Report'); parent::__construct(); $this->setTemplate('report/grid/container.phtml'); $this->_removeButton('add'); $this->addButton('filter_form_submit', array( - 'label' => Mage::helper('reports')->__('Generate Report'), + 'label' => Mage::helper('reports')->__('Show Report'), 'onclick' => 'filterFormSubmit()' )); } 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 d1986ab28a..217db36c16 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 @@ -54,9 +54,10 @@ protected function _prepareColumns() $this->addColumn('period', array( 'header' => Mage::helper('reports')->__('Period'), 'index' => 'period', - 'type' => 'string', 'width' => 100, 'sortable' => false, + 'period_type' => $this->getPeriodType(), + 'renderer' => 'adminhtml/report_sales_grid_column_renderer_date', 'totals_label' => Mage::helper('adminhtml')->__('Total'), 'subtotals_label' => Mage::helper('adminhtml')->__('SubTotal') )); 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 new file mode 100644 index 0000000000..74ee4fd311 --- /dev/null +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Grid/Column/Renderer/Date.php @@ -0,0 +1,112 @@ + + */ + +class Mage_Adminhtml_Block_Report_Sales_Grid_Column_Renderer_Date + extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Date +{ + /** + * Retrieve date format + * + * @return string + */ + protected function _getFormat() + { + $format = $this->getColumn()->getFormat(); + if (!$format) { + if (is_null(self::$_format)) { + try { + $localeCode = Mage::app()->getLocale()->getLocaleCode(); + $localeData = new Zend_Locale_Data; + switch ($this->getColumn()->getPeriodType()) { + case 'month' : + self::$_format = $localeData->getContent($localeCode, 'dateitem', 'yM'); + break; + + case 'year' : + self::$_format = $localeData->getContent($localeCode, 'dateitem', 'y'); + break; + + default: + self::$_format = Mage::app()->getLocale()->getDateFormat( + Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM + ); + break; + } + } + catch (Exception $e) { + + } + } + $format = self::$_format; + } + return $format; + } + + /** + * Renders grid column + * + * @param Varien_Object $row + * @return string + */ + public function render(Varien_Object $row) + { + if ($data = $row->getData($this->getColumn()->getIndex())) { + switch ($this->getColumn()->getPeriodType()) { + case 'month' : + $dateFormat = 'yyyy-MM'; + break; + case 'year' : + $dateFormat = 'yyyy'; + break; + default: + $dateFormat = Varien_Date::DATE_INTERNAL_FORMAT; + break; + } + + $format = $this->_getFormat(); + try { + $data = ($this->getColumn()->getGmtoffset()) + ? Mage::app()->getLocale()->date($data, $dateFormat)->toString($format) + : Mage::getSingleton('core/locale')->date($data, Zend_Date::ISO_8601, null, false)->toString($format); + } + catch (Exception $e) { + $data = ($this->getColumn()->getTimezone()) + ? Mage::app()->getLocale()->date($data, $dateFormat)->toString($format) + : Mage::getSingleton('core/locale')->date($data, $dateFormat, null, false)->toString($format); + } + return $data; + } + return $this->getColumn()->getDefault(); + } +} 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 f69e13a50c..8cabc80590 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Invoiced.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Invoiced.php @@ -37,12 +37,12 @@ class Mage_Adminhtml_Block_Report_Sales_Invoiced extends Mage_Adminhtml_Block_Wi public function __construct() { $this->_controller = 'report_sales_invoiced'; - $this->_headerText = Mage::helper('reports')->__('Total invoiced'); + $this->_headerText = Mage::helper('reports')->__('Total Invoiced VS Paid Report'); parent::__construct(); $this->setTemplate('report/grid/container.phtml'); $this->_removeButton('add'); $this->addButton('filter_form_submit', array( - 'label' => Mage::helper('reports')->__('Generate Report'), + 'label' => Mage::helper('reports')->__('Show Report'), 'onclick' => 'filterFormSubmit()' )); } 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 b37ed9dafa..b571b446f6 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 @@ -53,9 +53,10 @@ protected function _prepareColumns() $this->addColumn('period', array( 'header' => Mage::helper('sales')->__('Period'), 'index' => 'period', - 'type' => 'string', 'width' => 100, 'sortable' => false, + 'period_type' => $this->getPeriodType(), + 'renderer' => 'adminhtml/report_sales_grid_column_renderer_date', 'totals_label' => Mage::helper('adminhtml')->__('Total') )); 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 8cecd021c0..13f78d96f3 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Refunded.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Refunded.php @@ -37,12 +37,12 @@ class Mage_Adminhtml_Block_Report_Sales_Refunded extends Mage_Adminhtml_Block_Wi public function __construct() { $this->_controller = 'report_sales_refunded'; - $this->_headerText = Mage::helper('reports')->__('Total refunded'); + $this->_headerText = Mage::helper('reports')->__('Total Refunded Report'); parent::__construct(); $this->setTemplate('report/grid/container.phtml'); $this->_removeButton('add'); $this->addButton('filter_form_submit', array( - 'label' => Mage::helper('reports')->__('Generate Report'), + 'label' => Mage::helper('reports')->__('Show Report'), 'onclick' => 'filterFormSubmit()' )); } 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 f519102178..7f428dfe88 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 @@ -53,9 +53,10 @@ protected function _prepareColumns() $this->addColumn('period', array( 'header' => Mage::helper('sales')->__('Period'), 'index' => 'period', - 'type' => 'string', 'width' => 100, 'sortable' => false, + 'period_type' => $this->getPeriodType(), + 'renderer' => 'adminhtml/report_sales_grid_column_renderer_date', 'totals_label' => Mage::helper('adminhtml')->__('Total') )); 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 2e6d36cf74..c89e2f9c24 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Sales.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Sales.php @@ -38,12 +38,12 @@ class Mage_Adminhtml_Block_Report_Sales_Sales extends Mage_Adminhtml_Block_Widge public function __construct() { $this->_controller = 'report_sales_sales'; - $this->_headerText = Mage::helper('reports')->__('Sales Report'); + $this->_headerText = Mage::helper('reports')->__('Total Ordered Report'); parent::__construct(); $this->setTemplate('report/grid/container.phtml'); $this->_removeButton('add'); $this->addButton('filter_form_submit', array( - 'label' => Mage::helper('reports')->__('Generate Report'), + 'label' => Mage::helper('reports')->__('Show Report'), 'onclick' => 'filterFormSubmit()' )); } 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 d76e5eee01..98dfad2530 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 @@ -53,9 +53,10 @@ protected function _prepareColumns() $this->addColumn('period', array( 'header' => Mage::helper('sales')->__('Period'), 'index' => 'period', - 'type' => 'string', 'width' => 100, 'sortable' => false, + 'period_type' => $this->getPeriodType(), + 'renderer' => 'adminhtml/report_sales_grid_column_renderer_date', 'totals_label' => Mage::helper('adminhtml')->__('Total') )); 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 653dea605d..924cc0aab8 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Shipping.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Shipping.php @@ -37,12 +37,12 @@ class Mage_Adminhtml_Block_Report_Sales_Shipping extends Mage_Adminhtml_Block_Wi public function __construct() { $this->_controller = 'report_sales_shipping'; - $this->_headerText = Mage::helper('reports')->__('Shipping'); + $this->_headerText = Mage::helper('reports')->__('Total Shipped Report'); parent::__construct(); $this->setTemplate('report/grid/container.phtml'); $this->_removeButton('add'); $this->addButton('filter_form_submit', array( - 'label' => Mage::helper('reports')->__('Generate Report'), + 'label' => Mage::helper('reports')->__('Show Report'), 'onclick' => 'filterFormSubmit()' )); } 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 8d598aed25..43b734043f 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 @@ -54,9 +54,10 @@ protected function _prepareColumns() $this->addColumn('period', array( 'header' => Mage::helper('adminhtml')->__('Period'), 'index' => 'period', - 'type' => 'string', 'width' => 100, 'sortable' => false, + 'period_type' => $this->getPeriodType(), + 'renderer' => 'adminhtml/report_sales_grid_column_renderer_date', 'totals_label' => Mage::helper('adminhtml')->__('Total'), 'subtotals_label' => Mage::helper('adminhtml')->__('SubTotal') )); 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 7630a6ac11..5b19c5f7bd 100644 --- a/app/code/core/Mage/Adminhtml/Block/Report/Sales/Tax.php +++ b/app/code/core/Mage/Adminhtml/Block/Report/Sales/Tax.php @@ -37,12 +37,12 @@ class Mage_Adminhtml_Block_Report_Sales_Tax extends Mage_Adminhtml_Block_Widget_ public function __construct() { $this->_controller = 'report_sales_tax'; - $this->_headerText = Mage::helper('reports')->__('Tax'); + $this->_headerText = Mage::helper('reports')->__('Order Taxes Report Grouped by Tax Rate'); parent::__construct(); $this->setTemplate('report/grid/container.phtml'); $this->_removeButton('add'); $this->addButton('filter_form_submit', array( - 'label' => Mage::helper('reports')->__('Generate Report'), + 'label' => Mage::helper('reports')->__('Show Report'), 'onclick' => 'filterFormSubmit()' )); } 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 6fa57c42b2..6152dd9a49 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 @@ -54,9 +54,10 @@ protected function _prepareColumns() $this->addColumn('period', array( 'header' => Mage::helper('sales')->__('Period'), 'index' => 'period', - 'type' => 'string', 'width' => '100', 'sortable' => false, + 'period_type' => $this->getPeriodType(), + 'renderer' => 'adminhtml/report_sales_grid_column_renderer_date', 'totals_label' => Mage::helper('adminhtml')->__('Total'), 'subtotals_label' => Mage::helper('adminhtml')->__('SubTotal') )); diff --git a/app/code/core/Mage/Adminhtml/Block/Review/Grid.php b/app/code/core/Mage/Adminhtml/Block/Review/Grid.php index e92000a609..b2be8b61c9 100644 --- a/app/code/core/Mage/Adminhtml/Block/Review/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Review/Grid.php @@ -166,6 +166,7 @@ protected function _prepareColumns() 'align' =>'left', 'type' => 'text', 'index' => 'name', + 'escape' => true )); $this->addColumn('sku', array( @@ -174,6 +175,7 @@ protected function _prepareColumns() 'type' => 'text', 'width' => '50px', 'index' => 'sku', + 'escape' => true )); $this->addColumn('action', 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 6bcebb2966..708d5d0254 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 @@ -98,14 +98,12 @@ protected function _prepareColumns() 'index' =>'billing_regione', )); - if (!Mage::app()->isSingleStoreMode()) { - $this->addColumn('store_name', array( - 'header' =>Mage::helper('sales')->__('Signed Up From'), - 'align' => 'center', - 'index' =>'store_name', - 'width' =>'130px', - )); - } + $this->addColumn('store_name', array( + 'header' =>Mage::helper('sales')->__('Signed Up From'), + 'align' => 'center', + 'index' =>'store_name', + 'width' =>'130px', + )); return parent::_prepareColumns(); } 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 18e00b3067..04bbda3270 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 @@ -48,7 +48,7 @@ public function getAvailableCurrencies() $dirtyCodes ); foreach ($dirtyCodes as $code) { - if (isset($rates[$code]) || $code == Mage::app()->getStore()->getBaseCurrency()) { + if (isset($rates[$code]) || $code == Mage::app()->getStore()->getBaseCurrencyCode()) { $codes[] = $code; } } 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 3ff93f4a6c..52948e3e41 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 @@ -88,6 +88,11 @@ protected function _prepareForm() ) ->setEntityAttribute($attribute); + if ('street' === $element->getName()) { + $lines = Mage::getStoreConfig('customer/address/street_lines', $this->getStoreId()); + $element->setLineCount($lines); + } + if ($inputType == 'select' || $inputType == 'multiselect') { $element->setValues($attribute->getFrontend()->getSelectOptions()); } 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 b00c608e44..c581a0e18b 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 @@ -122,7 +122,12 @@ public function displayTotalsIncludeTax() public function getSubtotal() { - $address = $this->getQuote()->getShippingAddress(); + if ($this->getQuote()->isVirtual()) { + $address = $this->getQuote()->getBillingAddress(); + } + else { + $address = $this->getQuote()->getShippingAddress(); + } if ($this->displayTotalsIncludeTax()) { if ($address->getSubtotalInclTax()) { return $address->getSubtotalInclTax(); 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 4fe3518fbb..27a386819c 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 @@ -59,30 +59,27 @@ protected function _prepareLayout() $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array( 'label' => Mage::helper('sales')->__('Refund'), 'class' => 'save submit-button', - 'onclick' => 'submitCreditMemo()', - )) - ); - } - - if ($this->getCreditmemo()->canRefund()) { - $this->setChild( - 'submit_offline', - $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array( - 'label' => Mage::helper('sales')->__('Refund Offline'), - 'class' => 'save submit-button', - 'onclick' => 'submitCreditMemoOffline()', + 'onclick' => 'disableElements(\'submit-button\');submitCreditMemo()', )) ); } + $this->setChild( + 'submit_offline', + $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array( + 'label' => Mage::helper('sales')->__('Refund Offline'), + 'class' => 'save submit-button', + 'onclick' => 'disableElements(\'submit-button\');submitCreditMemoOffline()', + )) + ); } else { $this->setChild( 'submit_button', $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array( - 'label' => Mage::helper('sales')->__('Refund'), + 'label' => Mage::helper('sales')->__('Refund Offline'), 'class' => 'save submit-button', - 'onclick' => 'editForm.submit()', + 'onclick' => 'disableElements(\'submit-button\');editForm.submit()', )) ); } 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 fbe59d7d97..4e287c00d8 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 @@ -70,7 +70,7 @@ protected function _beforeToHtml() $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array( 'label' => Mage::helper('sales')->__('%s', $_submitLabel), 'class' => 'save submit-button' . $_submitButtonClass, - 'onclick' => '$(\'edit_form\').submit()', + 'onclick' => 'disableElements(\'submit-button\');$(\'edit_form\').submit()', 'disabled' => $this->_disableSubmitButton )) ); @@ -184,12 +184,31 @@ public function canEditQty() return true; } + /** + * Check if capture operation is allowed in ACL + * @return bool + */ + public function isCaptureAllowed() + { + return Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/capture'); + } + + /** + * Check if invoice can be captured + * @return bool + */ public function canCapture() { - if (Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/capture')) { - return $this->getInvoice()->canCapture(); - } - return false; + return $this->getInvoice()->canCapture(); + } + + /** + * Check if gateway is associated with invoice order + * @return bool + */ + public function isGatewayUsed() + { + return $this->getInvoice()->getOrder()->getPayment()->getMethodInstance()->isGateway(); } public function canSendInvoiceEmail() 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 be9c7c8f0c..332d6983e2 100644 --- a/app/code/core/Mage/Adminhtml/Block/Sales/Order/Payment.php +++ b/app/code/core/Mage/Adminhtml/Block/Sales/Order/Payment.php @@ -48,9 +48,6 @@ protected function _beforeToHtml() public function setPayment($payment) { $paymentInfoBlock = Mage::helper('payment')->getInfoBlock($payment); - if ($payment->getMethod() == 'ccsave') { - $paymentInfoBlock->setTemplate('payment/info/ccsave.phtml'); - } $this->setChild('info', $paymentInfoBlock); $this->setData('payment', $payment); return $this; 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 6036a9b9b5..ab33987c4c 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 @@ -74,7 +74,7 @@ protected function _beforeToHtml() $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array( 'label' => Mage::helper('sales')->__('Submit Shipment'), 'class' => 'save submit-button', - 'onclick' => '$(\'edit_form\').submit()', + 'onclick' => 'disableElements(\'submit-button\');$(\'edit_form\').submit()', )) ); 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 222c28a96e..4530939f6c 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 @@ -199,9 +199,6 @@ public function canDisplayContainer() */ public function canDisplayGiftmessage() { - if (!$this->getItem()->getOrder()->canInvoice()) { - return false; - } return $this->helper('giftmessage/message')->getIsMessagesAvailable( 'order_item', $this->getItem(), $this->getItem()->getOrder()->getStoreId() ); 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 956b42329a..98521ca3bf 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 @@ -93,9 +93,6 @@ public function getItemsHtml() */ public function getGiftmessageHtml() { - if (!$this->getOrder()->canInvoice()) { - return ''; - } return $this->getChildHtml('order_giftmessage'); } 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 8b5dd6f4dc..0b8dc38128 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 @@ -40,13 +40,16 @@ public function initForm() $model = Mage::registry('current_convert_profile'); - $fieldset = $form->addFieldset('base_fieldset', array('legend'=>Mage::helper('adminhtml')->__('View Actions XML'))); + $fieldset = $form->addFieldset('base_fieldset', array( + 'legend'=>Mage::helper('adminhtml')->__('View Actions XML'), + 'class'=>'fieldset-wide' + )); $fieldset->addField('actions_xml', 'textarea', array( 'name' => 'actions_xml_view', 'label' => Mage::helper('adminhtml')->__('Actions XML'), 'title' => Mage::helper('adminhtml')->__('Actions XML'), - 'style' => 'width:500px; height:400px', + 'style' => 'height:30em', 'readonly' => 'readonly', )); 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 bf89dbf0ef..8957345c21 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 @@ -40,7 +40,10 @@ public function initForm() $model = Mage::registry('current_convert_profile'); - $fieldset = $form->addFieldset('base_fieldset', array('legend'=>Mage::helper('adminhtml')->__('General Information'))); + $fieldset = $form->addFieldset('base_fieldset', array( + 'legend'=>Mage::helper('adminhtml')->__('General Information'), + 'class'=>'fieldset-wide' + )); $fieldset->addField('name', 'text', array( 'name' => 'name', @@ -53,7 +56,7 @@ public function initForm() 'name' => 'actions_xml', 'label' => Mage::helper('adminhtml')->__('Actions XML'), 'title' => Mage::helper('adminhtml')->__('Actions XML'), - 'style' => 'width:500px; height:400px', + 'style' => 'height:30em', 'required' => true, )); 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 28f9cff3c1..306d5ab121 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 @@ -86,6 +86,7 @@ public function getImportedFiles() $files[] = $entry; } } + sort($files); $dir->close(); return $files; } 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 13d650823c..d7908d73c5 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 @@ -128,7 +128,10 @@ protected function _toHtml() if ($batchModel->getId()) { if ($batchModel->getAdapter()) { $numberOfRecords = $profile->getData('gui_data/import/number_of_records'); - $numberOfRecords = $numberOfRecords ? $numberOfRecords : 1; + if (!$numberOfRecords) { + $batchParams = $batchModel->getParams(); + $numberOfRecords = isset($batchParams['number_of_records']) ? $batchParams['number_of_records'] : 1; + } $showFinished = false; $batchImportModel = $batchModel->getBatchImportModel(); 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 b77bcb2262..392a3224be 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 @@ -56,7 +56,10 @@ protected function _prepareForm() 'method' => 'post' )); - $fieldset = $form->addFieldset('base', array()); + $fieldset = $form->addFieldset('base', array( + 'legend'=>Mage::helper('adminhtml')->__('Variable'), + 'class'=>'fieldset-wide' + )); $fieldset->addField('code', 'text', array( 'name' => 'code', 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 b1d6fd4a4d..f588bd3610 100644 --- a/app/code/core/Mage/Adminhtml/Block/System/Variable/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/System/Variable/Grid.php @@ -68,19 +68,17 @@ protected function _prepareColumns() { $this->addColumn('variable_id', array( 'header' => Mage::helper('adminhtml')->__('Variable ID'), - 'align' => 'left', + 'width' => '1', 'index' => 'variable_id', )); $this->addColumn('code', array( 'header' => Mage::helper('adminhtml')->__('Variable Code'), - 'align' => 'center', 'index' => 'code', )); $this->addColumn('name', array( 'header' => Mage::helper('adminhtml')->__('Name'), - 'align' => 'left', 'index' => 'name', )); 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 1b784247a6..8629746f12 100644 --- a/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Form.php +++ b/app/code/core/Mage/Adminhtml/Block/Tax/Rate/Form.php @@ -159,7 +159,8 @@ protected function _prepareForm() array( 'name' => 'zip_from', 'label' => Mage::helper('tax')->__('Range from'), - 'value' => $rateObject->getZipFrom() + 'value' => $rateObject->getZipFrom(), + 'required' => true ) ); @@ -167,7 +168,8 @@ protected function _prepareForm() array( 'name' => 'zip_to', 'label' => Mage::helper('tax')->__('Range to'), - 'value' => $rateObject->getZipTo() + 'value' => $rateObject->getZipTo(), + 'required' => true ) ); diff --git a/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php b/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php index 840abec539..e879e992e6 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid.php @@ -855,7 +855,7 @@ protected function _getExportTotals() $row = array(); foreach ($this->_columns as $column) { if (!$column->getIsSystem()) { - $row[] = $column->getRowFieldExport($totals); + $row[] = ($column->hasTotalsLabel()) ? $column->getTotalsLabel() : $column->getRowFieldExport($totals); } } return $row; 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 7345984f8e..608c65617d 100644 --- a/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column.php +++ b/app/code/core/Mage/Adminhtml/Block/Widget/Grid/Column.php @@ -82,6 +82,9 @@ public function getCssClass() if ($this->hasData('column_css_class')) { $this->_cssClass .= ' '. $this->getData('column_css_class'); } + if ($this->getEditable()) { + $this->_cssClass .= ' editable'; + } } return $this->_cssClass; @@ -110,9 +113,6 @@ public function getHeaderHtmlProperty() if ($class = $this->getHeaderCssClass()) { $str.= ' class="'.$class.'"'; } - if ($this->getEditable()) { - $str.= ' colspan="2"'; - } return $str; } @@ -126,6 +126,9 @@ public function getHeaderHtmlProperty() public function getRowField(Varien_Object $row) { $renderedValue = $this->getRenderer()->render($row); + if ($this->getHtmlDecorators()) { + $renderedValue = $this->_applyDecorators($renderedValue, $this->getHtmlDecorators()); + } /* * if column has determined callback for framing call @@ -167,6 +170,34 @@ public function getRowFieldExport(Varien_Object $row) return $renderedValue; } + /** + * Decorate rendered cell value + * + * @param string $value + * @param array|string $decorators + * @return string + */ + protected function &_applyDecorators($value, $decorators) + { + if (!is_array($decorators)) { + if (is_string($decorators)) { + $decorators = explode(' ', $decorators); + } + } + if ((!is_array($decorators)) || empty($decorators)) { + return $value; + } + switch (array_shift($decorators)) { + case 'nobr': + $value = '' . $value . ''; + break; + } + if (!empty($decorators)) { + return $this->_applyDecorators($value, $decorators); + } + return $value; + } + public function setRenderer($renderer) { $this->_renderer = $renderer; 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 e82455fef2..36dae00f53 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 @@ -52,7 +52,7 @@ public function getHtml() $value = $this->getValue(); foreach ($this->_getOptions() as $option){ $selected = ( ($option['value'] == $value && (!is_null($value))) ? ' selected="selected"' : '' ); - $html.= ''; + $html.= ''; } $html.=''; return $html; 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 da8be1b477..73fe5ed14d 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 @@ -58,8 +58,9 @@ public function render(Varien_Object $row) { if ($this->getColumn()->getEditable()) { $value = $this->_getValue($row); - return $value . ($this->getColumn()->getEditOnly() ? '' : ($value != '' ? '' : ' ') . '') - . $this->_getInputValueElement($row); + return $value + . ($this->getColumn()->getEditOnly() ? '' : ($value != '' ? '' : ' ')) + . $this->_getInputValueElement($row); } return $this->_getValue($row); } @@ -78,7 +79,12 @@ public function renderExport(Varien_Object $row) protected function _getValue(Varien_Object $row) { if ($getter = $this->getColumn()->getGetter()) { - return $row->$getter(); + if (is_string($getter)) { + return $row->$getter(); + } elseif (is_callable($getter)) { + return call_user_func($getter, $row); + } + return ''; } return $row->getData($this->getColumn()->getIndex()); } 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 45285d0c4d..9632353b20 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 @@ -57,9 +57,10 @@ public function render(Varien_Object $row) } $data = floatval($data) * $this->_getRate($row); + $sign = (bool)(int)$this->getColumn()->getShowNumberSign() && ($data > 0) ? '+' : ''; $data = sprintf("%f", $data); - $data =Mage::app()->getLocale()->currency($currency_code)->toCurrency($data); - return $data; + $data = Mage::app()->getLocale()->currency($currency_code)->toCurrency($data); + return $sign . $data; } return $this->getColumn()->getDefault(); } 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 a6e11b8f10..161483e849 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 @@ -71,7 +71,7 @@ protected function _getFormat() */ public function render(Varien_Object $row) { - if ($data = $row->getData($this->getColumn()->getIndex())) { + if ($data = $this->_getValue($row)) { $format = $this->_getFormat(); try { $data = Mage::app()->getLocale()->date($data, Varien_Date::DATETIME_INTERNAL_FORMAT)->toString($format); @@ -81,7 +81,6 @@ public function render(Varien_Object $row) $data = Mage::app()->getLocale()->date($data, Varien_Date::DATETIME_INTERNAL_FORMAT)->toString($format); } return $data; - } return $this->getColumn()->getDefault(); } 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 9addf0d8c6..047f0304ae 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 @@ -41,7 +41,11 @@ protected function _getValue(Varien_Object $row) $data = parent::_getValue($row); if (!is_null($data)) { $value = $data * 1; - return $value ? $value: '0'; // fixed for showing zero in grid + $sign = (bool)(int)$this->getColumn()->getShowNumberSign() && ($value > 0) ? '+' : ''; + if ($sign) { + $value = $sign . $value; + } + return $value ? $value : '0'; // fixed for showing zero in grid } return $this->getColumn()->getDefault(); } diff --git a/app/code/core/Mage/Adminhtml/Controller/Action.php b/app/code/core/Mage/Adminhtml/Controller/Action.php index 1d758b383f..c64dacad77 100644 --- a/app/code/core/Mage/Adminhtml/Controller/Action.php +++ b/app/code/core/Mage/Adminhtml/Controller/Action.php @@ -434,32 +434,4 @@ protected function _validateSecretKey() } return true; } - - /** - * Convert dates in array from localized to internal format - * - * @param array $array - * @param array $dateFields - * @return array - */ - protected function _filterDates($array, $dateFields) - { - if (empty($dateFields)) { - return $array; - } - $filterInput = new Zend_Filter_LocalizedToNormalized(array( - 'date_format' => Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT) - )); - $filterInternal = new Zend_Filter_NormalizedToLocalized(array( - 'date_format' => Varien_Date::DATE_INTERNAL_FORMAT - )); - - foreach ($dateFields as $dateField) { - if (array_key_exists($dateField, $array) && !empty($dateField)) { - $array[$dateField] = $filterInput->filter($array[$dateField]); - $array[$dateField] = $filterInternal->filter($array[$dateField]); - } - } - return $array; - } } diff --git a/app/code/core/Mage/Adminhtml/Controller/Sales/Invoice.php b/app/code/core/Mage/Adminhtml/Controller/Sales/Invoice.php index a864f7e553..d735933e81 100644 --- a/app/code/core/Mage/Adminhtml/Controller/Sales/Invoice.php +++ b/app/code/core/Mage/Adminhtml/Controller/Sales/Invoice.php @@ -70,6 +70,8 @@ public function gridAction() */ public function indexAction() { + $this->_title($this->__('Sales'))->_title($this->__('Invoices')); + $this->_initAction() ->_addContent($this->getLayout()->createBlock('adminhtml/sales_invoice')) ->renderLayout(); diff --git a/app/code/core/Mage/Adminhtml/Controller/Sales/Shipment.php b/app/code/core/Mage/Adminhtml/Controller/Sales/Shipment.php index 4fa6728bf9..ca76843fe9 100644 --- a/app/code/core/Mage/Adminhtml/Controller/Sales/Shipment.php +++ b/app/code/core/Mage/Adminhtml/Controller/Sales/Shipment.php @@ -59,6 +59,8 @@ protected function _initAction() */ public function indexAction() { + $this->_title($this->__('Sales'))->_title($this->__('Shipments')); + $this->_initAction() ->_addContent($this->getLayout()->createBlock('adminhtml/sales_shipment')) ->renderLayout(); 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 31390dfce5..05a8be3332 100644 --- a/app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php +++ b/app/code/core/Mage/Adminhtml/Model/Sales/Order/Create.php @@ -479,11 +479,9 @@ public function moveQuoteItem($item, $moveTo, $qty) public function applySidebarData($data) { - if (isset($data['add'])) { - foreach ($data['add'] as $productId => $qty) { - $this->addProduct($productId, $qty); - } - } + // skip item duplicates based on info_buyRequest option + $infoBuyRequests = array(); + if (isset($data['reorder'])) { foreach ($data['reorder'] as $orderItemId=>$value) { $orderItem = Mage::getModel('sales/order_item')->load($orderItemId); @@ -491,16 +489,28 @@ public function applySidebarData($data) if (is_string($item)) { Mage::throwException($item); } + $infobuyRequest = $item->getOptionByCode('info_buyRequest'); + if ($infobuyRequest !== null) { + $infoBuyRequests[] = $infobuyRequest->getValue(); + } } } if (isset($data['cartItem'])) { foreach ($data['cartItem'] as $itemId => $qty) { if ($item = $this->getCustomerCart()->getItemById($itemId)) { - $this->moveQuoteItem($item, 'order', $qty); + $infobuyRequest = $item->getOptionByCode('info_buyRequest'); + if ($infobuyRequest === null || !in_array($infobuyRequest->getValue(), $infoBuyRequests)) { + $this->moveQuoteItem($item, 'order', $qty); + } // $this->removeItem($itemId, 'cart'); } } } + if (isset($data['add'])) { + foreach ($data['add'] as $productId => $qty) { + $this->addProduct($productId, $qty); + } + } if (isset($data['remove'])) { foreach ($data['remove'] as $itemId => $from) { $this->removeItem($itemId, $from); @@ -921,12 +931,11 @@ public function resetShippingMethod() } /** - * Collect shipping dates for wuote shipping address + * Collect shipping data for quote shipping address */ public function collectShippingRates() { $this->getQuote()->getShippingAddress()->setCollectShippingRates(true); - $this->getQuote()->getShippingAddress()->collectShippingRates(); $this->collectRates(); return $this; } @@ -997,6 +1006,11 @@ public function importPostData($data) if (isset($data['comment'])) { $this->getQuote()->addData($data['comment']); + if (empty($data['comment']['customer_note_notify'])) { + $this->getQuote()->setCustomerNoteNotify(false); + } else { + $this->getQuote()->setCustomerNoteNotify(true); + } } if (isset($data['billing_address'])) { @@ -1018,7 +1032,6 @@ public function importPostData($data) if (isset($data['coupon']['code'])) { $this->applyCoupon($data['coupon']['code']); } - return $this; } @@ -1032,37 +1045,56 @@ public function _prepareCustomer() return $this; } - $customer = $this->getSession()->getCustomer(); - $store = $this->getSession()->getStore(); + $customer = $this->getSession()->getCustomer(); + $store = $this->getSession()->getStore(); + $billingAddress = null; + $shippingAddress = null; + + $customer->addData($this->_getData('account')); if ($customer->getId()) { - if ($customer->isInStore($store)) { - $customer->addData($this->getData('account')); - } else { - $customer->setId(null); - $customer->setStore($this->getSession()->getStore()); - $customer->addData($this->getData('account')); + if (!$customer->isInStore($store)) { + $customer->setId(null) + ->setStore($store) + ->setDefaultBilling(null) + ->setDefaultShipping(null) + ->setPassword($customer->generatePassword()); } if ($this->getBillingAddress()->getSaveInAddressBook()) { $billingAddress = $this->getBillingAddress()->exportCustomerAddress(); - if ($this->getBillingAddress()->getCustomerAddressId()) { - $billingAddress->setId($this->getBillingAddress()->getCustomerAddressId()); + $customerAddressId = $this->getBillingAddress()->getCustomerAddressId(); + if ($customerAddressId && $customer->getId()) { + $customer->getAddressItemById($customerAddressId)->addData($billingAddress->getData()); + } else { + $customer->addAddress($billingAddress); } - $customer->addAddress($billingAddress); } - if ($this->getShippingAddress()->getSaveInAddressBook()) { + if (!$this->getQuote()->isVirtual() && $this->getShippingAddress()->getSaveInAddressBook()) { $shippingAddress = $this->getShippingAddress()->exportCustomerAddress(); - if ($this->getShippingAddress()->getCustomerAddressId()) { - $shippingAddress->setId($this->getShippingAddress()->getCustomerAddressId()); + $customerAddressId = $this->getShippingAddress()->getCustomerAddressId(); + if ($customerAddressId && $customer->getId()) { + $customer->getAddressItemById($customerAddressId)->addData($shippingAddress->getData()); + } elseif ($billingAddress !== null && $this->getBillingAddress()->getCustomerAddressId() == $customerAddressId) { + $billingAddress->setIsDefaultShipping(true); + } else { + $customer->addAddress($shippingAddress); + } + } + + if (is_null($customer->getDefaultBilling()) && $billingAddress) { + $billingAddress->setIsDefaultBilling(true); + } + if (is_null($customer->getDefaultShipping())) { + if ($this->getShippingAddress()->getSameAsBilling() && $billingAddress) { + $billingAddress->setIsDefaultShipping(true); + } elseif ($shippingAddress) { + $shippingAddress->setIsDefaultShipping(true); } - $customer->addAddress($shippingAddress); } } else { $customer->addData($this->getBillingAddress()->exportCustomerAddress()->getData()) - ->addData($this->getData('account')) ->setPassword($customer->generatePassword()) - ->setWebsiteId($store->getWebsiteId()) - ->setStoreId($store->getId()) + ->setStore($store) ->setEmail($this->_getNewCustomerEmail($customer)); $customerBilling = $this->getBillingAddress()->exportCustomerAddress(); @@ -1070,16 +1102,26 @@ public function _prepareCustomer() $customer->addAddress($customerBilling); $shipping = $this->getShippingAddress(); - if (!$shipping->getSameAsBilling()) { + if (!$this->getQuote()->isVirtual() && !$shipping->getSameAsBilling()) { $customerShipping = $shipping->exportCustomerAddress(); $customerShipping->setIsDefaultShipping(true); $customer->addAddress($customerShipping); + } else { + $customerBilling->setIsDefaultShipping(true); } } $quote->setCustomer($customer); if (!$customer->getId()) { $quote->setCustomerId(true); } + + // we should not change account data for existing customer, so restore it + if ($customer->getId() && is_array($this->_getData('account'))) { + foreach($this->_getData('account') as $key => $value) { + $customer->setData($key, $customer->getOrigData($key)); + } + } + return $this; } @@ -1116,6 +1158,10 @@ public function createOrder() $this->_prepareCustomer(); $this->_prepareQuoteItems(); + if (! $quote->getCustomer()->getId() || ! $quote->getCustomer()->isInStore($this->getSession()->getStore())) { + $quote->getCustomer()->sendNewAccountEmail('registered', '', $quote->getStoreId()); + } + $service = Mage::getModel('sales/service_quote', $quote); if ($this->getSession()->getOrder()->getId()) { $oldOrder = $this->getSession()->getOrder(); @@ -1142,10 +1188,6 @@ public function createOrder() $order->save(); } - if ($quote->getCustomerId()) { - $quote->getCustomer()->sendNewAccountEmail(); - } - if ($this->getSendConfirmation()) { $order->sendNewOrderEmail(); } 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 360d65ff97..355f9935d7 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 @@ -50,4 +50,29 @@ protected function _beforeSave() $this->setValue($value); return $this; } + + /** + * Clean compiled JS/CSS when updating base url configuration settings + */ + protected function _afterSave() + { + $unsecureUrl = $this->getData('groups/unsecure/fields/base_url/value'); + $secureUrl = $this->getData('groups/secure/fields/base_url/value'); + + $oldUnsecureUrl = Mage::getConfig()->getNode( + Mage_Core_Model_Url::XML_PATH_UNSECURE_URL, + $this->getScope(), + $this->getScopeId() + ); + + $oldSecureUrl = Mage::getConfig()->getNode( + Mage_Core_Model_Url::XML_PATH_SECURE_URL, + $this->getScope(), + $this->getScopeId() + ); + + if ($unsecureUrl != $oldUnsecureUrl || $secureUrl != $oldSecureUrl) { + Mage::getModel('core/design_package')->cleanMergedJsCss(); + } + } } 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 ec3f5046c3..27a79196df 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 @@ -48,11 +48,13 @@ public function toOptionArray() protected function _createOptions(&$optionArray, $menuNode) { + $nonEscapableNbspChar = html_entity_decode(' ', ENT_NOQUOTES, 'UTF-8'); + foreach ($menuNode as $menu) { if (!empty($menu['url'])) { $optionArray[] = array( - 'label' => str_repeat(' ', ($menu['level'] * 4)) . $menu['label'], + 'label' => str_repeat($nonEscapableNbspChar, ($menu['level'] * 4)) . $menu['label'], 'value' => $menu['path'], ); @@ -65,7 +67,7 @@ protected function _createOptions(&$optionArray, $menuNode) $this->_createOptions($children, $menu['children']); $optionArray[] = array( - 'label' => str_repeat(' ', ($menu['level'] * 4)) . $menu['label'], + 'label' => str_repeat($nonEscapableNbspChar, ($menu['level'] * 4)) . $menu['label'], 'value' => $children, ); } diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Allowedmethods.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Allowedmethods.php index f5e444fbe4..64c1941cf2 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Allowedmethods.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Source/Shipping/Allowedmethods.php @@ -24,6 +24,9 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +/** + * @deprecated after 1.4.0.0-rc1 + */ class Mage_Adminhtml_Model_System_Config_Source_Shipping_Allowedmethods extends Mage_Adminhtml_Model_System_Config_Source_Shipping_Allmethods { diff --git a/app/code/core/Mage/Adminhtml/Model/System/Store.php b/app/code/core/Mage/Adminhtml/Model/System/Store.php index 63110167bc..5f4969efe4 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Store.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Store.php @@ -136,6 +136,8 @@ public function getStoreValuesForForm($empty = false, $all = false) ); } + $nonEscapableNbspChar = html_entity_decode(' ', ENT_NOQUOTES, 'UTF-8'); + foreach ($this->_websiteCollection as $website) { $websiteShow = false; foreach ($this->_groupCollection as $group) { @@ -159,13 +161,13 @@ public function getStoreValuesForForm($empty = false, $all = false) $values = array(); } $values[] = array( - 'label' => '    ' . $store->getName(), + 'label' => str_repeat($nonEscapableNbspChar, 4) . $store->getName(), 'value' => $store->getId() ); } if ($groupShow) { $options[] = array( - 'label' => '    ' . $group->getName(), + 'label' => str_repeat($nonEscapableNbspChar, 4) . $group->getName(), 'value' => $values ); } diff --git a/app/code/core/Mage/Adminhtml/controllers/Api/RoleController.php b/app/code/core/Mage/Adminhtml/controllers/Api/RoleController.php index 39b0869efb..ff5bbc6db5 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Api/RoleController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Api/RoleController.php @@ -37,7 +37,7 @@ class Mage_Adminhtml_Api_RoleController extends Mage_Adminhtml_Controller_Action protected function _initAction() { $this->loadLayout(); - $this->_setActiveMenu('api/roles'); + $this->_setActiveMenu('system/services/roles'); $this->_addBreadcrumb($this->__('Web services'), $this->__('Web services')); $this->_addBreadcrumb($this->__('Permissions'), $this->__('Permissions')); $this->_addBreadcrumb($this->__('Roles'), $this->__('Roles')); @@ -46,6 +46,10 @@ protected function _initAction() public function indexAction() { + $this->_title($this->__('System')) + ->_title($this->__('Web Services')) + ->_title($this->__('Roles')); + $this->_initAction(); $this->_addContent($this->getLayout()->createBlock('adminhtml/api_roles')); @@ -64,15 +68,21 @@ public function roleGridAction() public function editRoleAction() { + $this->_title($this->__('System')) + ->_title($this->__('Web Services')) + ->_title($this->__('Roles')); + $this->_initAction(); $roleId = $this->getRequest()->getParam('rid'); if( intval($roleId) > 0 ) { $breadCrumb = $this->__('Edit Role'); $breadCrumbTitle = $this->__('Edit Role'); + $this->_title($this->__('Edit Role')); } else { $breadCrumb = $this->__('Add new Role'); $breadCrumbTitle = $this->__('Add new Role'); + $this->_title($this->__('New Role')); } $this->_addBreadcrumb($breadCrumb, $breadCrumbTitle); @@ -122,6 +132,10 @@ public function saveRoleAction() parse_str($roleUsers, $roleUsers); $roleUsers = array_keys($roleUsers); + $oldRoleUsers = $this->getRequest()->getParam('in_role_user_old'); + parse_str($oldRoleUsers, $oldRoleUsers); + $oldRoleUsers = array_keys($oldRoleUsers); + $isAll = $this->getRequest()->getParam('all'); if ($isAll) { $resource = array("all"); @@ -139,17 +153,14 @@ public function saveRoleAction() ->setResources($resource) ->saveRel(); - $oldRoleUsers = Mage::getModel("api/roles")->setId($role->getId())->getRoleUsers($role); - if ( sizeof($oldRoleUsers) > 0 ) { - foreach($oldRoleUsers as $oUid) { - $this->_deleteUserFromRole($oUid, $role->getId()); - } + foreach($oldRoleUsers as $oUid) { + $this->_deleteUserFromRole($oUid, $role->getId()); } - if ( $roleUsers ) { - foreach ($roleUsers as $nRuid) { - $this->_addUserToRole($nRuid, $role->getId()); - } + + foreach ($roleUsers as $nRuid) { + $this->_addUserToRole($nRuid, $role->getId()); } + $rid = $role->getId(); Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Role successfully saved.')); } catch (Exception $e) { diff --git a/app/code/core/Mage/Adminhtml/controllers/Api/UserController.php b/app/code/core/Mage/Adminhtml/controllers/Api/UserController.php index ebfa6a9485..3ee7ad4233 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Api/UserController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Api/UserController.php @@ -29,7 +29,7 @@ class Mage_Adminhtml_Api_UserController extends Mage_Adminhtml_Controller_Action protected function _initAction() { $this->loadLayout() - ->_setActiveMenu('api/users') + ->_setActiveMenu('system/services/users') ->_addBreadcrumb($this->__('Web Services'), $this->__('Web Services')) ->_addBreadcrumb($this->__('Permissions'), $this->__('Permissions')) ->_addBreadcrumb($this->__('Users'), $this->__('Users')) @@ -39,6 +39,10 @@ protected function _initAction() public function indexAction() { + $this->_title($this->__('System')) + ->_title($this->__('Web Services')) + ->_title($this->__('Users')); + $this->_initAction() ->_addContent($this->getLayout()->createBlock('adminhtml/api_user')) ->renderLayout(); @@ -51,6 +55,10 @@ public function newAction() public function editAction() { + $this->_title($this->__('System')) + ->_title($this->__('Web Services')) + ->_title($this->__('Users')); + $id = $this->getRequest()->getParam('user_id'); $model = Mage::getModel('api/user'); @@ -62,6 +70,9 @@ public function editAction() return; } } + + $this->_title($model->getId() ? $model->getName() : $this->__('New User')); + // Restore previously entered form data from session $data = Mage::getSingleton('adminhtml/session')->getUserData(true); if (!empty($data)) { diff --git a/app/code/core/Mage/Adminhtml/controllers/CacheController.php b/app/code/core/Mage/Adminhtml/controllers/CacheController.php index e8a2d4b5b4..764761af9a 100644 --- a/app/code/core/Mage/Adminhtml/controllers/CacheController.php +++ b/app/code/core/Mage/Adminhtml/controllers/CacheController.php @@ -41,6 +41,8 @@ protected function _getSession() */ public function indexAction() { + $this->_title($this->__('System'))->_title($this->__('Cache Management')); + $this->loadLayout() ->_setActiveMenu('system/cache') ->renderLayout(); diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php index 7f2abc74cf..1d31886fc1 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/CategoryController.php @@ -42,6 +42,10 @@ class Mage_Adminhtml_Catalog_CategoryController extends Mage_Adminhtml_Controlle */ protected function _initCategory($getRootInstead = false) { + $this->_title($this->__('Catalog')) + ->_title($this->__('Categories')) + ->_title($this->__('Manage Categories')); + $categoryId = (int) $this->getRequest()->getParam('id',false); $storeId = (int) $this->getRequest()->getParam('store'); $category = Mage::getModel('catalog/category'); @@ -85,6 +89,7 @@ public function indexAction() */ public function addAction() { + Mage::getSingleton('admin/session')->unsActiveTabId(); $this->_forward('edit'); } @@ -133,6 +138,9 @@ public function editAction() if (!($category = $this->_initCategory(true))) { return; } + + $this->_title($categoryId ? $category->getName() : $this->__('New Category')); + /** * Check if we have data in session (if duering category save was exceprion) */ 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 3842ddfc97..29cfa30fea 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 @@ -142,7 +142,7 @@ public function saveAction() )); $this->_getSession()->addNotice( - $this->__('Please refresh "Catalog Rewrites" and "Layered Navigation Indices" in System -> Cache Management', $this->getUrl('adminhtml/system_cache')) + $this->__('Please refresh "Catalog Url Rewrites" and "Product Attributes" in System -> Index Management', $this->getUrl('adminhtml/process/list')) ); } 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 b11c690ef7..1a289f350e 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/AttributeController.php @@ -45,6 +45,10 @@ public function preDispatch() protected function _initAction() { + $this->_title($this->__('Catalog')) + ->_title($this->__('Attributes')) + ->_title($this->__('Manage Attributes')); + if($this->getRequest()->getParam('popup')) { $this->loadLayout('popup'); } else { @@ -100,11 +104,14 @@ public function editAction() Mage::register('entity_attribute', $model); - $this->_initAction() - ->_addBreadcrumb($id ? Mage::helper('catalog')->__('Edit Product Attribute') : Mage::helper('catalog')->__('New Product Attribute'), $id ? Mage::helper('catalog')->__('Edit Product Attribute') : Mage::helper('catalog')->__('New Product Attribute')) - ->_addContent($this->getLayout()->createBlock('adminhtml/catalog_product_attribute_edit')->setData('action', $this->getUrl('*/catalog_product_attribute/save'))) - ->_addLeft($this->getLayout()->createBlock('adminhtml/catalog_product_attribute_edit_tabs')) - ->_addJs( + $this->_initAction(); + + $this->_title($id ? $model->getName() : $this->__('New Attribute')); + + $this->_addBreadcrumb($id ? Mage::helper('catalog')->__('Edit Product Attribute') : Mage::helper('catalog')->__('New Product Attribute'), $id ? Mage::helper('catalog')->__('Edit Product Attribute') : Mage::helper('catalog')->__('New Product Attribute')) + ->_addContent($this->getLayout()->createBlock('adminhtml/catalog_product_attribute_edit')->setData('action', $this->getUrl('*/catalog_product_attribute/save'))) + ->_addLeft($this->getLayout()->createBlock('adminhtml/catalog_product_attribute_edit_tabs')) + ->_addJs( $this->getLayout()->createBlock('adminhtml/template') ->setIsPopup((bool)$this->getRequest()->getParam('popup')) ->setTemplate('catalog/product/attribute/js.phtml') @@ -143,6 +150,12 @@ public function saveAction() $model->load($id); + if (!$model->getId()) { + Mage::getSingleton('adminhtml/session')->addError(Mage::helper('catalog')->__('This Attribute no longer exists')); + $this->_redirect('*/*/'); + return; + } + // entity type check if ($model->getEntityTypeId() != $this->_entityTypeId) { Mage::getSingleton('adminhtml/session')->addError(Mage::helper('catalog')->__('You cannot update this attribute')); 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 6f274b6393..9ff7b37e1c 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GalleryController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/GalleryController.php @@ -39,6 +39,7 @@ public function uploadAction() try { $uploader = new Varien_File_Uploader('image'); $uploader->setAllowedExtensions(array('jpg','jpeg','gif','png')); + $uploader->addValidateCallback('catalog_product_image', Mage::helper('catalog/image'), 'validateUploadFile'); $uploader->setAllowRenameFiles(true); $uploader->setFilesDispersion(true); $result = $uploader->save( 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 2bdd28e827..8b50d32a34 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/ReviewController.php @@ -43,6 +43,12 @@ class Mage_Adminhtml_Catalog_Product_ReviewController extends Mage_Adminhtml_Con public function indexAction() { + $this->_title($this->__('Catalog')) + ->_title($this->__('Reviews and Ratings')) + ->_title($this->__('Customer Reviews')); + + $this->_title($this->__('All Reviews')); + if ($this->getRequest()->getParam('ajax')) { return $this->_forward('reviewGrid'); } @@ -57,6 +63,12 @@ public function indexAction() public function pendingAction() { + $this->_title($this->__('Catalog')) + ->_title($this->__('Reviews and Ratings')) + ->_title($this->__('Customer Reviews')); + + $this->_title($this->__('Pending Reviews')); + if ($this->getRequest()->getParam('ajax')) { Mage::register('usePendingFilter', true); return $this->_forward('reviewGrid'); @@ -73,6 +85,12 @@ public function pendingAction() public function editAction() { + $this->_title($this->__('Catalog')) + ->_title($this->__('Reviews and Ratings')) + ->_title($this->__('Customer Reviews')); + + $this->_title($this->__('Edit Review')); + $this->loadLayout(); $this->_setActiveMenu('catalog/review'); @@ -83,6 +101,12 @@ public function editAction() public function newAction() { + $this->_title($this->__('Catalog')) + ->_title($this->__('Reviews and Ratings')) + ->_title($this->__('Customer Reviews')); + + $this->_title($this->__('New Review')); + $this->loadLayout(); $this->_setActiveMenu('catalog/review'); @@ -128,7 +152,7 @@ public function saveAction() $review->aggregate(); - Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('catalog')->__('Review was deleted successfully')); + Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('catalog')->__('Review has been successfully saved')); } catch (Exception $e){ Mage::getSingleton('adminhtml/session')->addError($e->getMessage()); } 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 65ff069173..909ec2171d 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/Product/SetController.php @@ -36,6 +36,10 @@ class Mage_Adminhtml_Catalog_Product_SetController extends Mage_Adminhtml_Contro { public function indexAction() { + $this->_title($this->__('Catalog')) + ->_title($this->__('Attributes')) + ->_title($this->__('Manage Attribute Sets')); + $this->_setTypeId(); $this->loadLayout(); @@ -52,6 +56,10 @@ public function indexAction() public function editAction() { + $this->_title($this->__('Catalog')) + ->_title($this->__('Attributes')) + ->_title($this->__('Manage Attribute Sets')); + $this->_setTypeId(); $attributeSet = Mage::getModel('eav/entity_attribute_set') ->load($this->getRequest()->getParam('id')); @@ -61,6 +69,8 @@ public function editAction() return; } + $this->_title($attributeSet->getId() ? $attributeSet->getAttributeSetName() : $this->__('New Set')); + Mage::register('current_attribute_set', $attributeSet); $this->loadLayout(); @@ -150,6 +160,11 @@ public function saveAction() public function addAction() { + $this->_title($this->__('Catalog')) + ->_title($this->__('Attributes')) + ->_title($this->__('Manage Attribute Sets')) + ->_title($this->__('New Set')); + $this->_setTypeId(); $this->loadLayout(); diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php index cac44a7dae..e57c9df8fa 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/ProductController.php @@ -53,6 +53,9 @@ protected function _construct() */ protected function _initProduct() { + $this->_title($this->__('Catalog')) + ->_title($this->__('Manage Products')); + $productId = (int) $this->getRequest()->getParam('id'); $product = Mage::getModel('catalog/product') ->setStoreId($this->getRequest()->getParam('store', 0)); @@ -159,6 +162,9 @@ protected function _outputBlocks() */ public function indexAction() { + $this->_title($this->__('Catalog')) + ->_title($this->__('Manage Products')); + $this->loadLayout(); $this->_setActiveMenu('catalog/products'); $this->renderLayout(); @@ -171,6 +177,8 @@ public function newAction() { $product = $this->_initProduct(); + $this->_title($this->__('New Product')); + Mage::dispatchEvent('catalog_product_new_action', array('product' => $product)); if ($this->getRequest()->getParam('popup')) { @@ -199,7 +207,17 @@ public function newAction() */ public function editAction() { + $productId = (int) $this->getRequest()->getParam('id'); $product = $this->_initProduct(); + + if ($productId && !$product->getId()) { + $this->_getSession()->addError(Mage::helper('catalog')->__('This Product no longer exists')); + $this->_redirect('*/*/'); + return; + } + + $this->_title(sprintf('#%s', $product->getName() ? $product->getName() : $product->getSku())); + Mage::dispatchEvent('catalog_product_edit_action', array('product' => $product)); $_additionalLayoutPart = ''; diff --git a/app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php b/app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php index f6260bec24..af44197499 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Catalog/SearchController.php @@ -38,6 +38,8 @@ protected function _initAction() public function indexAction() { + $this->_title($this->__('Catalog'))->_title($this->__('Search Terms')); + $this->_initAction() ->_addBreadcrumb(Mage::helper('catalog')->__('Catalog'), Mage::helper('catalog')->__('Catalog')) ->_addContent($this->getLayout()->createBlock('adminhtml/catalog_search')) @@ -51,6 +53,8 @@ public function newAction() public function editAction() { + $this->_title($this->__('Catalog'))->_title($this->__('Search Terms')); + $id = $this->getRequest()->getParam('id'); $model = Mage::getModel('catalogsearch/query'); @@ -76,6 +80,8 @@ public function editAction() $this->_initAction(); + $this->_title($id ? $model->getQueryText() : $this->__('New Search')); + $this->getLayout()->getBlock('head')->setCanLoadRulesJs(true); $this diff --git a/app/code/core/Mage/Adminhtml/controllers/Checkout/AgreementController.php b/app/code/core/Mage/Adminhtml/controllers/Checkout/AgreementController.php index 313a20a58d..925bcb7549 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Checkout/AgreementController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Checkout/AgreementController.php @@ -35,6 +35,8 @@ class Mage_Adminhtml_Checkout_AgreementController extends Mage_Adminhtml_Control { public function indexAction() { + $this->_title($this->__('Sales'))->_title($this->__('Terms and Conditions')); + $this->_initAction() ->_addContent($this->getLayout()->createBlock('adminhtml/checkout_agreement')) ->renderLayout(); @@ -48,6 +50,8 @@ public function newAction() public function editAction() { + $this->_title($this->__('Sales'))->_title($this->__('Terms and Conditions')); + $id = $this->getRequest()->getParam('id'); $agreementModel = Mage::getModel('checkout/agreement'); $hlp = Mage::helper('checkout'); @@ -60,6 +64,8 @@ public function editAction() } } + $this->_title($agreementModel->getId() ? $agreementModel->getName() : $this->__('New Condition')); + $data = Mage::getSingleton('adminhtml/session')->getAgreementData(true); if (!empty($data)) { $agreementModel->setData($data); diff --git a/app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php b/app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php index fbfe81c5ae..ccf36c596b 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Cms/BlockController.php @@ -55,6 +55,8 @@ protected function _initAction() */ public function indexAction() { + $this->_title($this->__('CMS'))->_title($this->__('Static Blocks')); + $this->_initAction(); $this->renderLayout(); } @@ -73,6 +75,8 @@ public function newAction() */ public function editAction() { + $this->_title($this->__('CMS'))->_title($this->__('Static Blocks')); + // 1. Get ID and create model $id = $this->getRequest()->getParam('block_id'); $model = Mage::getModel('cms/block'); @@ -87,6 +91,8 @@ public function editAction() } } + $this->_title($model->getId() ? $model->getTitle() : $this->__('New Block')); + // 3. Set entered data if was error when we do save $data = Mage::getSingleton('adminhtml/session')->getFormData(true); if (! empty($data)) { diff --git a/app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php b/app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php index 465d3974e9..8faadfa848 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Cms/PageController.php @@ -56,6 +56,10 @@ protected function _initAction() */ public function indexAction() { + $this->_title($this->__('CMS')) + ->_title($this->__('Pages')) + ->_title($this->__('Manage Content')); + $this->_initAction(); $this->renderLayout(); } @@ -74,6 +78,10 @@ public function newAction() */ public function editAction() { + $this->_title($this->__('CMS')) + ->_title($this->__('Pages')) + ->_title($this->__('Manage Content')); + // 1. Get ID and create model $id = $this->getRequest()->getParam('page_id'); $model = Mage::getModel('cms/page'); @@ -88,6 +96,8 @@ public function editAction() } } + $this->_title($model->getId() ? $model->getTitle() : $this->__('New Page')); + // 3. Set entered data if was error when we do save $data = Mage::getSingleton('adminhtml/session')->getFormData(true); if (! empty($data)) { diff --git a/app/code/core/Mage/Adminhtml/controllers/Customer/GroupController.php b/app/code/core/Mage/Adminhtml/controllers/Customer/GroupController.php index 1c03e6f83c..5779680e5d 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Customer/GroupController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Customer/GroupController.php @@ -35,6 +35,8 @@ class Mage_Adminhtml_Customer_GroupController extends Mage_Adminhtml_Controller_ { protected function _initGroup() { + $this->_title($this->__('Customers'))->_title($this->__('Customer Groups')); + Mage::register('current_group', Mage::getModel('customer/group')); $groupId = $this->getRequest()->getParam('id'); if (!is_null($groupId)) { @@ -47,6 +49,8 @@ protected function _initGroup() */ public function indexAction() { + $this->_title($this->__('Customers'))->_title($this->__('Customer Groups')); + $this->loadLayout(); $this->_setActiveMenu('customer/group'); $this->_addBreadcrumb(Mage::helper('customer')->__('Customers'), Mage::helper('customer')->__('Customers')); @@ -65,12 +69,16 @@ public function newAction() $this->_addBreadcrumb(Mage::helper('customer')->__('Customers'), Mage::helper('customer')->__('Customers')); $this->_addBreadcrumb(Mage::helper('customer')->__('Customer Groups'), Mage::helper('customer')->__('Customer Groups'), $this->getUrl('*/customer_group')); - if (!is_null(Mage::registry('current_group')->getId())) { + $currentGroup = Mage::registry('current_group'); + + if (!is_null($currentGroup->getId())) { $this->_addBreadcrumb(Mage::helper('customer')->__('Edit Group'), Mage::helper('customer')->__('Edit Customer Groups')); } else { $this->_addBreadcrumb(Mage::helper('customer')->__('New Group'), Mage::helper('customer')->__('New Customer Groups')); } + $this->_title($currentGroup->getId() ? $currentGroup->getCode() : $this->__('New Group')); + $this->getLayout()->getBlock('content') ->append($this->getLayout()->createBlock('adminhtml/customer_group_edit', 'group') ->setEditMode((bool)Mage::registry('current_group')->getId())); diff --git a/app/code/core/Mage/Adminhtml/controllers/Customer/OnlineController.php b/app/code/core/Mage/Adminhtml/controllers/Customer/OnlineController.php index 37e8277608..06919f12c2 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Customer/OnlineController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Customer/OnlineController.php @@ -28,6 +28,8 @@ class Mage_Adminhtml_Customer_OnlineController extends Mage_Adminhtml_Controller public function indexAction() { + $this->_title($this->__('Customers'))->_title($this->__('Online Customers')); + if($this->getRequest()->getParam('ajax')) { $this->_forward('grid'); return; diff --git a/app/code/core/Mage/Adminhtml/controllers/CustomerController.php b/app/code/core/Mage/Adminhtml/controllers/CustomerController.php index 50173792cc..ffe35e571b 100644 --- a/app/code/core/Mage/Adminhtml/controllers/CustomerController.php +++ b/app/code/core/Mage/Adminhtml/controllers/CustomerController.php @@ -36,6 +36,8 @@ class Mage_Adminhtml_CustomerController extends Mage_Adminhtml_Controller_Action protected function _initCustomer($idFieldName = 'id') { + $this->_title($this->__('Customers'))->_title($this->__('Manage Customers')); + $customerId = (int) $this->getRequest()->getParam($idFieldName); $customer = Mage::getModel('customer/customer'); @@ -52,6 +54,8 @@ protected function _initCustomer($idFieldName = 'id') */ public function indexAction() { + $this->_title($this->__('Customers'))->_title($this->__('Manage Customers')); + if ($this->getRequest()->getQuery('ajax')) { $this->_forward('grid'); return; @@ -109,6 +113,8 @@ public function editAction() } } + $this->_title($customer->getId() ? $customer->getName() : $this->__('New Customer')); + /** * Set active menu item */ @@ -151,10 +157,11 @@ public function deleteAction() public function saveAction() { if ($data = $this->getRequest()->getPost()) { + $data = $this->_filterPostData($data); $redirectBack = $this->getRequest()->getParam('back', false); $this->_initCustomer('customer_id'); + /** @var Mage_Customer_Model_Customer */ $customer = Mage::registry('current_customer'); - // Prepare customer saving data if (isset($data['account'])) { if (isset($data['account']['email'])) { @@ -162,25 +169,33 @@ public function saveAction() } $customer->addData($data['account']); } + // unset template data + if (isset($data['address']['_template_'])) { + unset($data['address']['_template_']); + } - if (isset($data['address'])) { - // unset template data - if (isset($data['address']['_template_'])) { - unset($data['address']['_template_']); - } + $modifiedAddresses = array(); + if (! empty($data['address'])) { foreach ($data['address'] as $index => $addressData) { - $address = Mage::getModel('customer/address'); - $address->setData($addressData); - - if ($addressId = (int) $index) { - $address->setId($addressId); + if (($address = $customer->getAddressItemById($index))) { + $addressId = $index; + $modifiedAddresses[] = $index; + } else { + $address = Mage::getModel('customer/address'); + $addressId = null; + $customer->addAddress($address); } - /** - * We need set post_index for detect default addresses - */ - $address->setPostIndex($index); - $customer->addAddress($address); + + $address->setData($addressData) + ->setId($addressId) + ->setPostIndex($index); // We need set post_index for detect default addresses + } + } + // not modified customer addresses mark for delete + foreach ($customer->getAddressesCollection() as $customerAddress) { + if ($customerAddress->getId() && ! in_array($customerAddress->getId(), $modifiedAddresses)) { + $customerAddress->setData('_deleted', true); } } @@ -581,4 +596,16 @@ protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('customer/manage'); } + + /** + * Filtering posted data. Converting localized data if needed + * + * @param array + * @return array + */ + protected function _filterPostData($data) + { + $data['account'] = $this->_filterDates($data['account'], array('dob')); + return $data; + } } diff --git a/app/code/core/Mage/Adminhtml/controllers/DashboardController.php b/app/code/core/Mage/Adminhtml/controllers/DashboardController.php index baf09b23d0..d211de0f91 100644 --- a/app/code/core/Mage/Adminhtml/controllers/DashboardController.php +++ b/app/code/core/Mage/Adminhtml/controllers/DashboardController.php @@ -35,6 +35,8 @@ class Mage_Adminhtml_DashboardController extends Mage_Adminhtml_Controller_Actio { public function indexAction() { + $this->_title($this->__('Dashboard')); + $this->loadLayout(); $this->_setActiveMenu('dashboard'); $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Dashboard'), Mage::helper('adminhtml')->__('Dashboard')); diff --git a/app/code/core/Mage/Adminhtml/controllers/Newsletter/ProblemController.php b/app/code/core/Mage/Adminhtml/controllers/Newsletter/ProblemController.php index 138f1be4f8..1041cb49e2 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Newsletter/ProblemController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Newsletter/ProblemController.php @@ -35,6 +35,8 @@ class Mage_Adminhtml_Newsletter_ProblemController extends Mage_Adminhtml_Control { public function indexAction() { + $this->_title($this->__('Newsletter'))->_title($this->__('Newsletter Problems')); + if ($this->getRequest()->getQuery('ajax')) { $this->_forward('grid'); return; diff --git a/app/code/core/Mage/Adminhtml/controllers/Newsletter/QueueController.php b/app/code/core/Mage/Adminhtml/controllers/Newsletter/QueueController.php index 576e908772..65077f9238 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Newsletter/QueueController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Newsletter/QueueController.php @@ -38,6 +38,8 @@ class Mage_Adminhtml_Newsletter_QueueController extends Mage_Adminhtml_Controlle */ public function indexAction() { + $this->_title($this->__('Newsletter'))->_title($this->__('Newsletter Queue')); + if ($this->getRequest()->getQuery('ajax')) { $this->_forward('grid'); return; @@ -152,16 +154,20 @@ public function sendingAction() public function editAction() { + $this->_title($this->__('Newsletter'))->_title($this->__('Newsletter Queue')); + Mage::register('current_queue', Mage::getSingleton('newsletter/queue')); $id = $this->getRequest()->getParam('id'); $templateId = $this->getRequest()->getParam('template_id'); if ($id) { - Mage::registry('current_queue')->load($id); + $queue = Mage::registry('current_queue')->load($id); } elseif ($templateId) { $template = Mage::getModel('newsletter/template')->load($templateId)->preprocess(); - Mage::registry('current_queue')->setTemplateId($template->getId()); + $queue = Mage::registry('current_queue')->setTemplateId($template->getId()); } + $this->_title($this->__('Edit Queue')); + $this->loadLayout(); $this->_setActiveMenu('newsletter/queue'); diff --git a/app/code/core/Mage/Adminhtml/controllers/Newsletter/SubscriberController.php b/app/code/core/Mage/Adminhtml/controllers/Newsletter/SubscriberController.php index 5258fda58b..dec15cab4f 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Newsletter/SubscriberController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Newsletter/SubscriberController.php @@ -36,6 +36,8 @@ class Mage_Adminhtml_Newsletter_SubscriberController extends Mage_Adminhtml_Cont public function indexAction() { + $this->_title($this->__('Newsletter'))->_title($this->__('Newsletter Subscribers')); + if ($this->getRequest()->getParam('ajax')) { $this->_forward('grid'); return; diff --git a/app/code/core/Mage/Adminhtml/controllers/Newsletter/TemplateController.php b/app/code/core/Mage/Adminhtml/controllers/Newsletter/TemplateController.php index 3517a1f5f0..315704f007 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Newsletter/TemplateController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Newsletter/TemplateController.php @@ -38,6 +38,8 @@ class Mage_Adminhtml_Newsletter_TemplateController extends Mage_Adminhtml_Contro */ public function indexAction () { + $this->_title($this->__('Newsletter'))->_title($this->__('Newsletter Templates')); + if ($this->getRequest()->getQuery('ajax')) { $this->_forward('grid'); return; @@ -76,6 +78,8 @@ public function newAction () */ public function editAction () { + $this->_title($this->__('Newsletter'))->_title($this->__('Newsletter Templates')); + $model = Mage::getModel('newsletter/template'); if ($id = $this->getRequest()->getParam('id')) { $model->load($id); @@ -95,6 +99,8 @@ public function editAction () $breadcrumbLabel = Mage::helper('newsletter')->__('Create Newsletter Template'); } + $this->_title($model->getId() ? $model->getTemplateCode() : $this->__('New Template')); + $this->_addBreadcrumb($breadcrumbLabel, $breadcrumbTitle); // restore data diff --git a/app/code/core/Mage/Adminhtml/controllers/NotificationController.php b/app/code/core/Mage/Adminhtml/controllers/NotificationController.php index d9b8907400..b224d6c688 100644 --- a/app/code/core/Mage/Adminhtml/controllers/NotificationController.php +++ b/app/code/core/Mage/Adminhtml/controllers/NotificationController.php @@ -36,6 +36,8 @@ class Mage_Adminhtml_NotificationController extends Mage_Adminhtml_Controller_Ac { public function indexAction() { + $this->_title($this->__('System'))->_title($this->__('Notifications')); + $this->loadLayout() ->_setActiveMenu('system/notification') ->_addBreadcrumb(Mage::helper('adminnotification')->__('Messages Inbox'), Mage::helper('adminhtml')->__('Messages Inbox')) diff --git a/app/code/core/Mage/Adminhtml/controllers/Permissions/RoleController.php b/app/code/core/Mage/Adminhtml/controllers/Permissions/RoleController.php index 53b645bf7a..a928e20c07 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Permissions/RoleController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Permissions/RoleController.php @@ -34,6 +34,11 @@ class Mage_Adminhtml_Permissions_RoleController extends Mage_Adminhtml_Controller_Action { + /** + * Preparing layout for output + * + * @return Mage_Adminhtml_Permissions_RoleController + */ protected function _initAction() { $this->loadLayout(); @@ -44,25 +49,56 @@ protected function _initAction() return $this; } + /** + * Initialize role model by passed parameter in request + * + * @return Mage_Admin_Model_Roles + */ protected function _initRole($requestVariable = 'rid') { - Mage::register('current_role', Mage::getModel('admin/roles')->load($this->getRequest()->getParam($requestVariable))); + $this->_title($this->__('System')) + ->_title($this->__('Permissions')) + ->_title($this->__('Roles')); + + $role = Mage::getModel('admin/roles')->load($this->getRequest()->getParam($requestVariable)); + // preventing edit of relation role + if ($role->getId() && $role->getRoleType() != 'G') { + $role->unsetData($role->getIdFieldName()); + } + + Mage::register('current_role', $role); return Mage::registry('current_role'); } + /** + * Show grid with roles existing in systems + * + */ public function indexAction() { + $this->_title($this->__('System')) + ->_title($this->__('Permissions')) + ->_title($this->__('Roles')); + $this->_initAction(); $this->renderLayout(); } + /** + * Action for ajax request from grid + * + */ public function roleGridAction() { $this->loadLayout(); $this->getResponse()->setBody($this->getLayout()->getBlock('adminhtml.permission.role.grid')->toHtml()); } + /** + * Edit role action + * + */ public function editRoleAction() { $role = $this->_initRole(); @@ -75,6 +111,9 @@ public function editRoleAction() $breadCrumb = $this->__('Add new Role'); $breadCrumbTitle = $this->__('Add new Role'); } + + $this->_title($role->getId() ? $role->getRoleName() : $this->__('New Role')); + $this->_addBreadcrumb($breadCrumb, $breadCrumbTitle); $this->getLayout()->getBlock('head')->setCanLoadExtJs(true); @@ -89,6 +128,10 @@ public function editRoleAction() $this->renderLayout(); } + /** + * Remove role action + * + */ public function deleteAction() { $rid = $this->getRequest()->getParam('rid', false); @@ -112,6 +155,10 @@ public function deleteAction() $this->_redirect("*/*/"); } + /** + * Role form submit action to save or create new role + * + */ public function saveRoleAction() { $rid = $this->getRequest()->getParam('role_id', false); @@ -120,6 +167,10 @@ public function saveRoleAction() parse_str($roleUsers, $roleUsers); $roleUsers = array_keys($roleUsers); + $oldRoleUsers = $this->getRequest()->getParam('in_role_user_old'); + parse_str($oldRoleUsers, $oldRoleUsers); + $oldRoleUsers = array_keys($oldRoleUsers); + $isAll = $this->getRequest()->getParam('all'); if ($isAll) $resource = array("all"); @@ -143,17 +194,14 @@ public function saveRoleAction() ->setResources($resource) ->saveRel(); - $oldRoleUsers = Mage::getModel("admin/roles")->setId($role->getId())->getRoleUsers($role); - if ( sizeof($oldRoleUsers) > 0 ) { - foreach($oldRoleUsers as $oUid) { - $this->_deleteUserFromRole($oUid, $role->getId()); - } + foreach($oldRoleUsers as $oUid) { + $this->_deleteUserFromRole($oUid, $role->getId()); } - if ( $roleUsers ) { - foreach ($roleUsers as $nRuid) { - $this->_addUserToRole($nRuid, $role->getId()); - } + + foreach ($roleUsers as $nRuid) { + $this->_addUserToRole($nRuid, $role->getId()); } + $rid = $role->getId(); Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Role successfully saved.')); } catch (Mage_Core_Exception $e) { @@ -167,11 +215,22 @@ public function saveRoleAction() return; } + /** + * Action for ajax request from assigned users grid + * + */ public function editrolegridAction() { $this->getResponse()->setBody($this->getLayout()->createBlock('adminhtml/permissions_role_grid_user')->toHtml()); } + /** + * Remove user from role + * + * @param int $userId + * @param int $roleId + * @return bool + */ protected function _deleteUserFromRole($userId, $roleId) { try { @@ -186,6 +245,13 @@ protected function _deleteUserFromRole($userId, $roleId) return true; } + /** + * Assign user to role + * + * @param int $userId + * @param int $roleId + * @return bool + */ protected function _addUserToRole($userId, $roleId) { $user = Mage::getModel("admin/user")->load($userId); @@ -199,6 +265,11 @@ protected function _addUserToRole($userId, $roleId) } } + /** + * Acl checking + * + * @return bool + */ protected function _isAllowed() { return Mage::getSingleton('admin/session')->isAllowed('system/acl/roles'); diff --git a/app/code/core/Mage/Adminhtml/controllers/Permissions/UserController.php b/app/code/core/Mage/Adminhtml/controllers/Permissions/UserController.php index 5ef953386a..aa3561163d 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Permissions/UserController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Permissions/UserController.php @@ -39,6 +39,10 @@ protected function _initAction() public function indexAction() { + $this->_title($this->__('System')) + ->_title($this->__('Permissions')) + ->_title($this->__('Users')); + $this->_initAction() ->_addContent($this->getLayout()->createBlock('adminhtml/permissions_user')) ->renderLayout(); @@ -51,6 +55,10 @@ public function newAction() public function editAction() { + $this->_title($this->__('System')) + ->_title($this->__('Permissions')) + ->_title($this->__('Users')); + $id = $this->getRequest()->getParam('user_id'); $model = Mage::getModel('admin/user'); @@ -62,6 +70,9 @@ public function editAction() return; } } + + $this->_title($model->getId() ? $model->getName() : $this->__('New User')); + // Restore previously entered form data from session $data = Mage::getSingleton('adminhtml/session')->getUserData(true); if (!empty($data)) { diff --git a/app/code/core/Mage/Adminhtml/controllers/PollController.php b/app/code/core/Mage/Adminhtml/controllers/PollController.php index 5e3b4b9fd3..d163ae4aa5 100644 --- a/app/code/core/Mage/Adminhtml/controllers/PollController.php +++ b/app/code/core/Mage/Adminhtml/controllers/PollController.php @@ -36,6 +36,8 @@ class Mage_Adminhtml_PollController extends Mage_Adminhtml_Controller_Action public function indexAction() { + $this->_title($this->__('CMS'))->_title($this->__('Polls')); + $this->loadLayout(); $this->_setActiveMenu('cms/poll'); $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Poll Manager'), Mage::helper('adminhtml')->__('Poll Manager')); @@ -46,10 +48,13 @@ public function indexAction() public function editAction() { + $this->_title($this->__('CMS'))->_title($this->__('Polls')); + $pollId = $this->getRequest()->getParam('id'); $pollModel = Mage::getModel('poll/poll')->load($pollId); if ($pollModel->getId() || $pollId == 0) { + $this->_title($pollModel->getId() ? $pollModel->getPollTitle() : $this->__('New Poll')); Mage::register('poll_data', $pollModel); diff --git a/app/code/core/Mage/Adminhtml/controllers/Promo/CatalogController.php b/app/code/core/Mage/Adminhtml/controllers/Promo/CatalogController.php index f32c21594f..66bde880f5 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Promo/CatalogController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Promo/CatalogController.php @@ -37,6 +37,8 @@ protected function _initAction() public function indexAction() { + $this->_title($this->__('Promotions'))->_title($this->__('Catalog Price Rules')); + if (Mage::app()->loadCache('catalog_rules_dirty')) { Mage::getSingleton('adminhtml/session')->addNotice(Mage::helper('catalogrule')->__('There are rules that have been changed but not applied. Please, click Apply Rules in order to see immediate effect in catalog.')); } @@ -53,6 +55,8 @@ public function newAction() public function editAction() { + $this->_title($this->__('Promotions'))->_title($this->__('Catalog Price Rules')); + $id = $this->getRequest()->getParam('id'); $model = Mage::getModel('catalogrule/rule'); @@ -65,6 +69,8 @@ public function editAction() } } + $this->_title($model->getRuleId() ? $model->getName() : $this->__('New Rule')); + // set entered data if was error when we do save $data = Mage::getSingleton('adminhtml/session')->getPageData(true); if (!empty($data)) { diff --git a/app/code/core/Mage/Adminhtml/controllers/Promo/QuoteController.php b/app/code/core/Mage/Adminhtml/controllers/Promo/QuoteController.php index f63622f566..95a53be802 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Promo/QuoteController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Promo/QuoteController.php @@ -29,6 +29,8 @@ class Mage_Adminhtml_Promo_QuoteController extends Mage_Adminhtml_Controller_Act { protected function _initRule() { + $this->_title($this->__('Promotions'))->_title($this->__('Shopping Cart Price Rules')); + Mage::register('current_promo_quote_rule', Mage::getModel('salesrule/rule')); if ($id = (int) $this->getRequest()->getParam('id')) { Mage::registry('current_promo_quote_rule') @@ -47,6 +49,8 @@ protected function _initAction() public function indexAction() { + $this->_title($this->__('Promotions'))->_title($this->__('Shopping Cart Price Rules')); + $this->_initAction() ->_addBreadcrumb(Mage::helper('salesrule')->__('Catalog'), Mage::helper('salesrule')->__('Catalog')) ->renderLayout(); @@ -71,6 +75,8 @@ public function editAction() } } + $this->_title($model->getRuleId() ? $model->getName() : $this->__('New Rule')); + // set entered data if was error when we do save $data = Mage::getSingleton('adminhtml/session')->getPageData(true); if (!empty($data)) { diff --git a/app/code/core/Mage/Adminhtml/controllers/RatingController.php b/app/code/core/Mage/Adminhtml/controllers/RatingController.php index 550df66f08..10accf8515 100644 --- a/app/code/core/Mage/Adminhtml/controllers/RatingController.php +++ b/app/code/core/Mage/Adminhtml/controllers/RatingController.php @@ -51,6 +51,13 @@ public function editAction() $this->_initEnityId(); $this->loadLayout(); + $ratingModel = Mage::getModel('rating/rating'); + if ($this->getRequest()->getParam('id')) { + $ratingModel->load($this->getRequest()->getParam('id')); + } + + $this->_title($ratingModel->getId() ? $ratingModel->getRatingCode() : $this->__('New Rating')); + $this->_setActiveMenu('catalog/ratings'); $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Manage Ratings'), Mage::helper('adminhtml')->__('Manage Ratings')); @@ -135,6 +142,10 @@ public function deleteAction() protected function _initEnityId() { + $this->_title($this->__('Catalog')) + ->_title($this->__('Reviews and Ratings')) + ->_title($this->__('Manage Ratings')); + Mage::register('entityId', Mage::getModel('rating/rating_entity')->getIdByCode('product')); } diff --git a/app/code/core/Mage/Adminhtml/controllers/Report/CustomerController.php b/app/code/core/Mage/Adminhtml/controllers/Report/CustomerController.php index 086bac51e9..bb8dd543c9 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Report/CustomerController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Report/CustomerController.php @@ -48,6 +48,10 @@ public function _initAction() public function accountsAction() { + $this->_title($this->__('Reports')) + ->_title($this->__('Customers')) + ->_title($this->__('New Accounts')); + $this->_initAction() ->_setActiveMenu('report/customer/accounts') ->_addBreadcrumb(Mage::helper('adminhtml')->__('New Accounts'), Mage::helper('adminhtml')->__('New Accounts')) @@ -81,6 +85,10 @@ public function exportAccountsExcelAction() public function ordersAction() { + $this->_title($this->__('Reports')) + ->_title($this->__('Customers')) + ->_title($this->__('Customers by Number of Orders')); + $this->_initAction() ->_setActiveMenu('report/customer/orders') ->_addBreadcrumb(Mage::helper('reports')->__('Customers by number of orders'), @@ -115,6 +123,10 @@ public function exportOrdersExcelAction() public function totalsAction() { + $this->_title($this->__('Reports')) + ->_title($this->__('Customers')) + ->_title($this->__('Customers By Orders Total')); + $this->_initAction() ->_setActiveMenu('report/customer/totals') ->_addBreadcrumb(Mage::helper('reports')->__('Customers by orders total'), diff --git a/app/code/core/Mage/Adminhtml/controllers/Report/ProductController.php b/app/code/core/Mage/Adminhtml/controllers/Report/ProductController.php index d2fcc40b6b..5000a162a9 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Report/ProductController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Report/ProductController.php @@ -56,6 +56,10 @@ public function _initAction() */ public function orderedAction() { + $this->_title($this->__('Reports')) + ->_title($this->__('Products')) + ->_title($this->__('Bestsellers')); + $this->_initAction() ->_setActiveMenu('report/product/ordered') ->_addBreadcrumb(Mage::helper('reports')->__('Bestsellers'), Mage::helper('reports')->__('Bestsellers')) @@ -95,6 +99,10 @@ public function exportOrderedExcelAction() */ public function soldAction() { + $this->_title($this->__('Reports')) + ->_title($this->__('Products')) + ->_title($this->__('Products Ordered')); + $this->_initAction() ->_setActiveMenu('report/product/sold') ->_addBreadcrumb(Mage::helper('reports')->__('Products Ordered'), Mage::helper('reports')->__('Products Ordered')) @@ -136,6 +144,10 @@ public function exportSoldExcelAction() */ public function viewedAction() { + $this->_title($this->__('Reports')) + ->_title($this->__('Products')) + ->_title($this->__('Most Viewed')); + $this->_initAction() ->_setActiveMenu('report/product/viewed') ->_addBreadcrumb(Mage::helper('reports')->__('Most viewed'), Mage::helper('reports')->__('Most viewed')) @@ -175,6 +187,10 @@ public function exportViewedExcelAction() */ public function lowstockAction() { + $this->_title($this->__('Reports')) + ->_title($this->__('Products')) + ->_title($this->__('Low Stock')); + $this->_initAction() ->_setActiveMenu('report/product/lowstock') ->_addBreadcrumb(Mage::helper('reports')->__('Low stock'), Mage::helper('reports')->__('Low stock')) @@ -216,6 +232,10 @@ public function exportLowstockExcelAction() */ public function downloadsAction() { + $this->_title($this->__('Reports')) + ->_title($this->__('Products')) + ->_title($this->__('Downloads')); + $this->_initAction() ->_setActiveMenu('report/product/downloads') ->_addBreadcrumb(Mage::helper('reports')->__('Downloads'), Mage::helper('reports')->__('Downloads')) diff --git a/app/code/core/Mage/Adminhtml/controllers/Report/ReviewController.php b/app/code/core/Mage/Adminhtml/controllers/Report/ReviewController.php index 7e2aac77ff..1d16a3097b 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Report/ReviewController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Report/ReviewController.php @@ -47,6 +47,10 @@ public function _initAction() public function customerAction() { + $this->_title($this->__('Reports')) + ->_title($this->__('Reviews')) + ->_title($this->__('Customer Reviews')); + $this->_initAction() ->_setActiveMenu('report/review/customer') ->_addBreadcrumb(Mage::helper('reports')->__('Customers Report'), Mage::helper('reports')->__('Customers Report')) @@ -80,6 +84,10 @@ public function exportCustomerExcelAction() public function productAction() { + $this->_title($this->__('Reports')) + ->_title($this->__('Reviews')) + ->_title($this->__('Product Reviews')); + $this->_initAction() ->_setActiveMenu('report/review/product') ->_addBreadcrumb(Mage::helper('reports')->__('Products Report'), Mage::helper('reports')->__('Products Report')) @@ -113,6 +121,11 @@ public function exportProductExcelAction() public function productDetailAction() { + $this->_title($this->__('Reports')) + ->_title($this->__('Reviews')) + ->_title($this->__('Product Reviews')) + ->_title($this->__('Details')); + $this->_initAction() ->_setActiveMenu('report/review/productDetail') ->_addBreadcrumb(Mage::helper('reports')->__('Products Report'), Mage::helper('reports')->__('Products Report')) diff --git a/app/code/core/Mage/Adminhtml/controllers/Report/SalesController.php b/app/code/core/Mage/Adminhtml/controllers/Report/SalesController.php index 1a4cf8f98e..a99a0846dc 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Report/SalesController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Report/SalesController.php @@ -63,6 +63,7 @@ public function _initReportAction($blocks) foreach ($blocks as $block) { if ($block) { + $block->setPeriodType($params->getData('period_type')); $block->setFilterData($params); } } @@ -72,6 +73,8 @@ public function _initReportAction($blocks) public function salesAction() { + $this->_title($this->__('Reports'))->_title($this->__('Sales'))->_title($this->__('Sales')); + $this->_showLastExecutionTime(Mage_Reports_Model_Flag::REPORT_ORDER_FLAG_CODE, 'sales'); $this->_initAction() @@ -122,13 +125,15 @@ protected function _showLastExecutionTime($flagCode, $refreshCode) { $flag = Mage::getModel('reports/flag')->setReportFlagCode($flagCode)->loadSelf(); $updatedAt = ($flag->hasData()) - ? Mage::app()->getLocale()->storeDate(0, $flag->getLastUpdate(), true) + ? 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('adminhtml/session')->addNotice(Mage::helper('adminhtml')->__('This Report is not realtime. Last updated: %s. To refresh statistics right now, click here', $updatedAt, $refreshStatsLink, $directRefreshLink)); + Mage::getSingleton('adminhtml/session')->addNotice(Mage::helper('adminhtml')->__('Last updated: %s. To refresh last day\'s statistics, click here', $updatedAt, $refreshStatsLink, $directRefreshLink)); return $this; } @@ -195,6 +200,8 @@ public function exportSalesExcelAction() public function taxAction() { + $this->_title($this->__('Reports'))->_title($this->__('Sales'))->_title($this->__('Tax')); + $this->_showLastExecutionTime(Mage_Reports_Model_Flag::REPORT_TAX_FLAG_CODE, 'tax'); $this->_initAction() @@ -236,6 +243,8 @@ public function exportTaxExcelAction() public function shippingAction() { + $this->_title($this->__('Reports'))->_title($this->__('Sales'))->_title($this->__('Shipping')); + $this->_showLastExecutionTime(Mage_Reports_Model_Flag::REPORT_SHIPPING_FLAG_CODE, 'shipping'); $this->_initAction() @@ -277,6 +286,8 @@ public function exportShippingExcelAction() public function invoicedAction() { + $this->_title($this->__('Reports'))->_title($this->__('Sales'))->_title($this->__('Total Invoiced')); + $this->_showLastExecutionTime(Mage_Reports_Model_Flag::REPORT_INVOICE_FLAG_CODE, 'invoiced'); $this->_initAction() @@ -318,6 +329,8 @@ public function exportInvoicedExcelAction() public function refundedAction() { + $this->_title($this->__('Reports'))->_title($this->__('Sales'))->_title($this->__('Total Refunded')); + $this->_showLastExecutionTime(Mage_Reports_Model_Flag::REPORT_REFUNDED_FLAG_CODE, 'refunded'); $this->_initAction() @@ -359,6 +372,8 @@ public function exportRefundedExcelAction() public function couponsAction() { + $this->_title($this->__('Reports'))->_title($this->__('Sales'))->_title($this->__('Coupons')); + $this->_showLastExecutionTime(Mage_Reports_Model_Flag::REPORT_COUPNS_FLAG_CODE, 'coupons'); $this->_initAction() @@ -400,6 +415,8 @@ public function exportCouponsExcelAction() public function refreshStatisticsAction() { + $this->_title($this->__('Reports'))->_title($this->__('Sales'))->_title($this->__('Refresh Statistics')); + $this->_initAction() ->_setActiveMenu('report/sales/refreshstatistics') ->_addBreadcrumb(Mage::helper('adminhtml')->__('Refresh Statistics'), Mage::helper('adminhtml')->__('Refresh Statistics')) diff --git a/app/code/core/Mage/Adminhtml/controllers/Report/ShopcartController.php b/app/code/core/Mage/Adminhtml/controllers/Report/ShopcartController.php index 7947501bcf..263aaabba0 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Report/ShopcartController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Report/ShopcartController.php @@ -44,6 +44,10 @@ public function _initAction() public function customerAction() { + $this->_title($this->__('Reports')) + ->_title($this->__('Shopping Cart')) + ->_title($this->__('Customer Shopping Carts')); + $this->_initAction() ->_setActiveMenu('report/shopcart/customer') ->_addBreadcrumb(Mage::helper('reports')->__('Customers Report'), Mage::helper('reports')->__('Customers Report')) @@ -77,6 +81,10 @@ public function exportCustomerExcelAction() public function productAction() { + $this->_title($this->__('Reports')) + ->_title($this->__('Shopping Cart')) + ->_title($this->__('Products in Carts')); + $this->_initAction() ->_setActiveMenu('report/shopcart/product') ->_addBreadcrumb(Mage::helper('reports')->__('Products Report'), Mage::helper('reports')->__('Products Report')) @@ -110,6 +118,10 @@ public function exportProductExcelAction() public function abandonedAction() { + $this->_title($this->__('Reports')) + ->_title($this->__('Shopping Cart')) + ->_title($this->__('Abandoned Carts')); + $this->_initAction() ->_setActiveMenu('report/shopcart/abandoned') ->_addBreadcrumb(Mage::helper('reports')->__('Abandoned carts'), Mage::helper('reports')->__('Abandoned carts')) diff --git a/app/code/core/Mage/Adminhtml/controllers/Report/TagController.php b/app/code/core/Mage/Adminhtml/controllers/Report/TagController.php index 2aaf911e57..e426c2cf00 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Report/TagController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Report/TagController.php @@ -47,6 +47,10 @@ public function _initAction() public function customerAction() { + $this->_title($this->__('Reports')) + ->_title($this->__('Tags')) + ->_title($this->__('Customers')); + $this->_initAction() ->_setActiveMenu('report/tag/customer') ->_addBreadcrumb(Mage::helper('reports')->__('Customers Report'), Mage::helper('reports')->__('Customers Report')) @@ -80,6 +84,10 @@ public function exportCustomerExcelAction() public function productAction() { + $this->_title($this->__('Reports')) + ->_title($this->__('Tags')) + ->_title($this->__('Products')); + $this->_initAction() ->_setActiveMenu('report/tag/product') ->_addBreadcrumb(Mage::helper('reports')->__('Poducts Report'), Mage::helper('reports')->__('Products Report')) @@ -114,6 +122,10 @@ public function exportProductExcelAction() public function popularAction() { + $this->_title($this->__('Reports')) + ->_title($this->__('Tags')) + ->_title($this->__('Popular')); + $this->_initAction() ->_setActiveMenu('report/tag/popular') ->_addBreadcrumb(Mage::helper('reports')->__('Popular Tags'), Mage::helper('reports')->__('Popular Tags')) diff --git a/app/code/core/Mage/Adminhtml/controllers/ReportController.php b/app/code/core/Mage/Adminhtml/controllers/ReportController.php index a448fcec34..4caa55cca9 100644 --- a/app/code/core/Mage/Adminhtml/controllers/ReportController.php +++ b/app/code/core/Mage/Adminhtml/controllers/ReportController.php @@ -77,6 +77,8 @@ public function exportWishlistExcelAction() */ public function searchAction() { + $this->_title($this->__('Reports'))->_title($this->__('Search Terms')); + Mage::dispatchEvent('on_view_report', array('report' => 'search')); $this->_initAction() diff --git a/app/code/core/Mage/Adminhtml/controllers/Sales/CreditmemoController.php b/app/code/core/Mage/Adminhtml/controllers/Sales/CreditmemoController.php index e52acc6625..796f1424ca 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/CreditmemoController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/CreditmemoController.php @@ -32,4 +32,13 @@ class Mage_Adminhtml_Sales_CreditmemoController extends Mage_Adminhtml_Controller_Sales_Creditmemo { + + /** + * Index page + */ + public function indexAction() { + $this->_title($this->__('Sales'))->_title($this->__('Credit Memos')); + + parent::indexAction(); + } } 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 c32e208631..7917c3cbcd 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreateController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreateController.php @@ -251,6 +251,8 @@ protected function _processData() 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'])); + } else { + $this->_getSession()->addSuccess($this->__('Coupon code accepted.')); } } @@ -262,6 +264,7 @@ protected function _processData() */ public function indexAction() { + $this->_title($this->__('Sales'))->_title($this->__('Orders'))->_title($this->__('New Order')); $this->loadLayout(); $this->_initSession() @@ -383,18 +386,19 @@ public function saveAction() ->createOrder(); $this->_getSession()->clear(); - $url = $this->_redirect('*/sales_order/view', array('order_id' => $order->getId())); + Mage::getSingleton('adminhtml/session')->addSuccess($this->__('Order has been successfully created')); + $this->_redirect('*/sales_order/view', array('order_id' => $order->getId())); } catch (Mage_Core_Exception $e){ $message = $e->getMessage(); if( !empty($message) ) { $this->_getSession()->addError($message); } - $url = $this->_redirect('*/*/'); + $this->_redirect('*/*/'); } catch (Exception $e){ $this->_getSession()->addException($e, $this->__('Order saving error: %s', $e->getMessage())); - $url = $this->_redirect('*/*/'); + $this->_redirect('*/*/'); } } 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 8a90df7ae9..c07bc76da2 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/CreditmemoController.php @@ -72,6 +72,8 @@ protected function _canCreditmemo($order) */ protected function _initCreditmemo($update = false) { + $this->_title($this->__('Sales'))->_title($this->__('Credit Memos')); + $creditmemo = false; if ($creditmemoId = $this->getRequest()->getParam('creditmemo_id')) { $creditmemo = Mage::getModel('sales/order_creditmemo')->load($creditmemoId); @@ -235,6 +237,12 @@ protected function _saveCreditmemo($creditmemo) public function viewAction() { if ($creditmemo = $this->_initCreditmemo()) { + if ($creditmemo->getInvoice()) { + $this->_title($this->__("View Memo for #%s", $creditmemo->getInvoice()->getIncrementId())); + } else { + $this->_title($this->__("View Memo")); + } + $this->loadLayout(); $this->getLayout()->getBlock('sales_creditmemo_view') ->updateBackButtonUrl($this->getRequest()->getParam('come_from')); @@ -263,6 +271,12 @@ public function startAction() public function newAction() { if ($creditmemo = $this->_initCreditmemo()) { + if ($creditmemo->getInvoice()) { + $this->_title($this->__("New Memo for #%s", $creditmemo->getInvoice()->getIncrementId())); + } else { + $this->_title($this->__("New Memo")); + } + $commentText = Mage::getSingleton('adminhtml/session')->getCommentText(true); $creditmemo->addData(array('commentText'=>$commentText)); @@ -322,8 +336,10 @@ public function saveAction() $comment = ''; if (!empty($data['comment_text'])) { - $comment = $data['comment_text']; $creditmemo->addComment($data['comment_text'], isset($data['comment_customer_notify'])); + if (isset($data['comment_customer_notify'])) { + $comment = $data['comment_text']; + } } if (isset($data['do_refund'])) { 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 94bab48589..c1ee81f6eb 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/EditController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/EditController.php @@ -61,4 +61,17 @@ public function startAction() $this->_redirect('*/sales_order/'); } } + + /** + * Index page + */ + public function indexAction() + { + $this->_title($this->__('Sales'))->_title($this->__('Orders'))->_title($this->__('Edit Order')); + $this->loadLayout(); + + $this->_initSession() + ->_setActiveMenu('sales/order') + ->renderLayout(); + } } 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 3db7965021..b22465e792 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/InvoiceController.php @@ -56,6 +56,8 @@ protected function _getItemQtys() */ protected function _initInvoice($update = false) { + $this->_title($this->__('Sales'))->_title($this->__('Invoices')); + $invoice = false; $itemsToInvoice = 0; @@ -226,6 +228,8 @@ protected function _prepareShipment($invoice) public function viewAction() { if ($invoice = $this->_initInvoice()) { + $this->_title(sprintf("#%s", $invoice->getIncrementId())); + $this->loadLayout() ->_setActiveMenu('sales/order'); $this->getLayout()->getBlock('sales_invoice_view') @@ -255,6 +259,7 @@ public function startAction() public function newAction() { if ($invoice = $this->_initInvoice()) { + $this->_title($this->__('New Invoice')); $this->loadLayout() ->_setActiveMenu('sales/order') ->renderLayout(); 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 9375011d57..d5b8662751 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/Order/ShipmentController.php @@ -52,6 +52,8 @@ protected function _getItemQtys() */ protected function _initShipment() { + $this->_title($this->__('Sales'))->_title($this->__('Shipments')); + $shipment = false; if ($shipmentId = $this->getRequest()->getParam('shipment_id')) { $shipment = Mage::getModel('sales/order_shipment')->load($shipmentId); @@ -142,6 +144,8 @@ protected function _saveShipment($shipment) public function viewAction() { if ($shipment = $this->_initShipment()) { + $this->_title($this->__('View Shipment')); + $this->loadLayout(); $this->getLayout()->getBlock('sales_shipment_view') ->updateBackButtonUrl($this->getRequest()->getParam('come_from')); @@ -170,6 +174,8 @@ public function startAction() public function newAction() { if ($shipment = $this->_initShipment()) { + $this->_title($this->__('New Shipment')); + $this->loadLayout() ->_setActiveMenu('sales/order') ->renderLayout(); @@ -194,7 +200,9 @@ public function saveAction() $comment = ''; if (!empty($data['comment_text'])) { $shipment->addComment($data['comment_text'], isset($data['comment_customer_notify'])); - $comment = $data['comment_text']; + if (isset($data['comment_customer_notify'])) { + $comment = $data['comment_text']; + } } if (!empty($data['send_email'])) { diff --git a/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php b/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php index c3775cc852..25c85e1504 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Sales/OrderController.php @@ -89,6 +89,8 @@ protected function _initOrder() */ public function indexAction() { + $this->_title($this->__('Sales'))->_title($this->__('Orders')); + $this->_initAction() ->_addContent($this->getLayout()->createBlock('adminhtml/sales_order')) ->renderLayout(); @@ -110,9 +112,14 @@ public function gridAction() */ public function viewAction() { + $this->_title($this->__('Sales'))->_title($this->__('Orders')); + if ($order = $this->_initOrder()) { - $this->_initAction() - ->renderLayout(); + $this->_initAction(); + + $this->_title(sprintf("#%s", $order->getRealOrderId())); + + $this->renderLayout(); } } @@ -293,19 +300,26 @@ public function massCancelAction() { $orderIds = $this->getRequest()->getPost('order_ids', array()); $countCancelOrder = 0; + $countNonCancelOrder = 0; foreach ($orderIds as $orderId) { $order = Mage::getModel('sales/order')->load($orderId); if ($order->canCancel()) { $order->cancel() ->save(); $countCancelOrder++; + } else { + $countNonCancelOrder++; } } - if ($countCancelOrder>0) { - $this->_getSession()->addSuccess($this->__('%s order(s) successfully canceled', $countCancelOrder)); + if ($countNonCancelOrder) { + if ($countCancelOrder) { + $this->_getSession()->addError($this->__('%s order(s) can not be canceled', $countNonCancelOrder)); + } else { + $this->_getSession()->addError($this->__('Order(s) can not be canceled')); + } } - else { - // selected orders is not available for cancel + if ($countCancelOrder) { + $this->_getSession()->addSuccess($this->__('%s order(s) successfully canceled', $countCancelOrder)); } $this->_redirect('*/*/'); } @@ -317,20 +331,28 @@ public function massHoldAction() { $orderIds = $this->getRequest()->getPost('order_ids', array()); $countHoldOrder = 0; + $countNonHoldOrder = 0; foreach ($orderIds as $orderId) { $order = Mage::getModel('sales/order')->load($orderId); if ($order->canHold()) { $order->hold() ->save(); $countHoldOrder++; + } else { + $countNonHoldOrder++; } } - if ($countHoldOrder>0) { - $this->_getSession()->addSuccess($this->__('%s order(s) successfully put on hold', $countHoldOrder)); + if ($countNonHoldOrder) { + if ($countHoldOrder) { + $this->_getSession()->addError($this->__('%s order(s) not put on hold', $countNonHoldOrder)); + } else { + $this->_getSession()->addError($this->__('No order(s) put on hold')); + } } - else { - // selected orders is not available for hold + if ($countHoldOrder) { + $this->_getSession()->addSuccess($this->__('%s order(s) successfully put on hold', $countHoldOrder)); } + $this->_redirect('*/*/'); } @@ -341,19 +363,27 @@ public function massUnholdAction() { $orderIds = $this->getRequest()->getPost('order_ids', array()); $countUnholdOrder = 0; + $countNonUnholdOrder = 0; + foreach ($orderIds as $orderId) { $order = Mage::getModel('sales/order')->load($orderId); if ($order->canUnhold()) { $order->unhold() ->save(); $countUnholdOrder++; + } else { + $countNonUnholdOrder++; } } - if ($countUnholdOrder>0) { - $this->_getSession()->addSuccess($this->__('%s order(s) successfully released from holding status', $countUnholdOrder)); + if ($countNonUnholdOrder) { + if ($countUnholdOrder) { + $this->_getSession()->addError($this->__('%s order(s) not released from holding status', $countNonUnholdOrder)); + } else { + $this->_getSession()->addError($this->__('No order(s) released from holding status')); + } } - else { - // selected orders is not available for hold + if ($countUnholdOrder) { + $this->_getSession()->addSuccess($this->__('%s order(s) successfully released from holding status', $countUnholdOrder)); } $this->_redirect('*/*/'); } diff --git a/app/code/core/Mage/Adminhtml/controllers/SitemapController.php b/app/code/core/Mage/Adminhtml/controllers/SitemapController.php index dfbfbd4348..e81c562a65 100644 --- a/app/code/core/Mage/Adminhtml/controllers/SitemapController.php +++ b/app/code/core/Mage/Adminhtml/controllers/SitemapController.php @@ -54,6 +54,8 @@ protected function _initAction() */ public function indexAction() { + $this->_title($this->__('Catalog'))->_title($this->__('Google Sitemaps')); + $this->_initAction() ->_addContent($this->getLayout()->createBlock('adminhtml/sitemap')) ->renderLayout(); @@ -73,6 +75,8 @@ public function newAction() */ public function editAction() { + $this->_title($this->__('Catalog'))->_title($this->__('Google Sitemaps')); + // 1. Get ID and create model $id = $this->getRequest()->getParam('sitemap_id'); $model = Mage::getModel('sitemap/sitemap'); @@ -87,6 +91,8 @@ public function editAction() } } + $this->_title($model->getId() ? $model->getSitemapFilename() : $this->__('New Sitemap')); + // 3. Set entered data if was error when we do save $data = Mage::getSingleton('adminhtml/session')->getFormData(true); if (! empty($data)) { diff --git a/app/code/core/Mage/Paybox/Block/Adminhtml/Cart/Type/Select.php b/app/code/core/Mage/Adminhtml/controllers/SurveyController.php similarity index 62% rename from app/code/core/Mage/Paybox/Block/Adminhtml/Cart/Type/Select.php rename to app/code/core/Mage/Adminhtml/controllers/SurveyController.php index 922240e9da..4d4147eb9c 100644 --- a/app/code/core/Mage/Paybox/Block/Adminhtml/Cart/Type/Select.php +++ b/app/code/core/Mage/Adminhtml/controllers/SurveyController.php @@ -19,38 +19,40 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Paybox + * @package Mage_Adminhtml * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** - * Paybox Adminhtml Cart Type select + * Adminhtml Survey Action * * @category Mage - * @package Mage_Paybox + * @package Mage_Adminhtml * @author Magento Core Team */ -class Mage_Paybox_Block_Adminhtml_Cart_Type_Select extends Mage_Adminhtml_Block_Template +class Mage_Adminhtml_SurveyController extends Mage_Adminhtml_Controller_Action { /** - * Enter description here... + * Index Action * - * @return Mage_Paybox_Model_System */ - public function getModel() - { - return Mage::getModel('paybox/system'); - } - - public function getParentHtmlId() + public function indexAction() { - return substr($this->getDependHtmlId(), 0, strrpos($this->getDependHtmlId(), 'typecarte')) . 'typepaiement'; + if ($this->getRequest()->getParam('isAjax', false)) { + Mage_AdminNotification_Model_Survey::saveSurveyViewed(true); + } + $this->getResponse()->setBody(Zend_Json::encode(array('survey_decision_saved' => 1))); } - public function getJsonCartTypes() + /** + * Check if user has enough privileges + * + * @return boolean + */ + protected function _isAllowed() { - return $this->getModel()->getJsonCartTypes(); + return Mage::getSingleton('admin/session')->isAllowed('all'); } - } diff --git a/app/code/core/Mage/Adminhtml/controllers/System/AccountController.php b/app/code/core/Mage/Adminhtml/controllers/System/AccountController.php index 62bb8d8b36..dfe92f54f2 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/AccountController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/AccountController.php @@ -36,6 +36,8 @@ class Mage_Adminhtml_System_AccountController extends Mage_Adminhtml_Controller_ { public function indexAction() { + $this->_title($this->__('System'))->_title($this->__('My Account')); + $this->loadLayout(); $this->_setActiveMenu('system/account'); $this->_addContent($this->getLayout()->createBlock('adminhtml/system_account_edit')); diff --git a/app/code/core/Mage/Adminhtml/controllers/System/BackupController.php b/app/code/core/Mage/Adminhtml/controllers/System/BackupController.php index 34691d837c..8c1d6d8714 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/BackupController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/BackupController.php @@ -38,6 +38,8 @@ class Mage_Adminhtml_System_BackupController extends Mage_Adminhtml_Controller_A */ public function indexAction() { + $this->_title($this->__('System'))->_title($this->__('Tools'))->_title($this->__('Backups')); + if($this->getRequest()->getParam('ajax')) { $this->_forward('grid'); return; diff --git a/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php b/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php index c1e2991972..078295c86d 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/ConfigController.php @@ -30,21 +30,10 @@ * * @category Mage * @package Mage_Adminhtml - * @author Magento Core Team + * @author Magento Core Team */ class Mage_Adminhtml_System_ConfigController extends Mage_Adminhtml_Controller_Action { - - /** - * Enter description here... - * - */ - protected function _construct() - { - $this->setFlag('index', 'no-preDispatch', true); - return parent::_construct(); - } - /** * Enter description here... * @@ -60,6 +49,8 @@ public function indexAction() */ public function editAction() { + $this->_title($this->__('System'))->_title($this->__('Configuration')); + $current = $this->getRequest()->getParam('section'); $website = $this->getRequest()->getParam('website'); $store = $this->getRequest()->getParam('store'); 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 1332bebd01..e85a454e16 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/Convert/GuiController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/Convert/GuiController.php @@ -40,6 +40,10 @@ class Mage_Adminhtml_System_Convert_GuiController extends Mage_Adminhtml_System_ */ public function indexAction() { + $this->_title($this->__('System')) + ->_title($this->__('Import and Export')) + ->_title($this->__('Profiles')); + if ($this->getRequest()->getQuery('ajax')) { $this->_forward('grid'); return; @@ -89,6 +93,8 @@ public function editAction() $profile->addData($data); } + $this->_title($profile->getId() ? $profile->getName() : $this->__('New Profile')); + $this->_setActiveMenu('system/convert'); 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 f36fde5f1c..05d1724a54 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/Convert/ProfileController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/Convert/ProfileController.php @@ -36,6 +36,10 @@ class Mage_Adminhtml_System_Convert_ProfileController extends Mage_Adminhtml_Con protected function _initProfile($idFieldName = 'id') { + $this->_title($this->__('System')) + ->_title($this->__('Import and Export')) + ->_title($this->__('Profiles')); + $profileId = (int) $this->getRequest()->getParam($idFieldName); $profile = Mage::getModel('dataflow/profile'); @@ -58,6 +62,10 @@ protected function _initProfile($idFieldName = 'id') */ public function indexAction() { + $this->_title($this->__('System')) + ->_title($this->__('Import and Export')) + ->_title($this->__('Advanced Profiles')); + if ($this->getRequest()->getQuery('ajax')) { $this->_forward('grid'); return; @@ -107,6 +115,8 @@ public function editAction() $profile->addData($data); } + $this->_title($profile->getId() ? $profile->getName() : $this->__('New Profile')); + $this->_setActiveMenu('system/convert'); $this->_addContent( @@ -241,8 +251,8 @@ public function batchRunAction() continue; } - $importData = $batchImportModel->getBatchData(); try { + $importData = $batchImportModel->getBatchData(); $adapter->saveRow($importData); } catch (Exception $e) { diff --git a/app/code/core/Mage/Adminhtml/controllers/System/CurrencyController.php b/app/code/core/Mage/Adminhtml/controllers/System/CurrencyController.php index dbfed97941..2b7153506e 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/CurrencyController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/CurrencyController.php @@ -53,6 +53,8 @@ protected function _initCurrency() */ public function indexAction() { + $this->_title($this->__('System'))->_title($this->__('Manage Currency Rates')); + $this->loadLayout(); $this->_setActiveMenu('system/currency'); $this->_addContent($this->getLayout()->createBlock('adminhtml/system_currency')); diff --git a/app/code/core/Mage/Adminhtml/controllers/System/DesignController.php b/app/code/core/Mage/Adminhtml/controllers/System/DesignController.php index 7267a9c2ca..c4e746b550 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/DesignController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/DesignController.php @@ -29,6 +29,8 @@ class Mage_Adminhtml_System_DesignController extends Mage_Adminhtml_Controller_A { public function indexAction() { + $this->_title($this->__('System'))->_title($this->__('Design')); + $this->loadLayout(); $this->_setActiveMenu('system'); $this->_addContent($this->getLayout()->createBlock('adminhtml/system_design')); @@ -47,6 +49,8 @@ public function newAction() public function editAction() { + $this->_title($this->__('System'))->_title($this->__('Design')); + $this->loadLayout(); $this->_setActiveMenu('system'); $this->getLayout()->getBlock('head')->setCanLoadExtJs(true); @@ -58,6 +62,8 @@ public function editAction() $design->load($id); } + $this->_title($design->getId() ? $this->__('Edit Design Change') : $this->__('New Design Change')); + Mage::register('design', $design); $this->_addContent($this->getLayout()->createBlock('adminhtml/system_design_edit')); 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 c1cac2697c..25b3ef39cc 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/Email/TemplateController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/Email/TemplateController.php @@ -35,6 +35,8 @@ class Mage_Adminhtml_System_Email_TemplateController extends Mage_Adminhtml_Cont { public function indexAction() { + $this->_title($this->__('System'))->_title($this->__('Transactional Emails')); + if ($this->getRequest()->getQuery('ajax')) { $this->_forward('grid'); return; @@ -80,6 +82,8 @@ public function editAction() $this->_addBreadcrumb(Mage::helper('adminhtml')->__('New Template'), Mage::helper('adminhtml')->__('New System Template')); } + $this->_title($template->getId() ? $template->getTemplateCode() : $this->__('New Template')); + $this->_addContent($this->getLayout()->createBlock('adminhtml/system_email_template_edit', 'template_edit') ->setEditMode((bool)$this->getRequest()->getParam('id'))); $this->renderLayout(); @@ -198,6 +202,8 @@ public function defaultTemplateAction() */ protected function _initTemplate($idFieldName = 'template_id') { + $this->_title($this->__('System'))->_title($this->__('Transactional Emails')); + $id = (int)$this->getRequest()->getParam($idFieldName); $model = Mage::getModel('adminhtml/email_template'); if ($id) { diff --git a/app/code/core/Mage/Adminhtml/controllers/System/StoreController.php b/app/code/core/Mage/Adminhtml/controllers/System/StoreController.php index 53332d3a5e..b22356f461 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/StoreController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/StoreController.php @@ -52,6 +52,8 @@ protected function _initAction() public function indexAction() { + $this->_title($this->__('System'))->_title($this->__('Stores')); + $this->_initAction() ->_addContent($this->getLayout()->createBlock('adminhtml/system_store_store')) ->renderLayout(); @@ -92,6 +94,9 @@ public function editGroupAction() public function editStoreAction() { + $this->_title($this->__('System')) + ->_title($this->__('Stores')); + $session = $this->_getSession(); if ($session->getPostData()) { Mage::register('store_post_data', $session->getPostData()); @@ -107,18 +112,21 @@ public function editStoreAction() case 'website': $itemId = $this->getRequest()->getParam('website_id', null); $model = Mage::getModel('core/website'); + $title = Mage::helper('core')->__("Website"); $notExists = Mage::helper('core')->__("Website doesn't exist"); $codeBase = Mage::helper('core')->__('Before modifying the website code please make sure that it is not used in index.php'); break; case 'group': $itemId = $this->getRequest()->getParam('group_id', null); $model = Mage::getModel('core/store_group'); + $title = Mage::helper('core')->__("Store"); $notExists = Mage::helper('core')->__("Store doesn't exist"); $codeBase = false; break; case 'store': $itemId = $this->getRequest()->getParam('store_id', null); $model = Mage::getModel('core/store'); + $title = Mage::helper('core')->__("Store View"); $notExists = Mage::helper('core')->__("Store view doesn't exist"); $codeBase = Mage::helper('core')->__('Before modifying the store view code please make sure that it is not used in index.php'); break; @@ -130,6 +138,13 @@ public function editStoreAction() if ($model->getId() || Mage::registry('store_action') == 'add') { Mage::register('store_data', $model); + if (Mage::registry('store_action') == 'add') { + $this->_title($this->__('New ') . $title); + } + else { + $this->_title($model->getName()); + } + if (Mage::registry('store_action') == 'edit' && $codeBase && !$model->isReadOnly()) { $this->_getSession()->addNotice($codeBase); } diff --git a/app/code/core/Mage/Adminhtml/controllers/System/VariableController.php b/app/code/core/Mage/Adminhtml/controllers/System/VariableController.php index 0afc5cca91..5a013354c6 100644 --- a/app/code/core/Mage/Adminhtml/controllers/System/VariableController.php +++ b/app/code/core/Mage/Adminhtml/controllers/System/VariableController.php @@ -53,6 +53,8 @@ protected function _initLayout() */ protected function _initVariable() { + $this->_title($this->__('System'))->_title($this->__('Custom Variables')); + $variableId = $this->getRequest()->getParam('variable_id', null); $storeId = $this->getRequest()->getParam('store', 0); /* @var $emailVariable Mage_Core_Model_Variable */ @@ -71,6 +73,8 @@ protected function _initVariable() */ public function indexAction() { + $this->_title($this->__('System'))->_title($this->__('Custom Variables')); + $this->_initLayout() ->_addContent($this->getLayout()->createBlock('adminhtml/system_variable')) ->renderLayout(); @@ -91,7 +95,10 @@ public function newAction() */ public function editAction() { - $this->_initVariable(); + $variable = $this->_initVariable(); + + $this->_title($variable->getId() ? $variable->getCode() : $this->__('New Variable')); + $this->_initLayout() ->_addContent($this->getLayout()->createBlock('adminhtml/system_variable_edit')) ->_addJs($this->getLayout()->createBlock('core/template', '', array('template' => 'system/variable/js.phtml'))) diff --git a/app/code/core/Mage/Adminhtml/controllers/TagController.php b/app/code/core/Mage/Adminhtml/controllers/TagController.php index b7841a3c0a..09ef665e18 100644 --- a/app/code/core/Mage/Adminhtml/controllers/TagController.php +++ b/app/code/core/Mage/Adminhtml/controllers/TagController.php @@ -74,6 +74,10 @@ protected function _initTag() */ public function indexAction() { + $this->_title($this->__('Catalog')) + ->_title($this->__('Tags')) + ->_title($this->__('All Tags')); + $this->_initAction() ->_addBreadcrumb(Mage::helper('adminhtml')->__('All Tags'), Mage::helper('adminhtml')->__('All Tags')) ->_setActiveMenu('catalog/tag/all') @@ -116,6 +120,9 @@ public function newAction() */ public function editAction() { + $this->_title($this->__('Catalog')) + ->_title($this->__('Tags')); + if (! (int) $this->getRequest()->getParam('store')) { return $this->_redirect('*/*/*/', array('store' => Mage::app()->getAnyStoreView()->getId(), '_current' => true)); } @@ -133,6 +140,8 @@ public function editAction() $model->addData($data); } + $this->_title($model->getId() ? $model->getName() : $this->__('New Tag')); + Mage::register('tag_tag', $model); $this->_initAction()->renderLayout(); @@ -219,6 +228,10 @@ public function deleteAction() */ public function pendingAction() { + $this->_title($this->__('Catalog')) + ->_title($this->__('Tags')) + ->_title($this->__('Pending Tags')); + $this->_initAction() ->_addBreadcrumb(Mage::helper('adminhtml')->__('Pending Tags'), Mage::helper('adminhtml')->__('Pending Tags')) ->_setActiveMenu('catalog/tag/pending') @@ -232,6 +245,8 @@ public function pendingAction() */ public function assignedAction() { + $this->_title($this->__('Tags'))->_title($this->__('Assigned')); + $this->_initTag(); $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 29e8aea8a3..bffcf5abe8 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Tax/Class/CustomerController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Tax/Class/CustomerController.php @@ -40,6 +40,10 @@ class Mage_Adminhtml_Tax_Class_CustomerController extends Mage_Adminhtml_Control */ public function indexAction() { + $this->_title($this->__('Sales')) + ->_title($this->__('Tax')) + ->_title($this->__('Customer Tax Classes')); + $this->_initAction() ->_addContent($this->getLayout()->createBlock('adminhtml/tax_class')->setClassType('CUSTOMER')) ->renderLayout(); @@ -60,6 +64,10 @@ public function newAction() */ public function editAction() { + $this->_title($this->__('Sales')) + ->_title($this->__('Tax')) + ->_title($this->__('Customer Tax Classes')); + $classId = $this->getRequest()->getParam('id'); $model = Mage::getModel('tax/class'); if ($classId) { @@ -71,6 +79,8 @@ public function editAction() } } + $this->_title($model->getId() ? $model->getClassName() : $this->__('New Class')); + $data = Mage::getSingleton('adminhtml/session')->getClassData(true); if (!empty($data)) { $model->setData($data); 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 3129c0fc05..2d65635e4c 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Tax/Class/ProductController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Tax/Class/ProductController.php @@ -39,6 +39,10 @@ class Mage_Adminhtml_Tax_Class_ProductController extends Mage_Adminhtml_Controll */ public function indexAction() { + $this->_title($this->__('Sales')) + ->_title($this->__('Tax')) + ->_title($this->__('Customer Tax Classes')); + $this->_initAction() ->_addContent($this->getLayout()->createBlock('adminhtml/tax_class')->setClassType('PRODUCT')) ->renderLayout(); @@ -59,6 +63,10 @@ public function newAction() */ public function editAction() { + $this->_title($this->__('Sales')) + ->_title($this->__('Tax')) + ->_title($this->__('Customer Tax Classes')); + $classId = $this->getRequest()->getParam('id'); $model = Mage::getModel('tax/class'); if ($classId) { @@ -70,6 +78,8 @@ public function editAction() } } + $this->_title($model->getId() ? $model->getClassName() : $this->__('New Class')); + $data = Mage::getSingleton('adminhtml/session')->getClassData(true); if (!empty($data)) { $model->setData($data); diff --git a/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php b/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php index 8b6862912d..c899f9d2b3 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Tax/RateController.php @@ -40,6 +40,10 @@ class Mage_Adminhtml_Tax_RateController extends Mage_Adminhtml_Controller_Action */ public function indexAction() { + $this->_title($this->__('Sales')) + ->_title($this->__('Tax')) + ->_title($this->__('Manage Tax Zones and Rates')); + $this->_initAction() ->_addBreadcrumb(Mage::helper('tax')->__('Manage Tax Rates'), Mage::helper('tax')->__('Manage Tax Rates')) ->_addContent( @@ -59,6 +63,16 @@ public function addAction() { $rateModel = Mage::getSingleton('tax/calculation_rate') ->load(null); + + $this->_title($this->__('Sales')) + ->_title($this->__('Tax')) + ->_title($this->__('Manage Tax Zones and Rates')); + + $this->_title($this->__('New Rate')); + + //This line substitutes in the form the previously entered by the user values, if any of them were wrong. + $rateModel->setData(Mage::getSingleton('adminhtml/session')->getFormData(true)); + $this->_initAction() ->_addBreadcrumb(Mage::helper('tax')->__('Manage Tax Rates'), Mage::helper('tax')->__('Manage Tax Rates'), $this->getUrl('*/tax_rate')) ->_addBreadcrumb(Mage::helper('tax')->__('New Tax Rate'), Mage::helper('tax')->__('New Tax Rate')) @@ -80,7 +94,7 @@ public function saveAction() $ratePost = $this->getRequest()->getPost(); if ($ratePost) { - $rateId = $this->getRequest()->getParam('rate'); + $rateId = $this->getRequest()->getParam('tax_calculation_rate_id'); if ($rateId) { $rateModel = Mage::getSingleton('tax/calculation_rate')->load($rateId); if (!$rateModel->getId()) { @@ -98,6 +112,8 @@ public function saveAction() return true; } catch (Mage_Core_Exception $e) { + //save entered by the user values in session, for re-rendering of form. + Mage::getSingleton('adminhtml/session')->setFormData($ratePost); Mage::getSingleton('adminhtml/session')->addError($e->getMessage()); } catch (Exception $e) { @@ -117,6 +133,10 @@ public function saveAction() */ public function editAction() { + $this->_title($this->__('Sales')) + ->_title($this->__('Tax')) + ->_title($this->__('Manage Tax Zones and Rates')); + $rateId = (int)$this->getRequest()->getParam('rate'); $rateModel = Mage::getSingleton('tax/calculation_rate')->load($rateId); if (!$rateModel->getId()) { @@ -124,6 +144,8 @@ public function editAction() return ; } + $this->_title(sprintf("%s", $rateModel->getCode())); + $this->_initAction() ->_addBreadcrumb(Mage::helper('tax')->__('Manage Tax Rates'), Mage::helper('tax')->__('Manage Tax Rates'), $this->getUrl('*/tax_rate')) ->_addBreadcrumb(Mage::helper('tax')->__('Edit Tax Rate'), Mage::helper('tax')->__('Edit Tax Rate')) @@ -216,6 +238,12 @@ protected function _initAction() */ public function importExportAction() { + $this->_title($this->__('Sales')) + ->_title($this->__('Tax')) + ->_title($this->__('Manage Tax Zones and Rates')); + + $this->_title($this->__('Import and Export Tax Rates')); + $this->loadLayout() ->_setActiveMenu('sales/tax_importExport') ->_addContent($this->getLayout()->createBlock('adminhtml/tax_rate_importExport')) diff --git a/app/code/core/Mage/Adminhtml/controllers/Tax/RuleController.php b/app/code/core/Mage/Adminhtml/controllers/Tax/RuleController.php index 6fec735a5c..ef1b8a73ad 100644 --- a/app/code/core/Mage/Adminhtml/controllers/Tax/RuleController.php +++ b/app/code/core/Mage/Adminhtml/controllers/Tax/RuleController.php @@ -35,6 +35,10 @@ class Mage_Adminhtml_Tax_RuleController extends Mage_Adminhtml_Controller_Action { public function indexAction() { + $this->_title($this->__('Sales')) + ->_title($this->__('Tax')) + ->_title($this->__('Manage Tax Rules')); + $this->_initAction() ->_addContent($this->getLayout()->createBlock('adminhtml/tax_rule')) ->renderLayout(); @@ -48,6 +52,10 @@ public function newAction() public function editAction() { + $this->_title($this->__('Sales')) + ->_title($this->__('Tax')) + ->_title($this->__('Manage Tax Rules')); + $taxRuleId = $this->getRequest()->getParam('rule'); $ruleModel = Mage::getModel('tax/calculation_rule'); if ($taxRuleId) { @@ -65,6 +73,8 @@ public function editAction() $ruleModel->setData($data); } + $this->_title($ruleModel->getId() ? sprintf("%s", $ruleModel->getCode()) : $this->__('New Rule')); + Mage::register('tax_rule', $ruleModel); $this->_initAction() diff --git a/app/code/core/Mage/Adminhtml/controllers/UrlrewriteController.php b/app/code/core/Mage/Adminhtml/controllers/UrlrewriteController.php index 0c51f26a1c..31cc531b36 100644 --- a/app/code/core/Mage/Adminhtml/controllers/UrlrewriteController.php +++ b/app/code/core/Mage/Adminhtml/controllers/UrlrewriteController.php @@ -40,6 +40,8 @@ class Mage_Adminhtml_UrlrewriteController extends Mage_Adminhtml_Controller_Acti */ protected function _initRegistry() { + $this->_title($this->__('Rewrite Rules')); + // initialize urlrewrite, product and category models Mage::register('current_urlrewrite', Mage::getModel('core/url_rewrite') ->load($this->getRequest()->getParam('id', 0)) @@ -79,6 +81,9 @@ public function indexAction() public function editAction() { $this->_initRegistry(); + + $this->_title($this->__('URL Rewrite')); + $this->loadLayout(); $this->_setActiveMenu('catalog/urlrewrite'); $this->_addContent($this->getLayout()->createBlock('adminhtml/urlrewrite_edit')); diff --git a/app/code/core/Mage/Adminhtml/etc/config.xml b/app/code/core/Mage/Adminhtml/etc/config.xml index 3e470bf756..ee783d350b 100644 --- a/app/code/core/Mage/Adminhtml/etc/config.xml +++ b/app/code/core/Mage/Adminhtml/etc/config.xml @@ -95,6 +95,14 @@ + + + + admin/observer + actionPostDispatchAdmin + + + diff --git a/app/code/core/Mage/AmazonPayments/Block/Adminhtml/Shipping/Methods.php b/app/code/core/Mage/AmazonPayments/Block/Adminhtml/Shipping/Methods.php deleted file mode 100644 index ed4e07e994..0000000000 --- a/app/code/core/Mage/AmazonPayments/Block/Adminhtml/Shipping/Methods.php +++ /dev/null @@ -1,103 +0,0 @@ -setElement($element); - - $html = ''; - - return $html; - } - - protected function getShippingMethods() - { - if (!$this->hasData('shipping_methods')) { - $website = $this->getRequest()->getParam('website'); - $store = $this->getRequest()->getParam('store'); - - $storeId = null; - if (!is_null($website)) { - $storeId = Mage::getModel('core/website')->load($website, 'code')->getDefaultGroup()->getDefaultStoreId(); - } elseif (!is_null($store)) { - $storeId = Mage::getModel('core/store')->load($store, 'code')->getId(); - } - - $methods = array(); - $carriers = Mage::getSingleton('shipping/config')->getActiveCarriers($storeId); - foreach ($carriers as $carrierCode=>$carrierModel) { - if (!$carrierModel->isActive()) { - continue; - } - $carrierMethods = $carrierModel->getAllowedMethods(); - if (!$carrierMethods) { - continue; - } - $carrierTitle = Mage::getStoreConfig('carriers/'.$carrierCode.'/title', $storeId); - $methods[$carrierCode] = array( - 'title' => $carrierTitle, - 'methods' => array(), - ); - foreach ($carrierMethods as $methodCode=>$methodTitle) { - $methods[$carrierCode]['methods'][$methodCode] = array( - 'title' => '['.$carrierCode.'] '.$methodTitle, - ); - } - } - $this->setData('shipping_methods', $methods); - } - return $this->getData('shipping_methods'); - } - - protected function _getDisabled() - { - return $this->getElement()->getDisabled() ? ' disabled' : ''; - } - - protected function _getValue($key) - { - return $this->getElement()->getData('value/'.$key); - } - - protected function _getSelected($value) - { - return $this->getElement()->getData('value/method') == $value ? 'selected="selected"' : ''; - } -} diff --git a/app/code/core/Mage/AmazonPayments/Block/Cba/Form.php b/app/code/core/Mage/AmazonPayments/Block/Cba/Form.php deleted file mode 100644 index b91b59c262..0000000000 --- a/app/code/core/Mage/AmazonPayments/Block/Cba/Form.php +++ /dev/null @@ -1,46 +0,0 @@ - - */ -class Mage_AmazonPayments_Block_Cba_Form extends Mage_Payment_Block_Form -{ - - /** - * Varien constructor - */ - protected function _construct() - { - $this->setTemplate('amazonpayments/cba/form.phtml'); - parent::_construct(); - } - -} diff --git a/app/code/core/Mage/AmazonPayments/Block/Cba/Redirect.php b/app/code/core/Mage/AmazonPayments/Block/Cba/Redirect.php deleted file mode 100644 index 4f4e1ca4b9..0000000000 --- a/app/code/core/Mage/AmazonPayments/Block/Cba/Redirect.php +++ /dev/null @@ -1,69 +0,0 @@ - - */ -class Mage_AmazonPayments_Block_Cba_Redirect extends Mage_Core_Block_Abstract -{ - /** - * Shopping cart form to CBA in case XML-based cart - * - * @return string - */ - protected function _toHtml() - { - $cba = Mage::getModel('amazonpayments/payment_cba'); - /* @var $cba Mage_AmazonPayments_Model_Payment_Cba */ - - $form = new Varien_Data_Form(); - $form->setAction($cba->getAmazonRedirectUrl()) - ->setId('amazonpayments_cba') - ->setName('amazonpayments_cba') - ->setMethod('POST') - ->setUseContainer(true); - - $formFields = $cba->getCheckoutXmlFormFields(); - $values = ''; - $i = 1; - foreach ($formFields as $field=>$value) { - $form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value)); - $values .= ($i++ > 1) ? '&' : ''; - $values .= "{$field}={$value}"; - } - $html = ''; - $html.= $this->__('You will be redirected to Checkout by Amazon in a few seconds.'); - $html.= $form->toHtml(); - $html.= ''; - $html.= ''; - - return $html; - } -} diff --git a/app/code/core/Mage/AmazonPayments/Block/Form.php b/app/code/core/Mage/AmazonPayments/Block/Form.php deleted file mode 100644 index f09711c64f..0000000000 --- a/app/code/core/Mage/AmazonPayments/Block/Form.php +++ /dev/null @@ -1,46 +0,0 @@ - - */ -class Mage_AmazonPayments_Block_Form extends Mage_Payment_Block_Form -{ - - /** - * Varien constructor - */ - protected function _construct() - { - $this->setTemplate('amazonpayments/form.phtml'); - parent::_construct(); - } - -} diff --git a/app/code/core/Mage/AmazonPayments/Block/Link/Shortcut.php b/app/code/core/Mage/AmazonPayments/Block/Link/Shortcut.php deleted file mode 100644 index 49f3244a5d..0000000000 --- a/app/code/core/Mage/AmazonPayments/Block/Link/Shortcut.php +++ /dev/null @@ -1,90 +0,0 @@ - - */ -class Mage_AmazonPayments_Block_Link_Shortcut extends Mage_Core_Block_Template -{ - public function getCheckoutUrl() - { - #return $this->getUrl('amazonpayments/cba', array('_secure'=>true)); - return $this->getUrl('amazonpayments/cba/shortcut'); - } - - public function getImageUrl() - { - return Mage::getStoreConfig('payment/amazonpayments_cba/button_url'); - #return 'http://g-ecx.images-amazon.com/images/G/01/cba/images/buttons/btn_Chkout-orange-large.gif'; - } - - public function _toHtml() - { - if (Mage::getStoreConfigFlag('payment/amazonpayments_cba/active') - && Mage::getSingleton('checkout/session')->getQuote()->validateMinimumAmount()) { - return parent::_toHtml(); - } - - return ''; - } - - public function getCbaOneClickJsUrl() - { - if (Mage::getStoreConfigFlag('payment/amazonpayments_cba/sandbox_flag')) { - $url = 'https://images-na.ssl-images-amazon.com/images/G/01/cba/js/widget/sandbox/widget.js'; - } else { - $url = 'https://images-na.ssl-images-amazon.com/images/G/01/cba/js/widget/widget.js'; - } - return $url; - } - - public function getCbaStylesheetUrl() - { - $url = 'https://images-na.ssl-images-amazon.com/images/G/01/cba/styles/one-click.css'; - return $url; - } - - public function getCbaJquerySetupUrl() - { - $url = 'https://images-na.ssl-images-amazon.com/images/G/01/cba/js/jquery.js'; - return $url; - } - - /** - * Return true if 1-Click is enabled - * - * @return boolean - */ - public function getIsOneClickEnabled() - { - return Mage::getStoreConfigFlag('payment/amazonpayments_cba/use_oneclick'); - } - -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Api/Abstract.php b/app/code/core/Mage/AmazonPayments/Model/Api/Abstract.php deleted file mode 100644 index ec0ae3bcd9..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Api/Abstract.php +++ /dev/null @@ -1,157 +0,0 @@ - - */ -abstract class Mage_AmazonPayments_Model_Api_Abstract extends Varien_Object -{ - /* - * payment actions - */ - const PAYMENT_TYPE_AUTH = 'Authorization'; - const USER_ACTION_COMMIT = 'commit'; - - /* - * signature generation algorithm name - */ - protected static $HMAC_SHA1_ALGORITHM = 'sha1'; - - /* - * payment module code - */ - protected $paymentCode; - - /** - * Set payment module code - * - * @return string - */ - public function setPaymentCode($paymentCode) - { - if(is_null($this->paymentCode)) { - $this->paymentCode = $paymentCode; - $this->setData(Mage::getStoreConfig('payment/' . $paymentCode)); - } - } - - /** - * Return payment url - * - * @return string - */ - public function getPayServiceUrl() - { - if ($this->getSandboxFlag()) { - return $this->getData('sandbox_pay_service_url'); - } - return $this->getData('pay_service_url'); - } - - /** - * Get value from the payment module config - * - * @param string $kay - * @param string $default - * @return string - */ - public function getConfigData($key, $default = false) - { - if (!$this->hasData($key)) { - $value = Mage::getStoreConfig('payment/' . $paymentCode . '/' . $key); - if (is_null($value) || false===$value) { - $value = $default; - } - $this->setData($key, $value); - } - return $this->getData($key); - } - - /** - * Check signed params - * - * @param array $params - * @return bool - */ - public function checkSignParams($params) - { - if (is_array($params) && isset($params[$this->getRequestSignatureParamName()])) { - $paramSignature = $params[$this->getRequestSignatureParamName()]; - unset($params[$this->getRequestSignatureParamName()]); - $generateSignature = $this->_getSignatureForArray($params, $this->getSecretKey()); - return $paramSignature == $generateSignature; - } - - return false; - } - - /** - * Add signature param to params array - * - * @param array $params - * @return array - */ - public function signParams($params) - { - $signature = $this->_getSignatureForArray($params, $this->getSecretKey()); - $params[$this->getRequestSignatureParamName()] = $signature; - return $params; - } - - /** - * Return signature for array - * - * @param array $array - * @param string $secretKey - * @return array - */ - protected function _getSignatureForArray($array, $secretKey) - { - uksort($array, 'strcasecmp'); - $tmpString = ''; - foreach ($array as $paramName => $paramValue) { - $tmpString = $tmpString . $paramName . $paramValue; - } - return $this->_getSignatureForString($tmpString, $secretKey); - } - - /** - * Return signature for string - * - * @param string $string - * @param string $secretKey - * @return string - */ - protected function _getSignatureForString($string, $secretKey) - { - $rawHmac = hash_hmac(self::$HMAC_SHA1_ALGORITHM, $string, $secretKey, true); - return base64_encode($rawHmac); - } -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Api/Asp.php b/app/code/core/Mage/AmazonPayments/Model/Api/Asp.php deleted file mode 100644 index 610b138160..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Api/Asp.php +++ /dev/null @@ -1,217 +0,0 @@ - - */ -class Mage_AmazonPayments_Model_Api_Asp extends Mage_AmazonPayments_Model_Api_Asp_Abstract -{ - /** - * collect shipping address to IPN notification request - */ - protected $_collectShippingAddress = 0; - - /** - * IPN notification request model path - */ - protected $_ipnRequest = 'amazonpayments/api_asp_ipn_request'; - - /** - * FPS model path - */ - protected $_fpsModel = 'amazonpayments/api_asp_fps'; - - /** - * Get singleton with AmazonPayments ASP API FPS Model - * - * @return Mage_AmazonPayments_Model_Api_Asp_Fps - */ - protected function _getFps() - { - return Mage::getSingleton($this->_fpsModel)->setStoreId($this->getStoreId()); - } - - /** - * Get singleton with AmazonPayments ASP IPN notification request Model - * - * @return Mage_AmazonPayments_Model_Api_Asp_Ipn_Request - */ - protected function _getIpnRequest() - { - return Mage::getSingleton($this->_ipnRequest); - } - - - /** - * Return Amazon Simple Pay payment url - * - * @return string - */ - public function getPayUrl () - { - if ($this->_isSandbox()) { - return $this->_getConfig('pay_service_url_sandbox'); - } - return $this->_getConfig('pay_service_url'); - } - - /** - * Return Amazon Simple Pay payment params - * - * @param string $referenceId - * @param string $amountValue - * @param string $currencyCode - * @param string $abandonUrl - * @param string $returnUrl - * @param string $ipnUrl - * @return array - */ - public function getPayParams($referenceId, $amountValue, $currencyCode, $abandonUrl, $returnUrl, $ipnUrl) - { - $amount = Mage::getSingleton('amazonpayments/api_asp_amount') - ->setValue($amountValue) - ->setCurrencyCode($currencyCode); - - $requestParams = array(); - $requestParams['referenceId'] = $referenceId; - $requestParams['amount'] = $amount->toString(); - $requestParams['description'] = $this->_getConfig('pay_description'); - - $requestParams['accessKey'] = $this->_getConfig('access_key'); - $requestParams['processImmediate'] = $this->_getConfig('pay_process_immediate'); - $requestParams['immediateReturn'] = $this->_getConfig('pay_immediate_return'); - $requestParams['collectShippingAddress'] = $this->_collectShippingAddress; - $requestParams['abandonUrl'] = $abandonUrl; - $requestParams['returnUrl'] = $returnUrl; - $requestParams['ipnUrl'] = $ipnUrl; - - $signature = $this->_getSignatureForArray($requestParams, $this->_getConfig('secret_key')); - $requestParams['signature'] = $signature; - - return $requestParams; - } - - /** - * process notification request - * - * @param array $requestParams - * @return Mage_AmazonPayments_Model_Api_Asp_Ipn_Request - */ - public function processNotification($requestParams) - { - $requestSignature = false; - - if (isset($requestParams['signature'])) { - $requestSignature = $requestParams['signature']; - unset($requestParams['signature']); - } - - $originalSignature = $this->_getSignatureForArray($requestParams, $this->_getConfig('secret_key')); - if ($requestSignature != $originalSignature) { - Mage::throwException(Mage::helper('amazonpayments')->__('Request signed an incorrect or missing signature')); - } - - $ipnRequest = $this->_getIpnRequest(); - - if(!$ipnRequest->init($requestParams)) { - Mage::throwException(Mage::helper('amazonpayments')->__('Request is not a valid IPN request')); - } - - return $ipnRequest; - } - - /** - * cancel payment through FPS api - * - * @param string $transactionId - * @return Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract - */ - public function cancel($transactionId) - { - $fps = $this->_getFps(); - - $request = $fps->getRequest(Mage_AmazonPayments_Model_Api_Asp_Fps::ACTION_CODE_CANCEL) - ->setTransactionId($transactionId) - ->setDescription($this->_getConfig('cancel_description')); - - $response = $fps->process($request); - return $response; - } - - /** - * capture payment through FPS api - * - * @param string $transactionId - * @param string $amount - * @param string $currencyCode - * @return Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract - */ - public function capture($transactionId, $amount, $currencyCode) - { - $fps = $this->_getFps(); - $amount = $this->_getAmount() - ->setValue($amount) - ->setCurrencyCode($currencyCode); - - $request = $fps->getRequest(Mage_AmazonPayments_Model_Api_Asp_Fps::ACTION_CODE_SETTLE) - ->setTransactionId($transactionId) - ->setAmount($amount); - - $response = $fps->process($request); - return $response; - } - - /** - * capture payment through FPS api - * - * @param string $transactionId - * @param string $amount - * @param string $currencyCode - * @param string $referenceId - * @return Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract - */ - public function refund($transactionId, $amount, $currencyCode, $referenceId) - { - $fps = $this->_getFps(); - - $amount = $this->_getAmount() - ->setValue($amount) - ->setCurrencyCode($currencyCode); - - $request = $fps->getRequest(Mage_AmazonPayments_Model_Api_Asp_Fps::ACTION_CODE_REFUND) - ->setTransactionId($transactionId) - ->setReferenceId($referenceId) - ->setAmount($amount) - ->setDescription($this->_getConfig('refund_description')); - - $response = $fps->process($request); - return $response; - } -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Abstract.php b/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Abstract.php deleted file mode 100644 index 538b9d518c..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Abstract.php +++ /dev/null @@ -1,109 +0,0 @@ - - */ -class Mage_AmazonPayments_Model_Api_Asp_Abstract extends Mage_AmazonPayments_Model_Api_Abstract -{ - /** - * payment actions - */ - const PAY_ACTION_SETTLE = 0; - const PAY_ACTION_SETTLE_CAPTURE = 1; - - /** - * rewrited for Mage_AmazonPayments_Model_Api_Abstract - */ - protected $paymentCode = 'amazonpayments_asp'; - - /** - * Amount model path - */ - protected $_amountModel = 'amazonpayments/api_asp_amount'; - - /** - * Store id for current operation - */ - protected $_storeId = null; - - /** - * Set store id for current operation - * - * @param $id string - * @return Mage_AmazonPayments_Model_Api_Asp_Abstract - */ - public function setStoreId($id) - { - $this->_storeId = $id; - return $this; - } - - /** - * Get store id for current operation - * - * @return string - */ - public function getStoreId() - { - return $this->_storeId; - } - - /** - * Get singleton with AmazonPayments ASP Amount Model - * - * @return Mage_AmazonPayments_Model_Api_Asp_Amount - */ - protected function _getAmount() - { - return Mage::getSingleton($this->_amountModel); - } - - /** - * Return sandbox mode flag - * - * @return bool - */ - protected function _isSandbox() - { - return $this->_getConfig('is_sandbox'); - } - - /** - * Get value from the module config - * - * @param string $path - * @return string - */ - protected function _getConfig($path) - { - return Mage::getStoreConfig('payment/' . $this->paymentCode . '/' . $path, $this->getStoreId()); - } -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Amount.php b/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Amount.php deleted file mode 100644 index c75973857e..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Amount.php +++ /dev/null @@ -1,139 +0,0 @@ - - */ -class Mage_AmazonPayments_Model_Api_Asp_Amount -{ - /* - * Amount value - */ - private $_value; - - /* - * Amount currency code - */ - private $_currencyCode; - - /* - * Template union amount - */ - protected $_amountStringTemplate = "/^([A-Z]{3})\s([0-9]{1,}|[0-9]{1,}[.][0-9]{1,})$/"; - - /* - * Template amount value - */ - protected $_valueStringTemplate = "/^([0-9]{1,}|[0-9]{1,}[.][0-9]{1,})$/"; - - /* - * Template amount currency code - */ - protected $_currencyCodeStringTemplate = "/^([A-Z]{3})$/"; - - /** - * Init object - * - * @param string $amount - union amount - * @return Mage_AmazonPayments_Model_Api_Asp_Amount - */ - public function init($amount) - { - $tmpArr = array(); - if (!preg_match($this->_amountStringTemplate, $amount, $tmpArr)) { - return false; - } - $this->_value = $tmpArr[2]; - $this->_currencyCode = $tmpArr[1]; - return $this; - } - - /** - * Set amount value - * - * @param string $value - * @return Mage_AmazonPayments_Model_Api_Asp_Amount - */ - public function setValue($value) - { - $tmpArr = array(); - if (!preg_match($this->_valueStringTemplate, $value, $tmpArr)) { - return false; - } - $this->_value = $tmpArr[1]; - return $this; - } - - /** - * Set amount currency code - * - * @param string $currencyCode - * @return Mage_AmazonPayments_Model_Api_Asp_Amount - */ - public function setCurrencyCode($currencyCode) - { - $tmpArr = array(); - if (!preg_match($this->_currencyCodeStringTemplate, $currencyCode, $tmpArr)) { - return false; - } - $this->_currencyCode = $tmpArr[1]; - return $this; - } - - /** - * Get amount value - * - * @return string - */ - public function getValue() - { - return $this->_value; - } - - /** - * Get amount currency code - * - * @return string - */ - public function getCurrencyCode() - { - return $this->_currencyCode; - } - - /** - * Return union amount string - * - * @return string - */ - public function toString() - { - return $this->getCurrencyCode() . ' ' . $this->getValue(); - } -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps.php b/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps.php deleted file mode 100644 index 3e67d10a1e..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps.php +++ /dev/null @@ -1,217 +0,0 @@ - - */ -class Mage_AmazonPayments_Model_Api_Asp_Fps extends Mage_AmazonPayments_Model_Api_Asp_Abstract -{ - /* - * Amazon FPS version protocol - */ - const SERVICE_VERSION = '2008-09-17'; - - /* - * FPS action codes - */ - const ACTION_CODE_CANCEL = 'Cancel'; - const ACTION_CODE_SETTLE = 'Settle'; - const ACTION_CODE_REFUND = 'Refund'; - - /* - * Exeption identifiers - */ - const EXCEPTION_INVALID_ACTION_CODE = 10031; - const EXCEPTION_INVALID_REQUEST = 10031; - const EXCEPTION_INVALID_RESPONSE = 10032; - - /** - * Return FPS request model - * - * @param string $actionCode - * @return Mage_AmazonPayments_Model_Api_Asp_Fps_Request_Abstract - */ - public function getRequest($actionCode) - { - switch ($actionCode) { - case self::ACTION_CODE_CANCEL: - $requestModelPath = 'amazonpayments/api_asp_fps_request_cancel'; - break; - case self::ACTION_CODE_SETTLE: - $requestModelPath = 'amazonpayments/api_asp_fps_request_settle'; - break; - case self::ACTION_CODE_REFUND: - $requestModelPath = 'amazonpayments/api_asp_fps_request_refund'; - break; - default: $this->_throwExeptionInvalidActionCode(); - } - - return Mage::getSingleton($requestModelPath)->init($actionCode); - } - - /** - * Return FPS response model for response body - * - * @param string $requestActionCode - * @param string $responseBody - * @return Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract - */ - protected function _getResponse($requestActionCode, $responseBody) - { - switch ($requestActionCode) { - case self::ACTION_CODE_CANCEL: - $responseModelPath = 'amazonpayments/api_asp_fps_response_cancel'; - break; - case self::ACTION_CODE_SETTLE: - $responseModelPath = 'amazonpayments/api_asp_fps_response_settle'; - break; - case self::ACTION_CODE_REFUND: - $responseModelPath = 'amazonpayments/api_asp_fps_response_refund'; - break; - default: $this->_throwExeptionInvalidActionCode(); - } - - $actionResponse = Mage::getSingleton($responseModelPath); - if ($actionResponse->init($responseBody)) { - return $actionResponse; - } - - $errorResponse = Mage::getSingleton('amazonpayments/api_asp_fps_response_error'); - if ($errorResponse->init($responseBody)) { - return $errorResponse; - } - - throw new Exception( - Mage::helper('amazonpayments')->__('Response body is not valid FPS respons'), - self::EXCEPTION_INVALID_RESPONSE - ); - } - - /** - * Process FPS request - * - * @param object Mage_AmazonPayments_Model_Api_Asp_Fps_Request_Abstract $request - * @return Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract - */ - public function process($request) - { - if (!$request->isValid()) { - throw new Exception( - Mage::helper('amazonpayments')->__('Invalid request'), - self::EXCEPTION_INVALID_REQUEST - ); - } - - $request = $this->_addRequiredParameters($request); - $request = $this->_signRequest($request); - - $responseBody = $this->_call($this->_getServiceUrl(), $request->getData()); - return $this->_getResponse($request->getActionCode(), $responseBody); - } - - /** - * Return Amazon FPS service url - * - * @return string - */ - protected function _getServiceUrl() - { - if ($this->_isSandbox()) { - return $this->_getConfig('fps_service_url_sandbox'); - } - return $this->_getConfig('fps_service_url'); - } - - /** - * Add required params to FPS request - * - * @param object Mage_AmazonPayments_Model_Api_Asp_Fps_Request_Abstract - * @return Mage_AmazonPayments_Model_Api_Asp_Fps_Request_Abstract - */ - protected function _addRequiredParameters($request) - { - return $request->setData('AWSAccessKeyId', $this->_getConfig('access_key')) - ->setData('Timestamp', gmdate("Y-m-d\TH:i:s.\\0\\0\\0\\Z", time())) - ->setData('Version', self::SERVICE_VERSION) - ->setData('SignatureVersion', '1'); - } - - /** - * Add signature param to FPS request - * - * @param object Mage_AmazonPayments_Model_Api_Asp_Fps_Request_Abstract - * @return Mage_AmazonPayments_Model_Api_Asp_Fps_Request_Abstract - */ - protected function _signRequest($request) - { - $signature = $this->_getSignatureForArray($request->getData(), $this->_getConfig('secret_key')); - return $request->setData('Signature', $signature); - } - - /** - * Send request to Amazon FPS service and return response body - * - * @param string $serviceUrl - * @param array $params - * @return Varien_Simplexml_Element - */ - protected function _call($serviceUrl, $params) - { - $tmpArray = array(); - foreach ($params as $kay => $value) { - $tmpArray[] = $kay . '=' . urlencode($value); - } - $requestBody = implode('&', $tmpArray); - - $http = new Varien_Http_Adapter_Curl(); - $http->setConfig(array('timeout' => 30)); - $http->write(Zend_Http_Client::POST, $serviceUrl, '1.1', array(), $requestBody); - - $responseBody = $http->read(); - $responseBody = preg_split('/^\r?$/m', $responseBody, 2); - $responseBody = trim($responseBody[1]); - - $responseBody = new Varien_Simplexml_Element($responseBody); - - $http->close(); - return $responseBody; - } - - /** - * Throw exeption: Invalid action code - */ - protected function _throwExeptionInvalidActionCode() - { - throw new Exception( - Mage::helper('amazonpayments')->__('Invalid action code'), - self::EXCEPTION_INVALID_ACTION_CODE - ); - } -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Request/Abstract.php b/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Request/Abstract.php deleted file mode 100644 index c15a596686..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Request/Abstract.php +++ /dev/null @@ -1,86 +0,0 @@ - - */ -class Mage_AmazonPayments_Model_Api_Asp_Fps_Request_Abstract extends Varien_Object -{ - /* - * Request action code - */ - private $_actionCode; - - /** - * Init object - * - * @param string $actionCode - * @return Mage_AmazonPayments_Model_Api_Asp_Fps_Request_Abstract - */ - public function init($actionCode) - { - if (is_null($this->_actionCode)) { - $this->_actionCode = $actionCode; - $this->initDefaultParams(); - } - return $this; - } - - /** - * Init default request params - */ - protected function initDefaultParams() - { - $this->setData('Action', $this->getActionCode()); - } - - /** - * Return request action code - * - * @return string - */ - public function getActionCode() - { - return $this->_actionCode; - } - - /** - * Validation request params - * - * @return bool - */ - public function isValid() - { - if (!$this->getData('Action')) { - return false; - } - return true; - } -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Request/Cancel.php b/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Request/Cancel.php deleted file mode 100644 index 95e2107e7c..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Request/Cancel.php +++ /dev/null @@ -1,68 +0,0 @@ - - */ -class Mage_AmazonPayments_Model_Api_Asp_Fps_Request_Cancel extends Mage_AmazonPayments_Model_Api_Asp_Fps_Request_Abstract -{ - /** - * rewrited for Mage_AmazonPayments_Model_Api_Asp_Fps_Request_Abstract - */ - public function isValid() - { - if (!$this->getData('TransactionId')) { - return false; - } - return parent::isValid(); - } - - /** - * Set request TransactionId - * - * @param string $transactionId - * @return Mage_AmazonPayments_Model_Api_Asp_Fps_Request_Cancel - */ - public function setTransactionId($transactionId) - { - return $this->setData('TransactionId', $transactionId); - } - - /** - * Set request Description - * - * @param string $description - * @return Mage_AmazonPayments_Model_Api_Asp_Fps_Request_Cancel - */ - public function setDescription($description) - { - return $this->setData('Description', $description); - } -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Request/Refund.php b/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Request/Refund.php deleted file mode 100644 index 1dafbd5bb3..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Request/Refund.php +++ /dev/null @@ -1,92 +0,0 @@ - - */ -class Mage_AmazonPayments_Model_Api_Asp_Fps_Request_Refund extends Mage_AmazonPayments_Model_Api_Asp_Fps_Request_Abstract -{ - /** - * rewrited for Mage_AmazonPayments_Model_Api_Asp_Fps_Request_Abstract - */ - public function isValid() - { - if (!$this->getData('TransactionId') || - !$this->getData('CallerReference')) { - return false; - } - return parent::isValid(); - } - - /** - * Set request transactionId - * - * @param string $transactionId - * @return Mage_AmazonPayments_Model_Api_Asp_Fps_Request_Refund - */ - public function setTransactionId($transactionId) - { - return $this->setData('TransactionId', $transactionId); - } - - /** - * Set request referenceId - * - * @param string $referenceId - * @return Mage_AmazonPayments_Model_Api_Asp_Fps_Request_Refund - */ - public function setReferenceId($referenceId) - { - return $this->setData('CallerReference', $referenceId); - } - - /** - * Set request description - * - * @param string $description - * @return Mage_AmazonPayments_Model_Api_Asp_Fps_Request_Refund - */ - public function setDescription($description) - { - return $this->setData('CallerDescription', $description); - } - - /** - * Set request amount - * - * @param Mage_AmazonPayments_Model_Api_Asp_Amount $amount - * @return Mage_AmazonPayments_Model_Api_Asp_Fps_Request_Refund - */ - public function setAmount($amount) - { - return $this->setData('RefundAmount.Value', $amount->getValue()) - ->setData('RefundAmount.CurrencyCode', $amount->getCurrencyCode()); - } -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Request/Settle.php b/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Request/Settle.php deleted file mode 100644 index 1031c32045..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Request/Settle.php +++ /dev/null @@ -1,69 +0,0 @@ - - */ -class Mage_AmazonPayments_Model_Api_Asp_Fps_Request_Settle extends Mage_AmazonPayments_Model_Api_Asp_Fps_Request_Abstract -{ - /** - * rewrited for Mage_AmazonPayments_Model_Api_Asp_Fps_Request_Abstract - */ - public function isValid() - { - if (!$this->getData('ReserveTransactionId')) { - return false; - } - return parent::isValid(); - } - - /** - * Set request transactionId - * - * @param string $transactionId - * @return Mage_AmazonPayments_Model_Api_Asp_Fps_Request_Settle - */ - public function setTransactionId($transactionId) - { - return $this->setData('ReserveTransactionId', $transactionId); - } - - /** - * Set request amount - * - * @param Mage_AmazonPayments_Model_Api_Asp_Amount $amount - * @return Mage_AmazonPayments_Model_Api_Asp_Fps_Request_Settle - */ - public function setAmount($amount) - { - return $this->setData('TransactionAmount.Value', $amount->getValue()) - ->setData('TransactionAmount.CurrencyCode', $amount->getCurrencyCode()); - } -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Response/Abstract.php b/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Response/Abstract.php deleted file mode 100644 index 4dc7a2e7e9..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Response/Abstract.php +++ /dev/null @@ -1,107 +0,0 @@ - - */ -class Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract extends Varien_Object -{ - /* - * Response statuses - */ - const STATUS_CANCELLED = 'Cancelled'; - const STATUS_FAILURE = 'Failure'; - const STATUS_PENDING = 'Pending'; - const STATUS_RESERVED = 'Reserved'; - const STATUS_SUCCESS = 'Success'; - const STATUS_ERROR = 'Error'; - - /** - * Init object - * - * @param Varien_Simplexml_Element $responseBody - * @return Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract - */ - public function init($responseBody) - { - if (!$this->parse($responseBody)) { - return false; - } - return $this; - } - - /** - * Parse response body - * - * @param Varien_Simplexml_Element $responseBody - * @return bool - */ - protected function parse($responseBody) - { - $responseId = (string)$responseBody->ResponseMetadata->RequestId; - if($responseId == '') { - return false; - } - $this->setData('Id', $responseId); - - if (!$status = $this->getData('Status')) { - return false; - } - if ($status != self::STATUS_CANCELLED && - $status != self::STATUS_FAILURE && - $status != self::STATUS_PENDING && - $status != self::STATUS_RESERVED && - $status != self::STATUS_SUCCESS) { - return false; - } - return true; - } - - /** - * Return status of respons - * - * @return string - */ - public function getStatus() - { - return $this->getData('Status'); - } - - /** - * Return response ID - * - * @return string - */ - public function getId() - { - return $this->getData('Id'); - } - -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Response/Cancel.php b/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Response/Cancel.php deleted file mode 100644 index 6b8f1c15a7..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Response/Cancel.php +++ /dev/null @@ -1,67 +0,0 @@ - - */ -class Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Cancel extends Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract -{ - /** - * rewrited for Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract - */ - protected function parse($responseBody) - { - if ($responseBody->getName() != 'CancelResponse') { - return false; - } - - $transactionId = (string)$responseBody->CancelResult->TransactionId; - $transactionStatus = (string)$responseBody->CancelResult->TransactionStatus; - - if($transactionId == '' || $transactionStatus == '') { - return false; - } - - $this->setData('TransactionId', $transactionId); - $this->setData('Status', $transactionStatus); - - return parent::parse($responseBody); - } - - /** - * Return response TransactionId - * - * @return string - */ - public function getTransactionId() - { - return $this->getData('TransactionId'); - } -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Response/Error.php b/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Response/Error.php deleted file mode 100644 index df77e46fff..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Response/Error.php +++ /dev/null @@ -1,80 +0,0 @@ - - */ -class Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Error extends Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract -{ - /** - * rewrited for Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract - */ - protected function parse($responseBody) - { - if ($responseBody->getName() != 'Response') { - return false; - } - - $code = (string)$responseBody->Errors->Error->Code; - $message = (string)$responseBody->Errors->Error->Message; - $responseId = (string)$responseBody->RequestID; - - if($code == '' || $message == '' || $responseId == '') { - return false; - } - - $this->setData('Id', $responseId); - $this->setData('Status', parent::STATUS_ERROR); - $this->setData('Code', $code); - $this->setData('Message', $message); - return true; - } - - /** - * Return response Code - * - * @return string - */ - public function getCode() - { - return $this->getData('Code'); - } - - /** - * Return response Message - * - * @return string - */ - public function getMessage() - { - return $this->getData('Message'); - } - -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Response/Refund.php b/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Response/Refund.php deleted file mode 100644 index 96cb6807c4..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Response/Refund.php +++ /dev/null @@ -1,67 +0,0 @@ - - */ -class Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Refund extends Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract -{ - /** - * rewrited for Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract - */ - protected function parse($responseBody) - { - if ($responseBody->getName() != 'RefundResponse') { - return false; - } - - $transactionId = (string)$responseBody->RefundResult->TransactionId; - $transactionStatus = (string)$responseBody->RefundResult->TransactionStatus; - - if($transactionId == '' || $transactionStatus == '') { - return false; - } - - $this->setData('TransactionId', $transactionId); - $this->setData('Status', $transactionStatus); - - return parent::parse($responseBody); - } - - /** - * Return response TransactionId - * - * @return string - */ - public function getTransactionId() - { - return $this->getData('TransactionId'); - } -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Response/Settle.php b/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Response/Settle.php deleted file mode 100644 index 37ab8772fc..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Fps/Response/Settle.php +++ /dev/null @@ -1,68 +0,0 @@ - - */ -class Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Settle extends Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract -{ - /** - * rewrited for Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract - */ - protected function parse($responseBody) - { - if ($responseBody->getName() != 'SettleResponse') { - return false; - } - - $transactionId = (string)$responseBody->SettleResult->TransactionId; - $transactionStatus = (string)$responseBody->SettleResult->TransactionStatus; - - if($transactionId == '' || $transactionStatus == '') { - return false; - } - - $this->setData('TransactionId', $transactionId); - $this->setData('Status', $transactionStatus); - - return parent::parse($responseBody); - } - - /** - * Return response TransactionId - * - * @return string - */ - public function getTransactionId() - { - return $this->getData('TransactionId'); - } - -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Ipn/Request.php b/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Ipn/Request.php deleted file mode 100644 index 8899d96cf0..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Api/Asp/Ipn/Request.php +++ /dev/null @@ -1,215 +0,0 @@ - - */ -class Mage_AmazonPayments_Model_Api_Asp_Ipn_Request extends Varien_Object -{ - /* - * Status request - */ - const STATUS_CANCEL_CUSTOMER = 'A'; - const STATUS_CANCEL_TRANSACTION = 'CANCELLED'; - const STATUS_RESERVE_SUCCESSFUL = 'PR'; - const STATUS_PAYMENT_INITIATED = 'PI'; - const STATUS_PAYMENT_SUCCESSFUL = 'PS'; - const STATUS_PAYMENT_FAILED = 'PF'; - const STATUS_REFUND_SUCCESSFUL = 'RS'; - const STATUS_REFUND_FAILED = 'RF'; - const STATUS_SYSTEM_ERROR = 'SE'; - - /* - * Request params - */ - private $requestParams; - - /** - * Init object - * - * @param array $requestParams - * @return Mage_AmazonPayments_Model_Api_Asp_Ipn_Request - */ - public function init($requestParams) - { - if (!$this->_validateRequestParams($requestParams)) { - return false; - } - $this->requestParams = $requestParams; - $this->_setRequestParamsToData($this->_convertRequestParams($requestParams)); - return $this; - } - - /** - * Validate request params - * - * @param array $requestParams - * @return bool - */ - private function _validateRequestParams($requestParams) - { - if (!isset($requestParams['transactionAmount']) || - !isset($requestParams['transactionDate']) || - !isset($requestParams['status'])) { - return false; - } - - $statusCode = $requestParams['status']; - if ($statusCode != self::STATUS_CANCEL_CUSTOMER && - $statusCode != self::STATUS_CANCEL_TRANSACTION && - $statusCode != self::STATUS_RESERVE_SUCCESSFUL && - $statusCode != self::STATUS_PAYMENT_INITIATED && - $statusCode != self::STATUS_PAYMENT_SUCCESSFUL && - $statusCode != self::STATUS_PAYMENT_FAILED && - $statusCode != self::STATUS_REFUND_SUCCESSFUL && - $statusCode != self::STATUS_REFUND_FAILED && - $statusCode != self::STATUS_SYSTEM_ERROR) { - return false; - } - - if ($statusCode != self::STATUS_CANCEL_TRANSACTION && - !isset($requestParams['referenceId'])){ - return false; - } - - if (($statusCode == self::STATUS_RESERVE_SUCCESSFUL || - $statusCode == self::STATUS_PAYMENT_SUCCESSFUL || - $statusCode == self::STATUS_REFUND_SUCCESSFUL) && - !isset($requestParams['transactionId'])) { - return false; - } - - if (!$this->_convertAmount($requestParams['transactionAmount'])) { - return false; - } - - if ($requestParams['status'] == self::STATUS_REFUND_SUCCESSFUL || - $requestParams['status'] == self::STATUS_REFUND_FAILED) { - if (!$this->_convertReferenceId($requestParams['referenceId'])) { - return false; - } - } - - return true; - } - - /** - * convert request params - * - * @param array $requestParams - * @return array - */ - private function _convertRequestParams($requestParams) - { - $_tmpResultArray = $this->_convertAmount($requestParams['transactionAmount']); - unset($requestParams['transactionAmount']); - $requestParams = array_merge($requestParams, $_tmpResultArray); - - if ($requestParams['status'] == self::STATUS_REFUND_SUCCESSFUL || - $requestParams['status'] == self::STATUS_REFUND_FAILED) { - $requestParams['referenceId'] = $this->_convertReferenceId($requestParams['referenceId']); - } - - $requestParams['transactionDate'] = $this->_convertTransactionDate($requestParams['transactionDate']); - - return $requestParams; - } - - - /** - * convert union amount string to amount value and amount currency code - * - * @param string $requestAmount - * @return Mage_AmazonPayments_Model_Api_Asp_Amount - */ - private function _convertAmount($requestAmount) - { - $amount = Mage::getSingleton('amazonpayments/api_asp_amount'); - if (!$amount->init($requestAmount)) { - return false; - } - - $resultArray = array(); - $resultArray['amount'] = $amount->getValue(); - $resultArray['currencyCode'] = $amount->getCurrencyCode(); - return $resultArray; - } - - /** - * convert peferenceId request param - * - * @param string $referenceId - * @return string - */ - private function _convertReferenceId($referenceId) - { - $tmpArr = array(); - if (!preg_match("/^Refund\sfor\s([0-9]{9})$/", $referenceId, $tmpArr)) { - return false; - } - return $tmpArr[1]; - } - - /** - * convert TransactionDate request param - * - * @param string $transactionDate - * @return string - */ - private function _convertTransactionDate($transactionDate) - { - return Mage::app()->getLocale()->date($transactionDate); - } - - /** - * set request params to object date - * - * @param array $requestParams - */ - private function _setRequestParamsToData($requestParams) - { - foreach ($requestParams as $kay => $value) { - $setMethodName = 'set' . ucfirst($kay); - $this->$setMethodName($value); - } - } - - /** - * rewrited for Varien_Object - */ - public function toString($format='') - { - $resultString = ''; - foreach($this->getData() as $kay => $value){ - $resultString .= "[$kay] = $value
"; - } - return $resultString; - } -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Api/Cba.php b/app/code/core/Mage/AmazonPayments/Model/Api/Cba.php deleted file mode 100644 index 73deced0a9..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Api/Cba.php +++ /dev/null @@ -1,1007 +0,0 @@ - - */ -class Mage_AmazonPayments_Model_Api_Cba extends Mage_AmazonPayments_Model_Api_Abstract -{ - protected static $HMAC_SHA1_ALGORITHM = "sha1"; - protected $_paymentCode = 'amazonpayments_cba'; - - protected $_carriers; - protected $_address; - - const STANDARD_SHIPMENT_RATE = 'Standard'; - const EXPEDITED_SHIPMENT_RATE = 'Expedited'; - const ONEDAY_SHIPMENT_RATE = 'OneDay'; - const TWODAY_SHIPMENT_RATE = 'TwoDay'; - - protected $_shippingRates = array( - self::STANDARD_SHIPMENT_RATE, - self::EXPEDITED_SHIPMENT_RATE, - self::ONEDAY_SHIPMENT_RATE, - self::TWODAY_SHIPMENT_RATE, - ); - - protected $_configShippingRates = null; - - /** - * Return Merchant Id from config - * - * @return string - */ - public function getMerchantId() - { - return Mage::getStoreConfig('payment/amazonpayments_cba/merchant_id'); - } - - /** - * Return action url for CBA Cart form to Amazon - * - * @return unknown - */ - public function getAmazonRedirectUrl() - { - #$_url = $this->getCbaPaymentUrl(); - $_url = $this->getPayServiceUrl(); - $_merchantId = Mage::getStoreConfig('payment/amazonpayments_cba/merchant_id'); - return $_url.$_merchantId; - } - - public function getConfigShippingRates() - { - if (is_null($this->_configShippingRates)) { - $this->_configShippingRates = array(); - foreach ($this->_shippingRates as $_rate) { - $_carrier = unserialize(Mage::getStoreConfig('payment/amazonpayments_cba/' . strtolower($_rate) . '_rate')); - if ($_carrier['method'] && $_carrier['method'] != 'None') { - $_carrierInfo = explode('/', $_carrier['method']); - $this->_configShippingRates[$_rate] = array( - 'carrier' => $_carrierInfo[0], - 'method' => $_carrierInfo[1] - ); - } - } - } - return $this->_configShippingRates; - } - - /** - * Computes RFC 2104-compliant HMAC signature. - * - * @param data Array - * The data to be signed. - * @param key String - * The signing key, a.k.a. the AWS secret key. - * @return The base64-encoded RFC 2104-compliant HMAC signature. - */ - public function calculateSignature($data, $secretKey) - { - $stringData = ''; - if (is_array($data)) { - ksort($data); - foreach ($data as $key => $value) { - $stringData .= $key.'='.rawurlencode($value).'&'; - } - } elseif (is_string($data)) { - $stringData = $data; - } else { - $stringData = $data; - } - - // compute the hmac on input data bytes, make sure to set returning raw hmac to be true - $rawHmac = hash_hmac(self::$HMAC_SHA1_ALGORITHM, $stringData, $secretKey, true); - - // base64-encode the raw hmac - return base64_encode($rawHmac); - } - - /** - * Format amount value (2 digits after the decimal point) - * - * @param float $amount - * @return float - */ - public function formatAmount($amount) - { - return Mage::helper('amazonpayments')->formatAmount($amount); - } - - /** - * Build XML-based Cart for Checkout by Amazon - * - * @param Mage_Sales_Model_Quote - * @return string - */ - public function getXmlCart(Mage_Sales_Model_Quote $quote) - { - $_xml = ''."\n" - .''."\n"; - if (!$quote->hasItems()) { - return false; - } - $_xml .= " {$quote->getId()}\n"; // Returning parametr - # .""; - - $_xml .= " \n" - ." \n"; - - foreach ($quote->getAllVisibleItems() as $_item) { - $_xml .= " \n" - ." {$_item->getSku()}/{$_item->getId()}\n" - ." {$this->getMerchantId()}\n" - ." {$_item->getName()}\n" - ." \n" - ." {$this->formatAmount($_item->getPrice())}\n" - ." {$quote->getBaseCurrencyCode()}\n" - ." \n" - ." {$_item->getQty()}\n" - ." \n" - ." {$this->formatAmount($_item->getWeight())}\n" - ." lb\n" - ." \n"; - $_xml .= " \n"; - - } - $_xml .= " \n" - ." cart-total-discount\n" - ." \n"; - - $_xml .= " A2ZZYWSJ0WMID8MAGENTO\n" - ." Varien\n"; - $_xml .= " \n" - ." true\n" - ." true\n" - ." true\n" - ." ".Mage::getUrl('amazonpayments/cba/callback', array('_secure' => true))."\n" - ." true\n" - ." \n"; - - $_xml .= "\n"; - return $_xml; - - } - - /** - * Retreive checkout tax tables xml - * - * @param Mage_Sales_Model_Quote $quote - * @return string - */ - protected function _getCheckoutTaxXml(Mage_Sales_Model_Quote $quote) - { - $xml = ''; - - // shipping tax table (used as default, because we have no ability to specify shipping tax table) - //$xml .= $this->_getTaxTablesXml($quote, $this->_getShippingTaxRules($quote), true); - // removed because of no ability to use default tax table as shipping tax table - - $xml .= "\n"; - - // item tax tables - $xml .= $this->_getTaxTablesXml($quote, $this->_getTaxRules($quote)); - - // empty tax table for products without tax class - $xml .= " \n" - ." none\n" - ." \n" - ." \n" - ." 0\n" - ." WorldAll\n" - ." \n" - ." \n" - ." \n"; - - $xml .= "\n"; - - - return $xml; - } - - /** - * Retreive specified tax rates xml - * - * @param Mage_Sales_Model_Quote $quote - * @param array $rates - * @param string $type - * @param mixed $addTo - * @return string - */ - protected function _getTaxTablesXml($quote, $rules, $isShipping = false, $addTo = null) - { - $xml = ''; - if ($isShipping) { - $isShippingTaxed = 'true'; - $taxTableTag = 'DefaultTaxTable'; - } else { - $isShippingTaxed = 'false'; - $taxTableTag = 'TaxTable'; - } - - if (is_array($rules)) { - if ($addTo) { - $_tables = $addTo->addChild('TaxTables'); - } - - foreach ($rules as $group=>$taxRates) { - $isShippingTaxed = ($isShipping ? 'true' : 'false'); - if ($isShipping) { - $tableName = 'default-tax-table'; - } else { - $tableName = "tax_{$group}"; - if ($group == $this->_getShippingTaxClassId($quote)) { - $isShippingTaxed = 'true'; - } - } - if ($addTo) { - // $_tables = $addTo->addChild('TaxTables'); - $_table = $_tables->addChild($taxTableTag); - $_table->addChild('TaxTableId', $tableName); - $_rules = $_table->addChild('TaxRules'); - } else { - $xml .= " <{$taxTableTag}>\n"; - $xml .= " {$tableName}\n"; - $xml .= " \n"; - } - - if (is_array($taxRates)) { - foreach ($taxRates as $rate) { - if ($addTo) { - $_rule = $_rules->addChild('TaxRule'); - $_rule->addChild('Rate', $rate['value']); - $_rule->addChild('IsShippingTaxed', $isShippingTaxed); - } else { - $xml .= " \n"; - $xml .= " {$rate['value']}\n"; - $xml .= " {$isShippingTaxed}\n"; - } - - if ($rate['country']==='US') { - if (!empty($rate['postcode']) && $rate['postcode']!=='*') { - if ($addTo) { - $_rule->addChild('USZipRegion', $rate['postcode']); - } else { - $xml .= " {$rate['postcode']}\n"; - } - } else if (!empty($rate['state']) && $rate['state']!=='*') { - if ($addTo) { - $_rule->addChild('USStateRegion', $rate['state']); - } else { - $xml .= " {$rate['state']}\n"; - } - } else { - if ($addTo) { - $_rule->addChild('PredefinedRegion', 'USAll'); - } else { - $xml .= " USAll\n"; - } - } - } else { - if ($addTo) { - $_region = $_rule->addChild('WorldRegion'); - $_region->addChild('CountryCode', $rate['country']); - if (!empty($rate['postcode']) && $rate['postcode']!=='*') { - $_region->addChild('PostalRegion', $rate['postcode']); - } - } else { - $xml .= " \n"; - $xml .= " {$rate['country']}\n"; - if (!empty($rate['postcode']) && $rate['postcode']!=='*') { - $xml .= " {$rate['postcode']}\n"; - } - $xml .= " \n"; - } - } - - $xml .= " \n"; - } - } else { - $taxRate = $taxRates/100; - if ($addTo) { - $_rule = $_rules->addChild('TaxRule'); - $_rule->addChild('Rate', $taxRate); - $_rule->addChild('IsShippingTaxed', $isShippingTaxed); - $_rule->addChild('PredefinedRegion', 'WorldAll'); - } else { - $xml .= " \n"; - $xml .= " {$taxRate}\n"; - $xml .= " {$isShippingTaxed}\n"; - $xml .= " WorldAll\n"; - $xml .= " \n"; - } - } - - $xml .= " \n"; - $xml .= " \n"; - } - - } else { - if (is_numeric($rules)) { - $taxRate = $rules/100; - - if ($addTo) { - $_table = $addTo->addChild($taxTableTag); - $_rules = $_table->addChild('TaxRules'); - $_rule = $_rules->addChild('TaxRule'); - $_rule->addChild('Rate', $taxRate); - $_rule->addChild('IsShippingTaxed', $isShippingTaxed); - $_rule->addChild('PredefinedRegion', 'WorldAll'); - } else { - $xml .= " <{$taxTableTag}>\n"; - $xml .= " \n"; - $xml .= " \n"; - $xml .= " {$taxRate}\n"; - $xml .= " {$isShippingTaxed}\n"; - $xml .= " WorldAll\n"; - $xml .= " \n"; - $xml .= " \n"; - $xml .= " \n"; - } - } - } - - if ($addTo) { - return $addTo; - } - - return $xml; - } - - - /** - * Retreive tax rules applicable to quote items - * - * @param Mage_Sales_Model_Quote $quote - * @return array - */ - protected function _getTaxRules(Mage_Sales_Model_Quote $quote) - { - $customerTaxClass = $this->_getCustomerTaxClass($quote); - if (Mage::helper('tax')->getTaxBasedOn() == 'origin') { - $request = Mage::getSingleton('tax/calculation')->getRateRequest(); - return Mage::getSingleton('tax/calculation')->getRatesForAllProductTaxClasses($request->setCustomerClassId($customerTaxClass)); - } else { - $customerRules = Mage::getSingleton('tax/calculation')->getRatesByCustomerTaxClass($customerTaxClass); - $rules = array(); - foreach ($customerRules as $rule) { - $rules[$rule['product_class']][] = $rule; - } - return $rules; - } - } - - /** - * Retreive tax rules applicable to shipping - * - * @param Mage_Sales_Model_Quote $quote - * @return array - */ - protected function _getShippingTaxRules(Mage_Sales_Model_Quote $quote) - { - $customerTaxClass = $this->_getCustomerTaxClass($quote); - if ($shippingTaxClass = $this->_getShippingTaxClassId($quote)) { - if (Mage::helper('tax')->getTaxBasedOn() == 'origin') { - $request = Mage::getSingleton('tax/calculation')->getRateRequest(); - $request - ->setCustomerClassId($customerTaxClass) - ->setProductClassId($shippingTaxClass); - - return Mage::getSingleton('tax/calculation')->getRate($request); - } - $customerRules = Mage::getSingleton('tax/calculation')->getRatesByCustomerAndProductTaxClasses($customerTaxClass, $shippingTaxClass); - $rules = array(); - foreach ($customerRules as $rule) { - $rules[$rule['product_class']][] = $rule; - } - return $rules; - } else { - return array(); - } - } - - /** - * Retreive shipping tax class - * - * @param Mage_Sales_Model_Quote $quote - * @return int - */ - protected function _getShippingTaxClassId(Mage_Sales_Model_Quote $quote) - { - return Mage::getStoreConfig(Mage_Tax_Model_Config::CONFIG_XML_PATH_SHIPPING_TAX_CLASS, $quote->getStoreId()); - } - - /** - * Retreive customer tax class from quote - * - * @param Mage_Sales_Model_Quote $quote - * @return int - */ - protected function _getCustomerTaxClass(Mage_Sales_Model_Quote $quote) - { - $customerGroup = $quote->getCustomerGroupId(); - if (!$customerGroup) { - $customerGroup = Mage::getStoreConfig('customer/create_account/default_group', $quote->getStoreId()); - } - return Mage::getModel('customer/group')->load($customerGroup)->getTaxClassId(); - } - - /** - * Handle Callback from CBA and calculate Shipping, Taxes in case XML-based shopping cart - * - */ - public function handleXmlCallback($xmlRequest, $session) - { - $_address = $this->_parseRequestAddress($xmlRequest); - - #$quoteId = $session->getAmazonQuoteId(); - $quoteId = $_address['ClientRequestId']; - $quote = Mage::getModel('sales/quote')->load($quoteId); - - $baseCurrency = $session->getQuote()->getBaseCurrencyCode(); - $currency = Mage::app()->getStore($session->getQuote()->getStoreId())->getBaseCurrency(); - - $billingAddress = $quote->getBillingAddress(); - $address = $quote->getShippingAddress(); - - $this->_address = $_address; - - $regionModel = Mage::getModel('directory/region')->loadByCode($_address['regionCode'], $_address['countryCode']); - $_regionId = $regionModel->getId(); - - $address->setCountryId($_address['countryCode']) - ->setRegion($_address['regionCode']) - ->setRegionId($_regionId) - ->setCity($_address['city']) - ->setStreet($_address['street']) - ->setPostcode($_address['postCode']); - $billingAddress->setCountryId($_address['countryCode']) - ->setRegion($_address['regionCode']) - ->setRegionId($_regionId) - ->setCity($_address['city']) - ->setStreet($_address['street']) - ->setPostcode($_address['postCode']); - - $quote->setBillingAddress($billingAddress); - $quote->setShippingAddress($address); - $quote->save(); - - $address->setCollectShippingRates(true)->collectShippingRates(); - - $errors = array(); - $_carriers = array(); - foreach ($this->getConfigShippingRates() as $_cfgRate) { - if ($carrier = Mage::getStoreConfig('carriers/' . $_cfgRate['carrier'], $this->getStoreId())) { - if (isset($carrier['title']) && $carrier['active'] && !in_array($_cfgRate['carrier'], $_carriers)) { - $_carriers[] = $_cfgRate['carrier']; - } - } - } - - $result = Mage::getModel('shipping/shipping') - ->collectRatesByAddress($address, $_carriers) - ->getResult(); - $rateCodes = array(); - foreach ($this->getConfigShippingRates() as $_cfgRateLevel => $_cfgRate) { - if ($rates = $result->getRatesByCarrier($_cfgRate['carrier'])) { - foreach ($rates as $rate) { - if (!$rate instanceof Mage_Shipping_Model_Rate_Result_Error && $rate->getMethod() == $_cfgRate['method']) { - if ($address->getFreeShipping()) { - $price = 0; - } else { - $price = $rate->getPrice(); - } - if ($price) { - $price = Mage::helper('tax')->getShippingPrice($price, true, $address); - } - $this->_carriers[] = array( - 'service_level' => $_cfgRateLevel, - 'code' => $rate->getCarrier() . '_' . $rate->getMethod(), - 'price' => $price, - 'currency' => $currency['currency_code'], - 'description' => $rate->getCarrierTitle() . ' - ' . $rate->getMethodTitle() . ' (Amazon ' . $_cfgRateLevel . ' Service Level)' - ); - } - } - } - } - - if ($_extShippingInfo = unserialize($quote->getExtShippingInfo())) { - $_extShippingInfo = array_merge($_extShippingInfo, array('amazon_service_level' => $this->_carriers)); - } else { - $_extShippingInfo = array('amazon_service_level' => $this->_carriers); - } - $quote->setExtShippingInfo(serialize($_extShippingInfo)); - - $_items = $this->_parseRequestItems($xmlRequest); - $xml = $this->_generateXmlResponse($quote, $_items); - - $session->getQuote() - ->setForcedCurrency($currency) - ->collectTotals() - ->save(); - $quote->save(); - return $xml; - } - - /** - * Parse request from Amazon and return order details - * - * @param string xml - */ - public function parseOrder($xmlData) - { - $parsedOrder = array(); - if (strlen(trim($xmlData)) > 0) { - $xml = simplexml_load_string($xmlData, 'Varien_Simplexml_Element'); - $parsedOrder = array( - 'NotificationReferenceId' => (string) $xml->descend("NotificationReferenceId"), - 'amazonOrderID' => (string) $xml->descend("ProcessedOrder/AmazonOrderID"), - 'orderDate' => (string) $xml->descend("ProcessedOrder/OrderDate"), - 'orderChannel' => (string) $xml->descend("ProcessedOrder/OrderChannel"), - 'buyerName' => (string) $xml->descend("ProcessedOrder/BuyerInfo/BuyerName"), - 'buyerEmailAddress' => (string) $xml->descend("ProcessedOrder/BuyerInfo/BuyerEmailAddress"), - 'ShippingLevel' => (string) $xml->descend("ProcessedOrder/ShippingServiceLevel"), - 'shippingAddress' => array( - 'name' => (string) $xml->descend("ProcessedOrder/ShippingAddress/Name"), - 'street' => (string) $xml->descend("ProcessedOrder/ShippingAddress/AddressFieldOne"), - 'city' => (string) $xml->descend("ProcessedOrder/ShippingAddress/City"), - 'regionCode' => (string) $xml->descend("ProcessedOrder/ShippingAddress/State"), - 'postCode' => (string) $xml->descend("ProcessedOrder/ShippingAddress/PostalCode"), - 'countryCode' => (string) $xml->descend("ProcessedOrder/ShippingAddress/CountryCode"), - ), - 'items' => array(), - ); - - $_total = $_shipping = $_tax = $_shippingTax = $_subtotalPromo = $_shippingPromo = $_subtotal = 0; - $_itemsCount = $_itemsQty = 0; - foreach ($xml->descend("ProcessedOrder/ProcessedOrderItems/ProcessedOrderItem") as $_item) { - $parsedOrder['ClientRequestId'] = (string) $_item->ClientRequestId; - $_compositeSku = explode('/', (string) $_item->SKU); - $_sku = ''; - if (isset($_compositeSku[0])) { - $_sku = $_compositeSku[0]; - } - $_itemId = ''; - if ($_compositeSku[1]) { - $_itemId = $_compositeSku[1]; - } - $_itemQty = (string) $_item->Quantity; - $_itemsQty += $_itemQty; - $_itemsCount++; - $parsedOrder['items'][$_itemId] = array( - 'AmazonOrderItemCode' => (string) $_item->AmazonOrderItemCode, - 'sku' => $_sku, - 'title' => (string) $_item->Title, - 'price' => array( - 'amount' => (string) $_item->Price->Amount, - 'currencyCode' => (string) $_item->Price->CurrencyCode, - ), - 'qty' => $_itemQty, - 'weight' => array( - 'amount' => (string) $_item->Weight->Amount, - 'unit' => (string) $_item->Weight->Unit, - ), - ); - $_itemSubtotal = 0; - foreach ($_item->ItemCharges->Component as $_component) { - switch ((string) $_component->Type) { - case 'Principal': - $_itemSubtotal += (string) $_component->Charge->Amount; - $parsedOrder['items'][$_itemId]['subtotal'] = $_itemSubtotal; - break; - case 'Shipping': - $_shipping += (string) $_component->Charge->Amount; - $parsedOrder['items'][$_itemId]['shipping'] = (string) $_component->Charge->Amount; - break; - case 'Tax': - $_tax += (string) $_component->Charge->Amount; - $parsedOrder['items'][$_itemId]['tax'] = (string) $_component->Charge->Amount; - break; - case 'ShippingTax': - $_shippingTax += (string) $_component->Charge->Amount; - $parsedOrder['items'][$_itemId]['shipping_tax'] = (string) $_component->Charge->Amount; - break; - case 'PrincipalPromo': - $_subtotalPromo += (string) $_component->Charge->Amount; - $parsedOrder['items'][$_itemId]['principal_promo'] = (string) $_component->Charge->Amount; - break; - case 'ShippingPromo': - $_shippingPromo += (string) $_component->Charge->Amount; - $parsedOrder['items'][$_itemId]['shipping_promo'] = (string) $_component->Charge->Amount; - break; - } - } - $_subtotal += $_itemSubtotal; - } - - $parsedOrder['itemsCount'] = $_itemsCount; - $parsedOrder['itemsQty'] = $_itemsQty; - - $parsedOrder['subtotal'] = $_subtotal; - $parsedOrder['shippingAmount'] = $_shipping; - $parsedOrder['tax'] = $_tax + $_shippingTax; - $parsedOrder['shippingTax'] = $_shippingTax; - $parsedOrder['discount'] = $_subtotalPromo + $_shippingPromo; - $parsedOrder['discountShipping'] = $_shippingPromo; - - $parsedOrder['total'] = $_subtotal + $_shipping + $_tax + $_shippingTax - abs($_subtotalPromo) - abs($_shippingPromo); - } - return $parsedOrder; - } - - /** - * Parsing xml notification for amazon order id - * - * @param string $xmlData - * @return array - */ - public function parseOrderReadyToShipNotification($xmlData) - { - $readyToShipData = array(); - if (strlen(trim($xmlData))) { - $xml = simplexml_load_string($xmlData, 'Varien_Simplexml_Element'); - $aOrderId = (string) $xml->descend('ProcessedOrder/AmazonOrderID'); - $readyToShipData['amazon_order_id'] = $aOrderId; - $readyToShipData['items'] = array(); - foreach ($xml->descend('ProcessedOrder/ProcessedOrderItems/ProcessedOrderItem') as $item) { - $readyToShipData['items'][(string)$item->AmazonOrderItemCode] = (string)$item->Quantity; - } - } - return $readyToShipData; - } - - public function parseCancelNotification($xmlData) - { - $cancelData = array(); - if (strlen(trim($xmlData))) { - $xml = simplexml_load_string($xmlData, 'Varien_Simplexml_Element'); - $aOrderId = (string) $xml->descend('ProcessedOrder/AmazonOrderID'); - $cancelData['amazon_order_id'] = $aOrderId; - } - return $cancelData; - } - - /** - * Return address from Amazon request - * - * @param array $responseArr - */ - protected function _parseRequestAddress($xmlResponse) - { - $address = array(); - if (strlen(trim($xmlResponse)) > 0) { - $xml = simplexml_load_string($xmlResponse, 'Varien_Simplexml_Element'); - - $address = array( - 'addressId' => (string) $xml->descend("CallbackOrders/CallbackOrder/Address/AddressId"), - 'regionCode' => (string) $xml->descend("CallbackOrders/CallbackOrder/Address/State"), - 'countryCode' => (string) $xml->descend("CallbackOrders/CallbackOrder/Address/CountryCode"), - 'city' => (string) $xml->descend("CallbackOrders/CallbackOrder/Address/City"), - 'street' => (string) $xml->descend("CallbackOrders/CallbackOrder/Address/AddressFieldOne"), - 'postCode' => (string) $xml->descend("CallbackOrders/CallbackOrder/Address/PostalCode"), - 'ClientRequestId' => (string) $xml->descend("ClientRequestId"), - ); - } else { - $address = array( - 'addressId' => '', - 'regionCode' => '', - 'countryCode' => '', - 'city' => '', - 'street' => '', - 'postCode' => '', - ); - } - return $address; - } - - /** - * Return items SKUs from Amazon request - * - * @param array $responseArr - */ - protected function _parseRequestItems($xmlResponse) - { - $items = array(); - if (strlen(trim($xmlResponse)) > 0) { - $xml = simplexml_load_string($xmlResponse, 'Varien_Simplexml_Element'); - $itemsXml = $xml->descend("Cart/Items"); - foreach ($itemsXml->Item as $_item) { - $sku = ''; - $compositeSku = explode('/', (string)$_item->SKU); - if (isset($compositeSku[0])) { - $sku = $compositeSku[0]; - } - $items[(string)$_item->SKU] = $sku; - } - } else { - return false; - } - return $items; - } - - /** - * Generate XML Responce for Amazon with Shipping, Taxes, Promotions - * - * @return string xml - */ - protected function _generateXmlResponse($quote, $items = array()) - { - - $_xmlString = << - - -XML; - - $xml = new SimpleXMLElement($_xmlString); - - if (count($this->_carriers) > 0) { - $_xmlResponse = $xml->addChild('Response'); - $_xmlCallbackOrders = $_xmlResponse->addChild('CallbackOrders'); - $_xmlCallbackOrder = $_xmlCallbackOrders->addChild('CallbackOrder'); - - $_xmlAddress = $_xmlCallbackOrder->addChild('Address'); - $_xmlAddressId = $_xmlAddress->addChild('AddressId', $this->_address['addressId']); - - $_xmlCallbackOrderItems = $_xmlCallbackOrder->addChild('CallbackOrderItems'); - foreach ($items as $_itemSku) { - $_quoteItem = null; - foreach ($quote->getAllItems() as $_item) { - if ($_item->getSku() == $_itemSku) { - $_quoteItem = $_item; - break; - } - } - if (is_null($_quoteItem)) { - Mage::throwException($this->__('Item specified in callback request XML was not found in quote.')); - } - - $_xmlCallbackOrderItem = $_xmlCallbackOrderItems->addChild('CallbackOrderItem'); - $_xmlCallbackOrderItem->addChild('SKU', $_itemSku . '/' . $_quoteItem->getId()); - $_xmlCallbackOrderItem->addChild('TaxTableId', 'tax_'.$_quoteItem->getTaxClassId()); - - - - $_xmlShippingMethodIds = $_xmlCallbackOrderItem->addChild('ShippingMethodIds'); - foreach ($this->_carriers as $_carrier) { - $_xmlShippingMethodIds->addChild('ShippingMethodId', $_carrier['code']); - } - } - - $this->_appendTaxTables($xml, $quote, $this->_getTaxRules($quote)); - $this->_appendDiscounts($xml, $quote); - - $_xmlShippingMethods = $xml->addChild('ShippingMethods'); - foreach ($this->_carriers as $_carrier) { - $_xmlShippingMethod = $_xmlShippingMethods->addChild('ShippingMethod'); - - $_xmlShippingMethod->addChild('ShippingMethodId', $_carrier['code']); - $_xmlShippingMethod->addChild('ServiceLevel', $_carrier['service_level']); - - $_xmlShippingMethodRate = $_xmlShippingMethod->addChild('Rate'); - // Posible values: ShipmentBased | WeightBased | ItemQuantityBased - $_xmlShippingMethodRateItem = $_xmlShippingMethodRate->addChild('ShipmentBased'); - $_xmlShippingMethodRateItem->addChild('Amount', $_carrier['price']); - $_xmlShippingMethodRateItem->addChild('CurrencyCode', $_carrier['currency']); - - $_xmlShippingMethodIncludedRegions = $_xmlShippingMethod->addChild('IncludedRegions'); - $_xmlShippingMethodIncludedRegions->addChild('PredefinedRegion', 'WorldAll'); - } - $xml->addChild('CartPromotionId', 'cart-total-discount'); - } - - return $xml; - } - - protected function _appendTaxTables($xml, $quote, $rules, $isShipping = false) - { - return $this->_getTaxTablesXml($quote, $rules, $isShipping, $xml); - } - - protected function _appendDiscounts($xml, $quote) - { - $totalDiscount = $quote->getShippingAddress()->getBaseDiscountAmount() + $quote->getBillingAddress()->getBaseDiscountAmount(); - $discountAmount = ($totalDiscount ? $totalDiscount : 0); - - $_promotions = $xml->addChild('Promotions'); - $_promotion = $_promotions->addChild('Promotion'); - $_promotion->addChild('PromotionId', 'cart-total-discount'); - $_promotion->addChild('Description', 'Discount'); - $_benefit = $_promotion->addChild('Benefit'); - $_fad = $_benefit->addChild('FixedAmountDiscount'); - $_fad->addChild('Amount', $discountAmount); - $_fad->addChild('CurrencyCode', $quote->getBaseCurrencyCode()); - - return $xml; - } - - /** - * Generate XML with error message in case Calculation Callbacks error - * - * @param Exception $e - */ - public function callbackXmlError(Exception $e) - { - // Posible error codes: INVALID_SHIPPING_ADDRESS | INTERNAL_SERVER_ERROR | SERVICE_UNAVAILABLE - $xmlErrorString = ''."\n" - .''."\n" - .' '."\n" - .' '."\n" - .' INTERNAL_SERVER_ERROR'."\n" - .' [MESSAGE]'."\n" - .' '."\n" - .' '."\n" - .''; - $_errorMsg = $e->getMessage(); - $_errorMessage = "{$_errorMsg}\n\n" - ."code: {$e->getCode()}\n\n" - ."file: {$e->getFile()}\n\n" - ."line: {$e->getLine()}\n\n" - ."trac: {$e->getTraceAsString()}\n\n"; - if ($this->getDebug()) { - $debug = Mage::getModel('amazonpayments/api_debug') - ->setResponseBody($_errorMessage) - ->setRequestBody(time() .' - error callback response') - ->save(); - } - - if ($_errorMsg = $e->getMessage() && 0) { - $xmlErrorString = str_replace('[MESSAGE]', $_errorMsg, $xmlErrorString); - } else { - $xmlErrorString = str_replace('[MESSAGE]', 'Error', $xmlErrorString); - } - $xml = new SimpleXMLElement($xmlErrorString); - return $xml; - } - - /** - * Get order amazon api - * - * @return Mage_AmazonPayments_Model_Api_Cba_Document - */ - public function getDocumentApi() - { - if (is_null($this->getData('document_api'))) { - $_documentApi = Mage::getModel('amazonpayments/api_cba_document') - ->setWsdlUri('https://merchant-api.amazon.com/gateway/merchant-interface-mime/') - ->setMerchantInfo(array( - 'merchantIdentifier' => Mage::getStoreConfig('payment/amazonpayments_cba/merchant_tocken'), - 'merchantName' => Mage::getStoreConfig('payment/amazonpayments_cba/merchant_name'), - )) - ->init( - Mage::getStoreConfig('payment/amazonpayments_cba/merchant_login'), - Mage::getStoreConfig('payment/amazonpayments_cba/merchant_pass') - ); - $this->setData('document_api', $_documentApi); - } - return $this->getData('document_api'); - } - - /** - * Associate Magento real order id with Amazon order id - * - * @param Mage_Sales_Model_Order $order - * @return Mage_AmazonPayments_Model_Api_Cba - */ - public function syncOrder($order) - { - if ($order->getId()) { - $this->getDocumentApi()->sendAcknowledgement($order); - } - return $this; - } - - /** - * Cancel order - * - * @param Mage_Sales_Model_Order $order - * @return Mage_AmazonPayments_Model_Api_Cba - */ - public function cancel($order) - { - $this->getDocumentApi()->cancel($order); - return $this; - } - - /** - * Refund order - * - * @param Mage_Sales_Model_Order_Payment $payment - * @param float $amount - * @return Mage_AmazonPayments_Model_Api_Cba - */ - public function refund($payment, $amount) - { - $this->getDocumentApi()->refund($payment, $amount); - return $this; - } - - /** - * Confirm crating of shipment - * - * @param Mage_Sales_Model_Order_Shipment $shipment - * @return Mage_AmazonPayments_Model_Api_Cba - */ - public function confirmShipment($shipment) - { - $items = array(); - foreach ($shipment->getAllItems() as $item) { - /* @var $item Mage_Sales_Model_Order_Shipment_Item */ - if ($item->getOrderItem()->getParentItemId()) { - continue; - } - $items[] = array( - 'id' => $item->getOrderItem()->getExtOrderItemId(), - 'qty' => $item->getQty() - ); - } - - $carrierName = ''; - $shippingMethod = ''; - $trackNumber = ''; - /** - * Magento track numbers is not connected with items. - * Get only first track number - */ - foreach ($shipment->getAllTracks() as $track) { - $carrierName = $track->getTitle(); - $trackNumber = $track->getNumber(); - break; - } - if (preg_match("/\((.+)\)/", $shipment->getOrder()->getShippingDescription(), $_result)) { - $shippingMethod = $_result[1]; - } - - $this->getDocumentApi()->confirmShipment( - $shipment->getOrder()->getExtOrderId(), - $carrierName, - $shippingMethod, - $items, - $trackNumber - ); - $shipment->addComment( - Mage::helper('amazonpayments')->__('Shipment was created with Checkout by Amazon.') - ); - return $this; - } - - /** - * Send shipping track number - * - * @param Mage_Sales_Model_Order $order - * @param Mage_Sales_Model_Order_Shipment_Track $track - * @param Mage_AmazonPayments_Model_Api_Cba - */ - public function sendTrackingNumber($order, $track) - { -// $this->getDocumentApi()->sendTrackNumber($order, $carrierCode, $carrierMethod, $trackNumber); - return $this; - } - -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Api/Cba/Document.php b/app/code/core/Mage/AmazonPayments/Model/Api/Cba/Document.php deleted file mode 100644 index d43eabc10f..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Api/Cba/Document.php +++ /dev/null @@ -1,476 +0,0 @@ - - */ -class Mage_AmazonPayments_Model_Api_Cba_Document extends Varien_Object -{ - const MESSAGE_TYPE_ADJUSTMENT = '_POST_PAYMENT_ADJUSTMENT_DATA_'; - const MESSAGE_TYPE_FULFILLMENT = '_POST_ORDER_FULFILLMENT_DATA_'; - const MESSAGE_TYPE_ACKNOWLEDGEMENT = '_POST_ORDER_ACKNOWLEDGEMENT_DATA_'; - - protected $_wsdlUri = null; - protected $_merchantInfo = array(); - protected $_client = null; - protected $_result = null; - protected $_proccessFailed = false; - protected $_options = array( - 'trace' => true, - 'timeout' => '20', - ); - - protected function _construct() - { - parent::_construct(); - } - - /** - * Set Wsdl uri - * - * @param string $wsdlUri - * @return Mage_AmazonPayments_Model_Api_Cba_Document - */ - public function setWsdlUri($wsdlUri) - { - $this->_wsdlUri = $wsdlUri; - return $this; - } - - /** - * Return Wsdl Uri - * - * @return string - */ - public function getWsdlUri() - { - return $this->_wsdlUri; - } - - /** - * Set merchant info - * - * @param array $merchantInfo - * @return Mage_AmazonPayments_Model_Api_Cba_Document - */ - public function setMerchantInfo(array $merchantInfo = array()) - { - $this->_merchantInfo = $merchantInfo; - return $this; - } - - /** - * Return merchant info - * - * @return array - */ - public function getMerchantInfo() - { - return $this->_merchantInfo; - } - - /** - * Return merchant identifier - * - * @return string - */ - public function getMerchantIdentifier() - { - if (array_key_exists('merchantIdentifier', $this->_merchantInfo)) { - return $this->_merchantInfo['merchantIdentifier']; - } - return null; - } - - /** - * Return Soap object - * - * @return SOAP_Client - */ - public function getClient() - { - return $this->_client; - } - - /** - * Initialize Soap Client object and authorize - * - * @param string $login - * @param string $password - * @return Mage_AmazonPayments_Model_Api_Cba_Document - */ - public function init($login, $password) - { - if ($this->getWsdlUri()) { - $this->_client = null; - $auth = array('user' => $login, 'pass' => $password); - try { - set_include_path( - BP . DS . 'lib' . DS . 'PEAR' . PS . get_include_path() - ); - require_once 'SOAP/Client.php'; - $this->_client = new SOAP_Client($this->getWsdlUri(), true, false, $auth, false); - } catch (Exception $e) { - Zend_Debug::dump($e->getMessage()); - } - } - return $this; - } - - /** - * Create soap attachment (MIME encoding) - * - * @param string $document - * @return string - */ - protected function _createAttachment($document) - { - require_once 'SOAP/Value.php'; - $attachment = new SOAP_Attachment('doc', 'application/binary', null, $document); - $attachment->options['attachment']['encoding'] = '8bit'; - $this->_options['attachments'] = 'Mime'; - return $attachment; - } - - /** - * Proccess request and setting result - * - * @param string $method - * @param array $params - * @return Mage_AmazonPayments_Model_Api_Cba_Document - */ - protected function _proccessRequest($method, $params) - { - if ($this->getClient()) { - $this->_result = null; - $this->_proccessFailed = false; - try { - $this->_result = $this->getClient() - ->call($method, $params, $this->_options); - } catch (Exception $e) { - $this->_proccessFailed = true; - } - } - return $this; - } - - /** - * Format amount value (2 digits after the decimal point) - * - * @param float $amount - * @return float - */ - public function formatAmount($amount) - { - return Mage::helper('amazonpayments')->formatAmount($amount); - } - - /** - * Get order info - * - * @param string $aOrderId Amazon order id - * @return Varien_Simplexml_Element - */ - public function getDocument($aOrderId) - { - $params = array( - 'merchant' => $this->getMerchantInfo(), - 'documentIdentifier' => $aOrderId - ); - $this->_proccessRequest('getDocument', $params); - - require_once 'Mail/mimeDecode.php'; - $decoder = new Mail_mimeDecode($this->getClient()->xml); - $decoder->decode(array( - 'include_bodies' => true, - 'decode_bodies' => true, - 'decode_headers' => true, - )); - $xml = $decoder->_body; - - // remove the ending mime boundary - $boundaryIndex = strripos($xml, '--xxx-WASP-CPP-MIME-Boundary-xxx'); - if (!($boundaryIndex === false)) { - $xml = substr($xml, 0, $boundaryIndex); - } - - return simplexml_load_string($xml, 'Varien_Simplexml_Element'); - } - - /** - * Get pending orders - * - * @return array - */ - public function getPendingDocuments() - { - $params = array( - 'merchant' => $this->getMerchantInfo(), - 'messageType' => '_GET_ORDERS_DATA_' - ); - $this->_proccessRequest('getAllPendingDocumentInfo', $params); - if (!is_array($this->_result)) { - $this->_result = array($this->_result); - } - return $this->_result; - } - - /** - * Associate Magento real order id with Amazon order id - * - * @param Mage_Sales_Model_Order $order - * @return string - */ - public function sendAcknowledgement($order) - { - $_document = ' - -
- 1.01 - ' . $this->getMerchantIdentifier() . ' -
- OrderAcknowledgement - - 1 - Update - - ' . $order->getExtOrderId() . ' - ' . $order->getRealOrderId() . ' - Success - - -
'; - - $params = array( - 'merchant' => $this->getMerchantInfo(), - 'messageType' => self::MESSAGE_TYPE_ACKNOWLEDGEMENT, - 'doc' => $this->_createAttachment($_document) - ); - - $this->_proccessRequest('postDocument', $params); - return $this->_result; - } - - /** - * Cancel order - * - * @param Mage_Sales_Model_Order $order - * @return string Amazon Transaction Id - */ - public function cancel($order) - { - $_document = ' - -
- 1.01 - ' . $this->getMerchantIdentifier() . ' -
- OrderAcknowledgement - - 1 - Update - - ' . $order->getExtOrderId() . ' - Failure - - -
'; - - $params = array( - 'merchant' => $this->getMerchantInfo(), - 'messageType' => self::MESSAGE_TYPE_ACKNOWLEDGEMENT, - 'doc' => $this->_createAttachment($_document) - ); - - $this->_proccessRequest('postDocument', $params); - return $this->_result; - } - - /** - * Refund order - * - * @param Mage_Sales_Model_Order_Payment $payment - * @param float $amount - * @return string Amazon Transaction Id - */ - public function refund($payment, $amount) - { - $_document = ' - -
- 1.01 - ' . $this->getMerchantIdentifier() . ' -
- OrderAdjustment'; - - $_shippingAmount = $payment->getCreditmemo()->getShippingAmount(); - $_messageId = 1; - foreach ($payment->getCreditmemo()->getAllItems() as $item) { - /* @var $item Mage_Sales_Model_Order_Creditmemo_Item */ - if ($item->getOrderItem()->getParentItemId()) { - continue; - } - - $shipping = 0; - $amazon_amounts = unserialize($item->getOrderItem()->getProductOptionByCode('amazon_amounts')); - if ($amazon_amounts['shipping'] > $_shippingAmount) { - $shipping = $_shippingAmount; - } else { - $shipping = $amazon_amounts['shipping']; - } - $_shippingAmount -= $shipping; - - $_document .= ' - ' . $_messageId . ' - - ' . $payment->getOrder()->getExtOrderId() . ' - - '. $item->getOrderItem()->getExtOrderItemId() . ' - GeneralAdjustment - - - Principal - ' . $this->formatAmount($item->getBaseRowTotal()) . ' - - - Tax - ' . $this->formatAmount($item->getBaseTaxAmount()) . ' - ' - .' - Shipping - ' . $this->formatAmount($shipping) . ' - ' - .''; - $_document .= ' - - '; - $_messageId++; - } - - $_document .= '
'; - $params = array( - 'merchant' => $this->getMerchantInfo(), - 'messageType' => self::MESSAGE_TYPE_ADJUSTMENT, - 'doc' => $this->_createAttachment($_document) - ); - $this->_proccessRequest('postDocument', $params); - return $this->_result; - } - - /** - * Confirm creating of shipment - * - * @param string $aOrderId - * @param string $carrierName - * @param string $shippingMethod - * @param array $items - * @param string $trackNumber - * @return string Amazon Transaction Id - */ - public function confirmShipment($aOrderId, $carrierName, $shippingMethod, $items, $trackNumber = '') - { - $fulfillmentDate = gmdate('Y-m-d\TH:i:s'); - $_document = ' - -
- 1.01 - ' . $this->getMerchantIdentifier() . ' -
- OrderFulfillment - - 1 - - ' . $aOrderId . ' - ' . $fulfillmentDate . ' - - ' . strtoupper($carrierName) . ' - ' . $shippingMethod . ' - ' . $trackNumber .' - '; - foreach ($items as $item) { - $_document .= ' - ' . $item['id'] . ' - ' . $item['qty'] . ' - '; - } - $_document .= ' - -
'; - $params = array( - 'merchant' => $this->getMerchantInfo(), - 'messageType' => self::MESSAGE_TYPE_FULFILLMENT, - 'doc' => $this->_createAttachment($_document) - ); - $this->_proccessRequest('postDocument', $params); - return $this->_result; - } - - /** - * Send Tracking Number - * - * @param Mage_Sales_Model_Order $order - * @param string $carrierCode - * @param string $carrierMethod - * @param string $trackNumber - * @return string Amazon Transaction Id - */ - public function sendTrackNumber($order, $carrierCode, $carrierMethod, $trackNumber) - { - $fulfillmentDate = gmdate('Y-m-d\TH:i:s'); - $_document = ' - -
- 1.01 - ' . $this->getMerchantIdentifier() . ' -
- OrderFulfillment'; - $_document .= ' - 1 - - ' . $order->getExtOrderId() . ' - ' . $fulfillmentDate . ' - - ' . $carrierCode . ' - ' . $carrierMethod . ' - ' . $trackNumber .' - - - '; - $_document .= '
'; - $params = array( - 'merchant' => $this->getMerchantInfo(), - 'messageType' => self::MESSAGE_TYPE_FULFILLMENT, - 'doc' => $this->_createAttachment($_document) - ); - $this->_proccessRequest('postDocument', $params); - return $this->_result; - } -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Api/Debug.php b/app/code/core/Mage/AmazonPayments/Model/Api/Debug.php deleted file mode 100644 index 5835c511a8..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Api/Debug.php +++ /dev/null @@ -1,44 +0,0 @@ - - */ -class Mage_AmazonPayments_Model_Api_Debug extends Mage_Core_Model_Abstract -{ - /** - * Model initialization - * - */ - protected function _construct() - { - $this->_init('amazonpayments/api_debug'); - } -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Mysql4/Api/Debug.php b/app/code/core/Mage/AmazonPayments/Model/Mysql4/Api/Debug.php deleted file mode 100644 index 2ac7a9d44c..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Mysql4/Api/Debug.php +++ /dev/null @@ -1,45 +0,0 @@ - - */ - -class Mage_AmazonPayments_Model_Mysql4_Api_Debug extends Mage_Core_Model_Mysql4_Abstract -{ - /** - * Resource model initialization - */ - protected function _construct() - { - $this->_init('amazonpayments/api_debug', 'transaction_id'); - } -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Mysql4/Api/Debug/Collection.php b/app/code/core/Mage/AmazonPayments/Model/Mysql4/Api/Debug/Collection.php deleted file mode 100644 index 8052e0dc56..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Mysql4/Api/Debug/Collection.php +++ /dev/null @@ -1,45 +0,0 @@ - - */ -class Mage_AmazonPayments_Model_Mysql4_Api_Debug_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract -{ - /** - * Collection constructor - * - */ - protected function _construct() - { - $this->_init('amazonpayments/api_debug'); - } -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Mysql4/Setup.php b/app/code/core/Mage/AmazonPayments/Model/Mysql4/Setup.php deleted file mode 100644 index cf2ded6fb8..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Mysql4/Setup.php +++ /dev/null @@ -1,31 +0,0 @@ -getEvent()->getShipment(); - if ($shipment->getOrder()->getPayment()->getMethod() != 'amazonpayments_cba') { - return; - } - - Mage::getModel('amazonpayments/api_cba') - ->confirmShipment($shipment); - } - - public function salesOrderShipmentTrackSaveAfter(Varien_Event_Observer $observer) - { - $track = $observer->getEvent()->getTrack(); - $order = $track->getShipment()->getOrder(); - /* @var $order Mage_Sales_Model_Order */ - if ($order->getPayment()->getMethod() != 'amazonpayments_cba') { - return; - } - Mage::getModel('amazonpayments/api_cba') - ->sendTrackingNumber($order, $track); - } -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Payment.php b/app/code/core/Mage/AmazonPayments/Model/Payment.php deleted file mode 100644 index 29416b0265..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Payment.php +++ /dev/null @@ -1,54 +0,0 @@ -getRedirectUrl(); - } - - public function getRedirectUrl() - { - #Mage::exception($this, 'worldpay'); - #throw new Exception('qwe') - die('test2'); - $_url = Mage::getUrl('amazonepayments/redirect'); - echo "url: {$_url}
"; - return $_url; - } -} \ No newline at end of file diff --git a/app/code/core/Mage/AmazonPayments/Model/Payment/Asp.php b/app/code/core/Mage/AmazonPayments/Model/Payment/Asp.php deleted file mode 100644 index fe6667db61..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Payment/Asp.php +++ /dev/null @@ -1,435 +0,0 @@ - - */ -class Mage_AmazonPayments_Model_Payment_Asp extends Mage_Payment_Model_Method_Abstract -{ - /** - * rewrited for Mage_Payment_Model_Method_Abstract - */ - protected $_isGateway = false; - protected $_canAuthorize = false; - protected $_canCapture = true; - protected $_canCapturePartial = false; - protected $_canRefund = true; - protected $_canVoid = true; - protected $_canUseInternal = false; - protected $_canUseCheckout = true; - protected $_canUseForMultishipping = false; - protected $_isInitializeNeeded = true; - - /** - * rewrited for Mage_Payment_Model_Method_Abstract - */ - protected $_formBlockType = 'amazonpayments/asp_form'; - - /** - * rewrited for Mage_Payment_Model_Method_Abstract - */ - protected $_code = 'amazonpayments_asp'; - - /** - * current order - */ - protected $_order; - - /** - * Get value from the module config - * - * @param string $path - * @return string - */ - public function getConfig($path) - { - return Mage::getStoreConfig('payment/' . $this->_code . '/' . $path); - } - - - /** - * Get singleton with AmazonPayments ASP API Model - * - * @return Mage_AmazonPayments_Model_Api_Asp - */ - public function getApi() - { - return Mage::getSingleton('amazonpayments/api_asp'); - } - - /** - * Get singleton with AmazonPayments ASP Notification Model - * - * @return Mage_AmazonPayments_Model_Payment_Asp_Notification - */ - public function getNotification() - { - return Mage::getSingleton('amazonpayments/payment_asp_notification'); - } - - /** - * Set model of current order - * - * @param Mage_Sales_Model_Order $order - * @return Mage_AmazonPayments_Model_Payment_Asp - */ - public function setOrder($order) - { - $this->_order = $order; - return $this; - } - - /** - * Get model of current order - * - * @return Mage_Sales_Model_Order - */ - public function getOrder() - { - if (!$this->_order) { - $paymentInfo = $this->getInfoInstance(); - $this->_order = Mage::getModel('sales/order')->loadByIncrementId( - $paymentInfo->getOrder()->getRealOrderId() - ); - } - return $this->_order; - } - - /** - * Add item in to log storage - * - * @param string $request - * @param string $response - * @return Mage_AmazonPayments_Model_Payment_Asp - */ - protected function _log($request, $response = '') - { - $debug = Mage::getModel('amazonpayments/api_debug') - ->setRequestBody($request) - ->setResponseBody($response) - ->save(); - return $this; - } - - /** - * Send mail - * - * @param string $template - * @param array $variables - * @return Mage_AmazonPayments_Model_Payment_Asp - */ - protected function _mail($template, array $variables = array()) - { - $mailTemplate = Mage::getModel('core/email_template'); - $mailTemplate->setDesignConfig(array('area' => 'frontend')) - ->sendTransactional( - $this->getConfig($template), - $this->getConfig('email_sender_identity'), - $this->getConfig('report_email'), - null, - $variables - ); - return $this; - } - - /** - * rewrited for Mage_Payment_Model_Method_Abstract - */ - public function getOrderPlaceRedirectUrl() - { - return Mage::getUrl('amazonpayments/asp/pay'); - } - - /** - * Return Amazon Simple Pay payment url - * - * @return string - */ - public function getPayRedirectUrl() - { - return $this->getApi()->getPayUrl(); - } - - /** - * Return choice method description - * - * @return string - */ - public function getChoiceMethodDescription() - { - return $this->getConfig('choice_method_description'); - } - - /** - * Return redirect message - * - * @return string - */ - public function getRedirectMessage() - { - return $this->getConfig('redirect_message'); - } - - /** - * Return pay params for current order - * - * @return array - */ - public function getPayRedirectParams() - { - $orderId = $this->getOrder()->getRealOrderId(); - $amount = Mage::app()->getStore()->roundPrice($this->getOrder()->getBaseGrandTotal()); - $currencyCode = $this->getOrder()->getBaseCurrencyCode(); - - $urlModel = Mage::getModel('core/url') - ->setUseSession(false); - - return $this->getApi()->getPayParams( - $orderId, - $amount, - $currencyCode, - $urlModel->getUrl('amazonpayments/asp/returnCancel'), - $urlModel->getUrl('amazonpayments/asp/returnSuccess'), - $urlModel->getUrl('amazonpayments/asp/notification') - ); - } - - /** - * When a customer redirect to Amazon Simple Pay site - * - * @return Mage_AmazonPayments_Model_Payment_Asp - */ - public function processEventRedirect() - { - $this->getOrder()->addStatusToHistory( - $this->getOrder()->getStatus(), - Mage::helper('amazonpayments')->__('Customer was redirected to Amazon Simple Pay site') - )->save(); - return $this; - } - - /** - * When a customer successfully returned from Amazon Simple Pay site - * - * @return Mage_AmazonPayments_Model_Payment_Asp - */ - public function processEventReturnSuccess() - { - $this->getOrder()->sendNewOrderEmail(); - $this->getOrder()->addStatusToHistory( - $this->getOrder()->getStatus(), - Mage::helper('amazonpayments')->__('Customer successfully returned from Amazon Simple Pay site') - )->save(); - return $this; - } - - /** - * Customer canceled payment and successfully returned from Amazon Simple Pay site - * - * @return Mage_AmazonPayments_Model_Payment_Asp - */ - public function processEventReturnCancel() - { - $this->getOrder()->addStatusToHistory( - $this->getOrder()->getStatus(), - Mage::helper('amazonpayments')->__('Customer canceled payment and successfully returned from Amazon Simple Pay site') - )->save(); - return $this; - } - - /** - * rewrited for Mage_Payment_Model_Method_Abstract - */ - public function initialize($paymentAction, $stateObject) - { - $state = Mage_Sales_Model_Order::STATE_NEW; - $stateObject->setState($state); - $stateObject->setStatus(Mage::getSingleton('sales/order_config')->getStateDefaultStatus($state)); - $stateObject->setIsNotified(false); - return $this; - } - - /** - * process Amazon Simple Pay notification request - * - * @param array $requestParams - * @return bool - */ - public function processNotification($requestParams) - { - if ($this->getConfig('debug_log')) { - $this->_log('DEBUG ASP notification: ' . print_r($requestParams, 1)); - } - - try { - $this->getNotification()->setPayment($this)->process($requestParams); - } catch(Exception $e) { - if ($this->getConfig('error_log')) { - $this->_log('ERROR ASP notification: ' . print_r($requestParams, 1), $e->getMessage()); - } - - if ($this->getConfig('report_error_to_email')) { - $variables = array(); - $variables['request'] = print_r($requestParams, 1); - $variables['error'] = $e->getMessage(); - $this->_mail('email_template_notification_error', $variables); - } - - return false; - } - - return true; - } - - /** - * rewrited for Mage_Payment_Model_Method_Abstract - */ - public function capture(Varien_Object $payment, $amount) - { - if (is_null($payment->getCcTransId())) { - Mage::throwException( - Mage::helper('amazonpayments')->__('Order was not captured online. Authorization confirmation is required.') - ); - } - return $this; - } - - /** - * rewrited for Mage_Payment_Model_Method_Abstract - */ - public function processInvoice($invoice, $payment) - { - if (!is_null($payment->getCcTransId()) && - is_null($payment->getLastTransId()) && - is_null($invoice->getTransactionId())) { - - $amount = Mage::app()->getStore()->roundPrice($invoice->getBaseGrandTotal()); - $currencyCode = $payment->getOrder()->getBaseCurrencyCode(); - $transactionId = $payment->getCcTransId(); - $response = $this->getApi() - ->setStoreId($payment->getOrder()->getStoreId()) - ->capture($transactionId, $amount, $currencyCode); - - if ($response->getStatus() == Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract::STATUS_ERROR) { - Mage::throwException( - Mage::helper('amazonpayments')->__('Order was not captured. Amazon Simple Pay service error: [%s] %s', $response->getCode(), $response->getMessage()) - ); - } - - if ($response->getStatus() == Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract::STATUS_SUCCESS || - $response->getStatus() == Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract::STATUS_PENDING) { - - $payment->setForcedState(Mage_Sales_Model_Order_Invoice::STATE_OPEN); - $payment->setLastTransId($response->getTransactionId()); - - $invoice->setTransactionId($response->getTransactionId()); - $invoice->addComment(Mage::helper('amazonpayments')->__('Invoice was created (online capture). Waiting for capture confirmation from Amazon Simple Pay service.')); - - $payment->getOrder()->addStatusToHistory( - $payment->getOrder()->getStatus(), - Mage::helper('amazonpayments')->__('Payment was captured online with Amazon Simple Pay service. Invoice was created. Waiting for capture confirmation from payment service.') - ); - - } - } - return $this; - } - - /** - * rewrited for Mage_Payment_Model_Method_Abstract - */ - public function processCreditmemo($creditmemo, $payment) - { - - $transactionId = $creditmemo->getInvoice()->getTransactionId(); - - if (!is_null($transactionId) && - is_null($creditmemo->getTransactionId())) { - - $amount = Mage::app()->getStore()->roundPrice($creditmemo->getBaseGrandTotal()); - $currencyCode = $payment->getOrder()->getBaseCurrencyCode(); - $referenseID = $creditmemo->getInvoice()->getIncrementId(); - $response = $this->getApi() - ->setStoreId($payment->getOrder()->getStoreId()) - ->refund($transactionId, $amount, $currencyCode, $referenseID); - - if ($response->getStatus() == Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract::STATUS_ERROR) { - Mage::throwException( - Mage::helper('amazonpayments')->__('Invoice was not refunded. Amazon Simple Pay service error: [%s] %s', $response->getCode(), $response->getMessage()) - ); - } - - if ($response->getStatus() == Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract::STATUS_SUCCESS || - $response->getStatus() == Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract::STATUS_PENDING) { - - $creditmemo->setTransactionId($response->getTransactionId()); - $creditmemo->addComment(Mage::helper('amazonpayments')->__('Payment refunded online. Waiting for refund confirmation from Amazon Simple Pay service.')); - $creditmemo->setState(Mage_Sales_Model_Order_Creditmemo::STATE_OPEN); - - $payment->getOrder()->addStatusToHistory( - $payment->getOrder()->getStatus(), - Mage::helper('amazonpayments')->__('Payment refunded online with Amazon Simple Pay service. Creditmemo was created. Waiting for refund confirmation from Amazon Simple Pay service.') - ); - } - } - return $this; - } - - /** - * rewrited for Mage_Payment_Model_Method_Abstract - */ - public function cancel(Varien_Object $payment) - { - if (!is_null($payment->getCcTransId()) && - is_null($payment->getLastTransId())) { - - $transactionId = $payment->getCcTransId(); - $response = $this->getApi() - ->setStoreId($payment->getOrder()->getStoreId()) - ->cancel($transactionId); - - if ($response->getStatus() == Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract::STATUS_ERROR) { - Mage::throwException( - Mage::helper('amazonpayments')->__('Order was not cancelled. Amazon Simple Pay service error: [%s] %s', $response->getCode(), $response->getMessage()) - ); - } - - if ($response->getStatus() == Mage_AmazonPayments_Model_Api_Asp_Fps_Response_Abstract::STATUS_CANCELLED) { - $payment->getOrder()->setState( - Mage_Sales_Model_Order::STATE_CANCELED, - true, - Mage::helper('amazonpayments')->__('Payment authorization cancelled with Amazon Simple Pay service.'), - $notified = false - ); - } - } - return $this; - } -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Payment/Asp/Abstract.php b/app/code/core/Mage/AmazonPayments/Model/Payment/Asp/Abstract.php deleted file mode 100644 index 2bc0cbdf1b..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Payment/Asp/Abstract.php +++ /dev/null @@ -1,30 +0,0 @@ -getApi()->getFps()->refund($reserveTransactionId, $callerReference); - } - -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Payment/Asp/Notification.php b/app/code/core/Mage/AmazonPayments/Model/Payment/Asp/Notification.php deleted file mode 100644 index b0fcd369cd..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Payment/Asp/Notification.php +++ /dev/null @@ -1,544 +0,0 @@ - - */ -class Mage_AmazonPayments_Model_Payment_Asp_Notification extends Varien_Object -{ - /* - * payment Model - */ - protected $_payment; - - /** - * Set payment Model - * - * @param Mage_AmazonPayments_Model_Payment_Asp $payment - * @return Mage_AmazonPayments_Model_Payment_Asp_Notification - */ - public function setPayment($payment) - { - $this->_payment = $payment; - return $this; - } - - /** - * Get payment Model - * - * @return Mage_AmazonPayments_Model_Payment_Asp - */ - public function getPayment() - { - return $this->_payment; - } - - /** - * process notification request - * - * @param array $requestParams - */ - public function process($requestParams) - { - $request = $this->getPayment()->getApi()->processNotification($requestParams); - - if ($request->getStatus() == Mage_AmazonPayments_Model_Api_Asp_Ipn_Request::STATUS_CANCEL_TRANSACTION) { - return true; - } - - $order = $this->_getRequestOrder($request); - switch ($request->getStatus()) { - case Mage_AmazonPayments_Model_Api_Asp_Ipn_Request::STATUS_CANCEL_CUSTOMER: - $this->_processCancel($request, $order); - break; - case Mage_AmazonPayments_Model_Api_Asp_Ipn_Request::STATUS_RESERVE_SUCCESSFUL: - $this->_processReserveSuccess($request, $order); - break; - case Mage_AmazonPayments_Model_Api_Asp_Ipn_Request::STATUS_PAYMENT_INITIATED: - $this->_processPaymetInitiated($request, $order); - break; - case Mage_AmazonPayments_Model_Api_Asp_Ipn_Request::STATUS_PAYMENT_SUCCESSFUL: - $this->_processPaymentSuccessful($request, $order); - break; - case Mage_AmazonPayments_Model_Api_Asp_Ipn_Request::STATUS_PAYMENT_FAILED: - $this->_processPaymentFailed($request, $order); - break; - case Mage_AmazonPayments_Model_Api_Asp_Ipn_Request::STATUS_REFUND_SUCCESSFUL: - $this->_processRefundSuccessful($request, $order); - break; - case Mage_AmazonPayments_Model_Api_Asp_Ipn_Request::STATUS_REFUND_FAILED: - $this->_processRefundFailed($request, $order); - break; - case Mage_AmazonPayments_Model_Api_Asp_Ipn_Request::STATUS_SYSTEM_ERROR: - $this->_processSystemError($request, $order); - break; - } - } - - /** - * When a customer cancel payment - */ - protected function _processCancel($request, $order) - { - if ($order->isCanceled()) { - $order->addStatusToHistory( - $order->getStatus(), - Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed cancelation.') - )->save(); - return true; - } - - if ($order->getState() == Mage_Sales_Model_Order::STATE_NEW) { - $order->addStatusToHistory( - $order->getStatus(), - Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed cancelation.') - )->cancel()->save(); - return true; - } - - $this->_errorViolationSequenceStates($request, $order); - } - - /** - * When a authorize payment - */ - protected function _processReserveSuccess($request, $order) - { - if ($order->getState() != Mage_Sales_Model_Order::STATE_NEW) { - $this->_errorViolationSequenceStates($request, $order); - } - - $order->getPayment()->setCcTransId($request->getTransactionId()); - - $order->setState( - Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, - 'pending_amazon_asp', - Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed amount authorization.'), - $notified = false - )->save(); - - return true; - } - - /** - * When a initiation capture payment - */ - protected function _processPaymetInitiated($request, $order) - { - if ($order->getState() != Mage_Sales_Model_Order::STATE_NEW && - $order->getState() != Mage_Sales_Model_Order::STATE_PENDING_PAYMENT) { - $this->_errorViolationSequenceStates($request, $order); - } - - $order->setState( - Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, - 'pending_amazon_asp', - Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed capture initiation.'), - $notified = false - )->save(); - - return true; - } - - /** - * When a capture payment - */ - protected function _processPaymentSuccessful($request, $order) - { - if ($order->getState() != Mage_Sales_Model_Order::STATE_NEW && - $order->getState() != Mage_Sales_Model_Order::STATE_PENDING_PAYMENT && - $order->getState() != Mage_Sales_Model_Order::STATE_PROCESSING && - $order->getState() != Mage_Sales_Model_Order::STATE_COMPLETE) { - $this->_errorViolationSequenceStates($request, $order); - } - - if (!$invoice = $this->_getOrderInvoice($order)) { - - $orderAmount = Mage::app()->getStore()->roundPrice($order->getBaseGrandTotal()); - $requestAmount = Mage::app()->getStore()->roundPrice($request->getAmount()); - if ($orderAmount != $requestAmount) { - $this->_error( - Mage::helper('amazonpayments')->__('Amazon Simple Pay service capture confirmation error: confirmation request amount not equal to the amount of order.'), - $request, - $order - ); - } - - $invoice = $order->prepareInvoice(); - $invoice->register()->pay(); - $invoice->addComment(Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed payment capture. Invoice created automatically.')); - $invoice->setTransactionId($request->getTransactionId()); - - $order->getPayment()->setLastTransId($request->getTransactionId()); - $order->setState( - Mage_Sales_Model_Order::STATE_PROCESSING, - true, - Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed payment capture. Invoice %s was automatically created after confirmation.', $invoice->getIncrementId()), - $notified = true - ); - - $transactionSave = Mage::getModel('core/resource_transaction') - ->addObject($invoice) - ->addObject($invoice->getOrder()) - ->save(); - - } else { - - if ($invoice->getTransactionId() != $request->getTransactionId()) { - $this->_error( - Mage::helper('amazonpayments')->__('Amazon Simple Pay service capture confirmation error: existing transaction ID doesn\'t match transaction ID in the confirmation request.'), - $request, - $order - ); - } - - $invoiceAmount = Mage::app()->getStore()->roundPrice($invoice->getGrandTotal()); - $requestAmount = Mage::app()->getStore()->roundPrice($request->getAmount()); - if ($invoiceAmount != $requestAmount) { - $this->_error( - Mage::helper('amazonpayments')->__('Amazon Simple Pay service capture confirmation error: amount in the existing invoice doensn\'t match the amount in confirmation request.'), - $request, - $order - ); - } - - $msg = ''; - - switch ($invoice->getState()) - { - case Mage_Sales_Model_Order_Invoice::STATE_OPEN: - $invoice->addComment(Mage::helper('amazonpayments')->__('Amazon Simple Pay service capture confirmation. Invoice was captured automatically.')); - $invoice->setState(Mage_Sales_Model_Order_Invoice::STATE_PAID); - $msg = $msg . Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed capture for invoice %s. Invoice automatically captured.', $invoice->getIncrementId()); - break; - - case Mage_Sales_Model_Order_Invoice::STATE_PAID: - $invoice->addComment(Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed capture')); - $msg = $msg . Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed capture for invoice %s', $invoice->getIncrementId()); - break; - } - - $order->getPayment()->setLastTransId($request->getTransactionId()); - $order->setState( - Mage_Sales_Model_Order::STATE_PROCESSING, - true, - $msg, - $notified = true - ); - - $transactionSave = Mage::getModel('core/resource_transaction') - ->addObject($invoice) - ->addObject($order) - ->save(); - - } - - return true; - } - - /** - * When a failed capture payment - */ - protected function _processPaymentFailed($request, $order) - { - if ($order->getState() != Mage_Sales_Model_Order::STATE_NEW && - $order->getState() != Mage_Sales_Model_Order::STATE_PENDING_PAYMENT) { - $this->_errorViolationSequenceStates($request, $order); - } - - $order->setState( - Mage_Sales_Model_Order::STATE_CANCELED, - true, - Mage::helper('amazonpayments')->__('Amazon Simple Pay service payment confirmation failed'), - $notified = false - )->save(); - - return true; - } - - /** - * When a refund payment - */ - protected function _processRefundSuccessful($request, $order) - { - if ($order->getState() != Mage_Sales_Model_Order::STATE_PROCESSING && - $order->getState() != Mage_Sales_Model_Order::STATE_CLOSED && - $order->getState() != Mage_Sales_Model_Order::STATE_COMPLETE) { - $this->_errorViolationSequenceStates($request, $order); - } - - if (!$creditmemo = $this->_getOrderCreditmemo($order)) { - - $orderAmount = Mage::app()->getStore()->roundPrice($order->getBaseGrandTotal()); - $requestAmount = Mage::app()->getStore()->roundPrice($request->getAmount()); - if ($orderAmount != $requestAmount || $order->getBaseTotalRefunded() > 0) { - $this->_error( - Mage::helper('amazonpayments')->__('Amazon Simple Pay service refund confirmation error: confirmation request amount doesn\'t match the order amount.'), - $request, - $order - ); - } - - if ($creditmemo = $this->_initCreditmemo($order)) { - $creditmemo->setTransactionId($request->getTransactionId()); - $creditmemo->addComment(Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed payment refund. Creditmemo %s was automatically created after confirmation.', $creditmemo->getIncrementId())); - $creditmemo->register(); - - $transactionSave = Mage::getModel('core/resource_transaction') - ->addObject($creditmemo) - ->addObject($creditmemo->getOrder()); - if ($creditmemo->getInvoice()) { - $transactionSave->addObject($creditmemo->getInvoice()); - } - - $order->addStatusToHistory( - $order->getStatus(), - Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed payment refund. Credit memo created automatically.', $creditmemo->getIncrementId()) - ); - - $transactionSave->save(); - } - - } else { - - if ($creditmemo->getTransactionId() != $request->getTransactionId()) { - $this->_error( - Mage::helper('amazonpayments')->__('Amazon Simple Pay service refund confirmation error: transaction ID in the existing creditmemo doesn\'t match the transaction ID in the confirmation request.'), - $request, - $order - ); - } - - $creditmemoAmount = Mage::app()->getStore()->roundPrice($creditmemo->getBaseGrandTotal()); - $requestAmount = Mage::app()->getStore()->roundPrice($request->getAmount()); - if ($creditmemoAmount != $requestAmount) { - $this->_error( - Mage::helper('amazonpayments')->__('Amazon Simple Pay service refund confirmation error: amount in the existing creditmemo doensn\'t match the amount in confirmation request.'), - $request, - $order - ); - } - - $msg = ''; - - switch ($creditmemo->getState()) - { - case Mage_Sales_Model_Order_Creditmemo::STATE_OPEN: - $creditmemo->addComment(Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed refund. Creditmemo processed automatically.')); - $creditmemo->setState(Mage_Sales_Model_Order_Creditmemo::STATE_REFUNDED); - $msg = $msg . Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed refunded creditmemo %s. Creditmemo processed automatically.', $creditmemo->getIncrementId()); - break; - - case Mage_Sales_Model_Order_Creditmemo::STATE_REFUNDED: - $creditmemo->addComment(Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed refund.')); - $msg = $msg . Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed refund for creditmemo %s.', $creditmemo->getIncrementId()); - break; - } - - $order->addStatusToHistory( - $order->getStatus(), - Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmed payment refund. Credit memo created automatically.', $creditmemo->getIncrementId()) - ); - - $transactionSave = Mage::getModel('core/resource_transaction') - ->addObject($creditmemo) - ->addObject($order) - ->save(); - - } - - return true; - } - - /** - * When a failed refund payment - */ - protected function _processRefundFailed($request, $order) - { - $order->addStatusToHistory( - $order->getStatus(), - Mage::helper('amazonpayments')->__('Amazon Simple Pay service payment confirmation failed') - )->save(); - return true; - } - - /** - * When a Amazon Simple Pay system error - */ - protected function _processSystemError($request, $order) - { - $order->setState( - Mage_Sales_Model_Order::STATE_CANCELED, - true, - Mage::helper('amazonpayments')->__('Amazon Simple Pay service is not available. Payment was not processed.'), - $notified = false - )->save(); - - return true; - } - - /** - * Return order model for current request - * - * @param array $request - * @return Mage_Sales_Model_Order - */ - protected function _getRequestOrder($request) - { - $order = Mage::getModel('sales/order'); - $order->loadByIncrementId($request->getReferenceId()); - - if ($order->isEmpty()) { - $this->_error( - Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmation error: order specified in the IPN request can not be found'), - $request - ); - } - - if ($order->getPayment()->getMethodInstance()->getCode() != $this->getPayment()->getCode()) { - $this->_error( - Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmation error: payment method in the order is not Amazon Simple Pay'), - $request - ); - } - - if ($order->getBaseCurrency()->getCurrencyCode() != $request->getCurrencyCode()) { - $this->_error( - Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmation error: order currency does not match the currency of the IPN request'), - $request - ); - } - - return $order; - } - - /** - * Return invoice model for current order - * - * @param Mage_Sales_Model_Order $order - * @return Mage_Sales_Model_Order_Invoice - */ - protected function _getOrderInvoice($order) - { - foreach ($order->getInvoiceCollection() as $orderInvoice) { - if ($orderInvoice->getState() == Mage_Sales_Model_Order_Invoice::STATE_PAID || - $orderInvoice->getState() == Mage_Sales_Model_Order_Invoice::STATE_OPEN) { - return $orderInvoice->load($orderInvoice->getId()); - } - } - - return false; - } - - /** - * Create and return creditmemo for current order - * - * @param Mage_Sales_Model_Order $order - * @return Mage_Sales_Model_Order_Creditmemo - */ - protected function _initCreditMemo($order) - { - $invoice = $this->_getOrderInvoice($order); - - if (!$invoice) { - return false; - } - - $convertor = Mage::getModel('sales/convert_order'); - $creditmemo = $convertor->toCreditmemo($order)->setInvoice($invoice); - - foreach ($invoice->getAllItems() as $invoiceItem) { - $orderItem = $invoiceItem->getOrderItem(); - $item = $convertor->itemToCreditmemoItem($orderItem); - $item->setQty($orderItem->getQtyToRefund()); - $creditmemo->addItem($item); - } - - $creditmemo->setShippingAmount($invoice->getShippingAmount()); - $creditmemo->collectTotals(); - Mage::register('current_creditmemo', $creditmemo); - - return $creditmemo; - } - - /** - * Return creditmemo model for current order - * - * @param Mage_Sales_Model_Order $order - * @return Mage_Sales_Model_Order_Creditmemo - */ - protected function _getOrderCreditmemo($order) - { - foreach ($order->getCreditmemosCollection() as $orderCreditmemo) { - if ($orderCreditmemo->getState() == Mage_Sales_Model_Order_Creditmemo::STATE_REFUNDED || - $orderCreditmemo->getState() == Mage_Sales_Model_Order_Creditmemo::STATE_OPEN) { - return $orderCreditmemo->load($orderCreditmemo->getId()); - } - } - - return false; - } - - /** - * Process error: order states sequence violation - * - * @param array $request - * @param Mage_Sales_Model_Order $order - */ - protected function _errorViolationSequenceStates($request, $order) - { - $this->_error( - Mage::helper('amazonpayments')->__('Amazon Simple Pay service confirmation error: order states sequence violation'), - $request, - $order - ); - } - - /** - * Process error - * - * @param string $comment - * @param array $request - * @param Mage_Sales_Model_Order $order - */ - protected function _error($comment, $request, $order = null) - { - $message = $comment . Mage::helper('amazonpayments')->__('
Trace confirmation request:
%s', $request->toString()); - - if (!is_null($order)) { - $order->addStatusToHistory( - $order->getStatus(), - $message - )->save(); - } - - Mage::throwException($comment); - } -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Payment/Asp/Source/PaymentAction.php b/app/code/core/Mage/AmazonPayments/Model/Payment/Asp/Source/PaymentAction.php deleted file mode 100644 index 96104926e3..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Payment/Asp/Source/PaymentAction.php +++ /dev/null @@ -1,49 +0,0 @@ - - */ -class Mage_AmazonPayments_Model_Payment_Asp_Source_PaymentAction -{ - public function toOptionArray() - { - return array( - array( - 'value' => Mage_AmazonPayments_Model_Api_Asp_Abstract::PAY_ACTION_SETTLE, - 'label' => Mage::helper('amazonpayments')->__('Authorize Only') - ), - array( - 'value' => Mage_AmazonPayments_Model_Api_Asp_Abstract::PAY_ACTION_SETTLE_CAPTURE, - 'label' => Mage::helper('amazonpayments')->__('Authorize and Capture') - ), - ); - } -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Payment/Cba.php b/app/code/core/Mage/AmazonPayments/Model/Payment/Cba.php deleted file mode 100644 index fc60f1021c..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Payment/Cba.php +++ /dev/null @@ -1,598 +0,0 @@ -_api) { - $this->_api = Mage::getSingleton('amazonpayments/api_cba'); - $this->_api->setPaymentCode($this->getCode()); - } - return $this->_api; - } - - /** - * Get AmazonPayments session namespace - * - * @return Mage_AmazonPayments_Model_Session - */ - public function getSession() - { - return Mage::getSingleton('amazonpayments/session'); - } - - /** - * Retrieve redirect url - * - * @return string - */ - public function getRedirectUrl() - { - return Mage::getUrl('amazonpayments/cba/redirect'); - } - - /** - * Retrieve redirect to Amazon CBA url - * - * @return string - */ - public function getAmazonRedirectUrl() - { - return $this->getApi()->getAmazonRedirectUrl(); - } - - /** - * Authorize - * - * @param Varien_Object $orderPayment - * @return Mage_Payment_Model_Abstract - */ - public function authorize(Varien_Object $payment, $amount) - { - parent::authorize($payment, $amount); - return $this; - } - - /** - * Capture payment - * - * @param Varien_Object $orderPayment - * @return Mage_Payment_Model_Abstract - */ - public function capture(Varien_Object $payment, $amount) - { - parent::capture($payment, $amount); - return $this; - } - - public function processInvoice($invoice, $payment) - { - parent::processInvoice($invoice, $payment); - $invoice->addComment( - Mage::helper('amazonpayments')->__('Invoice was created with Checkout by Amazon.') - ); - return $this; - } - - public function cancel(Varien_Object $payment) - { - if ($this->_skipProccessDocument) { - return $this; - } - $this->getApi()->cancel($payment->getOrder()); - $payment->getOrder()->addStatusToHistory( - $payment->getOrder()->getStatus(), - Mage::helper('amazonpayments')->__('Order was canceled with Checkout by Amazon.') - ); - return $this; - } - - /** - * Refund order - * - * @param Varien_Object $payment - * @return Mage_AmazonPayments_Model_Payment_Cba - */ - public function refund(Varien_Object $payment, $amount) - { - if ($this->_skipProccessDocument) { - return $this; - } - $this->getApi()->refund($payment, $amount); - $payment->getCreditmemo()->addComment( - Mage::helper('amazonpayments')->__('Refund was created with Checkout by Amazon.') - ); - return $this; - } - - /** - * Handle Callback from CBA and calculate Shipping, Taxes in case XML-based shopping cart - * - */ - public function handleCallback($_request) - { - $response = ''; - - if (!empty($_request['order-calculations-request'])) { - $xmlRequest = urldecode($_request['order-calculations-request']); - - $session = $this->getCheckout(); - $xml = $this->getApi()->handleXmlCallback($xmlRequest, $session); - - if ($this->getDebug()) { - $debug = Mage::getModel('amazonpayments/api_debug') - ->setRequestBody(print_r($_request, 1)) - ->setResponseBody(time().' - request callback') - ->save(); - } - - if ($xml) { - $xmlText = $xml->asXML(); - $response .= 'order-calculations-response='.urlencode($xmlText); - #$response .= 'order-calculations-response='.base64_encode($xmlText); - - $secretKeyID = Mage::getStoreConfig('payment/amazonpayments_cba/secretkey_id'); - - $_signature = $this->getApi()->calculateSignature($xmlText, $secretKeyID); - - if ($_signature) { - $response .= '&Signature='.urlencode($_signature); - #$response .= '&Signature='.$_signature; - } - $response .= '&aws-access-key-id='.urlencode(Mage::getStoreConfig('payment/amazonpayments_cba/accesskey_id')); - - if ($this->getDebug()) { - $debug = Mage::getModel('amazonpayments/api_debug') - ->setResponseBody($response) - ->setRequestBody(time() .' - response calllback') - ->save(); - } - } - } else { - if ($this->getDebug()) { - $debug = Mage::getModel('amazonpayments/api_debug') - ->setRequestBody(print_r($_request, 1)) - ->setResponseBody(time().' - error request callback') - ->save(); - } - } - return $response; - } - - public function handleNotification($_request) - { - if (!empty($_request) && !empty($_request['NotificationData']) && !empty($_request['NotificationType'])) { - /** - * Debug - */ - if ($this->getDebug()) { - $debug = Mage::getModel('amazonpayments/api_debug') - ->setRequestBody(print_r($_request, 1)) - ->setResponseBody(time().' - Notification: '. $_request['NotificationType']) - ->save(); - } - switch ($_request['NotificationType']) { - case 'NewOrderNotification': - $newOrderDetails = $this->getApi()->parseOrder($_request['NotificationData']); - $this->_createNewOrder($newOrderDetails); - break; - case 'OrderReadyToShipNotification': - $orderReadyToShipDetails = $this->getApi()->parseOrder($_request['NotificationData']); - $this->_proccessOrder($orderReadyToShipDetails); - break; - case 'OrderCancelledNotification': - $cancelDetails = $this->getApi()->parseCancelNotification($_request['NotificationData']); - $this->_skipProccessDocument = true; - $this->_cancelOrder($cancelDetails); - $this->_skipProccessDocument = false; - break; - default: - // Unknown notification type - } - } else { - if ($this->getDebug()) { - $debug = Mage::getModel('amazonpayments/api_debug') - ->setRequestBody(print_r($_request, 1)) - ->setResponseBody(time().' - error request callback') - ->save(); - } - } - return $this; - } - - /** - * Create new order by data from Amazon NewOrderNotification - * - * @param array $newOrderDetails - */ - protected function _createNewOrder(array $newOrderDetails) - { - /* @var $order Mage_Sales_Model_Order */ - if (array_key_exists('amazonOrderID', $newOrderDetails)) { - $_order = Mage::getModel('sales/order') - ->loadByAttribute('ext_order_id', $newOrderDetails['amazonOrderID']); - if ($_order->getId()) { - /** - * associate real order id with Amazon order - */ - $this->getApi()->syncOrder($_order); - $_order = null; - return $this; - } - $_order = null; - } - $session = $this->getCheckout(); - - #$quoteId = $session->getAmazonQuoteId(); - - $quoteId = $newOrderDetails['ClientRequestId']; - $quote = Mage::getModel('sales/quote')->load($quoteId); - - $baseCurrency = $session->getQuote()->getBaseCurrencyCode(); - $currency = Mage::app()->getStore($session->getQuote()->getStoreId())->getBaseCurrency(); - - $shipping = $quote->getShippingAddress(); - $billing = $quote->getBillingAddress(); - - $_address = $newOrderDetails['shippingAddress']; - $this->_address = $_address; - - $regionModel = Mage::getModel('directory/region')->loadByCode($_address['regionCode'], $_address['countryCode']); - $_regionId = $regionModel->getId(); - - $sName = explode(' ', $newOrderDetails['shippingAddress']['name']); - $sFirstname = isset($sName[0])?$sName[0]:''; - $sLastname = isset($sName[1])?$sName[1]:''; - - $bName = explode(' ', $newOrderDetails['buyerName']); - $bFirstname = isset($bName[0])?$bName[0]:''; - $bLastname = isset($bName[1])?$bName[1]:''; - - $shipping->setCountryId($_address['countryCode']) - ->setRegion($_address['regionCode']) - ->setRegionId($_regionId) - ->setCity($_address['city']) - ->setStreet($_address['street']) - ->setPostcode($_address['postCode']) - ->setTaxAmount($newOrderDetails['tax']) - ->setBaseTaxAmount($newOrderDetails['tax']) - ->setShippingAmount($newOrderDetails['shippingAmount']) - ->setBaseShippingAmount($newOrderDetails['shippingAmount']) - ->setShippingTaxAmount($newOrderDetails['shippingTax']) - ->setBaseShippingTaxAmount($newOrderDetails['shippingTax']) - ->setDiscountAmount($newOrderDetails['discount']) - ->setBaseDiscountAmount($newOrderDetails['discount']) - ->setSubtotal($newOrderDetails['subtotal']) - ->setBaseSubtotal($newOrderDetails['subtotal']) - ->setGrandTotal($newOrderDetails['total']) - ->setBaseGrandTotal($newOrderDetails['total']) - ->setFirstname($sFirstname) - ->setLastname($sLastname); - - $_shippingDesc = ''; - $_shippingServices = unserialize($quote->getExtShippingInfo()); - if (is_array($_shippingServices) && array_key_exists('amazon_service_level', $_shippingServices)) { - foreach ($_shippingServices['amazon_service_level'] as $_level) { - if ($_level['service_level'] == $newOrderDetails['ShippingLevel']) { - $shipping->setShippingMethod($_level['code']); - $_shippingDesc = $_level['description']; - } - } - } - - $billing->setCountryId($_address['countryCode']) - ->setRegion($_address['regionCode']) - ->setRegionId($_regionId) - ->setCity($_address['city']) - ->setStreet($_address['street']) - ->setPostcode($_address['postCode']) - ->setTaxAmount($newOrderDetails['tax']) - ->setBaseTaxAmount($newOrderDetails['tax']) - ->setShippingAmount($newOrderDetails['shippingAmount']) - ->setBaseShippingAmount($newOrderDetails['shippingAmount']) - ->setShippingTaxAmount($newOrderDetails['shippingTax']) - ->setBaseShippingTaxAmount($newOrderDetails['shippingTax']) - ->setDiscountAmount($newOrderDetails['discount']) - ->setBaseDiscountAmount($newOrderDetails['discount']) - ->setSubtotal($newOrderDetails['subtotal']) - ->setBaseSubtotal($newOrderDetails['subtotal']) - ->setGrandTotal($newOrderDetails['total']) - ->setBaseGrandTotal($newOrderDetails['total']) - ->setFirstname($bFirstname) - ->setLastname($bLastname); - - $quote->setBillingAddress($billing); - $quote->setShippingAddress($shipping); - - $billing = $quote->getBillingAddress(); - $shipping = $quote->getShippingAddress(); - - $convertQuote = Mage::getModel('sales/convert_quote'); - /* @var $convertQuote Mage_Sales_Model_Convert_Quote */ - $order = Mage::getModel('sales/order'); - /* @var $order Mage_Sales_Model_Order */ - - $order = $convertQuote->addressToOrder($billing); - - // add payment information to order - $order->setBillingAddress($convertQuote->addressToOrderAddress($billing)) - ->setShippingAddress($convertQuote->addressToOrderAddress($shipping)); - - $order->setShippingMethod($shipping->getShippingMethod()) - ->setShippingDescription($_shippingDesc) - ->setForcedDoShipmentWithInvoice(true); - - $order->setPayment($convertQuote->paymentToOrderPayment($quote->getPayment())); - - /** - * Amazon Order Id - */ - $order->setExtOrderId($newOrderDetails['amazonOrderID']); - - // add items to order - foreach ($quote->getAllItems() as $item) { - /* @var $item Mage_Sales_Model_Quote_Item */ - $order->addItem($convertQuote->itemToOrderItem($item)); - /* @var $orderItem Mage_Sales_Model_Order_Item */ - $orderItem = $order->getItemByQuoteItemId($item->getId()); - $orderItem->setExtOrderItemId($newOrderDetails['items'][$item->getId()]['AmazonOrderItemCode']); - $orderItemOptions = $orderItem->getProductOptions(); - $orderItemOptions['amazon_amounts'] = serialize(array( - 'shipping' => $newOrderDetails['items'][$item->getId()]['shipping'], - 'tax' => $newOrderDetails['items'][$item->getId()]['tax'], - 'shipping_tax' => $newOrderDetails['items'][$item->getId()]['shipping_tax'], - 'principal_promo' => $newOrderDetails['items'][$item->getId()]['principal_promo'], - 'shipping_promo' => $newOrderDetails['items'][$item->getId()]['shipping_promo'] - )); - $orderItem->setProductOptions($orderItemOptions); - $orderItem->setLockedDoInvoice(true) - ->setLockedDoShip(true); - } - - $order->place(); - - $order->addStatusToHistory( - $order->getStatus(), - Mage::helper('amazonpayments')->__('New Order Notification received from Checkout by Amazon service.') - ); - - $customer = $quote->getCustomer(); - if ($customer && $customer->getId()) { - $order->setCustomerId($customer->getId()) - ->setCustomerEmail($customer->getEmail()) - ->setCustomerPrefix($customer->getPrefix()) - ->setCustomerFirstname($customer->getFirstname()) - ->setCustomerMiddlename($customer->getMiddlename()) - ->setCustomerLastname($customer->getLastname()) - ->setCustomerSuffix($customer->getSuffix()) - ->setCustomerGroupId($customer->getGroupId()) - ->setCustomerTaxClassId($customer->getTaxClassId()); - } else { - $quote->setCustomerEmail($newOrderDetails['buyerEmailAddress']) - ->setCustomerIsGuest(true) - ->setCustomerGroupId(Mage_Customer_Model_Group::NOT_LOGGED_IN_ID); - } - - $order->save(); - - $quote->setIsActive(false); - $quote->save(); - - $orderId = $order->getIncrementId(); - $this->getCheckout()->setLastQuoteId($quote->getId()); - $this->getCheckout()->setLastSuccessQuoteId($quote->getId()); - $this->getCheckout()->setLastOrderId($order->getId()); - $this->getCheckout()->setLastRealOrderId($order->getIncrementId()); - - $order->sendNewOrderEmail(); - /** - * associate real order id with Amazon order - */ - $this->getApi()->syncOrder($order); - return $this; - } - - /** - * Proccess existing order - * - * @param array $amazonOrderDetails - * @return boolean - */ - protected function _proccessOrder($amazonOrderDetails) - { - if (array_key_exists('amazon_order_id', $amazonOrderDetails)) { - $order = Mage::getModel('sales/order') - ->loadByAttribute('ext_order_id', $amazonOrderDetails['amazon_order_id']); - /* @var $order Mage_Sales_Model_Order */ - if ($order->getId()) { - /* @var $item Mage_Sales_Model_Order_Item */ - foreach ($order->getAllVisibleItems() as $item) { - if (array_key_exists($item->getExtOrderItemId(), $amazonOrderDetails['items'])) { - $item->setLockedDoInvoice(false) - ->setLockedDoShip(false) - ->save(); - } - } - $order->addStatusToHistory( - $order->getStatus(), - Mage::helper('amazonpayments')->__('Order Ready To Ship Notification received form Checkout by Amazon service.') - )->save(); - } - } - return true; - } - - /** - * Cancel the order - * - * @param array $amazonOrderDetails - * @return boolean - */ - protected function _cancelOrder($cancelDetails) - { - if (array_key_exists('amazon_order_id', $cancelDetails)) { - $order = Mage::getModel('sales/order') - ->loadByAttribute('ext_order_id', $cancelDetails['amazon_order_id']); - /* @var $order Mage_Sales_Model_Order */ - if ($order->getId()) { - try { - $order->cancel() - ->addStatusToHistory( - $order->getStatus(), - Mage::helper('amazonpayments')->__('Cancel Order Notification received from Checkout by Amazon service.') - )->save(); - } catch (Exception $e) { - return false; - } - } - } - return true; - } - - /** - * Return xml with error - * - * @param Exception $e - * @return string - */ - - public function callbackXmlError(Exception $e) - { - $_xml = $this->getApi()->callbackXmlError($e); - $secretKeyID = Mage::getStoreConfig('payment/amazonpayments_cba/secretkey_id'); - $_signature = $this->getApi()->calculateSignature($_xml->asXml(), $secretKeyID); - - $response = 'order-calculations-response='.urlencode($_xml->asXML()) - .'&Signature='.urlencode($_signature) - .'&aws-access-key-id='.urlencode(Mage::getStoreConfig('payment/amazonpayments_cba/accesskey_id')); - return $response; - } - - /** - * Prepare fields for XML-based signed cart form for CBA - * - * @return array - */ - public function getCheckoutXmlFormFields() - { - $secretKeyID = Mage::getStoreConfig('payment/amazonpayments_cba/secretkey_id'); - $_quote = $this->getCheckout()->getQuote(); - - $xml = $this->getApi()->getXmlCart($_quote); - - $xmlCart = array('order-input' => - "type:merchant-signed-order/aws-accesskey/1;" - ."order:".base64_encode($xml).";" - ."signature:{$this->getApi()->calculateSignature($xml, $secretKeyID)};" - ."aws-access-key-id:".Mage::getStoreConfig('payment/amazonpayments_cba/accesskey_id') - ); - if ($this->getDebug()) { - $debug = Mage::getModel('amazonpayments/api_debug') - ->setResponseBody(print_r($xmlCart, 1)."\norder:".$xml) - ->setRequestBody(time() .' - xml cart') - ->save(); - } - return $xmlCart; - } - - /** - * Return CBA order details in case Html-based shopping cart commited to Amazon - * - */ - public function returnAmazon() - { - $_request = Mage::app()->getRequest()->getParams(); - #$_amazonOrderId = Mage::app()->getRequest()->getParam('amznPmtsOrderIds'); - #$_quoteId = Mage::app()->getRequest()->getParam('amznPmtsReqId'); - - if ($this->getDebug()) { - $debug = Mage::getModel('amazonpayments/api_debug') - ->setRequestBody(print_r($_request, 1)) - ->setResponseBody(time().' - success') - ->save(); - } - } - - /** - * Rewrite standard logic - * - * @return bool - */ - public function isInitializeNeeded() - { - return false; - } - - /** - * Get debug flag - * - * @return string - */ - public function getDebug() - { - return Mage::getStoreConfig('payment/' . $this->getCode() . '/debug_flag'); - } -} diff --git a/app/code/core/Mage/AmazonPayments/Model/Session.php b/app/code/core/Mage/AmazonPayments/Model/Session.php deleted file mode 100644 index 852930cb83..0000000000 --- a/app/code/core/Mage/AmazonPayments/Model/Session.php +++ /dev/null @@ -1,39 +0,0 @@ - - */ -class Mage_AmazonPayments_Model_Session extends Mage_Core_Model_Session_Abstract -{ - public function __construct() - { - $this->init('amazonpayments'); - } -} diff --git a/app/code/core/Mage/AmazonPayments/controllers/AspController.php b/app/code/core/Mage/AmazonPayments/controllers/AspController.php deleted file mode 100644 index cf5d9c5015..0000000000 --- a/app/code/core/Mage/AmazonPayments/controllers/AspController.php +++ /dev/null @@ -1,155 +0,0 @@ - - */ -class Mage_AmazonPayments_AspController extends Mage_Core_Controller_Front_Action -{ - /** - * Get singleton with payment model AmazonPayments ASP - * - * @return Mage_AmazonPayments_Model_Payment_Asp - */ - public function getPayment() - { - return Mage::getSingleton('amazonpayments/payment_asp'); - } - - /** - * Get singleton with model checkout session - * - * @return Mage_Checkout_Model_Session - */ - public function getSession() - { - return Mage::getSingleton('checkout/session'); - } - - /** - * When a customer press "Place Order" button on Checkout/Review page - * Redirect customer to Amazon Simple Pay payment interface - * - */ - public function payAction() - { - $session = $this->getSession(); - $quoteId = $session->getQuoteId(); - $lastRealOrderId = $session->getLastRealOrderId(); - if (is_null($quoteId) || is_null($lastRealOrderId)){ - $this->_redirect('checkout/cart/'); - } else { - $session->setAmazonAspQuoteId($quoteId); - $session->setAmazonAspLastRealOrderId($lastRealOrderId); - - $order = Mage::getModel('sales/order'); - $order->loadByIncrementId($lastRealOrderId); - - $payment = $this->getPayment(); - $payment->setOrder($order); - $payment->processEventRedirect(); - - Mage::register('amazonpayments_payment_asp', $payment); - $this->loadLayout(); - $this->renderLayout(); - - $quote = $session->getQuote(); - $quote->setIsActive(false); - $quote->save(); - - $session->setQuoteId(null); - $session->setLastRealOrderId(null); - } - } - - /** - * When a customer successfully returned from Amazon Simple Pay site - * Redirect customer to Checkout/Success page - * - */ - public function returnSuccessAction() - { - $session = $this->getSession(); - - $orderId = $session->getAmazonAspLastRealOrderId(); - $quoteId = $session->getAmazonAspQuoteId(true); - - $order = Mage::getModel('sales/order'); - $order->loadByIncrementId($orderId); - - if ($order->isEmpty()) { return false; - } - - $payment = $this->getPayment(); - $payment->setOrder($order); - $payment->processEventReturnSuccess(); - - $session->setQuoteId($quoteId); - $session->getQuote()->setIsActive(false)->save(); - $session->setLastRealOrderId($orderId); - - $this->_redirect('checkout/onepage/success'); - } - - /** - * Customer canceled payment and successfully returned from Amazon Simple Pay site - * Redirect customer to Shopping Cart page - * - */ - public function returnCancelAction() - { - $session = $this->getSession(); - $session->setQuoteId($session->getAmazonAspQuoteId(true)); - - $order = Mage::getModel('sales/order'); - $order->loadByIncrementId($session->getAmazonAspLastRealOrderId()); - - if ($order->isEmpty()) { - return false; - } - - $payment = $this->getPayment(); - $payment->setOrder($order); - $payment->processEventReturnCancel(); - - $this->_redirect('checkout/cart/'); - } - - /** - * Amazon Simple Pay service send notification - * - */ - public function notificationAction() - { - if (!$this->getPayment()->processNotification($this->getRequest()->getParams())) { - $this->_forward('noRoute'); - } - } -} diff --git a/app/code/core/Mage/AmazonPayments/controllers/CbaController.php b/app/code/core/Mage/AmazonPayments/controllers/CbaController.php deleted file mode 100644 index a3e94833b9..0000000000 --- a/app/code/core/Mage/AmazonPayments/controllers/CbaController.php +++ /dev/null @@ -1,167 +0,0 @@ -getCba()->isAvailable()) { - $this->_redirect('checkout/cart/'); - } - $session = $this->getCheckout(); - if ($quoteId = $this->getCheckout()->getQuoteId()) { - $quote = Mage::getModel('sales/quote')->load($quoteId); - - /** @var $quote Mage_Sales_Model_Quote */ - if ($quote->hasItems()) { - $session->setAmazonQuoteId($quoteId); - - $quote->getPayment()->setMethod($this->getCba()->getCode()); - $quote->setIsActive(false); - $quote->save(); - - $this->getResponse()->setBody($this->getLayout()->createBlock('amazonpayments/cba_redirect')->toHtml()); - - if ($session->hasData('quote_id_'.Mage::app()->getStore()->getWebsiteId())) { - $session->unsetData('quote_id_'.Mage::app()->getStore()->getWebsiteId()); - } - } else { - $this->_redirect('checkout/cart/'); - } - } else { - $this->_redirect('checkout/cart/'); - } - } - - /** - * When a customer has checkout on Amazon and return with Successful payment - * - */ - public function successAction() - { - #$amazonOrderID = Mage::app()->getRequest()->getParam('amznPmtsOrderIds'); - #$referenceId = Mage::app()->getRequest()->getParam('amznPmtsOrderIds'); - - $this->getCba()->returnAmazon(); - - $this->loadLayout(); - #$this->_initLayoutMessages('amazonpayments/session'); - $this->renderLayout(); - } - - /** - * When Amazon return callback request for calculation shipping, taxes and etc. - * - */ - public function callbackAction() - { - $response = ''; - $session = $this->getCheckout(); - - $_request = Mage::app()->getRequest()->getParams(); - - try { - if ($_request) { - $response = $this->getCba()->handleCallback($_request); - } else { - $e = new Exception('Inavlid Shipping Address'); - } - } - catch (Exception $e) { - // Return Xml with Error - $response = $this->getCba()->callbackXmlError($e); - } - echo $response; - exit(0); - } - - public function notificationAction() - { - $response = ''; - $session = $this->getCheckout(); - - $_request = Mage::app()->getRequest()->getParams(); - - try { - $this->getCba() - ->handleNotification($_request); - } - catch (Exception $e) { - // Return Xml with Error - $response = $this->getCba()->callbackXmlError($e); - } - $this->getResponse() - ->setHttpResponseCode(200); - } - - /** - * When a customer has checkout on Amazon and return with Cancel - * - */ - public function cancelAction() - { - $session = $this->getCheckout(); - if ($quoteId = $session->getAmazonQuoteId()) { - $quote = Mage::getModel('sales/quote')->load($quoteId); - $quote->setIsActive(true); - $quote->save(); - $session->setQuoteId($quoteId); - } - if ($this->getCba()->getDebug()) { - $_request = Mage::app()->getRequest()->getParams(); - $debug = Mage::getModel('amazonpayments/api_debug') - ->setResponseBody(print_r($_request, 1)) - ->setRequestBody(time() .' - cancel') - ->save(); - } - $this->_redirect('checkout/cart/'); - } - -} diff --git a/app/code/core/Mage/AmazonPayments/etc/config.xml b/app/code/core/Mage/AmazonPayments/etc/config.xml deleted file mode 100644 index f09c7b187d..0000000000 --- a/app/code/core/Mage/AmazonPayments/etc/config.xml +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - 0.1.2 - - - - - - Mage_AmazonPayments_Model - amazonpayments_mysql4 - - - Mage_AmazonPayments_Model_Mysql4 - - amazonpayments_api_debug
-
-
-
- - - Mage_AmazonPayments_Helper - - - - - - Mage_AmazonPayments - Mage_AmazonPayments_Model_Mysql4_Setup - - - - - Mage_AmazonPayments_Block - - - - - - - - - - - - - - - - - -
- - - - - - - - Mage_AmazonPayments.csv - - - - - - - standard - - Mage_AmazonPayments - amazonpayments - - - - - - - amazonpayments.xml - - - - - - - - - - - Mage_AmazonPayments.csv - - - - - - - - - model - amazonpayments/observer - confirmShipment - - - - - - - model - amazonpayments/observer - salesOrderShipmentTrackSaveAfter - - - - - - - - - - - 0 - amazonpayments/payment_cba - Checkout by Amazon - pending - 0 - Authorization - - - 1 - - - https://payments.amazon.com/checkout/ - https://payments-sandbox.amazon.com/checkout/ - http://g-ecx.images-amazon.com/images/G/01/cba/images/buttons/btn_Chkout-orange-medium.gif - https://merchant-api.amazon.com/gateway/merchant-interface-mime/ - 1 - 0 - - - - - amazonpayments/payment_asp - Amazon Simple Pay - 0 - - 1 - - - - https://authorize.payments.amazon.com/pba/paypipeline - https://authorize.payments-sandbox.amazon.com/pba/paypipeline - - Your billing address will be ignored and you will be redirected to Amazon Simple Pay website. - You will be redirected to Amazon Simple Pay in a few seconds. - MAGENTO ASP PAYMENT - MAGENTO ASP REFUND - MAGENTO ASP CANCEL - - 1 - 0 - - 1 - - https://fps.amazonaws.com - https://fps.sandbox.amazonaws.com/ - - general - payment_amazonpayments_asp_email_template_notification_error - 0 - - 0 - 0 - - - - - - - -
diff --git a/app/code/core/Mage/AmazonPayments/etc/system.xml b/app/code/core/Mage/AmazonPayments/etc/system.xml deleted file mode 100644 index 2878ba5a15..0000000000 --- a/app/code/core/Mage/AmazonPayments/etc/system.xml +++ /dev/null @@ -1,443 +0,0 @@ - - - - - - - - - -
-
-


Signing up with Checkout by Amazon

-

To configure Checkout by Amazon™ you will need to enter your Checkout by Amazon™ Merchant ID, Access Key ID, and Secret Access Key.

-

If you do not already have a Checkout by Amazon™ account, click here to create one now. Sign-Up

-

To locate your Merchant ID, sign in to your Seller Central Checkout by Amazon™ account and click Settings > Checkout Pipeline Settings.

-

To locate your Access Key ID and Secret Access Key, sign in to your Seller Central Checkout by Amazon™ account and click Integration > AWS Key. Click the link to read the Amazon Web Services Customer Agreement, and then click the check box, if you are setting up a new Access Key ID.

-

To enable XML Order Reports click Settings > Checkout Pipeline Settings, and then clicking Edit under the Order Report Settings section. Select Order Report Type as XML to get XML Order Reports using SOAP APIs. Configure your downloads for hourly.

-

For additional information on setting up your Checkout by Amazon account, Click Here - FAQ.

-


Signup for Checkout by Amazon

-
-
-]]>
- text - 601 - 1 - 1 - 1 - - - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>2</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - - - - select - adminhtml/system_config_source_yesno - 10 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 12 - 1 - 1 - 0 - - - - - select - adminhtml/system_config_source_yesno - 14 - 1 - 1 - 0 - - - - text - 20 - 1 - 1 - 0 - - - - text - 21 - 1 - 1 - 0 - - - - text - 30 - 1 - 1 - 0 - - - - text - 40 - 1 - 1 - 0 - - - - text - 45 - 1 - 1 - 0 - - - - text - 50 - 1 - 1 - 0 - - - - text - 55 - 1 - 1 - 0 - - - - - select - adminhtml/system_config_source_order_status_new - 70 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 91 - 0 - 0 - 0 - - - - select - amazonpayments/adminhtml_shipping_methods - adminhtml/system_config_backend_serialized - 100 - 1 - 1 - 0 - - - - select - amazonpayments/adminhtml_shipping_methods - adminhtml/system_config_backend_serialized - 110 - 1 - 1 - 0 - - - - select - amazonpayments/adminhtml_shipping_methods - adminhtml/system_config_backend_serialized - 120 - 1 - 1 - 0 - - - - select - amazonpayments/adminhtml_shipping_methods - adminhtml/system_config_backend_serialized - 130 - 1 - 1 - 0 - - -
- - - -
-
-


Signing up with Amazon Simple Pay

-

To configure your Amazon Alternate Payment Method (Amazon Simple Pay), you will need to enter your Amazon Web Services Access Key ID, and Secret Access Key.

-

If you do not already have an Amazon Payments Business account, click here to create one now. Sign-Up.

-

To locate your Amazon Web Services Access Key ID and Secret Key ID, sign in to your AWS account and click Your Account > Access Identifiers. Don't have an AWS account? Log in to aws.amazon.com and setup an AWS account.

-

For additional information on setting up your Amazon Simple Pay, Click Here - FAQ.

-


Signup for Amazon Simple Pay

-
-
-]]>
- text - 601 - 1 - 1 - 1 - - - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>2</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - - - - select - adminhtml/system_config_source_yesno - 9 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 10 - 1 - 1 - 0 - - - - select - - amazonpayments/payment_asp_source_paymentAction - 11 - 1 - 1 - 0 - - - - text - 12 - 1 - 1 - 0 - - - - text - 13 - 1 - 1 - 0 - - - - text - 15 - 0 - 0 - 0 - - - - text - 16 - 0 - 0 - 0 - - - - select - adminhtml/system_config_source_yesno - 19 - 1 - 1 - 0 - Automatically redirect after payment to success page - - - - text - 21 - 0 - 0 - 0 - - - - text - 22 - 0 - 0 - 0 - - - - - text - 30 - 1 - 1 - 1 - - - - text - 31 - 1 - 1 - 1 - - - - text - 32 - 1 - 1 - 1 - - - - text - 33 - 1 - 1 - 1 - - - - text - 34 - 1 - 1 - 1 - - - - text - 35 - 1 - 1 - 1 - - - - text - 36 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_email_identity - 37 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_email_template - 38 - 1 - 1 - 1 - - - - select - adminhtml/system_config_source_yesno - 39 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 40 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 41 - 1 - 1 - 0 - - -
-
-
-
-
diff --git a/app/code/core/Mage/AmazonPayments/sql/amazonpayments_setup/mysql4-install-0.1.2.php b/app/code/core/Mage/AmazonPayments/sql/amazonpayments_setup/mysql4-install-0.1.2.php deleted file mode 100644 index 49ac50490a..0000000000 --- a/app/code/core/Mage/AmazonPayments/sql/amazonpayments_setup/mysql4-install-0.1.2.php +++ /dev/null @@ -1,45 +0,0 @@ -startSetup(); - -$installer->run(" -CREATE TABLE `{$this->getTable('amazonpayments_api_debug')}` ( - `debug_id` int(10) unsigned NOT NULL auto_increment, - `transaction_id` varchar(255) NOT NULL default '', - `debug_at` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `request_body` text, - `response_body` text, - PRIMARY KEY (`debug_id`), - KEY `debug_at` (`debug_at`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - "); - -$installer->endSetup(); diff --git a/app/code/core/Mage/AmazonPayments/sql/amazonpayments_setup/mysql4-upgrade-0.1.0-0.1.1.php b/app/code/core/Mage/AmazonPayments/sql/amazonpayments_setup/mysql4-upgrade-0.1.0-0.1.1.php deleted file mode 100644 index 49ac50490a..0000000000 --- a/app/code/core/Mage/AmazonPayments/sql/amazonpayments_setup/mysql4-upgrade-0.1.0-0.1.1.php +++ /dev/null @@ -1,45 +0,0 @@ -startSetup(); - -$installer->run(" -CREATE TABLE `{$this->getTable('amazonpayments_api_debug')}` ( - `debug_id` int(10) unsigned NOT NULL auto_increment, - `transaction_id` varchar(255) NOT NULL default '', - `debug_at` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `request_body` text, - `response_body` text, - PRIMARY KEY (`debug_id`), - KEY `debug_at` (`debug_at`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - "); - -$installer->endSetup(); diff --git a/app/code/core/Mage/AmazonPayments/sql/amazonpayments_setup/mysql4-upgrade-0.1.1-0.1.2.php b/app/code/core/Mage/AmazonPayments/sql/amazonpayments_setup/mysql4-upgrade-0.1.1-0.1.2.php deleted file mode 100644 index 5852a8d0ff..0000000000 --- a/app/code/core/Mage/AmazonPayments/sql/amazonpayments_setup/mysql4-upgrade-0.1.1-0.1.2.php +++ /dev/null @@ -1,45 +0,0 @@ -startSetup(); - -$installer->run(" -CREATE TABLE IF NOT EXISTS `{$this->getTable('amazonpayments_api_debug')}` ( - `debug_id` int(10) unsigned NOT NULL auto_increment, - `transaction_id` varchar(255) NOT NULL default '', - `debug_at` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `request_body` text, - `response_body` text, - PRIMARY KEY (`debug_id`), - KEY `debug_at` (`debug_at`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - "); - -$installer->endSetup(); diff --git a/app/code/core/Mage/Bundle/Model/Mysql4/Indexer/Price.php b/app/code/core/Mage/Bundle/Model/Mysql4/Indexer/Price.php index 314a3536aa..ba098363c2 100644 --- a/app/code/core/Mage/Bundle/Model/Mysql4/Indexer/Price.php +++ b/app/code/core/Mage/Bundle/Model/Mysql4/Indexer/Price.php @@ -315,7 +315,7 @@ protected function _calculateBundleOptionPrice() $this->_prepareDefaultFinalPriceTable(); - $minPrice = new Zend_Db_Expr("IF(SUM(io.min_price) = 0, SUM(io.alt_price), SUM(io.min_price)) + i.price"); + $minPrice = new Zend_Db_Expr("IF(SUM(io.min_price) = 0, MIN(io.alt_price), SUM(io.min_price)) + i.price"); $maxPrice = new Zend_Db_Expr("SUM(io.max_price) + i.price"); $tierPrice = new Zend_Db_Expr("IF(i.tier_percent IS NOT NULL, IF(SUM(io.tier_price) = 0, " . "SUM(io.alt_tier_price), SUM(io.tier_price)) + i.tier_price, NULL)"); @@ -444,16 +444,6 @@ protected function _prepareBundlePrice($entityIds = null) return $this; } - /** - * Retrieve table name for product tier price index - * - * @return string - */ - protected function _getTierPriceIndexTable() - { - return $this->getIdxTable($this->getValueTable('catalog/product', 'tier_price')); - } - /** * Prepare percentage tier price for bundle products * diff --git a/app/code/core/Mage/Bundle/Model/Mysql4/Indexer/Stock.php b/app/code/core/Mage/Bundle/Model/Mysql4/Indexer/Stock.php index 5c45e6b94d..e2dab72c3d 100644 --- a/app/code/core/Mage/Bundle/Model/Mysql4/Indexer/Stock.php +++ b/app/code/core/Mage/Bundle/Model/Mysql4/Indexer/Stock.php @@ -101,7 +101,6 @@ protected function _prepareBundleOptionStockData($entityIds = null, $usePrimaryT 'e.entity_id = bs.product_id', array()) ->where('cw.website_id != 0') - ->where('bo.required = ?', 1) ->group(array('bo.parent_id', 'cw.website_id', 'cis.stock_id', 'bo.option_id')) ->columns(array( 'option_id' => 'bo.option_id', @@ -112,9 +111,19 @@ protected function _prepareBundleOptionStockData($entityIds = null, $usePrimaryT $select->where('bo.parent_id IN(?)', $entityIds); } + // clone select for bundle product without required bundle options + $selectNonRequired = clone $select; + + $select->where('bo.required = ?', 1); + $selectNonRequired->where('bo.required = ?', 0) + ->having('`status` = 1'); + $query = $select->insertFromSelect($this->_getBundleOptionTable()); $adapter->query($query); + $query = $selectNonRequired->insertFromSelect($this->_getBundleOptionTable()); + $adapter->query($query); + return $this; } diff --git a/app/code/core/Mage/Bundle/Model/Product/Price.php b/app/code/core/Mage/Bundle/Model/Product/Price.php index 1084ca067f..28def09259 100644 --- a/app/code/core/Mage/Bundle/Model/Product/Price.php +++ b/app/code/core/Mage/Bundle/Model/Product/Price.php @@ -146,6 +146,7 @@ public function getPrices($product, $which = null) } $options = $this->getOptions($product); + $minPriceFounded = false; if ($options) { foreach ($options as $option) { @@ -174,8 +175,12 @@ public function getPrices($product, $which = null) } if (count($selectionMinimalPrices)) { + $selMinPrice = min($selectionMinimalPrices); if ($option->getRequired()) { - $minimalPrice += min($selectionMinimalPrices); + $minimalPrice += $selMinPrice; + $minPriceFounded = true; + } elseif (true !== $minPriceFounded) { + $minPriceFounded = false === $minPriceFounded ? $selMinPrice : min($minPriceFounded, $selMinPrice); } if ($option->isMultiSelection()) { @@ -187,6 +192,10 @@ public function getPrices($product, $which = null) } } } + // condition is TRUE when all product options are NOT required + if (! is_bool($minPriceFounded)) { + $minimalPrice = $minPriceFounded; + } if ($product->getPriceType() == self::PRICE_TYPE_DYNAMIC) { $minimalPrice = $this->_applySpecialPrice($product, $minimalPrice); diff --git a/app/code/core/Mage/Catalog/Block/Category/View.php b/app/code/core/Mage/Catalog/Block/Category/View.php index f12ac57b14..8379330934 100644 --- a/app/code/core/Mage/Catalog/Block/Category/View.php +++ b/app/code/core/Mage/Catalog/Block/Category/View.php @@ -40,15 +40,19 @@ protected function _prepareLayout() $this->getLayout()->createBlock('catalog/breadcrumbs'); if ($headBlock = $this->getLayout()->getBlock('head')) { - if ($title = $this->getCurrentCategory()->getMetaTitle()) { + $category = $this->getCurrentCategory(); + if ($title = $category->getMetaTitle()) { $headBlock->setTitle($title); } - if ($description = $this->getCurrentCategory()->getMetaDescription()) { + if ($description = $category->getMetaDescription()) { $headBlock->setDescription($description); } - if ($keywords = $this->getCurrentCategory()->getMetaKeywords()) { + if ($keywords = $category->getMetaKeywords()) { $headBlock->setKeywords($keywords); } + if ($this->helper('catalog/category')->canUseCanonicalTag()) { + $headBlock->addLinkRel('canonical', $category->getUrl()); + } /* want to show rss feed in the url */ @@ -105,18 +109,43 @@ public function getCmsBlockHtml() return $this->getData('cms_block_html'); } + /** + * Check if category display mode is "Products Only" + * @return bool + */ public function isProductMode() { return $this->getCurrentCategory()->getDisplayMode()==Mage_Catalog_Model_Category::DM_PRODUCT; } + /** + * Check if category display mode is "Static Block and Products" + * @return bool + */ public function isMixedMode() { return $this->getCurrentCategory()->getDisplayMode()==Mage_Catalog_Model_Category::DM_MIXED; } + /** + * Check if category display mode is "Static Block Only" + * For anchor category with applied filter Static Block Only mode not allowed + * + * @return bool + */ public function isContentMode() { - return $this->getCurrentCategory()->getDisplayMode()==Mage_Catalog_Model_Category::DM_PAGE; + $category = $this->getCurrentCategory(); + $res = false; + if ($category->getDisplayMode()==Mage_Catalog_Model_Category::DM_PAGE) { + $res = true; + if ($category->getIsAnchor()) { + $state = Mage::getSingleton('catalog/layer')->getState(); + if ($state && $state->getFilters()) { + $res = false; + } + } + } + return $res; } } 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 d25f4ec9f9..bd59edbf10 100644 --- a/app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php +++ b/app/code/core/Mage/Catalog/Block/Product/List/Toolbar.php @@ -139,6 +139,11 @@ class Mage_Catalog_Block_Product_List_Toolbar extends Mage_Core_Block_Template */ protected $_defaultAvailableLimit = array(10=>10,20=>20,50=>50); + /** + * @var bool $_paramsMemorizeAllowed + */ + protected $_paramsMemorizeAllowed = true; + /** * Retrieve Catalog Config object * @@ -182,6 +187,31 @@ protected function _construct() $this->setTemplate('catalog/product/list/toolbar.phtml'); } + /** + * Disable list state params memorizing + */ + public function disableParamsMemorizing() + { + $this->_paramsMemorizeAllowed = false; + return $this; + } + + /** + * Memorize parameter value for session + * + * @param string $param parameter name + * @param mixed $value parameter value + * @return Mage_Catalog_Block_Product_List_Toolbar + */ + protected function _memorizeParam($param, $value) + { + $session = Mage::getSingleton('catalog/session'); + if ($this->_paramsMemorizeAllowed && !$session->getParamsMemorizeDisabled()) { + $session->setData($param, $value); + } + return $this; + } + /** * Set collection to pager * @@ -279,32 +309,40 @@ public function getCurrentPage() } /** - * Retrieve current order field + * Get grit products sort order field * * @return string */ public function getCurrentOrder() { + $order = $this->_getData('_current_grid_order'); + if ($order) { + return $order; + } + $orders = $this->getAvailableOrders(); + $defaultOrder = $this->_orderField; + + if (!isset($orders[$defaultOrder])) { + $keys = array_keys($orders); + $defaultOrder = $keys[0]; + } + $order = $this->getRequest()->getParam($this->getOrderVarName()); if ($order && isset($orders[$order])) { - Mage::getSingleton('catalog/session')->setSortOrder($order); - } - else { + if ($order == $defaultOrder) { + Mage::getSingleton('catalog/session')->unsSortOrder(); + } else { + $this->_memorizeParam('sort_order', $order); + } + } else { $order = Mage::getSingleton('catalog/session')->getSortOrder(); } - // validate session value - if (!isset($orders[$order])) { - $order = $this->_orderField; + if (!$order || !isset($orders[$order])) { + $order = $defaultOrder; } - - // validate has order value - if (!isset($orders[$order])) { - $keys = array_keys($orders); - $order = $keys[0]; - } - + $this->setData('_current_grid_order', $order); return $order; } @@ -315,20 +353,27 @@ public function getCurrentOrder() */ public function getCurrentDirection() { + $dir = $this->_getData('_current_grid_direction'); + if ($dir) { + return $dir; + } + $directions = array('asc', 'desc'); $dir = strtolower($this->getRequest()->getParam($this->getDirectionVarName())); if ($dir && in_array($dir, $directions)) { - Mage::getSingleton('catalog/session')->setSortDirection($dir); - } - else { + if ($dir == $this->_direction) { + Mage::getSingleton('catalog/session')->unsSortDirection(); + } else { + $this->_memorizeParam('sort_direction', $dir); + } + } else { $dir = Mage::getSingleton('catalog/session')->getSortDirection(); } - // validate direction if (!$dir || !in_array($dir, $directions)) { $dir = $this->_direction; } - + $this->setData('_current_grid_direction', $dir); return $dir; } @@ -461,18 +506,28 @@ public function getPagerUrl($params=array()) */ public function getCurrentMode() { + $mode = $this->_getData('_current_grid_mode'); + if ($mode) { + return $mode; + } + $modes = array_keys($this->_availableMode); + $defaultMode = current($modes); $mode = $this->getRequest()->getParam($this->getModeVarName()); if ($mode) { - Mage::getSingleton('catalog/session')->setDisplayMode($mode); + if ($mode == $defaultMode) { + Mage::getSingleton('catalog/session')->unsDisplayMode(); + } else { + $this->_memorizeParam('display_mode', $mode); + } } else { $mode = Mage::getSingleton('catalog/session')->getDisplayMode(); } - if ($mode && isset($this->_availableMode[$mode])) { - return $mode; + if (!$mode || !isset($this->_availableMode[$mode])) { + $mode = $defaultMode; } - $modes = array_keys($this->_availableMode); - return current($modes); + $this->setData('_current_grid_mode', $mode); + return $mode; } /** @@ -661,31 +716,40 @@ protected function _getAvailableLimit($mode) } /** - * Retrieve current limit per page + * Get specified products limit display per page * * @return string */ public function getLimit() { + $limit = $this->_getData('_current_limit'); + if ($limit) { + return $limit; + } + $limits = $this->getAvailableLimit(); - $limit = $this->getRequest()->getParam($this->getLimitVarName()); + $defaultLimit = $this->getDefaultPerPageValue(); + if (!$defaultLimit || !isset($limits[$defaultLimit])) { + $keys = array_keys($limits); + $defaultLimit = $keys[0]; + } + $limit = $this->getRequest()->getParam($this->getLimitVarName()); if ($limit && isset($limits[$limit])) { - Mage::getSingleton('catalog/session')->setLimitPage($limit); + if ($limit == $defaultLimit) { + Mage::getSingleton('catalog/session')->unsLimitPage(); + } else { + $this->_memorizeParam('limit_page', $limit); + } } else { $limit = Mage::getSingleton('catalog/session')->getLimitPage(); } - if (isset($limits[$limit])) { - return $limit; - } - if ($limit = $this->getDefaultPerPageValue()) { - if (isset($limits[$limit])) { - return $limit; - } + if (!$limit || !isset($limits[$limit])) { + $limit = $defaultLimit; } - $limits = array_keys($limits); - return $limits[0]; + $this->setData('_current_limit', $limit); + return $limit; } /** diff --git a/app/code/core/Mage/Catalog/Block/Product/View.php b/app/code/core/Mage/Catalog/Block/Product/View.php index 230bc7613d..572bd38341 100644 --- a/app/code/core/Mage/Catalog/Block/Product/View.php +++ b/app/code/core/Mage/Catalog/Block/Product/View.php @@ -44,22 +44,27 @@ protected function _prepareLayout() $this->getLayout()->createBlock('catalog/breadcrumbs'); $headBlock = $this->getLayout()->getBlock('head'); if ($headBlock) { - $title = $this->getProduct()->getMetaTitle(); + $product = $this->getProduct(); + $title = $product->getMetaTitle(); if ($title) { $headBlock->setTitle($title); } - $keyword = $this->getProduct()->getMetaKeyword(); + $keyword = $product->getMetaKeyword(); $currentCategory = Mage::registry('current_category'); if ($keyword) { $headBlock->setKeywords($keyword); } elseif($currentCategory) { - $headBlock->setKeywords($this->getProduct()->getName()); + $headBlock->setKeywords($product->getName()); } - $description = $this->getProduct()->getMetaDescription(); + $description = $product->getMetaDescription(); if ($description) { $headBlock->setDescription( ($description) ); } else { - $headBlock->setDescription( $this->getProduct()->getDescription() ); + $headBlock->setDescription($product->getDescription()); + } + if ($this->helper('catalog/product')->canUseCanonicalTag()) { + $params = array('_ignore_category'=>true); + $headBlock->addLinkRel('canonical', $product->getUrlModel()->getUrl($product, $params)); } } diff --git a/app/code/core/Mage/Catalog/Helper/Category.php b/app/code/core/Mage/Catalog/Helper/Category.php index 2df19c9fdf..f28002605b 100644 --- a/app/code/core/Mage/Catalog/Helper/Category.php +++ b/app/code/core/Mage/Catalog/Helper/Category.php @@ -33,7 +33,9 @@ */ class Mage_Catalog_Helper_Category extends Mage_Core_Helper_Abstract { - const XML_PATH_CATEGORY_URL_SUFFIX = 'catalog/seo/category_url_suffix'; + const XML_PATH_CATEGORY_URL_SUFFIX = 'catalog/seo/category_url_suffix'; + const XML_PATH_USE_CATEGORY_CANONICAL_TAG = 'catalog/seo/category_canonical_tag'; + /** * Store categories cache @@ -169,4 +171,15 @@ public function getCategoryUrlPath($urlPath, $slash = false, $storeId = null) return preg_replace($regexp, $replace, $urlPath); } + + /** + * Check if can be used for category + * + * @param $store + * @return bool + */ + public function canUseCanonicalTag($store = null) + { + return Mage::getStoreConfig(self::XML_PATH_USE_CATEGORY_CANONICAL_TAG, $store); + } } diff --git a/app/code/core/Mage/Catalog/Helper/Image.php b/app/code/core/Mage/Catalog/Helper/Image.php index fc4e4ce3cc..dab13ffee5 100644 --- a/app/code/core/Mage/Catalog/Helper/Image.php +++ b/app/code/core/Mage/Catalog/Helper/Image.php @@ -483,4 +483,19 @@ public function getOriginalSizeArray() $this->getOriginalHeight() ); } + + /** + * Check - is this file an image + * + * @param string $filePath + * @return bool + * @throw Mage_Core_Exception + */ + public function validateUploadFile($filePath) { + if (!getimagesize($filePath)) { + Mage::throwException($this->__('Disallowed file type.')); + } + return true; + } + } diff --git a/app/code/core/Mage/Catalog/Helper/Output.php b/app/code/core/Mage/Catalog/Helper/Output.php index a610481f2d..ea77353984 100644 --- a/app/code/core/Mage/Catalog/Helper/Output.php +++ b/app/code/core/Mage/Catalog/Helper/Output.php @@ -100,6 +100,13 @@ public function process($method, $result, $params) */ public function productAttribute($product, $attributeHtml, $attributeName) { + $attributes = $product->getAttributes(); + $attribute = (isset($attributes[$attributeName])) ? $attributes[$attributeName] : null; + + if ($attribute && ($attribute->getFrontendInput() != 'media_image') + && (!$attribute->getIsHtmlAllowedOnFront() && !$attribute->getIsWysiwygEnabled())) { + $attributeHtml = $this->htmlEscape($attributeHtml); + } $attributeHtml = $this->process('productAttribute', $attributeHtml, array( 'product' => $product, 'attribute' => $attributeName @@ -117,6 +124,12 @@ public function productAttribute($product, $attributeHtml, $attributeName) */ public function categoryAttribute($category, $attributeHtml, $attributeName) { + $attribute = Mage::getSingleton('eav/config')->getAttribute('catalog_category', $attributeName); + + if ($attribute && ($attribute->getFrontendInput() != 'image') + && (!$attribute->getIsHtmlAllowedOnFront() && !$attribute->getIsWysiwygEnabled())) { + $attributeHtml = $this->htmlEscape($attributeHtml); + } $attributeHtml = $this->process('categoryAttribute', $attributeHtml, array( 'category' => $category, 'attribute' => $attributeName diff --git a/app/code/core/Mage/Catalog/Helper/Product.php b/app/code/core/Mage/Catalog/Helper/Product.php index eacb41e216..a41930c8bc 100644 --- a/app/code/core/Mage/Catalog/Helper/Product.php +++ b/app/code/core/Mage/Catalog/Helper/Product.php @@ -31,8 +31,9 @@ */ class Mage_Catalog_Helper_Product extends Mage_Core_Helper_Url { - const XML_PATH_PRODUCT_URL_SUFFIX = 'catalog/seo/product_url_suffix'; - const XML_PATH_PRODUCT_URL_USE_CATEGORY = 'catalog/seo/product_use_categories'; + const XML_PATH_PRODUCT_URL_SUFFIX = 'catalog/seo/product_url_suffix'; + const XML_PATH_PRODUCT_URL_USE_CATEGORY = 'catalog/seo/product_use_categories'; + const XML_PATH_USE_PRODUCT_CANONICAL_TAG = 'catalog/seo/product_canonical_tag'; /** * Cache for product rewrite suffix @@ -187,4 +188,15 @@ public function getProductUrlSuffix($storeId = null) } return $this->_productUrlSuffix[$storeId]; } + + /** + * Check if can be used for product + * + * @param $store + * @return bool + */ + public function canUseCanonicalTag($store = null) + { + return Mage::getStoreConfig(self::XML_PATH_USE_PRODUCT_CANONICAL_TAG, $store); + } } 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 f13f15364d..d40f71770d 100644 --- a/app/code/core/Mage/Catalog/Model/Category/Indexer/Flat.php +++ b/app/code/core/Mage/Catalog/Model/Category/Indexer/Flat.php @@ -110,7 +110,7 @@ public function matchEvent(Mage_Index_Model_Event $event) } else if ($event->getType() == Mage_Index_Model_Event::TYPE_SAVE) { /* @var $store Mage_Core_Model_Store */ $store = $event->getDataObject(); - if ($store->isObjectNew() || $store->dataHasChangedFor('group_id')) { + if ($store->isObjectNew() || $store->dataHasChangedFor('group_id') || $store->dataHasChangedFor('root_catefory_id')) { $result = true; } else { $result = false; 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 40006117ee..85909002f9 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 @@ -78,8 +78,9 @@ public function afterSave($object) /** * Orig value is only for existing objects */ - $origValue= $object->getOrigData($this->getAttribute()->getAttributeCode()); - if ($object->getStoreId() != 0 || !$value || $origValue) { + $oridData = $object->getOrigData(); + $origValueExist = $oridData && array_key_exists($this->getAttribute()->getAttributeCode(), $oridData); + if ($object->getStoreId() != 0 || !$value || $origValueExist) { return $this; } diff --git a/app/code/core/Mage/Catalog/Model/Product/Image.php b/app/code/core/Mage/Catalog/Model/Product/Image.php index 7ea630e7fa..be9af71f0f 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Image.php +++ b/app/code/core/Mage/Catalog/Model/Product/Image.php @@ -288,6 +288,9 @@ public function setBaseFile($file) } else { $baseDir = Mage::getDesign()->getSkinBaseDir(array('_theme' => 'default')); + if (!file_exists($baseDir . $file)) { + $baseDir = Mage::getDesign()->getSkinBaseDir(array('_theme' => 'default', '_package' => 'base')); + } } } $this->_isBaseFilePlaceholder = true; diff --git a/app/code/core/Mage/Catalog/Model/Product/Type.php b/app/code/core/Mage/Catalog/Model/Product/Type.php index 55959d032c..9a8f00af9f 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Type.php +++ b/app/code/core/Mage/Catalog/Model/Product/Type.php @@ -107,7 +107,7 @@ static public function getOptionArray() { $options = array(); foreach(self::getTypes() as $typeId=>$type) { - $options[$typeId] = $type['label']; + $options[$typeId] = Mage::helper('catalog')->__($type['label']); } return $options; 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 addecdc629..eee4640a69 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Type/Price.php +++ b/app/code/core/Mage/Catalog/Model/Product/Type/Price.php @@ -65,7 +65,7 @@ public function getFinalPrice($qty=null, $product) $finalPrice = $this->_applySpecialPrice($product, $finalPrice); $product->setFinalPrice($finalPrice); - Mage::dispatchEvent('catalog_product_get_final_price', array('product'=>$product)); + Mage::dispatchEvent('catalog_product_get_final_price', array('product'=>$product, 'qty' => $qty)); $finalPrice = $product->getData('final_price'); $finalPrice = $this->_applyOptionsPrice($product, $qty, $finalPrice); diff --git a/app/code/core/Mage/Catalog/Model/Product/Url.php b/app/code/core/Mage/Catalog/Model/Product/Url.php index 6cec32cb1f..f30ee5f72b 100644 --- a/app/code/core/Mage/Catalog/Model/Product/Url.php +++ b/app/code/core/Mage/Catalog/Model/Product/Url.php @@ -175,8 +175,13 @@ public function getUrl(Mage_Catalog_Model_Product $product, $params = array()) $routeParams = $params; $storeId = $product->getStoreId(); - $categoryId = $product->getCategoryId() && !$product->getDoNotUseCategoryId() - ? $product->getCategoryId() : null; + if (isset($params['_ignore_category'])) { + unset($params['_ignore_category']); + $categoryId = null; + } else { + $categoryId = $product->getCategoryId() && !$product->getDoNotUseCategoryId() + ? $product->getCategoryId() : null; + } if ($product->hasUrlDataObject()) { $requestPath = $product->getUrlDataObject()->getUrlRewrite(); diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Abstract.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Abstract.php index 324a86a50d..0e87172f0d 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Abstract.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Abstract.php @@ -33,6 +33,12 @@ */ abstract class Mage_Catalog_Model_Resource_Eav_Mysql4_Abstract extends Mage_Eav_Model_Entity_Abstract { + /** + * Store firstly set attributes to filter selected attributes when used specific store_id + * + * @var array + */ + protected $_attributes = array(); /** * Redeclare attribute model * @@ -79,40 +85,27 @@ protected function _getLoadAttributesSelect($object, $table) */ if (Mage::app()->isSingleStoreMode()) { $storeId = Mage::app()->getStore(true)->getId(); - } else { + } + else { $storeId = $object->getStoreId(); } $setId = $object->getAttributeSetId(); + $storeIds = array($this->getDefaultStoreId()); + if ($storeId != $this->getDefaultStoreId()) { + $storeIds[] = $storeId; + } $select = $this->_read->select() - ->from(array('default' => $table)) - ->where('default.'.$this->getEntityIdField().'=?', $object->getId()) - ->where('default.store_id=?', $this->getDefaultStoreId()); + ->from(array('attr_table' => $table)) + ->where('attr_table.'.$this->getEntityIdField().'=?', $object->getId()) + ->where('attr_table.store_id IN (?)', $storeIds); if ($setId) { $select->join( array('set_table' => $this->getTable('eav/entity_attribute')), - 'default.attribute_id=set_table.attribute_id AND ' - . 'set_table.attribute_set_id=' . intval($setId), + 'attr_table.attribute_id=set_table.attribute_id AND set_table.attribute_set_id=' . intval($setId), array() ); } - - if ($storeId != $this->getDefaultStoreId()) { - $joinCondition = join(' AND ', array( - 'main.attribute_id=default.attribute_id', - $this->_read->quoteInto('main.store_id=?', intval($storeId)), - $this->_read->quoteInto('main.'.$this->getEntityIdField() . '=?', $object->getId()) - )); - $select->joinLeft( - array('main' => $table), - $joinCondition, - array( - 'store_value_id' => 'value_id', - 'store_value' => 'value' - ) - ); - } - return $select; } @@ -128,14 +121,21 @@ protected function _setAttribteValue($object, $valueRow) $attribute = $this->getAttribute($valueRow['attribute_id']); if ($attribute) { $attributeCode = $attribute->getAttributeCode(); - if (!empty($valueRow['store_value_id'])) { - $value = $valueRow['store_value']; - $valueId = $valueRow['store_value_id']; - $object->setAttributeDefaultValue($attributeCode, $valueRow['value']); - } else { - $value = $valueRow['value']; - $valueId = $valueRow['value_id']; + if (isset($this->_attributes[$valueRow['attribute_id']])) { + if ($valueRow['store_id'] == $this->getDefaultStoreId()) { + $object->setAttributeDefaultValue($attributeCode, $valueRow['value']); + } + else { + $object->setAttributeDefaultValue($attributeCode, $this->_attributes[$valueRow['attribute_id']]['value']); + } } + else { + $this->_attributes[$valueRow['attribute_id']] = $valueRow; + } + + $value = $valueRow['value']; + $valueId = $valueRow['value_id']; + $object->setData($attributeCode, $value); $attribute->getBackend()->setValueId($valueId); } @@ -187,7 +187,7 @@ protected function _saveAttributeValue($object, $attribute, $value) /** * Update attribute value for website */ - $storeIds = $object->getWebsiteStoreIds(); + $storeIds = Mage::app()->getStore($storeId)->getWebsite()->getStoreIds(true); foreach ($storeIds as $storeId) { $bind['store_id'] = $storeId; $this->_attributeValuesToSave[$table][] = $bind; @@ -536,13 +536,12 @@ protected function _prepareValueForSave($value, Mage_Eav_Model_Entity_Attribute_ */ public function getAttributeRawValue($entityId, $attribute, $store) { - $result = ''; - $attribute = $this->getAttribute($attribute); /* @var $attribute Mage_Catalog_Model_Entity_Attribute */ + $attribute = $this->getAttribute($attribute); if ($attribute) { /* @var $select Zend_Db_Select */ $select = $this->_read->select(); - + $attributeCode = $attribute->getAttributeCode(); $attrTable = $attribute->getBackend()->getTable(); $isStatic = $attribute->getBackend()->isStatic(); $attrField = $isStatic ? $attributeCode : 'value'; @@ -573,4 +572,18 @@ public function getAttributeRawValue($entityId, $attribute, $store) return false; } + + /** + * Reset firstly loaded attributes + * + * @param Varien_Object $object + * @param integer $entityId + * @param array|null $attributes + * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Abstract + */ + public function load($object, $entityId, $attributes=array()) + { + $this->_attributes = array(); + return parent::load($object, $entityId, $attributes); + } } diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Indexer/Product.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Indexer/Product.php index d8d5d870ed..eb0fb43926 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Indexer/Product.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Indexer/Product.php @@ -241,7 +241,7 @@ protected function _refreshDirectRelations($categoryIds=null, $productIds=null) ->joinInner(array('rc' => $this->_categoryTable), 'rc.entity_id=g.root_category_id', array()) ->joinInner( array('ce'=>$this->_categoryTable), - 'ce.entity_id=cp.category_id AND ce.path LIKE CONCAT(rc.path, \'/%\')', + 'ce.entity_id=cp.category_id AND (ce.path LIKE CONCAT(rc.path, \'/%\') OR ce.entity_id=rc.entity_id)', array()) ->joinLeft( array('dv'=>$visibilityInfo['table']), diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Tree.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Tree.php index 4f32918fa2..dbe84f7c32 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Tree.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Category/Tree.php @@ -74,7 +74,7 @@ public function __construct() $resource = Mage::getSingleton('core/resource'); parent::__construct( - $resource->getConnection('catalog_read'), + $resource->getConnection('catalog_write'), $resource->getTableName('catalog/category'), array( Varien_Data_Tree_Dbp::ID_FIELD => 'entity_id', diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Collection.php index 9e20f520de..903d9c951d 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Collection.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Collection.php @@ -651,6 +651,41 @@ public function getAttributeValueCount($attribute) return $res; } + /** + * Return 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 + * ), + * ... + * ) + * + * @param string $attribute attribute code + * @return array + */ + public function getAllAttributeValues($attribute) + { + /** @var Zend_Db_Select */ + $select = clone $this->getSelect(); + $attribute = $this->getEntity()->getAttribute($attribute); + + $select->reset() + ->from($attribute->getBackend()->getTable(), array('entity_id', 'store_id', 'value')) + ->where('attribute_id = ?', $attribute->getId(), Zend_Db::INT_TYPE); + + $data = $this->getConnection()->fetchAll($select); + $res = array(); + + foreach ($data as $row) { + $res[$row['entity_id']][$row['store_id']] = $row['value']; + } + + return $res; + } + /** * Get SQL for get record count * @@ -753,7 +788,7 @@ public function addCountToCategories($categoryCollection) $anchorStmt = clone $select; $anchorStmt->limit(); //reset limits $anchorStmt->where('count_table.category_id in (?)', $isAnchor); - $productCounts += $this->getConnection()->fetchPairs($anchorStmt, array('category_id'=>'product_count')); + $productCounts += $this->getConnection()->fetchPairs($anchorStmt); $anchorStmt = null; } if ($isNotAnchor) { @@ -761,7 +796,7 @@ public function addCountToCategories($categoryCollection) $notAnchorStmt->limit(); //reset limits $notAnchorStmt->where('count_table.category_id in (?)', $isNotAnchor); $notAnchorStmt->where('count_table.is_parent=1'); - $productCounts += $this->getConnection()->fetchPairs($notAnchorStmt, array('category_id'=>'product_count')); + $productCounts += $this->getConnection()->fetchPairs($notAnchorStmt); $notAnchorStmt = null; } $select = null; @@ -1080,7 +1115,24 @@ public function addAttributeToFilter($attribute, $condition=null, $joinType='inn $this->_allIdsCache = null; if (is_string($attribute) && $attribute == 'is_saleable') { - $this->getSelect()->where($this->_getConditionSql('(IF(manage_stock, is_in_stock, 1))', $condition)); + $isStockManagedInConfig = (int) Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_MANAGE_STOCK); + $inventoryTable = $this->getTable('cataloginventory_stock_item'); + $this->getSelect()->where( + $this->_getConditionSql( + "( + IF( + IF( + $inventoryTable.use_config_manage_stock, + $isStockManagedInConfig, + $inventoryTable.manage_stock + ), + $inventoryTable.is_in_stock, + 1 + ) + )", + $condition + ) + ); return $this; } else { @@ -1217,6 +1269,11 @@ public function addAttributeToSort($attribute, $dir='asc') return $this; } + if($attribute == 'is_saleable'){ + $this->getSelect()->order("is_saleable " . $dir); + return $this; + } + if ($this->isEnabledFlat()) { $column = $this->getEntity()->getAttributeSortColumn($attribute); diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Compare/Item/Collection.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Compare/Item/Collection.php index ca9489a317..00cc0d942e 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Compare/Item/Collection.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Compare/Item/Collection.php @@ -218,11 +218,12 @@ protected function _getAttributeIdsBySetIds(array $setIds) /** * Retrieve Merged comparable attributes for compared product items * - * @return this + * @return array */ public function getComparableAttributes() { if (is_null($this->_comparableAttributes)) { + $this->_comparableAttributes = array(); $setIds = $this->_getAttributeSetIds(); if ($setIds) { $attributeIds = $this->_getAttributeIdsBySetIds($setIds); @@ -253,9 +254,6 @@ public function getComparableAttributes() unset($attributesData); } } - else { - $this->_comparableAttributes = array(); - } } return $this->_comparableAttributes; } diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price.php index 6a83c567a7..ab0019d5ae 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price.php @@ -369,7 +369,7 @@ public function reindexAll() */ protected function _getTierPriceIndexTable() { - return $this->getIdxTable($this->getValueTable('catalog/product', 'tier_price')); + return $this->getTable('catalog/product_index_tier_price'); } /** @@ -382,19 +382,7 @@ protected function _prepareTierPriceIndex($entityIds = null) { $write = $this->_getWriteAdapter(); $table = $this->_getTierPriceIndexTable(); - - $query = sprintf('DROP TABLE IF EXISTS %s', $write->quoteIdentifier($table)); - $write->query($query); - - $query = sprintf('CREATE TABLE %s (' - . ' `entity_id` INT(10) UNSIGNED NOT NULL,' - . ' `customer_group_id` SMALLINT(5) UNSIGNED NOT NULL,' - . ' `website_id` SMALLINT(5) UNSIGNED NOT NULL,' - . ' `min_price` DECIMAL(12,4) DEFAULT NULL,' - . ' PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`)' - . ') ENGINE=INNODB DEFAULT CHARSET=utf8', - $write->quoteIdentifier($table)); - $write->query($query); + $write->delete($table); $select = $write->select() ->from( @@ -463,7 +451,7 @@ protected function _copyRelationIndexData($parentIds, $excludeIds = null) */ protected function _getWebsiteDateTable() { - return $this->getIdxTable($this->getValueTable('core/website', 'date')); + return $this->getTable('catalog/product_index_website'); } /** @@ -475,26 +463,25 @@ protected function _prepareWebsiteDateTable() { $write = $this->_getWriteAdapter(); $table = $this->_getWebsiteDateTable(); + $write->delete($table); - $query = sprintf('DROP TABLE IF EXISTS %s', $write->quoteIdentifier($table)); - $write->query($query); + $baseCurrency = Mage::app()->getBaseCurrencyCode(); - $query = sprintf('CREATE TABLE %s (' - . ' `website_id` SMALLINT(5) UNSIGNED NOT NULL,' - . ' `date` DATE DEFAULT NULL,' - . ' `rate` FLOAT(12, 4) UNSIGNED DEFAULT 1,' - . ' PRIMARY KEY (`website_id`),' - . ' KEY `IDX_DATE` (`date`)' - . ') ENGINE=INNODB DEFAULT CHARSET=utf8', - $write->quoteIdentifier($table)); - $write->query($query); + $select = $write->select() + ->from( + array('cw' => $this->getTable('core/website')), + array('website_id')) + ->join( + array('csg' => $this->getTable('core/store_group')), + 'cw.default_group_id = csg.group_id', + array('store_id' => 'default_store_id')) + ->where('cw.website_id != 0'); - $baseCurrency = Mage::app()->getBaseCurrencyCode(); $data = array(); - /* @var $coreDate Mage_Core_Model_Date */ - $websites = Mage::app()->getWebsites(false); - foreach ($websites as $website) { + foreach ($write->fetchAll($select) as $item) { /* @var $website Mage_Core_Model_Website */ + $website = Mage::app()->getWebsite($item['website_id']); + if ($website->getBaseCurrencyCode() != $baseCurrency) { $rate = Mage::getModel('directory/currency') ->load($baseCurrency) @@ -505,7 +492,9 @@ protected function _prepareWebsiteDateTable() } else { $rate = 1; } - $store = $website->getDefaultStore(); + + /* @var $store Mage_Core_Model_Store */ + $store = Mage::app()->getStore($item['store_id']); if ($store) { $timestamp = Mage::app()->getLocale()->storeTimeStamp($store); $data[] = array( diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Default.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Default.php index deec5dc292..ed4258aa6f 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Default.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Indexer/Price/Default.php @@ -186,7 +186,7 @@ protected function _prepareDefaultFinalPriceTable() */ protected function _getWebsiteDateTable() { - return $this->getIdxTable($this->getValueTable('core/website', 'date')); + return $this->getTable('catalog/product_index_website'); } /** @@ -247,8 +247,8 @@ protected function _prepareFinalPriceData($entityIds = null) $curentDate = new Zend_Db_Expr('cwd.date'); $finalPrice = new Zend_Db_Expr("IF(IF({$specialFrom} IS NULL, 1, " - . "IF({$specialFrom} <= {$curentDate}, 1, 0)) > 0 AND IF({$specialTo} IS NULL, 1, " - . "IF({$specialTo} >= {$curentDate}, 1, 0)) > 0 AND {$specialPrice} < {$price}, " + . "IF(DATE({$specialFrom}) <= {$curentDate}, 1, 0)) > 0 AND IF({$specialTo} IS NULL, 1, " + . "IF(DATE({$specialTo}) >= {$curentDate}, 1, 0)) > 0 AND {$specialPrice} < {$price}, " . "{$specialPrice}, {$price})"); $select->columns(array( 'orig_price' => $price, @@ -567,7 +567,7 @@ protected function _movePriceDataToIndexTable() */ protected function _getTierPriceIndexTable() { - return $this->getIdxTable($this->getValueTable('catalog/product', 'tier_price')); + return $this->getTable('catalog/product_index_tier_price'); } /** diff --git a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Url.php b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Url.php index 06f76b21f9..e1f509a1ef 100644 --- a/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Url.php +++ b/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Url.php @@ -763,7 +763,6 @@ public function getProductIdsByCategory($category) protected function _getProducts($productIds = null, $storeId, $entityId = 0, &$lastEntityId) { $products = array(); - $websiteId = Mage::app()->getStore($storeId)->getWebsiteId(); if (!is_null($productIds)) { if (!is_array($productIds)) { @@ -803,10 +802,11 @@ protected function _getProducts($productIds = null, $storeId, $entityId = 0, &$l $this->getTable('catalog/category_product'), array('product_id', 'category_id')) ->where('product_id IN(?)', array_keys($products)); - $categories = $this->_getReadAdapter()->fetchPairs($select); - foreach ($categories as $productId => $categoryId) { + $categories = $this->_getReadAdapter()->fetchAll($select); + foreach ($categories as $category) { + $productId = $category['product_id']; $categoryIds = $products[$productId]->getCategoryIds(); - $categoryIds[] = $categoryId; + $categoryIds[] = $category['category_id']; $products[$productId]->setCategoryIds($categoryIds); } @@ -896,6 +896,28 @@ public function clearCategoryProduct($storeId) return $this; } + + /** + * Remove unused rewrites for product + * + * @param int $productId Product entity Id + * @param int $storeId Store Id for rewrites + * @param array $excludeCategoryIds Array of category Ids that should be skipped + * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Url + */ + public function clearProductRewrites($productId, $storeId, $excludeCategoryIds = array()) + { + $adapter = $this->_getWriteAdapter(); + $where = $adapter->quoteInto('product_id=?', $productId); + $where.= $adapter->quoteInto(' AND store_id=?', $storeId); + $where.= ' AND category_id IS NOT NULL'; + if (!empty($excludeCategoryIds)) { + $where.= $adapter->quoteInto(' AND category_id NOT IN (?)', $excludeCategoryIds); + } + $adapter->delete($this->getMainTable(), $where); + + return $this; + } /** * Delete rewrites for associated to category products diff --git a/app/code/core/Mage/Catalog/Model/Url.php b/app/code/core/Mage/Catalog/Model/Url.php index bc482710d1..a41a196b45 100644 --- a/app/code/core/Mage/Catalog/Model/Url.php +++ b/app/code/core/Mage/Catalog/Model/Url.php @@ -373,6 +373,8 @@ public function refreshProductRewrite($productId, $storeId = null) $this->_refreshProductRewrite($product, $category); } + $this->getResource()->clearProductRewrites($productId, $storeId, array_keys($categories)); + unset($categories); unset($product); diff --git a/app/code/core/Mage/Catalog/controllers/Product/CompareController.php b/app/code/core/Mage/Catalog/controllers/Product/CompareController.php index 1b6bf5710e..72dd04f0a5 100644 --- a/app/code/core/Mage/Catalog/controllers/Product/CompareController.php +++ b/app/code/core/Mage/Catalog/controllers/Product/CompareController.php @@ -75,7 +75,7 @@ public function addAction() if ($product->getId()/* && !$product->isSuper()*/) { Mage::getSingleton('catalog/product_compare_list')->addProduct($product); Mage::getSingleton('catalog/session')->addSuccess( - $this->__('Product %s successfully added to compare list', $product->getName()) + $this->__('Product %s successfully added to compare list', Mage::helper('core')->htmlEscape($product->getName())) ); Mage::dispatchEvent('catalog_product_compare_add_product', array('product'=>$product)); } diff --git a/app/code/core/Mage/Catalog/etc/config.xml b/app/code/core/Mage/Catalog/etc/config.xml index f5dcd07378..1c4d133b23 100644 --- a/app/code/core/Mage/Catalog/etc/config.xml +++ b/app/code/core/Mage/Catalog/etc/config.xml @@ -28,7 +28,7 @@ - 1.4.0.0.18 + 1.4.0.0.21 @@ -193,6 +193,8 @@ catalog_product_index_eav
catalog_product_index_eav_decimal
catalog_product_index_price
+ catalog_product_index_tier_price
+ catalog_product_index_website
@@ -651,6 +653,8 @@ .html 1 - + 0 + 0 m,d,y diff --git a/app/code/core/Mage/Catalog/etc/system.xml b/app/code/core/Mage/Catalog/etc/system.xml index 6ea2aefed1..c7e8a30a03 100644 --- a/app/code/core/Mage/Catalog/etc/system.xml +++ b/app/code/core/Mage/Catalog/etc/system.xml @@ -236,6 +236,24 @@ 1 1 + + + select + adminhtml/system_config_source_yesno + 6 + 1 + 1 + 1 + + + + select + adminhtml/system_config_source_yesno + 7 + 1 + 1 + 1 + diff --git a/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.5-0.8.6.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.18-1.4.0.0.19.php similarity index 76% rename from app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.5-0.8.6.php rename to app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.18-1.4.0.0.19.php index 76be88fd4b..bdc810578b 100644 --- a/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.5-0.8.6.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.18-1.4.0.0.19.php @@ -19,19 +19,18 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Oscommerce + * @package Mage_Catalog * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +/* @var $installer Mage_Catalog_Model_Resource_Eav_Mysql4_Setup */ $installer = $this; -/* @var $installer Mage_Core_Model_Resource_Setup */ -$installer->startSetup(); +$table = $this->getTable('catalog/category_product'); -$installer->run(" - -insert into `{$this->getTable('oscommerce_import_type')}`(`type_code`,`type_name`) values ('root_category', 'Root Category'); -"); +/** + * Remove data duplicates + */ +$installer->getConnection()->changeColumn($table, 'position', 'position', "INT( 10 ) NOT NULL DEFAULT '0'"); -$installer->endSetup(); diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.19-1.4.0.0.20.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.19-1.4.0.0.20.php new file mode 100644 index 0000000000..ac1242ea86 --- /dev/null +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.19-1.4.0.0.20.php @@ -0,0 +1,58 @@ +run(" +-- Removing old index tables if exists +DROP TABLE IF EXISTS `{$installer->getTable('catalog/product')}_tier_price_idx`; +DROP TABLE IF EXISTS `{$installer->getTable('core/website')}_date_idx`; + +CREATE TABLE IF NOT EXISTS `{$installer->getTable('catalog/product_index_tier_price')}` ( + `entity_id` INT(10) UNSIGNED NOT NULL, + `customer_group_id` SMALLINT(5) UNSIGNED NOT NULL, + `website_id` SMALLINT(5) UNSIGNED NOT NULL, + `min_price` DECIMAL(12,4) DEFAULT NULL, + PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`), + CONSTRAINT `FK_CATALOG_PRODUCT_INDEX_TIER_PRICE_ENTITY` FOREIGN KEY (`entity_id`) + REFERENCES `{$this->getTable('catalog/product')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `FK_CATALOG_PRODUCT_INDEX_TIER_PRICE_CUSTOMER` FOREIGN KEY (`customer_group_id`) + REFERENCES `{$this->getTable('customer/customer_group')}` (`customer_group_id`) ON DELETE CASCADE ON UPDATE CASCADE, + CONSTRAINT `FK_CATALOG_PRODUCT_INDEX_TIER_PRICE_WEBSITE` FOREIGN KEY (`website_id`) + REFERENCES `{$this->getTable('core/website')}` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=INNODB DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `{$installer->getTable('catalog/product_index_website')}` ( + `website_id` SMALLINT(5) UNSIGNED NOT NULL, + `date` DATE DEFAULT NULL, + `rate` FLOAT(12, 4) UNSIGNED DEFAULT 1, + PRIMARY KEY (`website_id`), + KEY `IDX_DATE` (`date`), + CONSTRAINT `FK_CATALOG_PRODUCT_INDEX_WEBSITE` FOREIGN KEY (`website_id`) + REFERENCES `{$this->getTable('core/website')}` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=INNODB DEFAULT CHARSET=utf8; +"); diff --git a/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.9-0.8.10.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.20-1.4.0.0.21.php similarity index 76% rename from app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.9-0.8.10.php rename to app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.20-1.4.0.0.21.php index 9612da29d1..14eda31d53 100644 --- a/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.9-0.8.10.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.20-1.4.0.0.21.php @@ -19,20 +19,17 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Oscommerce + * @package Mage_Catalog * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +/* @var $installer Mage_Catalog_Model_Resource_Eav_Mysql4_Setup */ $installer = $this; -/* @var $installer Mage_Core_Model_Resource_Setup */ -$installer->startSetup(); +$table = $this->getTable('catalog/category_product_index'); -$installer->run(" - -ALTER TABLE `{$this->getTable('oscommerce_import')}` ADD send_subscription BOOL NOT NULL DEFAULT '0'; - -"); - -$installer->endSetup(); +/** + * Remove data duplicates + */ +$installer->getConnection()->changeColumn($table, 'position', 'position', "INT( 10 ) NOT NULL DEFAULT '0'"); diff --git a/app/code/core/Mage/CatalogIndex/Model/Mysql4/Aggregation.php b/app/code/core/Mage/CatalogIndex/Model/Mysql4/Aggregation.php index eba7be0dc2..c58aab2c74 100644 --- a/app/code/core/Mage/CatalogIndex/Model/Mysql4/Aggregation.php +++ b/app/code/core/Mage/CatalogIndex/Model/Mysql4/Aggregation.php @@ -74,6 +74,8 @@ public function saveCacheData($data, $key, $tags, $storeId) { $data = serialize($data); $tags = $this->_getTagIds($tags); + + /* $select = $this->_getWriteAdapter()->select() ->from(array('a'=>$this->getMainTable()), $this->getIdFieldName()) ->where('a.store_id=?', $storeId) @@ -95,6 +97,17 @@ public function saveCacheData($data, $key, $tags, $storeId) )); $id = $this->_getWriteAdapter()->lastInsertId(); } + */ + + $this->_getWriteAdapter()->insertOnDuplicate($this->getMainTable(), array( + 'store_id' => $storeId, + 'created_at'=> $this->formatDate(time()), + 'key' => $key, + 'data' => $data + ), array('created_at', 'data')); + + $id = $this->_getWriteAdapter()->lastInsertId(); + $this->_saveTagRelations($id, $tags); return $this; } diff --git a/app/code/core/Mage/CatalogInventory/Model/Mysql4/Stock/Item.php b/app/code/core/Mage/CatalogInventory/Model/Mysql4/Stock/Item.php index bfb1f0088a..044e279de0 100644 --- a/app/code/core/Mage/CatalogInventory/Model/Mysql4/Stock/Item.php +++ b/app/code/core/Mage/CatalogInventory/Model/Mysql4/Stock/Item.php @@ -79,10 +79,23 @@ protected function _getLoadSelect($field, $value, $object) public function addCatalogInventoryToProductCollection($productCollection) { $isStockManagedInConfig = (int) Mage::getStoreConfig(Mage_CatalogInventory_Model_Stock_Item::XML_PATH_MANAGE_STOCK); + $inventoryTable = $this->getTable('cataloginventory/stock_item'); $productCollection->joinTable('cataloginventory/stock_item', 'product_id=entity_id', array( - 'is_saleable' => new Zend_Db_Expr('(IF(IF(use_config_manage_stock, ' . $isStockManagedInConfig . ', manage_stock), is_in_stock, 1))'), + 'is_saleable' => new Zend_Db_Expr( + "( + IF( + IF( + $inventoryTable.use_config_manage_stock, + $isStockManagedInConfig, + $inventoryTable.manage_stock + ), + $inventoryTable.is_in_stock, + 1 + ) + )" + ), 'inventory_in_stock' => 'is_in_stock' ), null, 'left'); diff --git a/app/code/core/Mage/CatalogRule/Model/Rule.php b/app/code/core/Mage/CatalogRule/Model/Rule.php index 24b5ddfc1f..d5067a78b8 100644 --- a/app/code/core/Mage/CatalogRule/Model/Rule.php +++ b/app/code/core/Mage/CatalogRule/Model/Rule.php @@ -48,7 +48,7 @@ class Mage_CatalogRule_Model_Rule extends Mage_Rule_Model_Rule * * @var array */ - protected $_productIds = array(); + protected $_productIds; protected $_now; @@ -138,26 +138,28 @@ protected function _afterSave() */ public function getMatchingProductIds() { - if (empty($this->_productIds)) { - $productCollection = Mage::getResourceModel('catalog/product_collection'); + if (is_null($this->_productIds)) { + $this->_productIds = array(); + $this->setCollectedAttributes(array()); $websiteIds = explode(',', $this->getWebsiteIds()); - if (!empty($websiteIds)) { - $productCollection->addWebsiteFilter($websiteIds); - } - $this->setCollectedAttributes(array()); - $this->getConditions()->collectValidatedAttributes($productCollection); + if ($websiteIds) { + $productCollection = Mage::getResourceModel('catalog/product_collection'); - $this->_productIds = array(); - Mage::getSingleton('core/resource_iterator')->walk( - $productCollection->getSelect(), - array(array($this, 'callbackValidateProduct')), - array( - 'attributes'=>$this->getCollectedAttributes(), - 'product'=>Mage::getModel('catalog/product'), - ) - ); + $productCollection->addWebsiteFilter($websiteIds); + $this->getConditions()->collectValidatedAttributes($productCollection); + + Mage::getSingleton('core/resource_iterator')->walk( + $productCollection->getSelect(), + array(array($this, 'callbackValidateProduct')), + array( + 'attributes' => $this->getCollectedAttributes(), + 'product' => Mage::getModel('catalog/product'), + ) + ); + } } + return $this->_productIds; } @@ -169,7 +171,9 @@ public function getMatchingProductIds() */ public function callbackValidateProduct($args) { - $product = $args['product']->setData($args['row']); + $product = clone $args['product']; + $product->setData($args['row']); + if ($this->getConditions()->validate($product)) { $this->_productIds[] = $product->getId(); } 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 5241cdabf1..b161a708d5 100644 --- a/app/code/core/Mage/CatalogRule/Model/Rule/Condition/Product.php +++ b/app/code/core/Mage/CatalogRule/Model/Rule/Condition/Product.php @@ -27,6 +27,24 @@ class Mage_CatalogRule_Model_Rule_Condition_Product extends Mage_Rule_Model_Condition_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 * @@ -200,15 +218,18 @@ public function getAttributeElement() */ public function collectValidatedAttributes($productCollection) { - if ($this->getAttribute() == 'category_ids') { - return $this; + $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); + } } - $attributes = $this->getRule()->getCollectedAttributes(); - $attributes[$this->getAttribute()] = true; - $this->getRule()->setCollectedAttributes($attributes); - - $productCollection->addAttributeToSelect($this->getAttribute(), 'left'); return $this; } @@ -354,27 +375,47 @@ public function loadArray($arr) */ public function validate(Varien_Object $object) { - if ($this->getAttribute() == 'category_ids') { + $attrCode = $this->getAttribute(); + + if ('category_ids' == $attrCode) { return $this->validateAttribute($object->getAvailableInCategories()); - } + } elseif (! isset($this->_entityAttributeValues[$object->getId()])) { + $attr = $object->getResource()->getAttribute($attrCode); - $attr = $object->getResource()->getAttribute($this->getAttribute()); - if ($attr && $attr->getBackendType()=='datetime' && !is_int($this->getValue())) { - $this->setValue(strtotime($this->getValue())); - $value = strtotime($object->getData($this->getAttribute())); - return $this->validateAttribute($value); - } + 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($this->getAttribute()); - if (!strlen($value)) { - $value = array(); + 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 + $oldAttrValue = $object->hasData($attrCode) ? $object->getData($attrCode) : null; // remember old attribute state + + foreach ($this->_entityAttributeValues[$object->getId()] as $storeId => $value) { + $object->setData($attrCode, $value); + + $result |= parent::validate($object); + + if ($result) { + break; + } + } + + if (is_null($oldAttrValue)) { + $object->unsetData($attrCode); } else { - $value = explode(',', $value); + $object->setData($attrCode, $oldAttrValue); } - return $this->validateAttribute($value); - } - return parent::validate($object); + return (bool) $result; + } } } diff --git a/app/code/core/Mage/CatalogSearch/Helper/Data.php b/app/code/core/Mage/CatalogSearch/Helper/Data.php index 2f05d5f3ff..16daf7e515 100644 --- a/app/code/core/Mage/CatalogSearch/Helper/Data.php +++ b/app/code/core/Mage/CatalogSearch/Helper/Data.php @@ -140,7 +140,7 @@ public function getQueryText() */ public function getEscapedQueryText() { - return $this->getQueryText(); + return $this->htmlEscape($this->getQueryText()); } /** diff --git a/app/code/core/Mage/AmazonPayments/Block/Asp/Redirect.php b/app/code/core/Mage/Centinel/Block/Adminhtml/Validation.php similarity index 54% rename from app/code/core/Mage/AmazonPayments/Block/Asp/Redirect.php rename to app/code/core/Mage/Centinel/Block/Adminhtml/Validation.php index 5569b37011..60f0cbf1b3 100644 --- a/app/code/core/Mage/AmazonPayments/Block/Asp/Redirect.php +++ b/app/code/core/Mage/Centinel/Block/Adminhtml/Validation.php @@ -19,59 +19,57 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_AmazonPayments + * @package Mage_Centinel * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * AmazonPayments Form Block - * - * @category Mage - * @package Mage_AmazonPayments - * @author Magento Core Team + * Adminhtml sales order create validation card block */ -class Mage_AmazonPayments_Block_Asp_Redirect extends Mage_Core_Block_Template +class Mage_Centinel_Block_Adminhtml_Validation extends Mage_Adminhtml_Block_Sales_Order_Create_Abstract { - /** - * Return Amazon Simple Pay payment model - * - * @return Mage_AmazonPayments_Model_Payment_Asp + * construct */ - public function getPayment() + public function __construct() { - return Mage::registry('amazonpayments_payment_asp'); + parent::__construct(); + $this->setId('sales_order_create_validation_card'); } /** - * Return Amazon Simple Pay payment url + * Return text for block`s header * * @return string */ - public function getRedirectUrl() + public function getHeaderText() { - return $this->getPayment()->getPayRedirectUrl(); + return Mage::helper('centinel')->__('3D Secure Card Validation'); } /** - * Return pay params for current order + * Return css class name for header block * - * @return array + * @return string */ - public function getRedirectParams() + public function getHeaderCssClass() { - return $this->getPayment()->getPayRedirectParams(); + return 'head-payment-method'; } /** - * Return redirect message + * Prepare html output * * @return string */ - public function getRedirectMessage() + protected function _toHtml() { - return $this->getPayment()->getRedirectMessage(); + $payment = $this->getQuote()->getPayment(); + if (!$payment->getMethod() || !$payment->getMethodInstance() || !$payment->getMethodInstance()->getIsCentinelValidationEnabled()) { + return ''; + } + return parent::_toHtml(); } - } + diff --git a/app/code/core/Mage/AmazonPayments/Block/Asp/Shortcut.php b/app/code/core/Mage/Centinel/Block/Adminhtml/Validation/Form.php similarity index 56% rename from app/code/core/Mage/AmazonPayments/Block/Asp/Shortcut.php rename to app/code/core/Mage/Centinel/Block/Adminhtml/Validation/Form.php index 4383a3b138..2479b86da0 100644 --- a/app/code/core/Mage/AmazonPayments/Block/Asp/Shortcut.php +++ b/app/code/core/Mage/Centinel/Block/Adminhtml/Validation/Form.php @@ -19,37 +19,37 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_AmazonPayments + * @package Mage_Centinel * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Paypal shortcut link + * Adminhtml sales order create validation card block * * @category Mage - * @package Mage_Paypal + * @package Mage_Centinel * @author Magento Core Team */ -class Mage_AmazonPayments_Block_Asp_Shortcut extends Mage_Core_Block_Template -{ - public function getCheckoutUrl() - { - return $this->getUrl('amazonpayments/asp/checkout'); - } - public function getButtonImageUrl() - { - return Mage::getStoreConfig('payment/amazonpayments_asp/pay_now_button_image_url'); - } - - public function _toHtml() +class Mage_Centinel_Block_Adminhtml_Validation_Form extends Mage_Adminhtml_Block_Sales_Order_Create_Abstract +{ + /** + * Prepare validation and template parameters + */ + protected function _toHtml() { - if (Mage::getStoreConfigFlag('payment/amazonpayments_asp/active') - && Mage::getSingleton('checkout/session')->getQuote()->validateMinimumAmount()) { - return parent::_toHtml(); + $payment = $this->getQuote()->getPayment(); + if ($payment && $method = $payment->getMethodInstance()) { + if ($method->getIsCentinelValidationEnabled() && $centinel = $method->getCentinelValidator()) { + $this->setFrameUrl($centinel->getValidatePaymentDataUrl()) + ->setContainerId('centinel_authenticate_iframe') + ->setMethodCode($method->getCode()) + ; + return parent::_toHtml(); + } } - return ''; } } + diff --git a/app/code/core/Mage/Paybox/Block/Direct/Info.php b/app/code/core/Mage/Centinel/Block/Authentication.php similarity index 60% rename from app/code/core/Mage/Paybox/Block/Direct/Info.php rename to app/code/core/Mage/Centinel/Block/Authentication.php index 0a375e1bb9..c75363ab40 100644 --- a/app/code/core/Mage/Paybox/Block/Direct/Info.php +++ b/app/code/core/Mage/Centinel/Block/Authentication.php @@ -19,30 +19,32 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Paybox + * @package Mage_Centinel * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Paybox Direct Info Block - * - * @category Mage - * @package Mage_Paybox - * @author Magento Core Team + * Centinel validation frame */ -class Mage_Paybox_Block_Direct_Info extends Mage_Payment_Block_Info_Cc +class Mage_Centinel_Block_Authentication extends Mage_Core_Block_Template { - protected function _construct() + /** + * Check whether authentication is required and prepare some template data + * + * @return string + */ + protected function _toHtml() { - parent::_construct(); - $this->setTemplate('paybox/direct/info.phtml'); + $method = Mage::getSingleton('checkout/session')->getQuote()->getPayment()->getMethodInstance(); + if (!$method->getIsCentinelValidationEnabled()) { + return ''; + } + $centinel = $method->getCentinelValidator(); + if ($centinel && $centinel->shouldAuthenticate()) { + $this->setFrameUrl($centinel->getAuthenticationStartUrl()); + return parent::_toHtml(); + } + return ''; } - - public function toPdf() - { - $this->setTemplate('paybox/direct/pdf/info.phtml'); - return $this->toHtml(); - } - } diff --git a/app/code/core/Mage/AmazonPayments/Helper/Data.php b/app/code/core/Mage/Centinel/Block/Authentication/Complete.php similarity index 67% rename from app/code/core/Mage/AmazonPayments/Helper/Data.php rename to app/code/core/Mage/Centinel/Block/Authentication/Complete.php index 4a9417826e..e67227e6bb 100644 --- a/app/code/core/Mage/AmazonPayments/Helper/Data.php +++ b/app/code/core/Mage/Centinel/Block/Authentication/Complete.php @@ -19,28 +19,30 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_AmazonPayments + * @package Mage_Centinel * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** - * Amazon Checlout Data Helper - * - * @category Mage - * @package Mage_AmazonPayments - * @author Magento Core Team + * Centinel validation form lookup */ -class Mage_AmazonPayments_Helper_Data extends Mage_Core_Helper_Abstract +class Mage_Centinel_Block_Authentication_Complete extends Mage_Core_Block_Template { /** - * Format amount value (2 digits after the decimal point) + * Prepare authentication result params and render * - * @param float $amount - * @return float + * @return string */ - public function formatAmount($amount) + protected function _toHtml() { - return round($amount, 2); + $validator = Mage::registry('centinel_validator'); + if (!$validator) { + return ''; + } + $this->setIsSuccess($validator->isAuthenticateSuccessful()); + return parent::_toHtml(); } } + diff --git a/app/code/core/Mage/AmazonPayments/Block/Cba/Success.php b/app/code/core/Mage/Centinel/Block/Authentication/Start.php similarity index 66% rename from app/code/core/Mage/AmazonPayments/Block/Cba/Success.php rename to app/code/core/Mage/Centinel/Block/Authentication/Start.php index 2554fb618d..218edb4fb0 100644 --- a/app/code/core/Mage/AmazonPayments/Block/Cba/Success.php +++ b/app/code/core/Mage/Centinel/Block/Authentication/Start.php @@ -19,32 +19,30 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_AmazonPayments + * @package Mage_Centinel * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + /** - * Amazon Payments Checkout by Amazon Success Block - * - * @category Mage - * @package Mage_AmazonPayments - * @author Magento Core Team + * Authentication start/redirect form */ -class Mage_AmazonPayments_Block_Cba_Success extends Mage_Core_Block_Abstract +class Mage_Centinel_Block_Authentication_Start extends Mage_Core_Block_Template { /** - * Success page + * Prepare form parameters and render * * @return string */ protected function _toHtml() { - echo "

{$this->__('Thank you for your purchase!') }

\n"; - echo $this->__('You will receive an order confirmation email with details of your order and a link to track its progress.
'); - - + $validator = Mage::registry('centinel_validator'); + if ($validator && $validator->shouldAuthenticate()) { + $this->setData($validator->getAuthenticateStartData()); + return parent::_toHtml(); + } return ''; } - } + diff --git a/app/code/core/Mage/Ogone/Block/Info.php b/app/code/core/Mage/Centinel/Block/Logo.php similarity index 76% rename from app/code/core/Mage/Ogone/Block/Info.php rename to app/code/core/Mage/Centinel/Block/Logo.php index 6a40dfbea4..7b66acbe6b 100644 --- a/app/code/core/Mage/Ogone/Block/Info.php +++ b/app/code/core/Mage/Centinel/Block/Logo.php @@ -19,23 +19,29 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Ogone + * @package Mage_Centinel * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** - * Ogone payment iformation block + * Centinel payment form logo block */ -class Mage_Ogone_Block_Info extends Mage_Payment_Block_Info_Cc +class Mage_Centinel_Block_Logo extends Mage_Core_Block_Template { + protected function _construct() + { + parent::_construct(); + $this->setTemplate('centinel/logo.phtml'); + } + /** - * Init ogone payment information block to use on admin area + * Return code of payment method * + * @return string */ - protected function _construct() + public function getCode() { - parent::_construct(); - $this->setTemplate('ogone/info.phtml'); + return $this->getMethod()->getCode(); } } diff --git a/app/code/core/Mage/Centinel/Helper/Data.php b/app/code/core/Mage/Centinel/Helper/Data.php new file mode 100644 index 0000000000..0783c6ad7b --- /dev/null +++ b/app/code/core/Mage/Centinel/Helper/Data.php @@ -0,0 +1,181 @@ + + */ +class Mage_Centinel_Helper_Data extends Mage_Core_Helper_Abstract +{ + /** + * Return label for cmpi field + * + * @param string $fieldName + * @return string + */ + public function getCmpiLabel($fieldName) + { + switch ($fieldName) { + case Mage_Centinel_Model_Service::CMPI_PARES: + return $this->__('3D Secure Verification Result'); + case Mage_Centinel_Model_Service::CMPI_ENROLLED: + return $this->__('3D Secure Cardholder Validation'); + case Mage_Centinel_Model_Service::CMPI_ECI: + return $this->__('3D Secure Electronic Commerce Indicator'); + case Mage_Centinel_Model_Service::CMPI_CAVV: + return $this->__('3D Secure CAVV'); + case Mage_Centinel_Model_Service::CMPI_XID: + return $this->__('3D Secure XID'); + } + return ''; + } + + /** + * Return value for cmpi field + * + * @param string $fieldName + * @param string $value + * @return string + */ + public function getCmpiValue($fieldName, $value) + { + switch ($fieldName) { + case Mage_Centinel_Model_Service::CMPI_PARES: + return $this->_getCmpiParesValue($value); + case Mage_Centinel_Model_Service::CMPI_ENROLLED: + return $this->_getCmpiEnrolledValue($value); + case Mage_Centinel_Model_Service::CMPI_ECI: + return $this->_getCmpiEciValue($value); + case Mage_Centinel_Model_Service::CMPI_CAVV: // break intentionally omitted + case Mage_Centinel_Model_Service::CMPI_XID: + return $value; + } + return ''; + } + + /** + * Return text value for cmpi eci flag field + * + * @param string $value + * @return string + */ + private function _getCmpiEciValue($value) + { + switch ($value) { + case '01': + case '07': + return $this->__('Merchant Liability'); + case '02': + case '05': + case '06': + return $this->__('Card Issuer Liability'); + default: + return $value; + } + } + + /** + * Return text value for cmpi enrolled field + * + * @param string $value + * @return string + */ + private function _getCmpiEnrolledValue($value) + { + switch ($value) { + case 'Y': + return $this->__('Enrolled'); + case 'U': + return $this->__('Enrolled but Authentication Unavailable'); + case 'N': // break intentionally omitted + default: + return $this->__('Not Enrolled'); + } + } + + /** + * Return text value for cmpi pares field + * + * @param string $value + * @return string + */ + private function _getCmpiParesValue($value) + { + switch ($value) { + case 'Y': + return $this->__('Successful'); + case 'N': + return $this->__('Failed'); + case 'U': + return $this->__('Unable to complete'); + case 'A': + return $this->__('Successful attempt'); + default: + return $value; + } + } + + /** + * Enter description here... + * + * @param unknown_type $method + * @return unknown + */ + public function getMethodFormBlock($method) + { + $blockType = 'centinel/logo'; + if ($this->getLayout()) { + $block = $this->getLayout()->createBlock($blockType); + } + else { + $className = Mage::getConfig()->getBlockClassName($blockType); + $block = new $className; + } + $block->setMethod($method); + return $block; + } + + /** + * Return url of page about visa verification + * + * @return string + */ + public function getVisaLearnMorePageUrl() + { + return 'https://usa.visa.com/personal/security/vbv/index.html?ep=v_sym_verifiedbyvisa'; + } + + /** + * Return url of page about mastercard verification + * + * @return string + */ + public function getMastercardLearnMorePageUrl() + { + return 'http://www.mastercardbusiness.com/mcbiz/index.jsp?template=/orphans&content=securecodepopup'; + } +} diff --git a/app/code/core/Mage/Centinel/Model/Api.php b/app/code/core/Mage/Centinel/Model/Api.php new file mode 100644 index 0000000000..6f11457987 --- /dev/null +++ b/app/code/core/Mage/Centinel/Model/Api.php @@ -0,0 +1,231 @@ + '784', 'AFN' => '971', + 'ALL' => '008', 'AMD' => '051', 'ANG' => '532', 'AOA' => '973', 'ARS' => '032', 'AUD' => '036', 'AWG' => '533', + 'AZN' => '944', 'BAM' => '977', 'BBD' => '052', 'BDT' => '050', 'BGN' => '975', 'BHD' => '048', 'BIF' => '108', + 'BMD' => '060', 'BND' => '096', 'BOB' => '068', 'BOV' => '984', 'BRL' => '986', 'BSD' => '044', 'BTN' => '064', + 'BWP' => '072', 'BYR' => '974', 'BZD' => '084', 'CAD' => '124', 'CDF' => '976', 'CHE' => '947', 'CHF' => '756', + 'CHW' => '948', 'CLF' => '990', 'CLP' => '152', 'CNY' => '156', 'COP' => '170', 'COU' => '970', 'CRC' => '188', + 'CUC' => '931', 'CUP' => '192', 'CVE' => '132', 'CZK' => '203', 'DJF' => '262', 'DKK' => '208', 'DOP' => '214', + 'DZD' => '012', 'EEK' => '233', 'EGP' => '818', 'ERN' => '232', 'ETB' => '230', 'EUR' => '978', 'FJD' => '242', + 'FKP' => '238', 'GBP' => '826', 'GEL' => '981', 'GHS' => '936', 'GIP' => '292', 'GMD' => '270', 'GNF' => '324', + 'GTQ' => '320', 'GYD' => '328', 'HKD' => '344', 'HNL' => '340', 'HRK' => '191', 'HTG' => '332', 'HUF' => '348', + 'IDR' => '360', 'ILS' => '376', 'INR' => '356', 'IQD' => '368', 'IRR' => '364', 'ISK' => '352', 'JMD' => '388', + 'JOD' => '400', 'JPY' => '392', 'KES' => '404', 'KGS' => '417', 'KHR' => '116', 'KMF' => '174', 'KPW' => '408', + 'KRW' => '410', 'KWD' => '414', 'KYD' => '136', 'KZT' => '398', 'LAK' => '418', 'LBP' => '422', 'LKR' => '144', + 'LRD' => '430', 'LSL' => '426', 'LTL' => '440', 'LVL' => '428', 'LYD' => '434', 'MAD' => '504', 'MDL' => '498', + 'MGA' => '969', 'MKD' => '807', 'MMK' => '104', 'MNT' => '496', 'MOP' => '446', 'MRO' => '478', 'MUR' => '480', + 'MVR' => '462', 'MWK' => '454', 'MXN' => '484', 'MXV' => '979', 'MYR' => '458', 'MZN' => '943', 'NAD' => '516', + 'NGN' => '566', 'NIO' => '558', 'NOK' => '578', 'NPR' => '524', 'NZD' => '554', 'OMR' => '512', 'PAB' => '590', + 'PEN' => '604', 'PGK' => '598', 'PHP' => '608', 'PKR' => '586', 'PLN' => '985', 'PYG' => '600', 'QAR' => '634', + 'RON' => '946', 'RSD' => '941', 'RUB' => '643', 'RWF' => '646', 'SAR' => '682', 'SBD' => '090', 'SCR' => '690', + 'SDG' => '938', 'SEK' => '752', 'SGD' => '702', 'SHP' => '654', 'SLL' => '694', 'SOS' => '706', 'SRD' => '968', + 'STD' => '678', 'SYP' => '760', 'SZL' => '748', 'THB' => '764', 'TJS' => '972', 'TMT' => '934', 'TND' => '788', + 'TOP' => '776', 'TRY' => '949', 'TTD' => '780', 'TWD' => '901', 'TZS' => '834', 'UAH' => '980', 'UGX' => '800', + 'USD' => '840', 'USN' => '997', 'USS' => '998', 'UYU' => '858', 'UZS' => '860', 'VEF' => '937', 'VND' => '704', + 'VUV' => '548', 'WST' => '882', 'XAF' => '950', 'XAG' => '961', 'XAU' => '959', 'XBA' => '955', 'XBB' => '956', + 'XBC' => '957', 'XBD' => '958', 'XCD' => '951', 'XDR' => '960', 'XOF' => '952', 'XPD' => '964', 'XPF' => '953', + 'XPT' => '962', 'XTS' => '963', 'XXX' => '999', 'YER' => '886', 'ZAR' => '710', 'ZMK' => '894', 'ZWL' => '932', + ); + + /** + * Centinel validation client + * + * @var CentinelClient + */ + protected $_clientInstance = null; + + /** + * Return Centinel thin client object + * + * @return CentinelClient + */ + protected function _getClientInstance() + { + if (empty($this->_clientInstance)) { + $this->_clientInstance = new CentinelClient(); + } + return $this->_clientInstance; + } + + /** + * Return Centinel Api version + * + * @return string + */ + protected function _getVersion() + { + return '1.7'; + } + + /** + * Return transaction type. according centinel documetation it should be "C" + * + * @return "C" + */ + protected function _getTransactionType() + { + return 'C'; + } + + /** + * Return Timeout Connect + * + * @return int + */ + protected function _getTimeoutConnect() + { + return 100; + } + + /** + * Return Timeout Read + * + * @return int + */ + protected function _getTimeoutRead() + { + return 100; + } + + /** + * Call centinel api methods by given method name and data + * + * @param $method string + * @param $data array + * + * @return CentinelClient + */ + protected function _call($method, $data) + { + $client = $this->_getClientInstance(); + $request = array_merge(array( + 'MsgType' => $method, + 'Version' => $this->_getVersion(), + 'ProcessorId' => $this->getProcessorId(), + 'MerchantId' => $this->getMerchantId(), + 'TransactionPwd' => $this->getTransactionPwd(), + 'TransactionType' => $this->_getTransactionType(), + ), $data); + foreach($request as $key => $val) { + $client->add($key, $val); + } + $client->sendHttp($this->_getApiEndpointUrl(), $this->_getTimeoutConnect(), $this->_getTimeoutRead()); + return $client; + } + + /** + * Getter for API call URL + * + * @return string + * @throws Exception + */ + protected function _getApiEndpointUrl() + { + if ($this->getIsTestMode()) { + return 'https://centineltest.cardinalcommerce.com/maps/txns.asp'; + } + $url = $this->getApiEndpointUrl(); + if (!$url) { + throw new Exception('Centinel API endpoint URL is not configured properly.'); + } + return $url; + } + + /** + * Call centinel api lookup method + * + * @return Mage_Centinel_Model_Api + */ + public function callLookup($data) + { + $result = new Varien_Object(); + + $month = strlen($data->getCardExpMonth()) == 1 ? '0' . $data->getCardExpMonth() : $data->getCardExpMonth(); + $currencyCode = $data->getCurrencyCode(); + $currencyNumber = isset(self::$_iso4217Currencies[$currencyCode]) ? self::$_iso4217Currencies[$currencyCode] : ''; + if (!$currencyNumber) { + return $result->setErrorNo(1)->setErrorDesc( + Mage::helper('payment')->__('Not supported currency code %s.', $currencyCode) + ); + } + + $clientResponse = $this->_call('cmpi_lookup', array( + 'Amount' => round($data->getAmount() * 100), + 'CurrencyCode' => $currencyNumber, + 'CardNumber' => $data->getCardNumber(), + 'CardExpMonth'=> $month, + 'CardExpYear' => $data->getCardExpYear(), + 'OrderNumber' => $data->getOrderNumber() + )); + + $result->setErrorNo($clientResponse->getValue('ErrorNo')); + $result->setErrorDesc($clientResponse->getValue('ErrorDesc')); + $result->setTransactionId($clientResponse->getValue('TransactionId')); + $result->setEnrolled($clientResponse->getValue('Enrolled')); + $result->setAcsUrl($clientResponse->getValue('ACSUrl')); + $result->setPayload($clientResponse->getValue('Payload')); + $result->setEciFlag($clientResponse->getValue('EciFlag')); + return $result; + } + + /** + * Call centinel api authentication method + * + * @return Mage_Centinel_Model_Api + */ + public function callAuthentication($data) + { + $result = new Varien_Object(); + + $clientResponse = $this->_call('cmpi_authenticate', array( + 'TransactionId' => $data->getTransactionId(), + 'PAResPayload' => $data->getPaResPayload(), + )); + + $result->setErrorNo($clientResponse->getValue('ErrorNo')); + $result->setErrorDesc($clientResponse->getValue('ErrorDesc')); + $result->setPaResStatus($clientResponse->getValue('PAResStatus')); + $result->setSignatureVerification($clientResponse->getValue('SignatureVerification')); + $result->setCavv($clientResponse->getValue('Cavv')); + $result->setEciFlag($clientResponse->getValue('EciFlag')); + $result->setXid($clientResponse->getValue('Xid')); + return $result; + } +} + diff --git a/app/code/core/Mage/Centinel/Model/Config.php b/app/code/core/Mage/Centinel/Model/Config.php new file mode 100644 index 0000000000..e1c189299c --- /dev/null +++ b/app/code/core/Mage/Centinel/Model/Config.php @@ -0,0 +1,140 @@ +_store = $store; + return $this; + } + + /** + * Return store + * + * @return int|Mage_Core_Model_Store + */ + public function getStore() + { + return $this->_store; + } + + /** + * Return validation state class for card with type $cardType + * + * @param string $cardType + * @return string + */ + public function getStateModelClass($cardType) + { + $node = Mage::getConfig()->getNode($this->_cardTypesConfigPath . '/' . $cardType . '/validator/centinel/state'); + if (!$node) { + return false; + } + return $node->asArray(); + } + + /** + * Return centinel processorId + * + * @return string + */ + public function getProcessorId() + { + return $this->_getServiceConfigValue('processor_id'); + } + + /** + * Return centinel merchantId + * + * @return string + */ + public function getMerchantId() + { + return $this->_getServiceConfigValue('merchant_id'); + } + + /** + * Return centinel transactionPwd + * + * @return string + */ + public function getTransactionPwd() + { + return Mage::helper('core')->decrypt($this->_getServiceConfigValue('password')); + } + + /** + * Return flag - is centinel mode test + * + * @return bool + */ + public function getIsTestMode() + { + return (bool)(int)$this->_getServiceConfigValue('test_mode'); + } + + /** + * Return value of node of centinel config section + * + * @param string $key + * @return string + */ + private function _getServiceConfigValue($key) + { + return Mage::getStoreConfig($this->_serviceConfigPath . '/' . $key, $this->getStore()); + } +} diff --git a/app/code/core/Mage/Centinel/Model/Observer.php b/app/code/core/Mage/Centinel/Model/Observer.php new file mode 100644 index 0000000000..b2237e0ee9 --- /dev/null +++ b/app/code/core/Mage/Centinel/Model/Observer.php @@ -0,0 +1,105 @@ + + */ +class Mage_Centinel_Model_Observer extends Varien_Object +{ + /** + * Set cmpi data to payment + * + * @param Varien_Object $observer + * @return Mage_Centinel_Model_Observer + */ + public function salesEventConvertQuoteToOrder($observer) + { + $payment = $observer->getEvent()->getQuote()->getPayment(); + + if ($payment->getMethodInstance()->getIsCentinelValidationEnabled()) { + $to = array($payment, 'setAdditionalInformation'); + $payment->getMethodInstance()->getCentinelValidator()->exportCmpiData($to); + } + return $this; + } + + /** + * Add cmpi data to info block + * + * @param Varien_Object $observer + * @return Mage_Centinel_Model_Observer + */ + public function paymentInfoBlockPrepareSpecificInformation($observer) + { + if ($observer->getEvent()->getBlock()->getIsSecureMode()) { + return; + } + + $payment = $observer->getEvent()->getPayment(); + $transport = $observer->getEvent()->getTransport(); + $helper = Mage::helper('centinel'); + + $info = array( + Mage_Centinel_Model_Service::CMPI_PARES, + Mage_Centinel_Model_Service::CMPI_ENROLLED, + Mage_Centinel_Model_Service::CMPI_ECI, + Mage_Centinel_Model_Service::CMPI_CAVV, + Mage_Centinel_Model_Service::CMPI_XID + ); + foreach ($info as $key) { + if ($value = $payment->getAdditionalInformation($key)) { + $transport->setData($helper->getCmpiLabel($key), $helper->getCmpiValue($key, $value)); + } + } + return $this; + } + + /** + * Add centinel logo block into payment form + * + * @param Varien_Object $observer + * @return Mage_Centinel_Model_Observer + */ + public function paymentFormBlockToHtmlBefore($observer) + { + $paymentFormBlock = $observer->getEvent()->getBlock(); + $method = $paymentFormBlock->getMethod(); + + if ($method && $method->getIsCentinelValidationEnabled()) { + $paymentFormBlock->setChild( + 'payment.method.'.$method->getCode().'centinel.logo', + Mage::helper('centinel')->getMethodFormBlock($method) + ); + } + return $this; + } +} + diff --git a/app/code/core/Mage/Centinel/Model/Service.php b/app/code/core/Mage/Centinel/Model/Service.php new file mode 100644 index 0000000000..b393b0c2b5 --- /dev/null +++ b/app/code/core/Mage/Centinel/Model/Service.php @@ -0,0 +1,381 @@ + self::CMPI_ENROLLED, + 'lookup_eci_flag' => self::CMPI_ECI, + 'authenticate_pa_res_status' => self::CMPI_PARES, + 'authenticate_cavv' => self::CMPI_CAVV, + 'authenticate_eci_flag' => self::CMPI_ECI, + 'authenticate_xid' => self::CMPI_XID, + ); + + /** + * Validation api model + * + * @var Mage_Centinel_Model_Api + */ + protected $_api; + + /** + * Validation state model + * + * @var Mage_Centinel_Model_StateAbstract + */ + protected $_validationState; + + /** + * Return validation session object + * + * @return Mage_Centinel_Model_Session + */ + protected function _getSession() + { + return Mage::getSingleton('centinel/session'); + } + + /** + * Return value from section of centinel config + * + * @param string $path + * @return string + */ + protected function _getConfig() + { + $config = Mage::getSingleton('centinel/config'); + return $config->setStore($this->getStore()); + } + + /** + * Generate checksum from all passed parameters + * + * @param string $cardType + * @param string $cardNumber + * @param string $cardExpMonth + * @param string $cardExpYear + * @param double $amount + * @param string $currencyCode + * @return string + */ + protected function _generateChecksum($paymentMethodCode, $cardType, $cardNumber, $cardExpMonth, $cardExpYear, $amount, $currencyCode) + { + return md5(implode(func_get_args(), '_')); + } + + /** + * Unified validation/authentication URL getter + * + * @param string $suffix + * @param bool $current + * @return string + */ + private function _getUrl($suffix, $current = false) + { + $params = array( + '_secure' => true, + '_current' => $current, + 'form_key' => Mage::getSingleton('core/session')->getFormKey() + ); + if (Mage::app()->getStore()->isAdmin()) { + return Mage::getSingleton('adminhtml/url')->getUrl('*/centinel_index/' . $suffix, $params); + } else { + return Mage::getUrl('centinel/index/' . $suffix, $params); + } + } + + /** + * Return validation api model + * + * @return Mage_Centinel_Model_Api + */ + protected function _getApi() + { + if (!is_null($this->_api)) { + return $this->_api; + } + + $this->_api = Mage::getSingleton('centinel/api'); + $config = $this->_getConfig(); + $this->_api + ->setProcessorId($config->getProcessorId()) + ->setMerchantId($config->getMerchantId()) + ->setTransactionPwd($config->getTransactionPwd()) + ->setIsTestMode($config->getIsTestMode()) + ->setApiEndpointUrl($this->getCustomApiEndpointUrl()); + return $this->_api; + } + + /** + * Create and return validation state model for card type + * + * @param string $cardType + * @return Mage_Centinel_Model_StateAbstract + */ + protected function _getValidationStateModel($cardType) + { + if ($modelClass = $this->_getConfig()->getStateModelClass($cardType)) { + return Mage::getModel($modelClass); + } + return false; + } + + /** + * Return validation state model + * + * @param string $cardType + * @return Mage_Centinel_Model_StateAbstract + */ + protected function _getValidationState($cardType = null) + { + $type = $cardType ? $cardType : $this->_getSession()->getData('card_type'); + if (!$this->_validationState && $type) { + $model = $this->_getValidationStateModel($type); + if (!$model) { + return false; + } + $model->setDataStorage($this->_getSession()); + $this->_validationState = $model; + } + return $this->_validationState; + } + + /** + * Drop validation state model + * + */ + protected function _resetValidationState() + { + $this->_getSession()->setData(array()); + $this->_validationState = false; + } + + /** + * Drop old and init new validation state model + * + * @param string $cardType + * @param string $dataChecksum + * @return Mage_Centinel_Model_StateAbstract + */ + protected function _initValidationState($cardType, $dataChecksum) + { + $this->_resetValidationState(); + $state = $this->_getValidationStateModel($cardType); + $state->setDataStorage($this->_getSession()) + ->setCardType($cardType) + ->setChecksum($dataChecksum) + ->setIsModeStrict($this->getIsModeStrict()); + return $this->_getValidationState(); + } + + /** + * Process lookup validation and init new validation state model + * + * @param Varien_Object $data + */ + public function lookup($data) + { + $newChecksum = $this->_generateChecksum( + $data->getPaymentMethodCode(), + $data->getCardType(), + $data->getCardNumber(), + $data->getCardExpMonth(), + $data->getCardExpYear(), + $data->getAmount(), + $data->getCurrencyCode() + ); + + $validationState = $this->_initValidationState($data->getCardType(), $newChecksum); + + $api = $this->_getApi(); + $result = $api->callLookup($data); + $validationState->setLookupResult($result); + } + + /** + * Process authenticate validation + * + * @param Varien_Object $data + */ + public function authenticate($data) + { + $validationState = $this->_getValidationState(); + if (!$validationState || $data->getTransactionId() != $validationState->getLookupTransactionId()) { + throw new Exception('Authentication impossible: transaction id or validation state is wrong.'); + } + + $api = $this->_getApi(); + $result = $api->callAuthentication($data); + $validationState->setAuthenticateResult($result); + } + + /** + * Validate payment data + * + * This check is performed on payment information submission, as well as on placing order. + * Workflow state is stored validation state model + * + * @param Varien_Object $data + * @throws Mage_Core_Exception + */ + public function validate($data) + { + $newChecksum = $this->_generateChecksum( + $data->getPaymentMethodCode(), + $data->getCardType(), + $data->getCardNumber(), + $data->getCardExpMonth(), + $data->getCardExpYear(), + $data->getAmount(), + $data->getCurrencyCode() + ); + + $validationState = $this->_getValidationState($data->getCardType()); + if (!$validationState) { + $this->_resetValidationState(); + return; + } + + // check whether is authenticated before placing order + if ($this->getIsPlaceOrder()) { + if ($validationState->getChecksum() != $newChecksum) { + Mage::throwException(Mage::helper('centinel')->__('Payment information error. Please start over.')); + } + if ($validationState->isAuthenticateSuccessful()) { + return; + } + Mage::throwException(Mage::helper('centinel')->__('Please verify the card with the issuer bank before placing the order.')); + } else { + if ($validationState->getChecksum() != $newChecksum) { + $this->lookup($data); + $validationState = $this->_getValidationState(); + } + if ($validationState->isLookupSuccessful()) { + return; + } + Mage::throwException(Mage::helper('centinel')->__('This card has failed validation and cannot be used.')); + } + } + + /** + * Return URL for authentication + * + * @return string + */ + public function getAuthenticationStartUrl() + { + return $this->_getUrl('authenticationstart'); + } + + /** + * Return URL for validation + * + * @return string + */ + public function getValidatePaymentDataUrl() + { + return $this->_getUrl('validatepaymentdata'); + } + + /** + * If authenticate is should return true + * + * @return bool + */ + public function shouldAuthenticate() + { + $validationState = $this->_getValidationState(); + return $validationState && $validationState->isAuthenticateAllowed(); + } + + /** + * Return data for start authentication (redirect customer to bank page) + * + * @return array + */ + public function getAuthenticateStartData() + { + $validationState = $this->_getValidationState(); + if (!$validationState && $this->shouldAuthenticate()) { + throw new Exception('Authentication impossible: validation state is wrong.'); + } + $data = array( + 'acs_url' => $validationState->getLookupAcsUrl(), + 'pa_req' => $validationState->getLookupPayload(), + 'term_url' => $this->_getUrl('authenticationcomplete', true), + 'md' => $validationState->getLookupTransactionId() + ); + return $data; + } + + /** + * If authenticate is successful return true + * + * @return bool + */ + public function isAuthenticateSuccessful() + { + $validationState = $this->_getValidationState(); + return $validationState && $validationState->isAuthenticateSuccessful(); + } + + /** + * Export cmpi lookups and authentication information stored in session into array + * + * @param mixed $to + * @param array $map + * @return mixed $to + */ + public function exportCmpiData($to, $map = false) + { + if (!$map) { + $map = $this->_cmpiMap; + } + if ($validationState = $this->_getValidationState()) { + $to = Varien_Object_Mapper::accumulateByMap($validationState, $to, $map); + } + return $to; + } +} + diff --git a/app/code/core/Mage/Oscommerce/Model/Session.php b/app/code/core/Mage/Centinel/Model/Session.php similarity index 83% rename from app/code/core/Mage/Oscommerce/Model/Session.php rename to app/code/core/Mage/Centinel/Model/Session.php index be8be838a1..36bface825 100644 --- a/app/code/core/Mage/Oscommerce/Model/Session.php +++ b/app/code/core/Mage/Centinel/Model/Session.php @@ -19,21 +19,24 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Oscommerce + * @package Mage_Centinel * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** * - * Paypal transaction session namespace + * Payment centinel session model * * @author Magento Core Team */ -class Mage_Oscommerce_Model_Session extends Mage_Core_Model_Session_Abstract +class Mage_Centinel_Model_Session extends Mage_Core_Model_Session_Abstract { + /** + * constructor + */ public function __construct() { - $this->init('oscommerce'); + $this->init('centinel_validator'); } } diff --git a/app/code/core/Mage/Centinel/Model/State/Mastercard.php b/app/code/core/Mage/Centinel/Model/State/Mastercard.php new file mode 100644 index 0000000000..c4c882e3c4 --- /dev/null +++ b/app/code/core/Mage/Centinel/Model/State/Mastercard.php @@ -0,0 +1,173 @@ +_isLookupStrictSuccessful()) { + return true; + } elseif (!$this->getIsModeStrict() && $this->_isLookupSoftSuccessful()) { + return true; + } else { + return false; + } + } + + /** + * Analyse lookup`s results. If it has require params for authenticate, return true + * + * @return bool + */ + public function isAuthenticateAllowed() + { + return $this->_isLookupStrictSuccessful(); + } + + /** + * Analyse authenticate`s results. If authenticate is successful return true and false if it failure + * Result depends from flag self::getIsModeStrict() + * + * @return bool + */ + public function isAuthenticateSuccessful() + { + $paResStatus = $this->getAuthenticatePaResStatus(); + $eciFlag = $this->getAuthenticateEciFlag(); + $xid = $this->getAuthenticateXid(); + $cavv = $this->getAuthenticateCavv(); + $errorNo = $this->getAuthenticateErrorNo(); + $signatureVerification = $this->getAuthenticateSignatureVerification(); + + //Test cases 1-4, 10 + if ($this->_isLookupStrictSuccessful()) { + + if ($paResStatus == 'Y' && $eciFlag == '02' && $xid != '' && $cavv != '' && $errorNo == '') { + //Test case 1 + if ($signatureVerification == 'Y') { + return true; + } + //Test case 2 + if ($signatureVerification == 'N') { + return false; + } + } + + //Test case 3 + if ($paResStatus == 'N' && $signatureVerification == 'Y' && $eciFlag == '01' && + $xid != '' && $cavv == '' && $errorNo == '') { + return false; + } + + //Test case 4 + if ($paResStatus == 'U' && $signatureVerification == 'Y' && $eciFlag == '01' && + $xid != '' && $cavv == '' && $errorNo == '') { + if ($this->getIsModeStrict()) { + return false; + } else { + return true; + } + } + + //Test case 10 + if ($paResStatus == '' && $signatureVerification == '' && $eciFlag == '01' && + $xid == '' && $cavv == '' && $errorNo == '1050') { + if ($this->getIsModeStrict()) { + return false; + } else { + return true; + } + } + + } + + //Test cases 5-9 + if (!$this->getIsModeStrict() && $this->_isLookupSoftSuccessful()) { + if ($paResStatus == '' && $signatureVerification == '' && $eciFlag == '' && + $xid == '' && $cavv == '' && $errorNo == '') { + return true; + } + } + + return false; + } + + /** + * Analyse lookup`s results. If lookup is strict successful return true + * + * @return bool + */ + private function _isLookupStrictSuccessful() + { + //Test cases 1-4, 10 + if ($this->getLookupEnrolled() == 'Y' && + $this->getLookupAcsUrl() != '' && + $this->getLookupPayload() != '' && + $this->getLookupErrorNo() == '') { + return true; + } + return false; + } + + /** + * Analyse lookup`s results. If lookup is soft successful return true + * + * @return bool + */ + private function _isLookupSoftSuccessful() + { + $acsUrl = $this->getLookupAcsUrl(); + $payload = $this->getLookupPayload(); + $errorNo = $this->getLookupErrorNo(); + $enrolled = $this->getLookupEnrolled(); + + //Test cases 6,7 + if ($acsUrl == '' && $payload == '' && $errorNo == '' && ($enrolled == 'N' || $enrolled == 'U')) { + return true; + } + + //Test case 5 + if ($enrolled == '' && $acsUrl == '' && $payload == '' && $errorNo == 'Timeout number') { + return true; + } + + //Test cases 8,9 + if ($enrolled == 'U' && $acsUrl == '' && $payload == '' && $errorNo == '1001') { + return true; + } + + return false; + } +} diff --git a/app/code/core/Mage/Centinel/Model/State/Visa.php b/app/code/core/Mage/Centinel/Model/State/Visa.php new file mode 100644 index 0000000000..5a7cb3a9fb --- /dev/null +++ b/app/code/core/Mage/Centinel/Model/State/Visa.php @@ -0,0 +1,184 @@ +_isLookupStrictSuccessful()) { + return true; + } elseif (!$this->getIsModeStrict() && $this->_isLookupSoftSuccessful()) { + return true; + } else { + return false; + } + } + + /** + * Analyse lookup`s results. If it has require params for authenticate, return true + * + * @return bool + */ + public function isAuthenticateAllowed() + { + return $this->_isLookupStrictSuccessful(); + } + + /** + * Analyse authenticate`s results. If authenticate is successful return true and false if it failure + * Result depends from flag self::getIsModeStrict() + * + * @return bool + */ + public function isAuthenticateSuccessful() + { + $paResStatus = $this->getAuthenticatePaResStatus(); + $eciFlag = $this->getAuthenticateEciFlag(); + $xid = $this->getAuthenticateXid(); + $cavv = $this->getAuthenticateCavv(); + $errorNo = $this->getAuthenticateErrorNo(); + $signatureVerification = $this->getAuthenticateSignatureVerification(); + + //Test cases 1-5, 11 + if ($this->_isLookupStrictSuccessful()) { + + if ($paResStatus == 'Y' && $eciFlag == '05' && $xid != '' && $cavv != '' && $errorNo == '') { + //Test case 1 + if ($signatureVerification == 'Y') { + return true; + } + //Test case 2 + if ($signatureVerification == 'N') { + return false; + } + } + + //Test case 3 + if ($paResStatus == 'N' && $signatureVerification == 'Y' && $eciFlag == '07' && + $xid != '' && $cavv == '' && $errorNo == '') { + return false; + } + + //Test case 4 + if ($paResStatus == 'A' && $signatureVerification == 'Y' && $eciFlag == '06' && + $xid != '' && $cavv != '' && $errorNo == '') { + if ($this->getIsModeStrict()) { + return false; + } else { + return true; + } + } + + //Test case 5 + if ($paResStatus == 'U' && $signatureVerification == 'Y' && $eciFlag == '07' && + $xid != '' && $cavv == '' && $errorNo == '') { + if ($this->getIsModeStrict()) { + return false; + } else { + return true; + } + } + + //Test case 11 + if ($paResStatus == '' && $signatureVerification == '' && $eciFlag == '07' && + $xid == '' && $cavv == '' && $errorNo == '1050') { + if ($this->getIsModeStrict()) { + return false; + } else { + return true; + } + } + + } + + //Test cases 6-10 + if (!$this->getIsModeStrict() && $this->_isLookupSoftSuccessful()) { + if ($paResStatus == '' && $signatureVerification == '' && $eciFlag == '' && + $xid == '' && $cavv == '' && $errorNo == '') { + return true; + } + } + + return false; + } + + /** + * Analyse lookup`s results. If lookup is strict successful return true + * + * @return bool + */ + private function _isLookupStrictSuccessful() + { + //Test cases 1-5, 11 + if ($this->getLookupEnrolled() == 'Y' && + $this->getLookupAcsUrl() != '' && + $this->getLookupPayload() != '' && + $this->getLookupErrorNo() == '') { + return true; + } + return false; + } + + /** + * Analyse lookup`s results. If lookup is soft successful return true + * + * @return bool + */ + private function _isLookupSoftSuccessful() + { + $acsUrl = $this->getLookupAcsUrl(); + $payload = $this->getLookupPayload(); + $errorNo = $this->getLookupErrorNo(); + $enrolled = $this->getLookupEnrolled(); + + //Test cases 7,8 + if ($acsUrl == '' && $payload == '' && $errorNo == '' && ($enrolled == 'N' || $enrolled == 'U')) { + return true; + } + + //Test case 6 + if ($enrolled == '' && $acsUrl == '' && $payload == '' && $errorNo == 'Timeout number') { + return true; + } + + //Test cases 9,10 + if ($enrolled == 'U' && $acsUrl == '' && $payload == '' && $errorNo == '1001') { + return true; + } + + return false; + } + +} diff --git a/app/code/core/Mage/Centinel/Model/StateAbstract.php b/app/code/core/Mage/Centinel/Model/StateAbstract.php new file mode 100644 index 0000000000..85a0e6cbbf --- /dev/null +++ b/app/code/core/Mage/Centinel/Model/StateAbstract.php @@ -0,0 +1,147 @@ +_dataStorage = $dataStorageModel; + return $this; + } + + /** + * Getter for storage data model + * + * @return Varien_Object + */ + public function getDataStorage() + { + return $this->_dataStorage; + } + + /** + * Retrieves data from the object + * + * If $key is empty will return all the data as an array + * Otherwise it will return value of the attribute specified by $key + * + * If $index is specified it will assume that attribute data is an array + * and retrieve corresponding member. + * + * @param string $key + * @param string|int $index + * @return mixed + */ + public function getData($key='', $index=null) + { + return $this->getDataStorage()->getData($key, $index); + } + + /** + * Overwrite data in the object. + * + * $key can be string or array. + * If $key is string, the attribute value will be overwritten by $value + * + * If $key is an array, it will overwrite all the data in the object. + * + * @param string|array $key + * @param mixed $value + * @return Mage_Centinel_Model_StateAbstract + */ + public function setData($key, $value=null) + { + $this->getDataStorage()->setData($key, $value); + return $this; + } + + /** + * Save lookup result in state model + * + * @param Varien_Object $result + * @return Mage_Centinel_Model_StateAbstract + */ + public function setLookupResult($result) + { + foreach ($result->getData() as $key => $value) { + $this->setData('lookup_' . $key, $value); + } + return $this; + } + + /** + * Save authenticate result in state model + * + * @param Varien_Object $result + * @return Mage_Centinel_Model_StateAbstract + */ + public function setAuthenticateResult($result) + { + foreach ($result->getData() as $key => $value) { + $this->setData('authenticate_' . $key, $value); + } + return $this; + } + + /** + * Analyse lookup`s results. If lookup is successful return true and false if it failure + * Result depends from flag self::getIsModeStrict() + * + * @return bool + */ + abstract public function isLookupSuccessful(); + + /** + * Analyse lookup`s results. If it has require params for authenticate, return true + * + * @return bool + */ + abstract public function isAuthenticateAllowed(); + + /** + * Analyse authenticate`s results. If authenticate is successful return true and false if it failure + * Result depends from flag self::getIsModeStrict() + * + * @return bool + */ + abstract public function isAuthenticateSuccessful(); +} diff --git a/app/code/core/Mage/Centinel/controllers/Adminhtml/Centinel/IndexController.php b/app/code/core/Mage/Centinel/controllers/Adminhtml/Centinel/IndexController.php new file mode 100644 index 0000000000..a8b8ac19d2 --- /dev/null +++ b/app/code/core/Mage/Centinel/controllers/Adminhtml/Centinel/IndexController.php @@ -0,0 +1,116 @@ +getRequest()->getParam('payment'); + $validator = $this->_getValidator(); + if (!$validator) { + throw new Exception('This payment method does not have centinel validation.'); + } + $this->_getPayment()->importData($paymentData); + if ($validator->shouldAuthenticate()) { + $result['authenticationUrl'] = $validator->getAuthenticationStartUrl(); + } else { + Mage::throwException(Mage::helper('centinel')->__('This card has failed validation, but it is possible to place the order.')); + } + } catch (Mage_Core_Exception $e) { + $result['message'] = $e->getMessage(); + } catch (Exception $e) { + Mage::logException($e); + $result['message'] = Mage::helper('centinel')->__('Validation failed.'); + } + $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result)); + } + + /** + * Process autentication start action + * + */ + public function authenticationStartAction() + { + if ($validator = $this->_getValidator()) { + Mage::register('centinel_validator', $validator); + } + $this->loadLayout()->renderLayout(); + } + + /** + * Process autentication complete action + * + */ + public function authenticationCompleteAction() + { + if ($validator = $this->_getValidator()) { + $request = $this->getRequest(); + + $data = new Varien_Object(); + $data->setTransactionId($request->getParam('MD')); + $data->setPaResPayload($request->getParam('PaRes')); + + $validator->authenticate($data); + Mage::register('centinel_validator', $validator); + } + $this->loadLayout()->renderLayout(); + } + + /** + * Return payment model + * + * @return Mage_Sales_Model_Quote_Payment + */ + private function _getPayment() + { + $model = Mage::getSingleton('adminhtml/sales_order_create'); + return $model->getQuote()->getPayment(); + } + + /** + * Return Centinel validation model + * + * @return Mage_Centinel_Model_Service + */ + private function _getValidator() + { + if ($this->_getPayment()->getMethodInstance()->getIsCentinelValidationEnabled()) { + return $this->_getPayment()->getMethodInstance()->getCentinelValidator(); + } + return false; + } +} + diff --git a/app/code/core/Mage/Centinel/controllers/IndexController.php b/app/code/core/Mage/Centinel/controllers/IndexController.php new file mode 100644 index 0000000000..ced32316ec --- /dev/null +++ b/app/code/core/Mage/Centinel/controllers/IndexController.php @@ -0,0 +1,87 @@ +_getValidator()) { + Mage::register('centinel_validator', $validator); + } + $this->loadLayout()->renderLayout(); + } + + /** + * Process autentication complete action + * + */ + public function authenticationCompleteAction() + { + if ($validator = $this->_getValidator()) { + $request = $this->getRequest(); + + $data = new Varien_Object(); + $data->setTransactionId($request->getParam('MD')); + $data->setPaResPayload($request->getParam('PaRes')); + + $validator->authenticate($data); + Mage::register('centinel_validator', $validator); + } + $this->loadLayout()->renderLayout(); + } + + /** + * Return payment model + * + * @return Mage_Sales_Model_Quote_Payment + */ + private function _getPayment() + { + return Mage::getSingleton('checkout/session')->getQuote()->getPayment(); + } + + /** + * Return Centinel validation model + * + * @return Mage_Centinel_Model_Service + */ + private function _getValidator() + { + if ($this->_getPayment()->getMethodInstance()->getIsCentinelValidationEnabled()) { + return $this->_getPayment()->getMethodInstance()->getCentinelValidator(); + } + return false; + } +} + diff --git a/app/code/core/Mage/Centinel/etc/config.xml b/app/code/core/Mage/Centinel/etc/config.xml new file mode 100644 index 0000000000..c22eed0556 --- /dev/null +++ b/app/code/core/Mage/Centinel/etc/config.xml @@ -0,0 +1,150 @@ + + + + + + 1.4.0.0.0 + + + + + + + + model + centinel/observer + salesEventConvertQuoteToOrder + + + + + + + + + + + Mage_Centinel.csv + + + + + + + + + model + centinel/observer + paymentFormBlockToHtmlBefore + + + + + + + standard + + Mage_Centinel + centinel + + + + + + + centinel.xml + + + + + /centinel/ + + + + + + + + model + centinel/observer + paymentInfoBlockPrepareSpecificInformation + + + + + + + + + Mage_Centinel.csv + + + + + + + + centinel.xml + + + + + + + + + + Mage_Centinel_Adminhtml + + + + + + + + + + + + + centinel/state_visa + + + + + + + centinel/state_mastercard + + + + + + + + diff --git a/app/code/core/Mage/Centinel/etc/system.xml b/app/code/core/Mage/Centinel/etc/system.xml new file mode 100644 index 0000000000..d7dacbca05 --- /dev/null +++ b/app/code/core/Mage/Centinel/etc/system.xml @@ -0,0 +1,87 @@ + + + + + + + sales + text + 450 + 1 + 1 + 1 + + + + text + 1 + 1 + 1 + 0 + + + + text + 10 + 1 + 1 + 0 + + + + text + 20 + 1 + 1 + 0 + + + + obscure + adminhtml/system_config_backend_encrypted + 30 + 1 + 1 + 0 + + + + Overrides API URL that may be specified by a Payment Method + select + adminhtml/system_config_source_yesno + 40 + 1 + 1 + 0 + + + + + + + diff --git a/app/code/core/Mage/Checkout/Block/Multishipping/Overview.php b/app/code/core/Mage/Checkout/Block/Multishipping/Overview.php index 0de57a651d..ac238a752b 100644 --- a/app/code/core/Mage/Checkout/Block/Multishipping/Overview.php +++ b/app/code/core/Mage/Checkout/Block/Multishipping/Overview.php @@ -33,6 +33,19 @@ */ class Mage_Checkout_Block_Multishipping_Overview extends Mage_Sales_Block_Items_Abstract { + /** + * Initialize default item renderer for row-level items output + */ + protected function _construct() + { + parent::_construct(); + $this->addItemRender( + $this->_getRowItemType('default'), + 'checkout/cart_item_renderer', + 'checkout/multishipping/overview/item.phtml' + ); + } + /** * Get multishipping checkout model * @@ -234,4 +247,58 @@ public function renderTotals($totals, $colspan=null) . $this->getChild('totals')->setTotals($totals)->renderTotals('footer', $colspan); return $totals; } + + /** + * Add renderer for row-level item output + * + * @param string $type Product type + * @param string $block Block type + * @param string $template Block template + * @return Mage_Checkout_Block_Multishipping_Overview + */ + public function addRowItemRender($type, $block, $template) + { + $type = $this->_getRowItemType($type); + parent::addItemRender($this->_getRowItemType($type), $block, $template); + return $this; + } + + /** + * Return row-level item html + * + * @param Varien_Object $item + * @return string + */ + public function getRowItemHtml(Varien_Object $item) + { + $type = $this->_getItemType($item); + $block = $this->_getRowItemRenderer($type) + ->setItem($item); + $this->_prepareItem($block); + return $block->toHtml(); + } + + /** + * Retrieve renderer block for row-level item output + * + * @param string $type + * @return Mage_Core_Block_Abstract + */ + public function _getRowItemRenderer($type) + { + $type = $this->_getRowItemType($type); + $type = isset($this->_itemRenders[$type]) ? $type : $this->_getRowItemType('default'); + return parent::getItemRenderer($type); + } + + /** + * Wrap row renderers into namespace by adding 'row_' suffix + * + * @param string $type Product type + * @return string + */ + protected function _getRowItemType($type) + { + return 'row_' . $type; + } } diff --git a/app/code/core/Mage/Checkout/Model/Type/Abstract.php b/app/code/core/Mage/Checkout/Model/Type/Abstract.php index 1f7dbd36d4..23f8cffcc2 100644 --- a/app/code/core/Mage/Checkout/Model/Type/Abstract.php +++ b/app/code/core/Mage/Checkout/Model/Type/Abstract.php @@ -150,6 +150,9 @@ protected function _createOrderFromAddress($address) return $order; } + /** + * @deprecated after 1.4.0.0-rc1 + */ protected function _emailOrderConfirmation($email, $name, $order) { $mailer = Mage::getModel('core/email') diff --git a/app/code/core/Mage/Checkout/Model/Type/Multishipping.php b/app/code/core/Mage/Checkout/Model/Type/Multishipping.php index 83f3475135..6e4b185087 100644 --- a/app/code/core/Mage/Checkout/Model/Type/Multishipping.php +++ b/app/code/core/Mage/Checkout/Model/Type/Multishipping.php @@ -158,6 +158,11 @@ public function removeAddressItem($addressId, $itemId) $address->removeItem($item->getId()); } + /** + * Require shiping rate recollect + */ + $address->setCollectShippingRates((boolean) $this->getCollectRatesFlag()); + if (count($address->getAllItems()) == 0) { $address->isDeleted(true); } @@ -374,6 +379,7 @@ public function setPaymentMethod($payment) * * @param Mage_Sales_Model_Quote_Address $address * @return Mage_Sales_Model_Order + * @throws Mage_Checkout_Exception */ protected function _prepareOrder(Mage_Sales_Model_Quote_Address $address) { @@ -394,6 +400,9 @@ protected function _prepareOrder(Mage_Sales_Model_Quote_Address $address) $order->setPayment($convertQuote->paymentToOrderPayment($quote->getPayment())); foreach ($address->getAllItems() as $item) { + if (! $item->getQuoteItem()) { + throw new Mage_Checkout_Exception(Mage::helper('checkout')->__('Item not found or already ordered')); + } $item->setProductType($item->getQuoteItem()->getProductType()) ->setProductOptions($item->getQuoteItem()->getProduct()->getTypeInstance(true)->getOrderOptions($item->getQuoteItem()->getProduct())); $orderItem = $convertQuote->itemToOrderItem($item); diff --git a/app/code/core/Mage/Checkout/Model/Type/Onepage.php b/app/code/core/Mage/Checkout/Model/Type/Onepage.php index ffc9481f35..b914574a7e 100644 --- a/app/code/core/Mage/Checkout/Model/Type/Onepage.php +++ b/app/code/core/Mage/Checkout/Model/Type/Onepage.php @@ -706,7 +706,7 @@ public function getLastOrderId() $orderId = false; if ($lastId) { $order = Mage::getModel('sales/order'); - $order->load(); + $order->load($lastId); $orderId = $order->getIncrementId(); } return $orderId; diff --git a/app/code/core/Mage/Checkout/controllers/CartController.php b/app/code/core/Mage/Checkout/controllers/CartController.php index 66b5448afb..5ed3c37f27 100644 --- a/app/code/core/Mage/Checkout/controllers/CartController.php +++ b/app/code/core/Mage/Checkout/controllers/CartController.php @@ -185,7 +185,7 @@ public function addAction() Mage::dispatchEvent('checkout_cart_add_product_complete', array('product' => $product, 'request' => $this->getRequest(), 'response' => $this->getResponse()) ); - $message = $this->__('%s was successfully added to your shopping cart.', $product->getName()); + $message = $this->__('%s was successfully added to your shopping cart.', Mage::helper('core')->htmlEscape($product->getName())); if (!$this->_getSession()->getNoCartRedirect(true)) { $this->_getSession()->addSuccess($message); $this->_goBack(); @@ -263,6 +263,9 @@ public function updatePostAction() } } $cart = $this->_getCart(); + if (! $cart->getCustomerSession()->getCustomer()->getId() && $cart->getQuote()->getCustomerId()) { + $cart->getQuote()->setCustomerId(null); + } $cart->updateItems($cartData) ->save(); } diff --git a/app/code/core/Mage/Checkout/controllers/MultishippingController.php b/app/code/core/Mage/Checkout/controllers/MultishippingController.php index 790bbae1b6..c3dee6f4ca 100644 --- a/app/code/core/Mage/Checkout/controllers/MultishippingController.php +++ b/app/code/core/Mage/Checkout/controllers/MultishippingController.php @@ -173,6 +173,11 @@ public function addressesAction() $this->_redirect('*/multishipping_address/newShipping'); return; } + + $this->_getState()->unsCompleteStep( + Mage_Checkout_Model_Type_Multishipping_State::STEP_SHIPPING + ); + $this->_getState()->setActiveStep( Mage_Checkout_Model_Type_Multishipping_State::STEP_SELECT_ADDRESSES ); @@ -244,6 +249,7 @@ public function removeItemAction() $itemId = $this->getRequest()->getParam('id'); $addressId = $this->getRequest()->getParam('address'); if ($addressId && $itemId) { + $this->_getCheckout()->setCollectRatesFlag(true); $this->_getCheckout()->removeAddressItem($addressId, $itemId); } $this->_redirect('*/*/addresses'); @@ -460,6 +466,12 @@ public function overviewPostAction() $this->_getCheckout()->getCheckoutSession()->setDisplaySuccess(true); $this->_redirect('*/*/success'); } + catch (Mage_Checkout_Exception $e) { + Mage::helper('checkout')->sendPaymentFailedEmail($this->_getCheckout()->getQuote(), $e->getMessage(), 'multi-shipping'); + $this->_getCheckout()->getCheckoutSession()->clear(); + Mage::getSingleton('checkout/session')->addError($e->getMessage()); + $this->_redirect('*/cart'); + } catch (Mage_Core_Exception $e){ Mage::helper('checkout')->sendPaymentFailedEmail($this->_getCheckout()->getQuote(), $e->getMessage(), 'multi-shipping'); Mage::getSingleton('checkout/session')->addError($e->getMessage()); diff --git a/app/code/core/Mage/Checkout/controllers/OnepageController.php b/app/code/core/Mage/Checkout/controllers/OnepageController.php index 1593e081ea..246b93f7e4 100644 --- a/app/code/core/Mage/Checkout/controllers/OnepageController.php +++ b/app/code/core/Mage/Checkout/controllers/OnepageController.php @@ -39,11 +39,7 @@ class Mage_Checkout_OnepageController extends Mage_Checkout_Controller_Action public function preDispatch() { parent::preDispatch(); - - if (!$this->_preDispatchValidateCustomer()) { - return $this; - } - + $this->_preDispatchValidateCustomer(); return $this; } @@ -258,8 +254,13 @@ public function getAddressAction() $addressId = $this->getRequest()->getParam('address', false); if ($addressId) { $address = $this->getOnepage()->getAddress($addressId); - $this->getResponse()->setHeader('Content-type', 'application/x-json'); - $this->getResponse()->setBody($address->toJson()); + + if (Mage::getSingleton('customer/session')->getCustomer()->getId() == $address->getCustomerId()) { + $this->getResponse()->setHeader('Content-type', 'application/x-json'); + $this->getResponse()->setBody($address->toJson()); + } else { + $this->getResponse()->setHeader('HTTP/1.1','403 Forbidden'); + } } } @@ -287,8 +288,10 @@ public function saveBillingAction() return; } if ($this->getRequest()->isPost()) { - $data = $this->getRequest()->getPost('billing', array()); + $postData = $this->getRequest()->getPost('billing', array()); + $data = $this->_filterPostData($postData); $customerAddressId = $this->getRequest()->getPost('billing_address_id', false); + if (isset($data['email'])) { $data['email'] = trim($data['email']); } @@ -492,4 +495,15 @@ public function saveOrderAction() $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result)); } + /** + * Filtering posted data. Converting localized data if needed + * + * @param array + * @return array + */ + protected function _filterPostData($data) + { + $data = $this->_filterDates($data, array('dob')); + return $data; + } } diff --git a/app/code/core/Mage/Chronopay/Block/Form.php b/app/code/core/Mage/Chronopay/Block/Form.php deleted file mode 100644 index 8d57f388b5..0000000000 --- a/app/code/core/Mage/Chronopay/Block/Form.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ -class Mage_Chronopay_Block_Form extends Mage_Payment_Block_Form_Cc -{ - protected function _construct() - { - parent::_construct(); - $this->setTemplate('chronopay/form.phtml'); - } - -} diff --git a/app/code/core/Mage/Chronopay/Block/Info.php b/app/code/core/Mage/Chronopay/Block/Info.php deleted file mode 100644 index 037984c7fd..0000000000 --- a/app/code/core/Mage/Chronopay/Block/Info.php +++ /dev/null @@ -1,48 +0,0 @@ - - */ -class Mage_Chronopay_Block_Info extends Mage_Payment_Block_Info_Cc -{ - protected function _construct() - { - parent::_construct(); - $this->setTemplate('chronopay/info.phtml'); - } - - public function toPdf() - { - $this->setTemplate('chronopay/pdf/info.phtml'); - return $this->toHtml(); - } - -} diff --git a/app/code/core/Mage/Chronopay/Block/Standard/Failure.php b/app/code/core/Mage/Chronopay/Block/Standard/Failure.php deleted file mode 100644 index 9b62c7cee9..0000000000 --- a/app/code/core/Mage/Chronopay/Block/Standard/Failure.php +++ /dev/null @@ -1,37 +0,0 @@ - -*/ - -class Mage_Chronopay_Block_Standard_Failure extends Mage_Core_Block_Template -{ -} diff --git a/app/code/core/Mage/Chronopay/Block/Standard/Form.php b/app/code/core/Mage/Chronopay/Block/Standard/Form.php deleted file mode 100644 index 2226df7005..0000000000 --- a/app/code/core/Mage/Chronopay/Block/Standard/Form.php +++ /dev/null @@ -1,43 +0,0 @@ - - */ - -class Mage_Chronopay_Block_Standard_Form extends Mage_Payment_Block_Form -{ - protected function _construct() - { - $this->setTemplate('chronopay/standard/form.phtml'); - parent::_construct(); - } -} diff --git a/app/code/core/Mage/Chronopay/Block/Standard/Redirect.php b/app/code/core/Mage/Chronopay/Block/Standard/Redirect.php deleted file mode 100644 index 46000837c4..0000000000 --- a/app/code/core/Mage/Chronopay/Block/Standard/Redirect.php +++ /dev/null @@ -1,59 +0,0 @@ - - */ - -class Mage_Chronopay_Block_Standard_Redirect extends Mage_Core_Block_Abstract -{ - - protected function _toHtml() - { - $standard = Mage::getModel('chronopay/standard'); - $form = new Varien_Data_Form(); - $form->setAction($standard->getChronopayUrl()) - ->setId('chronopay_standard_checkout') - ->setName('chronopay_standard_checkout') - ->setMethod('POST') - ->setUseContainer(true); - foreach ($standard->setOrder($this->getOrder())->getStandardCheckoutFormFields() as $field => $value) { - $form->addField($field, 'hidden', array('name' => $field, 'value' => $value)); - } - $html = ''; - $html.= $this->__('You will be redirected to ChronoPay in a few seconds.'); - $html.= $form->toHtml(); - $html.= ''; - $html.= ''; - - return $html; - } -} diff --git a/app/code/core/Mage/Chronopay/Helper/Data.php b/app/code/core/Mage/Chronopay/Helper/Data.php deleted file mode 100644 index 9630876202..0000000000 --- a/app/code/core/Mage/Chronopay/Helper/Data.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ -class Mage_Chronopay_Helper_Data extends Mage_Core_Helper_Abstract -{ - -} diff --git a/app/code/core/Mage/Chronopay/Model/Api/Debug.php b/app/code/core/Mage/Chronopay/Model/Api/Debug.php deleted file mode 100644 index b53494e2a2..0000000000 --- a/app/code/core/Mage/Chronopay/Model/Api/Debug.php +++ /dev/null @@ -1,41 +0,0 @@ - - */ -class Mage_Chronopay_Model_Api_Debug extends Mage_Core_Model_Abstract -{ - protected function _construct() - { - $this->_init('chronopay/api_debug'); - } -} diff --git a/app/code/core/Mage/Chronopay/Model/Config.php b/app/code/core/Mage/Chronopay/Model/Config.php deleted file mode 100644 index 0a17a9f5ac..0000000000 --- a/app/code/core/Mage/Chronopay/Model/Config.php +++ /dev/null @@ -1,126 +0,0 @@ - - */ - -class Mage_Chronopay_Model_Config extends Varien_Object -{ - /** - * Return config var - * - * @param string Var key - * @param string Default value for non-existing key - * @return mixed - */ - public function getConfigData($key, $default=false) - { - if (!$this->hasData($key)) { - $value = Mage::getStoreConfig('payment/chronopay_standard/'.$key); - if (is_null($value) || false===$value) { - $value = $default; - } - $this->setData($key, $value); - } - return $this->getData($key); - } - - /** - * Return Site ID registered in ChronoPay Admnin Panel - * - * @return string Site ID - */ - public function getSiteId () - { - return $this->getConfigData('site_id'); - } - - /** - * Return Product ID (general type payments) registered in ChronoPay Admnin Panel - * - * @return string Product ID - */ - public function getProductId () - { - return $this->getConfigData('product_id'); - } - - /** - * Return Store description sent to Chronopay - * - * @return string Description - */ - public function getDescription () - { - $description = $this->getConfigData('description'); - return $description; - } - - /** - * Return new order status - * - * @return string New order status - */ - public function getNewOrderStatus () - { - return $this->getConfigData('order_status'); - } - - /** - * Return debug flag - * - * @return boolean Debug flag (0/1) - */ - public function getDebug () - { - return $this->getConfigData('debug_flag'); - } - - /** - * Return accepted currency - * - * @return string Currenc - */ - public function getCurrency () - { - return $this->getConfigData('currency'); - } - - /** - * Return client interface language - * - * @return string(2) Accepted language - */ - public function getLanguage () - { - return $this->getConfigData('language'); - } -} diff --git a/app/code/core/Mage/Chronopay/Model/Gateway.php b/app/code/core/Mage/Chronopay/Model/Gateway.php deleted file mode 100644 index 9ac285488b..0000000000 --- a/app/code/core/Mage/Chronopay/Model/Gateway.php +++ /dev/null @@ -1,336 +0,0 @@ - - */ - -class Mage_Chronopay_Model_Gateway extends Mage_Payment_Model_Method_Cc -{ - const CGI_URL = 'https://secure.chronopay.com/gateway.cgi'; - - const OPCODE_CHARGING = 1; - const OPCODE_REFUND = 2; - const OPCODE_AUTHORIZE = 4; - const OPCODE_VOID_AUTHORIZE = 5; - const OPCODE_CONFIRM_AUTHORIZE = 6; - const OPCODE_CUSTOMER_FUND_TRANSFER = 8; - - protected $_code = 'chronopay_gateway'; - - protected $_formBlockType = 'chronopay/form'; - protected $_infoBlockType = 'chronopay/info'; - - /** - * Availability options - */ - protected $_isGateway = true; - protected $_canAuthorize = true; - protected $_canCapture = true; - protected $_canCapturePartial = false; - protected $_canRefund = true; - protected $_canVoid = false; - protected $_canUseInternal = true; - protected $_canUseCheckout = true; - protected $_canUseForMultishipping = true; - protected $_canSaveCc = false; - - /** - * Return ip address of customer - * - * @return string - */ - protected function _getIp () - { - return Mage::helper('core/http')->getRemoteAddr(); - } - - /** - * Return shared secret key from config - * - * @return string - */ - protected function _getSharedSecret () - { - return $this->getConfigData('shared_secret'); - } - - public function authorize(Varien_Object $payment, $amount) - { - $payment->setAmount($amount); - $payment->setOpcode(self::OPCODE_AUTHORIZE); - - $request = $this->_buildRequest($payment); - $result = $this->_postRequest($request); - - if (!$result->getError()) { - $payment->setStatus(self::STATUS_APPROVED); - $payment->setCcTransId($result->getTransaction()); - } else { - Mage::throwException($result->getError()); - } - - return $this; - } - - public function capture(Varien_Object $payment, $amount) - { - $payment->setAmount($amount); - if ($payment->getCcTransId()) { - $this->setTransactionId($payment->getCcTransId()); - $payment->setOpcode(self::OPCODE_CONFIRM_AUTHORIZE); - } else { - $payment->setOpcode(self::OPCODE_CHARGING); - } - - $request = $this->_buildRequest($payment); - $result = $this->_postRequest($request); - - if (!$result->getError()) { - $payment->setStatus(self::STATUS_APPROVED); - $payment->setLastTransId($result->getTransaction()); - } else { - Mage::throwException($result->getError()); - } - - return $this; - } - - public function refund(Varien_Object $payment, $amount) - { - $payment->setAmount($amount); - $payment->setOpcode(self::OPCODE_REFUND); - - $this->setTransactionId($payment->getRefundTransactionId()); - - $request = $this->_buildRequest($payment); - $result = $this->_postRequest($request); - - $payment->setStatus(self::STATUS_APPROVED); - $payment->setLastTransId($result->getTransaction()); - - return $this; - } - - /** - * Building request array - * - * @param Varien_Object - * @return array - */ - protected function _buildRequest(Varien_Object $payment) - { - $order = $payment->getOrder(); - $billing = $order->getBillingAddress(); - $streets = $billing->getStreet(); - $street = isset($streets[0]) && $streets[0] != '' - ? $streets[0] - : (isset($streets[1]) && $streets[1] != '' ? $streets[1] : ''); - - $request = Mage::getModel('chronopay/gateway_request') - ->setOpcode($payment->getOpcode()) - ->setProductId($this->getConfigData('product_id')); - - switch ($request->getOpcode()) { - case self::OPCODE_CUSTOMER_FUND_TRANSFER : - $request->setCustomer($order->getCustomerId()) - ->setAmount(sprintf('%.2f', $payment->getAmount())) - ->setCurrency($order->getBaseCurrencyCode()); - break; - case self::OPCODE_CHARGING : - case self::OPCODE_REFUND : - case self::OPCODE_AUTHORIZE : - case self::OPCODE_VOID_AUTHORIZE : - $request->setFname($billing->getFirstname()) - ->setLname($billing->getLastname()) - ->setCardholder($payment->getCcOwner()) - ->setZip($billing->getPostcode()) - ->setStreet($street) - ->setCity($billing->getCity()) - ->setState($billing->getRegionModel()->getCode()) - ->setCountry($billing->getCountryModel()->getIso3Code()) - ->setEmail($order->getCustomerEmail()) - ->setPhone($billing->getTelephone()) - ->setIp($this->_getIp()) - ->setCardNo($payment->getCcNumber()) - ->setCvv($payment->getCcCid()) - ->setExpirey($payment->getCcExpYear()) - ->setExpirem(sprintf('%02d', $payment->getCcExpMonth())) - ->setAmount(sprintf('%.2f', $payment->getAmount())) - ->setCurrency($order->getBaseCurrencyCode()); - break; - default : - Mage::throwException( - Mage::helper('chronopay')->__('Invalid operation code') - ); - break; - } - - $request->setShowTransactionId(1); - - if ($this->getTransactionId()) { - $request->setTransaction($this->getTransactionId()); - } - - - $hash = $this->_getHash($request); - $request->setHash($hash); - return $request; - } - - /** - * Send request to gateway - * - * @param Mage_Chronopay_Model_Gateway_Request - * @return mixed - */ - protected function _postRequest(Mage_Chronopay_Model_Gateway_Request $request) - { - $result = Mage::getModel('chronopay/gateway_result'); - - $client = new Varien_Http_Client(); - - $url = $this->getConfigData('cgi_url'); - $client->setUri($url ? $url : self::CGI_URL); - $client->setConfig(array( - 'maxredirects' => 0, - 'timeout' => 30, - )); - $client->setParameterPost($request->getData()); - $client->setMethod(Zend_Http_Client::POST); - - if ($this->getConfigData('debug_flag')) { - $debug = Mage::getModel('chronopay/api_debug') - ->setRequestBody($client->getUri() . "\n" . print_r($request->getData(), 1)) - ->save(); - } - - try { - $response = $client->request(); - $body = $response->getRawBody(); - - if (preg_match('/(T\|(.+)\|[\r\n]{0,}){0,1}(Y\|(.+)?|\|)|(N\|(.+[\r\n]{0,}.+){0,})/', $body, $matches)) { - - $transactionId = $matches[2]; - $message = isset($matches[4])?trim($matches[4], '|'):''; - - if (isset($matches[5], $matches[6])) { - $result->setError($matches[6]); - Mage::throwException($matches[6]); - } - - if ($message == 'Completed') { - $result->setTransaction($request->getTransaction()); - } - - if (strlen($transactionId)) { - $result->setTransaction($transactionId); - } - - if (!$result->getTransaction()) { - Mage::throwException(Mage::helper('chronopay')->__('Transaction ID is invalid')); - } - } else { - Mage::throwException(Mage::helper('chronopay')->__('Invalid response format')); - } - - if ($this->getConfigData('debug_flag')) { - $debug->setResponseBody($body)->save(); - } - - } catch (Exception $e) { - $result->setResponseCode(-1) - ->setResponseReasonCode($e->getCode()) - ->setResponseReasonText($e->getMessage()); - - - $exceptionMsg = Mage::helper('chronopay')->__('Gateway request error: %s', $e->getMessage()); - - if ($this->getConfigData('debug_flag')) { - $debug->setResponseBody($body)->save(); - } - - Mage::throwException($exceptionMsg); - } - return $result; - } - - /** - * Generate MD5 hash for transaction checksum - * - * @param Mage_Chronopay_Model_Gateway_Request - * @return string MD5 - */ - protected function _getHash(Mage_Chronopay_Model_Gateway_Request $request) - { - $hashArray = array( - $this->_getSharedSecret(), - $request->getOpcode(), - $request->getProductId() - ); - - switch ($request->getOpcode()) { - case self::OPCODE_CHARGING : - case self::OPCODE_AUTHORIZE : - $hashArray[] = $request->getFname(); - $hashArray[] = $request->getLname(); - $hashArray[] = $request->getStreet(); - $hashArray[] = $this->_getIp(); - $hashArray[] = $request->getCardNo(); - $hashArray[] = $request->getAmount(); - break; - - case self::OPCODE_VOID_AUTHORIZE : - case self::OPCODE_CONFIRM_AUTHORIZE : - $hashArray[] = $request->getTransaction(); - break; - - case self::OPCODE_REFUND : - $hashArray[] = $request->getTransaction(); - $hashArray[] = $request->getAmount(); - break; - - case self::OPCODE_CUSTOMER_FUND_TRANSFER : - $hashArray[] = $request->getCustomer(); - $hashArray[] = $request->getTransaction(); - $hashArray[] = $request->getAmount(); - break; - - default : - Mage::throwException( - Mage::helper('chronopay')->__('Invalid operation code') - ); - break; - } - - return md5(implode('', $hashArray)); - } - -} diff --git a/app/code/core/Mage/Chronopay/Model/Gateway/Request.php b/app/code/core/Mage/Chronopay/Model/Gateway/Request.php deleted file mode 100644 index f67661262b..0000000000 --- a/app/code/core/Mage/Chronopay/Model/Gateway/Request.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ - -class Mage_Chronopay_Model_Gateway_Request extends Varien_Object -{ -} diff --git a/app/code/core/Mage/Chronopay/Model/Gateway/Result.php b/app/code/core/Mage/Chronopay/Model/Gateway/Result.php deleted file mode 100644 index ee4a9013b8..0000000000 --- a/app/code/core/Mage/Chronopay/Model/Gateway/Result.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ - -class Mage_Chronopay_Model_Gateway_Result extends Varien_Object -{ -} diff --git a/app/code/core/Mage/Chronopay/Model/Mysql4/Api/Debug.php b/app/code/core/Mage/Chronopay/Model/Mysql4/Api/Debug.php deleted file mode 100644 index 6132be998d..0000000000 --- a/app/code/core/Mage/Chronopay/Model/Mysql4/Api/Debug.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ - -class Mage_Chronopay_Model_Mysql4_Api_Debug extends Mage_Core_Model_Mysql4_Abstract -{ - protected function _construct() - { - $this->_init('chronopay/api_debug', 'debug_id'); - } -} diff --git a/app/code/core/Mage/Chronopay/Model/Mysql4/Api/Debug/Collection.php b/app/code/core/Mage/Chronopay/Model/Mysql4/Api/Debug/Collection.php deleted file mode 100644 index a79637608a..0000000000 --- a/app/code/core/Mage/Chronopay/Model/Mysql4/Api/Debug/Collection.php +++ /dev/null @@ -1,41 +0,0 @@ - - */ -class Mage_Chronopay_Model_Mysql4_Api_Debug_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract -{ - protected function _construct() - { - $this->_init('chronopay/api_debug'); - } -} diff --git a/app/code/core/Mage/Chronopay/Model/Mysql4/Setup.php b/app/code/core/Mage/Chronopay/Model/Mysql4/Setup.php deleted file mode 100644 index 14df4f2b32..0000000000 --- a/app/code/core/Mage/Chronopay/Model/Mysql4/Setup.php +++ /dev/null @@ -1,39 +0,0 @@ - - */ - -class Mage_Chronopay_Model_Mysql4_Setup extends Mage_Sales_Model_Mysql4_Setup -{ - -} diff --git a/app/code/core/Mage/Chronopay/Model/Source/Cctype.php b/app/code/core/Mage/Chronopay/Model/Source/Cctype.php deleted file mode 100644 index 7baf32ea85..0000000000 --- a/app/code/core/Mage/Chronopay/Model/Source/Cctype.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -class Mage_Chronopay_Model_Source_Cctype extends Mage_Payment_Model_Source_Cctype -{ - public function getAllowedTypes() - { - return array('VI', 'MC', 'AE', 'DICL', 'JCB', 'ENR', 'SS', 'DI'); - } -} diff --git a/app/code/core/Mage/Chronopay/Model/Source/Language.php b/app/code/core/Mage/Chronopay/Model/Source/Language.php deleted file mode 100644 index e8fee6f1dd..0000000000 --- a/app/code/core/Mage/Chronopay/Model/Source/Language.php +++ /dev/null @@ -1,50 +0,0 @@ - - */ - -class Mage_Chronopay_Model_Source_Language -{ - public function toOptionArray() - { - return array( - array('value' => 'EN', 'label' => Mage::helper('chronopay')->__('English')), - array('value' => 'RU', 'label' => Mage::helper('chronopay')->__('Russian')), - array('value' => 'NL', 'label' => Mage::helper('chronopay')->__('Dutch')), - array('value' => 'DE', 'label' => Mage::helper('chronopay')->__('German')), - ); - } -} - - - diff --git a/app/code/core/Mage/Chronopay/Model/Source/PaymentAction.php b/app/code/core/Mage/Chronopay/Model/Source/PaymentAction.php deleted file mode 100644 index d945684523..0000000000 --- a/app/code/core/Mage/Chronopay/Model/Source/PaymentAction.php +++ /dev/null @@ -1,49 +0,0 @@ - - */ -class Mage_Chronopay_Model_Source_PaymentAction -{ - public function toOptionArray() - { - return array( - array( - 'value' => Mage_Chronopay_Model_Gateway::ACTION_AUTHORIZE, - 'label' => Mage::helper('chronopay')->__('Authorize Only') - ), - array( - 'value' => Mage_Chronopay_Model_Gateway::ACTION_AUTHORIZE_CAPTURE, - 'label' => Mage::helper('chronopay')->__('Authorize and Capture') - ), - ); - } -} diff --git a/app/code/core/Mage/Chronopay/Model/Standard.php b/app/code/core/Mage/Chronopay/Model/Standard.php deleted file mode 100644 index d6cfeb8ac9..0000000000 --- a/app/code/core/Mage/Chronopay/Model/Standard.php +++ /dev/null @@ -1,269 +0,0 @@ - - */ -class Mage_Chronopay_Model_Standard extends Mage_Payment_Model_Method_Abstract -{ - protected $_code = 'chronopay_standard'; - protected $_formBlockType = 'chronopay/standard_form'; - - protected $_isGateway = false; - protected $_canAuthorize = true; - protected $_canCapture = true; - protected $_canCapturePartial = false; - protected $_canRefund = false; - protected $_canVoid = false; - protected $_canUseInternal = false; - protected $_canUseCheckout = true; - protected $_canUseForMultishipping = false; - - protected $_order = null; - - - /** - * Get Config model - * - * @return object Mage_Chronopay_Model_Config - */ - public function getConfig() - { - return Mage::getSingleton('chronopay/config'); - } - - /** - * Payment validation - * - * @param none - * @return Mage_Chronopay_Model_Standard - */ - public function validate() - { - parent::validate(); - $paymentInfo = $this->getInfoInstance(); - if ($paymentInfo instanceof Mage_Sales_Model_Order_Payment) { - $currency_code = $paymentInfo->getOrder()->getBaseCurrencyCode(); - } else { - $currency_code = $paymentInfo->getQuote()->getBaseCurrencyCode(); - } - if ($currency_code != $this->getConfig()->getCurrency()) { - Mage::throwException(Mage::helper('chronopay')->__('Selected currency code ('.$currency_code.') is not compatible with ChronoPay')); - } - return $this; - } - - /** - * Capture payment - * - * @param Varien_Object $orderPayment - * @return Mage_Payment_Model_Abstract - */ - public function capture (Varien_Object $payment, $amount) - { - $payment->setStatus(self::STATUS_APPROVED) - ->setLastTransId($this->getTransactionId()); - - return $this; - } - - /** - * Returns Target URL - * - * @return string Target URL - */ - public function getChronopayUrl () - { - return 'https://secure.chronopay.com/index_shop.cgi'; - } - - /** - * Return URL for Chronopay success response - * - * @return string URL - */ - protected function getSuccessURL () - { - return Mage::getUrl('chronopay/standard/success', array('_secure' => true)); - } - - /** - * Return URL for Chronopay notification - * - * @return string Notification URL - */ - protected function getNotificationURL () - { - return Mage::getUrl('chronopay/standard/notify', array('_secure' => true)); - } - - /** - * Return URL for Chronopay failure response - * - * @return string URL - */ - protected function getFailureURL () - { - return Mage::getUrl('chronopay/standard/failure', array('_secure' => true)); - } - - /** - * Form block description - * - * @return object - */ - public function createFormBlock($name) - { - $block = $this->getLayout()->createBlock('chronopay/form_standard', $name); - $block->setMethod($this->_code); - $block->setPayment($this->getPayment()); - - return $block; - } - - /** - * Return Order Place Redirect URL - * - * @return string Order Redirect URL - */ - public function getOrderPlaceRedirectUrl() - { - return Mage::getUrl('chronopay/standard/redirect'); - } - - /** - * Return Standard Checkout Form Fields for request to Chronopay - * - * @return array Array of hidden form fields - */ - public function getStandardCheckoutFormFields () - { - $order = $this->getOrder(); - if (!($order instanceof Mage_Sales_Model_Order)) { - Mage::throwException($this->_getHelper()->__('Cannot retrieve order object')); - } - - $billingAddress = $order->getBillingAddress(); - - $streets = $billingAddress->getStreet(); - $street = isset($streets[0]) && $streets[0] != '' - ? $streets[0] - : (isset($streets[1]) && $streets[1] != '' ? $streets[1] : ''); - - if ($this->getConfig()->getDescription()) { - $transDescription = $this->getConfig()->getDescription(); - } else { - $transDescription = Mage::helper('chronopay')->__('Order #%s', $order->getRealOrderId()); - } - - if ($order->getCustomerEmail()) { - $email = $order->getCustomerEmail(); - } elseif ($billingAddress->getEmail()) { - $email = $billingAddress->getEmail(); - } else { - $email = ''; - } - - $fields = array( - 'product_id' => $this->getConfig()->getProductId(), - 'product_name' => $transDescription, - 'product_price' => $order->getBaseGrandTotal(), - 'language' => $this->getConfig()->getLanguage(), - 'f_name' => $billingAddress->getFirstname(), - 's_name' => $billingAddress->getLastname(), - 'street' => $street, - 'city' => $billingAddress->getCity(), - 'state' => $billingAddress->getRegionModel()->getCode(), - 'zip' => $billingAddress->getPostcode(), - 'country' => $billingAddress->getCountryModel()->getIso3Code(), - 'phone' => $billingAddress->getTelephone(), - 'email' => $email, - 'cb_url' => $this->getNotificationURL(), - 'cb_type' => 'P', // POST method used (G - GET method) - 'decline_url' => $this->getFailureURL(), - 'cs1' => Mage::helper('core')->encrypt($order->getRealOrderId()) - ); - - if ($this->getConfig()->getDebug()) { - $debug = Mage::getModel('chronopay/api_debug') - ->setRequestBody($this->getChronopayUrl()."\n".print_r($fields,1)) - ->save(); - $fields['cs2'] = $debug->getId(); - } - - return $fields; - } - - /** - * Validate Response from ChronoPay - * - * @param array Post data returned from ChronoPay - * @return mixed - */ - public function validateResponse ($data) - { - $order = $this->getOrder(); - - if (!($order instanceof Mage_Sales_Model_Order)) { - Mage::throwException($this->_getHelper()->__('Cannot retrieve order object')); - } - - try { - $ok = is_array($data) - && isset($data['transaction_type']) && $data['transaction_type'] != '' - && isset($data['customer_id']) && $data['customer_id'] != '' - && isset($data['site_id']) && $data['site_id'] != '' - && isset($data['product_id']) && $data['product_id'] != ''; - - if (!$ok) { - throw new Exception('Cannot restore order or invalid order ID'); - } - - // validate site ID - if ($this->getConfig()->getSiteId() != $data['site_id']) { - throw new Exception('Invalid site ID'); - } - - // validate product ID - if ($this->getConfig()->getProductId() != $data['product_id']) { - throw new Exception('Invalid product ID'); - } - - // Successful transaction type - if (!in_array($data['transaction_type'], array('initial', 'onetime'))) { - throw new Exception('Transaction is not successful'); - } - - } catch (Exception $e) { - return $e; - } - } -} diff --git a/app/code/core/Mage/Chronopay/controllers/StandardController.php b/app/code/core/Mage/Chronopay/controllers/StandardController.php deleted file mode 100644 index 2c96139df3..0000000000 --- a/app/code/core/Mage/Chronopay/controllers/StandardController.php +++ /dev/null @@ -1,219 +0,0 @@ - -*/ -class Mage_Chronopay_StandardController extends Mage_Core_Controller_Front_Action -{ - /** - * Order instance - */ - protected $_order; - - /** - * Return debug flag - * - * @return boolean - */ - public function getDebug () - { - return Mage::getSingleton('chronopay/config')->getDebug(); - } - - /** - * Get order - * - * @return Mage_Sales_Model_Order - */ - public function getOrder () - { - if ($this->_order == null) { - $session = Mage::getSingleton('checkout/session'); - $this->_order = Mage::getModel('sales/order'); - $this->_order->loadByIncrementId($session->getLastRealOrderId()); - } - return $this->_order; - } - - /** - * When a customer chooses Chronopay on Checkout/Payment page - * - */ - public function redirectAction() - { - $session = Mage::getSingleton('checkout/session'); - $session->setChronopayStandardQuoteId($session->getQuoteId()); - - $order = $this->getOrder(); - - if (!$order->getId()) { - $this->norouteAction(); - return; - } - - $order->addStatusToHistory( - $order->getStatus(), - Mage::helper('chronopay')->__('Customer was redirected to Chronopay') - ); - $order->save(); - - $this->getResponse() - ->setBody($this->getLayout() - ->createBlock('chronopay/standard_redirect') - ->setOrder($order) - ->toHtml()); - - $session->unsQuoteId(); - } - - /** - * Success response from Chronopay - */ - public function successAction() - { - $session = Mage::getSingleton('checkout/session'); - $session->setQuoteId($session->getChronopayStandardQuoteId()); - $session->unsChronopayStandardQuoteId(); - - $order = $this->getOrder(); - - if (!$order->getId()) { - $this->norouteAction(); - return; - } - - $order->addStatusToHistory( - $order->getStatus(), - Mage::helper('chronopay')->__('Customer successfully returned from Chronopay') - ); - - $order->save(); - $this->_redirect('checkout/onepage/success'); - } - - - /** - * Notification Action from ChronoPay - */ - public function notifyAction () - { - $postData = $this->getRequest()->getPost(); - - if (!count($postData)) { - $this->norouteAction(); - return; - } - - if ($this->getDebug()) { - $debug = Mage::getModel('chronopay/api_debug'); - if (isset($postData['cs2']) && $postData['cs2'] > 0) { - $debug->setId($postData['cs2']); - } - $debug->setResponseBody(print_r($postData,1))->save(); - } - - $order = Mage::getModel('sales/order'); - $order->loadByIncrementId(Mage::helper('core')->decrypt($postData['cs1'])); - if ($order->getId()) { - $result = $order->getPayment()->getMethodInstance()->setOrder($order)->validateResponse($postData); - - if ($result instanceof Exception) { - if ($order->getId()) { - $order->addStatusToHistory( - $order->getStatus(), - $result->getMessage() - ); - $order->cancel(); - } - Mage::throwException($result->getMessage()); - return; - } - - $order->sendNewOrderEmail(); - - $order->getPayment()->getMethodInstance()->setTransactionId($postData['transaction_id']); - - if ($this->saveInvoice($order)) { - $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true); - } - $order->save(); - } - } - - /** - * Save invoice for order - * - * @param Mage_Sales_Model_Order $order - * @return boolean Can save invoice or not - */ - protected function saveInvoice (Mage_Sales_Model_Order $order) - { - if ($order->canInvoice()) { - $invoice = $order->prepareInvoice(); - $invoice->register()->capture(); - Mage::getModel('core/resource_transaction') - ->addObject($invoice) - ->addObject($invoice->getOrder()) - ->save(); - return true; - } - - return false; - } - - /** - * Failure response from Chronopay - */ - public function failureAction () - { - $errorMsg = Mage::helper('chronopay')->__('There was an error occurred during paying process.'); - - $order = $this->getOrder(); - - if (!$order->getId()) { - $this->norouteAction(); - return; - } - - if ($order instanceof Mage_Sales_Model_Order && $order->getId()) { - $order->addStatusToHistory($order->getStatus(), $errorMsg); - $order->cancel(); - $order->save(); - } - - $this->loadLayout(); - $this->renderLayout(); - - Mage::getSingleton('checkout/session')->unsLastRealOrderId(); - } - -} diff --git a/app/code/core/Mage/Chronopay/etc/config.xml b/app/code/core/Mage/Chronopay/etc/config.xml deleted file mode 100644 index 5d750b0560..0000000000 --- a/app/code/core/Mage/Chronopay/etc/config.xml +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - 0.1.0 - - - - - - Mage_Chronopay_Model - chronopay_mysql4 - - - Mage_Chronopay_Model_Mysql4 - - chronopay_api_debug
-
-
-
- - - - Mage_Chronopay - Mage_Chronopay_Model_Mysql4_Setup - - - - - Mage_Chronopay_Block - - - - - - DI - Discover - 60 - - - JCB - JCB - 61 - - - DICL - Diners Club - 62 - - - ENR - enRoute - 63 - - - SS - Maestro/Solo - 64 - - - - -
- - - /chronopay/standard - - - - standard - - Mage_Chronopay - chronopay - - - - - - - - Mage_Chronopay.csv - - - - - - - - chronopay.xml - - - - - - - - - - Mage_Chronopay.csv - - - - - - - - - chronopay/standard - ChronoPay Standard - 0 - O - - - chronopay/gateway - ChronoPay Gateway - 0 - O - - - -
diff --git a/app/code/core/Mage/Chronopay/etc/system.xml b/app/code/core/Mage/Chronopay/etc/system.xml deleted file mode 100644 index 31ca9c13b8..0000000000 --- a/app/code/core/Mage/Chronopay/etc/system.xml +++ /dev/null @@ -1,272 +0,0 @@ - - - - - - - - - Please specify Access URL: {STORE_URL}/chronopay/standard/success in the ChronoPay Client Admin. - text - 251 - 1 - 1 - 1 - - - - select - adminhtml/system_config_source_yesno - 1 - 1 - 1 - 0 - - - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>2</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - - - - text - 3 - 1 - 1 - 0 - - - - text - 4 - 1 - 1 - 0 - - - - Order number will be used if left empty - text - 5 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_currency - 6 - 1 - 1 - 0 - - - - select - chronopay/source_language - 7 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 8 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_order_status_processing - 9 - 1 - 1 - 0 - - - - allowspecific - 10 - adminhtml/system_config_source_payment_allspecificcountries - 1 - 1 - 0 - - - - multiselect - 11 - adminhtml/system_config_source_country - 1 - 1 - 0 - - - - text - 12 - 1 - 1 - 0 - - - - - - text - 251 - 1 - 1 - 1 - - - - select - adminhtml/system_config_source_yesno - 0 - 1 - 1 - 0 - - - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - - - - select - chronopay/source_paymentAction - 20 - 1 - 1 - 0 - - - - text - 30 - 1 - 1 - 0 - - - - text - 40 - 1 - 1 - 0 - - - - text - 50 - 1 - 1 - 0 - - - - multiselect - chronopay/source_cctype - 60 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_currency - 70 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 80 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_order_status_processing - 90 - 1 - 1 - 0 - - - - allowspecific - 100 - adminhtml/system_config_source_payment_allspecificcountries - 1 - 1 - 0 - - - - multiselect - 110 - adminhtml/system_config_source_country - 1 - 1 - 0 - - - - text - 120 - 1 - 1 - 0 - - - - - - - diff --git a/app/code/core/Mage/Chronopay/sql/chronopay_setup/mysql4-install-0.1.0.php b/app/code/core/Mage/Chronopay/sql/chronopay_setup/mysql4-install-0.1.0.php deleted file mode 100644 index 815695c343..0000000000 --- a/app/code/core/Mage/Chronopay/sql/chronopay_setup/mysql4-install-0.1.0.php +++ /dev/null @@ -1,45 +0,0 @@ -startSetup(); - -$installer->run(" -CREATE TABLE `{$this->getTable('chronopay_api_debug')}` ( - `debug_id` int(10) unsigned NOT NULL auto_increment, - `debug_at` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `request_body` text, - `response_body` text, - PRIMARY KEY (`debug_id`), - KEY `debug_at` (`debug_at`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - - "); - -$installer->endSetup(); diff --git a/app/code/core/Mage/Cms/Block/Widget/Page/Link.php b/app/code/core/Mage/Cms/Block/Widget/Page/Link.php index c6659c79b5..965c384887 100644 --- a/app/code/core/Mage/Cms/Block/Widget/Page/Link.php +++ b/app/code/core/Mage/Cms/Block/Widget/Page/Link.php @@ -90,10 +90,11 @@ public function getTitle() if ($this->getData('title') !== null) { // compare to null used here bc user can specify blank title $this->_title = $this->getData('title'); - } else if ($this->getData('href')) { - $this->_title = Mage::getResourceSingleton('cms/page')->getCmsPageTitleByIdentifier($this->getData('href')); } else if ($this->getData('page_id')) { $this->_title = Mage::getResourceSingleton('cms/page')->getCmsPageTitleById($this->getData('page_id')); + } else if ($this->getData('href')) { + $this->_title = Mage::getResourceSingleton('cms/page')->setStore(Mage::app()->getStore()) + ->getCmsPageTitleByIdentifier($this->getData('href')); } } @@ -114,7 +115,8 @@ public function getAnchorText() } else if ($this->getTitle()) { $this->_anchorText = $this->getTitle(); } else if ($this->getData('href')) { - $this->_anchorText = Mage::getResourceSingleton('cms/page')->getCmsPageTitleByIdentifier($this->getData('href')); + $this->_anchorText = Mage::getResourceSingleton('cms/page')->setStore(Mage::app()->getStore()) + ->getCmsPageTitleByIdentifier($this->getData('href')); } else if ($this->getData('page_id')) { $this->_anchorText = Mage::getResourceSingleton('cms/page')->getCmsPageTitleById($this->getData('page_id')); } else { diff --git a/app/code/core/Mage/Cms/Model/Mysql4/Page.php b/app/code/core/Mage/Cms/Model/Mysql4/Page.php index 7a68dc954c..a1404552d5 100644 --- a/app/code/core/Mage/Cms/Model/Mysql4/Page.php +++ b/app/code/core/Mage/Cms/Model/Mysql4/Page.php @@ -34,6 +34,13 @@ class Mage_Cms_Model_Mysql4_Page extends Mage_Core_Model_Mysql4_Abstract { + /** + * Store model + * + * @var null|Mage_Core_Model_Store + */ + protected $_store = null; + /** * Initialize resource model */ @@ -142,7 +149,7 @@ protected function _getLoadSelect($field, $value, $object) array('cps' => $this->getTable('cms/page_store')), $this->getMainTable().'.page_id = `cps`.page_id' ) - ->where('is_active=1 AND `cps`.store_id in (0, ?) ', $object->getStoreId()) + ->where('is_active=1 AND `cps`.store_id in (' . Mage_Core_Model_App::ADMIN_STORE_ID . ', ?) ', $object->getStoreId()) ->order('store_id DESC') ->limit(1); } @@ -164,7 +171,11 @@ public function getIsUniquePageToStores(Mage_Core_Model_Abstract $object) if ($object->getId()) { $select->where($this->getMainTable().'.page_id <> ?',$object->getId()); } - $select->where('`cps`.store_id IN (?)', (array)$object->getData('stores')); + $stores = (array)$object->getData('stores'); + if (Mage::app()->isSingleStoreMode()) { + $stores = array(Mage_Core_Model_App::ADMIN_STORE_ID); + } + $select->where('`cps`.store_id IN (?)', $stores); if ($this->_getWriteAdapter()->fetchRow($select)) { return false; @@ -201,7 +212,7 @@ public function checkIdentifier($identifier, $storeId) 'main_table.page_id = `cps`.page_id' ) ->where('main_table.identifier=?', $identifier) - ->where('main_table.is_active=1 AND `cps`.store_id in (0, ?) ', $storeId) + ->where('main_table.is_active=1 AND `cps`.store_id in (' . Mage_Core_Model_App::ADMIN_STORE_ID . ', ?) ', $storeId) ->order('store_id DESC'); return $this->_getReadAdapter()->fetchOne($select); @@ -217,8 +228,13 @@ public function getCmsPageTitleByIdentifier($identifier) { $select = $this->_getReadAdapter()->select(); /* @var $select Zend_Db_Select */ + $joinExpr = $this->_getReadAdapter()->quoteInto( + 'main_table.page_id = cps.page_id AND (cps.store_id = ' . Mage_Core_Model_App::ADMIN_STORE_ID . ' OR cps.store_id = ?)', $this->getStore()->getId() + ); $select->from(array('main_table' => $this->getMainTable()), 'title') - ->where('main_table.identifier = ?', $identifier); + ->joinLeft(array('cps' => $this->getTable('cms/page_store')), $joinExpr ,array()) + ->where('main_table.identifier = ?', $identifier) + ->order('cps.store_id DESC'); return $this->_getReadAdapter()->fetchOne($select); } @@ -265,4 +281,26 @@ public function lookupStoreIds($id) ->where("{$this->getIdFieldName()} = ?", $id) ); } + + /** + * Set store model + * + * @param Mage_Core_Model_Store $store + * @return Mage_Cms_Model_Mysql4_Page + */ + public function setStore($store) + { + $this->_store = $store; + return $this; + } + + /** + * Retrieve store model + * + * @return Mage_Core_Model_Store + */ + public function getStore() + { + return Mage::app()->getStore($this->_store); + } } diff --git a/app/code/core/Mage/Cms/sql/cms_setup/mysql4-install-0.7.0.php b/app/code/core/Mage/Cms/sql/cms_setup/mysql4-install-0.7.0.php index b7f84af9d7..9dbb738025 100644 --- a/app/code/core/Mage/Cms/sql/cms_setup/mysql4-install-0.7.0.php +++ b/app/code/core/Mage/Cms/sql/cms_setup/mysql4-install-0.7.0.php @@ -65,7 +65,7 @@ UNIQUE KEY `identifier` (`identifier`,`store_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='CMS pages'; -insert into {$this->getTable('cms_page')}(`page_id`,`title`,`root_template`,`meta_keywords`,`meta_description`,`identifier`,`content`,`creation_time`,`update_time`,`is_active`,`store_id`,`sort_order`) values (1,'404 Not Found 1','right_column','Page keywords','Page description','no-route','

Whoops, our bad...

\r\n
\r\n
The page you requested was not found, and we have a fine guess why.
\r\n
\r\n
    \r\n
  • If you typed the URL directly, please make sure the spelling is correct.
  • \r\n
  • If you clicked on a link to get here, the link is outdated.
  • \r\n
\r\n
\r\n
\r\n
\r\n
What can you do?
\r\n
Have no fear, help is near! There are many ways you can get back on track with Magento Demo Store.
\r\n
\r\n
    \r\n
  • Go back to the previous page.
  • \r\n
  • Use the search bar at the top of the page to search for your products.
  • \r\n
  • Follow these links to get you back on track!
    Store Home
    My Account

\r\n

','2007-06-20 18:38:32','2007-08-26 19:11:13',1,0,0),(2,'Home page','right_column','','','home','

Home Page

\r\n','2007-08-23 10:03:25','2007-09-06 13:26:53',1,0,0),(3,'About Us','one_column','','','about-magento-demo-store','
\r\n

About Magento Demo Store

\r\n
\r\n
\r\n

\"Varien

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede.

\r\n

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta.

\r\n
\r\n

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit.

\r\n

Vivamus tortor nisl, lobortis in, faucibus et, tempus at, dui. Nunc risus. Proin scelerisque augue. Nam ullamcorper. Phasellus id massa. Pellentesque nisl. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc augue. Aenean sed justo non leo vehicula laoreet. Praesent ipsum libero, auctor ac, tempus nec, tempor nec, justo.

\r\n

Maecenas ullamcorper, odio vel tempus egestas, dui orci faucibus orci, sit amet aliquet lectus dolor et quam. Pellentesque consequat luctus purus. Nunc et risus. Etiam a nibh. Phasellus dignissim metus eget nisi. Vestibulum sapien dolor, aliquet nec, porta ac, malesuada a, libero. Praesent feugiat purus eget est. Nulla facilisi. Vestibulum tincidunt sapien eu velit. Mauris purus. Maecenas eget mauris eu orci accumsan feugiat. Pellentesque eget velit. Nunc tincidunt.

\r\n
\r\n

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Suspendisse convallis felis ac enim. Vivamus tortor nisl, lobortis in, faucibus et, tempus at, dui. Nunc risus. Proin scelerisque augue. Nam ullamcorper

\r\n

Maecenas ullamcorper, odio vel tempus egestas, dui orci faucibus orci, sit amet aliquet lectus dolor et quam. Pellentesque consequat luctus purus.

\r\n

Nunc et risus. Etiam a nibh. Phasellus dignissim metus eget nisi.

\r\n
\r\n

To all of you, from all of us at Magento Demo Store - Thank you and Happy eCommerce!

\r\n

John Doe
Some important guy

\r\n
','2007-08-30 14:01:18','2007-08-30 14:01:18',1,0,0),(4,'Customer Service','three_column','','','customer-service','
\r\n

Customer Service

\r\n
\r\n\r\n
\r\n
Shipping & Delivery
\r\n
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Suspendisse convallis felis ac enim. Vivamus tortor nisl, lobortis in, faucibus et, tempus at, dui. Nunc risus. Proin scelerisque augue. Nam ullamcorper. Phasellus id massa. Pellentesque nisl. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc augue. Aenean sed justo non leo vehicula laoreet. Praesent ipsum libero, auctor ac, tempus nec, tempor nec, justo.
\r\n
Privacy & Security
\r\n
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Suspendisse convallis felis ac enim. Vivamus tortor nisl, lobortis in, faucibus et, tempus at, dui. Nunc risus. Proin scelerisque augue. Nam ullamcorper. Phasellus id massa. Pellentesque nisl. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc augue. Aenean sed justo non leo vehicula laoreet. Praesent ipsum libero, auctor ac, tempus nec, tempor nec, justo.
\r\n
Returns & Replacements
\r\n
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Suspendisse convallis felis ac enim. Vivamus tortor nisl, lobortis in, faucibus et, tempus at, dui. Nunc risus. Proin scelerisque augue. Nam ullamcorper. Phasellus id massa. Pellentesque nisl. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc augue. Aenean sed justo non leo vehicula laoreet. Praesent ipsum libero, auctor ac, tempus nec, tempor nec, justo.
\r\n
Ordering
\r\n
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Suspendisse convallis felis ac enim. Vivamus tortor nisl, lobortis in, faucibus et, tempus at, dui. Nunc risus. Proin scelerisque augue. Nam ullamcorper. Phasellus id massa. Pellentesque nisl. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc augue. Aenean sed justo non leo vehicula laoreet. Praesent ipsum libero, auctor ac, tempus nec, tempor nec, justo.
\r\n
Payment, Pricing & Promotions
\r\n
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Suspendisse convallis felis ac enim. Vivamus tortor nisl, lobortis in, faucibus et, tempus at, dui. Nunc risus. Proin scelerisque augue. Nam ullamcorper. Phasellus id massa. Pellentesque nisl. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc augue. Aenean sed justo non leo vehicula laoreet. Praesent ipsum libero, auctor ac, tempus nec, tempor nec, justo.
\r\n
Viewing Orders
\r\n
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Suspendisse convallis felis ac enim. Vivamus tortor nisl, lobortis in, faucibus et, tempus at, dui. Nunc risus. Proin scelerisque augue. Nam ullamcorper. Phasellus id massa. Pellentesque nisl. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc augue. Aenean sed justo non leo vehicula laoreet. Praesent ipsum libero, auctor ac, tempus nec, tempor nec, justo.
\r\n
Updating Account Information
\r\n
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Suspendisse convallis felis ac enim. Vivamus tortor nisl, lobortis in, faucibus et, tempus at, dui. Nunc risus. Proin scelerisque augue. Nam ullamcorper. Phasellus id massa. Pellentesque nisl. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc augue. Aenean sed justo non leo vehicula laoreet. Praesent ipsum libero, auctor ac, tempus nec, tempor nec, justo.
\r\n
','2007-08-30 14:02:20','2007-08-30 14:03:37',1,0,0); +insert into {$this->getTable('cms_page')}(`page_id`,`title`,`root_template`,`meta_keywords`,`meta_description`,`identifier`,`content`,`creation_time`,`update_time`,`is_active`,`store_id`,`sort_order`) values (1,'404 Not Found 1','right_column','Page keywords','Page description','no-route','

Whoops, our bad...

\r\n
\r\n
The page you requested was not found, and we have a fine guess why.
\r\n
\r\n
    \r\n
  • If you typed the URL directly, please make sure the spelling is correct.
  • \r\n
  • If you clicked on a link to get here, the link is outdated.
  • \r\n
\r\n
\r\n
\r\n
What can you do?
\r\n
Have no fear, help is near! There are many ways you can get back on track with Magento Store.
\r\n
\r\n
    \r\n
  • Go back to the previous page.
  • \r\n
  • Use the search bar at the top of the page to search for your products.
  • \r\n
  • Follow these links to get you back on track!
    Store Home | My Account
\r\n','2007-06-20 18:38:32','2007-08-26 19:11:13',1,0,0),(2,'Home page','right_column','','','home','

Home Page

\r\n','2007-08-23 10:03:25','2007-09-06 13:26:53',1,0,0),(3,'About Us','one_column','','','about-magento-demo-store','
\r\n

About Magento Store

\r\n
\r\n
\r\n

\"Varien\"

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede.

\r\n

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta.

\r\n
\r\n

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit.

\r\n

Vivamus tortor nisl, lobortis in, faucibus et, tempus at, dui. Nunc risus. Proin scelerisque augue. Nam ullamcorper. Phasellus id massa. Pellentesque nisl. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc augue. Aenean sed justo non leo vehicula laoreet. Praesent ipsum libero, auctor ac, tempus nec, tempor nec, justo.

\r\n

Maecenas ullamcorper, odio vel tempus egestas, dui orci faucibus orci, sit amet aliquet lectus dolor et quam. Pellentesque consequat luctus purus. Nunc et risus. Etiam a nibh. Phasellus dignissim metus eget nisi. Vestibulum sapien dolor, aliquet nec, porta ac, malesuada a, libero. Praesent feugiat purus eget est. Nulla facilisi. Vestibulum tincidunt sapien eu velit. Mauris purus. Maecenas eget mauris eu orci accumsan feugiat. Pellentesque eget velit. Nunc tincidunt.

\r\n
\r\n

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Suspendisse convallis felis ac enim. Vivamus tortor nisl, lobortis in, faucibus et, tempus at, dui. Nunc risus. Proin scelerisque augue. Nam ullamcorper

\r\n

Maecenas ullamcorper, odio vel tempus egestas, dui orci faucibus orci, sit amet aliquet lectus dolor et quam. Pellentesque consequat luctus purus.

\r\n

Nunc et risus. Etiam a nibh. Phasellus dignissim metus eget nisi.

\r\n
\r\n

To all of you, from all of us at Magento Store - Thank you and Happy eCommerce!

\r\n

John Doe
Some important guy

\r\n
','2007-08-30 14:01:18','2007-08-30 14:01:18',1,0,0),(4,'Customer Service','three_column','','','customer-service','
\r\n

Customer Service

\r\n
\r\n\r\n
\r\n
Shipping & Delivery
\r\n
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Suspendisse convallis felis ac enim. Vivamus tortor nisl, lobortis in, faucibus et, tempus at, dui. Nunc risus. Proin scelerisque augue. Nam ullamcorper. Phasellus id massa. Pellentesque nisl. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc augue. Aenean sed justo non leo vehicula laoreet. Praesent ipsum libero, auctor ac, tempus nec, tempor nec, justo.
\r\n
Privacy & Security
\r\n
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Suspendisse convallis felis ac enim. Vivamus tortor nisl, lobortis in, faucibus et, tempus at, dui. Nunc risus. Proin scelerisque augue. Nam ullamcorper. Phasellus id massa. Pellentesque nisl. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc augue. Aenean sed justo non leo vehicula laoreet. Praesent ipsum libero, auctor ac, tempus nec, tempor nec, justo.
\r\n
Returns & Replacements
\r\n
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Suspendisse convallis felis ac enim. Vivamus tortor nisl, lobortis in, faucibus et, tempus at, dui. Nunc risus. Proin scelerisque augue. Nam ullamcorper. Phasellus id massa. Pellentesque nisl. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc augue. Aenean sed justo non leo vehicula laoreet. Praesent ipsum libero, auctor ac, tempus nec, tempor nec, justo.
\r\n
Ordering
\r\n
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Suspendisse convallis felis ac enim. Vivamus tortor nisl, lobortis in, faucibus et, tempus at, dui. Nunc risus. Proin scelerisque augue. Nam ullamcorper. Phasellus id massa. Pellentesque nisl. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc augue. Aenean sed justo non leo vehicula laoreet. Praesent ipsum libero, auctor ac, tempus nec, tempor nec, justo.
\r\n
Payment, Pricing & Promotions
\r\n
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Suspendisse convallis felis ac enim. Vivamus tortor nisl, lobortis in, faucibus et, tempus at, dui. Nunc risus. Proin scelerisque augue. Nam ullamcorper. Phasellus id massa. Pellentesque nisl. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc augue. Aenean sed justo non leo vehicula laoreet. Praesent ipsum libero, auctor ac, tempus nec, tempor nec, justo.
\r\n
Viewing Orders
\r\n
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Suspendisse convallis felis ac enim. Vivamus tortor nisl, lobortis in, faucibus et, tempus at, dui. Nunc risus. Proin scelerisque augue. Nam ullamcorper. Phasellus id massa. Pellentesque nisl. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc augue. Aenean sed justo non leo vehicula laoreet. Praesent ipsum libero, auctor ac, tempus nec, tempor nec, justo.
\r\n
Updating Account Information
\r\n
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Morbi luctus. Duis lobortis. Nulla nec velit. Mauris pulvinar erat non massa. Suspendisse tortor turpis, porta nec, tempus vitae, iaculis semper, pede. Cras vel libero id lectus rhoncus porta. Suspendisse convallis felis ac enim. Vivamus tortor nisl, lobortis in, faucibus et, tempus at, dui. Nunc risus. Proin scelerisque augue. Nam ullamcorper. Phasellus id massa. Pellentesque nisl. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc augue. Aenean sed justo non leo vehicula laoreet. Praesent ipsum libero, auctor ac, tempus nec, tempor nec, justo.
\r\n
','2007-08-30 14:02:20','2007-08-30 14:03:37',1,0,0); "); diff --git a/app/code/core/Mage/Cms/sql/cms_setup/mysql4-upgrade-0.7.7-0.7.8.php b/app/code/core/Mage/Cms/sql/cms_setup/mysql4-upgrade-0.7.7-0.7.8.php index 89467854ee..48e4b3e15f 100644 --- a/app/code/core/Mage/Cms/sql/cms_setup/mysql4-upgrade-0.7.7-0.7.8.php +++ b/app/code/core/Mage/Cms/sql/cms_setup/mysql4-upgrade-0.7.7-0.7.8.php @@ -35,7 +35,7 @@ 'title' => 'Enable Cookies', 'root_template' => 'one_column', 'identifier' => 'enable-cookies', - 'content' => "
\r\n
    \r\n
  • \r\n
      \r\n
    • Please enable cookies in your web browser to continue.
    • \r\n
    \r\n
  • \r\n
\r\n
\r\n

What are Cookies?

\r\n
\r\n

Cookies are short pieces of data that are sent to your computer when you visit a website. On later visits, this data is then returned to that website. Cookies allow us to recognize you automatically whenever you visit our site so that we can personalize your experience and provide you with better service. We also use cookies (and similar browser data, such as Flash cookies) for fraud prevention and other purposes. If your web browser is set to refuse cookies from our website, you will not be able to complete a purchase or take advantage of certain features of our website, such as storing items in your Shopping Cart or receiving personalized recommendations. As a result, we strongly encourage you to configure your web browser to accept cookies from our website.

\r\n

Enabling Cookies

\r\n \r\n

Internet Explorer 7.x

\r\n
    \r\n
  1. \r\n

    Start Internet Explorer

    \r\n
  2. \r\n
  3. \r\n

    Under the Tools menu, click Internet Options

    \r\n

    \"\"

    \r\n
  4. \r\n
  5. \r\n

    Click the Privacy tab

    \r\n

    \"\"

    \r\n
  6. \r\n
  7. \r\n

    Click the Advanced button

    \r\n

    \"\"

    \r\n
  8. \r\n
  9. \r\n

    Put a check mark in the box for Override Automatic Cookie Handling, put another check mark in the Always accept session cookies box

    \r\n

    \"\"

    \r\n
  10. \r\n
  11. \r\n

    Click OK

    \r\n

    \"\"

    \r\n
  12. \r\n
  13. \r\n

    Click OK

    \r\n

    \"\"

    \r\n
  14. \r\n
  15. \r\n

    Restart Internet Explore

    \r\n
  16. \r\n
\r\n

Back to Top

\r\n

Internet Explorer 6.x

\r\n
    \r\n
  1. \r\n

    Select Internet Options from the Tools menu

    \r\n

    \"\"

    \r\n
  2. \r\n
  3. \r\n

    Click on the Privacy tab

    \r\n
  4. \r\n
  5. \r\n

    Click the Default button (or manually slide the bar down to Medium) under Settings. Click OK

    \r\n

    \"\"

    \r\n
  6. \r\n
\r\n

Back to Top

\r\n

Mozilla/Firefox

\r\n
    \r\n
  1. \r\n

    Click on the Tools-menu in Mozilla

    \r\n
  2. \r\n
  3. \r\n

    Click on the Options... item in the menu - a new window open

    \r\n
  4. \r\n
  5. \r\n

    Click on the Privacy selection in the left part of the window. (See image below)

    \r\n

    \"\"

    \r\n
  6. \r\n
  7. \r\n

    Expand the Cookies section

    \r\n
  8. \r\n
  9. \r\n

    Check the Enable cookies and Accept cookies normally checkboxes

    \r\n
  10. \r\n
  11. \r\n

    Save changes by clicking Ok.

    \r\n
  12. \r\n
\r\n

Back to Top

\r\n

Opera 7.x

\r\n
    \r\n
  1. \r\n

    Click on the Tools menu in Opera

    \r\n
  2. \r\n
  3. \r\n

    Click on the Preferences... item in the menu - a new window open

    \r\n
  4. \r\n
  5. \r\n

    Click on the Privacy selection near the bottom left of the window. (See image below)

    \r\n

    \"\"

    \r\n
  6. \r\n
  7. \r\n

    The Enable cookies checkbox must be checked, and Accept all cookies should be selected in the "Normal cookies" drop-down

    \r\n
  8. \r\n
  9. \r\n

    Save changes by clicking Ok

    \r\n
  10. \r\n
\r\n

Back to Top

\r\n
\r\n", + 'content' => "
\r\n
    \r\n
  • \r\n
      \r\n
    • Please enable cookies in your web browser to continue.
    • \r\n
    \r\n
  • \r\n
\r\n
\r\n

What are Cookies?

\r\n
\r\n

Cookies are short pieces of data that are sent to your computer when you visit a website. On later visits, this data is then returned to that website. Cookies allow us to recognize you automatically whenever you visit our site so that we can personalize your experience and provide you with better service. We also use cookies (and similar browser data, such as Flash cookies) for fraud prevention and other purposes. If your web browser is set to refuse cookies from our website, you will not be able to complete a purchase or take advantage of certain features of our website, such as storing items in your Shopping Cart or receiving personalized recommendations. As a result, we strongly encourage you to configure your web browser to accept cookies from our website.

\r\n

Enabling Cookies

\r\n \r\n

Internet Explorer 7.x

\r\n
    \r\n
  1. \r\n

    Start Internet Explorer

    \r\n
  2. \r\n
  3. \r\n

    Under the Tools menu, click Internet Options

    \r\n

    \"\"

    \r\n
  4. \r\n
  5. \r\n

    Click the Privacy tab

    \r\n

    \"\"

    \r\n
  6. \r\n
  7. \r\n

    Click the Advanced button

    \r\n

    \"\"

    \r\n
  8. \r\n
  9. \r\n

    Put a check mark in the box for Override Automatic Cookie Handling, put another check mark in the Always accept session cookies box

    \r\n

    \"\"

    \r\n
  10. \r\n
  11. \r\n

    Click OK

    \r\n

    \"\"

    \r\n
  12. \r\n
  13. \r\n

    Click OK

    \r\n

    \"\"

    \r\n
  14. \r\n
  15. \r\n

    Restart Internet Explore

    \r\n
  16. \r\n
\r\n

Back to Top

\r\n

Internet Explorer 6.x

\r\n
    \r\n
  1. \r\n

    Select Internet Options from the Tools menu

    \r\n

    \"\"

    \r\n
  2. \r\n
  3. \r\n

    Click on the Privacy tab

    \r\n
  4. \r\n
  5. \r\n

    Click the Default button (or manually slide the bar down to Medium) under Settings. Click OK

    \r\n

    \"\"

    \r\n
  6. \r\n
\r\n

Back to Top

\r\n

Mozilla/Firefox

\r\n
    \r\n
  1. \r\n

    Click on the Tools-menu in Mozilla

    \r\n
  2. \r\n
  3. \r\n

    Click on the Options... item in the menu - a new window open

    \r\n
  4. \r\n
  5. \r\n

    Click on the Privacy selection in the left part of the window. (See image below)

    \r\n

    \"\"

    \r\n
  6. \r\n
  7. \r\n

    Expand the Cookies section

    \r\n
  8. \r\n
  9. \r\n

    Check the Enable cookies and Accept cookies normally checkboxes

    \r\n
  10. \r\n
  11. \r\n

    Save changes by clicking Ok.

    \r\n
  12. \r\n
\r\n

Back to Top

\r\n

Opera 7.x

\r\n
    \r\n
  1. \r\n

    Click on the Tools menu in Opera

    \r\n
  2. \r\n
  3. \r\n

    Click on the Preferences... item in the menu - a new window open

    \r\n
  4. \r\n
  5. \r\n

    Click on the Privacy selection near the bottom left of the window. (See image below)

    \r\n

    \"\"

    \r\n
  6. \r\n
  7. \r\n

    The Enable cookies checkbox must be checked, and Accept all cookies should be selected in the "Normal cookies" drop-down

    \r\n
  8. \r\n
  9. \r\n

    Save changes by clicking Ok

    \r\n
  10. \r\n
\r\n

Back to Top

\r\n
\r\n", 'creation_time' => now(), 'update_time' => now(), )); diff --git a/app/code/core/Mage/Compiler/controllers/ProcessController.php b/app/code/core/Mage/Compiler/controllers/ProcessController.php index aa7fc6c6e2..cecf4d6ee6 100644 --- a/app/code/core/Mage/Compiler/controllers/ProcessController.php +++ b/app/code/core/Mage/Compiler/controllers/ProcessController.php @@ -54,6 +54,8 @@ protected function _getCompiler() } public function indexAction() { + $this->_title($this->__('System'))->_title($this->__('Tools'))->_title($this->__('Compilation')); + $this->loadLayout(); $this->_setActiveMenu('system/tools'); $this->renderLayout(); diff --git a/app/code/core/Mage/Core/Block/Abstract.php b/app/code/core/Mage/Core/Block/Abstract.php index 1fd9170edb..c7f711c6cb 100644 --- a/app/code/core/Mage/Core/Block/Abstract.php +++ b/app/code/core/Mage/Core/Block/Abstract.php @@ -955,14 +955,23 @@ protected function _saveCache($data) return $this; } + /** + * @deprecated after 1.4.0.0-rc1 + * @see self::escapeHtml() + */ + public function htmlEscape($data, $allowedTags = null) + { + return $this->escapeHtml($data, $allowedTags); + } + /** * Escape html entities * * @param mixed $data * @param array $allowedTags - * @return mixed + * @return string */ - public function htmlEscape($data, $allowedTags = null) + public function escapeHtml($data, $allowedTags = null) { return $this->helper('core')->htmlEscape($data, $allowedTags); } diff --git a/app/code/core/Mage/Core/Block/Html/Select.php b/app/code/core/Mage/Core/Block/Html/Select.php index 9a31ae95a5..430695b85c 100644 --- a/app/code/core/Mage/Core/Block/Html/Select.php +++ b/app/code/core/Mage/Core/Block/Html/Select.php @@ -148,7 +148,7 @@ protected function _toHtml() protected function _optionToHtml($option, $selected=false) { $selectedHtml = $selected ? ' selected="selected"' : ''; - $html = ''; + $html = ''; return $html; } diff --git a/app/code/core/Mage/Core/Block/Template.php b/app/code/core/Mage/Core/Block/Template.php index 79e4ec5574..bc7e32a7ed 100644 --- a/app/code/core/Mage/Core/Block/Template.php +++ b/app/code/core/Mage/Core/Block/Template.php @@ -185,7 +185,12 @@ public function fetchView($fileName) } } - include $this->_viewDir.DS.$fileName; + try { + include $this->_viewDir . DS . $fileName; + } catch (Exception $e) { + ob_get_clean(); + throw $e; + } if ($this->getShowTemplateHints()) { echo ''; diff --git a/app/code/core/Mage/Core/Controller/Varien/Action.php b/app/code/core/Mage/Core/Controller/Varien/Action.php index 29eb53e7ec..ce3719482b 100644 --- a/app/code/core/Mage/Core/Controller/Varien/Action.php +++ b/app/code/core/Mage/Core/Controller/Varien/Action.php @@ -893,4 +893,60 @@ protected function _renderTitles() } } } + + /** + * Convert dates in array from localized to internal format + * + * @param array $array + * @param array $dateFields + * @return array + */ + protected function _filterDates($array, $dateFields) + { + if (empty($dateFields)) { + return $array; + } + $filterInput = new Zend_Filter_LocalizedToNormalized(array( + 'date_format' => Mage::app()->getLocale()->getDateFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT) + )); + $filterInternal = new Zend_Filter_NormalizedToLocalized(array( + 'date_format' => Varien_Date::DATE_INTERNAL_FORMAT + )); + + foreach ($dateFields as $dateField) { + if (array_key_exists($dateField, $array) && !empty($dateField)) { + $array[$dateField] = $filterInput->filter($array[$dateField]); + $array[$dateField] = $filterInternal->filter($array[$dateField]); + } + } + return $array; + } + + /** + * Convert dates with time in array from localized to internal format + * + * @param array $array + * @param array $dateFields + * @return array + */ + protected function _filterDateTime($array, $dateFields) + { + if (empty($dateFields)) { + return $array; + } + $filterInput = new Zend_Filter_LocalizedToNormalized(array( + 'date_format' => Mage::app()->getLocale()->getDateTimeFormat(Mage_Core_Model_Locale::FORMAT_TYPE_SHORT) + )); + $filterInternal = new Zend_Filter_NormalizedToLocalized(array( + 'date_format' => Varien_Date::DATETIME_INTERNAL_FORMAT + )); + + foreach ($dateFields as $dateField) { + if (array_key_exists($dateField, $array) && !empty($dateField)) { + $array[$dateField] = $filterInput->filter($array[$dateField]); + $array[$dateField] = $filterInternal->filter($array[$dateField]); + } + } + return $array; + } } diff --git a/app/code/core/Mage/Core/Controller/Varien/Front.php b/app/code/core/Mage/Core/Controller/Varien/Front.php index 279b758c61..f1fbd86b0d 100644 --- a/app/code/core/Mage/Core/Controller/Varien/Front.php +++ b/app/code/core/Mage/Core/Controller/Varien/Front.php @@ -156,6 +156,10 @@ public function init() public function dispatch() { $request = $this->getRequest(); + + // If pre-configured, check equality of base URL and requested URL + $this->_checkBaseUrl($request); + $request->setPathInfo()->setDispatched(false); Varien_Profiler::start('mage::dispatch::db_url_rewrite'); @@ -280,4 +284,39 @@ protected function _processRewriteUrl($url) } return $url; } + + /** + * Auto-redirect to base url (without SID) if the requested url doesn't match it. + * By default this feature is enabled in configuration. + * + * @param Zend_Controller_Request_Http $request + */ + protected function _checkBaseUrl($request) + { + if (!Mage::isInstalled() || $request->getPost()) { + return; + } + if (!Mage::getStoreConfigFlag('web/url/redirect_to_base')) { + return; + } + + $baseUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB, Mage::app()->getStore()->isCurrentlySecure()); + + if (!$baseUrl) { + return; + } + + $uri = @parse_url($baseUrl); + $host = isset($uri['host']) ? $uri['host'] : ''; + $path = isset($uri['path']) ? $uri['path'] : ''; + + $requestUri = $request->getRequestUri() ? $request->getRequestUri() : '/'; + if ($host && $host != $request->getHttpHost() || $path && strpos($requestUri, $path) === false) + { + Mage::app()->getFrontController()->getResponse() + ->setRedirect($baseUrl) + ->sendResponse(); + exit; + } + } } diff --git a/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php b/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php index 166636f077..203f8a5f2a 100644 --- a/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php +++ b/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php @@ -71,11 +71,10 @@ public function collectRoutes($configArea, $useRouterName) public function fetchDefault() { - $d = explode('/', Mage::getStoreConfig('web/default/front')); $this->getFront()->setDefault(array( - 'module' => !empty($d[0]) ? $d[0] : 'core', - 'controller' => !empty($d[1]) ? $d[1] : 'index', - 'action' => !empty($d[2]) ? $d[2] : 'index' + 'module' => 'core', + 'controller' => 'index', + 'action' => 'index' )); } @@ -102,6 +101,7 @@ protected function _afterModuleMatch() return true; } + public function match(Zend_Controller_Request_Http $request) { //checking before even try to find out that current module @@ -113,14 +113,20 @@ public function match(Zend_Controller_Request_Http $request) $this->fetchDefault(); $front = $this->getFront(); + $path = trim($request->getPathInfo(), '/'); - $p = explode('/', trim($request->getPathInfo(), '/')); + if ($path) { + $p = explode('/', $path); + } + else { + $p = explode('/', Mage::getStoreConfig('web/default/front')); + } // get module name if ($request->getModuleName()) { $module = $request->getModuleName(); } else { - if(!empty($p[0])) { + if (!empty($p[0])) { $module = $p[0]; } else { $module = $this->getFront()->getDefault('module'); @@ -279,7 +285,7 @@ protected function _validateControllerClassName($realModule, $controller) } // include controller file if needed - if (!$this->_inludeControllerClass($controllerFileName, $controllerClassName)) { + if (!$this->_includeControllerClass($controllerFileName, $controllerClassName)) { return false; } @@ -288,13 +294,22 @@ protected function _validateControllerClassName($realModule, $controller) /** - * Including controller class if checking of existense class before include + * @deprecated + * @see _includeControllerClass() + */ + protected function _inludeControllerClass($controllerFileName, $controllerClassName) + { + return $this->_includeControllerClass($controllerFileName, $controllerClassName); + } + + /** + * Include the file containing controller class if this class is not defined yet * * @param string $controllerFileName * @param string $controllerClassName * @return bool */ - protected function _inludeControllerClass($controllerFileName, $controllerClassName) + protected function _includeControllerClass($controllerFileName, $controllerClassName) { if (!class_exists($controllerClassName, false)) { if (!file_exists($controllerFileName)) { diff --git a/app/code/core/Mage/Core/Model/Config.php b/app/code/core/Mage/Core/Model/Config.php index 91fed4eb77..e758fcafb6 100644 --- a/app/code/core/Mage/Core/Model/Config.php +++ b/app/code/core/Mage/Core/Model/Config.php @@ -338,7 +338,7 @@ public function isLocalConfigLoaded() */ public function loadDb() { - if ($this->_isLocalConfigLoaded) { + if ($this->_isLocalConfigLoaded && Mage::isInstalled()) { Varien_Profiler::start('config/load-db'); $dbConf = $this->getResourceModel(); $dbConf->loadToXml($this); diff --git a/app/code/core/Mage/Core/Model/Cookie.php b/app/code/core/Mage/Core/Model/Cookie.php index 6aea3f4f25..aaffc82a9f 100644 --- a/app/code/core/Mage/Core/Model/Cookie.php +++ b/app/code/core/Mage/Core/Model/Cookie.php @@ -239,6 +239,28 @@ public function set($name, $value, $period = null, $path = null, $domain = null, return $this; } + /** + * Postpone cookie expiration time if cookie value defined + * + * @param string $name The cookie name + * @param int $period Lifetime period + * @param string $path + * @param string $domain + * @param int|bool $secure + * @return Mage_Core_Model_Cookie + */ + public function renew($name, $period = null, $path = null, $domain = null, $secure = null, $httponly = null) + { + if (($period === null) && !$this->getLifetime()) { + return $this; + } + $value = $this->_getRequest()->getCookie($name, false); + if ($value !== false) { + $this->set($name, $value, $period, $path, $domain, $secure, $httponly); + } + return $this; + } + /** * Retrieve cookie or false if not exists * diff --git a/app/code/core/Mage/Core/Model/Design/Package.php b/app/code/core/Mage/Core/Model/Design/Package.php index eed89be349..db8f653778 100644 --- a/app/code/core/Mage/Core/Model/Design/Package.php +++ b/app/code/core/Mage/Core/Model/Design/Package.php @@ -302,6 +302,7 @@ public function getBaseDir(array $params) public function getSkinBaseDir(array $params=array()) { + $params['_type'] = 'skin'; $this->updateParamDefaults($params); $baseDir = (empty($params['_relative']) ? Mage::getBaseDir('skin').DS : ''). $params['_area'].DS.$params['_package'].DS.$params['_theme']; @@ -310,6 +311,7 @@ public function getSkinBaseDir(array $params=array()) public function getLocaleBaseDir(array $params=array()) { + $params['_type'] = 'locale'; $this->updateParamDefaults($params); $baseDir = (empty($params['_relative']) ? Mage::getBaseDir('design').DS : ''). $params['_area'].DS.$params['_package'].DS.$params['_theme'] . DS . 'locale' . DS . @@ -319,6 +321,7 @@ public function getLocaleBaseDir(array $params=array()) public function getSkinBaseUrl(array $params=array()) { + $params['_type'] = 'skin'; $this->updateParamDefaults($params); $baseUrl = Mage::getBaseUrl('skin', isset($params['_secure'])?(bool)$params['_secure']:null) .$params['_area'].'/'.$params['_package'].'/'.$params['_theme'].'/'; diff --git a/app/code/core/Mage/Core/Model/Email/Template.php b/app/code/core/Mage/Core/Model/Email/Template.php index 318e4d89d6..d99eaaeea1 100644 --- a/app/code/core/Mage/Core/Model/Email/Template.php +++ b/app/code/core/Mage/Core/Model/Email/Template.php @@ -638,10 +638,10 @@ protected function _beforeSave() { $code = $this->getTemplateCode(); if (empty($code)) { - Mage::throwException(Mage::helper('core')->__('Template Code must be not empty')); + Mage::throwException(Mage::helper('core')->__('Template Name must be not empty')); } if($this->_getResource()->checkCodeUsage($this)) { - Mage::throwException(Mage::helper('core')->__('Duplicate Of Template Code')); + Mage::throwException(Mage::helper('core')->__('Duplicate Of Template Name')); } return parent::_beforeSave(); } diff --git a/app/code/core/Mage/Core/Model/Flag.php b/app/code/core/Mage/Core/Model/Flag.php index 6626a343aa..9824aad600 100644 --- a/app/code/core/Mage/Core/Model/Flag.php +++ b/app/code/core/Mage/Core/Model/Flag.php @@ -43,10 +43,14 @@ class Mage_Core_Model_Flag extends Mage_Core_Model_Abstract /** * Init resource model + * Set flag_code if it is specified in arguments * */ protected function _construct() { + if ($this->hasData('flag_code')) { + $this->_flagCode = $this->getData('flag_code'); + } $this->_init('core/flag'); } diff --git a/app/code/core/Mage/Core/Model/Mysql4/Email/Template.php b/app/code/core/Mage/Core/Model/Mysql4/Email/Template.php index 2db160f3e7..52fe6d4356 100644 --- a/app/code/core/Mage/Core/Model/Mysql4/Email/Template.php +++ b/app/code/core/Mage/Core/Model/Mysql4/Email/Template.php @@ -65,10 +65,7 @@ protected function _construct() /** * Load by template code from DB. * - * If $useSystem eq true, loading of system template - * - * @param int $templateId - * @param boolean $useSystem + * @param string $templateCode * @return array */ public function loadByCode($templateCode) diff --git a/app/code/core/Mage/Core/Model/Mysql4/Session.php b/app/code/core/Mage/Core/Model/Mysql4/Session.php index 8adeaa7bf1..403759872b 100644 --- a/app/code/core/Mage/Core/Model/Mysql4/Session.php +++ b/app/code/core/Mage/Core/Model/Mysql4/Session.php @@ -69,7 +69,7 @@ class Mage_Core_Model_Mysql4_Session implements Zend_Session_SaveHandler_Interfa * cleaning once in x calls */ protected $_automaticCleaningFactor = 50; - + public function __construct() { $this->_sessionTable = Mage::getSingleton('core/resource')->getTableName('core/session'); @@ -85,8 +85,14 @@ public function __destruct() public function getLifeTime() { if (is_null($this->_lifeTime)) { - $this->_lifeTime = ini_get('session.gc_maxlifetime'); - if (!$this->_lifeTime) { + $configNode = Mage::app()->getStore()->isAdmin() ? 'admin/security/session_cookie_lifetime' : 'web/cookie/cookie_lifetime'; + $this->_lifeTime = (int) Mage::getStoreConfig($configNode); + + if ($this->_lifeTime < 60) { + $this->_lifeTime = ini_get('session.gc_maxlifetime'); + } + + if ($this->_lifeTime < 60) { $this->_lifeTime = 3600; } } diff --git a/app/code/core/Mage/Core/Model/Resource/Abstract.php b/app/code/core/Mage/Core/Model/Resource/Abstract.php index a1011e4d4f..44110593c6 100644 --- a/app/code/core/Mage/Core/Model/Resource/Abstract.php +++ b/app/code/core/Mage/Core/Model/Resource/Abstract.php @@ -98,8 +98,9 @@ public function commit() if ($this->_getWriteAdapter()->getTransactionLevel() === 0) { $adapterKey = spl_object_hash($this->_getWriteAdapter()); if (isset(self::$_commitCallbacks[$adapterKey])) { - foreach (self::$_commitCallbacks[$adapterKey] as $index => $callback) { - unset(self::$_commitCallbacks[$adapterKey][$index]); + $callbacks = self::$_commitCallbacks[$adapterKey]; + self::$_commitCallbacks[$adapterKey] = array(); + foreach ($callbacks as $index => $callback) { call_user_func($callback); } } diff --git a/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php b/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php index 72bbcfadbc..072eb7dbea 100644 --- a/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php +++ b/app/code/core/Mage/Core/Model/Session/Abstract/Varien.php @@ -66,21 +66,21 @@ public function start($sessionName=null) } break; } - + $cookie = $this->getCookie(); if (Mage::app()->getStore()->isAdmin()) { $adminSessionLifetime = (int)Mage::getStoreConfig('admin/security/session_cookie_lifetime'); if ($adminSessionLifetime > 60) { - $this->getCookie()->setLifetime($adminSessionLifetime); + $cookie->setLifetime($adminSessionLifetime); } } // session cookie params $cookieParams = array( - 'lifetime' => $this->getCookie()->getLifetime(), - 'path' => $this->getCookie()->getPath(), - 'domain' => $this->getCookie()->getConfigDomain(), - 'secure' => $this->getCookie()->isSecure(), - 'httponly' => $this->getCookie()->getHttponly() + 'lifetime' => $cookie->getLifetime(), + 'path' => $cookie->getPath(), + 'domain' => $cookie->getConfigDomain(), + 'secure' => $cookie->isSecure(), + 'httponly' => $cookie->getHttponly() ); if (!$cookieParams['httponly']) { @@ -94,7 +94,7 @@ public function start($sessionName=null) } if (isset($cookieParams['domain'])) { - $cookieParams['domain'] = $this->getCookie()->getDomain(); + $cookieParams['domain'] = $cookie->getDomain(); } call_user_func_array('session_set_cookie_params', $cookieParams); @@ -107,13 +107,16 @@ public function start($sessionName=null) $this->setSessionId(); Varien_Profiler::start(__METHOD__.'/start'); - - if ($sessionCacheLimiter = Mage::getConfig()->getNode('global/session_cache_limiter')) { + $sessionCacheLimiter = Mage::getConfig()->getNode('global/session_cache_limiter'); + if ($sessionCacheLimiter) { session_cache_limiter((string)$sessionCacheLimiter); } session_start(); - + /** + * Renew cookie expiration time + */ + $cookie->renew(session_name()); Varien_Profiler::stop(__METHOD__.'/start'); return $this; @@ -131,29 +134,11 @@ public function getCookie() /** * Revalidate cookie - * + * @deprecated after 1.4 cookie renew moved to session start method * @return Mage_Core_Model_Session_Abstract_Varien */ public function revalidateCookie() { - if (!$this->getCookie()->getLifetime()) { - return $this; - } - if (empty($_SESSION['_cookie_revalidate'])) { - $time = time() + round($this->getCookie()->getLifetime() / 4); - $_SESSION['_cookie_revalidate'] = $time; - } - else { - if ($_SESSION['_cookie_revalidate'] < time()) { - if (!headers_sent()) { - $this->getCookie()->set(session_name(), session_id()); - - $time = time() + round($this->getCookie()->getLifetime() / 4); - $_SESSION['_cookie_revalidate'] = $time; - } - } - } - return $this; } diff --git a/app/code/core/Mage/Core/Model/Url.php b/app/code/core/Mage/Core/Model/Url.php index 78bbef7deb..61c4d10540 100644 --- a/app/code/core/Mage/Core/Model/Url.php +++ b/app/code/core/Mage/Core/Model/Url.php @@ -683,12 +683,20 @@ public function setQuery($data) return $this->setData('query', $data); } + /** + * Get query params part of url + * + * @param bool $escape "&" escape flag + * @return string + */ public function getQuery($escape = false) { if (!$this->hasData('query')) { $query = ''; - if (is_array($this->getQueryParams())) { - $query = http_build_query($this->getQueryParams(), '', $escape ? '&' : '&'); + $params = $this->getQueryParams(); + if (is_array($params)) { + ksort($params); + $query = http_build_query($params, '', $escape ? '&' : '&'); } $this->setData('query', $query); } diff --git a/app/code/core/Mage/Core/Model/Variable.php b/app/code/core/Mage/Core/Model/Variable.php index d7cb42486b..4031d5412c 100644 --- a/app/code/core/Mage/Core/Model/Variable.php +++ b/app/code/core/Mage/Core/Model/Variable.php @@ -110,14 +110,14 @@ public function getValue($type = null) */ public function validate() { - if ($this->getCode() && $this->getName() && ($this->getHtmlValue() || $this->getUseDefaultValue())) { + if ($this->getCode() && $this->getName()) { $variable = $this->getResource()->getVariableByCode($this->getCode()); if (!empty($variable) && $variable['variable_id'] != $this->getId()) { return Mage::helper('core')->__('Variable Code must be unique.'); } return true; } - return Mage::helper('core')->__('Vaidation failed.'); + return Mage::helper('core')->__('Validation failed.'); } /** diff --git a/app/code/core/Mage/Core/etc/config.xml b/app/code/core/Mage/Core/etc/config.xml index 0795ca4c29..a4541e7e07 100644 --- a/app/code/core/Mage/Core/etc/config.xml +++ b/app/code/core/Mage/Core/etc/config.xml @@ -28,7 +28,7 @@ - 0.8.24 + 0.8.25 @@ -252,6 +252,7 @@ 0 + 1 0 diff --git a/app/code/core/Mage/Core/etc/system.xml b/app/code/core/Mage/Core/etc/system.xml index 4c35820e9f..63a8cc9fa4 100644 --- a/app/code/core/Mage/Core/etc/system.xml +++ b/app/code/core/Mage/Core/etc/system.xml @@ -697,6 +697,7 @@ 1 1 1 + 1 @@ -984,6 +985,15 @@ 0 0 + + + select + adminhtml/system_config_source_yesno + 20 + 1 + 0 + 0 + diff --git a/app/code/core/Mage/Paybox/sql/paybox_setup/mysql4-upgrade-0.1.2-0.1.3.php b/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.24-0.8.25.php similarity index 83% rename from app/code/core/Mage/Paybox/sql/paybox_setup/mysql4-upgrade-0.1.2-0.1.3.php rename to app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.24-0.8.25.php index a7d91088a9..d2a3d2cc69 100644 --- a/app/code/core/Mage/Paybox/sql/paybox_setup/mysql4-upgrade-0.1.2-0.1.3.php +++ b/app/code/core/Mage/Core/sql/core_setup/mysql4-upgrade-0.8.24-0.8.25.php @@ -19,15 +19,18 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Paybox + * @package Mage_Core * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + +/** @var Mage_Core_Model_Resource_Setup */ $installer = $this; -/* @var $installer Mage_Sales_Model_Entity_Setup */ $installer->startSetup(); -$installer->addAttribute('order_payment', 'paybox_question_number', array()); +$installer->getConnection()->modifyColumn( + $this->getTable('core_flag'), 'flag_id', 'INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT' +); $installer->endSetup(); diff --git a/app/code/core/Mage/Cron/Model/Observer.php b/app/code/core/Mage/Cron/Model/Observer.php index 4460a44b0a..f3471dde77 100644 --- a/app/code/core/Mage/Cron/Model/Observer.php +++ b/app/code/core/Mage/Cron/Model/Observer.php @@ -36,7 +36,7 @@ class Mage_Cron_Model_Observer const CACHE_KEY_LAST_SCHEDULE_GENERATE_AT = 'cron_last_schedule_generate_at'; const CACHE_KEY_LAST_HISTORY_CLEANUP_AT = 'cron_last_history_cleanup_at'; - const XML_PATH_SCHEDULE_GENERATE_EVERY = 'system/cron/schedule_generate_freq'; + const XML_PATH_SCHEDULE_GENERATE_EVERY = 'system/cron/schedule_generate_every'; const XML_PATH_SCHEDULE_AHEAD_FOR = 'system/cron/schedule_ahead_for'; const XML_PATH_SCHEDULE_LIFETIME = 'system/cron/schedule_lifetime'; const XML_PATH_HISTORY_CLEANUP_EVERY = 'system/cron/history_cleanup_every'; diff --git a/app/code/core/Mage/Customer/Model/Convert/Adapter/Customer.php b/app/code/core/Mage/Customer/Model/Convert/Adapter/Customer.php index cd1b0c98ff..313dceb42f 100644 --- a/app/code/core/Mage/Customer/Model/Convert/Adapter/Customer.php +++ b/app/code/core/Mage/Customer/Model/Convert/Adapter/Customer.php @@ -31,7 +31,7 @@ class Mage_Customer_Model_Convert_Adapter_Customer const MULTI_DELIMITER = ' , '; /** - * Product model + * Customer model * * @var Mage_Customer_Model_Customer */ @@ -369,7 +369,7 @@ public function save() if ($collections instanceof Mage_Customer_Model_Entity_Customer_Collection) { $collections = array($collections->getEntity()->getStoreId()=>$collections); } elseif (!is_array($collections)) { - $this->addException(Mage::helper('customer')->__('No product collections found'), Mage_Dataflow_Model_Convert_Exception::FATAL); + $this->addException(Mage::helper('customer')->__('No customer collections found'), Mage_Dataflow_Model_Convert_Exception::FATAL); } foreach ($collections as $storeId=>$collection) { @@ -382,7 +382,7 @@ public function save() $i = 0; foreach ($collection->getIterator() as $model) { $new = false; - // if product is new, create default values first + // if customer is new, create default values first if (!$model->getId()) { $new = true; $model->save(); @@ -419,7 +419,6 @@ public function saveRow($importData) { $customer = $this->getCustomerModel(); $customer->setId(null); - $customer->setImportMode(true); if (empty($importData['website'])) { $message = Mage::helper('customer')->__('Skip import row, required field "%s" not defined', 'website'); @@ -688,6 +687,7 @@ public function saveRow($importData) } } + $customer->setImportMode(true); $customer->save(); $saveCustomer = false; diff --git a/app/code/core/Mage/Customer/Model/Customer.php b/app/code/core/Mage/Customer/Model/Customer.php index 04072b1923..57e03f09ef 100644 --- a/app/code/core/Mage/Customer/Model/Customer.php +++ b/app/code/core/Mage/Customer/Model/Customer.php @@ -50,10 +50,24 @@ class Mage_Customer_Model_Customer extends Mage_Core_Model_Abstract protected $_eventPrefix = 'customer'; protected $_eventObject = 'customer'; - protected $_addresses = null; protected $_errors = array(); protected $_attributes; + /** + * Customer addresses array + * + * @var array + * @deprecated after 1.4.0.0-rc1 + */ + protected $_addresses = null; + + /** + * Customer addresses collection + * + * @var Mage_Customer_Model_Entity_Address_Collection + */ + protected $_addressesCollection; + /** * Is model deleteable * @@ -187,6 +201,7 @@ public function getName() */ public function addAddress(Mage_Customer_Model_Address $address) { + $this->getAddressesCollection()->addItem($address); $this->getAddresses(); $this->_addresses[] = $address; return $this; @@ -204,10 +219,21 @@ public function getAddressById($addressId) ->load($addressId); } + /** + * Getting customer address object from collection by identifier + * + * @param int $addressId + * @return Mage_Customer_Model_Address + */ + public function getAddressItemById($addressId) + { + return $this->getAddressesCollection()->getItemById($addressId); + } + /** * Retrieve not loaded address collection * - * @return Mage_Customer_Model_Address_Collection + * @return Mage_Customer_Model_Entity_Address_Collection */ public function getAddressCollection() { @@ -215,23 +241,30 @@ public function getAddressCollection() } /** - * Retrieve customer address array + * Customer addresses collection * - * @return array + * @return Mage_Customer_Model_Entity_Address_Collection */ - public function getAddresses() + public function getAddressesCollection() { - if (is_null($this->_addresses)) { - $this->_addresses = array(); - $collection = $this->getAddressCollection() + if (is_null($this->_addressesCollection)) { + $this->_addressesCollection = $this->getAddressCollection() ->setCustomerFilter($this) ->addAttributeToSelect('*') ->load(); - foreach ($collection as $address) { - $this->_addresses[] = $address; - } } + return $this->_addressesCollection; + } + + /** + * Retrieve customer address array + * + * @return array + */ + public function getAddresses() + { + $this->_addresses = $this->getAddressesCollection()->getItems(); return $this->_addresses; } @@ -345,16 +378,9 @@ public function decryptPassword($password) */ public function getPrimaryAddress($attributeCode) { - $addressId = $this->getData($attributeCode); - $primaryAddress = false; - if ($addressId) { - foreach ($this->getAddresses() as $address) { - if ($addressId == $address->getId()) { - return $address; - } - } - } - return $primaryAddress; + $primaryAddress = $this->getAddressesCollection()->getItemById($this->getData($attributeCode)); + + return $primaryAddress ? $primaryAddress : false; } /** @@ -450,7 +476,7 @@ public function getAdditionalAddresses() { $addresses = array(); $primatyIds = $this->getPrimaryAddressIds(); - foreach ($this->getAddresses() as $address) { + foreach ($this->getAddressesCollection() as $address) { if (!in_array($address->getId(), $primatyIds)) { $addresses[] = $address; } @@ -914,7 +940,8 @@ function unsetSubscription() } function cleanAllAddresses() { - $this->_addresses = null; + $this->_addressesCollection = null; + $this->_addresses = null; } function addError($error) diff --git a/app/code/core/Mage/Customer/Model/Entity/Address/Attribute/Backend/Region.php b/app/code/core/Mage/Customer/Model/Entity/Address/Attribute/Backend/Region.php index f582c5ca30..aa777d5574 100644 --- a/app/code/core/Mage/Customer/Model/Entity/Address/Attribute/Backend/Region.php +++ b/app/code/core/Mage/Customer/Model/Entity/Address/Attribute/Backend/Region.php @@ -36,16 +36,11 @@ class Mage_Customer_Model_Entity_Address_Attribute_Backend_Region extends Mage_E public function beforeSave($object) { $region = $object->getData('region'); - if ($regionId = (int) $region) { - $regionModel = Mage::getModel('directory/region')->load($regionId); - if ($regionModel->getId()) { - if ($object->getCountryId()==$regionModel->getCountryId()) { - $object->setRegionId($regionModel->getId()) - ->setRegion($regionModel->getName()); - } - else { - Mage::throwException(Mage::helper('customer')->__('Wrong region id by selected country')); - } + if (is_numeric($region)) { + $regionModel = Mage::getModel('directory/region')->load($region); + if ($regionModel->getId() && $object->getCountryId() == $regionModel->getCountryId()) { + $object->setRegionId($regionModel->getId()) + ->setRegion($regionModel->getName()); } } return $this; diff --git a/app/code/core/Mage/Customer/controllers/AccountController.php b/app/code/core/Mage/Customer/controllers/AccountController.php index 6a7c36d6b9..7bb5c09d5a 100644 --- a/app/code/core/Mage/Customer/controllers/AccountController.php +++ b/app/code/core/Mage/Customer/controllers/AccountController.php @@ -184,13 +184,23 @@ protected function _loginPostRedirect() } } } + else if ($session->getAfterAuthUrl()) { + $session->setBeforeAuthUrl($session->getAfterAuthUrl(true)); + } } else { $session->setBeforeAuthUrl(Mage::helper('customer')->getLoginUrl()); } } else if ($session->getBeforeAuthUrl() == Mage::helper('customer')->getLogoutUrl()) { $session->setBeforeAuthUrl(Mage::helper('customer')->getDashboardUrl()); } - + else { + if (!$session->getAfterAuthUrl()) { + $session->setAfterAuthUrl($session->getBeforeAuthUrl()); + } + if ($session->isLoggedIn()) { + $session->setBeforeAuthUrl($session->getAfterAuthUrl(true)); + } + } $this->_redirectUrl($session->getBeforeAuthUrl(true)); } @@ -247,12 +257,14 @@ public function createPostAction() $customer = Mage::getModel('customer/customer')->setId(null); } + $data = $this->_filterPostData($this->getRequest()->getPost()); + foreach (Mage::getConfig()->getFieldset('customer_account') as $code=>$node) { - if ($node->is('create') && ($value = $this->getRequest()->getParam($code)) !== null) { + if ($node->is('create') && isset($data[$code])) { if ($code == 'email') { - $value = trim($value); + $data[$code] = trim($data[$code]); } - $customer->setData($code, $value); + $customer->setData($code, $data[$code]); } } @@ -564,9 +576,11 @@ public function editPostAction() ->setWebsiteId($this->_getSession()->getCustomer()->getWebsiteId()); $fields = Mage::getConfig()->getFieldset('customer_account'); + $data = $this->_filterPostData($this->getRequest()->getPost()); + foreach ($fields as $code=>$node) { - if ($node->is('update') && ($value = $this->getRequest()->getParam($code)) !== null) { - $customer->setData($code, $value); + if ($node->is('update') && isset($data[$code])) { + $customer->setData($code, $data[$code]); } } @@ -618,7 +632,6 @@ public function editPostAction() return $this; } - try { $customer->save(); $this->_getSession()->setCustomer($customer) @@ -639,4 +652,16 @@ public function editPostAction() $this->_redirect('*/*/edit'); } + + /** + * Filtering posted data. Converting localized data if needed + * + * @param array + * @return array + */ + protected function _filterPostData($data) + { + $data = $this->_filterDates($data, array('dob')); + return $data; + } } diff --git a/app/code/core/Mage/Customer/etc/config.xml b/app/code/core/Mage/Customer/etc/config.xml index 186ce0d901..d17bb186e2 100644 --- a/app/code/core/Mage/Customer/etc/config.xml +++ b/app/code/core/Mage/Customer/etc/config.xml @@ -28,7 +28,7 @@ - 1.4.0.0.4 + 1.4.0.0.6 diff --git a/app/code/core/Mage/Flo2Cash/sql/flo2cash_setup/mysql4-upgrade-0.1.0-0.1.1.php b/app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-1.4.0.0.5-1.4.0.0.6.php similarity index 86% rename from app/code/core/Mage/Flo2Cash/sql/flo2cash_setup/mysql4-upgrade-0.1.0-0.1.1.php rename to app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-1.4.0.0.5-1.4.0.0.6.php index 2d9ba52cf6..e5c9fcbf63 100644 --- a/app/code/core/Mage/Flo2Cash/sql/flo2cash_setup/mysql4-upgrade-0.1.0-0.1.1.php +++ b/app/code/core/Mage/Customer/sql/customer_setup/mysql4-upgrade-1.4.0.0.5-1.4.0.0.6.php @@ -19,14 +19,14 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Flo2Cash + * @package Mage_Customer * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + $installer = $this; +/* @var $installer Mage_Customer_Model_Entity_Setup */ $installer->startSetup(); - -$installer->addAttribute('order_payment', 'flo2cash_account_id', array()); - +$installer->updateAttribute('customer', 'dob', 'backend_model', ''); $installer->endSetup(); diff --git a/app/code/core/Mage/Cybermut/Block/Error.php b/app/code/core/Mage/Cybermut/Block/Error.php deleted file mode 100644 index 41eff0b517..0000000000 --- a/app/code/core/Mage/Cybermut/Block/Error.php +++ /dev/null @@ -1,37 +0,0 @@ - -*/ -class Mage_Cybermut_Block_Error extends Mage_Core_Block_Template -{ -} diff --git a/app/code/core/Mage/Cybermut/Block/Form.php b/app/code/core/Mage/Cybermut/Block/Form.php deleted file mode 100644 index b440ad58c7..0000000000 --- a/app/code/core/Mage/Cybermut/Block/Form.php +++ /dev/null @@ -1,43 +0,0 @@ - - */ -class Mage_Cybermut_Block_Form extends Mage_Payment_Block_Form -{ - protected function _construct() - { - $this->setTemplate('cybermut/form.phtml'); - parent::_construct(); - } - -} diff --git a/app/code/core/Mage/Cybermut/Block/Redirect.php b/app/code/core/Mage/Cybermut/Block/Redirect.php deleted file mode 100644 index be8cc3e81a..0000000000 --- a/app/code/core/Mage/Cybermut/Block/Redirect.php +++ /dev/null @@ -1,67 +0,0 @@ - - */ -class Mage_Cybermut_Block_Redirect extends Mage_Core_Block_Abstract -{ - - protected function _toHtml() - { - $standard = Mage::getModel('cybermut/payment'); - $form = new Varien_Data_Form(); - $form->setAction($standard->getCybermutUrl()) - ->setId('cybermut_payment_checkout') - ->setName('cybermut_payment_checkout') - ->setMethod('POST') - ->setUseContainer(true); - foreach ($standard->setOrder($this->getOrder())->getStandardCheckoutFormFields() as $field => $value) { - $form->addField($field, 'hidden', array('name' => $field, 'value' => $value)); - } - - $formHTML = $form->toHtml(); - - $html = ''; - $html.= $this->__('You will be redirected to Cybermut in a few seconds.'); - $html.= $formHTML; - $html.= ''; - $html.= ''; - - if ($standard->getConfigData('debug_flag')) { - Mage::getModel('cybermut/api_debug') - ->setRequestBody($formHTML) - ->save(); - } - - return $html; - } -} diff --git a/app/code/core/Mage/Cybermut/Helper/Data.php b/app/code/core/Mage/Cybermut/Helper/Data.php deleted file mode 100644 index cfda934a0e..0000000000 --- a/app/code/core/Mage/Cybermut/Helper/Data.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ -class Mage_Cybermut_Helper_Data extends Mage_Core_Helper_Abstract -{ - -} diff --git a/app/code/core/Mage/Cybermut/Model/Api/Debug.php b/app/code/core/Mage/Cybermut/Model/Api/Debug.php deleted file mode 100644 index d81ed2c28f..0000000000 --- a/app/code/core/Mage/Cybermut/Model/Api/Debug.php +++ /dev/null @@ -1,41 +0,0 @@ - - */ -class Mage_Cybermut_Model_Api_Debug extends Mage_Core_Model_Abstract -{ - protected function _construct() - { - $this->_init('cybermut/api_debug'); - } -} diff --git a/app/code/core/Mage/Cybermut/Model/Mysql4/Api/Debug.php b/app/code/core/Mage/Cybermut/Model/Mysql4/Api/Debug.php deleted file mode 100644 index 03ffbd8e07..0000000000 --- a/app/code/core/Mage/Cybermut/Model/Mysql4/Api/Debug.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ - -class Mage_Cybermut_Model_Mysql4_Api_Debug extends Mage_Core_Model_Mysql4_Abstract -{ - protected function _construct() - { - $this->_init('cybermut/api_debug', 'debug_id'); - } -} diff --git a/app/code/core/Mage/Cybermut/Model/Mysql4/Api/Debug/Collection.php b/app/code/core/Mage/Cybermut/Model/Mysql4/Api/Debug/Collection.php deleted file mode 100644 index 96a02589da..0000000000 --- a/app/code/core/Mage/Cybermut/Model/Mysql4/Api/Debug/Collection.php +++ /dev/null @@ -1,41 +0,0 @@ - - */ -class Mage_Cybermut_Model_Mysql4_Api_Debug_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract -{ - protected function _construct() - { - $this->_init('cybermut/api_debug'); - } -} diff --git a/app/code/core/Mage/Cybermut/Model/Mysql4/Setup.php b/app/code/core/Mage/Cybermut/Model/Mysql4/Setup.php deleted file mode 100644 index 5ebe774184..0000000000 --- a/app/code/core/Mage/Cybermut/Model/Mysql4/Setup.php +++ /dev/null @@ -1,39 +0,0 @@ - - */ - -class Mage_Cybermut_Model_Mysql4_Setup extends Mage_Sales_Model_Mysql4_Setup -{ - -} diff --git a/app/code/core/Mage/Cybermut/Model/Payment.php b/app/code/core/Mage/Cybermut/Model/Payment.php deleted file mode 100644 index 12cb0ccb36..0000000000 --- a/app/code/core/Mage/Cybermut/Model/Payment.php +++ /dev/null @@ -1,369 +0,0 @@ - - */ - -class Mage_Cybermut_Model_Payment extends Mage_Payment_Model_Method_Abstract -{ - protected $_code = 'cybermut_payment'; - protected $_formBlockType = 'cybermut/form'; - - // Cybermut return codes of payment - const RETURN_CODE_ACCEPTED = 'paiement'; - const RETURN_CODE_TEST_ACCEPTED = 'payetest'; - const RETURN_CODE_ERROR = 'Annulation'; - - // Payment configuration - protected $_isGateway = false; - protected $_canAuthorize = true; - protected $_canCapture = true; - protected $_canCapturePartial = false; - protected $_canRefund = false; - protected $_canVoid = false; - protected $_canUseInternal = false; - protected $_canUseCheckout = true; - protected $_canUseForMultishipping = false; - - // Order instance - protected $_order = null; - - /** - * Return CyberMut protocol version - * - * @return string Protocol version - */ - protected function getVersion() - { - return '1.2open'; - } - - /** - * Returns Target URL - * - * @return string Target URL - */ - public function getCybermutUrl() - { - $url = ''; - switch ($this->getConfigData('bank')) - { - default: - case 'mutuel': - $url = $this->getConfigData('test_mode') - ? 'https://paiement.creditmutuel.fr/test/paiement.cgi' - : 'https://paiement.creditmutuel.fr/paiement.cgi'; - break; - case 'cic': - $url = $this->getConfigData('test_mode') - ? 'https://ssl.paiement.cic-banques.fr/test/paiement.cgi' - : 'https://ssl.paiement.cic-banques.fr/paiement.cgi'; - break; - case 'obc': - $url = $this->getConfigData('test_mode') - ? 'https://ssl.paiement.banque-obc.fr/test/paiement.cgi' - : 'https://ssl.paiement.banque-obc.fr/paiement.cgi'; - break; - } - return $url; - } - - /** - * Return back URL - * - * @return string URL - */ - protected function getReturnURL() - { - return $this->getSuccessURL(); - } - - /** - * Return URL for Cybermut success response - * - * @return string URL - */ - protected function getSuccessURL() - { - return Mage::getUrl('cybermut/payment/success', array('_secure' => true)); - } - - /** - * Return URL for Cybermut failure response - * - * @return string URL - */ - protected function getErrorURL() - { - return Mage::getUrl('cybermut/payment/error', array('_secure' => true)); - } - - /** - * Capture payment - * - * @param Varien_Object $orderPayment - * @return Mage_Payment_Model_Abstract - */ - public function capture(Varien_Object $payment, $amount) - { - $payment->setStatus(self::STATUS_APPROVED) - ->setLastTransId($this->getTransactionId()); - - return $this; - } - - /** - * Form block description - * - * @return object - */ - public function createFormBlock($name) - { - $block = $this->getLayout()->createBlock('cybermut/form_payment', $name); - $block->setMethod($this->_code); - $block->setPayment($this->getPayment()); - - return $block; - } - - /** - * Return Order Place Redirect URL - * - * @return string Order Redirect URL - */ - public function getOrderPlaceRedirectUrl() - { - return Mage::getUrl('cybermut/payment/redirect'); - } - - /** - * Return Standard Checkout Form Fields for request to Cybermut - * - * @return array Array of hidden form fields - */ - public function getStandardCheckoutFormFields() - { - $order = $this->getOrder(); - if (!($order instanceof Mage_Sales_Model_Order)) { - Mage::throwException($this->_getHelper()->__('Cannot retrieve order object')); - } - - $description = $this->getConfigData('description') - ? $this->getConfigData('description') - : Mage::helper('cybermut')->__('Order #%s', $order->getRealOrderId()); - - $fields = array( - 'version' => $this->getVersion(), - 'TPE' => $this->getConfigData('tpe_no'), - 'date' => date('d/m/Y:H:i:s'), - 'montant' => sprintf('%.2f', $order->getBaseGrandTotal()) . $order->getBaseCurrencyCode(), - 'reference' => $order->getRealOrderId(), - 'texte-libre' => $description, - 'lgue' => $this->getConfigData('language'), - 'societe' => $this->getConfigData('site_code'), - 'url_retour' => $this->getReturnURL(), - 'url_retour_ok' => $this->getSuccessURL(), - 'url_retour_err' => $this->getErrorURL(), - 'bouton' => 'ButtonLabel' - ); - - $fields['MAC'] = $this->_getMAC($fields); - - return $fields; - } - - /** - * Prepare string for MAC generation - * - * @param array $data - * @return string MAC string - */ - protected function _getMAC($data) - { - $string = sprintf('%s*%s*%s*%s*%s*%s*%s*%s*', - $data['TPE'], - $data['date'], - $data['montant'], - $data['reference'], - $data['texte-libre'], - $data['version'], - $data['lgue'], - $data['societe'] - ); - - return $this->_CMCIC_hmac($string); - } - - /** - * Return SHA key - * - * @return string SHA key - */ - protected function _getSHAKey() - { - return $this->getConfigData('sha_key'); - } - - /** - * Return merchant key - * - * @return string Merchant key - */ - protected function _getKey() - { - return $this->getConfigData('key'); - } - - /** - * Return MAC string for payment authentification - * - * @param string $string - * @return string MAC - */ - protected function _CMCIC_hmac($string) - { - $pass = $this->_getSHAKey(); - $k1 = pack("H*",sha1($this->_getSHAKey())); - $l1 = strlen($k1); - $k2 = pack("H*", $this->_getKey()); - $l2 = strlen($k2); - if ($l1 > $l2) { - $k2 = str_pad($k2, $l1, chr(0x00)); - } elseif ($l2 > $l1) { - $k1 = str_pad($k1, $l2, chr(0x00)); - } - return strtolower($this->_hmacSHA1($k1 ^ $k2, $string)); - } - - /** - * MAC generation algorithm - * - * @param string $key - * @param string $string - * @return string MAC - */ - protected function _hmacSHA1($key, $string) - { - $length = 64; // block length for SHA1 - if (strlen($key) > $length) { - $key = pack("H*",sha1($key)); - } - $key = str_pad($key, $length, chr(0x00)); - $ipad = str_pad('', $length, chr(0x36)); - $opad = str_pad('', $length, chr(0x5c)); - $k_ipad = $key ^ $ipad ; - $k_opad = $key ^ $opad; - - return sha1($k_opad . pack("H*",sha1($k_ipad . $string))); - } - - /** - * Return MAC string on basis of Cybermut response data - * - * @param array $data - * @return string MAC - */ - public function getResponseMAC($data) - { - $string = sprintf('%s%s+%s+%s+%s+%s+%s+%s+', - $data['retourPLUS'], - $data['TPE'], - $data['date'], - $data['montant'], - $data['reference'], - $data['texte-libre'], - $this->getVersion(), - $data['code-retour'] - ); - return strtoupper($this->_CMCIC_hmac($string)); - } - - /** - * Transaction successful or not - * - * @param string $returnCode - * @return boolean - */ - public function isSuccessfulPayment($returnCode) - { - return in_array($returnCode, array(self::RETURN_CODE_ACCEPTED, self::RETURN_CODE_TEST_ACCEPTED)); - } - - /** - * Output success response and stop the script - */ - public function generateSuccessResponse() - { - die($this->getSuccessResponse()); - } - - /** - * Output failure response and stop the script - */ - public function generateErrorResponse() - { - die($this->getErrorResponse()); - } - - /** - * Return response for Cybermut success payment - * - * @return string Success response string - */ - public function getSuccessResponse() - { - $response = array( - 'Pragma: no-cache', - 'Content-type : text/plain', - 'Version: 1', - 'OK' - ); - return implode("\n", $response) . "\n"; - } - - /** - * Return response for Cybermut failure payment - * - * @return string Failure response string - */ - public function getErrorResponse() - { - $response = array( - 'Pragma: no-cache', - 'Content-type : text/plain', - 'Version: 1', - 'Document falsifie' - ); - return implode("\n", $response) . "\n"; - } - -} diff --git a/app/code/core/Mage/Cybermut/Model/Source/Bank.php b/app/code/core/Mage/Cybermut/Model/Source/Bank.php deleted file mode 100644 index 01376f60ff..0000000000 --- a/app/code/core/Mage/Cybermut/Model/Source/Bank.php +++ /dev/null @@ -1,49 +0,0 @@ - - */ - -class Mage_Cybermut_Model_Source_Bank -{ - public function toOptionArray() - { - return array( - array('value' => 'mutuel', 'label' => Mage::helper('cybermut')->__('Credit Mutuel')), - array('value' => 'cic', 'label' => Mage::helper('cybermut')->__('Groupe CIC')), - array('value' => 'obc', 'label' => Mage::helper('cybermut')->__('OBC')), - ); - } -} - - - diff --git a/app/code/core/Mage/Cybermut/Model/Source/Language.php b/app/code/core/Mage/Cybermut/Model/Source/Language.php deleted file mode 100644 index f8b7d18235..0000000000 --- a/app/code/core/Mage/Cybermut/Model/Source/Language.php +++ /dev/null @@ -1,52 +0,0 @@ - - */ - -class Mage_Cybermut_Model_Source_Language -{ - public function toOptionArray() - { - return array( - array('value' => 'EN', 'label' => Mage::helper('cybermut')->__('English')), - array('value' => 'FR', 'label' => Mage::helper('cybermut')->__('French')), - array('value' => 'DE', 'label' => Mage::helper('cybermut')->__('German')), - array('value' => 'IT', 'label' => Mage::helper('cybermut')->__('Italian')), - array('value' => 'ES', 'label' => Mage::helper('cybermut')->__('Spain')), - array('value' => 'NL', 'label' => Mage::helper('cybermut')->__('Dutch')), - ); - } -} - - - diff --git a/app/code/core/Mage/Cybermut/controllers/PaymentController.php b/app/code/core/Mage/Cybermut/controllers/PaymentController.php deleted file mode 100644 index 6e0710c84d..0000000000 --- a/app/code/core/Mage/Cybermut/controllers/PaymentController.php +++ /dev/null @@ -1,207 +0,0 @@ - - */ -class Mage_Cybermut_PaymentController extends Mage_Core_Controller_Front_Action -{ - /** - * Order instance - */ - protected $_order; - - /** - * Get order - * - * @return Mage_Sales_Model_Order - */ - public function getOrder() - { - if ($this->_order == null) { - $session = Mage::getSingleton('checkout/session'); - $this->_order = Mage::getModel('sales/order'); - $this->_order->loadByIncrementId($session->getLastRealOrderId()); - } - return $this->_order; - } - - /** - * When a customer chooses Cybermut on Checkout/Payment page - * - */ - public function redirectAction() - { - $session = Mage::getSingleton('checkout/session'); - $session->setCybermutPaymentQuoteId($session->getQuoteId()); - - $order = $this->getOrder(); - - if (!$order->getId()) { - $this->norouteAction(); - return; - } - - $order->addStatusToHistory( - $order->getStatus(), - Mage::helper('cybermut')->__('Customer was redirected to Cybermut') - ); - $order->save(); - - $this->getResponse() - ->setBody($this->getLayout() - ->createBlock('cybermut/redirect') - ->setOrder($order) - ->toHtml()); - - $session->unsQuoteId(); - } - - /** - * Cybermut response router - * - */ - public function notifyAction() - { - $model = Mage::getModel('cybermut/payment'); - - if (!$this->getRequest()->isPost()) { - $model->generateErrorResponse(); - } - - $postData = $this->getRequest()->getPost(); - $returnedMAC = $this->getRequest()->getPost('MAC'); - $correctMAC = $model->getResponseMAC($postData); - - if ($model->getConfigData('debug_flag')) { - Mage::getModel('cybermut/api_debug') - ->setResponseBody(print_r($postData ,1)) - ->save(); - } - - $order = Mage::getModel('sales/order') - ->loadByIncrementId($this->getRequest()->getPost('reference')); - - if (!$order->getId()) { - $model->generateErrorResponse(); - } - - if ($returnedMAC == $correctMAC && $model->isSuccessfulPayment($this->getRequest()->getPost('code-retour'))) { - $order->addStatusToHistory($model->getConfigData('order_status')); - $order->sendNewOrderEmail(); - if ($this->saveInvoice($order)) { -// $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true); - } - $order->save(); - $model->generateSuccessResponse(); - } else { - $order->addStatusToHistory( - $order->getStatus(), - Mage::helper('cybermut')->__('Returned MAC is invalid. Order cancelled.') - ); - $order->cancel(); - $order->save(); - $model->generateErrorResponse(); - } - } - - /** - * Save invoice for order - * - * @param Mage_Sales_Model_Order $order - * @return boolean Can save invoice or not - */ - protected function saveInvoice(Mage_Sales_Model_Order $order) - { - if ($order->canInvoice()) { - $invoice = $order->prepareInvoice(); - $invoice->register()->capture(); - Mage::getModel('core/resource_transaction') - ->addObject($invoice) - ->addObject($invoice->getOrder()) - ->save(); - return true; - } - - return false; - } - - /** - * Success payment page - */ - public function successAction() - { - $session = Mage::getSingleton('checkout/session'); - $session->setQuoteId($session->getCybermutPaymentQuoteId()); - $session->unsCybermutPaymentQuoteId(); - - $order = $this->getOrder(); - - if (!$order->getId()) { - $this->norouteAction(); - return; - } - - $order->addStatusToHistory( - $order->getStatus(), - Mage::helper('cybermut')->__('Customer successfully returned from Cybermut') - ); - - $order->save(); - $this->_redirect('checkout/onepage/success'); - } - - /** - * Failure payment page - */ - public function errorAction() - { - $errorMsg = Mage::helper('cybermut')->__(' There was an error occurred during paying process.'); - - $order = $this->getOrder(); - - if (!$order->getId()) { - $this->norouteAction(); - return; - } - if ($order instanceof Mage_Sales_Model_Order && $order->getId()) { - $order->addStatusToHistory( - $order->getStatus(), - Mage::helper('cybermut')->__('Customer returned from Cybermut.') . $errorMsg - ); - $order->cancel(); - $order->save(); - } - - $this->loadLayout(); - $this->renderLayout(); - Mage::getSingleton('checkout/session')->unsLastRealOrderId(); - } -} diff --git a/app/code/core/Mage/Cybermut/etc/config.xml b/app/code/core/Mage/Cybermut/etc/config.xml deleted file mode 100644 index 3a21a03b95..0000000000 --- a/app/code/core/Mage/Cybermut/etc/config.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - 0.1.0 - - - - - - Mage_Cybermut_Model - cybermut_mysql4 - - - Mage_Cybermut_Model_Mysql4 - - cybermut_api_debug
-
-
-
- - - - Mage_Cybermut - Mage_Cybermut_Model_Mysql4_Setup - - - - - Mage_Cybermut_Block - -
- - - /cybermut/payment - - - - standard - - Mage_Cybermut - cybermut - - - - - - - - Mage_Cybermut.csv - - - - - - - - cybermut.xml - - - - - - - - - - Mage_Cybermut.csv - - - - - - - - - cybermut/payment - CyberMUT-P@iement - 0 - O - - - -
diff --git a/app/code/core/Mage/Cybermut/etc/system.xml b/app/code/core/Mage/Cybermut/etc/system.xml deleted file mode 100644 index 035793feca..0000000000 --- a/app/code/core/Mage/Cybermut/etc/system.xml +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - - - - text - 300 - 1 - 1 - 1 - - - - select - adminhtml/system_config_source_yesno - 1 - 1 - 1 - 0 - - - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>2</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - - - - text - 3 - 1 - 1 - 0 - - - - text - 4 - 1 - 1 - 0 - - - - text - 5 - 1 - 1 - 0 - - - - text - 6 - 1 - 1 - 0 - - - - select - cybermut/source_bank - 7 - 1 - 1 - 0 - - - - Order number will be used if left empty - text - 8 - 1 - 1 - 0 - - - - select - cybermut/source_language - 9 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 10 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 11 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_order_status - 12 - 1 - 1 - 0 - - - - allowspecific - 13 - adminhtml/system_config_source_payment_allspecificcountries - 1 - 1 - 0 - - - - multiselect - 14 - adminhtml/system_config_source_country - 1 - 1 - 0 - - - - text - 15 - 1 - 1 - 0 - - - - - - - diff --git a/app/code/core/Mage/Cybermut/sql/cybermut_setup/mysql4-install-0.1.0.php b/app/code/core/Mage/Cybermut/sql/cybermut_setup/mysql4-install-0.1.0.php deleted file mode 100644 index 78bd7163ce..0000000000 --- a/app/code/core/Mage/Cybermut/sql/cybermut_setup/mysql4-install-0.1.0.php +++ /dev/null @@ -1,45 +0,0 @@ -startSetup(); - -$installer->run(" -CREATE TABLE `{$this->getTable('cybermut_api_debug')}` ( - `debug_id` int(10) unsigned NOT NULL auto_increment, - `debug_at` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `request_body` text, - `response_body` text, - PRIMARY KEY (`debug_id`), - KEY `debug_at` (`debug_at`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - - "); - -$installer->endSetup(); diff --git a/app/code/core/Mage/Cybersource/Block/Form.php b/app/code/core/Mage/Cybersource/Block/Form.php deleted file mode 100644 index 5391c7ca43..0000000000 --- a/app/code/core/Mage/Cybersource/Block/Form.php +++ /dev/null @@ -1,96 +0,0 @@ -setTemplate('cybersource/form.phtml'); - } - - protected function _getConfig() - { - return Mage::getSingleton('cybersource/config'); - } - - /** - * Retrieve availables credit card types - * - * @return array - */ - public function getCcAvailableTypes() - { - $types = $this->_getConfig()->getCcTypes(); - if ($method = $this->getMethod()) { - $availableTypes = $method->getConfigData('cctypes'); - if ($availableTypes) { - $availableTypes = explode(',', $availableTypes); - foreach ($types as $code=>$name) { - if (!in_array($code, $availableTypes)) { - unset($types[$code]); - } - } - } - } - return $types; - } - - - /* - * solo/switch card start year - * @return array - */ - public function getSsStartYears() - { - $years = array(); - $first = date("Y"); - - for ($index=5; $index>=0; $index--) { - $year = $first - $index; - $years[$year] = $year; - } - $years = array(0=>$this->__('Year'))+$years; - return $years; - } - - /* - * switch/solo card type available - */ - public function hasSsCardType() - { - $availableTypes =$this->getMethod()->getConfigData('cctypes'); - if ($availableTypes) { - $availableTypes = explode(',', $availableTypes); - if (in_array('SS', $availableTypes)) { - return true; - } - } - return false; - } - -} diff --git a/app/code/core/Mage/Cybersource/Block/Info.php b/app/code/core/Mage/Cybersource/Block/Info.php deleted file mode 100644 index 1028e1c058..0000000000 --- a/app/code/core/Mage/Cybersource/Block/Info.php +++ /dev/null @@ -1,75 +0,0 @@ -setTemplate('cybersource/info.phtml'); - } - - protected function _getConfig() - { - return Mage::getSingleton('cybersource/config'); - } - - - /** - * Retrieve credit card type name - * - * @return string - */ - public function getCcTypeName() - { - $types = $this->_getConfig()->getCcTypes(); - if (isset($types[$this->getInfo()->getCcType()])) { - return $types[$this->getInfo()->getCcType()]; - } - return $this->getInfo()->getCcType(); - } - - /** - * Retrieve CC start month for switch/solo card - * - * @return string - */ - public function getCcStartMonth() - { - $month = $this->getInfo()->getCcSsStartMonth(); - if ($month<10) { - $month = '0'.$month; - } - return $month; - } - - public function toPdf() - { - $this->setTemplate('cybersource/pdf/info.phtml'); - return $this->toHtml(); - } -} diff --git a/app/code/core/Mage/Cybersource/Helper/Data.php b/app/code/core/Mage/Cybersource/Helper/Data.php deleted file mode 100644 index 2099d8735e..0000000000 --- a/app/code/core/Mage/Cybersource/Helper/Data.php +++ /dev/null @@ -1,33 +0,0 @@ - - */ -class Mage_Cybersource_Model_Api_Debug extends Mage_Core_Model_Abstract -{ - protected function _construct() - { - $this->_init('cybersource/api_debug'); - } -} diff --git a/app/code/core/Mage/Cybersource/Model/Api/ExtendedSoapClient.php b/app/code/core/Mage/Cybersource/Model/Api/ExtendedSoapClient.php deleted file mode 100644 index 7ce6be9caa..0000000000 --- a/app/code/core/Mage/Cybersource/Model/Api/ExtendedSoapClient.php +++ /dev/null @@ -1,121 +0,0 @@ -_storeId = $storeId; - return $this; - } - - /** - * Store Id getter - * - * @return int - */ - public function getStoreId() - { - return $this->_storeId; - } - - /** - * XPaths that should be replaced in debug with '***' - * - * @var array - */ - protected $_debugReplacePrivateDataXPaths = array( - '//*[contains(name(),\'merchantID\')]/text()', - '//*[contains(name(),\'card\')]/*/text()', - '//*[contains(name(),\'UsernameToken\')]/*/text()' - ); - - public function __construct($wsdl, $options = array()) - { - parent::__construct($wsdl, $options); - } - - protected function getBaseApi() - { - return Mage::getSingleton('cybersource/soap'); - } - - public function __doRequest($request, $location, $action, $version) - { - $api = $this->getBaseApi(); - $user = $api->getConfigData('merchant_id', $this->getStoreId()); - $password = $api->getConfigData('security_key', $this->getStoreId()); - $soapHeader = "$user$password"; - - $requestDOM = new DOMDocument('1.0'); - $soapHeaderDOM = new DOMDocument('1.0'); - $requestDOM->loadXML($request); - $soapHeaderDOM->loadXML($soapHeader); - - $node = $requestDOM->importNode($soapHeaderDOM->firstChild, true); - $requestDOM->firstChild->insertBefore( - $node, $requestDOM->firstChild->firstChild); - - $request = $requestDOM->saveXML(); - if ($api->getConfigData('debug', $this->getStoreId())) { - - $requestDOMXPath = new DOMXPath($requestDOM); - - foreach ($this->_debugReplacePrivateDataXPaths as $xPath) { - foreach ($requestDOMXPath->query($xPath) as $element) { - $element->data = '***'; - } - } - - $debug = Mage::getModel('cybersource/api_debug') - ->setAction($action) - ->setRequestBody($requestDOM->saveXML()) - ->save(); - } - - $response = parent::__doRequest($request, $location, $action, $version); - - if (!empty($debug)) { - $debug - ->setResponseBody($response) - ->save(); - } - - return $response; - } -} diff --git a/app/code/core/Mage/Cybersource/Model/Config.php b/app/code/core/Mage/Cybersource/Model/Config.php deleted file mode 100644 index 9c0fd1e159..0000000000 --- a/app/code/core/Mage/Cybersource/Model/Config.php +++ /dev/null @@ -1,62 +0,0 @@ -_ccTypes = array(); - $added = false; - foreach ($pTypes as $code => $name) { - if ($code=='OT') { - $added = true; - $this->addExtraCcTypes(); - } - $this->_ccTypes[$code] = $name; - } - if (!$added) { - $this->addExtraCcTypes(); - } - return $this->_ccTypes; - } - - public function addExtraCcTypes() - { - $this->_ccTypes['JCB'] = Mage::helper('cybersource')->__('JCB'); - $this->_ccTypes['LASER'] = Mage::helper('cybersource')->__('Laser'); - $this->_ccTypes['UATP'] = Mage::helper('cybersource')->__('UATP'); - $this->_ccTypes['MCI'] = Mage::helper('cybersource')->__('Maestro (International)'); - $this->_ccTypes[Mage_Cybersource_Model_Soap::CC_CARDTYPE_SS] = Mage::helper('cybersource')->__('Maestro/Solo(UK Domestic)'); - - } - -} diff --git a/app/code/core/Mage/Cybersource/Model/Mysql4/Api/Debug.php b/app/code/core/Mage/Cybersource/Model/Mysql4/Api/Debug.php deleted file mode 100644 index fae3f152df..0000000000 --- a/app/code/core/Mage/Cybersource/Model/Mysql4/Api/Debug.php +++ /dev/null @@ -1,39 +0,0 @@ - - */ -class Mage_Cybersource_Model_Mysql4_Api_Debug extends Mage_Core_Model_Mysql4_Abstract -{ - protected function _construct() - { - $this->_init('cybersource/api_debug', 'debug_id'); - } -} diff --git a/app/code/core/Mage/Cybersource/Model/Mysql4/Api/Debug/Collection.php b/app/code/core/Mage/Cybersource/Model/Mysql4/Api/Debug/Collection.php deleted file mode 100644 index 3d6cc2925d..0000000000 --- a/app/code/core/Mage/Cybersource/Model/Mysql4/Api/Debug/Collection.php +++ /dev/null @@ -1,39 +0,0 @@ - - */ -class Mage_Cybersource_Model_Mysql4_Api_Debug_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract -{ - protected function _construct() - { - $this->_init('cybersource/api_debug'); - } -} diff --git a/app/code/core/Mage/Cybersource/Model/Mysql4/Setup.php b/app/code/core/Mage/Cybersource/Model/Mysql4/Setup.php deleted file mode 100644 index 0166b2eb15..0000000000 --- a/app/code/core/Mage/Cybersource/Model/Mysql4/Setup.php +++ /dev/null @@ -1,38 +0,0 @@ -getInfoInstance(); - - if ($data->getCcType()==self::CC_CARDTYPE_SS) { - $info->setCcSsIssue($data->getCcSsIssue()) - ->setCcSsStartMonth($data->getCcSsStartMonth()) - ->setCcSsStartYear($data->getCcSsStartYear()) - ; - } - return $this; - } - - /** - * Validate payment method information object - * - * @param Mage_Payment_Model_Info $info - * @return Mage_Payment_Model_Abstract - */ - public function validate() - { - if (!extension_loaded('soap')) { - Mage::throwException(Mage::helper('cybersource')->__('SOAP extension is not enabled. Please contact us.')); - } - /** - * to validate paymene method is allowed for billing country or not - */ - $paymentInfo = $this->getInfoInstance(); - if ($paymentInfo instanceof Mage_Sales_Model_Order_Payment) { - $billingCountry = $paymentInfo->getOrder()->getBillingAddress()->getCountryId(); - } else { - $billingCountry = $paymentInfo->getQuote()->getBillingAddress()->getCountryId(); - } - if (!$this->canUseForCountry($billingCountry)) { - Mage::throwException($this->_getHelper()->__('Selected payment type is not allowed for billing country.')); - } - - $info = $this->getInfoInstance(); - $errorMsg = false; - $availableTypes = explode(',',$this->getConfigData('cctypes')); - - $ccNumber = $info->getCcNumber(); - - // remove credit card number delimiters such as "-" and space - $ccNumber = preg_replace('/[\-\s]+/', '', $ccNumber); - $info->setCcNumber($ccNumber); - - $ccType = ''; - - if (!$this->_validateExpDate($info->getCcExpYear(), $info->getCcExpMonth())) { - $errorCode = 'ccsave_expiration,ccsave_expiration_yr'; - $errorMsg = $this->_getHelper()->__('Incorrect credit card expiration date'); - } - - if (in_array($info->getCcType(), $availableTypes)){ - if ($this->validateCcNum($ccNumber) - // Other credit card type number validation - || ($this->OtherCcType($info->getCcType()) && $this->validateCcNumOther($ccNumber))) { - - $ccType = 'OT'; - $ccTypeRegExpList = array( - 'VI' => '/^4[0-9]{12}([0-9]{3})?$/', // Visa - 'MC' => '/^5[1-5][0-9]{14}$/', // Master Card - 'AE' => '/^3[47][0-9]{13}$/', // American Express - 'DI' => '/^6011[0-9]{12}$/', // Discovery - 'JCB' => '/^(3[0-9]{15}|(2131|1800)[0-9]{12})$/', // JCB - 'LASER' => '/^(6304|6706|6771|6709)[0-9]{12}([0-9]{3})?$/' // LASER - ); - - foreach ($ccTypeRegExpList as $ccTypeMatch=>$ccTypeRegExp) { - if (preg_match($ccTypeRegExp, $ccNumber)) { - $ccType = $ccTypeMatch; - break; - } - } - - if (!$this->OtherCcType($info->getCcType()) && $ccType!=$info->getCcType()) { - $errorCode = 'ccsave_cc_type,ccsave_cc_number'; - $errorMsg = $this->_getHelper()->__('Credit card number mismatch with credit card type'); - } - } - else { - $errorCode = 'ccsave_cc_number'; - $errorMsg = $this->_getHelper()->__('Invalid Credit Card Number'); - } - - } - else { - $errorCode = 'ccsave_cc_type'; - $errorMsg = $this->_getHelper()->__('Credit card type is not allowed for this payment method'); - } - - //validate credit card verification number - if ($errorMsg === false && $this->hasVerification()) { - $verifcationRegEx = $this->getVerificationRegEx(); - $regExp = isset($verifcationRegEx[$info->getCcType()]) ? $verifcationRegEx[$info->getCcType()] : ''; - if (!$info->getCcCid() || !$regExp || !preg_match($regExp ,$info->getCcCid())){ - $errorMsg = $this->_getHelper()->__('Please enter a valid credit card verification number.'); - } - } - - if($errorMsg){ - Mage::throwException($errorMsg); - } - return $this; - } - - /** - * Getting Soap Api object - * - * @param array $options - * @return Mage_Cybersource_Model_Api_ExtendedSoapClient - */ - protected function getSoapApi($options = array()) - { - $wsdl = $this->getConfigData('test') ? self::WSDL_URL_TEST : self::WSDL_URL_LIVE; - $_api = new Mage_Cybersource_Model_Api_ExtendedSoapClient($wsdl, $options); - $_api->setStoreId($this->getStore()); - return $_api; - } - - /** - * Initializing soap header - */ - protected function iniRequest() - { - $this->_request = new stdClass(); - $this->_request->merchantID = $this->getConfigData('merchant_id'); - $this->_request->merchantReferenceCode = $this->_generateReferenceCode(); - - $this->_request->clientLibrary = "PHP"; - $this->_request->clientLibraryVersion = phpversion(); - $this->_request->clientEnvironment = php_uname(); - } - - /** - * Random generator for merchant referenc code - * - * @return random number - */ - protected function _generateReferenceCode() - { - return Mage::helper('core')->uniqHash(); - } - - /** - * Getting customer IP address - * - * @return IP address string - */ - protected function getIpAddress() - { - return Mage::helper('core/http')->getRemoteAddr(); - } - - /** - * Assigning billing address to soap - * - * @param Varien_Object $billing - * @param String $email - */ - protected function addBillingAddress($billing, $email) - { - if (!$email) { - $email = Mage::getSingleton('checkout/session')->getQuote()->getBillingAddress()->getEmail(); - } - $billTo = new stdClass(); - $billTo->firstName = $billing->getFirstname(); - $billTo->lastName = $billing->getLastname(); - $billTo->company = $billing->getCompany(); - $billTo->street1 = $billing->getStreet(1); - $billTo->street2 = $billing->getStreet(2); - $billTo->city = $billing->getCity(); - $billTo->state = $billing->getRegion(); - $billTo->postalCode = $billing->getPostcode(); - $billTo->country = $billing->getCountry(); - $billTo->phoneNumber = $billing->getTelephone(); - $billTo->email = ($email ? $email : Mage::getStoreConfig('trans_email/ident_general/email')); - $billTo->ipAddress = $this->getIpAddress(); - $this->_request->billTo = $billTo; - } - - /** - * Assigning shipping address to soap object - * - * @param Varien_Object $shipping - */ - protected function addShippingAddress($shipping) - { - //checking if we have shipping address, in case of virtual order we will not have it - if ($shipping) { - $shipTo = new stdClass(); - $shipTo->firstName = $shipping->getFirstname(); - $shipTo->lastName = $shipping->getLastname(); - $shipTo->company = $shipping->getCompany(); - $shipTo->street1 = $shipping->getStreet(1); - $shipTo->street2 = $shipping->getStreet(2); - $shipTo->city = $shipping->getCity(); - $shipTo->state = $shipping->getRegion(); - $shipTo->postalCode = $shipping->getPostcode(); - $shipTo->country = $shipping->getCountry(); - $shipTo->phoneNumber = $shipping->getTelephone(); - $this->_request->shipTo = $shipTo; - } - } - - /** - * Assigning credit card information - * - * @param Mage_Model_Order_Payment $payment - */ - protected function addCcInfo($payment) - { - $card = new stdClass(); - $card->fullName = $payment->getCcOwner(); - $card->accountNumber = $payment->getCcNumber(); - $card->expirationMonth = $payment->getCcExpMonth(); - $card->expirationYear = $payment->getCcExpYear(); - if ($payment->hasCcCid()) { - $card->cvNumber = $payment->getCcCid(); - } - if ($payment->getCcType()==self::CC_CARDTYPE_SS && $payment->hasCcSsIssue()) { - $card->issueNumber = $payment->getCcSsIssue(); - } - if ($payment->getCcType()==self::CC_CARDTYPE_SS && $payment->hasCcSsStartYear()) { - $card->startMonth = $payment->getCcSsStartMonth(); - $card->startYear = $payment->getCcSsStartYear(); - } - $this->_request->card = $card; - } - - /** - * Authorizing payment - * - * @param Varien_Object $payment - * @param float $amount - * @return Mage_Cybersource_Model_Soap - */ - public function authorize(Varien_Object $payment, $amount) - { - $error = false; - - $soapClient = $this->getSoapApi(); - - $this->iniRequest(); - - $ccAuthService = new stdClass(); - $ccAuthService->run = "true"; - $this->_request->ccAuthService = $ccAuthService; - $this->addBillingAddress($payment->getOrder()->getBillingAddress(), $payment->getOrder()->getCustomerEmail()); - $this->addShippingAddress($payment->getOrder()->getShippingAddress()); - $this->addCcInfo($payment); - - $purchaseTotals = new stdClass(); - $purchaseTotals->currency = $payment->getOrder()->getBaseCurrencyCode(); - $purchaseTotals->grandTotalAmount = $amount; - $this->_request->purchaseTotals = $purchaseTotals; - - try { - $result = $soapClient->runTransaction($this->_request); - if ($result->reasonCode==self::RESPONSE_CODE_SUCCESS) { - $payment->setLastTransId($result->requestID) - ->setCcTransId($result->requestID) - ->setCybersourceToken($result->requestToken) - ->setCcAvsStatus($result->ccAuthReply->avsCode); - /* - * checking if we have cvCode in response bc - * if we don't send cvn we don't get cvCode in response - */ - if (isset($result->ccAuthReply->cvCode)) { - $payment->setCcCidStatus($result->ccAuthReply->cvCode); - } - } else { - $error = Mage::helper('cybersource')->__('There is an error in processing payment. Please try again or contact us.'); - } - } catch (Exception $e) { - Mage::throwException( - Mage::helper('cybersource')->__('Gateway request error: %s', $e->getMessage()) - ); - } - - if ($error !== false) { - Mage::throwException($error); - } - return $this; - } - - /** - * Capturing payment - * - * @param Varien_Object $payment - * @param float $amount - * @return Mage_Cybersource_Model_Soap - */ - public function capture(Varien_Object $payment, $amount) - { - $error = false; - $soapClient = $this->getSoapApi(); - $this->iniRequest(); - - if ($payment->getCcTransId() && $payment->getCybersourceToken()) { - $ccCaptureService = new stdClass(); - $ccCaptureService->run = "true"; - $ccCaptureService->authRequestToken = $payment->getCybersourceToken(); - $ccCaptureService->authRequestID = $payment->getCcTransId(); - $this->_request->ccCaptureService = $ccCaptureService; - - $item0 = new stdClass(); - $item0->unitPrice = $amount; - $item0->id = 0; - $this->_request->item = array($item0); - } else { - $ccAuthService = new stdClass(); - $ccAuthService->run = "true"; - $this->_request->ccAuthService = $ccAuthService; - - $ccCaptureService = new stdClass(); - $ccCaptureService->run = "true"; - $this->_request->ccCaptureService = $ccCaptureService; - - $this->addBillingAddress($payment->getOrder()->getBillingAddress(), $payment->getOrder()->getCustomerEmail()); - $this->addShippingAddress($payment->getOrder()->getShippingAddress()); - $this->addCcInfo($payment); - - $purchaseTotals = new stdClass(); - $purchaseTotals->currency = $payment->getOrder()->getBaseCurrencyCode(); - $purchaseTotals->grandTotalAmount = $amount; - $this->_request->purchaseTotals = $purchaseTotals; - } - try { - $result = $soapClient->runTransaction($this->_request); - if ($result->reasonCode==self::RESPONSE_CODE_SUCCESS) { - /* - for multiple capture we need to use the latest capture transaction id - */ - $payment->setLastTransId($result->requestID) - ->setLastCybersourceToken($result->requestToken) - ->setCcTransId($result->requestID) - ->setCybersourceToken($result->requestToken) - ; - } else { - $error = Mage::helper('cybersource')->__('There is an error in processing payment. Please try again or contact us.'); - } - } catch (Exception $e) { - Mage::throwException( - Mage::helper('cybersource')->__('Gateway request error: %s', $e->getMessage()) - ); - } - if ($error !== false) { - Mage::throwException($error); - } - return $this; - } - - /** - * To assign transaction id and token after capturing payment - * - * @param Mage_Sale_Model_Order_Invoice $invoice - * @param Mage_Sale_Model_Order_Payment $payment - * @return Mage_Cybersource_Model_Soap - */ - public function processInvoice($invoice, $payment) - { - parent::processInvoice($invoice, $payment); - $invoice->setTransactionId($payment->getLastTransId()); - $invoice->setCybersourceToken($payment->getLastCybersourceToken()); - return $this; - } - - /** - * To assign transaction id and token before voiding the transaction - * - * @param Mage_Sale_Model_Order_Invoice $invoice - * @param Mage_Sale_Order_Payment $payment - * @return Mage_Cybersource_Model_Soap - */ - public function processBeforeVoid($invoice, $payment) - { - parent::processBeforeVoid($invoice, $payment); - $payment->setVoidTransactionId($invoice->getTransactionId()); - $payment->setVoidCybersourceToken($invoice->getCybersourceToken()); - return $this; - } - - /** - * Void the payment transaction - * - * @param Mage_Sale_Model_Order_Payment $payment - * @return Mage_Cybersource_Model_Soap - */ - public function void(Varien_Object $payment) - { - $error = false; - if ($payment->getVoidTransactionId() && $payment->getVoidCybersourceToken()) { - $soapClient = $this->getSoapApi(); - $this->iniRequest(); - $voidService = new stdClass(); - $voidService->run = "true"; - $voidService->voidRequestToken = $payment->getVoidCybersourceToken(); - $voidService->voidRequestID = $payment->getVoidTransactionId(); - $this->_request->voidService = $voidService; - try { - $result = $soapClient->runTransaction($this->_request); - if ($result->reasonCode==self::RESPONSE_CODE_SUCCESS) { - $payment->setLastTransId($result->requestID) - ->setCcTransId($result->requestID) - ->setCybersourceToken($result->requestToken) - ; - } else { - $error = Mage::helper('cybersource')->__('There is an error in processing payment. Please try again or contact us.'); - } - } catch (Exception $e) { - Mage::throwException( - Mage::helper('cybersource')->__('Gateway request error: %s', $e->getMessage()) - ); - } - }else{ - $error = Mage::helper('cybersource')->__('Invalid transaction id or token'); - } - if ($error !== false) { - Mage::throwException($error); - } - return $this; - } - - /** - * To assign correct transaction id and token before refund - * - * @param Mage_Sale_Model_Order_Invoice $invoice - * @param Mage_Sale_Model_Order_Payment $payment - * @return Mage_Cybersource_Model_Soap - */ - public function processBeforeRefund($invoice, $payment) - { - parent::processBeforeRefund($invoice, $payment); - $payment->setRefundTransactionId($invoice->getTransactionId()); - $payment->setRefundCybersourceToken($invoice->getCybersourceToken()); - return $this; - } - - /** - * Refund the payment transaction - * - * @param Mage_Sale_Model_Order_Payment $payment - * @param flaot $amount - * @return Mage_Cybersource_Model_Soap - */ - public function refund(Varien_Object $payment, $amount) - { - $error = false; - if ($payment->getRefundTransactionId() && $payment->getRefundCybersourceToken() && $amount>0) { - $soapClient = $this->getSoapApi(); - $this->iniRequest(); - $ccCreditService = new stdClass(); - $ccCreditService->run = "true"; - $ccCreditService->captureRequestToken = $payment->getCybersourceToken(); - $ccCreditService->captureRequestID = $payment->getCcTransId(); - $this->_request->ccCreditService = $ccCreditService; - - $purchaseTotals = new stdClass(); - $purchaseTotals->grandTotalAmount = $amount; - $this->_request->purchaseTotals = $purchaseTotals; - - try { - $result = $soapClient->runTransaction($this->_request); - if ($result->reasonCode==self::RESPONSE_CODE_SUCCESS) { - $payment->setLastTransId($result->requestID) - ->setLastCybersourceToken($result->requestToken) - ; - } else { - $error = Mage::helper('cybersource')->__('There is an error in processing payment. Please try again or contact us.'); - } - } catch (Exception $e) { - Mage::throwException( - Mage::helper('cybersource')->__('Gateway request error: %s', $e->getMessage()) - ); - } - } else { - $error = Mage::helper('cybersource')->__('Error in refunding the payment'); - } - if ($error !== false) { - Mage::throwException($error); - } - return $this; - } - - - /** - * To assign correct transaction id and token after refund - * - * @param Mage_Sale_Model_Order_Creditmemo $creditmemo - * @param Mage_Sale_Model_Order_Payment $payment - * @return Mage_Cybersource_Model_Soap - */ - public function processCreditmemo($creditmemo, $payment) - { - parent::processCreditmemo($creditmemo, $payment); - $creditmemo->setTransactionId($payment->getLastTransId()); - $creditmemo->setCybersourceToken($payment->getLastCybersourceToken()); - return $this; - } -} diff --git a/app/code/core/Mage/Cybersource/Model/Source/Cctype.php b/app/code/core/Mage/Cybersource/Model/Source/Cctype.php deleted file mode 100644 index 6c8a974562..0000000000 --- a/app/code/core/Mage/Cybersource/Model/Source/Cctype.php +++ /dev/null @@ -1,33 +0,0 @@ - - */ -class Mage_Cybersource_Model_Source_PaymentAction -{ - public function toOptionArray() - { - return array( - array('value' => Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE, 'label' => Mage::helper('cybersource')->__('Authorization')), - array('value' => Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE, 'label' => Mage::helper('cybersource')->__('Sale')), - ); - } -} diff --git a/app/code/core/Mage/Cybersource/etc/config.xml b/app/code/core/Mage/Cybersource/etc/config.xml deleted file mode 100644 index dfdc1738ec..0000000000 --- a/app/code/core/Mage/Cybersource/etc/config.xml +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - 0.7.0 - - - - - - Mage_Cybersource_Model - cybersource_mysql4 - - - Mage_Cybersource_Model_Mysql4 - - cybersource_api_debug
-
-
-
- - - - Mage_Cybersource - Mage_Cybersource_Model_Mysql4_Setup - - - - - Mage_Cybersource_Block - - - - - - JCB - JCB - 50 - - - LASER - Laser - 51 - - - UATP - UATP - 52 - - - MCI - Maestro (International) - 53 - - - SS - Maestro/Solo(UK Domestic) - 53 - - - - -
- - - /cybersource/soap - - - - standard - - Mage_Cybersource - cybersource - - - - - - - - Mage_Cybersource.csv - - - - - - - - - - - Mage_Cybersource.csv - - - - - - - - - - authorize - Credit Card (Cybersource) - processing - AE,VI,MC,DI - cybersource/soap - - - - - -
diff --git a/app/code/core/Mage/Cybersource/etc/system.xml b/app/code/core/Mage/Cybersource/etc/system.xml deleted file mode 100644 index 0333a94ade..0000000000 --- a/app/code/core/Mage/Cybersource/etc/system.xml +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - - text - 500 - 1 - 1 - 1 - - - - select - adminhtml/system_config_source_yesno - 1 - 1 - 1 - 0 - - - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>2</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - - - - adminhtml/system_config_backend_encrypted - obscure - 3 - 1 - 1 - 0 - - - - adminhtml/system_config_backend_encrypted - obscure - 4 - 1 - 1 - 0 - - - - select - cybersource/source_paymentAction - 5 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_order_status_processing - 6 - 1 - 1 - 0 - - - - multiselect - cybersource/source_cctype - 15 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 16 - 1 - 1 - 0 - - - - allowspecific - 50 - adminhtml/system_config_source_payment_allspecificcountries - 1 - 1 - 0 - - - - multiselect - 51 - adminhtml/system_config_source_country - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 55 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 56 - 1 - 1 - 0 - - - - text - 100 - 1 - 1 - 0 - - - - - - - diff --git a/app/code/core/Mage/Cybersource/sql/cybersource_setup/mysql4-install-0.7.0.php b/app/code/core/Mage/Cybersource/sql/cybersource_setup/mysql4-install-0.7.0.php deleted file mode 100644 index 5cfd6dc68f..0000000000 --- a/app/code/core/Mage/Cybersource/sql/cybersource_setup/mysql4-install-0.7.0.php +++ /dev/null @@ -1,54 +0,0 @@ -startSetup(); - -$installer->run(" - --- DROP TABLE IF EXISTS `{$this->getTable('cybersource_api_debug')}`; -CREATE TABLE `{$this->getTable('cybersource_api_debug')}` ( - `debug_id` int(10) unsigned NOT NULL auto_increment, - `debug_at` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `action` varchar(255), - `request_body` text, - `response_body` text, - PRIMARY KEY (`debug_id`), - KEY `debug_at` (`debug_at`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - - "); - -$installer->endSetup(); - -$installer->addAttribute('quote_payment', 'cybersource_token', array()); -$installer->addAttribute('order_payment', 'cybersource_token', array()); -$installer->addAttribute('invoice', 'cybersource_token', array()); -$installer->addAttribute('creditmemo', 'cybersource_token', array()); - diff --git a/app/code/core/Mage/Directory/Block/Currency.php b/app/code/core/Mage/Directory/Block/Currency.php index bfe37ba44c..83fb8359b5 100644 --- a/app/code/core/Mage/Directory/Block/Currency.php +++ b/app/code/core/Mage/Directory/Block/Currency.php @@ -86,6 +86,17 @@ public function getSwitchUrl() return $this->getUrl('directory/currency/switch'); } + /** + * Return URL for specified currency to switch + * + * @param string $code Currency code + * @return string + */ + public function getSwitchCurrencyUrl($code) + { + return Mage::helper('directory/url')->getSwitchCurrencyUrl(array('currency' => $code)); + } + /** * Retrieve Current Currency code * @@ -98,7 +109,7 @@ public function getCurrentCurrencyCode() // to get an invalid (without base rate) currency from code saved in session $this->setData('current_currency_code', Mage::app()->getStore()->getCurrentCurrency()->getCode()); } - + return $this->_getData('current_currency_code'); } } diff --git a/app/code/core/Mage/Directory/Helper/Url.php b/app/code/core/Mage/Directory/Helper/Url.php index 0c783546c9..aee192f9b2 100644 --- a/app/code/core/Mage/Directory/Helper/Url.php +++ b/app/code/core/Mage/Directory/Helper/Url.php @@ -34,19 +34,21 @@ class Mage_Directory_Helper_Url extends Mage_Core_Helper_Url /** * Retrieve switch currency url * + * @param array $params Additional url params * @return string */ - public function getSwitchCurrencyUrl() + public function getSwitchCurrencyUrl($params = array()) { + $params = is_array($params) ? $params : array(); + if ($this->_getRequest()->getAlias('rewrite_request_path')) { $url = Mage::app()->getStore()->getBaseUrl() . $this->_getRequest()->getAlias('rewrite_request_path'); } else { $url = $this->getCurrentUrl(); } - $params = array( - Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED => Mage::helper('core')->urlEncode($url) - ); + $params[Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED] = Mage::helper('core')->urlEncode($url); + return $this->_getUrl('directory/currency/switch', $params); } diff --git a/app/code/core/Mage/Directory/Model/Mysql4/Country/Collection.php b/app/code/core/Mage/Directory/Model/Mysql4/Country/Collection.php index b83e14b5f5..d378f3d1bc 100644 --- a/app/code/core/Mage/Directory/Model/Mysql4/Country/Collection.php +++ b/app/code/core/Mage/Directory/Model/Mysql4/Country/Collection.php @@ -109,7 +109,7 @@ public function addCountryIdFilter($countryId) return $this; } - public function toOptionArray($emptyLabel = ' ') + public function toOptionArray($emptyLabel = ' ') { $options = $this->_toOptionArray('country_id', 'name', array('title'=>'iso2_code')); diff --git a/app/code/core/Mage/Directory/etc/system.xml b/app/code/core/Mage/Directory/etc/system.xml index af78725e35..ea046f1694 100644 --- a/app/code/core/Mage/Directory/etc/system.xml +++ b/app/code/core/Mage/Directory/etc/system.xml @@ -73,6 +73,7 @@ 1 1 1 + 1 @@ -186,6 +187,7 @@ 1 0 0 + 1 @@ -203,6 +205,7 @@ 1 0 0 + 1 diff --git a/app/code/core/Mage/Downloadable/Helper/Download.php b/app/code/core/Mage/Downloadable/Helper/Download.php index d8ae34ef47..06d663f6ba 100644 --- a/app/code/core/Mage/Downloadable/Helper/Download.php +++ b/app/code/core/Mage/Downloadable/Helper/Download.php @@ -199,8 +199,8 @@ public function getContentType() { $handle = $this->_getHandle(); if ($this->_linkType == self::LINK_TYPE_FILE) { - if (function_exists('mime_content_type')) { - return mime_content_type($this->_resourceFile); + if (function_exists('mime_content_type') && ($contentType = mime_content_type($this->_resourceFile))) { + return $contentType; } else { return Mage::helper('downloadable/file')->getFileType($this->_resourceFile); } diff --git a/app/code/core/Mage/Downloadable/Helper/File.php b/app/code/core/Mage/Downloadable/Helper/File.php index f826925f1c..340617f318 100644 --- a/app/code/core/Mage/Downloadable/Helper/File.php +++ b/app/code/core/Mage/Downloadable/Helper/File.php @@ -767,6 +767,7 @@ public function getAllMineTypes() 'xxyz' => 'chemical/x-xyz', 'xzaz' => 'application/vnd.zzazz.deck+xml', 'xzip' => 'application/zip', - 'xzmm' => 'application/vnd.handheld-entertainment+xml' + 'xzmm' => 'application/vnd.handheld-entertainment+xml', + 'xodt' => 'application/x-vnd.oasis.opendocument.spreadsheet' ); } diff --git a/app/code/core/Mage/Downloadable/Model/Product/Type.php b/app/code/core/Mage/Downloadable/Model/Product/Type.php index 486a534c42..4a32ac5f6a 100644 --- a/app/code/core/Mage/Downloadable/Model/Product/Type.php +++ b/app/code/core/Mage/Downloadable/Model/Product/Type.php @@ -355,10 +355,8 @@ public function beforeSave($product = null) if ($this->getLinkSelectionRequired($product)) { - $this->getProduct($product)->setTypeHasOptions(true); $this->getProduct($product)->setTypeHasRequiredOptions(true); } else { - $this->getProduct($product)->setTypeHasOptions(false); $this->getProduct($product)->setTypeHasRequiredOptions(false); } @@ -380,7 +378,7 @@ public function beforeSave($product = null) * set this flag "true" to force saving of 'required_options' attribute */ $this->getProduct($product)->setCanSaveCustomOptions(true); - + $this->getProduct($product)->setTypeHasOptions($linksExist); $this->getProduct($product)->setLinksExist($linksExist); } diff --git a/app/code/core/Mage/Eav/Model/Entity/Attribute/Source/Config.php b/app/code/core/Mage/Eav/Model/Entity/Attribute/Source/Config.php index 63546cd481..72dcbb65dd 100644 --- a/app/code/core/Mage/Eav/Model/Entity/Attribute/Source/Config.php +++ b/app/code/core/Mage/Eav/Model/Entity/Attribute/Source/Config.php @@ -47,6 +47,7 @@ public function getAllOptions() { if (is_null($this->_options)) { $this->_options = array(); + $rootNode = null; if ($this->_configNodePath) { $rootNode = Mage::getConfig()->getNode($this->_configNodePath); } @@ -60,7 +61,7 @@ public function getAllOptions() foreach ($options as $option) { $this->_options[] = array( 'value' => (string)$option->value, - 'label' => (string)$option->label + 'label' => Mage::helper('eav')->__((string)$option->label) ); } } diff --git a/app/code/core/Mage/Eav/Model/Entity/Setup.php b/app/code/core/Mage/Eav/Model/Entity/Setup.php index 5734c0f5a2..6fc3bc3d84 100644 --- a/app/code/core/Mage/Eav/Model/Entity/Setup.php +++ b/app/code/core/Mage/Eav/Model/Entity/Setup.php @@ -988,6 +988,7 @@ public function addAttributeToGroup($entityType, $setId, $groupId, $attributeId, ->where('attribute_group_id=?', $groupId); $sortOrder = $this->getConnection()->fetchOne($select); } + $sortOrder = is_numeric($sortOrder) ? $sortOrder : 1; $bind['sort_order'] = $sortOrder; $this->getConnection()->insert($this->getTable('eav/entity_attribute'), $bind); } diff --git a/app/code/core/Mage/Eway/Block/Form.php b/app/code/core/Mage/Eway/Block/Form.php deleted file mode 100644 index fc990f0840..0000000000 --- a/app/code/core/Mage/Eway/Block/Form.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ -class Mage_Eway_Block_Form extends Mage_Payment_Block_Form_Cc -{ - protected function _construct() - { - parent::_construct(); - $this->setTemplate('eway/form.phtml'); - } - -} diff --git a/app/code/core/Mage/Eway/Block/Info.php b/app/code/core/Mage/Eway/Block/Info.php deleted file mode 100644 index 70ac6e0f06..0000000000 --- a/app/code/core/Mage/Eway/Block/Info.php +++ /dev/null @@ -1,48 +0,0 @@ - - */ -class Mage_Eway_Block_Info extends Mage_Payment_Block_Info_Cc -{ - protected function _construct() - { - parent::_construct(); - $this->setTemplate('eway/info.phtml'); - } - - public function toPdf() - { - $this->setTemplate('eway/pdf/info.phtml'); - return $this->toHtml(); - } - -} diff --git a/app/code/core/Mage/Eway/Block/Secure/Form.php b/app/code/core/Mage/Eway/Block/Secure/Form.php deleted file mode 100644 index 97e1fa6247..0000000000 --- a/app/code/core/Mage/Eway/Block/Secure/Form.php +++ /dev/null @@ -1,41 +0,0 @@ - - */ -class Mage_Eway_Block_Secure_Form extends Mage_Payment_Block_Form -{ - protected function _construct() - { - $this->setTemplate('eway/secure/form.phtml'); - parent::_construct(); - } -} diff --git a/app/code/core/Mage/Eway/Block/Secure/Redirect.php b/app/code/core/Mage/Eway/Block/Secure/Redirect.php deleted file mode 100644 index d260871483..0000000000 --- a/app/code/core/Mage/Eway/Block/Secure/Redirect.php +++ /dev/null @@ -1,57 +0,0 @@ - - */ -class Mage_Eway_Block_Secure_Redirect extends Mage_Core_Block_Abstract -{ - protected function _toHtml() - { - $secure = $this->getOrder()->getPayment()->getMethodInstance(); - - $form = new Varien_Data_Form(); - $form->setAction($secure->getEwaySecureUrl()) - ->setId('eway_secure_checkout') - ->setName('eway_secure_checkout') - ->setMethod('POST') - ->setUseContainer(true); - foreach ($secure->getFormFields() as $field=>$value) { - $form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value)); - } - $html = ''; - $html.= $this->__('You will be redirected to eWAY 3D-Secure in a few seconds.'); - $html.= $form->toHtml(); - $html.= ''; - $html.= ''; - - return $html; - } -} diff --git a/app/code/core/Mage/Eway/Block/Shared/Failure.php b/app/code/core/Mage/Eway/Block/Shared/Failure.php deleted file mode 100644 index cee68baeca..0000000000 --- a/app/code/core/Mage/Eway/Block/Shared/Failure.php +++ /dev/null @@ -1,55 +0,0 @@ - - */ - -class Mage_Eway_Block_Shared_Failure extends Mage_Core_Block_Template -{ - /** - * Return Error message - * - * @return string - */ - public function getErrorMessage () - { - $msg = Mage::getSingleton('checkout/session')->getEwayErrorMessage(); - Mage::getSingleton('checkout/session')->unsEwayErrorMessage(); - return $msg; - } - - /** - * Get continue shopping url - */ - public function getContinueShoppingUrl() - { - return Mage::getUrl('checkout/cart'); - } -} diff --git a/app/code/core/Mage/Eway/Block/Shared/Form.php b/app/code/core/Mage/Eway/Block/Shared/Form.php deleted file mode 100644 index 2ca04700b2..0000000000 --- a/app/code/core/Mage/Eway/Block/Shared/Form.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ -class Mage_Eway_Block_Shared_Form extends Mage_Payment_Block_Form -{ - protected function _construct() - { - $this->setTemplate('eway/shared/form.phtml'); - parent::_construct(); - } -} diff --git a/app/code/core/Mage/Eway/Block/Shared/Redirect.php b/app/code/core/Mage/Eway/Block/Shared/Redirect.php deleted file mode 100644 index 87bfdff22b..0000000000 --- a/app/code/core/Mage/Eway/Block/Shared/Redirect.php +++ /dev/null @@ -1,58 +0,0 @@ - - */ -class Mage_Eway_Block_Shared_Redirect extends Mage_Core_Block_Abstract -{ - protected function _toHtml() - { - $shared = $this->getOrder()->getPayment()->getMethodInstance(); - - $form = new Varien_Data_Form(); - $form->setAction($shared->getEwaySharedUrl()) - ->setId('eway_shared_checkout') - ->setName('eway_shared_checkout') - ->setMethod('POST') - ->setUseContainer(true); - foreach ($shared->getFormFields() as $field=>$value) { - $form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value)); - } - - $html = ''; - $html.= $this->__('You will be redirected to eWAY in a few seconds.'); - $html.= $form->toHtml(); - $html.= ''; - $html.= ''; - - return $html; - } -} diff --git a/app/code/core/Mage/Eway/Controller/Abstract.php b/app/code/core/Mage/Eway/Controller/Abstract.php deleted file mode 100644 index 612d60a145..0000000000 --- a/app/code/core/Mage/Eway/Controller/Abstract.php +++ /dev/null @@ -1,178 +0,0 @@ - - */ -abstract class Mage_Eway_Controller_Abstract extends Mage_Core_Controller_Front_Action -{ - protected function _expireAjax() - { - if (!$this->getCheckout()->getQuote()->hasItems()) { - $this->getResponse()->setHeader('HTTP/1.1','403 Session Expired'); - exit; - } - } - - /** - * Redirect Block - * need to be redeclared - */ - protected $_redirectBlockType; - - /** - * Get singleton of Checkout Session Model - * - * @return Mage_Checkout_Model_Session - */ - public function getCheckout() - { - return Mage::getSingleton('checkout/session'); - } - - /** - * when customer select eWay payment method - */ - public function redirectAction() - { - $session = $this->getCheckout(); - $session->setEwayQuoteId($session->getQuoteId()); - $session->setEwayRealOrderId($session->getLastRealOrderId()); - - $order = Mage::getModel('sales/order'); - $order->loadByIncrementId($session->getLastRealOrderId()); - $order->addStatusToHistory($order->getStatus(), Mage::helper('eway')->__('Customer was redirected to eWAY.')); - $order->save(); - - $this->getResponse()->setBody( - $this->getLayout() - ->createBlock($this->_redirectBlockType) - ->setOrder($order) - ->toHtml() - ); - - $session->unsQuoteId(); - } - - /** - * eWay returns POST variables to this action - */ - public function successAction() - { - $status = $this->_checkReturnedPost(); - - $session = $this->getCheckout(); - - $session->unsEwayRealOrderId(); - $session->setQuoteId($session->getEwayQuoteId(true)); - $session->getQuote()->setIsActive(false)->save(); - - $order = Mage::getModel('sales/order'); - $order->load($this->getCheckout()->getLastOrderId()); - if($order->getId()) { - $order->sendNewOrderEmail(); - } - - if ($status) { - $this->_redirect('checkout/onepage/success'); - } else { - $this->_redirect('*/*/failure'); - } - } - - /** - * Display failure page if error - * - */ - public function failureAction() - { - if (!$this->getCheckout()->getEwayErrorMessage()) { - $this->norouteAction(); - return; - } - - $this->getCheckout()->clear(); - - $this->loadLayout(); - $this->renderLayout(); - } - - /** - * Checking POST variables. - * Creating invoice if payment was successfull or cancel order if payment was declined - */ - protected function _checkReturnedPost() - { - if (!$this->getRequest()->isPost()) { - $this->norouteAction(); - return; - } - $status = true; - $response = $this->getRequest()->getPost(); - - if ($this->getCheckout()->getEwayRealOrderId() != $response['ewayTrxnNumber'] || - $this->getCheckout()->getEwayRealOrderId() != Mage::helper('core')->decrypt($response['eWAYoption2'])) { - $this->norouteAction(); - return; - } - - $order = Mage::getModel('sales/order'); - $order->loadByIncrementId($response['ewayTrxnNumber']); - - $paymentInst = $order->getPayment()->getMethodInstance(); - $paymentInst->setResponse($response); - - if ($paymentInst->parseResponse()) { - - if ($order->canInvoice()) { - $invoice = $order->prepareInvoice(); - $invoice->register()->capture(); - Mage::getModel('core/resource_transaction') - ->addObject($invoice) - ->addObject($invoice->getOrder()) - ->save(); - - $paymentInst->setTransactionId($response['ewayTrxnReference']); - $order->addStatusToHistory($order->getStatus(), Mage::helper('eway')->__('Customer successfully returned from eWAY')); - } - } else { - $paymentInst->setTransactionId($response['ewayTrxnReference']); - $order->cancel(); - $order->addStatusToHistory($order->getStatus(), Mage::helper('eway')->__('Customer was rejected by eWAY')); - $status = false; - $this->getCheckout()->setEwayErrorMessage($response['eWAYresponseText']); - } - - $order->save(); - - return $status; - } - -} diff --git a/app/code/core/Mage/Eway/Helper/Data.php b/app/code/core/Mage/Eway/Helper/Data.php deleted file mode 100644 index a2b4284463..0000000000 --- a/app/code/core/Mage/Eway/Helper/Data.php +++ /dev/null @@ -1,37 +0,0 @@ - - */ -class Mage_Eway_Helper_Data extends Mage_Core_Helper_Abstract -{ - -} diff --git a/app/code/core/Mage/Eway/Model/Api/Debug.php b/app/code/core/Mage/Eway/Model/Api/Debug.php deleted file mode 100644 index 9ff7490362..0000000000 --- a/app/code/core/Mage/Eway/Model/Api/Debug.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -class Mage_Eway_Model_Api_Debug extends Mage_Core_Model_Abstract -{ - protected function _construct() - { - $this->_init('eway/api_debug'); - } -} diff --git a/app/code/core/Mage/Eway/Model/Direct.php b/app/code/core/Mage/Eway/Model/Direct.php deleted file mode 100644 index 23cf0e7c25..0000000000 --- a/app/code/core/Mage/Eway/Model/Direct.php +++ /dev/null @@ -1,296 +0,0 @@ - - */ -class Mage_Eway_Model_Direct extends Mage_Payment_Model_Method_Cc -{ - protected $_code = 'eway_direct'; - - protected $_isGateway = true; - protected $_canAuthorize = false; - protected $_canCapture = true; - protected $_canCapturePartial = false; - protected $_canRefund = false; - protected $_canVoid = false; - protected $_canUseInternal = true; - protected $_canUseCheckout = true; - protected $_canUseForMultishipping = true; - protected $_canSaveCc = true; - - protected $_formBlockType = 'eway/form'; - protected $_infoBlockType = 'eway/info'; - - /** - * Get debug flag - * - * @return string - */ - public function getDebug() - { - return Mage::getStoreConfig('payment/eway_direct/debug_flag'); - } - - /** - * Get flag to use CCV or not - * - * @return string - */ - public function getUseccv() - { - return Mage::getStoreConfig('payment/eway_direct/useccv'); - } - - /** - * Get api url of eWAY Direct payment - * - * @return string - */ - public function getApiGatewayUrl() - { - $value = Mage::getStoreConfig('payment/eway_direct/api_url'); - if (!$value || $value === false) { - return 'https://www.eway.com.au/gateway/xmlpayment.asp'; - } - return $value; - } - - /** - * Get Customer Id - * - * @return string - */ - public function getCustomerId() - { - return Mage::getStoreConfig('payment/eway_direct/customer_id'); - } - - /** - * Get currency that accepted by eWAY account - * - * @return string - */ - public function getAccepteCurrency() - { - return Mage::getStoreConfig('payment/' . $this->getCode() . '/currency'); - } - - public function validate() - { - parent::validate(); - $paymentInfo = $this->getInfoInstance(); - if ($paymentInfo instanceof Mage_Sales_Model_Order_Payment) { - $currency_code = $paymentInfo->getOrder()->getBaseCurrencyCode(); - } else { - $currency_code = $paymentInfo->getQuote()->getBaseCurrencyCode(); - } - if ($currency_code != $this->getAccepteCurrency()) { - Mage::throwException(Mage::helper('eway')->__('Selected currency code ('.$currency_code.') is not compatible with eWAY')); - } - return $this; - } - - public function capture(Varien_Object $payment, $amount) - { - $this->setAmount($amount) - ->setPayment($payment); - - $result = $this->callDoDirectPayment($payment)!==false; - - if ($result) { - $payment->setStatus(self::STATUS_APPROVED) - ->setLastTransId($this->getTransactionId()); - } else { - $e = $this->getError(); - if (isset($e['message'])) { - $message = Mage::helper('eway')->__('There has been an error processing your payment.') . $e['message']; - } else { - $message = Mage::helper('eway')->__('There has been an error processing your payment. Please try later or contact us for help.'); - } - Mage::throwException($message); - } - return $this; - } - - public function cancel(Varien_Object $payment) - { - $payment->setStatus(self::STATUS_DECLINED); - return $this; - } - - /** - * prepare params to send to gateway - * - * @return bool | array - */ - public function callDoDirectPayment() - { - $payment = $this->getPayment(); - $billing = $payment->getOrder()->getBillingAddress(); - - $invoiceDesc = ''; - $lengs = 0; - foreach ($payment->getOrder()->getAllItems() as $item) { - if ($item->getParentItem()) { - continue; - } - if (Mage::helper('core/string')->strlen($invoiceDesc.$item->getName()) > 10000) { - break; - } - $invoiceDesc .= $item->getName() . ', '; - } - $invoiceDesc = Mage::helper('core/string')->substr($invoiceDesc, 0, -2); - - $address = clone $billing; - $address->unsFirstname(); - $address->unsLastname(); - $address->unsPostcode(); - $formatedAddress = ''; - $tmpAddress = explode(' ', str_replace("\n", ' ', trim($address->format('text')))); - foreach ($tmpAddress as $part) { - if (strlen($part) > 0) $formatedAddress .= $part . ' '; - } -// $this->getQuote()->reserveOrderId(); - $xml = ""; - $xml .= "" . $this->getCustomerId() . ""; - $xml .= "" . ($this->getAmount()*100) . ""; - $xml .= "" . htmlentities(trim($payment->getCcOwner()), ENT_QUOTES, 'UTF-8') . ""; - $xml .= "" . $payment->getCcNumber() . ""; - $xml .= "" . $payment->getCcExpMonth() . ""; - $xml .= "" . $payment->getCcExpYear() . ""; - $xml .= "" . '' . ""; - $xml .= "" . htmlentities(trim($invoiceDesc), ENT_QUOTES, 'UTF-8') . ""; - $xml .= "" . htmlentities(trim($billing->getFirstname()), ENT_QUOTES, 'UTF-8') . ""; - $xml .= "" . htmlentities(trim($billing->getLastname()), ENT_QUOTES, 'UTF-8') . ""; - $xml .= "" . htmlentities(trim($payment->getOrder()->getCustomerEmail()), ENT_QUOTES, 'UTF-8') . ""; - $xml .= "" . htmlentities(trim($formatedAddress), ENT_QUOTES, 'UTF-8') . ""; - $xml .= "" . htmlentities(trim($billing->getPostcode()), ENT_QUOTES, 'UTF-8') . ""; -// $xml .= "" . $this->getQuote()->getReservedOrderId() . ""; - $xml .= "" . '' . ""; - - if ($this->getUseccv()) { - $xml .= "" . $payment->getCcCid() . ""; - } - - $xml .= "" . '' . ""; - $xml .= "" . '' . ""; - $xml .= "" . '' . ""; - - - if (Mage::getStoreConfig('payment/eway_direct/use_anti_fraud')) { - $xml .= "". Mage::helper('core/http')->getRemoteAddr() .""; - $xml .= "". $billing->getCountryId() .""; - } - - $xml .= ""; - - $resultArr = $this->call($xml); - - if ($resultArr === false) { - return false; - } - - $this->setTransactionId($resultArr['ewayTrxnNumber']); - - return $resultArr; - } - - /** - * Send params to gateway - * - * @param string $xml - * @return bool | array - */ - public function call($xml) - { - if ($this->getDebug()) { - $debug = Mage::getModel('eway/api_debug') - ->setRequestBody($xml) - ->save(); - } - - $http = new Varien_Http_Adapter_Curl(); - $config = array('timeout' => 30); - - $http->setConfig($config); - $http->write(Zend_Http_Client::POST, $this->getApiGatewayUrl(), '1.1', array(), $xml); - $response = $http->read(); - - $response = preg_split('/^\r?$/m', $response, 2); - $response = trim($response[1]); - - if ($this->getDebug()) { - $debug->setResponseBody($response)->save(); - } - - if ($http->getErrno()) { - $http->close(); - $this->setError(array( - 'message' => $http->getError() - )); - return false; - } - $http->close(); - - $parsedResArr = $this->parseXmlResponse($response); - - if ($parsedResArr['ewayTrxnStatus'] == 'True') { - $this->unsError(); - return $parsedResArr; - } - - if (isset($parsedResArr['ewayTrxnError'])) { - $this->setError(array( - 'message' => $parsedResArr['ewayTrxnError'] - )); - } - - return false; - } - - /** - * parse response of gateway - * - * @param string $xmlResponse - * @return array - */ - public function parseXmlResponse($xmlResponse) - { - $xmlObj = simplexml_load_string($xmlResponse); - $newResArr = array(); - foreach ($xmlObj as $key => $val) { - $newResArr[$key] = (string)$val; - } - - return $newResArr; - } - -} diff --git a/app/code/core/Mage/Eway/Model/Mysql4/Api/Debug.php b/app/code/core/Mage/Eway/Model/Mysql4/Api/Debug.php deleted file mode 100644 index 0b09086bba..0000000000 --- a/app/code/core/Mage/Eway/Model/Mysql4/Api/Debug.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -class Mage_Eway_Model_Mysql4_Api_Debug extends Mage_Core_Model_Mysql4_Abstract -{ - protected function _construct() - { - $this->_init('eway/api_debug', 'debug_id'); - } -} diff --git a/app/code/core/Mage/Eway/Model/Mysql4/Api/Debug/Collection.php b/app/code/core/Mage/Eway/Model/Mysql4/Api/Debug/Collection.php deleted file mode 100644 index a68ddebd1d..0000000000 --- a/app/code/core/Mage/Eway/Model/Mysql4/Api/Debug/Collection.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -class Mage_Eway_Model_Mysql4_Api_Debug_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract -{ - protected function _construct() - { - $this->_init('eway/api_debug'); - } -} diff --git a/app/code/core/Mage/Eway/Model/Mysql4/Setup.php b/app/code/core/Mage/Eway/Model/Mysql4/Setup.php deleted file mode 100644 index bb9fd49dc7..0000000000 --- a/app/code/core/Mage/Eway/Model/Mysql4/Setup.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ -class Mage_Eway_Model_Mysql4_Setup extends Mage_Sales_Model_Mysql4_Setup -{ - -} diff --git a/app/code/core/Mage/Eway/Model/Secure.php b/app/code/core/Mage/Eway/Model/Secure.php deleted file mode 100644 index cb61ef1246..0000000000 --- a/app/code/core/Mage/Eway/Model/Secure.php +++ /dev/null @@ -1,54 +0,0 @@ - - */ -class Mage_Eway_Model_Secure extends Mage_Eway_Model_Shared -{ - protected $_code = 'eway_secure'; - - protected $_formBlockType = 'eway/secure_form'; - protected $_paymentMethod = 'secure'; - - /** - * Get url of eWAY 3D-Secure Payment - * - * @return string - */ - public function getEwaySecureUrl() - { - if (!$url = Mage::getStoreConfig('payment/' . $this->getCode() . '/api_url')) { - $url = 'https://www.eway.com.au/gateway_3d/payment.asp'; - } - return $url; - } - -} diff --git a/app/code/core/Mage/Eway/Model/Shared.php b/app/code/core/Mage/Eway/Model/Shared.php deleted file mode 100644 index b436fdb86b..0000000000 --- a/app/code/core/Mage/Eway/Model/Shared.php +++ /dev/null @@ -1,252 +0,0 @@ - - */ -class Mage_Eway_Model_Shared extends Mage_Payment_Model_Method_Abstract -{ - protected $_code = 'eway_shared'; - - protected $_isGateway = false; - protected $_canAuthorize = false; - protected $_canCapture = true; - protected $_canCapturePartial = false; - protected $_canRefund = false; - protected $_canVoid = false; - protected $_canUseInternal = false; - protected $_canUseCheckout = true; - protected $_canUseForMultishipping = false; - - protected $_formBlockType = 'eway/shared_form'; - protected $_paymentMethod = 'shared'; - - protected $_order; - - /** - * Get order model - * - * @return Mage_Sales_Model_Order - */ - public function getOrder() - { - if (!$this->_order) { - $paymentInfo = $this->getInfoInstance(); - $this->_order = Mage::getModel('sales/order') - ->loadByIncrementId($paymentInfo->getOrder()->getRealOrderId()); - } - return $this->_order; - } - - /** - * Get Customer Id - * - * @return string - */ - public function getCustomerId() - { - return Mage::getStoreConfig('payment/' . $this->getCode() . '/customer_id'); - } - - /** - * Get currency that accepted by eWAY account - * - * @return string - */ - public function getAccepteCurrency() - { - return Mage::getStoreConfig('payment/' . $this->getCode() . '/currency'); - } - - public function validate() - { - parent::validate(); - $paymentInfo = $this->getInfoInstance(); - if ($paymentInfo instanceof Mage_Sales_Model_Order_Payment) { - $currency_code = $paymentInfo->getOrder()->getBaseCurrencyCode(); - } else { - $currency_code = $paymentInfo->getQuote()->getBaseCurrencyCode(); - } - if ($currency_code != $this->getAccepteCurrency()) { - Mage::throwException(Mage::helper('eway')->__('Selected currency code ('.$currency_code.') is not compatible with eWAY')); - } - return $this; - } - - public function getOrderPlaceRedirectUrl() - { - return Mage::getUrl('eway/' . $this->_paymentMethod . '/redirect'); - } - - /** - * prepare params array to send it to gateway page via POST - * - * @return array - */ - public function getFormFields() - { - $billing = $this->getOrder()->getBillingAddress(); - $fieldsArr = array(); - $invoiceDesc = ''; - $lengs = 0; - foreach ($this->getOrder()->getAllItems() as $item) { - if ($item->getParentItem()) { - continue; - } - if (Mage::helper('core/string')->strlen($invoiceDesc.$item->getName()) > 10000) { - break; - } - $invoiceDesc .= $item->getName() . ', '; - } - $invoiceDesc = Mage::helper('core/string')->substr($invoiceDesc, 0, -2); - - $address = clone $billing; - $address->unsFirstname(); - $address->unsLastname(); - $address->unsPostcode(); - $formatedAddress = ''; - $tmpAddress = explode(' ', str_replace("\n", ' ', trim($address->format('text')))); - foreach ($tmpAddress as $part) { - if (strlen($part) > 0) $formatedAddress .= $part . ' '; - } - $paymentInfo = $this->getInfoInstance(); - $fieldsArr['ewayCustomerID'] = $this->getCustomerId(); - $fieldsArr['ewayTotalAmount'] = ($this->getOrder()->getBaseGrandTotal()*100); - $fieldsArr['ewayCustomerFirstName'] = $billing->getFirstname(); - $fieldsArr['ewayCustomerLastName'] = $billing->getLastname(); - $fieldsArr['ewayCustomerEmail'] = $this->getOrder()->getCustomerEmail(); - $fieldsArr['ewayCustomerAddress'] = trim($formatedAddress); - $fieldsArr['ewayCustomerPostcode'] = $billing->getPostcode(); -// $fieldsArr['ewayCustomerInvoiceRef'] = ''; - $fieldsArr['ewayCustomerInvoiceDescription'] = $invoiceDesc; - $fieldsArr['eWAYSiteTitle '] = Mage::app()->getStore()->getFrontendName(); - $fieldsArr['eWAYAutoRedirect'] = 1; - $fieldsArr['ewayURL'] = Mage::getUrl('eway/' . $this->_paymentMethod . '/success', array('_secure' => true)); - $fieldsArr['eWAYTrxnNumber'] = $paymentInfo->getOrder()->getRealOrderId(); - $fieldsArr['ewayOption1'] = ''; - $fieldsArr['ewayOption2'] = Mage::helper('core')->encrypt($fieldsArr['eWAYTrxnNumber']); - $fieldsArr['ewayOption3'] = ''; - - $request = ''; - foreach ($fieldsArr as $k=>$v) { - $request .= '<' . $k . '>' . $v . ''; - } - - if ($this->getDebug()) { - $debug = Mage::getModel('eway/api_debug') - ->setRequestBody($request) - ->save(); - $fieldsArr['ewayOption1'] = $debug->getId(); - } - - return $fieldsArr; - } - - /** - * Get url of eWAY Shared Payment - * - * @return string - */ - public function getEwaySharedUrl() - { - if (!$url = Mage::getStoreConfig('payment/eway_shared/api_url')) { - $url = 'https://www.eway.com.au/gateway/payment.asp'; - } - return $url; - } - - /** - * Get debug flag - * - * @return string - */ - public function getDebug() - { - return Mage::getStoreConfig('payment/' . $this->getCode() . '/debug_flag'); - } - - public function capture(Varien_Object $payment, $amount) - { - $payment->setStatus(self::STATUS_APPROVED) - ->setLastTransId($this->getTransactionId()); - - return $this; - } - - public function cancel(Varien_Object $payment) - { - $payment->setStatus(self::STATUS_DECLINED) - ->setLastTransId($this->getTransactionId()); - - return $this; - } - - /** - * parse response POST array from gateway page and return payment status - * - * @return bool - */ - public function parseResponse() - { - $response = $this->getResponse(); - - if ($this->getDebug()) { - $debug = Mage::getModel('eway/api_debug') - ->load($response['eWAYoption1']) - ->setResponseBody(print_r($response, 1)) - ->save(); - } - - if ($response['ewayTrxnStatus'] == 'True') { - return true; - } - return false; - } - - /** - * Return redirect block type - * - * @return string - */ - public function getRedirectBlockType() - { - return $this->_redirectBlockType; - } - - /** - * Return payment method type string - * - * @return string - */ - public function getPaymentMethodType() - { - return $this->_paymentMethod; - } -} diff --git a/app/code/core/Mage/Eway/Model/Source/Cctype.php b/app/code/core/Mage/Eway/Model/Source/Cctype.php deleted file mode 100644 index fa7e9bb201..0000000000 --- a/app/code/core/Mage/Eway/Model/Source/Cctype.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -class Mage_Eway_Model_Source_Cctype extends Mage_Payment_Model_Source_Cctype -{ - public function getAllowedTypes() - { - return array('VI', 'MC', 'AE', 'DICL', 'JCB'); - } -} diff --git a/app/code/core/Mage/Eway/controllers/SharedController.php b/app/code/core/Mage/Eway/controllers/SharedController.php deleted file mode 100644 index 7b7fb08966..0000000000 --- a/app/code/core/Mage/Eway/controllers/SharedController.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ -class Mage_Eway_SharedController extends Mage_Eway_Controller_Abstract -{ - /** - * Redirect Block Type - * - * @var string - */ - protected $_redirectBlockType = 'eway/shared_redirect'; -} diff --git a/app/code/core/Mage/Eway/etc/config.xml b/app/code/core/Mage/Eway/etc/config.xml deleted file mode 100644 index db507f6eb3..0000000000 --- a/app/code/core/Mage/Eway/etc/config.xml +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - 0.1.0 - - - - - - Mage_Eway_Model - eway_mysql4 - - - Mage_Eway_Model_Mysql4 - - eway_api_debug
-
-
-
- - - - Mage_Eway - Mage_Eway_Model_Mysql4_Setup - - - - - Mage_Eway_Block - - - - - - JCB - JCB - 50 - - - DICL - Diners Club - 60 - - - - -
- - - /eway/shared - - - - standard - - Mage_Eway - eway - - - - - - - - Mage_Eway.csv - - - - - - - - eway.xml - - - - - - - - - - Mage_Eway.csv - - - - - - - - - - AUD - authorize_capture - eway/direct - eWAY Direct - processing - AE,VI,MC,DICL,JCB - 0 - 0 - - - - AUD - eway/shared - eWAY Shared - processing - 0 - - - - AUD - eway/secure - eWAY 3D-Secure - processing - 0 - - - -
diff --git a/app/code/core/Mage/Eway/etc/system.xml b/app/code/core/Mage/Eway/etc/system.xml deleted file mode 100644 index 0582ba05f1..0000000000 --- a/app/code/core/Mage/Eway/etc/system.xml +++ /dev/null @@ -1,354 +0,0 @@ - - - - - - - - - text - 201 - 1 - 1 - 1 - - - - select - adminhtml/system_config_source_yesno - 1 - 1 - 1 - 0 - - - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>2</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - - - - obscure - adminhtml/system_config_backend_encrypted - 3 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_currency - 4 - 1 - 1 - 0 - - - - Please set Beagle Anti-Fraud Gateway URL - select - adminhtml/system_config_source_yesno - 4 - 1 - 1 - 0 - - - - text - 5 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 6 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_order_status_processing - 7 - 1 - 1 - 0 - - - - multiselect - eway/source_cctype - 8 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 9 - 1 - 1 - 0 - - - - allowspecific - 10 - adminhtml/system_config_source_payment_allspecificcountries - 1 - 1 - 0 - - - - multiselect - 11 - adminhtml/system_config_source_country - 1 - 1 - 0 - - - - text - 12 - 1 - 1 - 0 - - - - - - text - 202 - 1 - 1 - 1 - - - - select - adminhtml/system_config_source_yesno - 1 - 1 - 1 - 0 - - - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>2</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - - - - obscure - adminhtml/system_config_backend_encrypted - 3 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_currency - 4 - 1 - 1 - 0 - - - - text - 5 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 6 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_order_status_processing - 7 - 1 - 1 - 0 - - - - allowspecific - 8 - adminhtml/system_config_source_payment_allspecificcountries - 1 - 1 - 0 - - - - multiselect - 9 - adminhtml/system_config_source_country - 1 - 1 - 0 - - - - text - 10 - 1 - 1 - 0 - - - - - - text - 203 - 1 - 1 - 1 - - - - select - adminhtml/system_config_source_yesno - 1 - 1 - 1 - 0 - - - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>2</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - - - - obscure - adminhtml/system_config_backend_encrypted - 3 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_currency - 4 - 1 - 1 - 0 - - - - text - 5 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 6 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_order_status_processing - 7 - 1 - 1 - 0 - - - - allowspecific - 8 - adminhtml/system_config_source_payment_allspecificcountries - 1 - 1 - 0 - - - - multiselect - 9 - adminhtml/system_config_source_country - 1 - 1 - 0 - - - - text - 10 - 1 - 1 - 0 - - - - - - - diff --git a/app/code/core/Mage/Eway/sql/eway_setup/mysql4-install-0.1.0.php b/app/code/core/Mage/Eway/sql/eway_setup/mysql4-install-0.1.0.php deleted file mode 100644 index 5ae7a86c74..0000000000 --- a/app/code/core/Mage/Eway/sql/eway_setup/mysql4-install-0.1.0.php +++ /dev/null @@ -1,46 +0,0 @@ -startSetup(); - -$installer->run(" - --- DROP TABLE IF EXISTS `{$this->getTable('eway/api_debug')}`; -CREATE TABLE `{$this->getTable('eway/api_debug')}` ( - `debug_id` int(10) unsigned NOT NULL auto_increment, - `debug_at` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `request_body` text, - `response_body` text, - PRIMARY KEY (`debug_id`), - KEY `debug_at` (`debug_at`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - - "); - -$installer->endSetup(); diff --git a/app/code/core/Mage/Flo2Cash/Block/Form.php b/app/code/core/Mage/Flo2Cash/Block/Form.php deleted file mode 100644 index 6aa0622e51..0000000000 --- a/app/code/core/Mage/Flo2Cash/Block/Form.php +++ /dev/null @@ -1,41 +0,0 @@ - - */ -class Mage_Flo2Cash_Block_Form extends Mage_Payment_Block_Form_Cc -{ - protected function _construct() - { - parent::_construct(); - $this->setTemplate('flo2cash/form.phtml'); - } -} diff --git a/app/code/core/Mage/Flo2Cash/Block/Info.php b/app/code/core/Mage/Flo2Cash/Block/Info.php deleted file mode 100644 index 4dc447ec33..0000000000 --- a/app/code/core/Mage/Flo2Cash/Block/Info.php +++ /dev/null @@ -1,48 +0,0 @@ - - */ -class Mage_Flo2Cash_Block_Info extends Mage_Payment_Block_Info_Cc -{ - protected function _construct() - { - parent::_construct(); - $this->setTemplate('flo2cash/info.phtml'); - } - - public function toPdf() - { - $this->setTemplate('flo2cash/pdf/info.phtml'); - return $this->toHtml(); - } - -} diff --git a/app/code/core/Mage/Flo2Cash/Helper/Data.php b/app/code/core/Mage/Flo2Cash/Helper/Data.php deleted file mode 100644 index 48a63f1c9f..0000000000 --- a/app/code/core/Mage/Flo2Cash/Helper/Data.php +++ /dev/null @@ -1,37 +0,0 @@ - - */ -class Mage_Flo2Cash_Helper_Data extends Mage_Core_Helper_Abstract -{ - -} diff --git a/app/code/core/Mage/Flo2Cash/Model/Api/Debug.php b/app/code/core/Mage/Flo2Cash/Model/Api/Debug.php deleted file mode 100644 index 1de21ac89b..0000000000 --- a/app/code/core/Mage/Flo2Cash/Model/Api/Debug.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -class Mage_Flo2Cash_Model_Api_Debug extends Mage_Core_Model_Abstract -{ - protected function _construct() - { - $this->_init('flo2cash/api_debug'); - } -} diff --git a/app/code/core/Mage/Flo2Cash/Model/Mysql4/Api/Debug.php b/app/code/core/Mage/Flo2Cash/Model/Mysql4/Api/Debug.php deleted file mode 100644 index 3c51a72154..0000000000 --- a/app/code/core/Mage/Flo2Cash/Model/Mysql4/Api/Debug.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -class Mage_Flo2Cash_Model_Mysql4_Api_Debug extends Mage_Core_Model_Mysql4_Abstract -{ - protected function _construct() - { - $this->_init('flo2cash/api_debug', 'debug_id'); - } -} diff --git a/app/code/core/Mage/Flo2Cash/Model/Mysql4/Api/Debug/Collection.php b/app/code/core/Mage/Flo2Cash/Model/Mysql4/Api/Debug/Collection.php deleted file mode 100644 index 04ee7b7c88..0000000000 --- a/app/code/core/Mage/Flo2Cash/Model/Mysql4/Api/Debug/Collection.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -class Mage_Flo2Cash_Model_Mysql4_Api_Debug_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract -{ - protected function _construct() - { - $this->_init('flo2cash/api_debug'); - } -} diff --git a/app/code/core/Mage/Flo2Cash/Model/Mysql4/Setup.php b/app/code/core/Mage/Flo2Cash/Model/Mysql4/Setup.php deleted file mode 100644 index 0ade30fadd..0000000000 --- a/app/code/core/Mage/Flo2Cash/Model/Mysql4/Setup.php +++ /dev/null @@ -1,37 +0,0 @@ - - */ -class Mage_Flo2Cash_Model_Mysql4_Setup extends Mage_Sales_Model_Mysql4_Setup -{ - -} diff --git a/app/code/core/Mage/Flo2Cash/Model/Source/Cctype.php b/app/code/core/Mage/Flo2Cash/Model/Source/Cctype.php deleted file mode 100644 index d0d2124598..0000000000 --- a/app/code/core/Mage/Flo2Cash/Model/Source/Cctype.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -class Mage_Flo2Cash_Model_Source_Cctype extends Mage_Payment_Model_Source_Cctype -{ - public function getAllowedTypes() - { - return array('VI', 'MC', 'AE', 'DICL'); - } -} diff --git a/app/code/core/Mage/Flo2Cash/Model/Source/PaymentAction.php b/app/code/core/Mage/Flo2Cash/Model/Source/PaymentAction.php deleted file mode 100644 index 27d4e087ec..0000000000 --- a/app/code/core/Mage/Flo2Cash/Model/Source/PaymentAction.php +++ /dev/null @@ -1,49 +0,0 @@ - - */ -class Mage_Flo2Cash_Model_Source_PaymentAction -{ - public function toOptionArray() - { - return array( - array( - 'value' => Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE, - 'label' => Mage::helper('flo2cash')->__('Authorize') - ), - array( - 'value' => Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE, - 'label' => Mage::helper('flo2cash')->__('Purchase') - ), - ); - } -} diff --git a/app/code/core/Mage/Flo2Cash/Model/Web.php b/app/code/core/Mage/Flo2Cash/Model/Web.php deleted file mode 100644 index 45698a0258..0000000000 --- a/app/code/core/Mage/Flo2Cash/Model/Web.php +++ /dev/null @@ -1,298 +0,0 @@ - - */ -class Mage_Flo2Cash_Model_Web extends Mage_Payment_Model_Method_Cc -{ - const WSDL_URL_DEMO = 'http://demo.flo2cash.co.nz/ws/paynzws.asmx?wsdl'; - const WSDL_URL_LIVE = 'https://secure.flo2cash.co.nz/ws/paynzws.asmx?wsdl'; - - protected $_code = 'flo2cash_web'; - - protected $_allowCurrencyCode = array('NZD'); - - /** - * Availability options - */ - protected $_isGateway = true; - protected $_canAuthorize = true; - protected $_canCapture = true; - protected $_canCapturePartial = true; - protected $_canRefund = true; - protected $_canVoid = false; - protected $_canUseInternal = true; - protected $_canUseCheckout = true; - protected $_canUseForMultishipping = true; - protected $_canSaveCc = false; - - protected $_ccTypesConvert = array( - 'VI' => 'VISA', - 'MC' => 'MC', - 'DICL' => 'DINERS', - 'AE' => 'AMEX' - ); - - const TRANSACTION_TYPE_PURCHASE = 1; - const TRANSACTION_TYPE_REFUND = 2; - const TRANSACTION_TYPE_AUTHORISE = 3; - const TRANSACTION_TYPE_CAPTURE = 4; - - const TRANSACTION_STATUS_ACCEPTED = 1; - const TRANSACTION_STATUS_DECLINED = 2; - - protected $_formBlockType = 'flo2cash/form'; - protected $_infoBlockType = 'flo2cash/info'; - - /** - * Get Account Id for selected payment action - * - * @return string - */ - public function getAccountId() - { - if ($this->getConfigData('payment_action') == self::ACTION_AUTHORIZE_CAPTURE) { - $acountId = $this->getConfigData('payzn_purchase_account_id'); - } else { - $acountId = $this->getConfigData('payzn_account_id'); - } - return $acountId; - } - - /** - * validate the currency code is avaialable to use for Flo2Cash Basic or not - * - * @return bool - */ - public function validate() - { - parent::validate(); - $paymentInfo = $this->getInfoInstance(); - if ($paymentInfo instanceof Mage_Sales_Model_Order_Payment) { - $currency_code = $paymentInfo->getOrder()->getBaseCurrencyCode(); - } else { - $currency_code = $paymentInfo->getQuote()->getBaseCurrencyCode(); - } - if (!in_array($currency_code, $this->_allowCurrencyCode)) { - Mage::throwException(Mage::helper('flo2cash')->__('Selected currency code (%s) is not compatible with Flo2Cash', $currency_code)); - } - return $this; - } - - public function authorize(Varien_Object $payment, $amount) - { - $txnDetails = $this->_prepareTxnDetails($payment, $amount); - - $response = $this->_sendRequest($txnDetails); - - if ($response['txn_status'] == self::TRANSACTION_STATUS_DECLINED) { - Mage::throwException(Mage::helper('flo2cash')->__('Payment transaction has been declined.')); - } - - $payment->setStatus(self::STATUS_APPROVED); - $payment->setCcTransId($response['transaction_id']); - $payment->setFlo2cashAccountId($response['paynz_account_id']); - - return $this; - } - - public function capture(Varien_Object $payment, $amount) - { - $txnDetails = $this->_prepareTxnDetails($payment, $amount); - - $response = $this->_sendRequest($txnDetails); - - if ($response['txn_status'] == self::TRANSACTION_STATUS_DECLINED) { - Mage::throwException(Mage::helper('flo2cash')->__('Payment transaction has been declined.')); - } - - $payment->setStatus(self::STATUS_APPROVED); - $payment->setLastTransId($response['transaction_id']); - $payment->setFlo2cashAccountId($response['paynz_account_id']); - - return $this; - } - - public function void(Varien_Object $payment) - { - $payment->setStatus(self::STATUS_SUCCESS ); - return $this; - } - - public function refund(Varien_Object $payment, $amount) - { - if ($payment->getRefundTransactionId() && $amount>0) { - - $transId = $payment->getCcTransId(); - //if transaction type was purchase (authorize & capture) - if (is_null($transId)) { - $transId = $payment->getLastTransId(); - } - - $txnDetails = array( - 'txn_type' => self::TRANSACTION_TYPE_REFUND, - 'refund_transaction_id' => $transId, - 'paynz_account_id' => $payment->getFlo2cashAccountId(), - 'amount' => sprintf('%.2f', $amount) - ); - } else { - Mage::throwException(Mage::helper('flo2cash')->__('Error in refunding the payment.')); - } - - $response = $this->_sendRequest($txnDetails); - - if ($response['txn_status'] == self::TRANSACTION_STATUS_DECLINED) { - Mage::throwException(Mage::helper('flo2cash')->__('Payment transaction has been declined.')); - } - - $payment->setLastTransId($response['transaction_id']); - - return $this; - } - - /** - * Sending SOAP request to gateway - * - * @param array $txnDetails - * @return void - */ - protected function _sendRequest($txnDetails) - { - if ($this->getConfigData('demo_mode')) { - $url = self::WSDL_URL_DEMO; - } else { - $url = self::WSDL_URL_LIVE; - } - - $client = new SoapClient($url); - - $parameters = array( - 'username' => $this->getConfigData('username'), - 'password' => $this->getConfigData('password'), - 'txn_details' => $txnDetails - ); - - try { - $response = $client->ProcessPayment($parameters); - - if ($this->getConfigData('debug_flag')) { - $debug = Mage::getModel('flo2cash/api_debug') - ->setRequestBody(print_r($parameters, true)) - ->setResponseBody(print_r($response, true)) - ->save(); - } - return (array)$response->ProcessPaymentResult; - } catch (SoapFault $e) { - if ($this->getConfigData('debug_flag')) { - $debug = Mage::getModel('flo2cash/api_debug') - ->setRequestBody(print_r($parameters, true)) - ->setException($e->getMessage()) - ->save(); - } - - if (strpos($e->getMessage(), ' ---> ') !== FALSE) { - list($title, $error) = explode(' ---> ', $e->getMessage()); - } else { - $error = $e->getMessage(); - } - - Mage::throwException(Mage::helper('flo2cash')->__('Gateway returned an error message: %s', $error)); - } - } - - /** - * Preapare basic paramters for transaction - * - * @param Varien_Object $payment - * @param decimal $amount - * @return array - */ - protected function _prepareTxnDetails(Varien_Object $payment, $amount) - { - if ($payment->getCcTransId()) { - $txnDetails = array( - 'txn_type' => self::TRANSACTION_TYPE_CAPTURE, - 'capture_transaction_id' => $payment->getCcTransId() - ); - } else { - $billingAddress = $payment->getOrder()->getBillingAddress(); - - if ($payment->getOrder()->getCustomerEmail()) { - $customerEmail = $payment->getOrder()->getCustomerEmail(); - } elseif ($billingAddress->getEmail()) { - $customerEmail = $billingAddress->getEmail(); - } else { - $customerEmail = ''; - } - - $txnDetails = array( - 'card_holder_name' => $payment->getCcOwner(), - 'card_number' => $payment->getCcNumber(), - 'card_type' => $this->_convertCcType($payment->getCcType()), - 'card_expiry' => sprintf('%02d', $payment->getCcExpMonth()).substr($payment->getCcExpYear(), 2, 2), - 'card_csc' => $payment->getCcCid(), - 'customer_email' => $customerEmail - ); - - if ($this->getConfigData('payment_action') == self::ACTION_AUTHORIZE) { - $txnDetails['txn_type'] = self::TRANSACTION_TYPE_AUTHORISE; - } else { - $txnDetails['txn_type'] = self::TRANSACTION_TYPE_PURCHASE; - } - } - - $accountId = $payment->getFlo2cashAccountId(); - //if transaction type is authorize & capture or only authorize - if (is_null($accountId)) { - $accountId = $this->getAccountId(); - } - - $txnDetails = array_merge($txnDetails, array( - //'txn_reference' => $payment->getOrder()->getIncrementId(), - 'merchant_reference' => $payment->getOrder()->getIncrementId(), - 'paynz_account_id' => $accountId, - 'amount' => sprintf('%.2f', $amount), - )); - - return $txnDetails; - } - - /** - * Converst CC Types Code from Magento to Flo2Cash - * - * @param string $magentoCcType - * @return string - */ - protected function _convertCcType($magentoCcType = 'VI') - { - return $this->_ccTypesConvert[$magentoCcType]; - } -} diff --git a/app/code/core/Mage/Flo2Cash/etc/config.xml b/app/code/core/Mage/Flo2Cash/etc/config.xml deleted file mode 100644 index 9d15f1c54c..0000000000 --- a/app/code/core/Mage/Flo2Cash/etc/config.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - 0.1.1 - - - - - - Mage_Flo2Cash_Model - flo2cash_mysql4 - - - Mage_Flo2Cash_Model_Mysql4 - - flo2cash_api_debug
-
-
-
- - - - Mage_Flo2Cash - Mage_Flo2Cash_Model_Mysql4_Setup - - - - - Mage_Flo2Cash_Block - - - Mage_Flo2Cash_Helper - - - - - - DICL - Diners Club - 60 - - - - -
- - - - standard - - Mage_Flo2Cash - flo2cash - - - - - - - - Mage_Flo2Cash.csv - - - - - - - - flo2cash.xml - - - - - - - - - - Mage_Flo2Cash.csv - - - - - - - - - Flo2Cash Web Service - AE,VI,MC,DICL - 0 - flo2cash/web - - - -
diff --git a/app/code/core/Mage/Flo2Cash/etc/system.xml b/app/code/core/Mage/Flo2Cash/etc/system.xml deleted file mode 100644 index 3522a3ca5e..0000000000 --- a/app/code/core/Mage/Flo2Cash/etc/system.xml +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - - text - 501 - 1 - 1 - 1 - - - - select - adminhtml/system_config_source_yesno - 0 - 1 - 1 - 0 - - - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - - - - text - 20 - 1 - 1 - 0 - - - - text - 30 - 1 - 1 - 0 - - - - For Authorize or Capture Transactions only - text - 31 - 1 - 1 - 0 - - - - For Purchase Transactions only - text - 32 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 33 - 1 - 1 - 0 - - - - select - flo2cash/source_paymentAction - 40 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_order_status_processing - 50 - 1 - 1 - 0 - - - - multiselect - flo2cash/source_cctype - 60 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 70 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 75 - 1 - 1 - 0 - - - - allowspecific - 80 - adminhtml/system_config_source_payment_allspecificcountries - 1 - 1 - 0 - - - - multiselect - 90 - adminhtml/system_config_source_country - 1 - 1 - 0 - - - - text - 100 - 1 - 1 - 0 - - - - - - - diff --git a/app/code/core/Mage/Flo2Cash/sql/flo2cash_setup/mysql4-install-0.1.0.php b/app/code/core/Mage/Flo2Cash/sql/flo2cash_setup/mysql4-install-0.1.0.php deleted file mode 100644 index c364ce918e..0000000000 --- a/app/code/core/Mage/Flo2Cash/sql/flo2cash_setup/mysql4-install-0.1.0.php +++ /dev/null @@ -1,47 +0,0 @@ -startSetup(); - -$installer->run(" - -DROP TABLE IF EXISTS `{$this->getTable('flo2cash/api_debug')}`; -CREATE TABLE `{$this->getTable('flo2cash/api_debug')}` ( - `debug_id` int(10) unsigned NOT NULL auto_increment, - `debug_at` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `request_body` text, - `response_body` text, - `exception` text, - PRIMARY KEY (`debug_id`), - KEY `debug_at` (`debug_at`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - - "); - -$installer->endSetup(); diff --git a/app/code/core/Mage/GiftMessage/Helper/Message.php b/app/code/core/Mage/GiftMessage/Helper/Message.php index 09cc65758a..e24afadb67 100644 --- a/app/code/core/Mage/GiftMessage/Helper/Message.php +++ b/app/code/core/Mage/GiftMessage/Helper/Message.php @@ -126,12 +126,12 @@ public function isMessagesAvailable($type, Varien_Object $entity, $store=null) } if ($type=='item') { - return $resultItems && $this->_getDependenceFromStoreConfig( + return !$entity->getProduct()->isVirtual() && $resultItems && $this->_getDependenceFromStoreConfig( $entity->getProduct()->getGiftMessageAvailable(), $store ); } elseif ($type=='order_item') { - return $resultItems && $this->_getDependenceFromStoreConfig( + return !$entity->getIsVirtual() && $resultItems && $this->_getDependenceFromStoreConfig( (is_null($entity->getGiftMessageAvailable()) ? 2 : $entity->getGiftMessageAvailable()), $store ); @@ -148,7 +148,7 @@ public function isMessagesAvailable($type, Varien_Object $entity, $store=null) ->getGiftMessageAvailable() ); } - return $this->_getDependenceFromStoreConfig( + return !$entity->getProduct()->isVirtual() && $this->_getDependenceFromStoreConfig( $this->getCached('address_item_' . $entity->getProductId()), $store ); diff --git a/app/code/core/Mage/GoogleAnalytics/Block/Ga.php b/app/code/core/Mage/GoogleAnalytics/Block/Ga.php index 8da91fda9b..b4dba8dd52 100644 --- a/app/code/core/Mage/GoogleAnalytics/Block/Ga.php +++ b/app/code/core/Mage/GoogleAnalytics/Block/Ga.php @@ -93,7 +93,7 @@ public function getOrderHtml() $html = ''; @@ -171,14 +171,14 @@ protected function _toHtml() - diff --git a/app/code/core/Mage/GoogleBase/Model/Service.php b/app/code/core/Mage/GoogleBase/Model/Service.php index 522d84fda9..8a8976cb3b 100644 --- a/app/code/core/Mage/GoogleBase/Model/Service.php +++ b/app/code/core/Mage/GoogleBase/Model/Service.php @@ -33,6 +33,13 @@ */ class Mage_GoogleBase_Model_Service extends Varien_Object { + /** + * Client instance identifier in registry + * + * @var string + */ + protected $_clientRegistryId = 'GBASE_HTTP_CLIENT'; + /** * Retutn Google Base Client Instance * @@ -47,11 +54,14 @@ public function getClient($storeId = null, $loginToken = null, $loginCaptcha = n // Create an authenticated HTTP client $errorMsg = Mage::helper('googlebase')->__('Unable to connect to Google Base. Please, check Account settings in configuration.'); try { - $client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, Zend_Gdata_Gbase::AUTH_SERVICE_NAME, null, '', - $loginToken, $loginCaptcha, - Zend_Gdata_ClientLogin::CLIENTLOGIN_URI, - $type - ); + if (! Mage::registry($this->_clientRegistryId)) { + $client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, Zend_Gdata_Gbase::AUTH_SERVICE_NAME, null, '', + $loginToken, $loginCaptcha, + Zend_Gdata_ClientLogin::CLIENTLOGIN_URI, + $type + ); + Mage::register($this->_clientRegistryId, $client); + } } catch (Zend_Gdata_App_CaptchaRequiredException $e) { throw $e; } catch (Zend_Gdata_App_HttpException $e) { @@ -60,7 +70,7 @@ public function getClient($storeId = null, $loginToken = null, $loginCaptcha = n Mage::throwException($errorMsg . Mage::helper('googlebase')->__('Error: %s', $e->getMessage())); } - return $client; + return Mage::registry($this->_clientRegistryId); } /** diff --git a/app/code/core/Mage/GoogleBase/Model/Service/Item.php b/app/code/core/Mage/GoogleBase/Model/Service/Item.php index 7e1917f3a9..55ac08b5a2 100644 --- a/app/code/core/Mage/GoogleBase/Model/Service/Item.php +++ b/app/code/core/Mage/GoogleBase/Model/Service/Item.php @@ -280,7 +280,15 @@ protected function _setUniversalData() $entry->setContent($content); } - $this->_setAttributePrice(false, $object->getPrice()); + $attributeValues = $this->getAttributeValues(); + + if (isset($attributeValues['price']['value']) && floatval($attributeValues['price']['value']) > 0) { + $price = $attributeValues['price']['value']; + } else { + $price = $object->getPrice(); + } + + $this->_setAttributePrice(false, $price); if ($object->getQuantity()) { $quantity = $object->getQuantity() ? max(1, (int)$object->getQuantity()) : 1; diff --git a/app/code/core/Mage/GoogleBase/controllers/ItemsController.php b/app/code/core/Mage/GoogleBase/controllers/ItemsController.php index ab4e55a543..6c1601db00 100644 --- a/app/code/core/Mage/GoogleBase/controllers/ItemsController.php +++ b/app/code/core/Mage/GoogleBase/controllers/ItemsController.php @@ -45,6 +45,10 @@ protected function _initAction() public function indexAction() { + $this->_title($this->__('Catalog')) + ->_title($this->__('Google base')) + ->_title($this->__('Manage Items')); + if (0 === (int)$this->getRequest()->getParam('store')) { $this->_redirect('*/*/', array('store' => Mage::app()->getAnyStoreView()->getId(), '_current' => true)); return; @@ -91,29 +95,34 @@ public function gridAction() public function massAddAction() { $storeId = $this->_getStore()->getId(); - $productIds = $this->getRequest()->getParam('product'); + $productIds = $this->getRequest()->getParam('product', null); $totalAdded = 0; try { - foreach ($productIds as $productId) { - $product = Mage::getSingleton('catalog/product') - ->setStoreId($storeId) - ->load($productId); - - if ($product->getId()) { - Mage::getModel('googlebase/item') - ->setProduct($product) - ->insertItem() - ->save(); - - $totalAdded++; + if (is_array($productIds)) { + foreach ($productIds as $productId) { + $product = Mage::getSingleton('catalog/product') + ->setStoreId($storeId) + ->load($productId); + + if ($product->getId()) { + Mage::getModel('googlebase/item') + ->setProduct($product) + ->insertItem() + ->save(); + + $totalAdded++; + } } } + if ($totalAdded > 0) { $this->_getSession()->addSuccess( $this->__('Total of %d product(s) were successfully added to Google Base', $totalAdded) ); + } elseif (is_null($productIds)) { + $this->_getSession()->addError($this->__('Session expired during export. Please, revise exported products and repeat a process if necessary')); } else { $this->_getSession()->addError($this->__('No products were added to Google Base')); } diff --git a/app/code/core/Mage/GoogleBase/controllers/TypesController.php b/app/code/core/Mage/GoogleBase/controllers/TypesController.php index f280ce5625..56914a104a 100644 --- a/app/code/core/Mage/GoogleBase/controllers/TypesController.php +++ b/app/code/core/Mage/GoogleBase/controllers/TypesController.php @@ -48,6 +48,10 @@ public function postDispatch() protected function _initItemType() { + $this->_title($this->__('Catalog')) + ->_title($this->__('Google base')) + ->_title($this->__('Manage Attributes')); + Mage::register('current_item_type', Mage::getModel('googlebase/type')); $typeId = $this->getRequest()->getParam('id'); if (!is_null($typeId)) { @@ -66,6 +70,10 @@ protected function _initAction() public function indexAction() { + $this->_title($this->__('Catalog')) + ->_title($this->__('Google base')) + ->_title($this->__('Manage Attributes')); + $this->_initAction() ->_addBreadcrumb(Mage::helper('googlebase')->__('Item Types'), Mage::helper('googlebase')->__('Item Types')) ->_addContent($this->getLayout()->createBlock('googlebase/adminhtml_types')) @@ -86,6 +94,9 @@ public function newAction() { try { $this->_initItemType(); + + $this->_title($this->__('New ItemType')); + $this->_initAction() ->_addBreadcrumb(Mage::helper('googlebase')->__('New Item Type'), Mage::helper('adminhtml')->__('New Item Type')) ->_addContent($this->getLayout()->createBlock('googlebase/adminhtml_types_edit')) @@ -98,6 +109,10 @@ public function newAction() public function editAction() { + $this->_title($this->__('Catalog')) + ->_title($this->__('Google base')) + ->_title($this->__('Manage Attributes')); + $id = $this->getRequest()->getParam('id'); $model = Mage::getModel('googlebase/type'); @@ -113,6 +128,8 @@ public function editAction() } } + $this->_title($this->__('Edit Item Type')); + Mage::register('current_item_type', $model); Mage::register('attributes', $result); diff --git a/app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Callback.php b/app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Callback.php index 44d78bff20..43b36aaa1f 100644 --- a/app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Callback.php +++ b/app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Callback.php @@ -67,7 +67,7 @@ public function process() try { $this->$method(); } catch (Exception $e) { - $this->getGResponse()->log->logError($e->getMessage()); + $this->getGResponse()->log->logError($e->__toString()); } $response = ob_get_flush(); @@ -115,7 +115,10 @@ protected function _responseMerchantCalculationCallback() $merchantCalculations = new GoogleMerchantCalculations($this->getCurrency()); $quoteId = $this->getData('root/shopping-cart/merchant-private-data/quote-id/VALUE'); - $quote = Mage::getModel('sales/quote')->load($quoteId); + $storeId = $this->getData('root/shopping-cart/merchant-private-data/store-id/VALUE'); + $quote = Mage::getModel('sales/quote') + ->setStoreId($storeId) + ->load($quoteId); $billingAddress = $quote->getBillingAddress(); $address = $quote->getShippingAddress(); @@ -161,7 +164,10 @@ protected function _responseMerchantCalculationCallback() ->setPostcode($googleAddress['postal-code']['VALUE']) ->setLimitCarrier($limitCarrier); - $address->setCollectShippingRates(true)->collectShippingRates(); + $address->setCollectShippingRates(true) + ->collectShippingRates() + ->collectTotals(); + $billingAddress->collectTotals(); if ($gRequestMethods = $this->getData('root/calculate/shipping/method')) { $carriers = array(); @@ -231,9 +237,6 @@ protected function _responseMerchantCalculationCallback() if ($this->getData('root/calculate/tax/VALUE')=='true') { $address->setShippingMethod($rateCodes[$methodName]); - $address->setCollectShippingRates(true)->collectTotals(); - $billingAddress->setCollectShippingRates(true)->collectTotals(); - $taxAmount = $address->getBaseTaxAmount(); $taxAmount += $billingAddress->getBaseTaxAmount(); @@ -278,7 +281,11 @@ protected function _responseNewOrderNotification() // IMPORT GOOGLE ORDER DATA INTO QUOTE $quoteId = $this->getData('root/shopping-cart/merchant-private-data/quote-id/VALUE'); - $quote = Mage::getModel('sales/quote')->load($quoteId)->setIsActive(true); + $storeId = $this->getData('root/shopping-cart/merchant-private-data/store-id/VALUE'); + $quote = Mage::getModel('sales/quote') + ->setStoreId($storeId) + ->load($quoteId) + ->setIsActive(true); // // $quoteItems = $quote->getItemsCollection(); // foreach ($this->getData('root/shopping-cart/items') as $item) { @@ -295,8 +302,7 @@ protected function _responseNewOrderNotification() $shipping = $this->_importGoogleAddress($this->getData('root/buyer-shipping-address')); $quote->setShippingAddress($shipping); - - $quote->collectTotals(); + $quote->getPayment()->importData(array('method'=>'googlecheckout')); $this->_importGoogleTotals($quote->getShippingAddress()); @@ -333,7 +339,11 @@ protected function _responseNewOrderNotification() #$order->setPayment($convertQuote->paymentToOrderPayment($quote->getPayment())); foreach ($quote->getAllItems() as $item) { - $order->addItem($convertQuote->itemToOrderItem($item)); + $orderItem = $convertQuote->itemToOrderItem($item); + if ($item->getParentItem()) { + $orderItem->setParentItem($order->getItemByQuoteItemId($item->getParentItem()->getId())); + } + $order->addItem($orderItem); } $payment = Mage::getModel('sales/order_payment')->setMethod('googlecheckout'); @@ -367,11 +377,11 @@ protected function _responseNewOrderNotification() $order->sendNewOrderEmail(); - Mage::getSingleton('checkout/session') - ->setLastQuoteId($quote->getId()) - ->setLastOrderId($order->getId()) - ->setLastSuccessQuoteId($quote->getId()) - ->setLastRealOrderId($order->getIncrementId()); +// Mage::getSingleton('checkout/session') +// ->setLastQuoteId($quote->getId()) +// ->setLastOrderId($order->getId()) +// ->setLastSuccessQuoteId($quote->getId()) +// ->setLastRealOrderId($order->getIncrementId()); $quote->setIsActive(false)->save(); @@ -379,8 +389,8 @@ protected function _responseNewOrderNotification() Mage::getModel('newsletter/subscriber')->subscribe($order->getCustomerEmail()); } - $shoppingCartQuoteId = Mage::getSingleton('checkout/session')->getQuoteId(); - $tmpQuote = Mage::getModel('sales/quote')->load($shoppingCartQuoteId); +// $shoppingCartQuoteId = Mage::getSingleton('checkout/session')->getQuoteId(); +// $tmpQuote = Mage::getModel('sales/quote')->load($shoppingCartQuoteId); /* if (!$tmpQuote->getIsChanged()) { $tmpQuote->delete(); diff --git a/app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Checkout.php b/app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Checkout.php index ab26467266..4ac2dbe141 100644 --- a/app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Checkout.php +++ b/app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Checkout.php @@ -157,6 +157,7 @@ protected function _getMerchantPrivateDataXml() $xml = << getQuote()->getId()}]]> + getQuote()->getStoreId()}]]> EOT; return $xml; @@ -266,7 +267,7 @@ protected function _getCarrierCalculatedShippingXml() $addressCategory = Mage::getStoreConfig('google/checkout_shipping_carrier/address_category', $this->getQuote()->getStoreId()); - $defPrice = Mage::helper('tax')->getShippingPrice($defPrice, false, false); + $defPrice = (float) Mage::helper('tax')->getShippingPrice($defPrice, false, false); // $taxRate = $this->_getShippingTaxRate(); // {$taxRate} @@ -330,7 +331,7 @@ protected function _getFlatRateShippingXml() $title = Mage::getStoreConfig('google/checkout_shipping_flatrate/title_'.$i, $this->getQuote()->getStoreId()); $price = Mage::getStoreConfig('google/checkout_shipping_flatrate/price_'.$i, $this->getQuote()->getStoreId()); $price = number_format($price, 2, '.',''); - $price = Mage::helper('tax')->getShippingPrice($price, false, false); + $price = (float) Mage::helper('tax')->getShippingPrice($price, false, false); if (empty($title) || $price <= 0) { continue; @@ -403,7 +404,7 @@ protected function _getMerchantCalculatedShippingXml() $method .= ' - '.$allowedMethods[$methodCode]; } - $defaultPrice = $methods['price'][$i]; + $defaultPrice = (float) $methods['price'][$i]; $defaultPrice = Mage::helper('tax')->getShippingPrice($defaultPrice, false, false); $allowedAreasXml = $this->_getAllowedCountries($carrier->getConfigData('sallowspecific'), $carrier->getConfigData('specificcountry')); @@ -433,7 +434,7 @@ protected function _getPickupXml() $title = Mage::getStoreConfig('google/checkout_shipping_pickup/title', $this->getQuote()->getStoreId()); $price = Mage::getStoreConfig('google/checkout_shipping_pickup/price', $this->getQuote()->getStoreId()); - $price = Mage::helper('tax')->getShippingPrice($price, false, false); + $price = (float) Mage::helper('tax')->getShippingPrice($price, false, false); $xml = << diff --git a/app/code/core/Mage/GoogleCheckout/controllers/RedirectController.php b/app/code/core/Mage/GoogleCheckout/controllers/RedirectController.php index 58ef7c8a98..65bbdf0098 100644 --- a/app/code/core/Mage/GoogleCheckout/controllers/RedirectController.php +++ b/app/code/core/Mage/GoogleCheckout/controllers/RedirectController.php @@ -134,8 +134,8 @@ public function continueAction() if ($quoteId = $session->getGoogleCheckoutQuoteId()) { $quote = Mage::getModel('sales/quote')->load($quoteId) ->setIsActive(false)->save(); - $session->clear(); } + $session->clear(); if (Mage::getStoreConfigFlag('google/checkout/hide_cart_contents')) { $session->setGoogleCheckoutQuoteId(null); diff --git a/app/code/core/Mage/GoogleCheckout/etc/system.xml b/app/code/core/Mage/GoogleCheckout/etc/system.xml index 9d95a4e23b..6b83320c0b 100644 --- a/app/code/core/Mage/GoogleCheckout/etc/system.xml +++ b/app/code/core/Mage/GoogleCheckout/etc/system.xml @@ -213,6 +213,7 @@ 1 1 0 + 1 @@ -337,6 +338,7 @@ 1 1 0 + 1 @@ -346,6 +348,7 @@ 1 1 0 + 1 @@ -375,6 +378,7 @@ 1 1 0 + 1 @@ -384,6 +388,7 @@ 1 1 0 + 1 @@ -412,6 +417,7 @@ 1 1 0 + 1 @@ -421,6 +427,7 @@ 1 1 0 + 1 diff --git a/app/code/core/Mage/GoogleOptimizer/Block/Adminhtml/Catalog/Product/Edit/Tab/Googleoptimizer.php b/app/code/core/Mage/GoogleOptimizer/Block/Adminhtml/Catalog/Product/Edit/Tab/Googleoptimizer.php index fea2c34c33..55eea09923 100644 --- a/app/code/core/Mage/GoogleOptimizer/Block/Adminhtml/Catalog/Product/Edit/Tab/Googleoptimizer.php +++ b/app/code/core/Mage/GoogleOptimizer/Block/Adminhtml/Catalog/Product/Edit/Tab/Googleoptimizer.php @@ -31,7 +31,7 @@ * @package Mage_GoogleOptimizer * @author Magento Core Team */ -class Mage_Googleoptimizer_Block_Adminhtml_Catalog_Product_Edit_Tab_Googleoptimizer +class Mage_GoogleOptimizer_Block_Adminhtml_Catalog_Product_Edit_Tab_Googleoptimizer extends Mage_Adminhtml_Block_Catalog_Form implements Mage_Adminhtml_Block_Widget_Tab_Interface { diff --git a/app/code/core/Mage/GoogleOptimizer/Block/Adminhtml/Cms/Page/Edit/Enable.php b/app/code/core/Mage/GoogleOptimizer/Block/Adminhtml/Cms/Page/Edit/Enable.php index 338dc8eed5..b7ffa5561a 100644 --- a/app/code/core/Mage/GoogleOptimizer/Block/Adminhtml/Cms/Page/Edit/Enable.php +++ b/app/code/core/Mage/GoogleOptimizer/Block/Adminhtml/Cms/Page/Edit/Enable.php @@ -31,7 +31,7 @@ * @package Mage_GoogleOptimizer * @author Magento Core Team */ -class Mage_Googleoptimizer_Block_Adminhtml_Cms_Page_Edit_Enable extends Mage_Adminhtml_Block_Template +class Mage_GoogleOptimizer_Block_Adminhtml_Cms_Page_Edit_Enable extends Mage_Adminhtml_Block_Template { /** * Utility method to call method of specified block @@ -41,7 +41,7 @@ class Mage_Googleoptimizer_Block_Adminhtml_Cms_Page_Edit_Enable extends Mage_Adm * @param string $name * @param string $method * @param array $params - * @return Mage_Googleoptimizer_Block_Adminhtml_Cms_Page_Edit_Enable + * @return Mage_GoogleOptimizer_Block_Adminhtml_Cms_Page_Edit_Enable */ public function ifGoogleOptimizerEnabled($name, $method, $params = array()) { @@ -63,7 +63,7 @@ public function ifGoogleOptimizerEnabled($name, $method, $params = array()) * @param string $name * @param string $type * @param string $attributes - * @return Mage_Googleoptimizer_Block_Adminhtml_Cms_Page_Edit_Enable + * @return Mage_GoogleOptimizer_Block_Adminhtml_Cms_Page_Edit_Enable */ public function ifGoogleOptimizerEnabledAppend($container, $name, $type, $attributes = array()) { diff --git a/app/code/core/Mage/GoogleOptimizer/Block/Adminhtml/Cms/Page/Edit/Tab/Googleoptimizer.php b/app/code/core/Mage/GoogleOptimizer/Block/Adminhtml/Cms/Page/Edit/Tab/Googleoptimizer.php index f994085d59..697d7a9b14 100644 --- a/app/code/core/Mage/GoogleOptimizer/Block/Adminhtml/Cms/Page/Edit/Tab/Googleoptimizer.php +++ b/app/code/core/Mage/GoogleOptimizer/Block/Adminhtml/Cms/Page/Edit/Tab/Googleoptimizer.php @@ -31,7 +31,7 @@ * @package Mage_GoogleOptimizer * @author Magento Core Team */ -class Mage_Googleoptimizer_Block_Adminhtml_Cms_Page_Edit_Tab_Googleoptimizer +class Mage_GoogleOptimizer_Block_Adminhtml_Cms_Page_Edit_Tab_Googleoptimizer extends Mage_Adminhtml_Block_Widget_Form implements Mage_Adminhtml_Block_Widget_Tab_Interface { @@ -162,7 +162,7 @@ protected function _prepareForm() if ($this->getGoogleOptimizer() && $this->getGoogleOptimizer()->getData()) { $values = $this->getGoogleOptimizer()->getData(); $fieldset->addField('code_id', 'hidden', array('name' => 'code_id')); - if ($this->getGoogleOptimizer()->getData('page_type') == Mage_Googleoptimizer_Model_Code_Page::PAGE_TYPE_VARIANT) { + if ($this->getGoogleOptimizer()->getData('page_type') == Mage_GoogleOptimizer_Model_Code_Page::PAGE_TYPE_VARIANT) { foreach ($fieldset->getElements() as $element) { if (($element->getId() != 'tracking_script' && $element->getId() != 'page_type') && ($element->getType() == 'textarea' || $element->getType() == 'select')) diff --git a/app/code/core/Mage/GoogleOptimizer/Model/Code.php b/app/code/core/Mage/GoogleOptimizer/Model/Code.php index 57c1535414..9232d0014c 100644 --- a/app/code/core/Mage/GoogleOptimizer/Model/Code.php +++ b/app/code/core/Mage/GoogleOptimizer/Model/Code.php @@ -80,7 +80,7 @@ public function getEntityType() * Loading scripts and assigning scripts on entity * * @param Varien_Object $entity - * @return Mage_Googleoptimizer_Model_Code + * @return Mage_GoogleOptimizer_Model_Code */ public function loadScripts($storeId) { @@ -129,7 +129,7 @@ protected function _validate() * Save scripts assigned on entity * * @param Varien_Object $entity - * @return Mage_Googleoptimizer_Model_Code + * @return Mage_GoogleOptimizer_Model_Code */ public function saveScripts($storeId) { @@ -170,7 +170,7 @@ public function saveScripts($storeId) * Removing scripts assigned to entity * * @param integer $storeId - * @return Mage_Googleoptimizer_Model_Code + * @return Mage_GoogleOptimizer_Model_Code */ public function deleteScripts($storeId) { diff --git a/app/code/core/Mage/GoogleOptimizer/Model/Code/Category.php b/app/code/core/Mage/GoogleOptimizer/Model/Code/Category.php index 01852bc9b7..bbfac6b0a1 100644 --- a/app/code/core/Mage/GoogleOptimizer/Model/Code/Category.php +++ b/app/code/core/Mage/GoogleOptimizer/Model/Code/Category.php @@ -29,19 +29,19 @@ * Google Optimizer Category model * * @category Mage - * @package Mage_Googleoptimizer + * @package Mage_GoogleOptimizer * @author Magento Core Team */ class Mage_GoogleOptimizer_Model_Code_Category extends Mage_GoogleOptimizer_Model_Code { - + protected $_entityType = 'category'; /** * Removing scripts assigned to entity * * @param integer $storeId - * @return Mage_Googleoptimizer_Model_Code + * @return Mage_GoogleOptimizer_Model_Code */ public function deleteScripts($storeId) { diff --git a/app/code/core/Mage/GoogleOptimizer/Model/Observer.php b/app/code/core/Mage/GoogleOptimizer/Model/Observer.php index f59c294f00..d47e915706 100644 --- a/app/code/core/Mage/GoogleOptimizer/Model/Observer.php +++ b/app/code/core/Mage/GoogleOptimizer/Model/Observer.php @@ -37,7 +37,7 @@ class Mage_GoogleOptimizer_Model_Observer * Loading product scripts after load product * * @param Varien_Object $observer - * @return Mage_Googleoptimizer_Model_Observer + * @return Mage_GoogleOptimizer_Model_Observer */ public function appendToProductGoogleOptimizerScripts($observer) { @@ -70,7 +70,7 @@ public function prepareGoogleOptimizerScripts($observer) * Prepare product scripts for saving * * @param Varien_Object $observer - * @return Mage_Googleoptimizer_Model_Observer + * @return Mage_GoogleOptimizer_Model_Observer */ public function prepareProductGoogleOptimizerScripts($observer) { @@ -87,7 +87,7 @@ public function prepareProductGoogleOptimizerScripts($observer) * Save product scripts after saving product * * @param Varien_Object $observer - * @return Mage_Googleoptimizer_Model_Observer + * @return Mage_GoogleOptimizer_Model_Observer */ public function saveProductGoogleOptimizerScripts($observer) { @@ -106,7 +106,7 @@ public function saveProductGoogleOptimizerScripts($observer) * Delete Produt scripts after deleting product * * @param Varien_Object $observer - * @return Mage_Googleoptimizer_Model_Observer + * @return Mage_GoogleOptimizer_Model_Observer */ public function deleteProductGoogleOptimizerScripts($observer) { @@ -121,7 +121,7 @@ public function deleteProductGoogleOptimizerScripts($observer) * Loading page scripts after load page * * @param Varien_Object $observer - * @return Mage_Googleoptimizer_Model_Observer + * @return Mage_GoogleOptimizer_Model_Observer */ public function appendToPageGoogleOptimizerScripts($observer) { @@ -131,7 +131,7 @@ public function appendToPageGoogleOptimizerScripts($observer) if (Mage::app()->getStore()->getId() && !Mage::helper('googleoptimizer')->isOptimizerActive()) { return $this; } - + $cmsPage = $observer->getEvent()->getObject(); $googleOptimizerModel = Mage::getModel('googleoptimizer/code_page') ->setEntity($cmsPage) @@ -147,7 +147,7 @@ public function appendToPageGoogleOptimizerScripts($observer) * Prepare page scripts for saving * * @param Varien_Object $observer - * @return Mage_Googleoptimizer_Model_Observer + * @return Mage_GoogleOptimizer_Model_Observer */ public function preparePageGoogleOptimizerScripts($observer) { @@ -164,7 +164,7 @@ public function preparePageGoogleOptimizerScripts($observer) * Save page scripts after saving page * * @param Varien_Object $observer - * @return Mage_Googleoptimizer_Model_Observer + * @return Mage_GoogleOptimizer_Model_Observer */ public function savePageGoogleOptimizerScripts($observer) { @@ -183,7 +183,7 @@ public function savePageGoogleOptimizerScripts($observer) * Delete page scripts after deleting page * * @param Varien_Object $observer - * @return Mage_Googleoptimizer_Model_Observer + * @return Mage_GoogleOptimizer_Model_Observer */ public function deletePageGoogleOptimizerScripts($observer) { @@ -207,7 +207,7 @@ public function assignHandlers($observer) * Loading category scripts after load category * * @param Varien_Object $observer - * @return Mage_Googleoptimizer_Model_Observer + * @return Mage_GoogleOptimizer_Model_Observer */ public function appendToCategoryGoogleOptimizerScripts($observer) { @@ -230,7 +230,7 @@ public function appendToCategoryGoogleOptimizerScripts($observer) * Prepare category scripts for saving * * @param Varien_Object $observer - * @return Mage_Googleoptimizer_Model_Observer + * @return Mage_GoogleOptimizer_Model_Observer */ public function prepareCategoryGoogleOptimizerScripts($observer) { @@ -247,7 +247,7 @@ public function prepareCategoryGoogleOptimizerScripts($observer) * Save category scripts after saving category * * @param Varien_Object $observer - * @return Mage_Googleoptimizer_Model_Observer + * @return Mage_GoogleOptimizer_Model_Observer */ public function saveCategoryGoogleOptimizerScripts($observer) { @@ -270,7 +270,7 @@ public function saveCategoryGoogleOptimizerScripts($observer) * Delete category scripts after deleting category * * @param Varien_Object $observer - * @return Mage_Googleoptimizer_Model_Observer + * @return Mage_GoogleOptimizer_Model_Observer */ public function deleteCategoryGoogleOptimizerScripts($observer) { diff --git a/app/code/core/Mage/Ideal/Block/Advanced/Failure.php b/app/code/core/Mage/Ideal/Block/Advanced/Failure.php deleted file mode 100644 index a6e1701f6a..0000000000 --- a/app/code/core/Mage/Ideal/Block/Advanced/Failure.php +++ /dev/null @@ -1,55 +0,0 @@ - - */ - -class Mage_Ideal_Block_Advanced_Failure extends Mage_Core_Block_Template -{ - /** - * Returns error from session and clears it - * - * @return string - */ - public function getErrorMessage () - { - $error = Mage::getSingleton('checkout/session')->getIdealErrorMessage(); - Mage::getSingleton('checkout/session')->unsIdealErrorMessage(); - return $error; - } - - /** - * Get continue shopping url - */ - public function getContinueShoppingUrl() - { - return Mage::getUrl('checkout/cart'); - } -} diff --git a/app/code/core/Mage/Ideal/Block/Advanced/Form.php b/app/code/core/Mage/Ideal/Block/Advanced/Form.php deleted file mode 100755 index 79bcada000..0000000000 --- a/app/code/core/Mage/Ideal/Block/Advanced/Form.php +++ /dev/null @@ -1,52 +0,0 @@ - - */ - -class Mage_Ideal_Block_Advanced_Form extends Mage_Payment_Block_Form -{ - protected function _construct() - { - $this->setTemplate('ideal/advanced/form.phtml'); - parent::_construct(); - } - - /** - * Return array that contains issuer list - * - * @return array - */ - public function getIssuerList() - { - return $this->getMethod()->getIssuerList(); - } -} diff --git a/app/code/core/Mage/Ideal/Block/Advanced/Info.php b/app/code/core/Mage/Ideal/Block/Advanced/Info.php deleted file mode 100644 index 12f026cd95..0000000000 --- a/app/code/core/Mage/Ideal/Block/Advanced/Info.php +++ /dev/null @@ -1,63 +0,0 @@ - - */ -class Mage_Ideal_Block_Advanced_Info extends Mage_Payment_Block_Info -{ - protected function _construct() - { - parent::_construct(); - $this->setTemplate('ideal/advanced/info.phtml'); - } - - public function toPdf() - { - $this->setTemplate('ideal/advanced/pdf/info.phtml'); - return $this->toHtml(); - } - - /** - * Gets Issuer Title from Payment Attribute - * - * @return string - */ - public function getIssuerTitle() - { - if ($this->getInfo() instanceof Mage_Sales_Model_Quote_Payment) { - $issuerList = unserialize($this->getInfo()->getIdealIssuerList()); - return $issuerList[$this->getInfo()->getIdealIssuerId()]; - } else { - return $this->getInfo()->getIdealIssuerTitle(); - } - } - -} diff --git a/app/code/core/Mage/Ideal/Block/Advanced/Redirect.php b/app/code/core/Mage/Ideal/Block/Advanced/Redirect.php deleted file mode 100755 index f8b0180092..0000000000 --- a/app/code/core/Mage/Ideal/Block/Advanced/Redirect.php +++ /dev/null @@ -1,45 +0,0 @@ - - */ - -class Mage_Ideal_Block_Advanced_Redirect extends Mage_Core_Block_Abstract -{ - protected function _toHtml() - { - $html = ''; - $html.= $this->getMessage(); - $html.= ''; - $html.= ''; - return $html; - } -} diff --git a/app/code/core/Mage/Ideal/Block/Basic/Failure.php b/app/code/core/Mage/Ideal/Block/Basic/Failure.php deleted file mode 100644 index 11b3383591..0000000000 --- a/app/code/core/Mage/Ideal/Block/Basic/Failure.php +++ /dev/null @@ -1,55 +0,0 @@ - - */ - -class Mage_Ideal_Block_Basic_Failure extends Mage_Core_Block_Template -{ - /** - * Returns error from session and clears it - * - * @return string - */ - public function getErrorMessage () - { - $error = Mage::getSingleton('checkout/session')->getIdealErrorMessage(); - Mage::getSingleton('checkout/session')->unsIdealErrorMessage(); - return $error; - } - - /** - * Get continue shopping url - */ - public function getContinueShoppingUrl() - { - return Mage::getUrl('checkout/cart'); - } -} diff --git a/app/code/core/Mage/Ideal/Block/Basic/Form.php b/app/code/core/Mage/Ideal/Block/Basic/Form.php deleted file mode 100755 index 143228266e..0000000000 --- a/app/code/core/Mage/Ideal/Block/Basic/Form.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ - -class Mage_Ideal_Block_Basic_Form extends Mage_Payment_Block_Form -{ - protected function _construct() - { - $this->setTemplate('ideal/basic/form.phtml'); - parent::_construct(); - } -} diff --git a/app/code/core/Mage/Ideal/Block/Basic/Redirect.php b/app/code/core/Mage/Ideal/Block/Basic/Redirect.php deleted file mode 100755 index 710a7ee39d..0000000000 --- a/app/code/core/Mage/Ideal/Block/Basic/Redirect.php +++ /dev/null @@ -1,59 +0,0 @@ - - */ - -class Mage_Ideal_Block_Basic_Redirect extends Mage_Core_Block_Abstract -{ - protected function _toHtml() - { - $basic = $this->getOrder()->getPayment()->getMethodInstance(); - - $form = new Varien_Data_Form(); - $form->setAction($basic->getApiUrl()) - ->setId('ideal_basic_checkout') - ->setName('ideal_basic_checkout') - ->setMethod('POST') - ->setUseContainer(true); - - foreach ($basic->getBasicCheckoutFormFields() as $field=>$value) { - $form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value)); - } - - $html = ''; - $html.= $this->__('You will be redirected to iDEAL in a few seconds.'); - $html.= $form->toHtml(); - $html.= ''; - $html.= ''; - return $html; - } -} diff --git a/app/code/core/Mage/Ideal/Helper/Data.php b/app/code/core/Mage/Ideal/Helper/Data.php deleted file mode 100755 index ab97a146f4..0000000000 --- a/app/code/core/Mage/Ideal/Helper/Data.php +++ /dev/null @@ -1,46 +0,0 @@ - - */ - -class Mage_Ideal_Helper_Data extends Mage_Core_Helper_Abstract -{ - public function encrypt($token) - { - return bin2hex(base64_decode(Mage::helper('core')->encrypt($token))); - } - - public function decrypt($token) - { - return Mage::helper('core')->decrypt(base64_encode(pack('H*', $token))); - } -} diff --git a/app/code/core/Mage/Ideal/Model/Advanced.php b/app/code/core/Mage/Ideal/Model/Advanced.php deleted file mode 100755 index 755d4196ee..0000000000 --- a/app/code/core/Mage/Ideal/Model/Advanced.php +++ /dev/null @@ -1,227 +0,0 @@ - - */ - -class Mage_Ideal_Model_Advanced extends Mage_Payment_Model_Method_Abstract -{ - protected $_code = 'ideal_advanced'; - protected $_formBlockType = 'ideal/advanced_form'; - protected $_infoBlockType = 'ideal/advanced_info'; - protected $_allowCurrencyCode = array('EUR', 'GBP', 'USD', 'CAD', 'SHR', 'NOK', 'SEK', 'DKK'); - - protected $_isGateway = false; - protected $_canAuthorize = false; - protected $_canCapture = true; - protected $_canCapturePartial = false; - protected $_canRefund = false; - protected $_canVoid = false; - protected $_canUseInternal = false; - protected $_canUseCheckout = true; - protected $_canUseForMultishipping = false; - - protected $_issuersList = null; - - public function canUseCheckout() - { - if ($this->getIssuerList() && parent::canUseCheckout()) { - return true; - } else { - return false; - } - } - - public function getOrderPlaceRedirectUrl() - { - return Mage::getUrl('ideal/advanced/redirect', array('_secure' => true)); - } - - /** - * Get iDEAL API Model - * - * @return Mage_Ideal_Api_Advanced - */ - public function getApi() - { - return Mage::getSingleton('ideal/api_advanced'); - } - - public function getIssuerList($saveAttrbute = false) - { - if ($this->_issuersList == null) { - $request = new Mage_Ideal_Model_Api_Advanced_DirectoryRequest(); - $response = $this->getApi()->processRequest($request, $this->getDebug()); - if ($response) { - $this->_issuersList = $response->getIssuerList(); - return $this->_issuersList; - } else { - $this->_issuersList = null; - $this->setError($this->getApi()->getError()); - return false; - } - } else { - $this->getInfoInstance() - ->setIdealIssuerList(serialize($this->_issuersList)) - ->save(); - return $this->_issuersList; - } - } - - /** - * validate the currency code is avaialable to use for iDEAL Advanced or not - * - * @return bool - */ - public function validate() - { - parent::validate(); - $paymentInfo = $this->getInfoInstance(); - if ($paymentInfo instanceof Mage_Sales_Model_Order_Payment) { - $currency_code = $paymentInfo->getOrder()->getBaseCurrencyCode(); - } else { - $currency_code = $paymentInfo->getQuote()->getBaseCurrencyCode(); - } - - if (!in_array($currency_code,$this->_allowCurrencyCode)) { - Mage::throwException(Mage::helper('ideal')->__('Selected currency code (%s) is not compatible with iDEAL', $currency_code)); - } - - return $this; - } - - /** - * Preapre and send transaction request - * - * @param Mage_Sales_Model_Order $order - * @param string $issuerId - * @return Mage_Ideal_Model_Api_Advanced_AcquirerTrxResponse - */ - public function sendTransactionRequest(Mage_Sales_Model_Order $order, $issuerId) - { - $request = new Mage_Ideal_Model_Api_Advanced_AcquirerTrxRequest(); - $request->setIssuerId($issuerId); - $request->setPurchaseId($order->getIncrementId()); - $request->setEntranceCode(Mage::helper('ideal')->encrypt($order->getIncrementId())); - //we need to be sure that we sending number without decimal part - $request->setAmount(floor($order->getBaseGrandTotal()*100)); - $response = $this->getApi()->processRequest($request, $this->getDebug()); - return $response; - } - - /** - * Prepare and send transaction status request - * - * @param string $transactionId - * @return Mage_Ideal_Model_Api_Advanced_AcquirerStatusResponse - */ - public function getTransactionStatus($transactionId) - { - $request = new Mage_Ideal_Model_Api_Advanced_AcquirerStatusRequest(); - $request->setTransactionId($transactionId); - $response = $this->getApi()->processRequest($request, $this->getDebug()); - return $response; - } - - public function capture(Varien_Object $payment, $amount) - { - $payment->setStatus(self::STATUS_APPROVED) - ->setLastTransId($this->getTransactionId()); - - return $this; - } - - public function cancel(Varien_Object $payment) - { - $payment->setStatus(self::STATUS_DECLINED); - - return $this; - } - - /** - * Executes by cron and check transactions status - * for every iDEAL order that was created in last hour - */ - public function transactionStatusCheck($shedule = null) - { - $gmtStamp = Mage::getModel('core/date')->gmtTimestamp(); - $to = $this->getConfigData('cron_start') > 0?$this->getConfigData('cron_start'):1; - $to = date('Y-m-d H:i:s', $gmtStamp - $to * 3600); - - $from = $this->getConfigData('cron_end') > 0?$this->getConfigData('cron_end'):1; - $from = date('Y-m-d H:i:s', $gmtStamp - $from * 86400); - - $paymentCollection = Mage::getModel('sales/order_payment')->getCollection() - ->addAttributeToFilter('last_trans_id', array('neq' => '')) - ->addAttributeToFilter('method', $this->_code) - ->addAttributeToFilter('created_at', array('from' => $from, 'to' => $to, 'datetime' => true)) - ->addAttributeToFilter('ideal_transaction_checked', array('neq' => '1')); - - $order = Mage::getModel('sales/order'); - foreach($paymentCollection->getItems() as $item) { - $order->reset(); - $order->load($item->getParentId()); - $response = $this->getTransactionStatus($item->getLastTransId()); - - if ($response->getTransactionStatus() == Mage_Ideal_Model_Api_Advanced::STATUS_SUCCESS) { - if ($order->canInvoice()) { - $invoice = $order->prepareInvoice(); - $invoice->register()->capture(); - Mage::getModel('core/resource_transaction') - ->addObject($invoice) - ->addObject($invoice->getOrder()) - ->save(); - - $order->addStatusToHistory($order->getStatus(), Mage::helper('ideal')->__('Transaction Status Update: finished successfully')); - } - } else if ($response->getTransactionStatus() == Mage_Ideal_Model_Api_Advanced::STATUS_CANCELLED) { - $order->cancel(); - $order->addStatusToHistory($order->getStatus(), Mage::helper('ideal')->__('Transaction Status Update: cancelled by customer')); - } else { - $order->cancel(); - $order->addStatusToHistory($order->getStatus(), Mage::helper('ideal')->__('Transaction Status Update: rejected by iDEAL')); - } - - $order->getPayment()->setIdealTransactionChecked(1); - $order->save(); - } - } - - /** - * Get debug flag - * - * @return boolean - */ - public function getDebug() - { - return $this->getConfigData('debug_flag'); - } -} diff --git a/app/code/core/Mage/Ideal/Model/Api/Advanced.php b/app/code/core/Mage/Ideal/Model/Api/Advanced.php deleted file mode 100755 index 5e0deb0a40..0000000000 --- a/app/code/core/Mage/Ideal/Model/Api/Advanced.php +++ /dev/null @@ -1,507 +0,0 @@ - - */ - -class Mage_Ideal_Model_Api_Advanced extends Varien_Object -{ - /** - * Transaction status returned in Status Request - */ - const STATUS_OPEN = 'Open'; - const STATUS_EXPIRED = 'Expired'; - const STATUS_SUCCESS = 'Success'; - const STATUS_CANCELLED = 'Cancelled'; - const STATUS_FAILED = 'Failed'; - - /** - * @var Mage_Ideal_Model_Api_Advanced_Security - */ - protected $_security; - - /** - * array with configuration values - * - * @var array() - */ - protected $_conf; - - /** - * @var Varien_Http_Adapter_Curl - */ - protected $_http; - - public function __construct() - { - $this->_http = new Varien_Http_Adapter_Curl(); - $this->_security = new Mage_Ideal_Model_Api_Advanced_Security(); - - if ($this->getConfigData('test_flag') == 1) { - $acquirerUrl = 'https://idealtest.secure-ing.com/ideal/iDeal'; - } else { - $acquirerUrl = 'https://ideal.secure-ing.com/ideal/iDeal'; - } - - if (!($description = $this->getConfigData('description'))) { - $description = Mage::app()->getStore()->getFrontendName() . ' payment'; - } - - $this->_conf = array( - 'PRIVATEKEY' => $this->getConfigData('private_key'), - 'PRIVATEKEYPASS' => $this->getConfigData('private_keypass'), - 'PRIVATECERT' => $this->getConfigData('private_cert'), - 'AUTHENTICATIONTYPE' => 'SHA1_RSA', - 'CERTIFICATE0' => $this->getConfigData('certificate'), - 'ACQUIRERURL' => $acquirerUrl, - 'ACQUIRERTIMEOUT' => '10', - 'MERCHANTID' => $this->getConfigData('merchant_id'), - 'SUBID' => '0', - 'MERCHANTRETURNURL' => Mage::getUrl('ideal/advanced/result', array('_secure' => true)), - 'CURRENCY' => 'EUR', - 'EXPIRATIONPERIOD' => 'PT10M', - 'LANGUAGE' => 'nl', - 'DESCRIPTION' => $description, - 'ENTRANCECODE' => '' - ); - - if ((int)$this->getConfigData('expire_period') >= 1 && $this->getConfigData('expire_period') < 60) { - $this->_conf['EXPIRATIONPERIOD'] = 'PT' . $this->getConfigData('expire_period') . 'M'; - } else if ($this->getConfigData('description') == 60) { - $this->_conf['EXPIRATIONPERIOD'] = 'PT1H'; - } - } - - /** - * Getting config parametrs - * - * @param string $key - * @param mixed $default - * @return mixed - */ - public function getConfigData($key, $default=false) - { - if (!$this->hasData($key)) { - $value = Mage::getStoreConfig('payment/ideal_advanced/'.$key); - if (is_null($value) || false===$value) { - $value = $default; - } - $this->setData($key, $value); - } - return $this->getData($key); - } - - /** - * this method processes a request regardless of the type. - */ - - public function processRequest($requestType, $debug = false) - { - if($requestType instanceof Mage_Ideal_Model_Api_Advanced_DirectoryRequest) { - $response = $this->processDirRequest($requestType); - } else if($requestType instanceof Mage_Ideal_Model_Api_Advanced_AcquirerStatusRequest) { - $response = $this->processStatusRequest($requestType); - } else if($requestType instanceof Mage_Ideal_Model_Api_Advanced_AcquirerTrxRequest) { - $response = $this->processTrxRequest($requestType); - } - - if ($debug) { - - if ($response === false) { - $responseData = $this->getError(); - } else { - $responseData = $response->getData(); - } - - Mage::getModel('ideal/api_debug') - ->setResponseBody(get_class($requestType) . "\n" . print_r($responseData, true)) - ->setRequestBody(get_class($requestType) . "\n" . print_r($requestType->getData(), true)) - ->save(); - } - - return $response; - } - - /** - * This method sends HTTP XML DirectoryRequest to the Acquirer system. - * Befor calling, all mandatory properties have to be set in the Request object - * by calling the associated setter methods. - * If the request was successful, the response Object is returned. - * @param Request Object filled with necessary data for the XML Request - * @return Response Object with the data of the XML response. - */ - public function processDirRequest($request) - { - if ($request->getMerchantId() == "") { - $request->setMerchantId($this->_conf["MERCHANTID"]); - } - - if ($request->getSubId() == "") { - $request->setSubId($this->_conf["SUBID"]); - } - - if ($request->getAuthentication() == "") { - $request->setAuthentication($this->_conf["AUTHENTICATIONTYPE"]); - } - - $res = new Mage_Ideal_Model_Api_Advanced_DirectoryResponse(); - - if (!$request->checkMandatory()) { - $res->setError(Mage::helper('ideal')->__('Required fields missing')); - return $res; - } - - // build concatenated string - $timestamp = $this->getGMTTimeMark(); - $token = ""; - $tokenCode = ""; - - if ("SHA1_RSA" == $request->getAuthentication()) { - $message = $timestamp . $request->getMerchantId() . $request->getSubId(); - $message = $this->_strip($message); - - //build fingerprint of your own certificate - $token = $this->_security->createCertFingerprint($this->_conf["PRIVATECERT"]); - - //sign the part of the message that need to be signed - $tokenCode = $this->_security->signMessage($this->_conf["PRIVATEKEY"], $this->_conf["PRIVATEKEYPASS"], $message); - - //encode with base64 - $tokenCode = base64_encode($tokenCode); - } - - $reqMsg = "\n" - . "\n" - . "" . utf8_encode( $timestamp ) . "\n" - . "\n" - . "" . utf8_encode( htmlspecialchars( $request->getMerchantId() ) ) . "\n" - . "" . utf8_encode( $request->getSubId() ) . "\n" - . "" . utf8_encode( $request->getAuthentication() ) . "\n" - . "" . utf8_encode( $token ) . "\n" - . "" . utf8_encode( $tokenCode ) . "\n" - . "\n" - . ""; - - $response = $this->_post($this->_conf["ACQUIRERURL"], $this->_conf["ACQUIRERTIMEOUT"], $reqMsg); - - if ($response === false) { - return false; - } - - $xml = new SimpleXMLElement($response); - - if(!$xml->Error) { - $res->setOk(true); - $res->setAcquirer($xml->Acquirer->acquirerID); - $issuerArray = array(); - foreach ($xml->Directory->Issuer as $issuer) { - $issuerArray[(string)$issuer->issuerID] = (string)$issuer->issuerName; - } - $res->setIssuerList($issuerArray); - return $res; - } else { - $this->setError($xml->Error->consumerMessage); - return false; - } - } - - /** - * This method sends HTTP XML AcquirerTrxRequest to the Acquirer system. - * Befor calling, all mandatory properties have to be set in the Request object - * by calling the associated setter methods. - * If the request was successful, the response Object is returned. - * @param Request Object filled with necessary data for the XML Request - * @return Response Object with the data of the XML response. - */ - public function processTrxRequest($request) { - - if ($request->getMerchantId() == "") - $request->setMerchantId($this->_conf["MERCHANTID"]); - if ($request->getSubId() == "") - $request->setSubId($this->_conf["SUBID"]); - if ($request->getAuthentication() == "") - $request->setAuthentication($this->_conf["AUTHENTICATIONTYPE"]); - if ($request->getMerchantReturnUrl() == "") - $request->setMerchantReturnUrl($this->_conf["MERCHANTRETURNURL"]); - if ($request->getCurrency() == "") - $request->setCurrency($this->_conf["CURRENCY"]); - if ($request->getExpirationPeriod() == "") - $request->setExpirationPeriod($this->_conf["EXPIRATIONPERIOD"]); - if ($request->getLanguage() == "") - $request->setLanguage($this->_conf["LANGUAGE"]); - if ($request->getEntranceCode() == "") - $request->setEntranceCode($this->_conf["ENTRANCECODE"]); - if ($request->getDescription() == "") - $request->setDescription($this->_conf["DESCRIPTION"]); - - $res = new Mage_Ideal_Model_Api_Advanced_AcquirerTrxResponse(); - - if (!$request->checkMandatory()) { - $res->setError(Mage::helper('ideal')->__('Required fields missing')); - return $res; - } - - // build concatenated string - $timestamp = $this->getGMTTimeMark(); - $token = ""; - $tokenCode = ""; - if ( "SHA1_RSA" == $request->getAuthentication() ) { - $message = $timestamp - . $request->getIssuerId() - . $request->getMerchantId() - . $request->getSubId() - . $request->getMerchantReturnUrl() - . $request->getPurchaseId() - . $request->getAmount() - . $request->getCurrency() - . $request->getLanguage() - . $request->getDescription() - . $request->getEntranceCode(); - $message = $this->_strip($message); - - //create fingerprint so the receiver knows what certificate to use - $token = $this->_security->createCertFingerprint($this->_conf["PRIVATECERT"]); - - //sign the message - $tokenCode = $this->_security->signMessage($this->_conf["PRIVATEKEY"], $this->_conf["PRIVATEKEYPASS"], $message); - //encode it with base64 - $tokenCode = base64_encode($tokenCode); - } - - $reqMsg = "\n" - . "\n" - . "" . utf8_encode($timestamp) . "\n" - . "" . "" . utf8_encode(htmlspecialchars($request->getIssuerId())) . "\n" - . "\n" - . "" . "" . utf8_encode(htmlspecialchars($request->getMerchantId())) . "\n" - . "" . utf8_encode($request->getSubId()) . "\n" - . "" . utf8_encode($request->getAuthentication()) . "\n" - . "" . utf8_encode($token) . "\n" - . "" . utf8_encode($tokenCode) . "\n" - . "" . utf8_encode(htmlspecialchars($request->getMerchantReturnUrl())) . "\n" - . "\n" - . "" . "" . utf8_encode(htmlspecialchars($request->getPurchaseId())) . "\n" - . "" . utf8_encode($request->getAmount()) . "\n" - . "" . utf8_encode($request->getCurrency()) . "\n" - . "" . utf8_encode($request->getExpirationPeriod()) . "\n" - . "" . utf8_encode($request->getLanguage()) . "\n" - . "" . utf8_encode(htmlspecialchars($request->getDescription())) . "\n" - . "" . utf8_encode(htmlspecialchars($request->getEntranceCode())) . "\n" - . "" . ""; - - $response = $this->_post($this->_conf["ACQUIRERURL"], $this->_conf["ACQUIRERTIMEOUT"], $reqMsg); - - if ($response === false) { - return false; - } - - $xml = new SimpleXMLElement($response); - - if(!$xml->Error) { - $issuerUrl = (string)$xml->Issuer->issuerAuthenticationURL; - $transactionId = (string)$xml->Transaction->transactionID; - $res->setIssuerAuthenticationUrl($issuerUrl); - $res->setTransactionId($transactionId); - $res->setOk(true); - return $res; - } else { - $this->setError($xml->Error->consumerMessage); - return false; - } - } - - /** - * This method sends HTTP XML AcquirerStatusRequest to the Acquirer system. - * Befor calling, all mandatory properties have to be set in the Request object - * by calling the associated setter methods. - * If the request was successful, the response Object is returned. - * @param Request Object filled with necessary data for the XML Request - * @return Response Object with the data of the XML response. - */ - public function processStatusRequest($request) - { - if ($request->getMerchantId() == "") - $request->setMerchantId($this->_conf["MERCHANTID"]); - if ($request->getSubId() == "") - $request->setSubId($this->_conf["SUBID"]); - if ($request->getAuthentication() == "") - $request->setAuthentication($this->_conf["AUTHENTICATIONTYPE"]); - - $res = new Mage_Ideal_Model_Api_Advanced_AcquirerStatusResponse(); - - if (!$request->checkMandatory()) { - $$request->setErrorMessage(Mage::helper('ideal')->__('Required fields missing')); - return $res; - } - - // build concatenated string - $timestamp = $this->getGMTTimeMark(); - $token = ""; - $tokenCode = ""; - if ("SHA1_RSA" == $request->getAuthentication()) { - $message = $timestamp . $request->getMerchantId() . $request->getSubId() . $request->getTransactionId(); - $message = $this->_strip($message); - - //create fingerprint of your own certificate - $token = $this->_security->createCertFingerprint($this->_conf["PRIVATECERT"]); - //sign the message - $tokenCode = $this->_security->signMessage( $this->_conf["PRIVATEKEY"], $this->_conf["PRIVATEKEYPASS"], $message ); - //encode with base64 - $tokenCode = base64_encode($tokenCode); - } - $reqMsg = "\n" - . "\n" - . "" . utf8_encode($timestamp) . "\n" - . "" . "" . utf8_encode(htmlspecialchars($request->getMerchantId())) . "\n" - . "" . utf8_encode($request->getSubId()) . "\n" - . "" . utf8_encode($request->getAuthentication()) . "\n" - . "" . utf8_encode($token) . "\n" - . "" . utf8_encode($tokenCode) . "\n" - . "\n" - . "" . "" . utf8_encode(htmlspecialchars($request->getTransactionId())) . "\n" - . "" . ""; - - $response = $this->_post($this->_conf["ACQUIRERURL"], $this->_conf["ACQUIRERTIMEOUT"], $reqMsg); - - if ($response === false) { - return false; - } - - //Process response - $xml = new SimpleXMLElement($response); - $status = (string)$xml->Transaction->status; - $creationTime = (string)$xml->createDateTimeStamp; - $transactionId = (string)$xml->Transaction->transactionID; - $consumerAccountNumber = (string)$xml->Transaction->consumerAccountNumber; - $consumerName = (string)$xml->Transaction->consumerName; - $consumerCity = (string)$xml->Transaction->consumerCity; - - //Check status - if ( strtoupper('Success') == strtoupper($status) ) { - $res->setAuthenticated(true); - } else { - $res->setAuthenticated(false); - } - - $res->setTransactionStatus($status); - $res->setTransactionId($transactionId); - $res->setConsumerAccountNumber($consumerAccountNumber); - $res->setConsumerName($consumerName); - $res->setConsumerCity($consumerCity); - $res->setCreationTime($creationTime); - - // now check the signature of the incoming message - //create signed message string - $message = $creationTime . $transactionId . $status . $consumerAccountNumber; - $message = trim( $message ); - - //now we want to check the signature that has been sent - $signature64 = (string)$xml->Signature->signatureValue; - - //decode the base64 encoded signature - $sig = base64_decode($signature64); - - //get the fingerprint out of the response - $fingerprint = (string)$xml->Signature->fingerprint; - - //search for the certificate file with the given fingerprint - $certfile = $this->_security->getCertificateName($fingerprint, $this->_conf); - - if($certfile == false) { - $res->setAuthenticated(false); - $res->setError('Fingerprint unknown.'); - return $res; - } - - //prepend directory - $valid = $this->_security->verifyMessage($certfile, $message, $sig); - - if( $valid != 1 ) { - $res->setAuthenticated(false); - $res->setError('Bad signature.'); - return $res; - } - - $res->setOk(true); - return $res; - } - - /** - * Return GMT Time mark - * - * @return string - */ - public function getGMTTimeMark() - { - return gmdate('Y') . '-' . gmdate('m') . '-' . gmdate('d') . 'T' - . gmdate('H') . ':' . gmdate('i') . ':' . gmdate('s') . '.000Z'; - } - - /** - * Post a request, note that for a HTTPS URL no port is required - * - * @param string $url - * @param string $path - * @param array $params - * @return mixed - */ - protected function _post($url, $timeout, $dataToSend) - { - $config = array('timeout' => 30); - $this->_http->setConfig($config); - $this->_http->write(Zend_Http_Client::POST, $url, '1.1', array(), $dataToSend); - $response = $this->_http->read(); - $response = preg_split('/^\r?$/m', $response, 2); - $response = trim($response[1]); - - if ($this->_http->getErrno()) { - $this->_http->close(); - $this->setError($this->_http->getErrno() . ':' . $this->_http->getError()); - return false; - } - $this->_http->close(); - return $response; - } - - /** - * stripping spaces - * - * @param string $message - * @return string - */ - protected function _strip($message) - { - $message = str_replace(' ', '', $message); - $message = str_replace("\t", '', $message); - $message = str_replace("\n", '', $message ); - return $message; - } -} diff --git a/app/code/core/Mage/Ideal/Model/Api/Advanced/AcquirerStatusRequest.php b/app/code/core/Mage/Ideal/Model/Api/Advanced/AcquirerStatusRequest.php deleted file mode 100755 index 06158e2e4f..0000000000 --- a/app/code/core/Mage/Ideal/Model/Api/Advanced/AcquirerStatusRequest.php +++ /dev/null @@ -1,61 +0,0 @@ - - */ -class Mage_Ideal_Model_Api_Advanced_AcquirerStatusRequest extends Mage_Ideal_Model_Api_Advanced_Request -{ - /** - * rests all input data to empty strings - */ - function clear() - { - parent::clear(); - $this->unsTransactionId(); - } - - /** - * this method checks, wheather all mandatory properties were set. - * If done so, true is returned, otherwise false. - * @return If done so, true is returned, otherwise false. - */ - function checkMandatory() - { - if (parent::checkMandatory() && strlen($this->getTransactionId()) > 0) { - return true; - } else { - return false; - } - - } - -} - diff --git a/app/code/core/Mage/Ideal/Model/Api/Advanced/AcquirerStatusResponse.php b/app/code/core/Mage/Ideal/Model/Api/Advanced/AcquirerStatusResponse.php deleted file mode 100755 index 6dc4b8b791..0000000000 --- a/app/code/core/Mage/Ideal/Model/Api/Advanced/AcquirerStatusResponse.php +++ /dev/null @@ -1,44 +0,0 @@ - - */ -class Mage_Ideal_Model_Api_Advanced_AcquirerStatusResponse extends Mage_Ideal_Model_Api_Advanced_Response -{ - /* available vars - var $authenticated - var $consumerName - var $consumerAccountNumber - var $consumerCity - var $transactionId - var $status - */ -} diff --git a/app/code/core/Mage/Ideal/Model/Api/Advanced/AcquirerTrxRequest.php b/app/code/core/Mage/Ideal/Model/Api/Advanced/AcquirerTrxRequest.php deleted file mode 100755 index 4f29b58711..0000000000 --- a/app/code/core/Mage/Ideal/Model/Api/Advanced/AcquirerTrxRequest.php +++ /dev/null @@ -1,84 +0,0 @@ - - */ -class Mage_Ideal_Model_Api_Advanced_AcquirerTrxRequest extends Mage_Ideal_Model_Api_Advanced_Request -{ - /* fields for request xml message - var $issuerId (mandatory) - var $merchantReturnUrl (mandatory) - var $purchaseId (mandatory) - var $amount (mandatory) - var $currency (mandatory) - var $expirationPeriod (mandatory) - var $language (mandatory) - var $description (optional) - var $entranceCode (mandatory) - */ - - function clear() { - parent::clear(); - $this->unsIssuerId(); - $this->unsMerchantReturnUrl(); - $this->unsPurchaseId(); - $this->unsAmount(); - $this->unsCurrency(); - $this->unsExpirationPeriod(); - $this->unsLanguage(); - $this->unsDescription(); - $this->unsEntranceCode(); - } - - /** - * this method checks, whether all mandatory properties were set. - * If done so, true is returned, otherwise false. - * @return If done so, true is returned, otherwise false. - */ - function checkMandatory () { - if ((parent::checkMandatory() == true) - && (strlen($this->getIssuerId()) > 0) - && (strlen($this->getMerchantReturnUrl()) > 0) - && (strlen($this->getPurchaseID()) > 0) - && (strlen($this->getAmount()) > 0) - && (strlen($this->getCurrency()) > 0) - && (strlen($this->getExpirationPeriod()) > 0) - && (strlen($this->getLanguage()) > 0) - && (strlen($this->getEntranceCode()) > 0) - && (strlen($this->getDescription()) > 0) - ) { - return true; - } else { - return false; - } - } - -} diff --git a/app/code/core/Mage/Ideal/Model/Api/Advanced/AcquirerTrxResponse.php b/app/code/core/Mage/Ideal/Model/Api/Advanced/AcquirerTrxResponse.php deleted file mode 100755 index ac49a6027a..0000000000 --- a/app/code/core/Mage/Ideal/Model/Api/Advanced/AcquirerTrxResponse.php +++ /dev/null @@ -1,41 +0,0 @@ - - */ -class Mage_Ideal_Model_Api_Advanced_AcquirerTrxResponse extends Mage_Ideal_Model_Api_Advanced_Response -{ - /* - var $acquirerId; - var $issuerAuthenticationUrl; - var $transactionId; - */ -} diff --git a/app/code/core/Mage/Ideal/Model/Api/Advanced/DirectoryRequest.php b/app/code/core/Mage/Ideal/Model/Api/Advanced/DirectoryRequest.php deleted file mode 100755 index 0fc7e761c7..0000000000 --- a/app/code/core/Mage/Ideal/Model/Api/Advanced/DirectoryRequest.php +++ /dev/null @@ -1,36 +0,0 @@ - - */ -class Mage_Ideal_Model_Api_Advanced_DirectoryRequest extends Mage_Ideal_Model_Api_Advanced_Request{ - -} diff --git a/app/code/core/Mage/Ideal/Model/Api/Advanced/DirectoryResponse.php b/app/code/core/Mage/Ideal/Model/Api/Advanced/DirectoryResponse.php deleted file mode 100755 index d48cf1ae1a..0000000000 --- a/app/code/core/Mage/Ideal/Model/Api/Advanced/DirectoryResponse.php +++ /dev/null @@ -1,50 +0,0 @@ - - */ -class Mage_Ideal_Model_Api_Advanced_DirectoryResponse extends Mage_Ideal_Model_Api_Advanced_Response { - /* - var $acquirerId - var $issuerList - array of Issuer Objects - */ - - /** - * adds an Issuer to the IssuerList - */ - function addIssuer($issuer) { - if(is_a($issuer, "Mage_Ideal_Api_Advanced_Issuer")) { - $this->setIssuerList(array_merge((array)$this->getIssuerList(), (array)$issuer)); - } - } -} - -?> diff --git a/app/code/core/Mage/Ideal/Model/Api/Advanced/Issuer.php b/app/code/core/Mage/Ideal/Model/Api/Advanced/Issuer.php deleted file mode 100755 index aa0143278f..0000000000 --- a/app/code/core/Mage/Ideal/Model/Api/Advanced/Issuer.php +++ /dev/null @@ -1,41 +0,0 @@ - - */ -class Mage_Ideal_Model_Api_Advanced_Issuer extends Varien_Object -{ - /* - var $issuerID - var $issuerName - var $issuerList ("Short", "Long") - */ -} diff --git a/app/code/core/Mage/Ideal/Model/Api/Advanced/Request.php b/app/code/core/Mage/Ideal/Model/Api/Advanced/Request.php deleted file mode 100755 index 67826eac33..0000000000 --- a/app/code/core/Mage/Ideal/Model/Api/Advanced/Request.php +++ /dev/null @@ -1,80 +0,0 @@ - - */ -class Mage_Ideal_Model_Api_Advanced_Request extends Varien_Object -{ - /** - * clears all parameters - */ - public function clear() { - $this->unsMerchantId(); - $this->unsSubId(); - $this->unsAuthentication(); - } - - /** - * this method checks, whether all mandatory properties are set. - * @return true if all fields are valid, otherwise returns false - */ - function checkMandatory () { - if (strlen($this->getMerchantId()) > 0 - && strlen($this->getSubID()) > 0 - && strlen($this->getAuthentication()) > 0) { - return true; - } else { - return false; - } - } - - /** - * @param authentication The type of authentication to set. - * Currently only "RSA_SHA1" is implemented. (mandatory) - */ - function setAuthentication($authentication) { - $this->setData('authentication', trim($authentication)); - } - - /** - * @param merchantID The merchantID to set. (mandatory) - */ - function setMerchantId($merchantID) { - $this->setData('merchant_id', trim($merchantID)); - } - - /** - * @param subID The subID to set. (mandatory) - */ - function setSubId($subID) { - $this->setData('sub_id', trim($subID)); - } -} diff --git a/app/code/core/Mage/Ideal/Model/Api/Advanced/Response.php b/app/code/core/Mage/Ideal/Model/Api/Advanced/Response.php deleted file mode 100755 index 8f7f63993d..0000000000 --- a/app/code/core/Mage/Ideal/Model/Api/Advanced/Response.php +++ /dev/null @@ -1,54 +0,0 @@ - - */ -class Mage_Ideal_Model_Api_Advanced_Response extends Varien_Object -{ - /* available vars - var $ok - var $errorMessage - var $errorCode - var $errorDetail - var $suggestedAction - var $suggestedExpirationPeriod - var $consumerMessage - */ - - /** - * @return true, if the request was processed successfully, otherwise false. If - * false, additional information can be received calling getErrorMessage() - */ - - function isOk() { - return $this->ok; - } -} diff --git a/app/code/core/Mage/Ideal/Model/Api/Advanced/Security.php b/app/code/core/Mage/Ideal/Model/Api/Advanced/Security.php deleted file mode 100755 index 32364dc7ca..0000000000 --- a/app/code/core/Mage/Ideal/Model/Api/Advanced/Security.php +++ /dev/null @@ -1,155 +0,0 @@ - - */ -class Mage_Ideal_Model_Api_Advanced_Security -{ - /** - * reads in a certificate file and creates a fingerprint - * @param Filename of the certificate - * @return fingerprint - */ - function createCertFingerprint($filename) - { - if(is_readable($filename)) { - $cert = file_get_contents($filename); - } else { - return false; - } - - $data = openssl_x509_read($cert); - - if(!openssl_x509_export($data, $data)) { - - return false; - } - - $data = str_replace("-----BEGIN CERTIFICATE-----", "", $data); - $data = str_replace("-----END CERTIFICATE-----", "", $data); - - $data = base64_decode($data); - - $fingerprint = sha1($data); - - $fingerprint = strtoupper( $fingerprint ); - - return $fingerprint; - } - - /** - * function to sign a message - * @param filename of the private key - * @param message to sign - * @return signature - */ - function signMessage($priv_keyfile, $key_pass, $data) - { - $data = preg_replace("/\s/","",$data); - if (is_readable($priv_keyfile)) { - $priv_key = file_get_contents($priv_keyfile); - - $params = array($priv_key, $key_pass); - $pkeyid = openssl_pkey_get_private($params); - - // compute signature - openssl_sign($data, $signature, $pkeyid); - - // free the key from memory - openssl_free_key($pkeyid); - - return $signature; - } else { - return false; - } - } - - /** - * function to verify a message - * @param filename of the public key to decrypt the signature - * @param message to verify - * @param sent signature - * @return signature - */ - function verifyMessage($certfile, $data, $signature) - { - // $data and $signature are assumed to contain the data and the signature - $ok = 0; - if (is_readable($certfile)) { - $cert = file_get_contents($certfile); - } else { - return false; - } - - $pubkeyid = openssl_get_publickey($cert); - - // state whether signature is okay or not - $ok = openssl_verify($data, $signature, $pubkeyid); - - // free the key from memory - openssl_free_key($pubkeyid); - - return $ok; - } - - /** - * @param fingerprint that's been sent - * @param the configuration file loaded in as an array - * @return the filename of the certificate with this fingerprint - */ - function getCertificateName($fingerprint, $config) - { - $count = 0; - - if (isset($config["CERTIFICATE" . $count])) { - $certFilename = $config["CERTIFICATE" . $count]; - } else { - return false; - } - - while( isset($certFilename) ) { - $buff = $this->createCertFingerprint($certFilename); - - if( $fingerprint == $buff ) { - return $certFilename; - } - - $count+=1; - if (isset($config["CERTIFICATE" . $count])) { - $certFilename = $config["CERTIFICATE" . $count]; - } else { - return false; - } - } - - return false; - } -} diff --git a/app/code/core/Mage/Ideal/Model/Api/Debug.php b/app/code/core/Mage/Ideal/Model/Api/Debug.php deleted file mode 100644 index 82dba2a6ae..0000000000 --- a/app/code/core/Mage/Ideal/Model/Api/Debug.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -class Mage_Ideal_Model_Api_Debug extends Mage_Core_Model_Abstract -{ - protected function _construct() - { - $this->_init('ideal/api_debug'); - } -} diff --git a/app/code/core/Mage/Ideal/Model/Basic.php b/app/code/core/Mage/Ideal/Model/Basic.php deleted file mode 100755 index 72598e08dc..0000000000 --- a/app/code/core/Mage/Ideal/Model/Basic.php +++ /dev/null @@ -1,217 +0,0 @@ - - */ - -class Mage_Ideal_Model_Basic extends Mage_Payment_Model_Method_Abstract -{ - protected $_code = 'ideal_basic'; - protected $_formBlockType = 'ideal/basic_form'; - protected $_allowCurrencyCode = array('EUR', 'GBP', 'USD', 'CAD', 'SHR', 'NOK', 'SEK', 'DKK'); - - protected $_isGateway = false; - protected $_canAuthorize = false; - protected $_canCapture = true; - protected $_canCapturePartial = false; - protected $_canRefund = false; - protected $_canVoid = false; - protected $_canUseInternal = false; - protected $_canUseCheckout = true; - protected $_canUseForMultishipping = false; - - /** - * Get debug flag - * - * @return boolean - */ - public function getDebug() - { - return $this->getConfigData('debug_flag'); - } - - /** - * validate the currency code is avaialable to use for iDEAL Basic or not - * - * @return bool - */ - public function validate() - { - parent::validate(); - $paymentInfo = $this->getInfoInstance(); - if ($paymentInfo instanceof Mage_Sales_Model_Order_Payment) { - $currency_code = $paymentInfo->getOrder()->getBaseCurrencyCode(); - } else { - $currency_code = $paymentInfo->getQuote()->getBaseCurrencyCode(); - } - if (!in_array($currency_code, $this->_allowCurrencyCode)) { - Mage::throwException(Mage::helper('ideal')->__('Selected currency code (%s) is not compatible with iDEAL', $currency_code)); - } - return $this; - } - - public function getOrderPlaceRedirectUrl() - { - return Mage::getUrl('ideal/basic/redirect', array('_secure' => true)); - } - - /** - * Return iDEAL Basic Api Url - * - * @return string Payment API URL - */ - public function getApiUrl() - { - if ($this->getConfigData('test_flag') == 1) { - if (($url = trim($this->getConfigData('api_test_url'))) == '') { - $url = "https://idealtest.secure-ing.com/ideal/mpiPayInitIng.do"; - } - } else { - if (($url = trim($this->getConfigData('api_url'))) == '') { - $url = "https://ideal.secure-ing.com/ideal/mpiPayInitIng.do"; - } - } - return $url; - } - - /** - * Generates array of fields for redirect form - * - * @return array - */ - public function getBasicCheckoutFormFields() - { - $order = $this->getInfoInstance()->getOrder(); - - $shippingAddress = $order->getShippingAddress(); - $currency_code = $order->getBaseCurrencyCode(); - - $fields = array( - 'merchantID' => $this->getConfigData('merchant_id'), - 'subID' => '0', - 'amount' => round($order->getBaseGrandTotal()*100), - 'purchaseID' => $order->getIncrementId(), - 'paymentType' => 'ideal', - 'validUntil' => date('Y-m-d\TH:i:s.000\Z', strtotime ('+1 week')) // plus 1 week - ); - - $i = 1; - foreach ($order->getItemsCollection() as $item) { - $fields = array_merge($fields, array( - "itemNumber".$i => $item->getSku(), - "itemDescription".$i => $item->getName(), - "itemQuantity".$i => $item->getQtyOrdered()*1, - "itemPrice".$i => round($item->getBasePrice()*100) - )); - $i++; - } - - if ($order->getBaseShippingAmount() > 0) { - $fields = array_merge($fields, array( - "itemNumber".$i => $order->getShippingMethod(), - "itemDescription".$i => $order->getShippingDescription(), - "itemQuantity".$i => 1, - "itemPrice".$i => round($order->getBaseShippingAmount()*100) - )); - $i++; - } - - if ($order->getBaseTaxAmount() > 0) { - $fields = array_merge($fields, array( - "itemNumber".$i => 'Tax', - "itemDescription".$i => '', - "itemQuantity".$i => 1, - "itemPrice".$i => round($order->getBaseTaxAmount()*100) - )); - $i++; - } - - if ($order->getBaseDiscountAmount() > 0) { - $fields = array_merge($fields, array( - "itemNumber".$i => 'Discount', - "itemDescription".$i => '', - "itemQuantity".$i => 1, - "itemPrice".$i => -round($order->getBaseDiscountAmount()*100) - )); - $i++; - } - - $fields = $this->appendHash($fields); - - $description = $this->getConfigData('description'); - if ($description == '') { - $description = Mage::app()->getStore()->getFrontendName() . ' ' . 'payment'; - } - - $fields = array_merge($fields, array( - 'language' => $this->getConfigData('language'), - 'currency' => $currency_code, - 'description' => $description, - 'urlCancel' => Mage::getUrl('ideal/basic/cancel', array('_secure' => true)), - 'urlSuccess' => Mage::getUrl('ideal/basic/success', array('_secure' => true)), - 'urlError' => Mage::getUrl('ideal/basic/failure', array('_secure' => true)) - )); - - $requestString = ''; - $returnArray = array(); - - foreach ($fields as $k=>$v) { - $returnArray[$k] = $v; - $requestString .= '&'.$k.'='.$v; - } - - if ($this->getDebug()) { - Mage::getModel('ideal/api_debug') - ->setRequestBody($this->getApiUrl() . "\n" . $requestString) - ->save(); - } - - return $returnArray; - } - - /** - * Calculates and appends hash to form fields - * - * @param array $returnArray - * @return array - */ - public function appendHash($returnArray) - { - $merchantKey = $this->getConfigData('merchant_key'); - $hashString = $merchantKey.implode('', $returnArray); - $hashString = str_replace( - array(" ", "\t", "\n", "&", "<", ">", ""e;"), - array("", "", "", "&", "<", ">", "\""), - $hashString); - $hash = sha1($hashString); - return array_merge($returnArray, array('hash' => $hash)); - } -} diff --git a/app/code/core/Mage/Ideal/Model/Mysql4/Api/Debug.php b/app/code/core/Mage/Ideal/Model/Mysql4/Api/Debug.php deleted file mode 100644 index 3c0db840c7..0000000000 --- a/app/code/core/Mage/Ideal/Model/Mysql4/Api/Debug.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ - -class Mage_Ideal_Model_Mysql4_Api_Debug extends Mage_Core_Model_Mysql4_Abstract -{ - protected function _construct() - { - $this->_init('ideal/api_debug', 'debug_id'); - } -} diff --git a/app/code/core/Mage/Ideal/Model/Mysql4/Api/Debug/Collection.php b/app/code/core/Mage/Ideal/Model/Mysql4/Api/Debug/Collection.php deleted file mode 100644 index 40221addbd..0000000000 --- a/app/code/core/Mage/Ideal/Model/Mysql4/Api/Debug/Collection.php +++ /dev/null @@ -1,41 +0,0 @@ - - */ -class Mage_Ideal_Model_Mysql4_Api_Debug_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract -{ - protected function _construct() - { - $this->_init('ideal/api_debug'); - } -} diff --git a/app/code/core/Mage/Ideal/Model/Mysql4/Setup.php b/app/code/core/Mage/Ideal/Model/Mysql4/Setup.php deleted file mode 100755 index 19de383561..0000000000 --- a/app/code/core/Mage/Ideal/Model/Mysql4/Setup.php +++ /dev/null @@ -1,37 +0,0 @@ - - */ -class Mage_Ideal_Model_Observer -{ - /** - * Convert specific attributes from Quote Payment to Order Payment - * - * @param Varien_Object $observer - * @return Mage_Ideal_Model_Observer - */ - public function convertPayment($observer) - { - $orderPayment = $observer->getEvent()->getOrderPayment(); - $quotePayment = $observer->getEvent()->getQuotePayment(); - $orderPayment->setIdealIssuerId($quotePayment->getIdealIssuerId()); - - if ($quotePayment->getIdealIssuerId()) { - $issuerList = unserialize($quotePayment->getIdealIssuerList()); - if (isset($issuerList[$quotePayment->getIdealIssuerId()])) { - $orderPayment->setIdealIssuerTitle( - $issuerList[$quotePayment->getIdealIssuerId()] - ); - } - } - return $this; - } -} diff --git a/app/code/core/Mage/Ideal/Model/Source/Language.php b/app/code/core/Mage/Ideal/Model/Source/Language.php deleted file mode 100644 index fce0788f0d..0000000000 --- a/app/code/core/Mage/Ideal/Model/Source/Language.php +++ /dev/null @@ -1,47 +0,0 @@ - - */ - -class Mage_Ideal_Model_Source_Language -{ - public function toOptionArray() - { - return array( - array('value' => 'en', 'label' => Mage::helper('ideal')->__('English')), - array('value' => 'nl', 'label' => Mage::helper('ideal')->__('Dutch')) - ); - } -} - - - diff --git a/app/code/core/Mage/Ideal/controllers/AdvancedController.php b/app/code/core/Mage/Ideal/controllers/AdvancedController.php deleted file mode 100755 index 418dbdfc25..0000000000 --- a/app/code/core/Mage/Ideal/controllers/AdvancedController.php +++ /dev/null @@ -1,195 +0,0 @@ - - */ - -class Mage_Ideal_AdvancedController extends Mage_Core_Controller_Front_Action -{ - public function getCheckout() - { - return Mage::getSingleton('checkout/session'); - } - - /** - * When a customer chooses iDEAL Advanced on Checkout/Payment page - * - */ - public function redirectAction() - { - $order = Mage::getModel('sales/order'); - $order->load($this->getCheckout()->getLastOrderId()); - if($order->getId()){ - $advanced = $order->getPayment()->getMethodInstance(); - $issuerId = $order->getPayment()->getIdealIssuerId(); - - $response = $advanced->sendTransactionRequest($order, $issuerId); - - if ($response) { - $order->getPayment()->setTransactionId($response->getTransactionId()); - $order->getPayment()->setLastTransId($response->getTransactionId()); - $order->getPayment()->setIdealTransactionChecked(0); - - if ($response->getError()) { - $this->getCheckout()->setIdealErrorMessage($response->getError()); - $this->_redirect('*/*/failure'); - return; - } - - $this->getResponse()->setBody( - $this->getLayout()->createBlock('ideal/advanced_redirect') - ->setMessage($this->__('You will be redirected to bank in a few seconds.')) - ->setRedirectUrl($response->getIssuerAuthenticationUrl()) - ->toHtml() - ); - - $order->addStatusToHistory( - $order->getStatus(), - $this->__('Customer was redirected to iDEAL') - ); - $order->save(); - - $this->getCheckout()->setIdealAdvancedQuoteId($this->getCheckout()->getQuoteId(true)); - $this->getCheckout()->setIdealAdvancedOrderId($this->getCheckout()->getLastOrderId(true)); - - - return; - } - } - - $this->getResponse()->setBody( - $this->getLayout()->createBlock('ideal/advanced_redirect') - ->setMessage($this->__('Error occured. You will be redirected back to store.')) - ->setRedirectUrl(Mage::getUrl('checkout/cart')) - ->toHtml() - ); - } - - /** - * When a customer cancels payment from iDEAL - */ - public function cancelAction() - { - $order = Mage::getModel('sales/order'); - $this->getCheckout()->setLastOrderId($this->getCheckout()->getIdealAdvancedOrderId(true)); - $order->load($this->getCheckout()->getLastOrderId()); - - if (!$order->getId()) { - $this->norouteAction(); - return; - } - - $order->addStatusToHistory( - $order->getStatus(), - $this->__('Customer canceled payment.') - ); - $order->cancel(); - $order->save(); - - $$this->getCheckout()->setQuoteId($$this->getCheckout()->setIdealAdvancedQuoteId(true)); - $this->_redirect('checkout/cart'); - } - - /** - * When customer return from iDEAL - */ - public function resultAction() - { - /** - * Decrypt Real Order Id that was sent encrypted - */ - $orderId = Mage::helper('ideal')->decrypt($this->getRequest()->getParam('ec')); - $transactionId = $this->getRequest()->getParam('trxid'); - - $order = Mage::getModel('sales/order'); - $order->loadByIncrementId($orderId); - - if ($order->getId() > 0) { - $advanced = $order->getPayment()->getMethodInstance(); - $advanced->setTransactionId($transactionId); - $response = $advanced->getTransactionStatus($transactionId); - - $this->getCheckout()->setQuoteId($this->getCheckout()->getIdealAdvancedQuoteId(true)); - $this->getCheckout()->setLastOrderId($this->getCheckout()->getIdealAdvancedOrderId(true)); - - if ($response->getTransactionStatus() == Mage_Ideal_Model_Api_Advanced::STATUS_SUCCESS) { - $this->getCheckout()->getQuote()->setIsActive(false)->save(); - - if ($order->canInvoice()) { - $invoice = $order->prepareInvoice(); - $invoice->register()->capture(); - Mage::getModel('core/resource_transaction') - ->addObject($invoice) - ->addObject($invoice->getOrder()) - ->save(); - - $order->addStatusToHistory($order->getStatus(), Mage::helper('ideal')->__('Customer successfully returned from iDEAL')); - } - - $order->sendNewOrderEmail(); - - $this->_redirect('checkout/onepage/success'); - } else if ($response->getTransactionStatus() == Mage_Ideal_Model_Api_Advanced::STATUS_CANCELLED) { - $order->cancel(); - $order->addStatusToHistory($order->getStatus(), Mage::helper('ideal')->__('Customer cancelled payment')); - - $this->_redirect('checkout/cart'); - } else { - $order->cancel(); - $order->addStatusToHistory($order->getStatus(), Mage::helper('ideal')->__('Customer was rejected by iDEAL')); - $this->getCheckout()->setIdealErrorMessage( - Mage::helper('ideal')->__('An error occurred while processing your iDEAL transaction. Please contact the web shop or try -again later. Transaction number is %s.', $order->getIncrementId()) - ); - - $this->_redirect('*/*/failure'); - } - $order->getPayment()->setIdealTransactionChecked(1); - $order->save(); - } else { - $this->_redirect('checkout/cart'); - } - } - - /** - * Redirected here when customer returns with error - */ - public function failureAction() - { - if (!$this->getCheckout()->getIdealErrorMessage()) { - $this->norouteAction(); - return; - } - - $this->loadLayout(); - $this->renderLayout(); - } -} diff --git a/app/code/core/Mage/Ideal/controllers/BasicController.php b/app/code/core/Mage/Ideal/controllers/BasicController.php deleted file mode 100755 index 0f0d6ba547..0000000000 --- a/app/code/core/Mage/Ideal/controllers/BasicController.php +++ /dev/null @@ -1,247 +0,0 @@ - - */ -class Mage_Ideal_BasicController extends Mage_Core_Controller_Front_Action -{ - - /** - * Return order instance for last real order ID (stored in session) - * - * @return Mage_Sales_Model_Entity_Order object - */ - protected function _getOrder () - { - $order = Mage::getModel('sales/order'); - $order->load(Mage::getSingleton('checkout/session')->getLastOrderId()); - - if (!$order->getId()) { - return false; - } - - return $order; - } - - /** - * When a customer chooses iDEAL Basic on Checkout/Payment page - */ - public function redirectAction() - { - $session = Mage::getSingleton('checkout/session'); - $session->setIdealBasicQuoteId($session->getQuoteId()); - $session->setIdealBasicOrderId($session->getLastOrderId()); - - if (!($order = $this->_getOrder())) { - $this->norouteAction(); - return; - } - $order->addStatusToHistory( - $order->getStatus(), - $this->__('Customer was redirected to iDEAL. Please, check the status of a transaction via the ING iDEAL Dashboard before delivery of the goods purchased.') - ); - $order->save(); - - $this->getResponse()->setBody( - $this->getLayout()->createBlock('ideal/basic_redirect') - ->setOrder($order) - ->toHtml() - ); - $session->unsQuoteId(); - $session->unsLastOrderId(); - } - - /** - * Success response from iDEAL - */ - public function successAction() - { - $session = Mage::getSingleton('checkout/session'); - $session->setLastOrderId($session->getIdealBasicOrderId(true)); - - $order = $this->_getOrder(); - if (!$order->getId()) { - $this->norouteAction(); - return false; - } - - $session->setQuoteId($session->getIdealBasicQuoteId(true)); - - $order->addStatusToHistory( - $order->getStatus(), - $this->__('Customer successfully returned from iDEAL') - ); - - $order->sendNewOrderEmail(); - - $this->_saveInvoice($order); - - $order->save(); - - $this->_redirect('checkout/onepage/success'); - } - - /** - * Cancel response from iDEAL - */ - public function cancelAction() - { - $session = Mage::getSingleton('checkout/session'); - $session->setLastOrderId($session->getIdealBasicOrderId(true)); - - $order = $this->_getOrder(); - if (!$order->getId()) { - $this->norouteAction(); - return false; - } - - $order->cancel(); - - $history = $this->__('Payment was canceled by customer'); - - $order->addStatusToHistory( - $order->getStatus(), - $history - ); - - $order->save(); - - $session->setQuoteId($session->getIdealBasicQuoteId(true)); - - $this->_redirect('checkout/cart'); - } - - - /** - * Error response from iDEAL - */ - public function failureAction () - { - $session = Mage::getSingleton('checkout/session'); - $session->setLastOrderId($session->getIdealBasicOrderId(true)); - - $order = $this->_getOrder(); - - if (!$order->getId()) { - $this->norouteAction(); - return false; - } - - $order->cancel(); - - $history = $this->__('Error occured with transaction %s.', $order->getIncrementId()) . ' ' - . $this->__('Customer was returned from iDEAL.'); - - $order->addStatusToHistory( - $order->getStatus(), - $history - ); - - $order->save(); - - $session->setQuoteId($session->getIdealBasicQuoteId(true)); - $session->setIdealErrorMessage($this->__('An error occurred while processing your iDEAL transaction. Please contact the web shop or try again later. Transaction number is %s.', $order->getIncrementId())); - - $this->loadLayout(); - $this->renderLayout(); - - } - - /** - * Notification action that calling by iDEAL - * - */ - public function notifyAction() - { - if (isset($HTTP_RAW_POST_DATA)) { - $xmlResponse = $HTTP_RAW_POST_DATA; - } else { - $xmlResponse = file_get_contents("php://input"); - } - - if (!strlen($xmlResponse)) { - $this->norouteAction(); - return; - } - - $xmlObj = simplexml_load_string($xmlResponse); - $status = (string)$xmlObj->status; - - $order = Mage::getModel('sales/order') - ->loadByIncrementId((int)$xmlObj->purchaseID); - - if (!$order->getId()) { - return; - } - - if ($status == 'Success') { - if (!$order->hasInvoices()) { - $this->_saveInvoice($order); - $order->addStatusToHistory($order->getStatus(), - $this->__('Notification from iDEAL was recived with status %s. Invoice was created. Please, check the status of a transaction via the ING iDEAL Dashboard before delivery of the goods purchased.', $status) - ); - } else { - $order->addStatusToHistory($order->getStatus(), - $this->__('Notification from iDEAL was recived with status %s.', $status) - ); - } - } else { - $order->addStatusToHistory($order->getStatus(), - $this->__('Notification from iDEAL was recived with status %s.', $status) - ); - $order->cancel(); - } - - $order->save(); - } - - /** - * Save invoice for order - * - * @param Mage_Sales_Model_Order $order - * @return boolean Can save invoice or not - */ - protected function _saveInvoice(Mage_Sales_Model_Order $order) - { - if ($order->canInvoice()) { - $invoice = $order->prepareInvoice(); - $invoice->register()->capture(); - Mage::getModel('core/resource_transaction') - ->addObject($invoice) - ->addObject($invoice->getOrder()) - ->save(); - return true; - } - return false; - } - -} diff --git a/app/code/core/Mage/Ideal/etc/config.xml b/app/code/core/Mage/Ideal/etc/config.xml deleted file mode 100755 index 64319e6de6..0000000000 --- a/app/code/core/Mage/Ideal/etc/config.xml +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - 0.1.0 - - - - - - Mage_Ideal_Model - ideal_mysql4 - - - Mage_Ideal_Model_Mysql4 - - ideal_api_debug
-
-
-
- - - - Mage_Ideal - Mage_Ideal_Model_Mysql4_Setup - - - - - Mage_Ideal_Block - -
- - - /ideal/advanced - /ideal/basic - - - - standard - - Mage_Ideal - ideal - - - - - - - - Mage_Ideal.csv - - - - - - - - ideal.xml - - - - - - - - ideal/observer - convertPayment - - - - - - - - - - - Mage_Ideal.csv - - - - - - - - - ideal/basic - iDEAL Basic - 0 - - - ideal/advanced - iDEAL Advanced - 0 - 10 - 1 - 1 - - - - - - - 0 */1 * * * - ideal/advanced::transactionStatusCheck - - - -
diff --git a/app/code/core/Mage/Ideal/etc/system.xml b/app/code/core/Mage/Ideal/etc/system.xml deleted file mode 100755 index 46a6373e0e..0000000000 --- a/app/code/core/Mage/Ideal/etc/system.xml +++ /dev/null @@ -1,326 +0,0 @@ - - - - - - - - - text - 301 - 1 - 1 - 1 - - - - select - adminhtml/system_config_source_yesno - 0 - 1 - 1 - 0 - - - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - - - - text - 20 - 1 - 1 - 0 - - - - text - 30 - 1 - 1 - 0 - - - - Leave empty for default value - text - 30 - 1 - 1 - 0 - - - - Leave empty for default value - text - 30 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 40 - 1 - 1 - 0 - - - - Store name will be used if left empty - text - 50 - 1 - 1 - 0 - - - - select - ideal/source_language - 60 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 70 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_order_status_processing - 80 - 1 - 1 - 0 - - - - allowspecific - 90 - adminhtml/system_config_source_payment_allspecificcountries - 1 - 1 - 0 - - - - multiselect - 100 - adminhtml/system_config_source_country - 1 - 1 - 0 - - - - text - 110 - 1 - 1 - 0 - - - - - - text - 302 - 1 - 1 - 1 - - - - select - adminhtml/system_config_source_yesno - 0 - 1 - 1 - 0 - - - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>10</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - - - - text - 20 - 1 - 1 - 0 - - - - Absolute path to private key file - text - 30 - 1 - 1 - 0 - - - - text - 40 - 1 - 1 - 0 - - - - Absolute path to private certificate file - text - 30 - 1 - 1 - 0 - - - - Absolute path to public payment provider certificate file - text - 50 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 60 - 1 - 1 - 0 - - - - Store name will be used if left empty - text - 70 - 1 - 1 - 0 - - - - In minutes. Minimum is 1 minute and maximum is 60. - text - 80 - 1 - 1 - 0 - - - - Begin to check transaction status if order was made {N} hours ago - text - 90 - 1 - 1 - 0 - - - - Don't check transaction status if order older than {N} days - text - 100 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 110 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_order_status_processing - 120 - 1 - 1 - 0 - - - - allowspecific - 130 - adminhtml/system_config_source_payment_allspecificcountries - 1 - 1 - 0 - - - - multiselect - 140 - adminhtml/system_config_source_country - 1 - 1 - 0 - - - - text - 150 - 1 - 1 - 0 - - - - - - - diff --git a/app/code/core/Mage/Ideal/sql/ideal_setup/mysql4-install-0.1.0.php b/app/code/core/Mage/Ideal/sql/ideal_setup/mysql4-install-0.1.0.php deleted file mode 100755 index 01337a4f60..0000000000 --- a/app/code/core/Mage/Ideal/sql/ideal_setup/mysql4-install-0.1.0.php +++ /dev/null @@ -1,51 +0,0 @@ -startSetup(); - -$installer->run(" -DROP TABLE IF EXISTS `{$this->getTable('ideal/api_debug')}`; -CREATE TABLE `{$this->getTable('ideal/api_debug')}` ( - `debug_id` int(10) unsigned NOT NULL auto_increment, - `debug_at` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `request_body` text, - `response_body` text, - PRIMARY KEY (`debug_id`), - KEY `debug_at` (`debug_at`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -"); - -$installer->endSetup(); - -$installer->addAttribute('quote_payment', 'ideal_issuer_id', array()); -$installer->addAttribute('quote_payment', 'ideal_issuer_list', array('type' => 'text')); -$installer->addAttribute('order_payment', 'ideal_issuer_id', array()); -$installer->addAttribute('order_payment', 'ideal_issuer_title', array()); -$installer->addAttribute('order_payment', 'ideal_transaction_checked', array('type'=>'int')); diff --git a/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php b/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php index a9721c468a..7798ec4472 100644 --- a/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php +++ b/app/code/core/Mage/Index/controllers/Adminhtml/ProcessController.php @@ -47,6 +47,8 @@ protected function _initProcess() */ public function listAction() { + $this->_title($this->__('System'))->_title($this->__('Index Management')); + $this->loadLayout(); $this->_setActiveMenu('system/index'); $this->_addContent($this->getLayout()->createBlock('index/adminhtml_process')); @@ -60,6 +62,12 @@ public function editAction() { $process = $this->_initProcess(); if ($process) { + $this->_title($process->getIndexCode()); + + $this->_title($this->__('System')) + ->_title($this->__('Index Management')) + ->_title($this->__($process->getIndexer()->getName())); + Mage::register('current_index_process', $process); $this->loadLayout(); $this->renderLayout(); diff --git a/app/code/core/Mage/Install/Block/End.php b/app/code/core/Mage/Install/Block/End.php index 0fc086503c..cfae42e899 100644 --- a/app/code/core/Mage/Install/Block/End.php +++ b/app/code/core/Mage/Install/Block/End.php @@ -23,7 +23,7 @@ * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - + /** * Installation ending block * @@ -31,12 +31,12 @@ */ class Mage_Install_Block_End extends Mage_Install_Block_Abstract { - public function __construct() + public function __construct() { parent::__construct(); $this->setTemplate('install/end.phtml'); } - + public function getEncryptionKey() { $key = $this->getData('encryption_key'); @@ -46,4 +46,19 @@ public function getEncryptionKey() } return $key; } + + /** + * Return url for iframe source + * + * @return string + */ + public function getIframeSourceUrl() + { + if (!Mage_AdminNotification_Model_Survey::isSurveyUrlValid() + || Mage::getSingleton('install/installer')->getHideIframe()) + { + return null; + } + return Mage_AdminNotification_Model_Survey::getSurveyUrl(); + } } diff --git a/app/code/core/Mage/Install/controllers/WizardController.php b/app/code/core/Mage/Install/controllers/WizardController.php index a988e90119..064652d10c 100644 --- a/app/code/core/Mage/Install/controllers/WizardController.php +++ b/app/code/core/Mage/Install/controllers/WizardController.php @@ -432,6 +432,8 @@ public function endAction() $this->_getInstaller()->finish(); + Mage_AdminNotification_Model_Survey::saveSurveyViewed(true); + $this->_prepareLayout(); $this->_initLayoutMessages('install/session'); diff --git a/app/code/core/Mage/Newsletter/Model/Mysql4/Subscriber/Collection.php b/app/code/core/Mage/Newsletter/Model/Mysql4/Subscriber/Collection.php index 12a886bd5f..d8a4a6e784 100644 --- a/app/code/core/Mage/Newsletter/Model/Mysql4/Subscriber/Collection.php +++ b/app/code/core/Mage/Newsletter/Model/Mysql4/Subscriber/Collection.php @@ -89,6 +89,14 @@ protected function _construct() $this->_queueLinkTable = Mage::getSingleton('core/resource')->getTableName('newsletter/queue_link'); $this->_storeTable = Mage::getSingleton('core/resource')->getTableName('core/store'); $this->_init('newsletter/subscriber'); + + // defining mapping for fields represented in several tables + $this->_map['fields']['customer_lastname'] = 'customer_lastname_table.value'; + $this->_map['fields']['customer_firstname'] = 'customer_firstname_table.value'; + $this->_map['fields']['type'] = 'IF(main_table.customer_id = 0, 1, 2)'; + $this->_map['fields']['website_id'] = 'store.website_id'; + $this->_map['fields']['group_id'] = 'store.group_id'; + $this->_map['fields']['store_id'] = 'main_table.store_id'; } /** @@ -152,10 +160,15 @@ public function showCustomerInfo() return $this; } + /** + * Add type field expression to select + * + * @return Mage_Newsletter_Model_Mysql4_Subscriber_Collection + */ public function addSubscriberTypeField() { $this->getSelect() - ->columns(array('type'=>new Zend_Db_Expr('IF(main_table.customer_id = 0, 1, 2)'))); + ->columns(array('type'=>new Zend_Db_Expr($this->_getMappedField('type')))); return $this; } @@ -176,15 +189,12 @@ public function showStoreInfo() return $this; } - public function addFieldToFilter($field, $condition=null) - { - if(!is_null($condition)) { - parent::addFieldToFilter($field, $condition); - $this->_countFilterPart[] = $this->_getConditionSql($this->_getFieldTableAlias($field), $condition); - } - return $this; - } - + /** + * @deprecated after 1.4.0.0-rc1 + * + * @param string $field + * @return string + */ public function _getFieldTableAlias($field) { if (strpos($field,'customer') === 0) { diff --git a/app/code/core/Mage/Ogone/Block/Form.php b/app/code/core/Mage/Ogone/Block/Form.php deleted file mode 100644 index c0a4b28f80..0000000000 --- a/app/code/core/Mage/Ogone/Block/Form.php +++ /dev/null @@ -1,39 +0,0 @@ -setTemplate('ogone/form.phtml'); - } -} diff --git a/app/code/core/Mage/Ogone/Block/Paypage.php b/app/code/core/Mage/Ogone/Block/Paypage.php deleted file mode 100644 index 60136e1cf4..0000000000 --- a/app/code/core/Mage/Ogone/Block/Paypage.php +++ /dev/null @@ -1,41 +0,0 @@ -setTemplate('ogone/paypage.phtml'); - return $this; - } -} diff --git a/app/code/core/Mage/Ogone/Block/Placeform.php b/app/code/core/Mage/Ogone/Block/Placeform.php deleted file mode 100644 index 618bec4899..0000000000 --- a/app/code/core/Mage/Ogone/Block/Placeform.php +++ /dev/null @@ -1,90 +0,0 @@ -getOrder()) { - $order = $this->getOrder(); - } else if ($this->getCheckout()->getLastRealOrderId()) { - $order = Mage::getModel('sales/order')->loadByIncrementId($this->getCheckout()->getLastRealOrderId()); - } else { - return null; - } - return $order; - } - - /** - * Get Form data by using ogone payment api - * - * @return array - */ - public function getFormData() - { - return $this->_getApi()->getFormFields($this->_getOrder()); - } - - /** - * Getting gateway url - * - * @return string - */ - public function getFormAction() - { - return $this->_getApi()->getConfig()->getGatewayPath(); - } -} diff --git a/app/code/core/Mage/Ogone/Helper/Data.php b/app/code/core/Mage/Ogone/Helper/Data.php deleted file mode 100644 index 1f461918e5..0000000000 --- a/app/code/core/Mage/Ogone/Helper/Data.php +++ /dev/null @@ -1,70 +0,0 @@ -_config = Mage::getSingleton('ogone/config'); - return $this; - } - - /** - * Return ogone config instance - * - * @return Mage_Ogone_Model_Config - */ - public function getConfig() - { - return $this->_config; - } - - /** - * Return debug flag by storeConfig - * - * @param int storeId - * @return bool - */ - public function getDebug($storeId=null) - { - return $this->getConfig()->getConfigData('debug_flag', $storeId); - } - - /** - * Flag witch prevent automatic invoice creation - * - * @return bool - */ - public function isInitializeNeeded() - { - return true; - } - - /** - * Redirect url to ogone submit form - * - * @return string - */ - public function getOrderPlaceRedirectUrl() - { - return Mage::getUrl('ogone/api/placeform', array('_secure' => true)); - } - - /** - * Return payment_action value from config area - * - * @return string - */ - public function getPaymentAction() - { - return $this->getConfig()->getConfigData('payment_action'); - } - - /** - * Rrepare params array to send it to gateway page via POST - * - * @param Mage_Sales_Model_Order - * @return array - */ - public function getFormFields($order) - { - if (empty($order)) { - if (!($order = $this->getOrder())) { - return array(); - } - } - $billingAddress = $order->getBillingAddress(); - $formFields = array(); - $formFields['PSPID'] = $this->getConfig()->getPSPID(); - $formFields['orderID'] = $order->getIncrementId(); - $formFields['amount'] = round($order->getBaseGrandTotal()*100); - $formFields['currency'] = Mage::app()->getStore()->getBaseCurrencyCode(); - $formFields['language'] = Mage::app()->getLocale()->getLocaleCode(); - - $formFields['CN'] = $this->_translate($billingAddress->getFirstname().' '.$billingAddress->getLastname()); - $formFields['EMAIL'] = $order->getCustomerEmail(); - $formFields['ownerZIP'] = $billingAddress->getPostcode(); - $formFields['ownercty'] = $billingAddress->getCountry(); - $formFields['ownertown']= $this->_translate($billingAddress->getCity()); - $formFields['COM'] = $this->_translate($this->_getOrderDescription($order)); - $formFields['ownertelno'] = $billingAddress->getTelephone(); - $formFields['owneraddress'] = $this->_translate(str_replace("\n", ' ',$billingAddress->getStreet(-1))); - - $paymentAction = $this->_getOgonePaymentOperation(); - if ($paymentAction ) { - $formFields['operation'] = $paymentAction; - } - - $secretCode = $this->getConfig()->getShaOutCode(); - $secretSet = $formFields['orderID'] . $formFields['amount'] . $formFields['currency'] . - $formFields['PSPID'] . $paymentAction . $secretCode; - - $formFields['SHASign'] = Mage::helper('ogone')->shaCrypt($secretSet); - - $formFields['homeurl'] = $this->getConfig()->getHomeUrl(); - $formFields['catalogurl'] = $this->getConfig()->getHomeUrl(); - $formFields['accepturl'] = $this->getConfig()->getAcceptUrl(); - $formFields['declineurl'] = $this->getConfig()->getDeclineUrl(); - $formFields['exceptionurl'] = $this->getConfig()->getExceptionUrl(); - $formFields['cancelurl'] = $this->getConfig()->getCancelUrl(); - - if ($this->getConfig()->getConfigData('template')=='ogone') { - $formFields['TP']= ''; - $formFields['PMListType'] = $this->getConfig()->getConfigData('pmlist'); - } else { - $formFields['TP']= $this->getConfig()->getPayPageTemplate(); - } - $formFields['TITLE'] = $this->_translate($this->getConfig()->getConfigData('html_title')); - $formFields['BGCOLOR'] = $this->getConfig()->getConfigData('bgcolor'); - $formFields['TXTCOLOR'] = $this->getConfig()->getConfigData('txtcolor'); - $formFields['TBLBGCOLOR'] = $this->getConfig()->getConfigData('tblbgcolor'); - $formFields['TBLTXTCOLOR'] = $this->getConfig()->getConfigData('tbltxtcolor'); - $formFields['BUTTONBGCOLOR'] = $this->getConfig()->getConfigData('buttonbgcolor'); - $formFields['BUTTONTXTCOLOR'] = $this->getConfig()->getConfigData('buttontxtcolor'); - $formFields['FONTTYPE'] = $this->getConfig()->getConfigData('fonttype'); - $formFields['LOGO'] = $this->getConfig()->getConfigData('logo'); - return $formFields; - } - - /** - * to translate UTF 8 to ISO 8859-1 - * Ogone system is only compatible with iso-8859-1 and does not (yet) fully support the utf-8 - */ - protected function _translate($text) - { - return htmlentities(iconv("UTF-8", "ISO-8859-1", $text)); - } - - /** - * Get Ogone Payment Action value - * - * @param string - * @return string - */ - protected function _getOgonePaymentOperation() - { - $value = $this->getPaymentAction(); - if ($value==Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE) { - $value = Mage_Ogone_Model_Api::OGONE_AUTHORIZE_ACTION; - } elseif ($value==Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE) { - $value = Mage_Ogone_Model_Api::OGONE_AUTHORIZE_CAPTURE_ACTION; - } - return $value; - } - - /** - * get formated order description - * - * @param Mage_Sales_Model_Order - * @return string - */ - protected function _getOrderDescription($order) - { - $invoiceDesc = ''; - $lengs = 0; - foreach ($order->getAllItems() as $item) { - if ($item->getParentItem()) { - continue; - } - if (Mage::helper('core/string')->strlen($invoiceDesc.$item->getName()) > 10000) { - break; - } - $invoiceDesc .= $item->getName() . ', '; - } - return Mage::helper('core/string')->substr($invoiceDesc, 0, -2); - } -} diff --git a/app/code/core/Mage/Ogone/Model/Api/Debug.php b/app/code/core/Mage/Ogone/Model/Api/Debug.php deleted file mode 100644 index fb00951991..0000000000 --- a/app/code/core/Mage/Ogone/Model/Api/Debug.php +++ /dev/null @@ -1,40 +0,0 @@ -_init('ogone/api_debug'); - } -} diff --git a/app/code/core/Mage/Ogone/Model/Config.php b/app/code/core/Mage/Ogone/Model/Config.php deleted file mode 100644 index e75a4f760e..0000000000 --- a/app/code/core/Mage/Ogone/Model/Config.php +++ /dev/null @@ -1,151 +0,0 @@ -decrypt($this->getConfigData('secret_key_in', $storeId)); - } - - /** - * Return SHA1-out crypt key from config. Setup on admin place. - * @param int $storeId - * @return string - */ - public function getShaOutCode($storeId=null) - { - return Mage::helper('core')->decrypt($this->getConfigData('secret_key_out', $storeId)); - } - - /** - * Return gateway path, get from confing. Setup on admin place. - * - * @param int $storeId - * @return string - */ - public function getGatewayPath($storeId=null) - { - return $this->getConfigData('ogone_gateway', $storeId); - } - - /** - * Get PSPID, affiliation name in ogone system - * - * @param int $storeId - * @return string - */ - public function getPSPID($storeId=null) - { - return $this->getConfigData('pspid', $storeId); - } - - /** - * Get paypage template for magento style templates using - * - * @return string - */ - public function getPayPageTemplate() - { - return Mage::getUrl('ogone/api/paypage'); - } - - /** - * Return url which ogone system will use as accept - * - * @return string - */ - public function getAcceptUrl() - { - return Mage::getUrl('ogone/api/accept'); - } - - /** - * Return url which ogone system will use as decline url - * - * @return string - */ - public function getDeclineUrl() - { - return Mage::getUrl('ogone/api/decline'); - } - - /** - * Return url which ogone system will use as exception url - * - * @return string - */ - public function getExceptionUrl() - { - return Mage::getUrl('ogone/api/exception'); - } - - /** - * Return url which ogone system will use as cancel url - * - * @return string - */ - public function getCancelUrl() - { - return Mage::getUrl('ogone/api/cancel'); - } - - /** - * Return url which ogone system will use as our magento home url on ogone success page - * - * @return string - */ - public function getHomeUrl() - { - return Mage::getUrl('checkout/cart'); - } -} diff --git a/app/code/core/Mage/Ogone/Model/Mysql4/Api/Debug.php b/app/code/core/Mage/Ogone/Model/Mysql4/Api/Debug.php deleted file mode 100644 index ef075451e4..0000000000 --- a/app/code/core/Mage/Ogone/Model/Mysql4/Api/Debug.php +++ /dev/null @@ -1,40 +0,0 @@ -_init('ogone/api_debug', 'debug_id'); - } -} diff --git a/app/code/core/Mage/Ogone/Model/Source/PaymentAction.php b/app/code/core/Mage/Ogone/Model/Source/PaymentAction.php deleted file mode 100644 index 4c21a81571..0000000000 --- a/app/code/core/Mage/Ogone/Model/Source/PaymentAction.php +++ /dev/null @@ -1,45 +0,0 @@ - '', 'label' => Mage::helper('ogone')->__('Ogone default Operation')), - array('value' => Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE, 'label' => Mage::helper('ogone')->__('Authorization')), - array('value' => Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE, 'label' => Mage::helper('ogone')->__('Direct Sale')), - ); - } -} diff --git a/app/code/core/Mage/Ogone/Model/Source/Pmlist.php b/app/code/core/Mage/Ogone/Model/Source/Pmlist.php deleted file mode 100644 index 0552ed8fdf..0000000000 --- a/app/code/core/Mage/Ogone/Model/Source/Pmlist.php +++ /dev/null @@ -1,45 +0,0 @@ - Mage_Ogone_Model_Api::PMLIST_HORISONTAL_LEFT, 'label' => Mage::helper('ogone')->__('Horizontally grouped logo with group name on left')), - array('value' => Mage_Ogone_Model_Api::PMLIST_HORISONTAL, 'label' => Mage::helper('ogone')->__('Horizontally grouped logo with no group name')), - array('value' => Mage_Ogone_Model_Api::PMLIST_VERTICAL, 'label' => Mage::helper('ogone')->__('Verical list')), - ); - } -} diff --git a/app/code/core/Mage/Ogone/Model/Source/Template.php b/app/code/core/Mage/Ogone/Model/Source/Template.php deleted file mode 100644 index ee49d3bd87..0000000000 --- a/app/code/core/Mage/Ogone/Model/Source/Template.php +++ /dev/null @@ -1,44 +0,0 @@ - Mage_Ogone_Model_Api::TEMPLATE_OGONE, 'label' => Mage::helper('ogone')->__('Ogone')), - array('value' => Mage_Ogone_Model_Api::TEMPLATE_MAGENTO, 'label' => Mage::helper('ogone')->__('Magento')), - ); - } -} diff --git a/app/code/core/Mage/Ogone/controllers/ApiController.php b/app/code/core/Mage/Ogone/controllers/ApiController.php deleted file mode 100644 index c764deda55..0000000000 --- a/app/code/core/Mage/Ogone/controllers/ApiController.php +++ /dev/null @@ -1,492 +0,0 @@ -_order)) { - $orderId = $this->getRequest()->getParam('orderID'); - $this->_order = Mage::getModel('sales/order'); - $this->_order->loadByIncrementId($orderId); - } - return $this->_order; - } - - /** - * Validation of incoming Ogone data - * - * @return bool - */ - protected function _validateOgoneData() - { - if ($this->_getApi()->getDebug()) { - $debug = Mage::getModel('ogone/api_debug') - ->setDir('in') - ->setUrl($this->getRequest()->getPathInfo()) - ->setData('data',http_build_query($this->getRequest()->getParams())) - ->save(); - } - - $params = $this->getRequest()->getParams(); - $secureKey = $this->_getApi()->getConfig()->getShaInCode(); - $secureSet = $this->_getSHAInSet($params, $secureKey); - - if (Mage::helper('ogone')->shaCryptValidation($secureSet, $params['SHASIGN'])!=true) { - $this->_getCheckout()->addError($this->__('Hash is not valid')); - return false; - } - - $order = $this->_getOrder(); - if (!$order->getId()){ - $this->_getCheckout()->addError($this->__('Order is not valid')); - return false; - } - - return true; - } - - /** - * Load place from layout to make POST on ogone - */ - public function placeformAction() - { - $lastIncrementId = $this->_getCheckout()->getLastRealOrderId(); - if ($lastIncrementId) { - $order = Mage::getModel('sales/order'); - $order->loadByIncrementId($lastIncrementId); - if ($order->getId()) { - $order->setState(Mage_Sales_Model_Order::STATE_PENDING_PAYMENT, Mage_Ogone_Model_Api::PENDING_OGONE_STATUS, Mage::helper('ogone')->__('Start ogone processing')); - $order->save(); - - if ($this->_getApi()->getDebug()) { - $debug = Mage::getModel('ogone/api_debug') - ->setDir('out') - ->setUrl($this->getRequest()->getPathInfo()) - ->setData('data', http_build_query($this->_getApi()->getFormFields($order))) - ->save(); - } - } - } - - $this->_getCheckout()->getQuote()->setIsActive(false)->save(); - $this->_getCheckout()->setOgoneQuoteId($this->_getCheckout()->getQuoteId()); - $this->_getCheckout()->setOgoneLastSuccessQuoteId($this->_getCheckout()->getLastSuccessQuoteId()); - $this->_getCheckout()->clear(); - - $this->loadLayout(); - $this->renderLayout(); - } - - /** - * Display our pay page, need to ogone payment with external pay page mode * - */ - public function paypageAction() - { - $this->loadLayout(); - $this->renderLayout(); - } - - /** - * Action to control postback data from ogone - * - */ - public function postBackAction() - { - if (!$this->_validateOgoneData()) { - $this->getResponse()->setHeader("Status", "404 Not Found"); - return false; - } - - $this->_ogoneProcess(); - } - - /** - * Action to process ogone offline data - * - */ - public function offlineProcessAction() - { - if (!$this->_validateOgoneData()) { - $this->getResponse()->setHeader("Status","404 Not Found"); - return false; - } - $this->_ogoneProcess(); - } - - /** - * Made offline ogone data processing, depending of incoming statuses - */ - protected function _ogoneProcess() - { - $status = $this->getRequest()->getParam('STATUS'); - switch ($status) { - case Mage_Ogone_Model_Api::OGONE_AUTHORIZED : - case Mage_Ogone_Model_Api::OGONE_AUTH_PROCESSING: - case Mage_Ogone_Model_Api::OGONE_PAYMENT_REQUESTED_STATUS : - $this->_acceptProcess(); - break; - case Mage_Ogone_Model_Api::OGONE_AUTH_REFUZED: - case Mage_Ogone_Model_Api::OGONE_PAYMENT_INCOMPLETE: - case Mage_Ogone_Model_Api::OGONE_TECH_PROBLEM: - $this->_declineProcess(); - break; - case Mage_Ogone_Model_Api::OGONE_AUTH_UKNKOWN_STATUS: - case Mage_Ogone_Model_Api::OGONE_PAYMENT_UNCERTAIN_STATUS: - $this->_exceptionProcess(); - break; - default: - //all unknown transaction will accept as exceptional - $this->_exceptionProcess(); - } - } - - /** - * when payment gateway accept the payment, it will land to here - * need to change order status as processed ogone - * update transaction id - * - */ - public function acceptAction() - { - if (!$this->_validateOgoneData()) { - $this->_redirect('checkout/cart'); - return; - } - $this->_ogoneProcess(); - } - - /** - * Process success action by accept url - */ - protected function _acceptProcess() - { - $params = $this->getRequest()->getParams(); - $order = $this->_getOrder(); - - $this->_getCheckout()->setLastSuccessQuoteId($order->getQuoteId()); - - $this->_prepareCCInfo($order, $params); - $order->getPayment()->setLastTransId($params['PAYID']); - - try{ - if ($this->_getApi()->getPaymentAction()==Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE) { - $this->_processDirectSale(); - } else { - $this->_processAuthorize(); - } - }catch(Exception $e) { - $this->_getCheckout()->addError(Mage::helper('ogone')->__('Order can\'t save')); - $this->_redirect('checkout/cart'); - return; - } - } - - /** - * Process Configured Payment Action: Direct Sale, create invoce if state is Pending - * - */ - protected function _processDirectSale() - { - $order = $this->_getOrder(); - $status = $this->getRequest()->getParam('STATUS'); - try{ - if ($status == Mage_Ogone_Model_Api::OGONE_AUTH_PROCESSING) { - $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, Mage_Ogone_Model_Api::WAITING_AUTHORIZATION, Mage::helper('ogone')->__('Authorization Waiting from Ogone')); - $order->save(); - }elseif ($order->getState()==Mage_Sales_Model_Order::STATE_PENDING_PAYMENT) { - if ($status == Mage_Ogone_Model_Api::OGONE_AUTHORIZED) { - if ($order->getStatus() != Mage_Sales_Model_Order::STATE_PENDING_PAYMENT) { - $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, Mage_Ogone_Model_Api::PROCESSING_OGONE_STATUS, Mage::helper('ogone')->__('Processed by Ogone')); - } - } else { - $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, Mage_Ogone_Model_Api::PROCESSED_OGONE_STATUS, Mage::helper('ogone')->__('Processed by Ogone')); - } - - if (!$order->getInvoiceCollection()->getSize()) { - $invoice = $order->prepareInvoice(); - $invoice->register(); - $invoice->setState(Mage_Sales_Model_Order_Invoice::STATE_PAID); - $invoice->getOrder()->setIsInProcess(true); - - $transactionSave = Mage::getModel('core/resource_transaction') - ->addObject($invoice) - ->addObject($invoice->getOrder()) - ->save(); - $order->sendNewOrderEmail(); - } - } else { - $order->save(); - } - $this->_redirect('checkout/onepage/success'); - return; - } catch (Exception $e) { - $this->_getCheckout()->addError(Mage::helper('ogone')->__('Order can\'t save')); - $this->_redirect('checkout/cart'); - return; - } - } - - /** - * Process Configured Payment Actions: Authorized, Default operation - * just place order - */ - protected function _processAuthorize() - { - $order = $this->_getOrder(); - $status = $this->getRequest()->getParam('STATUS'); - try { - if ($status == Mage_Ogone_Model_Api::OGONE_AUTH_PROCESSING) { - $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, Mage_Ogone_Model_Api::WAITING_AUTHORIZATION, Mage::helper('ogone')->__('Authorization Waiting from Ogone')); - } else { - //to send new order email only when state is pending payment - if ($order->getState()==Mage_Sales_Model_Order::STATE_PENDING_PAYMENT) { - $order->sendNewOrderEmail(); - } - $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, Mage_Ogone_Model_Api::PROCESSED_OGONE_STATUS, Mage::helper('ogone')->__('Processed by Ogone')); - } - $order->save(); - $this->_redirect('checkout/onepage/success'); - return; - } catch(Exception $e) { - $this->_getCheckout()->addError(Mage::helper('ogone')->__('Order can\'t save')); - $this->_redirect('checkout/cart'); - return; - } - } - - /** - * We get some CC info from ogone, so we must save it - * - * @param Mage_Sales_Model_Order $order - * @param array $ccInfo - * - * @return Mage_Ogone_ApiController - */ - protected function _prepareCCInfo($order, $ccInfo) - { - $order->getPayment()->setCcOwner($ccInfo['CN']); - $order->getPayment()->setCcNumberEnc($ccInfo['CARDNO']); - $order->getPayment()->setCcLast4(substr($ccInfo['CARDNO'], -4)); - $order->getPayment()->setCcExpMonth(substr($ccInfo['ED'], 0, 2)); - $order->getPayment()->setCcExpYear(substr($ccInfo['ED'], 2, 2)); - return $this; - } - - - /** - * the payment result is uncertain - * exception status can be 52 or 92 - * need to change order status as processing ogone - * update transaction id - * - */ - public function exceptionAction() - { - if (!$this->_validateOgoneData()) { - $this->_redirect('checkout/cart'); - return; - } - $this->_exceptionProcess(); - } - - /** - * Process exception action by ogone exception url - */ - public function _exceptionProcess() - { - $params = $this->getRequest()->getParams(); - $order = $this->_getOrder(); - - $exception = ''; - switch($params['STATUS']) { - case Mage_Ogone_Model_Api::OGONE_PAYMENT_UNCERTAIN_STATUS : - $exception = Mage::helper('ogone')->__('Payment uncertain: A technical problem arose during payment process, giving unpredictable result'); - break; - case Mage_Ogone_Model_Api::OGONE_AUTH_UKNKOWN_STATUS : - $exception = Mage::helper('ogone')->__('Authorization not known: A technical problem arose during authorization process, giving unpredictable result'); - break; - default: - $exception = Mage::helper('ogone')->__('Unknown exception'); - } - - if (!empty($exception)) { - try{ - $this->_getCheckout()->setLastSuccessQuoteId($order->getQuoteId()); - $this->_prepareCCInfo($order, $params); - $order->getPayment()->setLastTransId($params['PAYID']); - //to send new order email only when state is pending payment - if ($order->getState()==Mage_Sales_Model_Order::STATE_PENDING_PAYMENT) { - $order->sendNewOrderEmail(); - $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, Mage_Ogone_Model_Api::PROCESSING_OGONE_STATUS, $exception); - } else { - $order->addStatusToHistory(Mage_Ogone_Model_Api::PROCESSING_OGONE_STATUS, $exception); - } - $order->save(); - }catch(Exception $e) { - $this->_getCheckout()->addError(Mage::helper('ogone')->__('Order can not be save for system reason')); - } - } else { - $this->_getCheckout()->addError(Mage::helper('ogone')->__('Exception not defined')); - } - - $this->_redirect('checkout/onepage/success'); - } - - /** - * when payment got decline - * need to change order status to cancelled - * take the user back to shopping cart - * - */ - public function declineAction() - { - if (!$this->_validateOgoneData()) { - $this->_redirect('checkout/cart'); - return; - } - $this->_getCheckout()->setQuoteId($this->_getCheckout()->getOgoneQuoteId()); - $this->_declineProcess(); - return $this; - } - - /** - * Process decline action by ogone decline url - */ - protected function _declineProcess() - { - $status = Mage_Ogone_Model_Api::DECLINE_OGONE_STATUS; - $comment = Mage::helper('ogone')->__('Declined Order on ogone side'); - $this->_getCheckout()->addError(Mage::helper('ogone')->__('Payment transaction has been declined.')); - $this->_cancelOrder($status, $comment); - } - - /** - * when user cancel the payment - * change order status to cancelled - * need to rediect user to shopping cart - * - * @return Mage_Ogone_ApiController - */ - public function cancelAction() - { - if (!$this->_validateOgoneData()) { - $this->_redirect('checkout/cart'); - return; - } - $this->_getCheckout()->setQuoteId($this->_getCheckout()->getOgoneQuoteId()); - $this->_cancelProcess(); - return $this; - } - - /** - * Process cancel action by cancel url - * - * @return Mage_Ogone_ApiController - */ - public function _cancelProcess() - { - $status = Mage_Ogone_Model_Api::CANCEL_OGONE_STATUS; - $comment = Mage::helper('ogone')->__('Order canceled on ogone side'); - $this->_cancelOrder($status, $comment); - return $this; - } - - /** - * Cancel action, used for decline and cancel processes - * - * @return Mage_Ogone_ApiController - */ - protected function _cancelOrder($status, $comment='') - { - $order = $this->_getOrder(); - try{ - $order->cancel(); - $order->setState(Mage_Sales_Model_Order::STATE_CANCELED, $status, $comment); - $order->save(); - }catch(Exception $e) { - $this->_getCheckout()->addError(Mage::helper('ogone')->__('Order can not be canceled for system reason')); - } - - $this->_redirect('checkout/cart'); - return $this; - } - - /** - * Return set of data which is ready for SHA crypt - * - * @param array $data - * @param string $key - * - * @return string - */ - protected function _getSHAInSet($params, $key) - { - return $this->getRequest()->getParam('orderID') . - $this->getRequest()->getParam('currency') . - $this->getRequest()->getParam('amount') . - $this->getRequest()->getParam('PM') . - $this->getRequest()->getParam('ACCEPTANCE') . - $this->getRequest()->getParam('STATUS') . - $this->getRequest()->getParam('CARDNO') . - $this->getRequest()->getParam('PAYID') . - $this->getRequest()->getParam('NCERROR') . - $this->getRequest()->getParam('BRAND') . $key; - } -} diff --git a/app/code/core/Mage/Ogone/etc/config.xml b/app/code/core/Mage/Ogone/etc/config.xml deleted file mode 100644 index cd68a4b1ae..0000000000 --- a/app/code/core/Mage/Ogone/etc/config.xml +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - 0.0.1 - - - - - - Mage_Ogone_Model - ogone_mysql4 - - - Mage_Ogone_Model_Mysql4 - - ogone_api_debug
-
-
-
- - - - Mage_Ogone - - - core_setup - - - - - core_write - - - - - core_read - - - - - - Mage_Ogone_Block - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - ogone.xml - - - - - /ogone/api - - - - standard - - Mage_Ogone - ogone - - - - - - - - - ogone/api - Ogone - - authorize - - https://secure.ogone.com/ncol/test/orderstandard.asp - pending_ogone - cancel_ogone - decline_ogone - processing_ogone - processed_ogone - waiting_authorozation - - - -
diff --git a/app/code/core/Mage/Ogone/etc/system.xml b/app/code/core/Mage/Ogone/etc/system.xml deleted file mode 100644 index ba839b1ead..0000000000 --- a/app/code/core/Mage/Ogone/etc/system.xml +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - - - - -
-
-


Signing up with Ogone

-

Please enter the correct post back url and offline processiong url in Ogone configuration

-

post back url example: http://myMagentoStore.com/ogone/api/postBack

-

offline processing url example: http://myMagentoStore.com/ogone/api/offlineProcess

-
-
-]]>
- text - 800 - 1 - 1 - 1 - - - - select - adminhtml/system_config_source_yesno - 1 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 2 - 1 - 1 - 0 - - - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>3</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - - - - text - PSPID is a case sensitive field - 4 - 1 - 1 - 0 - - - - - Use in Feedback data checking by Magento - ]]> - adminhtml/system_config_backend_encrypted - obscure - 5 - 1 - 1 - 0 - - - - - Use in data checking by Ogone before the payment. - ]]> - adminhtml/system_config_backend_encrypted - obscure - 6 - 1 - 1 - 0 - - - - text - For production, replace "test" with "prod" Example: https://secure.ogone.com/ncol/prod/orderstandard.asp - 7 - 1 - 1 - 0 - - - - select - ogone/source_paymentAction - If you choose "No Operation", Ogone will use default Payment procedure setup in Ogone configuration - 8 - 1 - 1 - 0 - - - - - text - 11 - 1 - 1 - 1 - - - - text - - 12 - 1 - 1 - 1 - - - - text - - 13 - 1 - 1 - 1 - - - - text - - 14 - 1 - 1 - 1 - - - - text - - 15 - 1 - 1 - 1 - - - - text - 16 - 1 - 1 - 1 - - - - text - - 17 - 1 - 1 - 1 - - - - text - - 18 - 1 - 1 - 1 - - - - text - The URL must be absolute and stored on a secure server. - ]]> - 19 - 1 - 1 - 1 - - - - select - ogone/source_pmlist - You can arrange the layout/list of the payment methods on Ogone payment page - 20 - 1 - 1 - 1 - - -
-
-
-
-
diff --git a/app/code/core/Mage/Ogone/sql/ogone_setup/mysql4-install-0.0.1.php b/app/code/core/Mage/Ogone/sql/ogone_setup/mysql4-install-0.0.1.php deleted file mode 100644 index 4893dbd1ff..0000000000 --- a/app/code/core/Mage/Ogone/sql/ogone_setup/mysql4-install-0.0.1.php +++ /dev/null @@ -1,46 +0,0 @@ -startSetup(); - -$installer->run(" - -DROP TABLE IF EXISTS `{$this->getTable('ogone/api_debug')}`; -CREATE TABLE `{$this->getTable('ogone/api_debug')}` ( - `debug_id` int(10) unsigned NOT NULL auto_increment, - `dir` enum('in', 'out'), - `debug_at` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `url` varchar(255), - `data` text, - PRIMARY KEY (`debug_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -"); - -$installer->endSetup(); diff --git a/app/code/core/Mage/Oscommerce/Block/Adminhtml/Import.php b/app/code/core/Mage/Oscommerce/Block/Adminhtml/Import.php deleted file mode 100644 index 5a644813bf..0000000000 --- a/app/code/core/Mage/Oscommerce/Block/Adminhtml/Import.php +++ /dev/null @@ -1,43 +0,0 @@ - - */ - -class Mage_Oscommerce_Block_Adminhtml_Import extends Mage_Adminhtml_Block_Widget_Grid_Container -{ - protected $_blockGroup = 'oscommerce'; - public function __construct() - { - $this->_controller = 'adminhtml_import'; - $this->_headerText = Mage::helper('adminhtml')->__('Manage osCommerce Profiles'); - $this->_addButtonLabel = Mage::helper('adminhtml')->__('Add New osCommerce Profile'); - parent::__construct(); - } -} diff --git a/app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Edit.php b/app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Edit.php deleted file mode 100644 index d83add003b..0000000000 --- a/app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Edit.php +++ /dev/null @@ -1,68 +0,0 @@ - - */ - -class Mage_Oscommerce_Block_Adminhtml_Import_Edit extends Mage_Adminhtml_Block_Widget_Form_Container -{ - protected $_blockGroup = 'oscommerce'; - - public function __construct() - { - $this->_objectId = 'id'; - $this->_controller = 'adminhtml_import'; - $this->_updateButton('save', 'label', Mage::helper('oscommerce')->__('Save Profile')); - $this->_updateButton('delete', 'label', Mage::helper('oscommerce')->__('Delete Profile')); - $this->_addButton('save_and_edit_button', - array( - 'label' => Mage::helper('oscommerce')->__('Save And Continue Edit'), - 'onclick' => 'saveAndContinueEdit()', - 'class' => 'save' - ), 100 - - ); - $this->_formScripts[] = " - function saveAndContinueEdit(){ - editForm.submit($('edit_form').action+'continue/back/'); - } - "; - parent::__construct(); - } - - public function getHeaderText() - { - if (Mage::registry('oscommerce_adminhtml_import')->getId()) { // TOCHECK - return Mage::helper('oscommerce')->__('Edit osCommerce Profile :: %s', Mage::registry('oscommerce_adminhtml_import')->getName()); - } - else { - return Mage::helper('oscommerce')->__('New osCommerce Profile'); - } - } -} diff --git a/app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Edit/Form.php b/app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Edit/Form.php deleted file mode 100644 index 7c6f9e59d4..0000000000 --- a/app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Edit/Form.php +++ /dev/null @@ -1,52 +0,0 @@ - - */ - -class Mage_Oscommerce_Block_Adminhtml_Import_Edit_Form extends Mage_Adminhtml_Block_Widget_Form -{ - protected function _prepareForm() - { - $form = new Varien_Data_Form(array('id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'POST')); - - $model = Mage::registry('oscommerce_adminhtml_import'); - - if ($model->getId()) { - $form->addField('import_id', 'hidden', array( - 'name' => 'import_id', - )); - $form->setValues($model->getData()); - } - - $form->setUseContainer(true); - $this->setForm($form); - return parent::_prepareForm(); - } -} diff --git a/app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Edit/Tab/General.php b/app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Edit/Tab/General.php deleted file mode 100644 index 2a0111cb94..0000000000 --- a/app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Edit/Tab/General.php +++ /dev/null @@ -1,110 +0,0 @@ - - */ -class Mage_Oscommerce_Block_Adminhtml_Import_Edit_Tab_General extends Mage_Adminhtml_Block_Widget_Form -{ - - function initForm() - { - $model = Mage::registry('oscommerce_adminhtml_import'); - - - $form = new Varien_Data_Form(array('id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post')); - - if ($model->getId()) { - $form->addField('import_id', 'hidden', array( - 'name' => 'import_id', - )); - } - $fieldset = $form->addFieldset('base_fieldset', array('legend'=>Mage::helper('oscommerce')->__('General Information'))); - $fieldset->addField('name', 'text', array( - 'label' => $this->__('Name'), - 'title' => $this->__('Name'), - 'name' => 'name', - 'required' => true, - )); - - $fieldset->addField('host', 'text', array( - 'label' => $this->__('IP or Hostname'), - 'title' => $this->__('IP or Hostname'), - 'name' => 'host', - 'required' => true, - )); - -// $fieldset->addField('port', 'text', array( -// 'label' => $this->__('Port (Default as 3306)'), -// 'title' => $this->__('Port (Default as 3306)'), -// 'name' => 'port', -// 'required' => true, -// 'value' => $model->getData('port') ? $model->getData('port'): Mage_Oscommerce_Model_Oscommerce::DEFAULT_PORT -// )); - - $fieldset->addField('db_name', 'text', array( - 'label' => $this->__('DB Name'), - 'title' => $this->__('DB Name'), - 'name' => 'db_name', - 'required' => true, - )); - - $fieldset->addField('db_user', 'text', array( - 'label' => $this->__('DB Username'), - 'title' => $this->__('DB Username'), - 'name' => 'db_user', - 'required' => true, - )); - - $fieldset->addField('db_password', 'password', array( - 'label' => $this->__('DB Password'), - 'title' => $this->__('DB Password'), - 'name' => 'db_password', - )); - - $fieldset->addField('table_prefix', 'text', array( - 'label' => $this->__('Prefix'), - 'title' => $this->__('Prefix'), - 'name' => 'table_prefix', - )); - - $fieldset->addField('send_subscription', 'checkbox', array( - 'label' => $this->__('Send subscription notify to customers'), - 'title' => $this->__('Send subscription notify to customers'), - 'name' => 'send_subscription', - 'values' => $this->getData('send_subscription'), - 'checked' => $this->getData('send_subscription'), - )); - - $form->setValues($model->getData()); - - $this->setForm($form); - - return $this; - } -} diff --git a/app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Edit/Tab/Run.php b/app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Edit/Tab/Run.php deleted file mode 100644 index 7e2c59f5da..0000000000 --- a/app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Edit/Tab/Run.php +++ /dev/null @@ -1,239 +0,0 @@ - - */ -class Mage_Oscommerce_Block_Adminhtml_Import_Edit_Tab_Run extends Mage_Adminhtml_Block_Template -{ - protected function _construct() - { - parent::_construct(); - $this->setTemplate('oscommerce/convert/run.phtml'); - } - - /** - * Prepares layout of block - * - */ - protected function _prepareLayout() - { - $this->setChild('save_button', - $this->getLayout()->createBlock('adminhtml/widget_button') - ->setData(array( - 'label' => Mage::helper('oscommerce')->__('Start Runing!'), - 'class' => 'run', - 'id' => 'run_import' - )) - - ); - - $this->setChild('check_button', - $this->getLayout()->createBlock('adminhtml/widget_button') - ->setData(array( - 'label' => Mage::helper('oscommerce')->__('Check requirements!'), - 'class' => 'run', - 'id' => 'check_import' - )) - - ); - - } - - public function getImportId() - { - return Mage::registry('oscommerce_adminhtml_import')->getId(); - } - - /** - * Retrieve run url - * - * @return string - */ - public function getSubmitUrl() - { - return $this->getUrl('*/*/run/', array('id'=>$this->getOscId())); - } - - /** - * Retrive run button html - * - * @return string - */ - public function getSaveButtonHtml() - { - return $this->getChildHtml('save_button'); - } - - public function getCheckButtonHtml() - { - return $this->getChildHtml('check_button'); - } - - public function getWebsiteOptionHtml() - { - - $html = ''; - return $html; - } - - public function getTimezoneOptionHtml() - { - $html = ''; - return $html; - - } - - /** - * Get list available for mysql connection charsets - * - * @return array - */ - public function getConnectionCharsets() - { - $charsetList = array(); - $fileName = Mage::getModuleDir('etc','Mage_Oscommerce').DS.'charsets.xml'; - if (is_readable($fileName)) { - $xml = new Varien_Simplexml_Config(); - $xml->loadFile($fileName); - $charsets = $xml->getNode('charset'); - foreach($charsets as $charset) { - $attributes = $charset->attributes(); - $code = (string) $attributes['name']; - $charsetList[$code] = (string)$charset->family; - } - } - return $charsetList; - } - - /** - * Get list available for iconv function charsets - * - * @return array - */ - public function getDataCharsets() - { - $charsetList = array( - 'BIG-5' => Mage::helper('oscommerce')->__('Traditional Chinese'), - 'ISO-8859-2' => Mage::helper('oscommerce')->__('Central European'), - 'CP850' => Mage::helper('oscommerce')->__('Western'), - 'ISO-8859-1' => Mage::helper('oscommerce')->__('Western'), - 'HP-ROMAN8' => Mage::helper('oscommerce')->__('Western'), - 'KOI8-R' => Mage::helper('oscommerce')->__('Cyrillic'), - 'ASCII' => Mage::helper('oscommerce')->__('Western'), - 'EUC-JP' => Mage::helper('oscommerce')->__('Japanese'), - 'SHIFT-JIS' => Mage::helper('oscommerce')->__('Japanese'), - 'windows-1251' => Mage::helper('oscommerce')->__('Cyrillic'), - 'ISO-8859-8' => Mage::helper('oscommerce')->__('Hebrew'), - 'TIS-620' => Mage::helper('oscommerce')->__('Thai'), - 'EUC-KR' => Mage::helper('oscommerce')->__('Korean'), - 'ISO-8859-13' => Mage::helper('oscommerce')->__('Baltic'), - 'KOI8-U' => Mage::helper('oscommerce')->__('Cyrillic'), - 'CHINESE' => Mage::helper('oscommerce')->__('Simplified Chinese'), - 'ISO-8859-7' => Mage::helper('oscommerce')->__('Greek'), - 'WINDOWS-1250' => Mage::helper('oscommerce')->__('Central European'), - 'CP936' => Mage::helper('oscommerce')->__('East Asian'), - 'WINDOWS-1257' => Mage::helper('oscommerce')->__('Baltic'), - 'ISO-8859-9' => Mage::helper('oscommerce')->__('South Asian'), - 'ARMSCII-8' => Mage::helper('oscommerce')->__('South Asian'), - 'UTF-8' => Mage::helper('oscommerce')->__('Unicode'), - 'UCS-2' => Mage::helper('oscommerce')->__('Unicode'), - 'CP866' => Mage::helper('oscommerce')->__('Cyrillic'), - 'MACCENTRALEUROPE' => Mage::helper('oscommerce')->__('Central European'), - 'MAC' => Mage::helper('oscommerce')->__('Western'), - 'CP852' => Mage::helper('oscommerce')->__('Central European'), - 'CP1256' => Mage::helper('oscommerce')->__('Arabic'), - 'CP932' => Mage::helper('oscommerce')->__('Japanese'), - ); - return $charsetList; - } - - public function drowOptions($options = array()) - { - asort($options); - $html = ''; - foreach($options as $code => $name) { - $html.= ''; - } - - return $html; - } - - public function getDataCharsetOptionHtml() - { - - $html = ''; - return $html; - } - - public function getConnectionCharsetOptionHtml() - { - $html = ''; - return $html; - } - - /** - * Deprecated - * - * @return string - */ - public function getCharsetOption() - { - $options = ''; - $fileName = Mage::getModuleDir('etc','Mage_Oscommerce').DS.'charsets.xml'; - if (is_readable($fileName)) { - $xml = new Varien_Simplexml_Config(); - $xml->loadFile($fileName); - $charsets = $xml->getNode('charset'); - foreach($charsets as $charset) { - $attributes = $charset->attributes(); - $options .= ''; - } - } - return $options; - } -} diff --git a/app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Edit/Tabs.php b/app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Edit/Tabs.php deleted file mode 100644 index 4fd02294f6..0000000000 --- a/app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Edit/Tabs.php +++ /dev/null @@ -1,66 +0,0 @@ - - */ -class Mage_Oscommerce_Block_Adminhtml_Import_Edit_Tabs extends Mage_Adminhtml_Block_Widget_Tabs -{ - public function __construct() - { - parent::__construct(); - $this->setId('oscommerce_import_tabs'); - $this->setDestElementId('edit_form'); - $this->setTitle(Mage::helper('oscommerce')->__('osCommerce Profile')); - } - - protected function _beforeToHtml() - { - $model = Mage::registry('oscommerce_adminhtml_import'); - - $generalBlock = $this->getLayout()->createBlock('oscommerce/adminhtml_import_edit_tab_general'); - $generalBlock->addData($model->getData()); - - $new = !$model->getId(); - - $this->addTab('general', array( - 'label' => Mage::helper('oscommerce')->__('General Information'), - 'content' => $generalBlock->initForm()->toHtml(), - 'active' => true, - )); - - if (!$new) { - $this->addTab('run', array( - 'label' => Mage::helper('oscommerce')->__('Run Profile'), - 'content' => $this->getLayout()->createBlock('oscommerce/adminhtml_import_edit_tab_run')->toHtml(), - )); - } - - return parent::_beforeToHtml(); - } -} diff --git a/app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Grid.php b/app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Grid.php deleted file mode 100644 index c078101671..0000000000 --- a/app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Grid.php +++ /dev/null @@ -1,94 +0,0 @@ - - */ - -class Mage_Oscommerce_Block_Adminhtml_Import_Grid extends Mage_Adminhtml_Block_Widget_Grid -{ - - public function __construct() - { - parent::__construct(); - $this->setId('convertOscGrid'); - $this->setDefaultSort('id'); - } - - protected function _prepareCollection() - { - $collection = Mage::getModel('oscommerce/oscommerce')->getCollection(); - $this->setCollection($collection); - return parent::_prepareCollection(); - } - - protected function _prepareColumns() - { - $this->addColumn('id', array( - 'header' =>Mage::helper('oscommerce')->__('ID'), - 'width' =>'50px', - 'index' =>'import_id', - )); - $this->addColumn('name', array( - 'header' =>Mage::helper('oscommerce')->__('Adapter Name'), - 'index' =>'name', - )); - $this->addColumn('host', array( - 'header' =>Mage::helper('oscommerce')->__('IP or Hostname'), - 'index' =>'host', - 'width' =>'120px', - )); - - $this->addColumn('db_name', array( - 'header' =>Mage::helper('oscommerce')->__('Db Name'), - 'index' =>'db_name', - 'width' =>'120px', - )); - - $this->addColumn('created_at', array( - 'header' =>Mage::helper('oscommerce')->__('Created At'), - 'type' => 'date', - 'align' => 'center', - 'index' =>'created_at', - )); - $this->addColumn('updated_at', array( - 'header' =>Mage::helper('oscommerce')->__('Updated At'), - 'type' => 'date', - 'align' => 'center', - 'index' =>'updated_at', - )); - - return parent::_prepareColumns(); - } - - public function getRowUrl($row) - { - return $this->getUrl('*/*/edit', array('id'=>$row->getId())); - } - -} diff --git a/app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Run.php b/app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Run.php deleted file mode 100644 index 28b81ceeca..0000000000 --- a/app/code/core/Mage/Oscommerce/Block/Adminhtml/Import/Run.php +++ /dev/null @@ -1,293 +0,0 @@ - - */ -class Mage_Oscommerce_Block_Adminhtml_Import_Run extends Mage_Adminhtml_Block_Abstract -{ - public function getImportModel() - { - return Mage::registry('oscommerce_adminhtml_import'); - } - - protected function _toHtml() - { - $importModel = $this->getImportModel(); - - echo ''; - - $headBlock = $this->getLayout()->createBlock('page/html_head'); - $headBlock->addJs('prototype/prototype.js'); - echo $headBlock->getCssJsHtml(); - - echo ' - '.($importModel->getId() ? $this->htmlEscape($importModel->getName()) : $this->__('No osCommerce profile')).' -'; - echo '
    '; - echo '
  • '; - if ($importModel->getId()) { - echo ''; - echo $this->__("Starting profile execution, please wait..."); - echo '
  • '; - echo '
  • '; - echo ''; - echo $this->__("Warning: Please don't close window during importing/exporting data"); - echo '
  • '; - } else { - echo ''; - echo $this->__("No osCommerce profile loaded..."); - } - echo ''; - echo '
'; - - if ($importModel->getId()) { - echo '
    '; - ob_implicit_flush(); - $showFinished = false; - $countItems = 0; - $batchConfig = array( - 'styles' => array( - 'error' => array( - 'icon' => Mage::getDesign()->getSkinUrl('images/error_msg_icon.gif'), - 'bg' => '#FDD' - ), - 'message' => array( - 'icon' => Mage::getDesign()->getSkinUrl('images/fam_bullet_success.gif'), - 'bg' => '#DDF' - ), - 'loader' => Mage::getDesign()->getSkinUrl('images/ajax-loader.gif') - ), - 'template' => '
  • ' - . '' - . '#{text}' - . '
  • ', - 'text' => $this->__('processed %s%% %s/%s records', '#{percent}', '#{updated}', '#{total}'), - 'successText' => $this->__('Total imported %s records (%s)', '#{updated}', '#{totalImported}') - ); - - - echo ''; - - - echo "
"; -echo ' - - -'; - -// echo '
    '; - - - if ($totalRecords = $importModel->getTotalRecords()) { - - $maxRows = $importModel->getResource()->getMaxRows(); - echo ''; - foreach($totalRecords as $importType => $totalRecord) { - echo ''; - $page = floor($totalRecord/$maxRows) + 1; - for ($i = 0; $i < $page; $i++) { - $data = array( - 'import_id' => $importModel->getId(), - 'import_type' => $importType, - 'from' => ($i > 0 ? $i * $maxRows:$i), - 'is_done' => ($i == $page - 1)?true:false - ); - echo ''; - } - -// if ($importType=='categories') { -// $data = array( -// 'import_id' => $importModel->getId(), -// 'import_type' => $importType, -// 'page' => 'all', -// 'is_done' => true -// ); -// echo ''; -// -// } else { -// $page = floor($totalRecord/$maxRows) + 1; -// for ($i = 0; $i < $page; $i++) { -// $data = array( -// 'import_id' => $importModel->getId(), -// 'import_type' => $importType, -// 'from' => ($i > 0 ? $i * $maxRows:$i), -// 'is_done' => ($i == $page - 1)?true:false -// ); -// echo ''; -// } -// } - } - echo ''; - - } - - } - echo ''; - exit; - } -} diff --git a/app/code/core/Mage/Oscommerce/Block/Adminhtml/Order.php b/app/code/core/Mage/Oscommerce/Block/Adminhtml/Order.php deleted file mode 100644 index 7d6758f894..0000000000 --- a/app/code/core/Mage/Oscommerce/Block/Adminhtml/Order.php +++ /dev/null @@ -1,43 +0,0 @@ - - */ - -class Mage_Oscommerce_Block_Adminhtml_Order extends Mage_Adminhtml_Block_Widget_Grid_Container -{ - protected $_blockGroup = 'oscommerce'; - public function __construct() - { - $this->_controller = 'adminhtml_order'; - $this->_headerText = Mage::helper('adminhtml')->__('Manage osCommerce Orders'); - parent::__construct(); - $this->_removeButton('add'); - } -} diff --git a/app/code/core/Mage/Oscommerce/Block/Adminhtml/Order/Grid.php b/app/code/core/Mage/Oscommerce/Block/Adminhtml/Order/Grid.php deleted file mode 100644 index 4c4e84ddb8..0000000000 --- a/app/code/core/Mage/Oscommerce/Block/Adminhtml/Order/Grid.php +++ /dev/null @@ -1,128 +0,0 @@ - - */ - -class Mage_Oscommerce_Block_Adminhtml_Order_Grid extends Mage_Adminhtml_Block_Widget_Grid -{ - - public function __construct() - { - parent::__construct(); - $this->setId('oscommerceOrderGrid'); - $this->setDefaultSort('id'); - } - - protected function _prepareCollection() - { - $collection = Mage::getModel('oscommerce/oscommerce_order')->getCollection(); - $this->setCollection($collection); - return parent::_prepareCollection(); - } - - protected function _prepareColumns() - { - $this->addColumn('order_id', array( - 'header' =>Mage::helper('oscommerce')->__('Order #'), - 'width' =>'50px', - 'index' =>'osc_magento_id', - 'type' => 'number', - )); - - $this->addColumn('billing_name', array( - 'header' =>Mage::helper('oscommerce')->__('Billing to Name'), - 'index' =>'billing_name', - )); - - $this->addColumn('delivery_name', array( - 'header' =>Mage::helper('oscommerce')->__('Ship to Name'), - 'index' =>'delivery_name', - )); - - $this->addColumn('currency', array( - 'header' =>Mage::helper('oscommerce')->__('Currency'), - 'width' =>'50px', - 'index' =>'currency', - )); - - $this->addColumn('orders_total', array( - 'header' =>Mage::helper('oscommerce')->__('Order Total'), - 'width' =>'50px', - 'index' =>'orders_total', - 'type' => 'currency', - 'currency'=>'order_currency_code' - )); - - $this->addColumn('orders_status', array( - 'header' =>Mage::helper('oscommerce')->__('Order Status'), - 'width' =>'50px', - 'index' =>'orders_status', - )); - - $this->addColumn('date_purchased', array( - 'header' => Mage::helper('oscommerce')->__('Purchased Year'), - 'width' => '150px', - 'index' => 'date_purchased', - 'type' => 'datetime', - )); - -// $this->addColumn('purchased_year', array( -// 'header' =>Mage::helper('oscommerce')->__('Purchased Year'), -// 'width' =>'50px', -// 'index' =>'purchased_year', -// 'type' => 'currency', -// 'currency' => 'store_currency_code', -// )); -// -// $this->addColumn('purchased_month', array( -// 'header' =>Mage::helper('oscommerce')->__('Purchased Month'), -// 'width' =>'50px', -// 'index' =>'purchased_month', -// 'type' => 'currency', -// 'currency' => 'store_currency_code', -// )); -// -// $this->addColumn('purchased_day', array( -// 'header' =>Mage::helper('oscommerce')->__('Purchased Date'), -// 'width' =>'50px', -// 'index' =>'purchased_day', -// 'type' => 'currency', -// 'currency' => 'store_currency_code', -// )); - - return parent::_prepareColumns(); - } - - public function getRowUrl($row) - { - return $this->getUrl('*/*/view', array('order_id'=>$row->getId())); - } - -} diff --git a/app/code/core/Mage/Oscommerce/Block/Adminhtml/Order/View.php b/app/code/core/Mage/Oscommerce/Block/Adminhtml/Order/View.php deleted file mode 100644 index 0b9b8697dd..0000000000 --- a/app/code/core/Mage/Oscommerce/Block/Adminhtml/Order/View.php +++ /dev/null @@ -1,102 +0,0 @@ - - */ -class Mage_Oscommerce_Block_Adminhtml_Order_View extends Mage_Adminhtml_Block_Template -{ - - public function __construct() - { - parent::__construct(); - $this->setTemplate('oscommerce/order/view.phtml'); - - - } - - protected function _prepareLayout() - { - $this->setChild('backButton', - $this->getLayout()->createBlock('adminhtml/widget_button') - ->setData(array( - 'label' => Mage::helper('oscommerce')->__('Back'), - 'id' => 'back_button', - 'name' => 'back_button', - 'element_name' => 'back_button', - 'class' => 'scalable back', - 'onclick'=> "setLocation('".$this->getBackUrl()."')", - )) - ); - } - /** - * Retrieve order model object - * - * @return Mage_Sales_Model_Order - */ - public function getOrder() - { - return Mage::registry('current_oscommerce_order'); - } - - /** - * Retrieve Order Identifier - * - * @return int - */ - public function getOrderId() - { - return $this->getOrder()->getId(); - } - - public function getHeaderText() - { - $text = Mage::helper('oscommerce')->__('osCommerce Order # %s | Order Date %s', - $this->getOrder()->getOrdersId(), - $this->formatDate($this->getOrder()->getDatePurchased(), 'medium', true) - ); - return $text; - } - - public function getUrl($params='', $params2=array()) - { - $params2['order_id'] = $this->getOrderId(); - return parent::getUrl($params, $params2); - } - - - public function getBackButtonHtml() - { - return $this->getChildHtml('backButton'); - } - - public function getBackUrl() - { - return $this->getUrl("*/*/"); - } -} diff --git a/app/code/core/Mage/Oscommerce/Block/Order/List.php b/app/code/core/Mage/Oscommerce/Block/Order/List.php deleted file mode 100644 index 5374da7c85..0000000000 --- a/app/code/core/Mage/Oscommerce/Block/Order/List.php +++ /dev/null @@ -1,73 +0,0 @@ - - */ -class Mage_Oscommerce_Block_Order_List extends Mage_Core_Block_Template -{ - protected function _construct() - { - parent::_construct(); - $this->setTemplate('oscommerce/order/list.phtml'); - $customerId = Mage::getSingleton('customer/session')->getCustomerId(); - $websiteId = $websiteId = Mage::app()->getStore()->getWebsiteId(); - $osCommerce = Mage::getModel('oscommerce/oscommerce'); - $oscOrders = $osCommerce->loadOrders($customerId, $websiteId); - $this->setOsCommerceOrders($oscOrders); - } - - protected function _prepareLayout() - { - $orderInfo = $this->getOrder(); - $order = $orderInfo['order']; - if ($headBlock = $this->getLayout()->getBlock('head')) { - $headBlock->setTitle($this->__('Order # %s', $order['orders_id'])); - } - } - - public function getViewOscommerceUrl($order) - { - return $this->getUrl('oscommerce/order/view', array('order_id'=>$order['osc_magento_id'])); - } - - /** - * Retrieve current order model instance - * - * @return Mage_Sales_Model_Order - */ - public function getOrder() - { - return Mage::registry('current_oscommerce_order'); - } - - public function getBackUrl() - { - return Mage::getUrl('*/*/history'); - } -} diff --git a/app/code/core/Mage/Oscommerce/Block/Order/View.php b/app/code/core/Mage/Oscommerce/Block/Order/View.php deleted file mode 100644 index aaee6088ff..0000000000 --- a/app/code/core/Mage/Oscommerce/Block/Order/View.php +++ /dev/null @@ -1,69 +0,0 @@ - - */ -class Mage_Oscommerce_Block_Order_View extends Mage_Core_Block_Template -{ - protected function _construct() - { - parent::_construct(); - $this->setTemplate('oscommerce/order/view.phtml'); - } - - protected function _prepareLayout() - { - $orderInfo = $this->getOrder(); - $order = $orderInfo['order']; - if ($headBlock = $this->getLayout()->getBlock('head')) { - $headBlock->setTitle($this->__('Order # %s', $order['orders_id'])); - } - } - - public function getPaymentInfoHtml() - { - return $this->getChildHtml('payment_info'); - } - - /** - * Retrieve current order model instance - * - * @return Mage_Sales_Model_Order - */ - public function getOrder() - { - return Mage::registry('current_oscommerce_order'); - } - - public function getBackUrl() - { - return Mage::getUrl('sales/order/history'); - } - -} diff --git a/app/code/core/Mage/Oscommerce/Helper/Data.php b/app/code/core/Mage/Oscommerce/Helper/Data.php deleted file mode 100644 index 5553a2e963..0000000000 --- a/app/code/core/Mage/Oscommerce/Helper/Data.php +++ /dev/null @@ -1,35 +0,0 @@ - - */ -class Mage_Oscommerce_Helper_Data extends Mage_Core_Helper_Data -{ - -} diff --git a/app/code/core/Mage/Oscommerce/Model/Config.php b/app/code/core/Mage/Oscommerce/Model/Config.php deleted file mode 100644 index 22f5878abd..0000000000 --- a/app/code/core/Mage/Oscommerce/Model/Config.php +++ /dev/null @@ -1,49 +0,0 @@ - - */ -class Mage_Oscommerce_Model_Config extends Mage_Core_Model_Config_Base -{ - public function __construct() - { - parent::__construct(Mage::getConfig()->getNode('global')); - } - - public function initForeignConnection($data) - { - $connectionNode = $this->getNode('resources/oscommerce_foreign/connection'); - if ($connectionNode) { - $connectionNode->addChild('host', isset($data['host']) ? $data['host'] : ''); - $connectionNode->addChild('username', isset($data['db_user']) ? $data['db_user'] : ''); - $connectionNode->addChild('password', isset($data['db_password']) ? $data['db_password'] : ''); - $connectionNode->addChild('dbname', isset($data['db_name']) ? $data['db_name'] : ''); - } - } -} diff --git a/app/code/core/Mage/Oscommerce/Model/Mysql4/Oscommerce.php b/app/code/core/Mage/Oscommerce/Model/Mysql4/Oscommerce.php deleted file mode 100644 index 19a077e925..0000000000 --- a/app/code/core/Mage/Oscommerce/Model/Mysql4/Oscommerce.php +++ /dev/null @@ -1,2113 +0,0 @@ - - */ -class Mage_Oscommerce_Model_Mysql4_Oscommerce extends Mage_Core_Model_Mysql4_Abstract -{ - const DEFAULT_DISPLAY_MODE = 'PRODUCTS'; - const DEFAULT_IS_ANCHOR = '0'; - const DEFAULT_STORE = 'Default'; - const DEFAULT_PRODUCT_TYPE = 'Simple'; - const DEFAULT_ATTRIBUTE_SET = 'Default'; - const DEFAULT_VISIBILITY = 'Catalog, Search'; - const DEFAULT_LOCALE = 'en_US'; - const DEFAULT_MAGENTO_CHARSET = 'UTF-8'; - const DEFAULT_OSC_CHARSET = 'ISO-8859-1'; - const DEFAULT_FIELD_CHARSET = 'utf8'; - - protected $_currentWebsiteId; - protected $_currentWebsite; - - protected $_importType = array(); - protected $_countryIdToCode = array(); - protected $_countryNameToCode = array(); - protected $_regionCode = array(); - protected $_logData = array(); - protected $_languagesToStores = array(); - protected $_prefix = ''; - protected $_storeLocales = array(); - protected $_rootCategory = ''; - - protected $_websiteCode = ''; - protected $_isProductWithCategories = false; - protected $_setupConnection ; - protected $_customerIdPair = array(); - protected $_categoryIdPair = array(); - protected $_prefixPath = ''; - protected $_stores = array(); - protected $_productsToCategories = array(); - protected $_productsToStores = array(); - protected $_connectionCharset; - protected $_dataCharset; - protected $_maxRows; - protected $_oscStores; - protected $_oscDefaultLanguage; - protected $_oscStoreInformation; - protected $_categoryModel; - protected $_customerModel; - protected $_productModel; - protected $_productAdapterModel; - protected $_orderModel; - protected $_addressModel; - protected $_websiteModel; - protected $_storeGroupModel; - protected $_configModel; - protected $_customerGroupModel; - protected $_storeModel; - protected $_importCollection; - protected $_saveRows = 0; - protected $_errors = array(); - protected $_importModel; - protected $_lengthShortDescription; - protected $_currentUserId; - - protected $_oscTables = array( - 'products', 'customers', 'categories', 'orders', 'languages', - 'orders_products', 'orders_status_history', 'orders_total', - 'products_description', 'address_book', 'categories_description' - ); - - protected function _construct() - { - $this->_init('oscommerce/oscommerce', 'import_id'); - $this->_setupConnection = Mage::getSingleton('core/resource')->getConnection('oscommerce_setup'); - $this->_currentWebsite = Mage::app()->getWebsite(); - $this->_currentWebsiteId = $this->_currentWebsite->getId(); - $this->_maxRows = Mage::getStoreConfig('oscommerce/import/max_rows'); - $this->_lengthShortDescription = Mage::getStoreConfig('oscommerce/import/short_description_length'); - } - - /** - * Get paypal session namespace - * - * @return Mage_Paypal_Model_Session - */ - public function getSession() - { - return Mage::getSingleton('oscommerce/session'); - } - - /** - * Get website object - * - * @return Mage_Core_Model_Website - */ - public function getCurrentWebsite() - { - return $this->_currentWebsite; - } - - protected function _beforeSave(Mage_Core_Model_Abstract $object) - { - if (!$object->getCreatedAt()) { - $object->setCreatedAt($this->formatDate(time())); - } - $object->setUpdatedAt($this->formatDate(time())); - parent::_beforeSave($object); - } - - /** - * Getting external connection adapter - * - * @return object - */ - protected function _getForeignAdapter() - { - return $this->_getConnection('foreign'); - } - - /** - * Get store code by id - * - * @param integer $id - * @return string - */ - public function getStoreCodeById($id) - { - if (!$this->_stores) { - $stores = Mage::app()->getStores(); - foreach($stores as $store) { - $this->_stores[$store->getId()] = $store->getCode(); - } - } - if (isset($this->_stores[$id])) { - return $this->_stores[$id]; - } - return false; - } - - public function setWebsiteCode($code) - { - if (isset($code)) $this->_websiteCode = $code; - } - - /** - * Create new website or set current website as default website - * - * @param integer $websiteId - */ - public function createWebsite($websiteId = null) - { - $importModel = $this->getImportModel(); - $websiteModel = $this->getWebsiteModel(); - if (!is_null($websiteId)) { - $websiteModel->load($websiteId); - } - - if (!$websiteModel->getId()) { - $storeInfo = $this->getOscStoreInformation(); - if ($this->_websiteCode && !($websiteModel->load($this->_websiteCode)->getId())) { - $websiteModel->setName($storeInfo['STORE_NAME']); - $websiteModel->setCode($this->_websiteCode ? $this->_websiteCode : $this->_format($storeInfo['STORE_NAME'])); - $websiteModel->save(); - } - } - - - if ($websiteModel->getId()) { - $this->saveLogs(array( 0 => $websiteModel->getId()), 'website'); - } - - /** - * Create Root category - */ - $this->createRootCategory(); - - /** - * Create default store group - */ - $this->createStoreGroup(); - } - - public function createStoreGroup() - { - $importModel = $this->getImportModel(); - $storeInfo = $this->getOscStoreInformation(); - $websiteModel = $this->getWebsiteModel(); - if (!$websiteModel->getId()) { - $websiteModel->load($this->_currentWebsiteId); // NEED TO GET DEFAULT WEBSITE ID FROM CONFIG - } - $storeGroupModel = $this->getStoreGroupModel(); - $storeGroupModel->unsetData(); - $storeGroupModel->setOrigData(); - - $storeGroupName = Mage::helper('oscommerce')->__('%s Store', $websiteModel->getId() == $this->_currentWebsiteId ? $storeInfo['STORE_NAME'] : $websiteModel->getName()); - $storeGroupModel->setWebsiteId($websiteModel->getId()); - $storeGroupModel->setName($storeGroupName); - $storeGroupModel->setRootCategoryId($this->getRootCategory()->getId()); - - try { - $storeGroupModel->save(); - - $websiteModel->setDefaultGroupId($storeGroupModel->getId()); - $websiteModel->save(); - } - catch (Exception $e) { - - } - - $this->saveLogs(array(0 => $storeGroupModel->getId(), 'group')); - return $this; - } - - public function createRootCategory() - { - $importModel = $this->getImportModel(); - $categoryModel = $this->getCategoryModel(); - $categoryModel->unsetData(); - $categoryModel->setOrigData(); - - $websiteModel = $this->getWebsiteModel(); - if (!$websiteModel->getId()) { - $websiteModel->load($this->_currentWebsiteId); // NEED TO GET DEFAULT WEBSITE ID FROM CONFIG - } - - $storeInfo = $this->getOscStoreInformation(); - - $categoryName = Mage::helper('oscommerce')->__('Root category for %s', $websiteModel->getName()); - - $categoryModel->setStoreId(0); - $categoryModel->setIsActive(1); - $categoryModel->setDisplayMode(self::DEFAULT_DISPLAY_MODE); - $categoryModel->setName($categoryName); - $categoryModel->setParentId(1); - $categoryModel->setPath('1'); - - try { - $categoryModel->save(); - $this->saveLogs(array(0 => $categoryModel->getId()), 'root_category'); - } - catch (Exception $e) { - - } - - $this->setRootCategory(clone $categoryModel); - - return $this; - } - - /** - * Importing store data from osCommerce to Magento - * - * @param Mage_Oscommerce_Model_Oscommerce $obj - */ - public function importStores() - { - $importModel = $this->getImportModel(); - $locales = $this->getStoreLocales(); - $defaultStore = ''; - $storeInformation = $this->getOscStoreInformation(); - $defaultStoreCode = $storeInformation['DEFAULT_LANGUAGE']; - $configModel = $this->getConfigModel(); - $storeModel = $this->getStoreModel(); - $storeGroupModel = $this->getStoreGroupModel(); - $storeGroupId = $storeGroupModel->getId(); - $websiteModel = $this->getWebsiteModel(); - $websiteId = $websiteModel->getId(); - $storePairs = array(); - if ($stores = $this->getOscStores()) { - foreach($stores as $store) { - try { - $oscStoreId = $store['id']; - unset($store['id']); - - $store['group_id'] = $storeGroupId; - $store['website_id'] = $websiteId; - $storeModel->unsetData(); - $storeModel->setOrigData(); - $storeModel->load($store['code']); - if ($storeModel->getId() && $storeModel->getCode() == $store['code']) { - $localeCode = $locales[$store['code']]; - unset($locales[$store['code']]); - $store['code'] = $store['code'].'_'.$websiteId.time(); // for unique store code - $locales[$store['code']] = $localeCode; - } - $store['name'] = $this->convert($store['name']); - $storeModel->unsetData(); - $storeModel->setOrigData(); - $storeModel->setData($store); - $storeModel->save(); - - $storePairs[$oscStoreId] = $storeModel->getId(); - - $storeLocale = isset($locales[$storeModel->getCode()])?$locales[$storeModel->getCode()]: $locales['default']; - - $configModel->unsetData(); - $configModel->setOrigData(); - $configModel->setScope('stores') - ->setScopeId($storeModel->getId()) - ->setPath('general/locale/code') - ->setValue($storeLocale) - ->save(); - if ($store['scode'] == $defaultStoreCode) { - $defaultStore = $storeModel->getId(); - } - Mage::dispatchEvent('store_add', array('store'=>$storeModel)); - } catch (Exception $e) { - //echo $e->getMessage(); - } - } - } - if (sizeof($storePairs) > 0) { - $this->saveLogs($storePairs, 'store'); - } - $this->setStoreLocales($locales); - - if ($defaultStore) { - $storeGroupModel->setDefaultStoreId($defaultStore); - $storeGroupModel->save(); - } - Mage::app()->reinitStores(); - unset($stores); - } - - /** - * Importing customer/address from osCommerce to Magento - * - * @param Mage_Oscommerce_Model_Oscommerce $obj - */ - public function importCustomers($startFrom = 0, $useStartFrom = false, $sendSubscription = true) - { - $this->_resetSaveRows(); - $this->_resetErrors(); - $totalCustomers = $this->getTotalCustomers(); - $maxRows = $this->getMaxRows(); - $pages = floor($totalCustomers / $maxRows) + 1; - - if (!$useStartFrom) { - for ($i = 0; $i < $pages; $i++) { - if ($customers = $this->getCustomers(array('from'=>($i * $maxRows),'max'=>$maxRows))) { - foreach ($customers as $customer) { - $customer['sendSubscription'] = $sendSubscription; - $this->_saveCustomer($customer); - } - } - } - } else { - if ($customers = $this->getCustomers(array('from'=> $startFrom ,'max'=>$maxRows))) { - foreach ($customers as $customer) { - $customer['sendSubscription'] = $sendSubscription; - $this->_saveCustomer($customer); - } - } - } - } - - /** - * Save customer data - * - * @param Mage_Oscommerce_Model_Oscommerce $obj - * @param array $data - */ - protected function _saveCustomer($data = null) { - $addressFieldMapping = array( - 'street' => 'entry_street_address', - 'firstname' => 'entry_firstname', - 'lastname' => 'entry_lastname', - 'city' => 'entry_city', - 'region' => 'entry_state' - ); - $importModel = $this->getImportModel(); - $timezone = $importModel->getTimezone(); - if (!is_null($data)) { - $customerAddresses = array(); - // Getting customer group data - $customerGroupId = Mage::getStoreConfig(Mage_Customer_Model_Group::XML_PATH_DEFAULT_ID); - $customerGroupModel = $this->getCustomerGroupModel()->load($customerGroupId); - $websiteId = $this->getWebsiteModel()->getId(); - $customerModel = $this->getCustomerModel(); - $addressModel = $this->getAddressModel(); - $oscCustomerId = $data['id']; - $data['group_id'] = $customerGroupModel->getName(); - - $prepareCreated = explode(' ', $data['created_at']); - $dateFormat = 'YYYY-MM-dd HH:mm:ss'; - $dateCreated = new Zend_Date(); - $dateCreated->setTimezone($timezone); - $dateCreated->setDate($prepareCreated[0], 'YYYY-MM-dd'); - $dateCreated->setTime($prepareCreated[1], 'HH:mm:ss'); - $dateCreated->setTimezone('GMT'); - $data['created_at'] = $dateCreated->toString($dateFormat); - - foreach($data as $field => $value) { - if (in_array($field, array('firstname', 'lastname'))) { - $value = $this->convert($value); - } - $data[$field] = html_entity_decode($value, ENT_QUOTES, self::DEFAULT_MAGENTO_CHARSET); - - } - - - // Getting addresses - $addresses = $this->getAddresses($data['id']); - if ($addresses) { - foreach ($addresses as $address) { - foreach ($address as $field => $value) { - - if ($field == 'street1') { - $field = 'street'; - } - if ($field == 'country_id') { - $value = $this->getCountryCodeById($value); - $field = 'country'; - } - if ($field == 'region_id' - && in_array($address['country_id'], array(38, 223))) { - $field = 'region'; - } - - if (in_array($field, array_keys($addressFieldMapping))) { - $value = $this->convert($value); - } - - if (!in_array($field, array('customers_id'))) { - $address[$field] = $value; - } else { - unset($address[$field]); - } - } - $address['country_id'] = $address['country']; - unset($address['country']); - $customerAddresses[] = $address; - } - } - $defaultBilling = ''; - $defaultBilling = $data['default_billing']; - unset($data['default_billing']); - unset($data['id']); - - try { - $customerModel->setData($data); - $customerModel->setImportMode(true); - $customerModel->setWebsiteId($websiteId > 0 ? $websiteId: $this->getCurrentWebsite()->getId()); - $customerModel->save(); - $customerId = $customerModel->getId(); - - if ($customerAddresses) foreach ($customerAddresses as $customerAddress) { - $customerAddress['telephone'] = $data['telephone']; - $customerAddress['fax'] = $data['fax']; - $addressModel->unsetData(); - $addressModel->setData($customerAddress); - $addressModel->setCustomerId($customerId); - $addressModel->setId(null); - $addressModel->save(); - if ($defaultBilling == $customerAddress['id']) { - $addressId = $addressModel->getId(); - $customerModel->setDefaultBilling($addressId); - $customerModel->setDefaultShipping($addressId); - } - } - $customerModel->save(); - $this->saveLogs(array($oscCustomerId => $customerId), 'customer'); - $this->_saveRows++; - } catch (Exception $e) { - $this->_addErrors(Mage::helper('oscommerce')->__('Email %s cannot be saved because of %s', $data['email'], $e->getMessage())); - } - } - } - - public function getCustomerIdPair() - { - if (!$this->_customerIdPair) { - $this->_customerIdPair = $this->getLogPairsByTypeCode('customer'); - } - return $this->_customerIdPair; - } - - public function setCustomerIdPair($data) - { - if (is_array($data)) { - $this->_customerIdPair = $data; - } - } - - public function importCategories($startFrom = 0, $useStartFrom = false) - { - $importModel = $this->getImportModel(); - $this->_logData['type_id'] = $this->getImportTypeIdByCode('category'); - $this->_logData['import_id'] = $importModel->getId(); - $categoryModel = $this->getCategoryModel(); - - $this->_resetSaveRows(); - $this->_resetErrors(); - $maxRows = $this->getMaxRows(); - $totalCategories = $this->getCategoriesCount(); - - $pages = floor($totalCategories / $maxRows) + 1; - if (!$useStartFrom) { - for ($i = 0; $i < $pages; $i++) { - if ($categories = $this->getCategories(array('from'=> $i * $maxRows,'max'=>$maxRows))) { - foreach ($categories as $category) { - $this->_saveCategory($category); - } - } - } - } else { - if ($categories = $this->getCategories(array('from'=> $startFrom ,'max'=>$maxRows))) { - foreach ($categories as $category) { - $this->_saveCategory($category); - } - } - } - } - - protected function _saveCategory($data) { - $importModel = $this->getImportModel(); - $categoryModel = $this->getCategoryModel(); - $oscCategoryId = $data['id']; - unset($data['id']); - try { - $data['store_id'] = 0; - $data['is_active'] = 1; - $data['display_mode'] = self::DEFAULT_DISPLAY_MODE; - $data['is_anchor'] = self::DEFAULT_IS_ANCHOR; - $data['attribute_set_id'] = $categoryModel->getDefaultAttributeSetId(); - $data['name'] = $this->convert($data['name']); - $data['meta_title'] = html_entity_decode($data['name'], ENT_QUOTES, self::DEFAULT_MAGENTO_CHARSET); - $categoryModel->setData($data); - $categoryModel->save(); - $categoryId = $categoryModel->getId(); - $this->saveLogs(array($oscCategoryId => $categoryId), 'category'); - - // saving data for different (encoding has been done in getCategoryToStores method) - $storeData = $data['stores']; - unset($data['stores']); - if (isset($storeData)) { - foreach($storeData as $storeId=>$catData) { - $categoryModel->setStoreId($storeId)->setName($catData['name'])->setMetaTitle($catData['name']) - ->save(); - } - } - $this->_saveRows++; - } catch (Exception $e) { - $this->_addErrors(Mage::helper('oscommerce')->__('Category %s cannot be saved because of %s', $data['name'], $e->getMessage())); - } - } - - - - public function buildCategoryPath() - { - $categoryIdPair = $this->getCategoryIdPair(); - $importModel = $this->getImportModel(); - if ($categoryIdPair) foreach ($categoryIdPair as $oscommerceId => $magentoId) { - $path = $this->getRootCategory()->getPath().'/'.join('/',$this->getCategoryPath($oscommerceId)); - $this->_getWriteAdapter()->raw_query("UPDATE `{$this->getTable('catalog_category')}` SET `path`='{$path}' WHERE `entity_id`={$magentoId}"); - } - } - - public function getCategoryPath($categoryId) - { - $categoryIdPair = $this->getCategoryIdPair(); - $select = "SELECT `c`.`parent_id` FROM `{$this->getOscTable('categories')}` c "; - $select .= " WHERE `c`.`categories_id`={$categoryId}"; - if ($parentId = $this->_getForeignAdapter()->fetchOne($select)) { - if ($result = $this->getCategoryPath($parentId)) { - if (!isset($results)) { - $results = $result; - } else { - array_merge($results, $result); - } - } else { - $results[] = $categoryIdPair[$parentId]; - } - } - $results[] = $categoryIdPair[$categoryId]; - return $results; - } - - public function getCategoryIdPair() - { - if (!$this->_categoryIdPair) { - $this->_categoryIdPair = $this->getLogPairsByTypeCode('category'); - } - return $this->_categoryIdPair; - } - - public function setCategoryIdPair($data) - { - if (is_array($data)) { - $this->_categoryIdPair = $data; - } - } - - /** - * Import products - * - * @param Mage_Oscommerce_Model_Oscommerce $obj - */ - public function importProducts($startFrom = 0, $useStartFrom = false) - { - $importModel = $this->getImportModel(); - $productAdapterModel = Mage::getModel('catalog/convert_adapter_product'); - $productModel = $this->getProductModel(); - $taxCollections = $this->_getTaxCollections(); - $this->_resetSaveRows(); - $this->_resetErrors(); - $maxRows = $this->getMaxRows(); - $totalProducts = $this->getProductsCount(); - $pages = floor($totalProducts / $maxRows) + 1; - if (!$useStartFrom) { - for ($i = 0; $i < $pages; $i++) { - if ($products = $this->getProducts(array('from'=> $i * $maxRows,'max'=>$maxRows))) { - foreach ($products as $product) { - if (!empty($product['tax_class_id'])) { - $product['tax_class_id'] = $taxCollections[$product['tax_class_id']]; - } - $this->_saveProduct($product); - } - } - } - } else { - if ($products = $this->getProducts(array('from'=> $startFrom ,'max'=>$maxRows))) { - foreach ($products as $product) { - if (!empty($product['tax_class_id'])) { - $product['tax_class_id'] = $taxCollections[$product['tax_class_id']]; - } - $this->_saveProduct($product); - } - } - } - } - - /** - * Save products data - * - * @param Mage_Oscommerce_Model_Oscommerce $obj - * @param array $data - */ - protected function _saveProduct($data) { - $importModel = $this->getImportModel(); - $productAdapterModel = $this->getProductAdapterModel(); - $productModel = $this->getProductModel(); - $mageStores = $this->getLanguagesToStores(); - $storeInfo = $this->getOscStoreInformation(); - $storeName = $storeInfo['STORE_NAME']; - $oscProductId = $data['id']; - unset($data['id']); - if ($this->_isProductWithCategories) { - if ($categories = $this->getProductCategories($oscProductId)) - $data['category_ids'] = $categories; - } - - /** - * Checking product by using sku and website - */ - if (empty($data['sku'])) { - $data['sku'] = $storeName . ' - ' . $oscProductId; - } - $productModel->unsetData(); - $productId = $productModel->getIdBySku($data['sku']); - $productModel->load($productId); - if ($productModel->getId()) { - $websiteIds = $productModel->getWebsiteIds(); - - if ($websiteIds) foreach($websiteIds as $websiteId) { - if ($websiteId == $this->getWebsiteModel()->getId()) { - $this->_addErrors(Mage::helper('oscommerce')->__('SKU %s was not imported since it already exists in %s', - $data['sku'], - $this->getWebsiteModel()->getName())); - return ; - } - } - } - try { - if (isset($data['image'])) { - if (substr($data['image'], 0,1) != DS) { - $data['image'] = DS . $data['image']; - } - - if (!file_exists(Mage::getBaseDir('media'). DS . 'import' . $data['image'])) { - unset($data['image']); - } else { - $data['thumbnail'] = $data['small_image'] = $data['image']; - } - } - if ($stores = $this->getProductStores($oscProductId)) { - - foreach ($stores as $storeId => $store) { - if (!$storeCode = $this->getStoreCodeById($mageStores[$storeId])) { - $storeCode = $this->getCurrentWebsite()->getDefaultStore()->getCode(); - } - $data['store'] = $storeCode; - $data['name'] = html_entity_decode($this->convert($store['name']), ENT_QUOTES, self::DEFAULT_MAGENTO_CHARSET); - $data['description'] = html_entity_decode($this->convert($store['description']), ENT_QUOTES, self::DEFAULT_MAGENTO_CHARSET); - $data['short_description'] = $data['description']; - $productAdapterModel->saveRow($data); - } - } - - $productId = $productAdapterModel->getProductModel()->getId(); - $this->saveLogs(array($oscProductId => $productId), 'product'); - $this->_saveRows++; - } catch (Exception $e) { - $this->_addErrors(Mage::helper('oscommerce')->__('SKU %s cannot be saved because of %s', $data['sku'], $e->getMessage())); - } - } - - public function importOrders($startFrom = 0, $useStartFrom = false) - { - $importModel = $this->getImportModel(); - $this->_resetSaveRows(); - $this->_resetErrors(); - // Get orders - - $totalOrders = $this->getOrdersCount(); - $maxRows = $this->getMaxRows(); - $pages = floor($totalOrders / $maxRows) + 1; - - if (!$useStartFrom) { - for ($i = 0; $i < $pages; $i++) { - $orders = $this->getOrders(array('from' => $i * $maxRows, 'max' => $maxRows)); - if ($orders) foreach($orders as $order) { - $this->_saveOrder($order); - } - } - } else { - $orders = $this->getOrders(array('from' => $startFrom, 'max' => $maxRows)); - if ($orders) foreach($orders as $order) { - $this->_saveOrder($order); - } - } - } - - public function createOrderTables() - { - $importModel = $this->getImportModel(); - $importId = $importModel->getId(); - $websiteId = $this->getWebsiteModel()->getId(); - - $tables = array( - 'orders' => "CREATE TABLE `{$this->getTable('oscommerce_order')}` ( - `osc_magento_id` int(11) NOT NULL auto_increment, - `orders_id` int(11) NOT NULL default '0', - `customers_id` int(11) NOT NULL default '0', - `magento_customers_id` int(11) NOT NULL default '0', - `import_id` int(11) NOT NULL default '0', - `website_id` int(11) NOT NULL default '0', - `customers_name` varchar(64) NOT NULL default '', - `customers_company` varchar(32) default NULL, - `customers_street_address` varchar(64) NOT NULL default '', - `customers_suburb` varchar(32) default NULL, - `customers_city` varchar(32) NOT NULL default '', - `customers_postcode` varchar(10) NOT NULL default '', - `customers_state` varchar(32) default NULL, - `customers_country` varchar(32) NOT NULL default '', - `customers_telephone` varchar(32) NOT NULL default '', - `customers_email_address` varchar(96) NOT NULL default '', - `customers_address_format_id` int(5) NOT NULL default '0', - `delivery_name` varchar(64) NOT NULL default '', - `delivery_company` varchar(32) default NULL, - `delivery_street_address` varchar(64) NOT NULL default '', - `delivery_suburb` varchar(32) default NULL, - `delivery_city` varchar(32) NOT NULL default '', - `delivery_postcode` varchar(10) NOT NULL default '', - `delivery_state` varchar(32) default NULL, - `delivery_country` varchar(32) NOT NULL default '', - `delivery_address_format_id` int(5) NOT NULL default '0', - `billing_name` varchar(64) NOT NULL default '', - `billing_company` varchar(32) default NULL, - `billing_street_address` varchar(64) NOT NULL default '', - `billing_suburb` varchar(32) default NULL, - `billing_city` varchar(32) NOT NULL default '', - `billing_postcode` varchar(10) NOT NULL default '', - `billing_state` varchar(32) default NULL, - `billing_country` varchar(32) NOT NULL default '', - `billing_address_format_id` int(5) NOT NULL default '0', - `payment_method` varchar(255) NOT NULL default '', - `cc_type` varchar(20) default NULL, - `cc_owner` varchar(64) default NULL, - `cc_number` varchar(32) default NULL, - `cc_expires` varchar(4) default NULL, - `last_modified` datetime default NULL, - `date_purchased` datetime default NULL, - `orders_status` varchar(32) default NULL, - `orders_date_finished` datetime default NULL, - `currency` varchar(3) default NULL, - `currency_value` decimal(14,6) default NULL, - `currency_symbol` varchar(3) default NULL, - `orders_total` decimal(14,6) default NULL, - PRIMARY KEY (`osc_magento_id`), - KEY `idx_orders_customers_id` (`customers_id`) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8; - " - , 'orders_products' => "CREATE TABLE `{$this->getTable('oscommerce_order_products')}` ( - `orders_products_id` int(11) NOT NULL auto_increment, - `osc_magento_id` int(11) NOT NULL default '0', - `products_id` int(11) NOT NULL default '0', - `products_model` varchar(12) default NULL, - `products_name` varchar(64) NOT NULL default '', - `products_price` decimal(15,4) NOT NULL default '0.0000', - `final_price` decimal(15,4) NOT NULL default '0.0000', - `products_tax` decimal(7,4) NOT NULL default '0.0000', - `products_quantity` int(2) NOT NULL default '0', - PRIMARY KEY (`orders_products_id`), - KEY `idx_orders_products_osc_magento_id` (`osc_magento_id`), - KEY `idx_orders_products_products_id` (`products_id`) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8; - " - - , 'orders_total' => "CREATE TABLE IF NOT EXISTS `{$this->getTable('oscommerce_order_total')}` ( - `orders_total_id` int(10) unsigned NOT NULL auto_increment, - `osc_magento_id` int(11) NOT NULL default '0', - `title` varchar(255) NOT NULL default '', - `text` varchar(255) NOT NULL default '', - `value` decimal(15,4) NOT NULL default '0.0000', - `class` varchar(32) NOT NULL default '', - `sort_order` int(11) NOT NULL default '0', - PRIMARY KEY (`orders_total_id`), - KEY `idx_orders_total_osc_magento_id` (`osc_magento_id`) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8;" - - , 'orders_status_history'=>"CREATE TABLE IF NOT EXISTS `{$this->getTable('oscommerce_order_history')}` ( - `orders_status_history_id` int(11) NOT NULL auto_increment, - `osc_magento_id` int(11) NOT NULL default '0', - `orders_status_id` int(5) NOT NULL default '0', - `date_added` datetime NOT NULL default '0000-00-00 00:00:00', - `customer_notified` int(1) default '0', - `comments` text, - `orders_status` varchar(32) default NULL, - PRIMARY KEY (`orders_status_history_id`), - KEY `idx_orders_status_history_osc_magento_id` (`osc_magento_id`) - ) ENGINE=MyISAM DEFAULT CHARSET=utf8;" - - ); - - $conn = $this->_setupConnection; - foreach ($tables as $table => $schema) { - $conn->beginTransaction(); - try { - $conn->query($schema); - $conn->commit(); - } catch (Exception $e) { -// $conn->rollBack(); - } - } - - $this->checkOrderField(); - } - - public function setTablePrefix($prefix) - { - if (isset($prefix)) $this->_prefix = $prefix; - } - - public function getTablePrefix() - { - return $this->_prefix; - } - - public function setIsProductWithCategories($yn) - { - if (is_bool($yn)) { - $this->_isProductWithCategories = $yn; - } - } - - /** - * Logging imported data to oscommerce_ref table - * - * @param array data - */ - public function log($data = array()) - { - if (isset($data)) { - $this->_getWriteAdapter()->beginTransaction(); - try { - $this->_getWriteAdapter()->insert($this->getTable('oscommerce_ref'), $data); - $this->_getWriteAdapter()->commit(); - } catch (Exception $e) { - $this->_getWriteAdapter()->rollBack(); - } - } - } - - public function getOscStoreInformation() - { - if (!$this->_oscStoreInformation) { - $select = "SELECT `configuration_key` `key`, `configuration_value` `value` FROM `{$this->getOscTable('configuration')}`"; - $select .= " WHERE `configuration_key` IN ('STORE_NAME', 'STORE_OWNER', 'STORE_OWNER_EMAIL', 'STORE_COUNTRY',' STORE_ZONE','DEFAULT_LANGUAGE')"; - if (!($result = $this->_getForeignAdapter()->fetchPairs($select))) { - $result = array(); - } - $this->_oscStoreInformation = $result; - } - return $this->_oscStoreInformation; - } - - /** - * Getting products data from osCommerce - * - */ - public function getProducts($limit = array()) - { - $defaultLanguage = $this->getOscDefaultLanguage(); - $defaultLanguageId = $defaultLanguage['id']; - $code = $this->getWebsiteModel()->getCode(); - $website = $code? $code: $this->getCurrentWebsite()->getCode(); - $connection = $this->_getForeignAdapter(); - $select = " SELECT `p`.`products_id` `id`, `p`.`products_quantity` `qty` "; - $select .= " , `p`.`products_model` `sku`, `p`.`products_price` `price`"; - $select .= " , `p`.`products_image` `image` "; - $select .= " , `p`.`products_weight` `weight`, IF(`p`.`products_status`,'Enabled','Disabled') `status` "; - $select .= " , IF(`p`.`products_status`,'1','0') `is_in_stock`"; - $select .= " , `pd`.`products_name` `name`, `pd`.`products_description` `description` "; -// $select .= " , `tc`.`tax_class_title` `tax_class_id`, IF(1,'".self::DEFAULT_VISIBILITY."','') `visibility` "; - $select .= " , `p`.`products_tax_class_id` `tax_class_id`, IF(1,'".self::DEFAULT_VISIBILITY."','') `visibility` "; - $select .= " , `sp`.`specials_new_products_price` `special_price` "; - $select .= " , `sp`.`specials_date_added` `special_from_date` "; - $select .= " , `sp`.`expires_date` `special_to_date` "; - $select .= " , IF(1,'".self::DEFAULT_ATTRIBUTE_SET."','') `attribute_set` "; - $select .= " , IF(1,'".self::DEFAULT_PRODUCT_TYPE ."','') `type` "; - //$select .= ", IF(1,'".self::DEFAULT_STORE."','') `store` "; - $select .= " , IF(1,'".$website."','') `website` "; - $select .= " FROM `{$this->getOscTable('products')}` p LEFT JOIN `{$this->getOscTable('products_description')}` pd "; - $select .= " ON `pd`.`products_id`=`p`.`products_id` AND `pd`.`language_id`={$defaultLanguageId} "; -// $select .= " LEFT JOIN `{$this->getOscTable('tax_class')}` tc ON `tc`.`tax_class_id`=`p`.`products_tax_class_id` "; - $select .= " LEFT JOIN `{$this->getOscTable('specials')}` sp ON `sp`.`products_id`=`p`.`products_id` "; - if ($limit && isset($limit['from']) && isset($limit['max'])) { - $select .= " LIMIT {$limit['from']}, {$limit['max']}"; - } - if (!($result = $this->_getForeignAdapter()->fetchAll($select))) { - $result = array(); - } - return $result; - } - - public function getProductsCount() - { - return $this->_getForeignAdapter()->fetchOne("SELECT count(*) FROM `{$this->getOscTable('products')}`"); - } - - public function getCategoriesCount() - { - return $this->_getForeignAdapter()->fetchOne("SELECT count(*) FROM `{$this->getOscTable('categories')}`"); - } - - public function getCustomersCount() - { - return $this->_getForeignAdapter()->fetchOne("SELECT count(*) FROM `{$this->getOscTable('customers')}`"); - } - - public function getOrdersCount() - { - return $this->_getForeignAdapter()->fetchOne("SELECT count(*) FROM `{$this->getOscTable('orders')}`"); - } - - public function getOrders($limit = array()) { - $defaultLanguage = $this->getOscDefaultLanguage(); - $defaultLanguageId = $defaultLanguage['id']; - $select = "SELECT `o`.`orders_id`, `o`.`customers_id`, `o`.`customers_name`"; - $select .= " ,`o`.`customers_company`,`o`.`customers_street_address`"; - $select .= " ,`o`.`customers_suburb`, `o`.`customers_city`"; - $select .= " ,`o`.`customers_postcode`, `o`.`customers_state`"; - $select .= " ,`o`.`customers_country`, `o`.`customers_telephone`"; - $select .= " ,`o`.`customers_email_address`, `o`.`customers_address_format_id`"; - $select .= " ,`o`.`delivery_name`, `o`.`delivery_company`"; - $select .= " ,`o`.`delivery_street_address`, `o`.`delivery_suburb`"; - $select .= " ,`o`.`delivery_city`, `o`.`delivery_postcode`, `o`.`delivery_state`"; - $select .= " ,`o`.`delivery_country`, `o`.`delivery_address_format_id`"; - $select .= " ,`o`.`billing_name`, `o`.`billing_company`"; - $select .= " ,`o`.`billing_street_address`, `o`.`billing_suburb`"; - $select .= " ,`o`.`billing_city`, `o`.`billing_postcode`, `o`.`billing_state`"; - $select .= " ,`o`.`billing_country`, `o`.`billing_address_format_id`"; - $select .= " ,`o`.`payment_method`, `o`.`cc_type`, `o`.`cc_owner`, `o`.`cc_number`"; - $select .= " ,`o`.`cc_expires`, `o`.`last_modified`, `o`.`date_purchased`"; - $select .= " ,`o`.`orders_status`, `o`.`orders_date_finished`, `o`.`currency`, `o`.`currency_value`"; - $select .= " ,`c`.`symbol_left` `currency_symbol`,`ot`.`value` `orders_total`"; - $select .= " ,`os`.`orders_status_name` FROM `{$this->getOscTable('orders')}` `o`"; - $select .= " LEFT JOIN `{$this->getOscTable('currencies')}` `c` ON `c`.`code`=`o`.`currency` "; - $select .= " LEFT JOIN `{$this->getOscTable('orders_total')}` `ot` ON `ot`.`orders_id`=`o`.`orders_id` "; - $select .= " AND `ot`.`class`='ot_total'"; - $select .= " LEFT JOIN `{$this->getOscTable('orders_status')}` os ON `os`.`orders_status_id`=`o`.`orders_status` "; - $select .= " AND `os`.`language_id`={$defaultLanguageId} "; - if (isset($limit) && isset($limit['from']) && isset($limit['max'])) { - $select .= " LIMIT {$limit['from']}, {$limit['max']} "; - } - if (!($result = $this->_getForeignAdapter()->fetchAll($select))) { - $result = array(); - } - return $result; - } - - protected function _saveOrder($data) - { - $fieldNoEnc = array( - 'customers_id', - 'orders_id', - 'date_purchased', - 'last_modified', - 'orders_date_finished', - 'orders_products_id', - 'osc_magento_id', - 'products_id' - ); - - $importModel = $this->getImportModel(); - $timezone = $importModel->getTimezone(); - $customerIdPair = $this->getCustomerIdPair(); - $importId = $importModel->getId(); - $websiteId = $this->getWebsiteModel()->getId(); - if ($data['customers_id'] > 0 && isset($this->_customerIdPair[$data['customers_id']])) { - foreach($data as $field => $value) { - if (!in_array($field, $fieldNoEnc)) { - $data[$field] = $this->convert($value); - } - } - - if ($data['date_purchased']) { - $preparePurchased = explode(' ', $data['date_purchased']); - $dateFormat = 'YYYY-MM-dd HH:mm:ss'; - $datePurchased = new Zend_Date(); - $datePurchased->setTimezone($timezone); - $datePurchased->setDate($preparePurchased[0], 'YYYY-MM-dd'); - $datePurchased->setTime($preparePurchased[1], 'HH:mm:ss'); - $datePurchased->setTimezone('GMT'); - $data['date_purchased'] = $datePurchased->toString($dateFormat); - } - - if ($data['last_modified']) { - $prepareModified = explode(' ', $data['last_modified']); - $dateModified = new Zend_Date(); - $dateModified->setTimezone($timezone); - $dateModified->setDate($prepareModified[0], 'YYYY-MM-dd'); - $dateModified->setTime($prepareModified[1], 'HH:mm:ss'); - $dateModified->setTimezone('GMT'); - $data['last_modified'] = $dateModified->toString($dateFormat); - } - - if ($data['orders_date_finished']) { - $prepareFinished = explode(' ', $data['orders_date_finished']); - $dateFinished = new Zend_Date(); - $dateFinished->setTimezone($timezone); - $dateFinished->setDate($prepareFinished[0], 'YYYY-MM-dd'); - $dateFinished->setTime($prepareFinished[1], 'HH:mm:ss'); - $dateFinished->setTimezone('GMT'); - $data['orders_date_finished'] = $dateFinished->toString($dateFormat); - } - - $data['magento_customers_id'] = $this->_customerIdPair[$data['customers_id']]; // get Magento CustomerId - $data['import_id'] = $importId; - $data['website_id'] = $websiteId; - $data['orders_status'] = $data['orders_status_name']; - unset($data['orders_status_name']); - $this->_getWriteAdapter()->insert($this->getTable('oscommerce_order'), $data); - $oscMagentoId = $this->_getWriteAdapter()->lastInsertId(); - $this->_saveRows++; - - // Get orders products - $select = "SELECT `orders_products_id`, `orders_id`, `products_id` "; - $select .= ", `products_model`, `products_name`, `products_price`, `final_price` "; - $select .= ", `products_tax`, `products_quantity` "; - $select .= " FROM `{$this->getOscTable('orders_products')}` WHERE `orders_id`={$data['orders_id']}"; - if ($orderProducts = $this->_getForeignAdapter()->fetchAll($select)) { - foreach ($orderProducts as $orderProduct) { - unset($orderProduct['orders_id']); - unset($orderProduct['orders_products_id']); - $orderProduct['osc_magento_id'] = $oscMagentoId; - foreach ($orderProduct as $field => $value) { - if (!in_array($field, $fieldNoEnc)) { - $orderProduct[$field] = $this->convert($value); - } - } - $this->_getWriteAdapter()->insert($this->getTable('oscommerce_order_products'), $orderProduct); - } - } - - // Get orders totals - $select = "SELECT `orders_total_id`, `orders_id`, `title`, `text`, `value`, `class`, `sort_order` "; - $select .= " FROM `{$this->getOscTable('orders_total')}` WHERE `orders_id`={$data['orders_id']} ORDER BY `sort_order`"; - - if ($orderTotals = $this->_getForeignAdapter()->fetchAll($select)) { - foreach ($orderTotals as $orderTotal) { - - unset($orderTotal['orders_id']); - unset($orderTotal['orders_total_id']); - $orderTotal['osc_magento_id'] = $oscMagentoId; - $orderTotal['title'] = $this->convert($orderTotal['title']); - $orderTotal['text'] = $this->convert($orderTotal['text']); - $this->_getWriteAdapter()->insert($this->getTable('oscommerce_order_total'), $orderTotal); - } - } - - $defaultLanguage = $this->getOscDefaultLanguage(); - $defaultLanguageId = $defaultLanguage['id']; - - // Get orders status history - $select = "SELECT `osh`.`orders_status_history_id`, `osh`.`orders_id`, `osh`.`orders_status_id` "; - $select .= ", `os`.`orders_status_name` `orders_status`, `osh`.`date_added`, `osh`.`customer_notified`, `osh`.`comments` "; - $select .= " FROM `{$this->getOscTable('orders_status_history')}` osh "; - $select .= " LEFT JOIN `{$this->getOscTable('orders_status')}` os ON `os`.`orders_status_id`=`osh`.`orders_status_id` "; - $select .= " AND `os`.`language_id`={$defaultLanguageId}"; - $select .= " WHERE `osh`.`orders_id`={$data['orders_id']}"; - if ($orderHistories = $this->_getForeignAdapter()->fetchAll($select)) { - foreach ($orderHistories as $orderHistory) { - unset($orderHistory['orders_id']); - unset($orderHistory['orders_status_history_id']); - $orderHistory['osc_magento_id'] = $oscMagentoId; - $prepareAdded = explode(' ', $orderHistory['date_added']); - $dateFormat = 'YYYY-MM-dd HH:mm:ss'; - $dateAdded = new Zend_Date(); - $dateAdded->setTimezone($timezone); - $dateAdded->setDate($prepareAdded[0], 'YYYY-MM-dd'); - $dateAdded->setTime($prepareAdded[1], 'HH:mm:ss'); - $dateAdded->setTimezone('GMT'); - $orderHistory['date_added'] = $dateAdded->toString($dateFormat); - $orderHistory['orders_status'] = $this->convert($orderHistory['orders_status']); - $orderHistory['comments'] = $this->convert($orderHistory['comments']); - $orderHistory['customer_notified'] = $this->convert($orderHistory['customer_notified']); - - $this->_getWriteAdapter()->insert($this->getTable('oscommerce_order_history'), $orderHistory); - } - } - } else { - $this->_addErrors(Mage::helper('oscommerce')->__('Order #%s failed to import because the customer ID #%s associated with this order could not be found.', $data['orders_id'], $data['customers_id'])); - } - } - - /** - * Getting product description for different stores - * - * @param integer $productId - * @return mix array/boolean - */ - public function getProductStores($productId) { - if (!$this->_productsToStores) { - $select = "SELECT `products_id`, `language_id` `store`, `products_name` `name`, `products_description` `description`"; - $select .= " FROM `{$this->getOscTable('products_description')}` "; - if ($results = $this->_getForeignAdapter()->fetchAll($select)) { - foreach ($results as $result) { - $this->_productsToStores[$result['products_id']][$result['store']] = array('name'=>$result['name'], 'description' => $result['description']); - } - } - } - if (isset($this->_productsToStores[$productId])) { - return $this->_productsToStores[$productId]; - } - return false; - } - - /** - * Getting new created categories recursively using products of osCommerce - * - * @param integer $productId - * @return string - */ - public function getProductCategories($productId) - { - $importModel = $this->getImportModel(); - if (!$this->_productsToCategories) { - $select = "SELECT `products_id`, `categories_id` FROM `{$this->getOscTable('products_to_categories')}`"; - - if ($results = $this->_getForeignAdapter()->fetchAll($select)) { - $categories = array(); - foreach ($results as $result) { - $categories[$result['products_id']] = $result['categories_id']; - if (isset($categories[$result['products_id']])) { - $categories[$result['products_id']] .= ','.$result['categories_id']; - } else { - $categories[$result['products_id']] = $result['categories_id']; - } - } - //$categories = join(',', array_values($results)); - - //$this->_getReadAdapter(); - $importId = $importModel->getId(); - $typeId = $this->getImportTypeIdByCode('category'); - - - if ($categories) foreach ($categories as $product => $category) { - $select = $this->_getReadAdapter()->select(); - $select->from(array('osc'=>$this->getTable('oscommerce_ref')), array('id'=>'id','ref_id'=>'ref_id')); - $select->where("`osc`.`import_id`='{$importId}' AND `osc`.`type_id`='{$typeId}' AND `osc`.`value` in (".$category.")"); - $resultCategories = $this->_getReadAdapter()->fetchPairs($select); - if ($resultCategories) { - $this->_productsToCategories[$product] = join(',',array_values($resultCategories)); - } - } - } - } - if (isset($this->_productsToCategories[$productId])) { - return $this->_productsToCategories[$productId]; - } - return false; - } - - public function getCategories($limit = array()) { - $importModel = $this->getImportModel(); - $defaultLanguage = $this->getOscDefaultLanguage(); - $defaultLanguageId = $defaultLanguage['id']; - $select = "SELECT `c`.`categories_id` as `id`, `c`.`parent_id`, `cd`.`categories_name` `name` FROM `{$this->getOscTable('categories')}` c ";// WHERE `c`.`parent_id`={$parentId}"; - $select .= " INNER JOIN `{$this->getOscTable('categories_description')}` cd on `cd`.`categories_id`=`c`.`categories_id`"; - $select .= " AND `cd`.`language_id`={$defaultLanguageId} "; - if ($limit && isset($limit['from']) && isset($limit['max'])) { - $select .= " LIMIT {$limit['from']}, {$limit['max']} "; - } - if (!$results = $this->_getForeignAdapter()->fetchAll($select)) { - $results = array(); - } else { - $stores = $this->getLanguagesToStores(); - foreach($results as $index => $result) { - if ($categoriesToStores = $this->getCategoriesToStores($result['id'])) { - foreach($categoriesToStores as $store => $categoriesName) { - $results[$index]['stores'][$stores[$store]] = array( - 'name'=>html_entity_decode($this->convert($categoriesName), ENT_QUOTES, self::DEFAULT_MAGENTO_CHARSET) - ); - } - } - } - } - return $results; - } - - /** - * Getting language to Magento store data - * - * @return array - */ - public function getLanguagesToStores() - { - $importModel = $this->getImportModel(); - $typeId = $this->getImportTypeIdByCode('store'); - $importId = $importModel->getId(); - if (!$this->_languagesToStores) { - //$this->_languagesToStores[1] = 1; - $select = $this->_getReadAdapter()->select(); - $select->from(array('ref'=>$this->getTable('oscommerce_ref')), array('value'=>'value', 'ref_id'=>'ref_id')); - $select->where("`ref`.`import_id`='{$importId}' AND `ref`.`type_id`='{$typeId}'"); - $this->_languagesToStores = $this->_getReadAdapter()->fetchPairs($select); - } - return $this->_languagesToStores; - } - - /** - * Getting categry description for different languages - * - * @param integer $categoryId - * @return mix array/boolean - */ - public function getCategoriesToStores($categoryId) - { - $select = "SELECT `language_id`, `categories_name` FROM `{$this->getOscTable('categories_description')}`"; - $select .= "WHERE `categories_id`='{$categoryId}'"; - if ($categoryId && $result = $this->_getForeignAdapter()->fetchPairs($select)) { - return $result; - } - return false; - } - - /** - * Getting store data of osCommerce - * - * @return array - */ - public function getOscStores() - { - if (!$this->_oscStores) { - $select = "SELECT `languages_id` `id`, `name`, `code` `scode`, "; - $select .= " `directory` `code`, 1 `is_active` FROM `{$this->getOscTable('languages')}`"; - $this->_oscStores = $this->_getForeignAdapter()->fetchAll($select); - } - return $this->_oscStores; - } - - - public function getOscDefaultLanguage() - { - if (!$this->_oscDefaultLanguage) { - $oscStoreInfo = $this->getOscStoreInformation(); - $languageCode = $oscStoreInfo['DEFAULT_LANGUAGE']; - if ($stores = $this->getOscStores()) foreach($stores as $store) { - if ($store['scode'] == $languageCode) { - $this->_oscDefaultLanguage = $store; - } - } - } - return $this->_oscDefaultLanguage; - } - - /** - * Getting customers from osCommerce - * - * @return array - */ - public function getCustomers($limit = array()) - { - $select = "SELECT `c`.`customers_id` `id`, `c`.`customers_firstname` `firstname` "; - $select .= " ,`c`.`customers_lastname` `lastname`, `c`.`customers_email_address` `email` "; - $select .= " ,`c`.`customers_telephone` `telephone`, `c`.`customers_fax` `fax` "; - $select .= " ,`c`.`customers_password` `password_hash`, `c`.`customers_newsletter` `is_subscribed` "; - $select .= " ,`ci`.`customers_info_date_account_created` `created_at` "; - $select .= " ,`c`.`customers_default_address_id` `default_billing` FROM `{$this->getOscTable('customers')}` c"; - $select .= " LEFT JOIN `customers_info` ci ON `ci`.`customers_info_id`=`c`.`customers_id` "; - if ($limit && isset($limit['from']) && isset($limit['max'])) { - $select .= " LIMIT {$limit['from']}, {$limit['max']}"; - } - - if (!($result = $this->_getForeignAdapter()->fetchAll($select))) { - $result = array(); - } - - return $result; - } - - public function getTotalCustomers() { - return $this->_getForeignAdapter()->fetchOne("SELECT count(*) FROM `{$this->getOscTable('customers')}`"); - } - - public function getCustomerName($name) - { - if (isset($name)) { - $n = explode(" ", $name); - if (sizeof($n) > 1) { - $newName['lastname'] = $n[(sizeof($n) - 1)]; - $newName['fistname'] = Mage::helper('core/string')->substr($name, 0, - Mage::helper('core/string')->strlen($name) - (Mage::helper('core/string')->strlen($newName['lastname'] + 1)) - ); - return $newName; - } else { - return array('firstname' => $n); - } - } - return false; - } - - - /** - * Getting customer address by CustomerId from osCommerce - * - * @param integer $customerId - * @return array - */ - public function getAddresses($customerId) - { - - $select = "SELECT `address_book_id` `id`, `customers_id`, `entry_firstname` `firstname`"; - $select .= ", `entry_lastname` `lastname`, `entry_street_address` `street1`"; - $select .= ", `entry_company` `company` "; - $select .= ", `entry_postcode` `postcode`, `entry_city` `city`"; - $select .= ", `entry_state` `region`, `entry_country_id` `country_id`"; - $select .= ", `entry_zone_id` `region_id` FROM `{$this->getOscTable('address_book')}` WHERE customers_id={$customerId}"; - if (!isset($customerId) || !($result = $this->_getForeignAdapter()->fetchAll($select))) { - $result = array(); - } - return $result; - } - - /** - * Get address from address book - * - * @param integer $address_id - * @return array - */ - public function getAddressById($addressId) - { - - $select = "SELECT `address_book_id` `id`, `customers_id`, `entry_firstname` `firstname`"; - $select .= ", `entry_lastname` `lastname`, `entry_street_address` `street1`"; - $select .= ", `entry_postcode` `postcode`, `entry_city` `city`"; - $select .= ", `entry_state` `region`, `entry_country_id` `country_id`"; - $select .= ", `entry_zone_id` `region_id` FROM `{$this->getOscTable('address_book')}` WHERE address_book_id={$addressId}"; - if (!isset($addressId) || !($result = $this->_getForeignAdapter()->fetchRow($select))) { - $result = array(); - } - return $result; - } - - /** - * Getting importing types for loging into oscommerce_ref - * - * @return array - */ - public function getImportTypes() - { - if (! $this->_importType) { - $connection = $this->_getReadAdapter(); - $select = $connection->select(); - $select->from($this->getTable('oscommerce_type'), array('*')); - $this->_importType = $connection->fetchAll($select); - } - return $this->_importType; - } - - /** - * Getting import_type_id by code - * - * @param integer $code - * @return string/boolean - */ - public function getImportTypeIdByCode($code = '') { - $types = $this->getImportTypes(); - if (isset($code) && $types) { - foreach ($types as $type) { - if ($type['type_code'] == $code) { - return $type['type_id']; - } - } - } - return false; - } - - public function getCountryCodeData() - { - $select = "SELECT * FROM `{$this->getOscTable('countries')}`"; - $countries = $this->_getForeignAdapter()->fetchAll($select); - if ($countries) foreach($countries as $country) { - $this->_countryIdToCode[$country['countries_id']] = $country['countries_iso_code_2']; - $this->_countryNameToCode[$country['countries_name']] = $country['countries_iso_code_2']; - } - } - - /** - * Getting country code by country id - * - * @param integer $id - * @return string/boolean - */ - public function getCountryCodeById($id) - { - if (!$this->_countryIdToCode) { - $this->getCountryCodeData(); - } - $countries = $this->_countryIdToCode; - if (isset($id) && isset($countries[$id])) { - return $countries[$id]; - } - return false; - } - - public function getCountryCodeByName($name) - { - if (!$this->_countryNameToCode) { - $this->getCountryCodeData(); - } - $countries = $this->_countryNameToCode; - if (isset($id) && isset($countries[$name])) { - return $countries[$name]; - } - return false; - } - - public function getCountryIdByCode($countryCode) - { - if (!$this->_countryIdToCode) { - $this->getCountryCodeData(); - } - if (isset($code)) { - foreach($this->_countryToCode as $id => $code) { - if ($code == $countryCode) { - return $id; - } - } - } - return false; - } - - - /** - * Getting regions from osCommerce - * - * @return array - */ - public function getRegions() - { - if (!$this->_regionCode) { - $select = "SELECT `zone_id`, `zone_name` FROM `{$this->getOscTable('zones')}`"; - $this->_regionCode = $this->_getForeignAdapter()->fetchPairs($select); - } - return $this->_regionCode; - } - - /** - * Getting region name by id - * - * @param integer $id - * @return string/boolean - */ - public function getRegionCode($id) - { - $regions = $this->getRegions(); - if (isset($id) && isset($regions[$id])) { - return $regions[$id]; - } - return false; - } - - public function setStoreLocales($locale) - { - if (isset($locale) && is_array($locale)) - $this->_storeLocales = $locale; - } - - public function getStoreLocales() - { - if ($this->_storeLocales) { - return $this->_storeLocales; - } else { - return array('default' => self::DEFAULT_LOCALE ); - } - } - - public function setRootCategory(Mage_Catalog_Model_Category $category) { - $this->_rootCategory = $category; - } - - public function getRootCategory() - { - if (!$this->_rootCategory) { - $this->_rootCategory = $this->getCategoryModel()->load($this->getCurrentWebsite()->getDefaultStoreGroup()->getRootCategoryId()); - } - return $this->_rootCategory; - } - - public function setWebsiteId($id) - { - $this->_websiteId = (int) ($id ? $id : 0); - } - - public function importTaxClasses() - { - $taxModel = Mage::getModel('tax/class'); - $storeInfo = $this->getOscStoreInformation(); - $storeName = $storeInfo['STORE_NAME']; - $taxPairs = array(); - if ($classes = $this->getTaxClasses()) { - $existedClasses = $taxCollections = Mage::getResourceModel('tax/class_collection') - ->addFieldToFilter('class_type', 'PRODUCT') - ->load() - ->toOptionHash(); - - foreach ($classes as $id => $name) { - $taxModel->unsData(); - $className = $name . '_' . $storeName; - if (in_array($className, $existedClasses)) { - $taxId = array_search($className, $existedClasses); - } else { - $taxModel->setId(null); - $taxModel->setClassType('PRODUCT'); - $taxModel->setClassName($name . '_' . $storeName); - $taxModel->save(); - $taxId = $taxModel->getId(); - } - $taxPairs[$id] = $taxId; - } - } - - if (sizeof($taxPairs) > 0) { - $this->saveLogs($taxPairs, 'taxclass'); - } - } - - protected function _getTaxCollections() - { - $taxPairs = $this->getLogPairsByTypeCode('taxclass'); - $flipTaxPairs = array_flip($taxPairs); - $newTaxPairs = array(); - $taxCollections = Mage::getResourceModel('tax/class_collection') - ->addFieldToFilter('class_type', 'PRODUCT') - ->load() - ->toOptionArray(); - if ($taxCollections) { - foreach ($taxCollections as $tax) { - if (isset($flipTaxPairs[$tax['value']])) { - $newTaxPairs[$flipTaxPairs[$tax['value']]] = $tax['label']; - } - } - } - return $newTaxPairs; - } - - public function saveLogs($data, $type = null) - { - $importId = $this->getImportModel()->getId(); - $typeId = $this->getImportTypeIdByCode($type); - $userId = $this->_getCurrentUserId(); - $createdAt = $this->formatDate(time()); - if (is_array($data) && $typeId > 0) { - foreach($data as $value => $refId) { - $log = array( - 'value' => $value, - 'ref_id' => $refId, - 'import_id' => $importId, - 'type_id' => $typeId, - 'user_id' => $userId, - 'created_at'=> $createdAt - ); - $this->_getWriteAdapter()->insert($this->getTable('oscommerce_ref'), $log); - } - } - } - - public function getLogPairsByTypeCode($code) - { - $typeId = $this->getImportTypeIdByCode($code); - $importId = $this->getImportModel()->getId(); - $result = array(); - if (!is_null($typeId)) { - $select = $this->_getReadAdapter()->select(); - $select->from($this->getTable('oscommerce_ref'), array('value','ref_id')) - ->where("import_id={$importId}") - ->where("type_id={$typeId}"); - $result = $this->_getReadAdapter()->fetchPairs($select); - } - return $result; - } - - public function getTaxClasses() - { - $select = "SELECT `tax_class_id` `id`, `tax_class_title` `title` FROM `{$this->getOscTable('tax_class')}`"; - if (!($results = $this->_getForeignAdapter()->fetchPairs($select))) { - $results = array(); - } - return $results; - } - - private function _format($str) - { - $str = preg_replace('#[^0-9a-z\/\.]+#i', '', $str); - $str = strtolower(str_replace('\\s','',$str)); - return $str; - } - - public function setPrefixPath($prefix) { - if ($prefix) { - $this->_prefixPath = $prefix; - } - } - - /** - * Load osCommerce orders - * - * @param integer $customerId - * @param integer $websiteId - * @return array - */ - public function loadOrders($customerId, $websiteId = '') - { - if (!isset($websiteId)) { - $webisteId = $this->_currentWebsiteId; - } - $result = array(); - if (!empty($customerId)) { - $select = $this->_getReadAdapter()->select() - ->from(array('order'=>$this->getTable('oscommerce_order'))) - ->join( - array('order_total'=>$this->getTable('oscommerce_order_total')), - "order_total.osc_magento_id=order.osc_magento_id AND order_total.class='ot_total'", - array('value')) - ->where("order.magento_customers_id={$customerId}") - ->where("order.website_id={$websiteId}"); - $result = $this->_getReadAdapter()->fetchAll($select); - } - return $result; - } - - /** - * Load osCommerce order - * - * @param integer $id - * @return array - */ - public function loadOrderById($id) - { - $result = array(); - if (!empty($id)) { - $select = "SELECT * FROM {$this->getTable('oscommerce_order')} WHERE osc_magento_id={$id}"; - $order = $this->_getReadAdapter()->fetchRow($select); - if ($order) { - $result['order'] = $order; - foreach (array('products','total','history') as $table) { - $select = "SELECT * FROM {$this->getTable('oscommerce_order_'.$table)} WHERE osc_magento_id={$id}"; - $result[$table] = $this->_getReadAdapter()->fetchAll($select); - - } - } - - } - return $result; - } - - // Fix for previous version - protected function checkOrderField() - { - $columnName = 'currency_symbol'; - try { - if (!($result = $this->_getReadAdapter()->fetchRow("SHOW `columns` FROM `{$this->getTable('oscommerce_order')}` WHERE field='{$columnName}'"))) { - $this->_setupConnection()->query("ALTER TABLE `{$this->getTable('oscommerce_order')}` ADD {$columnName} char(3) DEFAULT NULL"); - $this->_setupConnection()->commit(); - } - } catch (Exception $e) { - - } - } - - public function setMaxRows($rows) - { - if (is_integer($rows)) { - $this->_maxRows = $rows; - } - } - - public function getMaxRows() - { - if ($this->_maxRows <= 0) { - $this->_maxRows = Mage::getStoreConfig('oscommerce/import/max_rows'); - } - return $this->_maxRows; - } - - /** - * Retrieve website model cache - * - * @return Mage_Core_Model_Web - */ - public function getWebsiteModel() - { - if (is_null($this->_websiteModel)) { - $object = Mage::getModel('core/website'); - $this->_websiteModel = Varien_Object_Cache::singleton()->save($object); - } - return Varien_Object_Cache::singleton()->load($this->_websiteModel); - } - - /** - * Retrieve store model cache - * - * @return Mage_Core_Model_Store - */ - public function getStoreModel() - { - if (is_null($this->_storeModel)) { - $object = Mage::getModel('core/store'); - $this->_storeModel = Varien_Object_Cache::singleton()->save($object); - } - return Varien_Object_Cache::singleton()->load($this->_storeModel); - } - - /** - * Retrieve customer model cache - * - * @return Mage_Customer_Model_Customer - */ - public function getCustomerModel() - { - if (is_null($this->_customerModel)) { - $object = Mage::getModel('customer/customer'); - $this->_customerModel = Varien_Object_Cache::singleton()->save($object); - } - return Varien_Object_Cache::singleton()->load($this->_customerModel); - } - - /** - * Retrieve customer model cache - * - * @return Mage_Customer_Model_Customer - */ - public function getCustomerGroupModel() - { - if (is_null($this->_customerGroupModel)) { - $object = Mage::getModel('customer/group'); - $this->_customerGroupModel = Varien_Object_Cache::singleton()->save($object); - } - return Varien_Object_Cache::singleton()->load($this->_customerGroupModel); - } - - /** - * Retrieve address model cache - * - * @return Mage_Customer_Model_Address - */ - public function getAddressModel() - { - if (is_null($this->_addressModel)) { - $object = Mage::getModel('customer/address'); - $this->_addressModel = Varien_Object_Cache::singleton()->save($object); - } - return Varien_Object_Cache::singleton()->load($this->_addressModel); - } - - - /** - * Retrieve category model cache - * - * @return Mage_Catalog_Model_Category - */ - public function getCategoryModel() - { - if (is_null($this->_categoryModel)) { - $object = Mage::getModel('catalog/category'); - $this->_categoryModel = Varien_Object_Cache::singleton()->save($object); - } - return Varien_Object_Cache::singleton()->load($this->_categoryModel); - } - - /** - * Retrieve category model cache - * - * @return Mage_Catalog_Model_Category - */ - public function getProductModel() - { - if (is_null($this->_productModel)) { - $object = Mage::getModel('catalog/product'); - $this->_productModel = Varien_Object_Cache::singleton()->save($object); - } - return Varien_Object_Cache::singleton()->load($this->_productModel); - } - - public function getProductAdapterModel() - { - if (is_null($this->_productAdapterModel)) { - $object = Mage::getModel('catalog/convert_adapter_product'); - $this->_productAdapterModel = Varien_Object_Cache::singleton()->save($object); - } - return Varien_Object_Cache::singleton()->load($this->_productAdapterModel); - } - /** - * Retrieve store group model cache - * - * @return Mage_Core_Model_Store_Group - */ - public function getStoreGroupModel() - { - if (is_null($this->_storeGroupModel)) { - $object = Mage::getModel('core/store_group'); - $this->_storeGroupModel = Varien_Object_Cache::singleton()->save($object); - } - return Varien_Object_Cache::singleton()->load($this->_storeGroupModel); - } - - public function getConfigModel() - { - if (is_null($this->_configModel)) { - $object = Mage::getModel('core/config_data'); - $this->_configModel = Varien_Object_Cache::singleton()->save($object); - } - return Varien_Object_Cache::singleton()->load($this->_configModel); - - } - - public function importCollection($importId = null) { - $importTypes = array('website', 'root_category', 'group'); - $result = array(); - if (!is_null($importId)) { - $select = $this->_getReadAdapter()->select() - ->from(array('ref'=>$this->getTable('oscommerce_ref'))) - ->join( - array('type'=>$this->getTable('oscommerce_type')), - "type.type_id=ref.type_id AND type.type_code in ('".join("','",$importTypes)."')", - array('type.type_code')) - ->where("ref.import_id={$importId}"); - if ($results = $this->_getReadAdapter()->fetchAll($select)) { - foreach ($results as $result) { - $this->_importCollection[$result['type_code']] = $result['ref_id']; - } - } - - } - return $this->_importCollection; - } - - public function setImportModel(Mage_Oscommerce_Model_Oscommerce $model) - { - $this->_importModel = $model; - } - - public function getImportModel() - { - if ($this->_importModel) { - return $this->_importModel; - } - } - - public function getCollections($code) - { - if ($this->_importCollection) { - return $this->_importCollection; - } - return; - } - - /** - * Deleting oscommerce reference records - * - * @param integer $id - */ - public function deleteRecords($id = null) - { - if (!is_null($id) && $id > 0) { - if ($result = $this->_getReadAdapter() - ->fetchRow('SELECT * FROM '.$this->getTable('oscommerce_ref').' WHERE import_id='.$id)) { - $this->_getWriteAdapter()->raw_query('DELETE FROM '.$this->getTable('oscommerce_ref').' WHERE import_id='.$id); - } - } - } - - /** - * Formatting string - * - * @param string $input - * @param integer $number - * @return string - */ - protected function _formatStringTruncate($data, $number) - { - if (str_word_count($data, 0)>$number) { - $wordKey = str_word_count($data, 1); - $posKey = str_word_count($data, 2); - reset($posKey); - foreach ($wordKey as $key => &$value) { - $value=key($posKey); - next($posKey); - } - return substr($data, 0, $wordKey[$number]); - } else { - return $data; - } - } - - /** - * Getting current user ID - * - * @return string - */ - protected function _getCurrentUserId() - { - if (!$this->_currentUserId) { - $this->_currentUserId = Mage::getSingleton('admin/session')->getUser()->getId(); - $this->_logData['user_id'] = $this->_currentUserId; - } - return $this->_currentUserId; - } - - /** - * Getting oscommerce table with prefix - * - * @param string $table - * @return string - */ - function getOscTable($table) - { - return $this->_prefix.$table; - } - - /** - * Setting connection charset - * - * @param string $charset - */ - public function setConnectionCharset($charset) - { - $this->_connectionCharset = $charset; - } - - /** - * Getting connection charset, set deafult as utf8 - * if there is no predefine charset - * - * @return string - */ - public function getConnectionCharset() - { - if (!$this->_connectionCharset) { - $this->_connectionCharset = self::DEFAULT_FIELD_CHARSET; - } - return $this->_connectionCharset; - } - - public function resetConnectionCharset() - { - $charset = $this->getConnectionCharset(); - $this->_getForeignAdapter()->query("SET NAMES '{$charset}'"); - } - - - /** - * Setting dataCharset by user defined encoding charset - * - * @param string $charset - */ - public function setDataCharset($charset) - { - if (!is_null($charset)) { - $this->_dataCharset = $charset; - } - } - - /** - * Getting dataCharset - * - * @return string - */ - public function getDataCharset() - { - return $this->_dataCharset; - } - - /** - * Converting encoded charsets - * - * @param mixed $data - * @param array $notIncludedFields - * @return mixed - */ - public function convert($data, array $notIncludedFields = array()) - { - $charset = $this->getDataCharset(); - if (!is_null($charset) || $charset != self::DEFAULT_FIELD_CHARSET) { - if (is_array($data)) { - foreach($data as $field => $value) { - if (!in_array($field, $notIncludedFields)) { - $newValue = @iconv($charset, self::DEFAULT_FIELD_CHARSET, $value); - if (strlen($newValue)) { - $data[$field] = $newValue; - } - } - } - } else { - $newValue = @iconv($charset, self::DEFAULT_MAGENTO_CHARSET, $data); - if (strlen($newValue)) { - $data = $newValue; - } - } - } - return $data; - } - - /** - * Getting saveRows - * - * @return integer - */ - public function getSaveRows() - { - return $this->_saveRows; - } - - /** - * Resetting saveRows as zero - * - */ - protected function _resetSaveRows() - { - $this->_saveRows = 0; - } - - /** - * Adding error messages - * - * @param string $error - */ - protected function _addErrors($error) - { - if (isset($error)) $this->_errors[] = $error; - } - - /** - * Getting all errors - * - * @return array - */ - public function getErrors() - { - if (sizeof($this->_errors) > 0) { - return $this->_errors; - } - } - - /** - * Resetting error as empty array - * - */ - protected function _resetErrors() - { - $this->_errors = array(); - } -} diff --git a/app/code/core/Mage/Oscommerce/Model/Mysql4/Oscommerce/Collection.php b/app/code/core/Mage/Oscommerce/Model/Mysql4/Oscommerce/Collection.php deleted file mode 100755 index 0230cebaae..0000000000 --- a/app/code/core/Mage/Oscommerce/Model/Mysql4/Oscommerce/Collection.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ -class Mage_Oscommerce_Model_Mysql4_Oscommerce_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract -{ - protected function _construct() - { - $this->_init('oscommerce/oscommerce'); - } -} diff --git a/app/code/core/Mage/Oscommerce/Model/Mysql4/Oscommerce/Order.php b/app/code/core/Mage/Oscommerce/Model/Mysql4/Oscommerce/Order.php deleted file mode 100644 index 98953f15a8..0000000000 --- a/app/code/core/Mage/Oscommerce/Model/Mysql4/Oscommerce/Order.php +++ /dev/null @@ -1,81 +0,0 @@ - - */ -class Mage_Oscommerce_Model_Mysql4_Oscommerce_Order extends Mage_Core_Model_Mysql4_Abstract -{ - protected function _construct() - { - $this->_init('oscommerce/oscommerce_order', 'osc_magento_id'); - } - - public function getProducts() - { - $order = Mage::registry('current_oscommerce_order'); - $result = array(); - if ($order && $order->getData() && $id = $order->getId()) - { - $select = $this->_getReadAdapter()->select(); - $select->from($this->getTable('oscommerce_order_products')) - ->where("osc_magento_id={$id}"); - $result = $this->_getReadAdapter()->fetchAll($select); - } - return $result; - } - - public function getTotal() - { - $order = Mage::registry('current_oscommerce_order'); - $result = array(); - if ($order && $order->getData() && $id = $order->getId()) - { - $select = $this->_getReadAdapter()->select(); - $select->from($this->getTable('oscommerce_order_total')) - ->where("osc_magento_id={$id}")->order('sort_order'); - $result = $this->_getReadAdapter()->fetchAll($select); - } - return $result; - } - - public function getComments() - { - $order = Mage::registry('current_oscommerce_order'); - $result = array(); - if ($order && $order->getData() && $id = $order->getId()) - { - $select = $this->_getReadAdapter()->select(); - $select->from($this->getTable('oscommerce_order_history')) - ->where("osc_magento_id={$id}"); - $result = $this->_getReadAdapter()->fetchAll($select); - } - return $result; - } -} - diff --git a/app/code/core/Mage/Oscommerce/Model/Mysql4/Oscommerce/Order/Collection.php b/app/code/core/Mage/Oscommerce/Model/Mysql4/Oscommerce/Order/Collection.php deleted file mode 100644 index 532b161cbe..0000000000 --- a/app/code/core/Mage/Oscommerce/Model/Mysql4/Oscommerce/Order/Collection.php +++ /dev/null @@ -1,55 +0,0 @@ - - */ -class Mage_Oscommerce_Model_Mysql4_Oscommerce_Order_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract -{ - protected function _construct() - { - $this->_init('oscommerce/oscommerce_order'); - } - - public function addOrderTotalField() - { - $this->_select - ->columns(array('orders_total'=>new Zend_Db_Expr('FORMAT(main_table.orders_total,2)'))); - return $this; - } - - public function load($printQuery=false, $logQuery=false) - { - if ($this->isLoaded()) { - return $this; - } - $this->addOrderTotalField(); - parent::load($printQuery, $logQuery); - return $this; - } -} diff --git a/app/code/core/Mage/Oscommerce/Model/Oscommerce.php b/app/code/core/Mage/Oscommerce/Model/Oscommerce.php deleted file mode 100755 index e84c6a7163..0000000000 --- a/app/code/core/Mage/Oscommerce/Model/Oscommerce.php +++ /dev/null @@ -1,87 +0,0 @@ - - */ -class Mage_Oscommerce_Model_Oscommerce extends Mage_Core_Model_Abstract -{ - const DEFAULT_PORT = 3360; - const CONNECTION_TYPE = 'pdo_mysql'; - const CONNECTION_NAME = 'oscommerce_db'; - - protected function _construct() - { - $this->_init('oscommerce/oscommerce'); - } - - protected function _afterLoad() - { - parent::_afterLoad(); - Mage::getSingleton('oscommerce/config')->initForeignConnection($this->getData()); - -// if (Mage::app()->getRequest()->getActionName() == 'run') { -// $this->importStores(); -// } - - } - /** - * Get paypal session namespace - * - * @return Mage_Paypal_Model_Session - */ - public function getSession() - { - return Mage::getSingleton('oscommerce/session'); - } - - public function importStores() { - $this->getResource()->importStores($this); - } - - public function getImportTypeIdByCode($code = '') { - return $this->getResource()->getImportTypeIdByCode($code); - } - - public function loadOrders($customerId, $websiteId) - { - return $this->getResource()->loadOrders($customerId, $websiteId); - } - - public function loadOrderById($id) - { - return $this->getResource()->loadOrderById($id); - } - - public function deleteImportedRecords($id) - { - if (isset($id) && $id == $this->getId()) { - $this->getResource()->deleteRecords($id); - } - } -} diff --git a/app/code/core/Mage/Oscommerce/Model/Oscommerce/Order.php b/app/code/core/Mage/Oscommerce/Model/Oscommerce/Order.php deleted file mode 100644 index 522ef49571..0000000000 --- a/app/code/core/Mage/Oscommerce/Model/Oscommerce/Order.php +++ /dev/null @@ -1,55 +0,0 @@ - - */ -class Mage_Oscommerce_Model_Oscommerce_Order extends Mage_Core_Model_Abstract -{ - - protected function _construct() - { - $this->_init('oscommerce/oscommerce_order'); - } - - public function getProducts() - { - return $this->getResource()->getProducts(); - } - - public function getTotal() - { - return $this->getResource()->getTotal(); - } - - public function getComments() - { - return $this->getResource()->getComments(); - } - -} diff --git a/app/code/core/Mage/Oscommerce/controllers/Adminhtml/ImportController.php b/app/code/core/Mage/Oscommerce/controllers/Adminhtml/ImportController.php deleted file mode 100644 index ffe3cca81c..0000000000 --- a/app/code/core/Mage/Oscommerce/controllers/Adminhtml/ImportController.php +++ /dev/null @@ -1,422 +0,0 @@ - - */ -class Mage_Oscommerce_Adminhtml_ImportController extends Mage_Adminhtml_Controller_Action -{ - /** - * Initailization action of importController - */ - protected function _initAction() - { - $this->loadLayout(); - $this->_setActiveMenu('oscommerce/adminhtml_import'); - return $this; - } - - /** - * Initialization of importController - * - * @param idFieldnName string - * @return Mage_Oscommerce_Adminhtml_ImportController - */ - protected function _initImport($idFieldName = 'id') - { - $id = (int) $this->getRequest()->getParam($idFieldName); - $model = Mage::getModel('oscommerce/oscommerce'); - if ($id) { - $model->load($id); - } - - Mage::register('oscommerce_adminhtml_import', $model); - return $this; - } - - /** - * Index action of importController - */ - public function indexAction() - { - $this->_initAction(); - $this->_addContent( - $this->getLayout()->createBlock('oscommerce/adminhtml_import') - ); - $this->renderLayout(); - } - - /** - * Edit action of importController - */ - public function editAction() - { - $this->_initImport(); - $this->loadLayout(); - - $model = Mage::registry('oscommerce_adminhtml_import'); - $data = Mage::getSingleton('adminhtml/session')->getSystemConvertOscData(true); - - if (!empty($data)) { - $model->addData($data); - } - - $this->_initAction(); - $this->_addBreadcrumb - (Mage::helper('oscommerce')->__('Edit osCommerce Profile'), - Mage::helper('oscommerce')->__('Edit osCommerce Profile')); - /** - * Append edit tabs to left block - */ - $this->_addLeft($this->getLayout()->createBlock('oscommerce/adminhtml_import_edit_tabs')); - - $this->_addContent($this->getLayout()->createBlock('oscommerce/adminhtml_import_edit')); - - $this->renderLayout(); - } - - /** - * Create new action of importController - */ - public function newAction() - { - $this->_forward('edit'); - } - - /** - * Save action of - */ - public function saveAction() - { - if ($data = $this->getRequest()->getPost()) { - if (isset($data['send_subscription'])) { - $data['send_subscription'] = 1; - } else { - $data['send_subscription'] = 0; - } - - $this->_initImport('import_id'); - $model = Mage::registry('oscommerce_adminhtml_import'); - - // Prepare saving data - if (isset($data)) { - $model->addData($data); - } - -// if (empty($data['port'])) -// $data['port'] = Mage_Oscommerce_Model_Oscommerce::DEFAULT_PORT; - - try { - $model->save(); - - Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('oscommerce')->__('osCommerce Profile was successfully saved')); - } - catch (Exception $e){ - Mage::getSingleton('adminhtml/session')->addError($e->getMessage()); - Mage::getSingleton('adminhtml/session')->setSystemConvertOscData($data); - $this->getResponse()->setRedirect($this->getUrl('*/*/edit', array('id'=>$model->getId()))); - return; - } - } - if ($this->getRequest()->getParam('continue')) { - $this->_redirect('*/*/edit', array('id'=>$model->getId())); - } else { - $this->_redirect('*/*'); - } - } - - public function batchRunAction() - { - @set_time_limit(0); - $this->_initImport('import_id'); - $importModel = Mage::registry('oscommerce_adminhtml_import'); - - if ($tablePrefix = $importModel->getTablePrefix()) { - $importModel->getResource()->setTablePrefix($tablePrefix); - } - - // Start setting data from sessions - if ($connCharset = $importModel->getSession()->getConnectionCharset()) { - $importModel->getResource()->setConnectionCharset($connCharset); - } - if ($dataCharset = $importModel->getSession()->getDataCharset()) { - $importModel->getResource()->setDataCharset($dataCharset); - } - if ($timezone = $importModel->getSession()->getTimezone()) { - $importModel->setTimezone($timezone); - } - if ($storeLocales = $importModel->getSession()->getStoreLocales()) { - $importModel->getResource()->setStoreLocales($storeLocales); - } - if ($isPoductWithCategories = $importModel->getSession()->getIsProductWithCategories()) { - $importModel->getResource()->setIsProductWithCategories($isPoductWithCategories); - } - // End setting data from sessions - - // Resetting connection charset - $importModel->getResource()->resetConnectionCharset(); - - $importModel->getResource()->setImportModel($importModel); - if ($collections = $importModel->getResource()->importCollection($importModel->getId())) { - if (isset($collections['website'])) { - $importModel->getResource()->getWebsiteModel()->load($collections['website']); - } - if (isset($collections['root_category'])) { - $importModel->getResource()->setRootCategory(clone $importModel->getResource()->getCategoryModel()->load($collections['root_category'])); - } - if (isset($collections['group'])) { - $importModel->getResource()->getStoreGroupModel()->load($collections['group']); - - } - } - - //$isUnderDefaultWebsite = $this->getRequest()->getParam('under_default_website') ? true: false; - $importType = $this->getRequest()->getParam('import_type'); - $importFrom = $this->getRequest()->getParam('from'); - $isImportDone = $this->getRequest()->getParam('is_done'); - switch($importType) { - case 'products': - $importModel->getResource()->importProducts($importFrom, true); - break; - case 'categories': - $importModel->getResource()->importCategories($importFrom, true); - if ($isImportDone == 'true') { - $importModel->getResource()->buildCategoryPath(); - } - break; - case 'customers': - $importModel->getResource()->importCustomers($importFrom, true, $importModel->getData('send_subscription')); - break; - case 'orders': - $importModel->getResource()->importOrders($importFrom, true); - break; - } - - $errors = $importModel->getResource()->getErrors(); - $result = array( - 'savedRows' => $importModel->getResource()->getSaveRows(), - 'errors' => ( $errors ? $errors: array()) - ); - $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result)); - } - - public function runAction() - { - @set_time_limit(0); - Mage::app()->cleanCache(); // Clean all cach - $this->_initImport(); - $importModel = Mage::registry('oscommerce_adminhtml_import'); - /** @var $importModel Mage_Oscommerce_Model_Oscommerce */ - $totalRecords = array(); - - // Start handling charsets - $connCharset = $this->getRequest()->getParam('connection_charset'); - if ($connCharset) { - $importModel->getSession()->setConnectionCharset($connCharset); - $importModel->getResource()->setConnectionCharset($connCharset); - } - $dataCharset = $this->getRequest()->getParam('data_charset'); - if ($dataCharset) { - $importModel->getSession()->setDataCharset($dataCharset); - $importModel->getResource()->setDataCharset($dataCharset); - } // End hanlding charsets - - $timezone = $this->getRequest()->getParam('timezone'); - $importModel->getSession()->setTimezone($timezone); - $importModel->getResource()->resetConnectionCharset(); - - if ($tablPrefix = $importModel->getTablePrefix()) { - $importModel->getResource()->setTablePrefix($tablPrefix); - } - - $importModel->getResource()->setImportModel($importModel); - $importModel->getResource()->importCollection($importModel->getId()); - - // Setting Locale for stores - $locales = explode("|",$this->getRequest()->getParam('store_locale')); - $storeLocales = array(); - if ($locales) foreach($locales as $locale) { - $localeCode = explode(':', $locale); - $storeLocales[$localeCode[0]] = $localeCode[1]; - } - - $importModel->getSession()->setStoreLocales($storeLocales); - $importModel->getResource()->setStoreLocales($storeLocales); - // End setting Locale for stores - - $websiteId = $this->getRequest()->getParam('website_id'); - $websiteCode = $this->getRequest()->getParam('website_code'); - $options = $this->getRequest()->getParam('import'); - - // Checking Website, StoreGroup and RootCategory - if (!$websiteId) { - $importModel->getResource()->setWebsiteCode($websiteCode); - $importModel->getResource()->createWebsite(); - } else { - $importModel->getResource()->createWebsite($websiteId); - } - // End checking Website, StoreGroup and RootCategory - - $importModel->getResource()->importStores(); - $importModel->getResource()->importTaxClasses(); - $importModel->getResource()->createOrderTables(); - - if (isset($options['categories'])) { - $importModel->getSession()->setIsProductWithCategories(true); - $totalRecords['categories'] = $importModel->getResource()->getCategoriesCount(); - } - if (isset($options['products'])) { - $totalRecords['products'] = $importModel->getResource()->getProductsCount(); - } - if (isset($options['customers'])) { - $totalRecords['customers'] = $importModel->getResource()->getCustomersCount(); - } - if (isset($options['customers']) && isset($options['orders'])) { - $totalRecords['orders'] = $importModel->getResource()->getOrdersCount(); - } - if ($totalRecords) { - $importModel->setTotalRecords($totalRecords); - Mage::unRegister('oscommerce_adminhtml_import'); - Mage::register('oscommerce_adminhtml_import', $importModel); - } - $this->getResponse()->setBody($this->getLayout()->createBlock('oscommerce/adminhtml_import_run')->toHtml()); - $this->getResponse()->sendResponse(); - } - - public function batchFinishAction() - { - if ($importId = $this->getRequest()->getParam('id')) { - $importModel = Mage::getModel('oscommerce/oscommerce')->load($importId); - /* @var $batchModel Mage_Dataflow_Model_Batch */ - - if ($importId = $importModel->getId()) { - $importModel->deleteImportedRecords($importId); -// $importModel->getSession()->unsStoreLocales(); -// $importModel->getSession()->unsIsProductWithCategories(); -// if ($importModel->getSession()->getTablePrefix()) { -// $importModel->getSession()->unsTablePrefix(); -// } - $importModel->getSession()->clear(); - } - } - } - - /** - * Delete osc action - */ - public function deleteAction() - { - $this->_initImport(); - $model = Mage::registry('oscommerce_adminhtml_import'); - if ($model->getId()) { - try { - $model->delete(); - Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('oscommerce')->__('osCommerce profile was deleted')); - } - catch (Exception $e){ - Mage::getSingleton('adminhtml/session')->addError($e->getMessage()); - } - } - $this->_redirect('*/*/'); - } - - /** - * Ajax checking store - * - */ - public function checkStoreAction() - { - $this->_initImport(); - $importModel = Mage::registry('oscommerce_adminhtml_import'); - $error = false; - if ($importModel->getId()) { - try { - $charset = $importModel->getResource()->getConnectionCharset(); - $defaultOscCharset = Mage_Oscommerce_Model_Mysql4_Oscommerce::DEFAULT_OSC_CHARSET; - $defaultMageCharset = Mage_Oscommerce_Model_Mysql4_Oscommerce::DEFAULT_MAGENTO_CHARSET; - - $stores = $importModel->getResource()->getOscStores(); - - $locales = Mage::app()->getLocale()->getOptionLocales(); - $options = ''; - foreach ($locales as $locale) { - $options .= ""; - } - $html = ''; - if ($stores) { - $html .= "\n"; - foreach ($stores as $store) { - $html .= " @@ -397,7 +397,7 @@   - getDescription() ?> + htmlEscape($_item->getDescription()) ?> diff --git a/app/design/adminhtml/default/default/template/bundle/sales/creditmemo/view/items/renderer.phtml b/app/design/adminhtml/default/default/template/bundle/sales/creditmemo/view/items/renderer.phtml index 5f9c4282de..32dfa14b23 100644 --- a/app/design/adminhtml/default/default/template/bundle/sales/creditmemo/view/items/renderer.phtml +++ b/app/design/adminhtml/default/default/template/bundle/sales/creditmemo/view/items/renderer.phtml @@ -65,7 +65,7 @@ @@ -329,7 +329,7 @@ - getItem()->getDescription() ?> + htmlEscape($this->getItem()->getDescription()) ?> diff --git a/app/design/adminhtml/default/default/template/bundle/sales/invoice/create/items/renderer.phtml b/app/design/adminhtml/default/default/template/bundle/sales/invoice/create/items/renderer.phtml index 071482fc36..44972de5e5 100644 --- a/app/design/adminhtml/default/default/template/bundle/sales/invoice/create/items/renderer.phtml +++ b/app/design/adminhtml/default/default/template/bundle/sales/invoice/create/items/renderer.phtml @@ -66,7 +66,7 @@ @@ -385,7 +385,7 @@   - getDescription() ?> + htmlEscape($_item->getDescription()) ?> diff --git a/app/design/adminhtml/default/default/template/bundle/sales/invoice/view/items/renderer.phtml b/app/design/adminhtml/default/default/template/bundle/sales/invoice/view/items/renderer.phtml index 7dc65bfeb3..97e49d4d8b 100644 --- a/app/design/adminhtml/default/default/template/bundle/sales/invoice/view/items/renderer.phtml +++ b/app/design/adminhtml/default/default/template/bundle/sales/invoice/view/items/renderer.phtml @@ -65,7 +65,7 @@ @@ -328,7 +328,7 @@ - getItem()->getDescription() ?> + htmlEscape($this->getItem()->getDescription()) ?> diff --git a/app/design/adminhtml/default/default/template/bundle/sales/order/view/items/renderer.phtml b/app/design/adminhtml/default/default/template/bundle/sales/order/view/items/renderer.phtml index a1f5be5497..7ae0058920 100644 --- a/app/design/adminhtml/default/default/template/bundle/sales/order/view/items/renderer.phtml +++ b/app/design/adminhtml/default/default/template/bundle/sales/order/view/items/renderer.phtml @@ -69,7 +69,7 @@
    htmlEscape($_item->getName()) ?>
    helper('sales')->__('SKU') ?>: - ', Mage::helper('catalog')->splitSku($_item->getSku())); ?> + ', Mage::helper('catalog')->splitSku($this->htmlEscape($_item->getSku()))); ?>
    @@ -399,7 +399,7 @@   - getDescription() ?> + htmlEscape($_item->getDescription()) ?> diff --git a/app/design/adminhtml/default/default/template/bundle/sales/shipment/create/items/renderer.phtml b/app/design/adminhtml/default/default/template/bundle/sales/shipment/create/items/renderer.phtml index 62be0d81d3..6ee2d11a18 100644 --- a/app/design/adminhtml/default/default/template/bundle/sales/shipment/create/items/renderer.phtml +++ b/app/design/adminhtml/default/default/template/bundle/sales/shipment/create/items/renderer.phtml @@ -61,7 +61,7 @@ @@ -110,7 +110,7 @@   - getDescription() ?> + htmlEscape($_item->getDescription()) ?> diff --git a/app/design/adminhtml/default/default/template/bundle/sales/shipment/view/items/renderer.phtml b/app/design/adminhtml/default/default/template/bundle/sales/shipment/view/items/renderer.phtml index 691fbb3351..e690e62288 100644 --- a/app/design/adminhtml/default/default/template/bundle/sales/shipment/view/items/renderer.phtml +++ b/app/design/adminhtml/default/default/template/bundle/sales/shipment/view/items/renderer.phtml @@ -62,7 +62,7 @@
    htmlEscape($_item->getName()) ?>
    helper('sales')->__('SKU') ?>: - ', Mage::helper('catalog')->splitSku($_item->getSku())); ?> + ', Mage::helper('catalog')->splitSku($this->htmlEscape($_item->getSku()))); ?>
    @@ -108,7 +108,7 @@ - getDescription() ?> + htmlEscape($_item->getDescription()) ?> diff --git a/app/design/adminhtml/default/default/template/catalog/category/edit/form.phtml b/app/design/adminhtml/default/default/template/catalog/category/edit/form.phtml index a9a9e5c0a5..a36ba91893 100644 --- a/app/design/adminhtml/default/default/template/catalog/category/edit/form.phtml +++ b/app/design/adminhtml/default/default/template/catalog/category/edit/form.phtml @@ -26,7 +26,7 @@ ?>
    -

    getHeader() . ($this->getCategoryId() ? ' (' . Mage::helper('catalog')->__('ID: %s', $this->getCategoryId()) . ')' : '') ?>

    +

    htmlEscape($this->getHeader()) . ($this->getCategoryId() ? ' (' . Mage::helper('catalog')->__('ID: %s', $this->getCategoryId()) . ')' : '') ?>

    getResetButtonHtml() ?> getCategoryId()): ?> diff --git a/app/design/adminhtml/default/default/template/catalog/form/renderer/fieldset/element.phtml b/app/design/adminhtml/default/default/template/catalog/form/renderer/fieldset/element.phtml index 92764a0bd9..0b977d6434 100644 --- a/app/design/adminhtml/default/default/template/catalog/form/renderer/fieldset/element.phtml +++ b/app/design/adminhtml/default/default/template/catalog/form/renderer/fieldset/element.phtml @@ -35,7 +35,7 @@

    - + canDisplayUseDefault()): ?> - - + + getRows()): ?> @@ -66,8 +66,8 @@ - - + + diff --git a/app/design/adminhtml/default/default/template/cybersource/form.phtml b/app/design/adminhtml/default/default/template/cybersource/form.phtml deleted file mode 100644 index 989944aa25..0000000000 --- a/app/design/adminhtml/default/default/template/cybersource/form.phtml +++ /dev/null @@ -1,162 +0,0 @@ - - getMethodCode(); ?> - - - diff --git a/app/design/adminhtml/default/default/template/cybersource/info.phtml b/app/design/adminhtml/default/default/template/cybersource/info.phtml deleted file mode 100644 index 90e4af6ba7..0000000000 --- a/app/design/adminhtml/default/default/template/cybersource/info.phtml +++ /dev/null @@ -1,39 +0,0 @@ - -getInfo()): ?> -getMethod()->getTitle() ?>
    - -__('Credit Card Type: %s', $this->getCcTypeName()) ?>
    -__('Credit Card Number: xxxx-%s', $this->getInfo()->getCcLast4()) ?>
    -__('Expiration Date: %s/%s', $this->getCcExpMonth(), $this->getInfo()->getCcExpYear()) ?>
    -getInfo()->getCcSsIssue()): ?> -__("Switch/Solo/Maestro(UK Domestic) card issue number: %s", $this->getInfo()->getCcSsIssue()) ?>
    - -getInfo()->getCcSsStartYear()): ?> -__('Switch/Solo/Maestro(UK Domestic) card start Date: %s/%s', $this->getCcStartMonth(), $this->getInfo()->getCcSsStartYear()) ?> - - diff --git a/app/design/adminhtml/default/default/template/cybersource/pdf/info.phtml b/app/design/adminhtml/default/default/template/cybersource/pdf/info.phtml deleted file mode 100644 index 3bd624ae74..0000000000 --- a/app/design/adminhtml/default/default/template/cybersource/pdf/info.phtml +++ /dev/null @@ -1,43 +0,0 @@ - -getInfo()): ?> - getMethod()->getTitle() ?> - {{pdf_row_separator}} - __('Name on the Card: %s', $this->getInfo()->getCcOwner()) ?> - {{pdf_row_separator}} - __('Credit Card Type: %s', $this->getCcTypeName()) ?> - {{pdf_row_separator}} - __('Credit Card Number: xxxx-%s', $this->getInfo()->getCcLast4()) ?> - {{pdf_row_separator}} - getInfo()->getCcSsIssue()): ?> - __("Switch/Solo card issue number: %s", $this->getInfo()->getCcSsIssue()) ?> - {{pdf_row_separator}} - - getInfo()->getCcSsStartYear()): ?> - __('Switch/Solo card start Date: %s/%s', $this->getCcStartMonth(), $this->getInfo()->getCcSsStartYear()) ?> - - diff --git a/app/design/adminhtml/default/default/template/downloadable/sales/items/column/downloadable/creditmemo/name.phtml b/app/design/adminhtml/default/default/template/downloadable/sales/items/column/downloadable/creditmemo/name.phtml index c7cf0a9bd5..aa5081c538 100644 --- a/app/design/adminhtml/default/default/template/downloadable/sales/items/column/downloadable/creditmemo/name.phtml +++ b/app/design/adminhtml/default/default/template/downloadable/sales/items/column/downloadable/creditmemo/name.phtml @@ -27,7 +27,7 @@ getItem()): ?>
    getName() ?>
    -
    helper('sales')->__('SKU') ?>: ', Mage::helper('catalog')->splitSku($this->getSku())); ?>
    +
    helper('sales')->__('SKU') ?>: ', Mage::helper('catalog')->splitSku($this->htmlEscape($this->getSku()))); ?>
    getOrderOptions()): ?>
    getOrderOptions() as $_option): ?> @@ -58,5 +58,5 @@
    - getDescription() ?> + htmlEscape($_item->getDescription()) ?> diff --git a/app/design/adminhtml/default/default/template/downloadable/sales/items/column/downloadable/invoice/name.phtml b/app/design/adminhtml/default/default/template/downloadable/sales/items/column/downloadable/invoice/name.phtml index 561389825c..43e7517c22 100644 --- a/app/design/adminhtml/default/default/template/downloadable/sales/items/column/downloadable/invoice/name.phtml +++ b/app/design/adminhtml/default/default/template/downloadable/sales/items/column/downloadable/invoice/name.phtml @@ -27,7 +27,7 @@ getItem()): ?>
    getName() ?>
    -
    helper('sales')->__('SKU') ?>: ', Mage::helper('catalog')->splitSku($this->getSku())); ?>
    +
    helper('sales')->__('SKU') ?>: ', Mage::helper('catalog')->splitSku($this->htmlEscape($this->getSku()))); ?>
    getOrderOptions()): ?>
    getOrderOptions() as $_option): ?> @@ -58,5 +58,5 @@
    - getDescription() ?> + htmlEscape($_item->getDescription()) ?> diff --git a/app/design/adminhtml/default/default/template/downloadable/sales/items/column/downloadable/name.phtml b/app/design/adminhtml/default/default/template/downloadable/sales/items/column/downloadable/name.phtml index fec8e02d9b..a0920e9665 100644 --- a/app/design/adminhtml/default/default/template/downloadable/sales/items/column/downloadable/name.phtml +++ b/app/design/adminhtml/default/default/template/downloadable/sales/items/column/downloadable/name.phtml @@ -27,7 +27,7 @@ getItem()): ?>
    getName() ?>
    -
    helper('sales')->__('SKU') ?>: ', Mage::helper('catalog')->splitSku($this->getSku())); ?>
    +
    helper('sales')->__('SKU') ?>: ', Mage::helper('catalog')->splitSku($this->htmlEscape($this->getSku()))); ?>
    getOrderOptions()): ?>
    getOrderOptions() as $_option): ?> @@ -58,5 +58,5 @@
    - getDescription() ?> + htmlEscape($_item->getDescription()) ?> diff --git a/app/design/adminhtml/default/default/template/eway/form.phtml b/app/design/adminhtml/default/default/template/eway/form.phtml deleted file mode 100644 index db46e24db5..0000000000 --- a/app/design/adminhtml/default/default/template/eway/form.phtml +++ /dev/null @@ -1,82 +0,0 @@ - -getMethodCode() ?> - - diff --git a/app/design/adminhtml/default/default/template/eway/info.phtml b/app/design/adminhtml/default/default/template/eway/info.phtml deleted file mode 100644 index fc0ac4ffff..0000000000 --- a/app/design/adminhtml/default/default/template/eway/info.phtml +++ /dev/null @@ -1,30 +0,0 @@ - -__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
    -__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
    -__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?>
    -__('Expiration Date: %s/%s', $this->htmlEscape($this->getCcExpMonth()), $this->htmlEscape($this->getInfo()->getCcExpYear())) ?> diff --git a/app/design/adminhtml/default/default/template/eway/pdf/info.phtml b/app/design/adminhtml/default/default/template/eway/pdf/info.phtml deleted file mode 100644 index d28b5ecd68..0000000000 --- a/app/design/adminhtml/default/default/template/eway/pdf/info.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?> - {{pdf_row_separator}} -__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?> - {{pdf_row_separator}} -__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> diff --git a/app/design/adminhtml/default/default/template/flo2cash/form.phtml b/app/design/adminhtml/default/default/template/flo2cash/form.phtml deleted file mode 100644 index db46e24db5..0000000000 --- a/app/design/adminhtml/default/default/template/flo2cash/form.phtml +++ /dev/null @@ -1,82 +0,0 @@ - -getMethodCode() ?> - - diff --git a/app/design/adminhtml/default/default/template/flo2cash/info.phtml b/app/design/adminhtml/default/default/template/flo2cash/info.phtml deleted file mode 100644 index cf01f088bd..0000000000 --- a/app/design/adminhtml/default/default/template/flo2cash/info.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -getMethod()->getTitle() ?>
    -__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
    -__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
    -__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?>
    -__('Expiration Date: %s/%s', $this->htmlEscape($this->getCcExpMonth()), $this->htmlEscape($this->getInfo()->getCcExpYear())) ?> diff --git a/app/design/adminhtml/default/default/template/ideal/advanced/pdf/info.phtml b/app/design/adminhtml/default/default/template/ideal/advanced/pdf/info.phtml deleted file mode 100644 index faecbc3d89..0000000000 --- a/app/design/adminhtml/default/default/template/ideal/advanced/pdf/info.phtml +++ /dev/null @@ -1,29 +0,0 @@ - -getMethod()->getTitle() ?> - {{pdf_row_separator}} -__('Ideal: %s', $this->htmlEscape($this->getInfo()->getIdealIssuerTitle())) ?> diff --git a/app/design/adminhtml/default/default/template/media/editor.phtml b/app/design/adminhtml/default/default/template/media/editor.phtml index 25ba3c5f50..556e9b335a 100644 --- a/app/design/adminhtml/default/default/template/media/editor.phtml +++ b/app/design/adminhtml/default/default/template/media/editor.phtml @@ -25,6 +25,7 @@ */ ?> helper('adminhtml/media_js')->includeScript('lib/flex.js') ?> +helper('adminhtml/media_js')->includeScript('lib/FABridge.js') ?> helper('adminhtml/media_js')->includeScript('mage/adminhtml/image.js') ?> helper('adminhtml/media_js')->getTranslatorScript() ?>
    diff --git a/app/design/adminhtml/default/default/template/media/uploader.phtml b/app/design/adminhtml/default/default/template/media/uploader.phtml index d08b5479b4..48e1e69356 100644 --- a/app/design/adminhtml/default/default/template/media/uploader.phtml +++ b/app/design/adminhtml/default/default/template/media/uploader.phtml @@ -32,6 +32,7 @@ helper('adminhtml/media_js')->includeScript('lib/flex.js') ?> helper('adminhtml/media_js')->includeScript('mage/adminhtml/flexuploader.js') ?> +helper('adminhtml/media_js')->includeScript('lib/FABridge.js') ?> helper('adminhtml/media_js')->getTranslatorScript() ?> diff --git a/app/design/adminhtml/default/default/template/notification/survey.phtml b/app/design/adminhtml/default/default/template/notification/survey.phtml new file mode 100644 index 0000000000..17c3b96d2b --- /dev/null +++ b/app/design/adminhtml/default/default/template/notification/survey.phtml @@ -0,0 +1,56 @@ + + +canShow()): ?> + +
    + helper('adminhtml')->__('We appreciate our merchants\' feedback, please take our survey to provide insight on the features you would like included in Magento. Remove this notification') ?> + +
    + diff --git a/app/design/adminhtml/default/default/template/ogone/info.phtml b/app/design/adminhtml/default/default/template/ogone/info.phtml deleted file mode 100644 index 2f5d15fef2..0000000000 --- a/app/design/adminhtml/default/default/template/ogone/info.phtml +++ /dev/null @@ -1,29 +0,0 @@ - - -htmlEscape($this->getMethod()->getTitle()) ?>
    -__('Payment ID: %s', $this->htmlEscape($this->getInfo()->getLastTransId())) ?>
    diff --git a/app/design/adminhtml/default/default/template/oscommerce/convert/run.phtml b/app/design/adminhtml/default/default/template/oscommerce/convert/run.phtml deleted file mode 100755 index 1a9ef3d4cb..0000000000 --- a/app/design/adminhtml/default/default/template/oscommerce/convert/run.phtml +++ /dev/null @@ -1,252 +0,0 @@ -
    " . $importModel->getResource()->convert($store['name']) . " Store"; - $html .= "oscommerce_import
    - - - oscommerce_import_type
    -
    - - oscommerce_ref
    -
    - - catalog_product_website
    -
    - - catalog_category_entity
    -
    - - oscommerce_orders
    -
    - - oscommerce_orders_products
    -
    - - oscommerce_orders_total
    -
    - - oscommerce_orders_status_history
    -
    - - - - - - Mage_Oscommerce_Block - - - - - - Mage_Oscommerce - - - - - pdo_mysql - mysql4 - 1 - - - - - - - - admin - - Mage_Oscommerce - oscommerce - - - - - - - - - - admin/observer - actionPreDispatchAdmin - - - - - - - - - - standard - - Mage_Oscommerce - oscommerce - - - - - - - oscommerce.xml - - - - - - - - - 10 - - - - diff --git a/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-install-0.8.0.php b/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-install-0.8.0.php deleted file mode 100755 index 8526581b1f..0000000000 --- a/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-install-0.8.0.php +++ /dev/null @@ -1,72 +0,0 @@ -startSetup(); - -$installer->run(" - --- DROP TABLE IF EXISTS `{$this->getTable('oscommerce_import')}`; - -CREATE TABLE `{$this->getTable('oscommerce_import')}` ( - `import_id` int(10) unsigned NOT NULL auto_increment, - `name` varchar(255) default NULL, - `created_at` datetime default NULL, - `updated_at` datetime default NULL, - `host` varchar(255) NOT NULL, - `port` int(5) NOT NULL, - `db_name` varchar(255) default NULL, - `db_user` varchar(255) default NULL, - `db_password` varchar(255) default NULL, - `db_type` varchar(32) default NULL, - PRIMARY KEY (`import_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -CREATE TABLE `{$this->getTable('oscommerce_import_type')}` ( - `type_id` int(2) unsigned NOT NULL auto_increment, - `type_code` varchar(32) NOT NULL, - `type_name` varchar(255) NOT NULL, - PRIMARY KEY (`type_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ; - -insert into `{$this->getTable('oscommerce_import_type')}`(`type_id`,`type_code`,`type_name`) values (1,'store','Store'),(2,'category','Category'),(3,'product','Product'), (4,'customer','Customer'),(5,'order','Order'); - -CREATE TABLE `{$this->getTable('oscommerce_ref')}` ( - `id` int(10) unsigned NOT NULL auto_increment, - `import_id` int(10) NOT NULL, - `type_id` int(10) NOT NULL, - `value` int(10) NOT NULL, - `ref_id` int(10) NOT NULL, - `created_at` datetime default NULL, - `user_id` int(10) default NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -"); - -$installer->endSetup(); diff --git a/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.1-0.8.2.php b/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.1-0.8.2.php deleted file mode 100644 index 8dca2f61e6..0000000000 --- a/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.1-0.8.2.php +++ /dev/null @@ -1,41 +0,0 @@ -startSetup(); - -$installer->run(" - -truncate `{$this->getTable('oscommerce_import_type')}`; -insert into `{$this->getTable('oscommerce_import_type')}`(`type_code`,`type_name`) values ('website', 'Website'),('store','Store'),('category','Category'),('product','Product'), ('customer','Customer'),('order','Order'),('group','Store Group'), ('taxclass', 'Product Tax Class'); - -ALTER TABLE `{$this->getTable('oscommerce_import')}` ADD table_prefix VARCHAR(32) DEFAULT NULL; - -"); - -$installer->endSetup(); diff --git a/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.2-0.8.3.php b/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.2-0.8.3.php deleted file mode 100644 index a5f49df556..0000000000 --- a/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.2-0.8.3.php +++ /dev/null @@ -1,125 +0,0 @@ -startSetup(); - -$installer->run(" -CREATE TABLE IF NOT EXISTS `{$this->getTable('oscommerce_orders')}` ( - `osc_magento_id` int(11) NOT NULL auto_increment, - `orders_id` int(11) NOT NULL, - `customers_id` int(11) NOT NULL default '0', - `magento_customers_id` int(11) NOT NULL default '0', - `import_id` int(11) NOT NULL default '0', - `website_id` int(11) NOT NULL default '0', - `customers_name` varchar(64) NOT NULL default '', - `customers_company` varchar(32) default NULL, - `customers_street_address` varchar(64) NOT NULL default '', - `customers_suburb` varchar(32) default NULL, - `customers_city` varchar(32) NOT NULL default '', - `customers_postcode` varchar(10) NOT NULL default '', - `customers_state` varchar(32) default NULL, - `customers_country` varchar(32) NOT NULL default '', - `customers_telephone` varchar(32) NOT NULL default '', - `customers_email_address` varchar(96) NOT NULL default '', - `customers_address_format_id` int(5) NOT NULL default '0', - `delivery_name` varchar(64) NOT NULL default '', - `delivery_company` varchar(32) default NULL, - `delivery_street_address` varchar(64) NOT NULL default '', - `delivery_suburb` varchar(32) default NULL, - `delivery_city` varchar(32) NOT NULL default '', - `delivery_postcode` varchar(10) NOT NULL default '', - `delivery_state` varchar(32) default NULL, - `delivery_country` varchar(32) NOT NULL default '', - `delivery_address_format_id` int(5) NOT NULL default '0', - `billing_name` varchar(64) NOT NULL default '', - `billing_company` varchar(32) default NULL, - `billing_street_address` varchar(64) NOT NULL default '', - `billing_suburb` varchar(32) default NULL, - `billing_city` varchar(32) NOT NULL default '', - `billing_postcode` varchar(10) NOT NULL default '', - `billing_state` varchar(32) default NULL, - `billing_country` varchar(32) NOT NULL default '', - `billing_address_format_id` int(5) NOT NULL default '0', - `payment_method` varchar(255) NOT NULL default '', - `cc_type` varchar(20) default NULL, - `cc_owner` varchar(64) default NULL, - `cc_number` varchar(32) default NULL, - `cc_expires` varchar(4) default NULL, - `last_modified` datetime default NULL, - `date_purchased` datetime default NULL, - `orders_status` int(5) NOT NULL default '0', - `orders_date_finished` datetime default NULL, - `currency` char(3) default NULL, - `currency_value` decimal(14,6) default NULL, - `currency_symbol` char(3) default NULL, - PRIMARY KEY (`osc_magento_id`), - KEY `idx_orders_customers_id` (`customers_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - -CREATE TABLE IF NOT EXISTS `{$this->getTable('oscommerce_orders_products')}` ( - `orders_products_id` int(11) NOT NULL auto_increment, - `osc_magento_id` int(11) NOT NULL default '0', - `products_id` int(11) NOT NULL default '0', - `products_model` varchar(12) default NULL, - `products_name` varchar(64) NOT NULL default '', - `products_price` decimal(15,4) NOT NULL default '0.0000', - `final_price` decimal(15,4) NOT NULL default '0.0000', - `products_tax` decimal(7,4) NOT NULL default '0.0000', - `products_quantity` int(2) NOT NULL default '0', - PRIMARY KEY (`orders_products_id`), - KEY `idx_orders_products_osc_magento_id` (`osc_magento_id`), - KEY `idx_orders_products_products_id` (`products_id`) -) ENGINE=MyISAM CHARSET=latin1; - -CREATE TABLE IF NOT EXISTS `{$this->getTable('oscommerce_orders_total')}` ( - `orders_total_id` int(10) unsigned NOT NULL auto_increment, - `osc_magento_id` int(11) NOT NULL default '0', - `title` varchar(255) NOT NULL default '', - `text` varchar(255) NOT NULL default '', - `value` decimal(15,4) NOT NULL default '0.0000', - `class` varchar(32) NOT NULL default '', - `sort_order` int(11) NOT NULL default '0', - PRIMARY KEY (`orders_total_id`), - KEY `idx_orders_total_osc_magento_id` (`osc_magento_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - -CREATE TABLE IF NOT EXISTS `{$this->getTable('oscommerce_orders_status_history')}`( - `orders_status_history_id` int(11) NOT NULL auto_increment, - `osc_magento_id` int(11) NOT NULL default '0', - `orders_status_id` int(5) NOT NULL default '0', - `date_added` datetime NOT NULL default '0000-00-00 00:00:00', - `customer_notified` int(1) default '0', - `comments` text, - PRIMARY KEY (`orders_status_history_id`), - KEY `idx_orders_status_history_osc_magento_id` (`osc_magento_id`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; - -"); - -$installer->endSetup(); diff --git a/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.4-0.8.5.php b/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.4-0.8.5.php deleted file mode 100644 index 85ad7eed7c..0000000000 --- a/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.4-0.8.5.php +++ /dev/null @@ -1,37 +0,0 @@ -startSetup(); - -$installer->run(" - ALTER TABLE `{$this->getTable('oscommerce_orders')}` MODIFY orders_status varchar(32) default NULL; - ALTER TABLE `{$this->getTable('oscommerce_orders_status_history')}` ADD orders_status varchar(32) default NULL; -"); - -$installer->endSetup(); diff --git a/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.6-0.8.7.php b/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.6-0.8.7.php deleted file mode 100644 index 980784ed95..0000000000 --- a/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.6-0.8.7.php +++ /dev/null @@ -1,39 +0,0 @@ -startSetup(); - -$installer->run(" -ALTER TABLE `{$this->getTable('oscommerce_orders')}` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; -ALTER TABLE `{$this->getTable('oscommerce_orders_products')}` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; -ALTER TABLE `{$this->getTable('oscommerce_orders_status_history')}` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; -ALTER TABLE `{$this->getTable('oscommerce_orders_total')}` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; -"); - -$installer->endSetup(); diff --git a/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.7-0.8.8.php b/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.7-0.8.8.php deleted file mode 100644 index 4c013e8178..0000000000 --- a/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.7-0.8.8.php +++ /dev/null @@ -1,41 +0,0 @@ -startSetup(); - -$installer->run(" -ALTER TABLE `{$this->getTable('oscommerce_orders')}` ADD purchased_year INT(4) DEFAULT NULL; -ALTER TABLE `{$this->getTable('oscommerce_orders')}` ADD purchased_month INT(2) DEFAULT NULL; -ALTER TABLE `{$this->getTable('oscommerce_orders')}` ADD purchased_day INT(2) DEFAULT NULL; -ALTER TABLE `{$this->getTable('oscommerce_orders')}` ADD modified_year INT(4) DEFAULT NULL; -ALTER TABLE `{$this->getTable('oscommerce_orders')}` ADD modified_month INT(2) DEFAULT NULL; -ALTER TABLE `{$this->getTable('oscommerce_orders')}` ADD modified_day INT(2) DEFAULT NULL; -"); - -$installer->endSetup(); diff --git a/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.8-0.8.9.php b/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.8-0.8.9.php deleted file mode 100644 index 78baa3674e..0000000000 --- a/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.8-0.8.9.php +++ /dev/null @@ -1,41 +0,0 @@ -startSetup(); - -$installer->run(" -ALTER TABLE `{$this->getTable('oscommerce_orders')}` DROP COLUMN purchased_year; -ALTER TABLE `{$this->getTable('oscommerce_orders')}` DROP COLUMN purchased_month; -ALTER TABLE `{$this->getTable('oscommerce_orders')}` DROP COLUMN purchased_day; -ALTER TABLE `{$this->getTable('oscommerce_orders')}` DROP COLUMN modified_year; -ALTER TABLE `{$this->getTable('oscommerce_orders')}` DROP COLUMN modified_month; -ALTER TABLE `{$this->getTable('oscommerce_orders')}` DROP COLUMN modified_day; -"); - -$installer->endSetup(); diff --git a/app/code/core/Mage/Page/Block/Html/Head.php b/app/code/core/Mage/Page/Block/Html/Head.php index cba29c64b1..0774c22b92 100644 --- a/app/code/core/Mage/Page/Block/Html/Head.php +++ b/app/code/core/Mage/Page/Block/Html/Head.php @@ -236,7 +236,7 @@ public function getCssJsHtml() protected function &_prepareStaticAndSkinElements($format, array $staticItems, array $skinItems, $mergeCallback = null) { $designPackage = Mage::getDesign(); - $baseUrl = Mage::getBaseUrl('web'); + $baseJsUrl = Mage::getBaseUrl('js'); $items = array(); if ($mergeCallback && !is_callable($mergeCallback)) { $mergeCallback = null; @@ -245,8 +245,7 @@ protected function &_prepareStaticAndSkinElements($format, array $staticItems, a // get static files from the js folder, no need in lookups foreach ($staticItems as $params => $rows) { foreach ($rows as $name) { - $items[$params][] = $mergeCallback ? Mage::getBaseDir() . DS . 'js' . DS . $name - : $baseUrl . 'js/' . $name; + $items[$params][] = $mergeCallback ? Mage::getBaseDir() . DS . 'js' . DS . $name : $baseJsUrl . $name; } } diff --git a/app/code/core/Mage/Page/Block/Html/Pager.php b/app/code/core/Mage/Page/Block/Html/Pager.php index d9bb273413..55f401f87f 100644 --- a/app/code/core/Mage/Page/Block/Html/Pager.php +++ b/app/code/core/Mage/Page/Block/Html/Pager.php @@ -36,13 +36,14 @@ class Mage_Page_Block_Html_Pager extends Mage_Core_Block_Template { protected $_collection = null; - protected $_pageVarName = 'p'; - protected $_limitVarName = 'limit'; - protected $_availableLimit = array(10=>10,20=>20,50=>50); - protected $_dispersion = 3; - protected $_displayPages = 5; - protected $_showPerPage = true; - protected $_limit = null; + protected $_pageVarName = 'p'; + protected $_limitVarName = 'limit'; + protected $_availableLimit = array(10=>10,20=>20,50=>50); + protected $_dispersion = 3; + protected $_displayPages = 5; + protected $_showPerPage = true; + protected $_limit = null; + protected $_outputRequired = true; /** * Pages quantity per frame @@ -409,7 +410,7 @@ public function getJump() * Setter for $_frameLength * * @param int $frame - * @return Mage_Catalog_Block_Product_List_Toolbar_Pager + * @return Mage_Page_Block_Html_Pager */ public function setFrameLength($frame) { @@ -429,7 +430,7 @@ public function setFrameLength($frame) * Setter for $_jump * * @param int $jump - * @return Mage_Catalog_Block_Product_List_Toolbar_Pager + * @return Mage_Page_Block_Html_Pager */ public function setJump($jump) { @@ -485,7 +486,7 @@ public function canShowNextJump() /** * Initialize frame data, such as frame start, frame start etc. * - * @return Mage_Catalog_Block_Product_List_Toolbar_Pager + * @return Mage_Page_Block_Html_Pager */ protected function _initFrame() { @@ -526,7 +527,7 @@ protected function _initFrame() * Setter for flag _frameInitialized * * @param bool $flag - * @return Mage_Catalog_Block_Product_List_Toolbar_Pager + * @return Mage_Page_Block_Html_Pager */ protected function _setFrameInitialized($flag) { @@ -537,7 +538,7 @@ protected function _setFrameInitialized($flag) /** * Check if frame data was initialized * - * @return Mage_Catalog_Block_Product_List_Toolbar_Pager + * @return Mage_Page_Block_Html_Pager */ public function isFrameInitialized() { @@ -563,5 +564,29 @@ public function getAnchorTextForNext() { return Mage::getStoreConfig('design/pagination/anchor_text_for_next'); } -} + /** + * Set whether output of the pager is mandatory + * + * @param bool $isRequired + * @return Mage_Page_Block_Html_Pager + */ + public function setIsOutputRequired($isRequired) + { + $this->_outputRequired = (bool)$isRequired; + return $this; + } + + /** + * Determine whether the pagination should be eventually rendered + * + * @return string + */ + protected function _toHtml() + { + if ($this->_outputRequired || $this->getTotalNum() > $this->getLimit()) { + return parent::_toHtml(); + } + return ''; + } +} diff --git a/app/code/core/Mage/Page/Block/Html/Wrapper.php b/app/code/core/Mage/Page/Block/Html/Wrapper.php index 9197866947..74e52eff09 100644 --- a/app/code/core/Mage/Page/Block/Html/Wrapper.php +++ b/app/code/core/Mage/Page/Block/Html/Wrapper.php @@ -49,15 +49,17 @@ class Mage_Page_Block_Html_Wrapper extends Mage_Core_Block_Abstract */ protected function _toHtml() { - if ($this->_dependsOnChildren && empty($this->_children)) { + $html = empty($this->_children) ? '' : trim($this->getChildHtml('', true, true)); + if ($this->_dependsOnChildren && empty($html)) { return ''; } + if ($this->_isInvisible()) { + return $html; + } $id = $this->hasElementId() ? sprintf(' id="%s"', $this->getElementId()) : ''; $class = $this->hasElementClass() ? sprintf(' class="%s"', $this->getElementClass()) : ''; $otherParams = $this->hasOtherParams() ? ' ' . $this->getOtherParams() : ''; - return sprintf('<%1$s%2$s%3$s%4$s>%5$s', - $this->getElementTagName(), $id, $class, $otherParams, $this->getChildHtml() - ); + return sprintf('<%1$s%2$s%3$s%4$s>%5$s', $this->getElementTagName(), $id, $class, $otherParams, $html); } /** @@ -80,4 +82,23 @@ public function dependsOnChildren($depends = '0') $this->_dependsOnChildren = (bool)(int)$depends; return $this; } + + /** + * Whether the wrapper element should be eventually rendered + * If it becomes "invisible", the behaviour will be somewhat similar to core/text_list + * + * @return bool + */ + protected function _isInvisible() + { + if (!$this->hasMayBeInvisible()) { + return false; + } + foreach ($this->_children as $child) { + if ($child->hasWrapperMustBeVisible()) { + return false; + } + } + return true; + } } diff --git a/app/code/core/Mage/Eway/Block/Secure/Failure.php b/app/code/core/Mage/Page/Block/Js/Cookie.php similarity index 59% rename from app/code/core/Mage/Eway/Block/Secure/Failure.php rename to app/code/core/Mage/Page/Block/Js/Cookie.php index 9c76d62811..a1c41b9dc3 100644 --- a/app/code/core/Mage/Eway/Block/Secure/Failure.php +++ b/app/code/core/Mage/Page/Block/Js/Cookie.php @@ -19,35 +19,43 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Eway + * @package Mage_Page * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -/** - * Secure Failure Response Block - * - * @category Mage - * @package Mage_Eway - * @author Magento Core Team - */ -class Mage_Eway_Block_Secure_Failure extends Mage_Core_Block_Template +class Mage_Page_Block_Js_Cookie extends Mage_Core_Block_Template { /** - * Return Error message + * Get cookie model instance * - * @return string + * @return Mage_Core_Model_Cookie */ - public function getErrorMessage () + public function getCookie() { - return Mage::getSingleton('checkout/session')->getEwayErrorMessage(); + return Mage::getSingleton('core/cookie'); + } + /** + * Get configured cookie domain + * + * @return string + */ + public function getDomain() + { + $domain = $this->getCookie()->getDomain(); + if (!empty($domain[0]) && ($domain[0] !== '.')) { + $domain = '.'.$domain; + } + return $domain; } /** - * Get continue shopping url + * Get configured cookie path + * + * @return string */ - public function getContinueShoppingUrl() + public function getPath() { - return Mage::getUrl('checkout/cart'); + return $this->getCookie()->getPath(); } } diff --git a/app/code/core/Mage/Paybox/Block/Adminhtml/Cart/Type.php b/app/code/core/Mage/Paybox/Block/Adminhtml/Cart/Type.php deleted file mode 100644 index 98fc47b8f3..0000000000 --- a/app/code/core/Mage/Paybox/Block/Adminhtml/Cart/Type.php +++ /dev/null @@ -1,46 +0,0 @@ - - */ -class Mage_Paybox_Block_Adminhtml_Cart_Type extends Mage_Adminhtml_Block_System_Config_Form_Field -{ - protected function _getElementHtml(Varien_Data_Form_Element_Abstract $element) - { - $additional = Mage::getSingleton('core/layout')->createBlock('paybox/adminhtml_cart_type_select') - ->setTemplate('paybox/adminhtml/cart/type/select.phtml') - ->setDependHtmlId($element->getHtmlId()) - ->toHtml(); - - return parent::_getElementHtml($element).$additional; - } - -} diff --git a/app/code/core/Mage/Paybox/Block/Direct/Form.php b/app/code/core/Mage/Paybox/Block/Direct/Form.php deleted file mode 100644 index 42f9a29602..0000000000 --- a/app/code/core/Mage/Paybox/Block/Direct/Form.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ -class Mage_Paybox_Block_Direct_Form extends Mage_Payment_Block_Form_Cc -{ - protected function _construct() - { - parent::_construct(); - $this->setTemplate('paybox/direct/form.phtml'); - } - -} diff --git a/app/code/core/Mage/Paybox/Block/System/Error.php b/app/code/core/Mage/Paybox/Block/System/Error.php deleted file mode 100644 index cf545cbd0f..0000000000 --- a/app/code/core/Mage/Paybox/Block/System/Error.php +++ /dev/null @@ -1,93 +0,0 @@ - - */ -class Mage_Paybox_Block_System_Error extends Mage_Core_Block_Template -{ - - /** - * Error messages desciptions - * - * @var array - */ - protected $_pbxErrorsDesc; - - /** - * Enter description here... - * - * @return Mage_Checkout_Model_Session - */ - public function getCheckout() - { - return Mage::getSingleton('checkout/session'); - } - - public function getErrorMessage() - { - if (empty($this->_pbxErrorsDesc)) { - $this->_pbxErrorsDesc = array( - '-1' => 'Error in reading the parameters via stdin (POST method) (error in http reception)', - '-2' => 'Error in memory allocation. Not enough memory available on the trader\'s server', - '-3' => 'Error in reading the parameters QUERY_STRING or CONTENT_LENGTH. (http error)', - '-4' => 'PBX_RETOUR, PBX_ANNULE, PBX_REFUSE or PBX_EFFECTUE are too long (<150 characters)', - '-5' => 'Error in opening the file (if PBX_MODE contains 3) : local file non-existent, not found or access error', - '-6' => 'Error in file format (if PBX_MODE contains 3) : local file badly formed, empty or lines are badly formatted', - '-7' => 'A compulsory variable is missing (PBX_SITE, PBX_RANG, PBX_IDENTIFIANT, PBX_TOTAL, PBX_CMD, etc.)', - '-8' => 'One of the numerical variables contains a non-numerical character (site, rank, identifier, amount, currency etc.)', - '-9' => 'PBX_SITE contains a site number which does not consist of exactly 7 characters', - '-10' => 'PBX_RANG contains a rank number which does not consist of exactly 2 characters', - '-11' => 'PBX_TOTAL has more than 10 or fewer than 3 numerical characters', - '-12' => 'PBX_LANGUE or PBX_DEVISE contains a code which does not contain exactly 3 characters', - '-13' => 'PBX_CMD is empty or contains a reference longer than 250 characters', - '-14' => '', - '-15' => '', - '-16' => 'PBX_PORTEUR does not contain a valid e-mail address', - '-17' => 'Error of coherence (multi-baskets) : Reserved Future Usage', - ); - } - $msg = Mage::helper('paybox')->__($this->_pbxErrorsDesc[$this->getCheckout()->getPayboxErrorNumber()]); - $this->getCheckout()->unsPayboxErrorNumber(); - return $msg; - } - - /** - * Get continue shopping url - * - * @return string - */ - public function getContinueShoppingUrl() - { - return Mage::getUrl('checkout/cart', array('_secure' => true)); - } - -} diff --git a/app/code/core/Mage/Paybox/Block/System/Form.php b/app/code/core/Mage/Paybox/Block/System/Form.php deleted file mode 100644 index e2785d4082..0000000000 --- a/app/code/core/Mage/Paybox/Block/System/Form.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ -class Mage_Paybox_Block_System_Form extends Mage_Payment_Block_Form -{ - protected function _construct() - { - $this->setTemplate('paybox/system/form.phtml'); - parent::_construct(); - } -} diff --git a/app/code/core/Mage/Paybox/Block/System/Redirect.php b/app/code/core/Mage/Paybox/Block/System/Redirect.php deleted file mode 100644 index 576e613971..0000000000 --- a/app/code/core/Mage/Paybox/Block/System/Redirect.php +++ /dev/null @@ -1,57 +0,0 @@ - - */ -class Mage_Paybox_Block_System_Redirect extends Mage_Core_Block_Abstract -{ - protected function _toHtml() - { - $system = $this->getOrder()->getPayment()->getMethodInstance(); - - $form = new Varien_Data_Form(); - $form->setAction(Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).$system->getPayboxFile()) - ->setId('paybox_system_checkout') - ->setName('paybox_system_checkout') - ->setMethod('POST') - ->setUseContainer(true); - foreach ($system->getFormFields() as $field=>$value) { - $form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value)); - } - $html = ''; - $html.= $this->__('You will be redirected to Paybox in a few seconds.'); - $html.= $form->toHtml(); - $html.= ''; - $html.= ''; - - return $html; - } -} diff --git a/app/code/core/Mage/Paybox/Helper/Data.php b/app/code/core/Mage/Paybox/Helper/Data.php deleted file mode 100644 index b398b2d488..0000000000 --- a/app/code/core/Mage/Paybox/Helper/Data.php +++ /dev/null @@ -1,37 +0,0 @@ - - */ -class Mage_Paybox_Helper_Data extends Mage_Core_Helper_Abstract -{ - -} diff --git a/app/code/core/Mage/Paybox/Model/Api/Debug.php b/app/code/core/Mage/Paybox/Model/Api/Debug.php deleted file mode 100644 index e2f9274a4c..0000000000 --- a/app/code/core/Mage/Paybox/Model/Api/Debug.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -class Mage_Paybox_Model_Api_Debug extends Mage_Core_Model_Abstract -{ - protected function _construct() - { - $this->_init('paybox/api_debug'); - } -} diff --git a/app/code/core/Mage/Paybox/Model/Direct.php b/app/code/core/Mage/Paybox/Model/Direct.php deleted file mode 100644 index de6c8aaec1..0000000000 --- a/app/code/core/Mage/Paybox/Model/Direct.php +++ /dev/null @@ -1,506 +0,0 @@ - - */ -class Mage_Paybox_Model_Direct extends Mage_Payment_Model_Method_Cc -{ - /** - * Paybox direct payment actions - */ - const PBX_PAYMENT_ACTION_ATHORIZE = '00001'; - const PBX_PAYMENT_ACTION_DEBIT = '00002'; - const PBX_PAYMENT_ACTION_ATHORIZE_CAPTURE = '00003'; - const PBX_PAYMENT_ACTION_CANCELLATION = '00005'; - const PBX_PAYMENT_ACTION_REFUND = '00004'; - - const PBX_VERSION = '00103'; - - /** - * ECL(Electronic Commerce Indicator). - * Type of ordering items. Need for some banks. - * 024 - request by internet - */ - const PBX_ACTIVITE_VALUE = '024'; - - protected $_code = 'paybox_direct'; - - protected $_isGateway = true; - protected $_canAuthorize = true; - protected $_canCapture = true; - protected $_canCapturePartial = false; - protected $_canRefund = true; - protected $_canVoid = false; - protected $_canUseInternal = true; - protected $_canUseCheckout = true; - protected $_canUseForMultishipping = true; - protected $_canSaveCc = true; - - protected $_formBlockType = 'paybox/direct_form'; - protected $_infoBlockType = 'paybox/direct_info'; - - protected $_order; - protected $_currenciesNumbers; - protected $_questionNumberModel; - - /** - * Return paybox gateway url. - * If $recallNumber > 0 (primary url is not available) return url of backup gateway - * - * @param integer $recallNumber - * @return string - */ - public function getPayboxUrl($recallNumber) - { - $path = 'pbx_url'; - if ($recallNumber) { - $path = 'pbx_backupurl'; - } - return $this->getConfigData($path); - } - - /** - * Get Payment Action of Paybox Direct, - * changed to Paybox specification - * - * @return string - */ - public function getPaymentAction() - { - $paymentAction = $this->getConfigData('payment_action'); - switch ($paymentAction) { - case self::ACTION_AUTHORIZE: - return self::PBX_PAYMENT_ACTION_ATHORIZE; - break; - case self::ACTION_AUTHORIZE_CAPTURE: - return self::PBX_PAYMENT_ACTION_ATHORIZE_CAPTURE; - break; - default: - return self::PBX_PAYMENT_ACTION_ATHORIZE; - break; - } - } - - /** - * Return site number of account (TPE) - * - * @return string - */ - public function getSiteNumber() - { - return $this->getConfigData('pbx_site'); - } - - /** - * Return rang number of account - * - * @return string - */ - public function getRang() - { - return $this->getConfigData('pbx_rang'); - } - - /** - * Return Cle number of account - * - * @return string - */ - public function getCleNumber() - { - return $this->getConfigData('pbx_cle'); - } - - /** - * Return currency number in ISO4217 format - * - * @return string - */ - public function getCurrencyNumb() - { - $currencyCode = $this->getPayment()->getOrder()->getBaseCurrencyCode(); - if (!$this->_currenciesNumbers) { - $this->_currenciesNumbers = simplexml_load_file(Mage::getBaseDir().'/app/code/core/Mage/Paybox/etc/currency.xml'); - } - if ($this->_currenciesNumbers->$currencyCode) { - return (string)$this->_currenciesNumbers->$currencyCode; - } - } - - /** - * Return model of Question Number - * - * @return Mage_Paybox_Model_Question_Number - */ - public function getQuestionNumberModel() - { - if (!$this->_questionNumberModel) { - $accountHash = md5($this->getSiteNumber().$this->getRang()); - $this->_questionNumberModel = Mage::getModel('paybox/question_number')->load($accountHash, 'account_hash'); - } - return $this->_questionNumberModel; - } - - /** - * Return Debug Flag - * - * @return string - */ - public function getDebugFlag() - { - return $this->getConfigData('debug_flag'); - } - - public function authorize(Varien_Object $payment, $amount) - { - parent::authorize($payment, $amount); - - $this->setAmount($amount) - ->setPayment($payment); - - if ($this->callDoDirectPayment()!==false) { - $payment->setStatus(self::STATUS_APPROVED) - ->setLastTransId($this->getTransactionId()) - ->setPayboxRequestNumber($this->getRequestNumber()) - ->setPayboxQuestionNumber($this->getQuestionNumber()); - } else { - $e = $this->getError(); - if (isset($e['message'])) { - $message = Mage::helper('paybox')->__('There has been an error processing your payment. ') . $e['message']; - } else { - $message = Mage::helper('paybox')->__('There has been an error processing your payment. Please try later or contact us for help.'); - } - Mage::throwException($message); - } - - return $this; - } - - public function capture(Varien_Object $payment, $amount) - { - parent::capture($payment, $amount); - - $this->setAmount($amount) - ->setPayment($payment); - - if ($payment->getLastTransId()) {//if after authorize - $result = $this->callDoDebitPayment()!==false; - } else {//authorize+capture (debit) - $result = $this->callDoDirectPayment()!==false; - } - - if ($result) { - $payment->setStatus(self::STATUS_APPROVED) - ->setLastTransId($this->getTransactionId()) - ->setPayboxRequestNumber($this->getRequestNumber()); - } else { - $e = $this->getError(); - if (isset($e['message'])) { - $message = Mage::helper('paybox')->__('There has been an error processing your payment. ') . $e['message']; - } else { - $message = Mage::helper('paybox')->__('There has been an error processing your payment. Please try later or contact us for help.'); - } - Mage::throwException($message); - } - - return $this; - } - - public function cancel(Varien_Object $payment) - { - $payment->setStatus(self::STATUS_DECLINED); - return $this; - } - - public function refund(Varien_Object $payment, $amount) - { - parent::refund($payment, $amount); - - $error = false; - if($payment->getRefundTransactionId() && $amount>0) { - $this->setTransactionId($payment->getRefundTransactionId()) - ->setPayment($payment) - ->setAmount($amount); - - if ($this->callDoRefund()!==false) { - $payment->setStatus(self::STATUS_SUCCESS) - ->setCcTransId($this->getTransactionId()); - } else { - $payment->setStatus(self::STATUS_ERROR); - $e = $this->getError(); - if (isset($e['message'])) { - $error = $e['message']; - } else { - $error = Mage::helper('paybox')->__('Error in refunding the payment'); - } - } - } else { - $payment->setStatus(self::STATUS_ERROR); - $error = Mage::helper('paybox')->__('Error in refunding the payment'); - } - if ($error !== false) { - Mage::throwException($error); - } - - return $this; - } - - /** - * Building array of params for direct payment - * - * @return bool | array - */ - public function callDoDirectPayment() - { - $payment = $this->getPayment(); - $requestStr = ''; - - $tmpArr = array( - 'VERSION' => self::PBX_VERSION, - 'DATEQ' => Mage::getModel('core/date')->date('dmYHis'), - 'TYPE' => $this->getPaymentAction(), - 'NUMQUESTION' => $this->getQuestionNumberModel()->getNextQuestionNumber(), - 'SITE' => $this->getSiteNumber(), - 'RANG' => $this->getRang(), - 'CLE' => $this->getCleNumber(), - 'IDENTIFIANT' => '', - 'MONTANT' => ($this->getAmount()*100), - 'DEVISE' => $this->getCurrencyNumb(), - 'REFERENCE' => base64_encode($payment->getOrder()->getRealOrderId()), - 'PORTEUR' => $payment->getCcNumber(), - 'DATEVAL' => Mage::getModel('core/date')->date('my', mktime(0,0,0,$payment->getCcExpMonth(),1,$payment->getCcExpYear())), - 'CVV' => $payment->getCcCid(), - 'ACTIVITE' => self::PBX_ACTIVITE_VALUE, - ); - - foreach ($tmpArr as $param=>$value) { - $requestStr .= $param . '=' . $value . '&'; - } - $requestStr = substr($requestStr, 0, -1); - - $resultArr = $this->call($requestStr); - - if ($resultArr === false) { - return false; - } - - $this->getQuestionNumberModel() - ->increaseQuestionNumber(); - - $this->setTransactionId($resultArr['NUMTRANS']); - $this->setRequestNumber($resultArr['NUMAPPEL']); - $this->setQuestionNumber($resultArr['NUMQUESTION']); - - return $resultArr; - } - - /** - * Building array of params for debit (after authorize) - * - * @return bool | array - */ - public function callDoDebitPayment() - { - $payment = $this->getPayment(); - $requestStr = ''; - - $tmpArr = array( - 'VERSION' => self::PBX_VERSION, - 'DATEQ' => Mage::getModel('core/date')->date('dmYHis'), - 'TYPE' => self::PBX_PAYMENT_ACTION_DEBIT, - 'NUMQUESTION' => $payment->getPayboxQuestionNumber(), - 'SITE' => $this->getSiteNumber(), - 'RANG' => $this->getRang(), - 'CLE' => $this->getCleNumber(), - 'MONTANT' => ($this->getAmount()*100), - 'DEVISE' => (string)$this->getCurrencyNumb(), - 'REFERENCE' => base64_encode($payment->getOrder()->getRealOrderId()), - 'NUMAPPEL' => $payment->getPayboxRequestNumber(), - 'NUMTRANS' => $payment->getLastTransId(), - ); - - foreach ($tmpArr as $param=>$value) { - $requestStr .= $param . '=' . $value . '&'; - } - $requestStr = substr($requestStr, 0, -1); - - $resultArr = $this->call($requestStr); - - if ($resultArr === false) { - return false; - } - - $this->setTransactionId($resultArr['NUMTRANS']); - - return $resultArr; - } - - /** - * Building array of params for refund - * - * @return bool | array - */ - public function callDoRefund() - { - $payment = $this->getPayment(); - $requestStr = ''; - - $tmpArr = array( - 'VERSION' => self::PBX_VERSION, - 'DATEQ' => Mage::getModel('core/date')->date('dmYHis'), - 'TYPE' => self::PBX_PAYMENT_ACTION_REFUND, - 'NUMQUESTION' => $this->getQuestionNumberModel()->getNextQuestionNumber(), - 'SITE' => $this->getSiteNumber(), - 'RANG' => $this->getRang(), - 'CLE' => $this->getCleNumber(), - 'MONTANT' => ($this->getAmount()*100), - 'DEVISE' => (string)$this->getCurrencyNumb(), - 'REFERENCE' => base64_encode($payment->getOrder()->getRealOrderId()), - 'PORTEUR' => $payment->getCcNumber(), - 'DATEVAL' => Mage::getModel('core/date')->date('my', mktime(0,0,0,$payment->getCcExpMonth(),1,$payment->getCcExpYear())), - 'NUMAPPEL' => '', - 'NUMTRANS' => '', - ); - - foreach ($tmpArr as $param=>$value) { - $requestStr .= $param . '=' . $value . '&'; - } - $requestStr = substr($requestStr, 0, -1); - - $resultArr = $this->call($requestStr); - - if ($resultArr === false) { - return false; - } - - $this->getQuestionNumberModel() - ->increaseQuestionNumber(); - - $this->setTransactionId($resultArr['NUMTRANS']); - - return $resultArr; - } - - /** - * Making a call to gateway - * - * @param string $requestStr - * @return bool | array - */ - public function call($requestStr) - { - if ($this->getDebugFlag()) { - $debug = Mage::getModel('paybox/api_debug') - ->setRequestBody($requestStr) - ->save(); - } - $recall = true; - $recallCounter = 0; - while ($recall && $recallCounter < 3) { - $recall = false; - $this->unsError(); - - $http = new Varien_Http_Adapter_Curl(); - $config = array('timeout' => 30); - $http->setConfig($config); - $http->write(Zend_Http_Client::POST, $this->getPayboxUrl($recallCounter), '1.1', array(), $requestStr); - $response = $http->read(); - - $response = preg_split('/^\r?$/m', $response, 2); - $response = trim($response[1]); - - if ($http->getErrno()) { - $http->close(); - if ($this->getDebugFlag()) { - $debug->setResponseBody($response)->save(); - } - $this->setError(array( - 'message' => $http->getError() - )); - return false; - } - $http->close(); - - $parsedResArr = $this->parseResponseStr($response); - - //primary gateway is down, need to recall to backup gateway - if ($parsedResArr['CODEREPONSE'] == '00001' || - $parsedResArr['CODEREPONSE'] == '00097' || - $parsedResArr['CODEREPONSE'] == '00098' - ) { - $recallCounter++; - $recall = true; - } - } - - if ($this->getDebugFlag()) { - $debug->setResponseBody($response)->save(); - } - - //if backup gateway was down too - if ($recall) { - $this->setError(array( - 'message' => Mage::helper('paybox')->__('Paybox payment gateway is not available right now') - )); - return false; - } - - if ($parsedResArr['CODEREPONSE'] == '00000') { - return $parsedResArr; - } - - if (isset($parsedResArr['COMMENTAIRE'])) { - $this->setError(array( - 'message' => $parsedResArr['CODEREPONSE'] . ':' . $parsedResArr['COMMENTAIRE'] - )); - } - - return false; - } - - /** - * Parsing response string - * - * @param string $str - * @return array - */ - public function parseResponseStr($str) - { - $tmpResponseArr = explode('&', $str); - $responseArr = array(); - foreach ($tmpResponseArr as $response) { - $paramValue = explode('=', $response); - $responseArr[$paramValue[0]] = $paramValue[1]; - } - - return $responseArr; - } -} diff --git a/app/code/core/Mage/Paybox/Model/Mysql4/Api/Debug.php b/app/code/core/Mage/Paybox/Model/Mysql4/Api/Debug.php deleted file mode 100644 index cc7bd6adc6..0000000000 --- a/app/code/core/Mage/Paybox/Model/Mysql4/Api/Debug.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -class Mage_Paybox_Model_Mysql4_Api_Debug extends Mage_Core_Model_Mysql4_Abstract -{ - protected function _construct() - { - $this->_init('paybox/api_debug', 'debug_id'); - } -} diff --git a/app/code/core/Mage/Paybox/Model/Mysql4/Api/Debug/Collection.php b/app/code/core/Mage/Paybox/Model/Mysql4/Api/Debug/Collection.php deleted file mode 100644 index d644c98ffe..0000000000 --- a/app/code/core/Mage/Paybox/Model/Mysql4/Api/Debug/Collection.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -class Mage_Paybox_Model_Mysql4_Api_Debug_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract -{ - protected function _construct() - { - $this->_init('paybox/api_debug'); - } -} diff --git a/app/code/core/Mage/Paybox/Model/Mysql4/Question/Number.php b/app/code/core/Mage/Paybox/Model/Mysql4/Question/Number.php deleted file mode 100644 index 15dd4dc113..0000000000 --- a/app/code/core/Mage/Paybox/Model/Mysql4/Question/Number.php +++ /dev/null @@ -1,41 +0,0 @@ - - */ -class Mage_Paybox_Model_Mysql4_Question_Number extends Mage_Core_Model_Mysql4_Abstract -{ - protected function _construct() - { - $this->_init('paybox/question_number', 'account_id'); - } - -} diff --git a/app/code/core/Mage/Paybox/Model/Mysql4/Setup.php b/app/code/core/Mage/Paybox/Model/Mysql4/Setup.php deleted file mode 100644 index 482999c6f8..0000000000 --- a/app/code/core/Mage/Paybox/Model/Mysql4/Setup.php +++ /dev/null @@ -1,37 +0,0 @@ - - */ -class Mage_Paybox_Model_Mysql4_Setup extends Mage_Sales_Model_Mysql4_Setup -{ - -} diff --git a/app/code/core/Mage/Paybox/Model/Question/Number.php b/app/code/core/Mage/Paybox/Model/Question/Number.php deleted file mode 100644 index b87a4c8854..0000000000 --- a/app/code/core/Mage/Paybox/Model/Question/Number.php +++ /dev/null @@ -1,95 +0,0 @@ - - */ -class Mage_Paybox_Model_Question_Number extends Mage_Core_Model_Abstract -{ - /** - * Max value of question number - */ - const MAX_QUESTION_NUMBER_VALUE = 2147483647; - - protected $_accountHash; - - protected function _construct() - { - $this->_init('paybox/question_number'); - } - - public function load($id, $field=null) - { - $this->_accountHash = $id; - return parent::load($id, $field); - } - - protected function _afterLoad() - { - //need to create new record (with default data) if it first time using of paybox direct - if (!$this->getAccountHash()) { - $this->setAccountHash($this->_accountHash); - $this->setIncrementValue(1); - $this->save(); - } - unset($this->_accountHash); - - //need to set default value of question number if it reach max value - if ($this->getIncrementValue() >= self::MAX_QUESTION_NUMBER_VALUE) { - $this->setResetDate('CURRENT_TIMESTAMP') - ->setIncrementValue(1); - } - - return parent::_afterLoad(); - } - - /** - * Return next number formated to paybox specification - * - * @return string - */ - public function getNextQuestionNumber() - { - $questionNumber = $this->getIncrementValue()+1; - return sprintf('%010d', $questionNumber); - } - - /** - * Increase question number and save it after successful transaction - * - * @return Mage_Paybox_Model_Question_Number - */ - public function increaseQuestionNumber() - { - $this->setIncrementValue($this->getIncrementValue()+1) - ->save(); - return $this; - } -} diff --git a/app/code/core/Mage/Paybox/Model/Source/CartType.php b/app/code/core/Mage/Paybox/Model/Source/CartType.php deleted file mode 100644 index d7bb0662b2..0000000000 --- a/app/code/core/Mage/Paybox/Model/Source/CartType.php +++ /dev/null @@ -1,61 +0,0 @@ - - */ -class Mage_Paybox_Model_Source_CartType -{ - /** - * Enter description here... - * - * @return Mage_Paybox_Model_System - */ - public function getModel() - { - return Mage::getModel('paybox/system'); - } - - public function toOptionArray() - { - $cartTypesArr = array(); - $tmpArr = $this->getModel()->getCartTypesByPayment($this->getModel()->getPaymentType()); - - foreach ($tmpArr as $code => $name) { - $cartTypesArr[] = array( - 'value' => $code, - 'label' => $name - ); - } - - return $cartTypesArr; - } -} diff --git a/app/code/core/Mage/Paybox/Model/Source/Cctype.php b/app/code/core/Mage/Paybox/Model/Source/Cctype.php deleted file mode 100644 index d571ff3cba..0000000000 --- a/app/code/core/Mage/Paybox/Model/Source/Cctype.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -class Mage_Paybox_Model_Source_Cctype extends Mage_Payment_Model_Source_Cctype -{ - public function getAllowedTypes() - { - return array('VI', 'MC', 'AE', 'OT'); - } -} diff --git a/app/code/core/Mage/Paybox/Model/Source/Language.php b/app/code/core/Mage/Paybox/Model/Source/Language.php deleted file mode 100644 index 6a9a08105a..0000000000 --- a/app/code/core/Mage/Paybox/Model/Source/Language.php +++ /dev/null @@ -1,50 +0,0 @@ - - */ -class Mage_Paybox_Model_Source_Language -{ - public function toOptionArray() - { - return array( -// array('value' => Mage_Paypal_Model_Api_Abstract::PAYMENT_TYPE_AUTH, 'label' => Mage::helper('paypal')->__('Authorization')), - array('value' => 'FRA', 'label' => Mage::helper('paybox')->__('FRA (French)')), - array('value' => 'GBR', 'label' => Mage::helper('paybox')->__('GBR (English)')), - array('value' => 'ESP', 'label' => Mage::helper('paybox')->__('ESP (Spanish)')), - array('value' => 'ITA', 'label' => Mage::helper('paybox')->__('ITA (Italian)')), - array('value' => 'DEU', 'label' => Mage::helper('paybox')->__('DEU (German)')), - array('value' => 'NLD', 'label' => Mage::helper('paybox')->__('NLD (Dutch)')), - array('value' => 'SWE', 'label' => Mage::helper('paybox')->__('SWE (Swedish)')), - ); - } -} diff --git a/app/code/core/Mage/Paybox/Model/Source/ManagementMode.php b/app/code/core/Mage/Paybox/Model/Source/ManagementMode.php deleted file mode 100644 index 7d4746016b..0000000000 --- a/app/code/core/Mage/Paybox/Model/Source/ManagementMode.php +++ /dev/null @@ -1,48 +0,0 @@ - - */ -class Mage_Paybox_Model_Source_ManagementMode -{ - public function toOptionArray() - { - return array( -// array('value' => Mage_Paypal_Model_Api_Abstract::PAYMENT_TYPE_AUTH, 'label' => Mage::helper('paypal')->__('Authorization')), - array('value' => 'A', 'label' => Mage::helper('paybox')->__('Mode A')), - array('value' => 'B', 'label' => Mage::helper('paybox')->__('Mode B')), - array('value' => 'C', 'label' => Mage::helper('paybox')->__('Mode C')), - array('value' => 'D', 'label' => Mage::helper('paybox')->__('Mode D')), - array('value' => 'E', 'label' => Mage::helper('paybox')->__('Mode E')), - ); - } -} diff --git a/app/code/core/Mage/Paybox/Model/Source/MethodCall.php b/app/code/core/Mage/Paybox/Model/Source/MethodCall.php deleted file mode 100644 index 3ed23f4263..0000000000 --- a/app/code/core/Mage/Paybox/Model/Source/MethodCall.php +++ /dev/null @@ -1,45 +0,0 @@ - - */ -class Mage_Paybox_Model_Source_MethodCall -{ - public function toOptionArray() - { - return array( -// array('value' => Mage_Paypal_Model_Api_Abstract::PAYMENT_TYPE_AUTH, 'label' => Mage::helper('paypal')->__('Authorization')), - array('value' => 'GET', 'label' => Mage::helper('paybox')->__('GET')), - array('value' => 'POST', 'label' => Mage::helper('paybox')->__('POST')), - ); - } -} diff --git a/app/code/core/Mage/Paybox/Model/Source/PaymentAction.php b/app/code/core/Mage/Paybox/Model/Source/PaymentAction.php deleted file mode 100644 index faa2c732d6..0000000000 --- a/app/code/core/Mage/Paybox/Model/Source/PaymentAction.php +++ /dev/null @@ -1,43 +0,0 @@ - - */ -class Mage_Paybox_Model_Source_PaymentAction -{ - public function toOptionArray() - { - return array( - array('value' => Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE, 'label' => Mage::helper('paybox')->__('Authorization')), - array('value' => Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE, 'label' => Mage::helper('paybox')->__('Payment')), - ); - } -} diff --git a/app/code/core/Mage/Paybox/Model/Source/PaymentMode.php b/app/code/core/Mage/Paybox/Model/Source/PaymentMode.php deleted file mode 100644 index f90a92c74d..0000000000 --- a/app/code/core/Mage/Paybox/Model/Source/PaymentMode.php +++ /dev/null @@ -1,45 +0,0 @@ - - */ -class Mage_Paybox_Model_Source_PaymentMode -{ - public function toOptionArray() - { - return array( -// array('value' => Mage_Paypal_Model_Api_Abstract::PAYMENT_TYPE_AUTH, 'label' => Mage::helper('paypal')->__('Authorization')), - array('value' => 1, 'label' => Mage::helper('paybox')->__('HTML form')), - array('value' => 4, 'label' => Mage::helper('paybox')->__('Command Line Mode')), - ); - } -} diff --git a/app/code/core/Mage/Paybox/Model/Source/PaymentType.php b/app/code/core/Mage/Paybox/Model/Source/PaymentType.php deleted file mode 100644 index d1ba5b3b98..0000000000 --- a/app/code/core/Mage/Paybox/Model/Source/PaymentType.php +++ /dev/null @@ -1,48 +0,0 @@ - - */ -class Mage_Paybox_Model_Source_PaymentType -{ - public function toOptionArray() - { - return array( - array('value' => '', 'label' => Mage::helper('paybox')->__('--Please Select--')), - array('value' => Mage_Paybox_Model_System::PBX_PAYMENT_TYPE_CARTE, 'label' => Mage::helper('paybox')->__('CARTE')), - array('value' => Mage_Paybox_Model_System::PBX_PAYMENT_TYPE_SYMPASS, 'label' => Mage::helper('paybox')->__('SYMPASS')), - array('value' => Mage_Paybox_Model_System::PBX_PAYMENT_TYPE_PAYNOVA , 'label' => Mage::helper('paybox')->__('PAYNOVA')), - array('value' => Mage_Paybox_Model_System::PBX_PAYMENT_TYPE_TERMINEO, 'label' => Mage::helper('paybox')->__('TERMINEO')), - array('value' => Mage_Paybox_Model_System::PBX_PAYMENT_TYPE_PAYPAL, 'label' => Mage::helper('paybox')->__('PAYPAL')), - ); - } -} diff --git a/app/code/core/Mage/Paybox/Model/System.php b/app/code/core/Mage/Paybox/Model/System.php deleted file mode 100644 index bd66516c4f..0000000000 --- a/app/code/core/Mage/Paybox/Model/System.php +++ /dev/null @@ -1,529 +0,0 @@ - - */ -class Mage_Paybox_Model_System extends Mage_Payment_Model_Method_Abstract -{ - /** - * Paybox const variables - */ - const PBX_FORM_HTML_METHOD = 1; - const PBX_COMMAND_LINE_METHOD = 4; - - const PBX_METHOD_CALL = 'POST'; - - const PBX_PAYMENT_ACTION_ATHORIZE = 'O'; - const PBX_PAYMENT_ACTION_ATHORIZE_CAPTURE = 'N'; - - const PBX_PAYMENT_TYPE_CARTE = 'CARTE'; - const PBX_PAYMENT_TYPE_SYMPASS = 'SYMPASS'; - const PBX_PAYMENT_TYPE_PAYNOVA = 'PAYNOVA'; - const PBX_PAYMENT_TYPE_TERMINEO = 'TERMINEO'; - const PBX_PAYMENT_TYPE_PAYPAL = 'PAYPAL'; - - const PBX_CARTE_TYPE_CB = 'CB'; - const PBX_CARTE_TYPE_VISA = 'VISA'; - const PBX_CARTE_TYPE_EUROCARDMASTERCARD = 'EUROCARD_MASTERCARD'; - const PBX_CARTE_TYPE_ECARD = 'E_CARD'; - const PBX_CARTE_TYPE_AMEX = 'AMEX'; - const PBX_CARTE_TYPE_DINERS = 'DINERS'; - const PBX_CARTE_TYPE_JCB = 'JCB'; - const PBX_CARTE_TYPE_AURORE = 'AURORE'; - const PBX_CARTE_TYPE_PAYNOVA = 'PAYNOVA'; - const PBX_CARTE_TYPE_TERMINEO = 'TERMINEO'; - const PBX_CARTE_TYPE_PAYPAL = 'PAYPAL'; - - protected $_code = 'paybox_system'; - - protected $_isGateway = false; - protected $_canAuthorize = true; - protected $_canCapture = false; - protected $_canCapturePartial = false; - protected $_canRefund = false; - protected $_canVoid = false; - protected $_canUseInternal = false; - protected $_canUseCheckout = true; - protected $_canUseForMultishipping = false; - - protected $_formBlockType = 'paybox/system_form'; - - protected $_order; - protected $_cartTypes; - protected $_currenciesNumbers; - - /** - * Get order model - * - * @return Mage_Sales_Model_Order - */ - public function getOrder() - { - if (!$this->_order) { - $paymentInfo = $this->getInfoInstance(); - $this->_order = Mage::getModel('sales/order') - ->loadByIncrementId($paymentInfo->getOrder()->getRealOrderId()); - } - return $this->_order; - } - - /** - * Set order - * - * @param Mage_Sales_Model_Order $order - */ - public function setOrder(Mage_Sales_Model_Order $order) - { - $this->_order = $order; - return $this; - } - - /** - * Get cart types for all payment types - * or for given payment type - * - * @param string $paymentType - * @return array - */ - protected function _getCartTypes($paymentType = null) - { - if (!$this->_cartTypes) { - $this->_cartTypes = array( - self::PBX_PAYMENT_TYPE_CARTE => array( - 'none' => Mage::helper('paybox')->__('Customer Choise'), - self::PBX_CARTE_TYPE_CB => Mage::helper('paybox')->__('CB'), - self::PBX_CARTE_TYPE_VISA => Mage::helper('paybox')->__('VISA'), - self::PBX_CARTE_TYPE_EUROCARDMASTERCARD => Mage::helper('paybox')->__('EUROCARD & MASTERCARD'), - self::PBX_CARTE_TYPE_ECARD => Mage::helper('paybox')->__('E CARD'), - self::PBX_CARTE_TYPE_AMEX => Mage::helper('paybox')->__('AMEX'), - self::PBX_CARTE_TYPE_DINERS => Mage::helper('paybox')->__('DINERS'), - self::PBX_CARTE_TYPE_JCB => Mage::helper('paybox')->__('JCB'), - self::PBX_CARTE_TYPE_AURORE => Mage::helper('paybox')->__('AURORE'), - ), - self::PBX_PAYMENT_TYPE_SYMPASS => array( - 'none' => Mage::helper('paybox')->__('Customer Choise'), - self::PBX_CARTE_TYPE_CB => Mage::helper('paybox')->__('CB'), - self::PBX_CARTE_TYPE_VISA => Mage::helper('paybox')->__('VISA'), - self::PBX_CARTE_TYPE_EUROCARDMASTERCARD => Mage::helper('paybox')->__('EUROCARD & MASTERCARD'), - self::PBX_CARTE_TYPE_ECARD => Mage::helper('paybox')->__('E CARD'), - self::PBX_CARTE_TYPE_AMEX => Mage::helper('paybox')->__('AMEX'), - self::PBX_CARTE_TYPE_DINERS => Mage::helper('paybox')->__('DINERS'), - self::PBX_CARTE_TYPE_JCB => Mage::helper('paybox')->__('JCB'), - self::PBX_CARTE_TYPE_AURORE => Mage::helper('paybox')->__('AURORE'), - ), - self::PBX_PAYMENT_TYPE_PAYNOVA => array( - self::PBX_CARTE_TYPE_PAYNOVA => Mage::helper('paybox')->__('PAYNOVA'), - ), - self::PBX_PAYMENT_TYPE_TERMINEO => array( - self::PBX_CARTE_TYPE_TERMINEO => Mage::helper('paybox')->__('TERMINEO'), - ), - self::PBX_PAYMENT_TYPE_PAYPAL => array( - self::PBX_CARTE_TYPE_PAYPAL => Mage::helper('paybox')->__('PAYPAL'), - ) - ); - } - - if (!is_null($paymentType)) { - if (isset($this->_cartTypes[$paymentType])) { - return $this->_cartTypes[$paymentType]; - } - } - - return $this->_cartTypes; - } - - /** - * Get cart types by given payment - * - * @param string $paymentType - * @return array - */ - public function getCartTypesByPayment($paymentType) - { - if ($paymentType == '') { - return array(); - } - return $this->_getCartTypes($paymentType); - } - - /** - * Get all cart types in JSON format - * - * @return string - */ - public function getJsonCartTypes() - { - return Mage::helper('core')->jsonEncode($this->_getCartTypes()); - } - - /** - * Get payment method - * - * @return string - */ - public function getPaymentMethod() - { - return $this->getConfigData('pbx_mode'); - } - - /** - * Get name of executable file - * - * @return string - */ - public function getPayboxFile() - { - return $this->getConfigData('pbx_file'); - } - - /** - * Get Payment type - * - * @return string - */ - public function getPaymentType() - { - return $this->getConfigData('pbx_typepaiement'); - } - - /** - * Get Payment Action of Paybox System changed to Paybox specification - * - * @return string - */ - public function getPaymentAction() - { - $paymentAction = $this->getConfigData('pbx_autoseule'); - switch ($paymentAction) { - case self::ACTION_AUTHORIZE: - return self::PBX_PAYMENT_ACTION_ATHORIZE; - break; - case self::ACTION_AUTHORIZE_CAPTURE: - return self::PBX_PAYMENT_ACTION_ATHORIZE_CAPTURE; - break; - default: - return self::PBX_PAYMENT_ACTION_ATHORIZE; - break; - } - } - - /** - * Get cart type - * - * @return string - */ - public function getCartType() - { - return $this->getConfigData('pbx_typecarte'); - } - - /** - * Get Site number (TPE) - * - * @return string - */ - public function getSiteNumber() - { - return $this->getConfigData('pbx_site'); - } - - /** - * Get Rang number - * - * @return string - */ - public function getRang() - { - return $this->getConfigData('pbx_rang'); - } - - /** - * Get Identifiant number - * - * @return string - */ - public function getIdentifiant() - { - return $this->getConfigData('pbx_identifiant'); - } - - /** - * Get currency number in ISO4217 format - * - * @return string - */ - public function getCurrencyNumber() - { - $currencyCode = $this->getOrder()->getBaseCurrencyCode(); - if (!$this->_currenciesNumbers) { - $this->_currenciesNumbers = simplexml_load_file(Mage::getBaseDir().'/app/code/core/Mage/Paybox/etc/currency.xml'); - } - if ($this->_currenciesNumbers->$currencyCode) { - return (string)$this->_currenciesNumbers->$currencyCode; - } - } - - /** - * Get language of interface of payment defined in config - * - * @return string - */ - public function getLanguage() - { - return $this->getConfigData('pbx_langue'); - } - - /** - * Get api urls if they defined in config - * - * @return unknown - */ - public function getApiUrls() - { - $fielldsArr = array(); - if (($primary = trim($this->getConfigData('pbx_paybox'))) != '') { - $fielldsArr['PBX_PAYBOX'] = $primary; - } - - if (($backup1 = trim($this->getConfigData('pbx_backup1'))) != '') { - $fielldsArr['PBX_BACKUP1'] = $backup1; - } - - if (($backup2 = trim($this->getConfigData('pbx_backup2'))) != '') { - $fielldsArr['PBX_BACKUP2'] = $backup2; - } - - if (($backup3 = trim($this->getConfigData('pbx_backup3'))) != '') { - $fielldsArr['PBX_BACKUP3'] = $backup3; - } - - return $fielldsArr; - } - - /** - * Get timeouts for api urls if timeouts diferent from default - * - * @return array - */ - public function getTimeouts() - { - $fielldsArr = array(); - if (($timeout = trim($this->getConfigData('pbx_timeout'))) != '') { - $fielldsArr['PBX_TIMEOUT'] = $timeout; - } - - if (($timeout1 = trim($this->getConfigData('pbx_timeout1'))) != '') { - $fielldsArr['PBX_TIMEOUT1'] = $timeout1; - } - - if (($timeout2 = trim($this->getConfigData('pbx_timeout2'))) != '') { - $fielldsArr['PBX_TIMEOUT2'] = $timeout2; - } - - if (($timeout3 = trim($this->getConfigData('pbx_timeout3'))) != '') { - $fielldsArr['PBX_TIMEOUT3'] = $timeout3; - } - - return $fielldsArr; - } - - /** - * Get params from config for HTML form mode - * - * @return array - */ - public function getManagementMode() - { - $fieldsArr = array(); - if (($text = trim($this->getConfigData('pbx_txt'))) != '') { - $fieldsArr['PBX_TXT'] = $text; - } - - if (($wait = trim($this->getConfigData('pbx_wait'))) != '') { - $fieldsArr['PBX_WAIT'] = $wait; - } - - if (($boutpi = trim($this->getConfigData('pbx_boutpi')))) { - $fieldsArr['PBX_BOUTPI'] = $boutpi; - } - - if (($bkgd = trim($this->getConfigData('pbx_bkgd'))) != '') { - $fieldsArr['PBX_BKGD'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'payment/paybox/bkgd/' . $bkgd; - } - - $fieldsArr['PBX_OUTPUT'] = $this->getConfigData('pbx_output'); - - return $fieldsArr; - } - - /** - * Get ping flag (commandline mode) - * - * @return unknown - */ - public function getPingFlag() - { - return $this->getConfigData('pbx_ping'); - } - - /** - * Get ping port (commandline mode) - * - * @return string - */ - public function getPingPort() - { - return $this->getConfigData('pbx_port'); - } - - /** - * Get debug flag - * - * @return string - */ - public function getDebugFlag() - { - return $this->getConfigData('debug_flag'); - } - - public function getOrderPlaceRedirectUrl() - { - if ($this->getPaymentMethod() == self::PBX_FORM_HTML_METHOD) { - return Mage::getUrl('paybox/system/redirect', array('_secure' => true)); - } else { - return Mage::getUrl('paybox/system/commandline', array('_secure' => true)); - } - } - - /** - * Building array of params to send - * - * @return array - */ - public function getFormFields() - { - $fieldsArr = array(); - - $fieldsArr = array( - 'PBX_MODE' => $this->getPaymentMethod(), - 'PBX_SITE' => $this->getSiteNumber(),//'1999888', - 'PBX_RANG' => $this->getRang(),//'99', - 'PBX_IDENTIFIANT' => $this->getIdentifiant(),//'2', - 'PBX_TOTAL' => ($this->getOrder()->getBaseGrandTotal()*100), - 'PBX_DEVISE' => $this->getCurrencyNumber(), - 'PBX_CMD' => $this->getOrder()->getRealOrderId(), - 'PBX_PORTEUR' => $this->getOrder()->getCustomerEmail(), - 'PBX_RETOUR' => 'amount:M;ref:R;auto:A;trans:T;error:E', - 'PBX_EFFECTUE' => Mage::getUrl('paybox/system/success', array('_secure' => true)), - 'PBX_REFUSE' => Mage::getUrl('paybox/system/refuse', array('_secure' => true)), - 'PBX_ANNULE' => Mage::getUrl('paybox/system/decline', array('_secure' => true)), - 'PBX_AUTOSEULE' => $this->getPaymentAction(), - 'PBX_LANGUE' => $this->getLanguage(), - 'PBX_ERREUR' => Mage::getUrl('paybox/system/error', array('_secure' => true)), - 'PBX_TYPEPAIEMENT' => $this->getPaymentType(), - 'PBX_TYPECARTE' => $this->getCartType(), - 'PBX_RUF1' => self::PBX_METHOD_CALL, - ); - - if (count($apiUrls = $this->getApiUrls())) { - $fieldsArr = array_merge($fieldsArr, $this->getApiUrls()); - } - if (count($timeouts = $this->getTimeouts())) { - $fieldsArr = array_merge($fieldsArr, $this->getTimeouts()); - } - - if ($this->getPaymentMethod() == self::PBX_FORM_HTML_METHOD) { - $fieldsArr = array_merge($fieldsArr, $this->getManagementMode()); - } - - if ($this->getPaymentMethod() == self::PBX_COMMAND_LINE_METHOD && $this->getPingFlag()) { - $tmpFieldsArr['PBX_PING'] = '1'; - if (($pingPort = trim($this->getPingPort())) != '') { - $tmpFieldsArr['PING_PORT'] = $pingPort; - } - - $fieldsArr = array_merge($fieldsArr, $tmpFieldsArr); - } - - if ($this->getDebugFlag()) { - $debug = Mage::getModel('paybox/api_debug') - ->setRealOrderId($this->getOrder()->getRealOrderId()) - ->setRequestBody(print_r($fieldsArr, 1)) - ->save(); - } - - return $fieldsArr; - } - - /** - * Checking response - * - * @param array $response - * @return bool - */ - public function checkResponse($response) - { - if ($this->getDebugFlag()) { - $debug = Mage::getModel('paybox/api_debug') - ->load($response['ref'], 'real_order_id') - ->setResponseBody(print_r($response, 1)) - ->save(); - } - - if (isset($response['error'], $response['amount'], - $response['ref'], $response['trans']) - ) { - return true; - } - return false; - } - - public function capture(Varien_Object $payment, $amount) - { - $payment->setStatus(self::STATUS_APPROVED) - ->setLastTransId($this->getTransactionId()); - return $this; - } - - public function authorize(Varien_Object $payment, $amount) - { - $payment->setStatus(self::STATUS_APPROVED) - ->setLastTransId($this->getTransactionId()); - - return $this; - } - - public function cancel(Varien_Object $payment) - { - $payment->setStatus(self::STATUS_DECLINED); - return $this; - } -} diff --git a/app/code/core/Mage/Paybox/controllers/SystemController.php b/app/code/core/Mage/Paybox/controllers/SystemController.php deleted file mode 100644 index 7aa6caa2e8..0000000000 --- a/app/code/core/Mage/Paybox/controllers/SystemController.php +++ /dev/null @@ -1,364 +0,0 @@ - - */ -class Mage_Paybox_SystemController extends Mage_Core_Controller_Front_Action -{ - protected $_payboxResponse = null; - - protected $_responseStatus = false; - - /** - * seting response after returning from paybox - * - * @param array $response - * @return object $this - */ - protected function setPayboxResponse($response) - { - if (count($response)) { - $this->_payboxResponse = $response; - } - return $this; - } - - /** - * Get System Model - * - * @return Mage_Paybox_Model_System - */ - public function getModel() - { - return Mage::getSingleton('paybox/system'); - } - - /** - * Get Checkout Singleton - * - * @return Mage_Checkout_Model_Session - */ - public function getCheckout() - { - return Mage::getSingleton('checkout/session'); - } - - /** - * Redirect action. Redirect customer to Paybox - * - */ - public function redirectAction() - { - $session = $this->getCheckout(); - $session->setPayboxQuoteId($session->getQuoteId()); - - $order = Mage::getModel('sales/order'); - $order->loadByIncrementId($session->getLastRealOrderId()); - $order->addStatusToHistory($order->getStatus(), $this->__('Customer was redirected to Paybox')); - $order->save(); - - $session->setPayboxOrderId(Mage::helper('core')->encrypt($session->getLastRealOrderId())); - $session->setPayboxPaymentAction( - $order->getPayment()->getMethodInstance()->getPaymentAction() - ); - - $this->getResponse()->setBody( - $this->getLayout() - ->createBlock('paybox/system_redirect') - ->setOrder($order) - ->toHtml() - ); - - $session->unsQuoteId(); - } - - /** - * Customer returning to this action if payment was successe - */ - public function successAction() - { - $this->setPayboxResponse($this->getRequest()->getParams()); - if ($this->_checkResponse()) { - - $order = Mage::getModel('sales/order'); - $order->loadByIncrementId($this->_payboxResponse['ref']); - - if (!$order->getId()) { - Mage::throwException($this->__('There are no order.')); - } - - if (Mage::helper('core')->decrypt($this->getCheckout()->getPayboxOrderId()) != $this->_payboxResponse['ref']) { - Mage::throwException($this->__('Order is not match.')); - } - $this->getCheckout()->unsPayboxOrderId(); - - if (($order->getBaseGrandTotal()*100) != $this->_payboxResponse['amount']) { - Mage::throwException($this->__('Amount is not match.')); - } - - if ($this->_payboxResponse['error'] == '00000') { - $order->addStatusToHistory($order->getStatus(), $this->__('Customer successfully returned from Paybox')); - - $redirectTo = 'checkout/onepage/success'; - if ($this->getCheckout()->getPayboxPaymentAction() == Mage_Paybox_Model_System::PBX_PAYMENT_ACTION_ATHORIZE_CAPTURE) { - $this->getCheckout()->unsPayboxPaymentAction(); - $order->getPayment() - ->getMethodInstance() - ->setTransactionId($this->_payboxResponse['trans']); - if ($this->_createInvoice($order)) { - $order->addStatusToHistory($order->getStatus(), $this->__('Invoice was create successfully')); - } else { - $order->addStatusToHistory($order->getStatus(), $this->__('Cann\'t create invoice')); - $redirectTo = '*/*/failure'; - } - } - - $session = $this->getCheckout(); - $session->setQuoteId($session->getPayboxQuoteId(true)); - $session->getQuote()->setIsActive(false)->save(); - $session->unsPayboxQuoteId(); - } else { - $redirectTo = '*/*/failure'; - $order->cancel(); - $order->addStatusToHistory($order->getStatus(), $this->__('Customer was rejected by Paybox')); - } - - $order->sendNewOrderEmail(); - $order->save(); - - $this->_redirect($redirectTo); - } else { - $this->norouteAction(); - return; - } - } - - /** - * Action when payment was declined by Paybox - */ - public function refuseAction() - { - $this->setPayboxResponse($this->getRequest()->getParams()); - if ($this->_checkResponse()) { - $this->getCheckout()->unsPayboxQuoteId(); - $this->getCheckout()->setPayboxErrorMessage('Order was canceled by Paybox'); - - $order = Mage::getModel('sales/order') - ->loadByIncrementId($this->_payboxResponse['ref']); - $order->cancel(); - $order->addStatusToHistory($order->getStatus(), $this->__('Customer was refuse by Paybox')); - $order->save(); - - $this->_redirect('*/*/failure'); - } else { - $this->norouteAction(); - return; - } - } - - /** - * Action when customer cancele payment or press button to back to shop - */ - public function declineAction() - { - $this->setPayboxResponse($this->getRequest()->getParams()); - if ($this->_checkResponse()) { - - $order = Mage::getModel('sales/order') - ->loadByIncrementId($this->_payboxResponse['ref']); - $order->cancel(); - $order->addStatusToHistory($order->getStatus(), $this->__('Order was canceled by customer')); - $order->save(); - - $session = $this->getCheckout(); - $session->setQuoteId($session->getPayboxQuoteId(true)); - $session->getQuote()->setIsActive(false)->save(); - $session->unsPayboxQuoteId(); - - $this->_redirect('checkout/cart'); - } else { - $this->norouteAction(); - return; - } - } - - /** - * Redirect action. Redirect to Paybox using commandline mode - * - */ - public function commandlineAction() - { - $session = $this->getCheckout(); - $session->setPayboxQuoteId($session->getQuoteId()); - - $order = Mage::getModel('sales/order') - ->loadByIncrementId($this->getCheckout()->getLastRealOrderId()); - $order->addStatusToHistory( - $order->getStatus(), $this->__('Customer was redirected to Paybox using \'command line\' mode') - ); - $order->save(); - - $session->setPayboxOrderId(Mage::helper('core')->encrypt($session->getLastRealOrderId())); - $session->setPayboxPaymentAction( - $order->getPayment()->getMethodInstance()->getPaymentAction() - ); - - $session->unsQuoteId(); - - $payment = $order->getPayment()->getMethodInstance(); - $fieldsArr = $payment->getFormFields(); - $paramStr = ''; - foreach ($fieldsArr as $k => $v) { - $paramStr .= $k.'='.$v.' '; - } - - $paramStr = str_replace(';', '\;', $paramStr); - $result = shell_exec(Mage::getBaseDir().'/'.$this->getModel()->getPayboxFile().' '.$paramStr); - - if (isset($fieldsArr['PBX_PING']) && $fieldsArr['PBX_PING'] == '1') { - $fieldsArr['PBX_PING'] = '0'; - $fieldsArr['PBX_PAYBOX'] = trim(substr($result, strpos($result, 'http'))); - $paramStr = ''; - foreach ($fieldsArr as $k => $v) { - $paramStr .= $k.'='.$v.' '; - } - - $paramStr = str_replace(';', '\;', $paramStr); - $result = shell_exec(Mage::getBaseDir().'/'.$this->getModel()->getPayboxFile().' '.$paramStr); - } - - $this->loadLayout(false); - $this->getResponse()->setBody($result); - $this->renderLayout(); - } - - /** - * Error action. If request params to Paybox has mistakes - * - */ - public function errorAction() - { - if (!$this->getCheckout()->getPayboxQuoteId()) { - $this->norouteAction(); - return; - } - - $session = $this->getCheckout(); - $session->setQuoteId($session->getPayboxQuoteId(true)); - $session->getQuote()->setIsActive(false)->save(); - $session->unsPayboxQuoteId(); - - if (!$this->getRequest()->getParam('NUMERR')) { - $this->norouteAction(); - return; - } - - $this->loadLayout(); - - $this->getCheckout() - ->setPayboxErrorNumber( - $this->getRequest()->getParam('NUMERR') - ); - - $this->renderLayout(); - } - - /** - * Failure action. - * Displaying information if customer was redirecting to cancel or decline actions - * - */ - public function failureAction() - { - if (!$this->getCheckout()->getPayboxErrorMessage()) { - $this->norouteAction(); - return; - } - - $this->loadLayout(); - $this->renderLayout(); - } - - /** - * Checking response and Paybox session variables - * - * @return unknown - */ - protected function _checkResponse() - { - if (!$this->getCheckout()->getPayboxQuoteId()) { - $this->norouteAction(); - return; - } - - if (!$this->getCheckout()->getPayboxOrderId()) { - $this->norouteAction(); - return; - } - - if (!$this->getCheckout()->getPayboxPaymentAction()) { - $this->norouteAction(); - return; - } - - if (!$this->_payboxResponse) { - return false; - } - - //check for valid response - if ($this->getModel()->checkResponse($this->_payboxResponse)) { - return true; - } - - return true; - } - - /** - * Creating invoice - * - * @param Mage_Sales_Model_Order $order - * @return bool - */ - protected function _createInvoice(Mage_Sales_Model_Order $order) - { - if ($order->canInvoice()) { - $invoice = $order->prepareInvoice(); - $invoice->register()->capture(); - Mage::getModel('core/resource_transaction') - ->addObject($invoice) - ->addObject($invoice->getOrder()) - ->save(); - return true; - } - return false; - } - -} diff --git a/app/code/core/Mage/Paybox/etc/config.xml b/app/code/core/Mage/Paybox/etc/config.xml deleted file mode 100644 index 70a6f841dc..0000000000 --- a/app/code/core/Mage/Paybox/etc/config.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - 0.1.3 - - - - - - Mage_Paybox_Model - paybox_mysql4 - - - Mage_Paybox_Model_Mysql4 - - paybox_api_debug
    - paybox_question_number
    -
    -
    -
    - - - - Mage_Paybox - Mage_Paybox_Model_Mysql4_Setup - - - - - Mage_Paybox_Block - -
    - - - - standard - - Mage_Paybox - paybox - - - - - - - - Mage_Paybox.csv - - - - - - - - - - - Mage_Paybox.csv - - - - - - - - - 1 - - - - authorize - E - FRA - paybox/system - Paybox System - processing - 0 - - - - - - authorize - paybox/direct - Paybox Direct - 1 - processing - AE,VI,MC,DI - 0 - - - -
    diff --git a/app/code/core/Mage/Paybox/etc/currency.xml b/app/code/core/Mage/Paybox/etc/currency.xml deleted file mode 100644 index 0d6f6fe047..0000000000 --- a/app/code/core/Mage/Paybox/etc/currency.xml +++ /dev/null @@ -1,209 +0,0 @@ - - - - - 971 - 008 - 012 - 840 - 978 - 973 - 951 - 032 - 051 - 533 - 036 - 944 - 044 - 048 - 050 - 052 - 974 - 084 - 952 - 060 - 356 - 064 - 068 - 984 - 977 - 072 - 578 - 986 - 096 - 975 - 108 - 116 - 950 - 124 - 132 - 136 - 152 - 156 - 170 - 174 - 976 - 554 - 188 - 191 - 192 - 203 - 208 - 262 - 214 - 818 - 222 - 232 - 233 - 230 - 238 - 242 - 953 - 270 - 981 - 936 - 292 - 320 - 324 - 328 - 332 - 340 - 344 - 348 - 352 - 360 - 960 - 364 - 368 - 376 - 388 - 392 - 400 - 398 - 404 - 408 - 410 - 414 - 417 - 418 - 428 - 422 - 710 - 426 - 430 - 434 - 756 - 440 - 446 - 807 - 969 - 454 - 458 - 462 - 478 - 480 - 484 - 979 - 498 - 496 - 504 - 943 - 104 - 516 - 524 - 532 - 558 - 566 - 512 - 586 - 590 - 598 - 600 - 604 - 608 - 985 - 634 - 946 - 643 - 646 - 654 - 882 - 678 - 682 - 941 - 690 - 694 - 702 - 703 - 090 - 706 - 144 - 938 - 968 - 748 - 752 - 948 - 947 - 760 - 901 - 972 - 834 - 764 - 776 - 780 - 788 - 949 - 795 - 800 - 980 - 784 - 826 - 998 - 997 - 858 - 940 - 860 - 548 - 937 - 704 - 886 - 894 - 716 - 959 - 955 - 956 - 957 - 958 - 964 - 962 - 961 - Nil - Nil - 963 - 999 - diff --git a/app/code/core/Mage/Paybox/etc/system.xml b/app/code/core/Mage/Paybox/etc/system.xml deleted file mode 100644 index 50d1f025e1..0000000000 --- a/app/code/core/Mage/Paybox/etc/system.xml +++ /dev/null @@ -1,459 +0,0 @@ - - - - - - - - - text - 101 - 1 - 1 - 1 - - - - select - adminhtml/system_config_source_yesno - 1 - 1 - 1 - 0 - - - - text - 5 - 1 - 1 - 0 - - - - select - paybox/source_paymentMode - 10 - 1 - 1 - 0 - - - - select - paybox/source_paymentAction - 15 - 1 - 1 - 0 - - - - obscure - adminhtml/system_config_backend_encrypted - 20 - 1 - 1 - 0 - - - - obscure - adminhtml/system_config_backend_encrypted - 30 - 1 - 1 - 0 - - - - obscure - adminhtml/system_config_backend_encrypted - 40 - 1 - 1 - 0 - - - - Only if you HTML From mode selected - select - paybox/source_managementMode - 50 - 1 - 1 - 0 - - - - Only if you HTML From mode selected - text - 60 - 1 - 1 - 0 - - - - Only if you HTML From mode selected - text - 70 - 1 - 1 - 0 - - - - Only if you HTML From mode selected - image - adminhtml/system_config_backend_image - payment/paybox/bkgd - payment/paybox/bkgd - 80 - 1 - 1 - 0 - - - - Only if you HTML From mode selected - text - 90 - 1 - 1 - 0 - - - - select - paybox/source_language - 100 - 1 - 1 - 0 - - - - select - paybox/source_paymentType - 105 - 1 - 1 - 0 - - - - select - paybox/adminhtml_cart_type - paybox/source_cartType - 108 - 1 - 1 - 0 - - - - Specify the URL of the primary payment server if different from default - text - 110 - 1 - 1 - 0 - - - - Time-out (in seconds) to check the avalaibility of the primary payment server (Default 8 seconds) - text - 115 - 1 - 1 - 0 - - - - Specify the URL of the primary backup payment server if different from default - text - 120 - 1 - 1 - 0 - - - - Time-out (in seconds) to check the avalaibility of the primary backup payment server (Default 10 seconds) - text - 125 - 1 - 1 - 0 - - - - Specify the URL of the second backup payment server if different from default - text - 130 - 1 - 1 - 0 - - - - Time-out (in seconds) to check the avalaibility of the second backup payment server (Default 20 seconds) - text - 135 - 1 - 1 - 0 - - - - Specify the URL of the third backup payment server if different from default - text - 140 - 1 - 1 - 0 - - - - Time-out (in seconds) to check the avalaibility of the third backup payment server (Default 20 seconds) - text - 145 - 1 - 1 - 0 - - - - Only with 'Command Line' mode - select - adminhtml/system_config_source_yesno - 160 - 1 - 1 - 0 - - - - TCP Port used to check the availability of a payment server if Ping Flag enabled (Default port is 443) - text - 170 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 300 - 1 - 1 - 0 - - - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>310</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - - - - select - adminhtml/system_config_source_order_status_processing - 320 - 1 - 1 - 0 - - - - text - 500 - 1 - 1 - 0 - - - - allowspecific - 330 - adminhtml/system_config_source_payment_allspecificcountries - 1 - 1 - 0 - - - - multiselect - 340 - adminhtml/system_config_source_country - 1 - 1 - 0 - - - - - - text - 101 - 1 - 1 - 1 - - - - select - adminhtml/system_config_source_yesno - 1 - 1 - 1 - 0 - - - - obscure - adminhtml/system_config_backend_encrypted - 20 - 1 - 1 - 0 - - - - obscure - adminhtml/system_config_backend_encrypted - 30 - 1 - 1 - 0 - - - - obscure - adminhtml/system_config_backend_encrypted - 40 - 1 - 1 - 0 - - - - text - 50 - 1 - 1 - 0 - - - - text - 60 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 70 - 1 - 1 - 0 - - - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>80</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - - - - select - adminhtml/system_config_source_order_status_processing - 90 - 1 - 1 - 0 - - - - select - paybox/source_paymentAction - 95 - 1 - 1 - 0 - - - - multiselect - paybox/source_cctype - 100 - 1 - 1 - 0 - - - - allowspecific - 110 - adminhtml/system_config_source_payment_allspecificcountries - 1 - 1 - 0 - - - - multiselect - 120 - adminhtml/system_config_source_country - 1 - 1 - 0 - - - - text - 500 - 1 - 1 - 0 - - - - - - - diff --git a/app/code/core/Mage/Paybox/sql/paybox_setup/mysql4-install-0.1.0.php b/app/code/core/Mage/Paybox/sql/paybox_setup/mysql4-install-0.1.0.php deleted file mode 100644 index 629c632db7..0000000000 --- a/app/code/core/Mage/Paybox/sql/paybox_setup/mysql4-install-0.1.0.php +++ /dev/null @@ -1,47 +0,0 @@ -startSetup(); - -$installer->run(" - -DROP TABLE IF EXISTS `{$this->getTable('paybox/api_debug')}`; -CREATE TABLE `{$this->getTable('paybox/api_debug')}` ( - `debug_id` int(10) unsigned NOT NULL auto_increment, - `debug_at` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `real_order_id` varchar(50)NOT NULL default '', - `request_body` text, - `response_body` text, - PRIMARY KEY (`debug_id`), - KEY `debug_at` (`debug_at`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - - "); - -$installer->endSetup(); diff --git a/app/code/core/Mage/Paybox/sql/paybox_setup/mysql4-upgrade-0.1.1-0.1.2.php b/app/code/core/Mage/Paybox/sql/paybox_setup/mysql4-upgrade-0.1.1-0.1.2.php deleted file mode 100644 index bc7dc4b2c2..0000000000 --- a/app/code/core/Mage/Paybox/sql/paybox_setup/mysql4-upgrade-0.1.1-0.1.2.php +++ /dev/null @@ -1,44 +0,0 @@ -startSetup(); - -$installer->run(" - -DROP TABLE IF EXISTS `{$this->getTable('paybox/question_number')}`; -CREATE TABLE `{$this->getTable('paybox/question_number')}` ( - `account_id` int(10) unsigned NOT NULL auto_increment, - `account_hash` varchar(50) NOT NULL default '', - `increment_value` int(10) unsigned NOT NULL default 1, - `reset_date` timestamp NOT NULL default CURRENT_TIMESTAMP, - PRIMARY KEY (`account_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -"); - -$installer->endSetup(); diff --git a/app/code/core/Mage/Paygate/Model/Authorizenet.php b/app/code/core/Mage/Paygate/Model/Authorizenet.php index e790ab4a80..db779dd548 100644 --- a/app/code/core/Mage/Paygate/Model/Authorizenet.php +++ b/app/code/core/Mage/Paygate/Model/Authorizenet.php @@ -135,6 +135,8 @@ public function authorize(Varien_Object $payment, $amount) $payment->setCcApproval($result->getApprovalCode()) ->setLastTransId($result->getTransactionId()) + ->setTransactionId($result->getTransactionId()) + ->setIsTransactionClosed(0) ->setCcTransId($result->getTransactionId()) ->setCcAvsStatus($result->getAvsResultCode()) ->setCcCidStatus($result->getCardCodeResponseCode()); @@ -193,10 +195,10 @@ public function capture(Varien_Object $payment, $amount) */ public function void(Varien_Object $payment) { - if ($payment->getVoidTransactionId()) { + if ($payment->getParentTransactionId()) { $payment->setAnetTransType(self::REQUEST_TYPE_VOID); $request = $this->_buildRequest($payment); - $request->setXTransId($payment->getVoidTransactionId()); + $request->setXTransId($payment->getParentTransactionId()); $result = $this->_postRequest($request); if ($result->getResponseCode()==self::RESPONSE_CODE_APPROVED) { $payment->setStatus(self::STATUS_SUCCESS ); diff --git a/app/code/core/Mage/Paygate/Model/Payflow/Pro.php b/app/code/core/Mage/Paygate/Model/Payflow/Pro.php index 8834294236..1950219049 100644 --- a/app/code/core/Mage/Paygate/Model/Payflow/Pro.php +++ b/app/code/core/Mage/Paygate/Model/Payflow/Pro.php @@ -90,6 +90,19 @@ class Mage_Paygate_Model_Payflow_Pro extends Mage_Payment_Model_Method_Cc */ protected $_validVoidTransState = array(3,6,9); + /** + * Centinel cardinal fields map + * + * @var string + */ + protected $_centinelFieldMap = array( + 'centinel_mpivendor' => 'MPIVENDOR3DS', + 'centinel_authstatus' => 'AUTHSTATUS3DS', + 'centinel_cavv' => 'CAVV', + 'centinel_eci' => 'ECI', + 'centinel_xid' => 'XID', + ); + public function authorize(Varien_Object $payment, $amount) { $error = false; @@ -99,7 +112,9 @@ public function authorize(Varien_Object $payment, $amount) $request = $this->_buildRequest($payment); $result = $this->_postRequest($request); - $payment->setCcTransId($result->getPnref()); + $payment->setCcTransId($result->getPnref()) + ->setTransactionId($result->getPnref()) + ->setIsTransactionClosed(0); switch ($result->getResultCode()){ case self::RESPONSE_CODE_APPROVED: @@ -107,7 +122,8 @@ public function authorize(Varien_Object $payment, $amount) break; case self::RESPONSE_CODE_FRAUDSERVICE_FILTER: - $payment->setFraudFlag(true); + $payment->setIsTransactionPending(true); + $payment->getTransactionPendingStatus($this->getConfigData('fraud_order_status')); break; default: @@ -129,21 +145,6 @@ public function authorize(Varien_Object $payment, $amount) return $this; } - /** - * Check capture availability - * To avoid capture already voided transactions, allow only one capture thus the method - * cannot make capture partially - * - * @return bool - */ - public function canCapture() - { - if ($this->getInfoInstance()->getOrder()->getBaseSubtotalInvoiced() > 0) { - return false; - } - return true; - } - public function capture(Varien_Object $payment, $amount) { $error = false; @@ -170,17 +171,18 @@ public function capture(Varien_Object $payment, $amount) $payment->setStatus(self::STATUS_APPROVED); //$payment->setCcTransId($result->getPnref()); $payment->setLastTransId($result->getPnref()); + $payment->setTransactionId($result->getPnref()); break; case self::RESPONSE_CODE_FRAUDSERVICE_FILTER: - $payment->setFraudFlag(true); + $payment->setIsTransactionPending(true); + $payment->getTransactionPendingStatus($this->getConfigData('fraud_order_status')); break; default: if ($result->getRespmsg()) { $error = $result->getRespmsg(); - } - else { + } else { $error = Mage::helper('paygate')->__('Error in capturing the payment'); } break; @@ -238,15 +240,16 @@ public function canVoid(Varien_Object $payment) public function void(Varien_Object $payment) { $error = false; - if($payment->getVoidTransactionId()){ + if($payment->getParentTransactionId()){ $payment->setTrxtype(self::TRXTYPE_DELAYED_VOID); - $payment->setTransactionId($payment->getVoidTransactionId()); + $payment->setTransactionId($payment->getParentTransactionId()); $request=$this->_buildBasicRequest($payment); $result = $this->_postRequest($request); if($result->getResultCode()==self::RESPONSE_CODE_APPROVED){ $payment->setStatus(self::STATUS_SUCCESS); $payment->setCcTransId($result->getPnref()); + $payment->setTransactionId($result->getPnref()); }else{ $payment->setStatus(self::STATUS_ERROR); $error = $result->getRespmsg(); @@ -406,6 +409,12 @@ protected function _buildRequest(Varien_Object $payment) ->setRequestId($this->_generateRequestId()) ; + if ($this->getIsCentinelValidationEnabled()){ + $params = array(); + $params = $this->getCentinelValidator()->exportCmpiData($params); + $request = Varien_Object_Mapper::accumulateByMap($params, $request, $this->_centinelFieldMap); + } + if($payment->getAmount()){ $request->setAmt(round($payment->getAmount(),2)); $request->setCurrency($payment->getOrder()->getBaseCurrencyCode()); diff --git a/app/code/core/Mage/Paygate/etc/system.xml b/app/code/core/Mage/Paygate/etc/system.xml index 95acda0ede..1c6510ef75 100644 --- a/app/code/core/Mage/Paygate/etc/system.xml +++ b/app/code/core/Mage/Paygate/etc/system.xml @@ -241,6 +241,36 @@ 1 0 + + + select + adminhtml/system_config_source_yesno + 20 + 1 + 1 + 0 + + + + Severe Validation Removes Chargeback Liability on Merchant + select + adminhtml/system_config_source_yesno + 25 + 1 + 1 + 0 + 1 + + + + text + adminhtml/system_config_source_yesno + 30 + 1 + 1 + 0 + 1 + select diff --git a/app/code/core/Mage/Payment/Block/Form/Cc.php b/app/code/core/Mage/Payment/Block/Form/Cc.php index 6736545f76..b994d8885e 100644 --- a/app/code/core/Mage/Payment/Block/Form/Cc.php +++ b/app/code/core/Mage/Payment/Block/Form/Cc.php @@ -113,4 +113,47 @@ public function hasVerification() } return true; } + + /* + * Whether switch/solo card type available + */ + public function hasSsCardType() + { + $availableTypes =$this->getMethod()->getConfigData('cctypes'); + if ($availableTypes && in_array('SS', explode(',', $availableTypes))) { + return true; + } + return false; + } + + /* + * solo/switch card start year + * @return array + */ + public function getSsStartYears() + { + $years = array(); + $first = date("Y"); + + for ($index=5; $index>=0; $index--) { + $year = $first - $index; + $years[$year] = $year; + } + $years = array(0=>$this->__('Year'))+$years; + return $years; + } + + /** + * Render block HTML + * + * @return string + */ + protected function _toHtml() + { + Mage::dispatchEvent('payment_form_block_to_html_before', array( + 'block' => $this + )); + return parent::_toHtml(); + } } + diff --git a/app/code/core/Mage/Payment/Block/Info.php b/app/code/core/Mage/Payment/Block/Info.php index 8049754797..778e6c091c 100644 --- a/app/code/core/Mage/Payment/Block/Info.php +++ b/app/code/core/Mage/Payment/Block/Info.php @@ -30,6 +30,13 @@ */ class Mage_Payment_Block_Info extends Mage_Core_Block_Template { + /** + * Payment rendered specific information + * + * @var Varien_Object + */ + protected $_paymentSpecificInformation = null; + protected function _construct() { parent::_construct(); @@ -90,12 +97,12 @@ public function getChildPdfAsArray() /** * Get some specific information in format of array($label => $value) - * (to be extended by descendants) + * * @return array */ public function getSpecificInformation() { - return array(); + return $this->_prepareSpecificInformation()->getData(); } /** @@ -119,6 +126,51 @@ public function getValueAsArray($value, $escapeHtml = false) return $value; } + /** + * Check whether payment information should show up in secure mode + * true => only "public" payment information may be shown + * false => full information may be shown + * + * @return bool + */ + public function getIsSecureMode() + { + if ($this->hasIsSecureMode()) { + return (bool)(int)$this->_getData('is_secure_mode'); + } + if (!$payment = $this->getInfo()) { + return true; + } + if (!$method = $payment->getMethodInstance()) { + return true; + } + return !Mage::app()->getStore($method->getStore())->isAdmin(); + } + + /** + * Prepare information specific to current payment method + * + * @param Varien_Object|array $transport + * @return Varien_Object + */ + protected function _prepareSpecificInformation($transport = null) + { + if (null === $this->_paymentSpecificInformation) { + if (null === $transport) { + $transport = new Varien_Object; + } elseif (is_array($transport)) { + $transport = new Varien_Object($transport); + } + Mage::dispatchEvent('payment_info_block_prepare_specific_information', array( + 'transport' => $transport, + 'payment' => $this->getInfo(), + 'block' => $this, + )); + $this->_paymentSpecificInformation = $transport; + } + return $this->_paymentSpecificInformation; + } + /** * Callback for escaping HTML * diff --git a/app/code/core/Mage/Payment/Block/Info/Cc.php b/app/code/core/Mage/Payment/Block/Info/Cc.php index 7f7939c040..348a76dcd2 100644 --- a/app/code/core/Mage/Payment/Block/Info/Cc.php +++ b/app/code/core/Mage/Payment/Block/Info/Cc.php @@ -24,18 +24,11 @@ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - +/** + * Credit card generic payment info + */ class Mage_Payment_Block_Info_Cc extends Mage_Payment_Block_Info { - /** - * Init default template for block - */ - protected function _construct() - { - parent::_construct(); - $this->setTemplate('payment/info/cc.phtml'); - } - /** * Retrieve credit card type name * @@ -44,10 +37,11 @@ protected function _construct() public function getCcTypeName() { $types = Mage::getSingleton('payment/config')->getCcTypes(); - if (isset($types[$this->getInfo()->getCcType()])) { - return $types[$this->getInfo()->getCcType()]; + $ccType = $this->getInfo()->getCcType(); + if (isset($types[$ccType])) { + return $types[$ccType]; } - return $this->getInfo()->getCcType(); + return (empty($ccType)) ? Mage::helper('payment')->__('N/A') : $ccType; } /** @@ -76,10 +70,46 @@ public function getCcExpDate() $date->setMonth($this->getInfo()->getCcExpMonth()); return $date; } - - public function toPdf() + + /** + * Prepare credit card related payment info + * + * @param Varien_Object|array $transport + * @return Varien_Object + */ + protected function _prepareSpecificInformation($transport = null) + { + if (null !== $this->_paymentSpecificInformation) { + return $this->_paymentSpecificInformation; + } + $transport = parent::_prepareSpecificInformation($transport); + $data[Mage::helper('payment')->__('Credit Card Type')] = $this->getCcTypeName(); + + if ($this->getInfo()->getCcLast4()) { + $data[Mage::helper('payment')->__('Credit Card Number')] = sprintf('xxxx-%s', $this->getInfo()->getCcLast4()); + } else { + $data[Mage::helper('payment')->__('Credit Card Number')] = Mage::helper('payment')->__('N/A'); + } + if ($ccSsIssue = $this->getInfo()->getCcSsIssue()) { + $data[Mage::helper('payment')->__('Switch/Solo Issue Number')] = $ccSsIssue; + } + if (!$this->getIsSecureMode()) { + if ($year = $this->getInfo()->getCcSsStartYear() && $month = $this->getInfo()->getCcStartMonth()) { + $data[Mage::helper('payment')->__('Switch/Solo Start Date')] = $this->_formatCardDate($year, $month); + } + } + return $transport->setData(array_merge($data, $transport->getData())); + } + + /** + * Format year/month on the credit card + * + * @param string $year + * @param string $month + * @return string + */ + protected function _formatCardDate($year, $month) { - $this->setTemplate('payment/info/pdf/cc.phtml'); - return $this->toHtml(); + return sprintf('%s/%s', sprintf('%02d', $month), $year); } } diff --git a/app/code/core/Mage/Payment/Block/Info/Ccsave.php b/app/code/core/Mage/Payment/Block/Info/Ccsave.php index 5a6762871f..0366a9e3e9 100644 --- a/app/code/core/Mage/Payment/Block/Info/Ccsave.php +++ b/app/code/core/Mage/Payment/Block/Info/Ccsave.php @@ -26,17 +26,29 @@ class Mage_Payment_Block_Info_Ccsave extends Mage_Payment_Block_Info_Cc { - - protected function _construct() - { - parent::_construct(); - $this->setTemplate('payment/info/ccsave.phtml'); - } - - public function toPdf() + /** + * Show name on card, expiration date and full cc number + * + * Expiration date and full number will show up only in secure mode (only for admin, not in emails or pdfs) + * + * @param Varien_Object|array $transport + */ + protected function _prepareSpecificInformation($transport = null) { - $this->setTemplate('payment/info/pdf/ccsave.phtml'); - return $this->toHtml(); + if (null !== $this->_paymentSpecificInformation) { + return $this->_paymentSpecificInformation; + } + $info = $this->getInfo(); + $transport = new Varien_Object(array(Mage::helper('payment')->__('Name on the Card') => $info->getCcOwner(),)); + $transport = parent::_prepareSpecificInformation($transport); + if (!$this->getIsSecureMode()) { + $transport->addData(array( + Mage::helper('payment')->__('Expiration Date') => $this->_formatCardDate( + $info->getCcExpYear(), $this->getCcExpMonth() + ), + Mage::helper('payment')->__('Credit Card Number') => $info->getCcNumber(), + )); + } + return $transport; } - } diff --git a/app/code/core/Mage/Payment/Helper/Data.php b/app/code/core/Mage/Payment/Helper/Data.php index d518f6fa06..3ae300d4b6 100644 --- a/app/code/core/Mage/Payment/Helper/Data.php +++ b/app/code/core/Mage/Payment/Helper/Data.php @@ -73,7 +73,7 @@ public function getStoreMethods($store = null, $quote = null) continue; } - $sortOrder = (int)Mage::getStoreConfig($prefix . 'sort_order', $store); + $sortOrder = (int)$methodInstance->getConfigData('sort_order', $store); $methodInstance->setSortOrder($sortOrder); $methodInstance->setStore($store); $res[] = $methodInstance; diff --git a/app/code/core/Mage/Payment/Model/Method/Cc.php b/app/code/core/Mage/Payment/Model/Method/Cc.php index a34cfe533d..9415c955ae 100644 --- a/app/code/core/Mage/Payment/Model/Method/Cc.php +++ b/app/code/core/Mage/Payment/Model/Method/Cc.php @@ -49,7 +49,11 @@ public function assignData($data) ->setCcNumber($data->getCcNumber()) ->setCcCid($data->getCcCid()) ->setCcExpMonth($data->getCcExpMonth()) - ->setCcExpYear($data->getCcExpYear()); + ->setCcExpYear($data->getCcExpYear()) + ->setCcSsIssue($data->getCcSsIssue()) + ->setCcSsStartMonth($data->getCcSsStartMonth()) + ->setCcSsStartYear($data->getCcSsStartYear()) + ; return $this; } @@ -95,10 +99,7 @@ public function validate() $ccType = ''; - if (!$this->_validateExpDate($info->getCcExpYear(), $info->getCcExpMonth())) { - $errorCode = 'ccsave_expiration,ccsave_expiration_yr'; - $errorMsg = $this->_getHelper()->__('Incorrect credit card expiration date'); - } + if (in_array($info->getCcType(), $availableTypes)){ if ($this->validateCcNum($ccNumber) @@ -137,8 +138,8 @@ public function validate() $errorMsg = $this->_getHelper()->__('Credit card type is not allowed for this payment method'); } - //validate credit card verification number - if ($errorMsg === false && $this->hasVerification()) { + //validate credit card verification number + if ($errorMsg === false && $this->hasVerification() && $ccType != 'SS') { $verifcationRegEx = $this->getVerificationRegEx(); $regExp = isset($verifcationRegEx[$info->getCcType()]) ? $verifcationRegEx[$info->getCcType()] : ''; if (!$info->getCcCid() || !$regExp || !preg_match($regExp ,$info->getCcCid())){ @@ -151,6 +152,16 @@ public function validate() //throw Mage::exception('Mage_Payment', $errorMsg, $errorCode); } + if ($ccType != 'SS' && !$this->_validateExpDate($info->getCcExpYear(), $info->getCcExpMonth())) { + $errorCode = 'ccsave_expiration,ccsave_expiration_yr'; + $errorMsg = $this->_getHelper()->__('Incorrect credit card expiration date'); + } + + //This must be after all validation conditions + if ($this->getIsCentinelValidationEnabled()) { + $this->getCentinelValidator()->validate($this->getCentinelValidationData()); + } + return $this; } @@ -250,4 +261,118 @@ public function isAvailable($quote = null) return $this->getConfigData('cctypes', ($quote ? $quote->getStoreId() : null)) && parent::isAvailable($quote); } + + /** + * Whether centinel service is enabled + * + * @return bool + */ + public function getIsCentinelValidationEnabled() + { + return false !== Mage::getConfig()->getNode('modules/Mage_Centinel') && 1 == $this->getConfigData('centinel'); + } + + /** + * Instantiate centinel validator model + * + * @return Mage_Centinel_Model_Service + */ + public function getCentinelValidator() + { + $validator = Mage::getSingleton('centinel/service'); + $validator + ->setIsModeStrict($this->getConfigData('centinel_is_mode_strict')) + ->setCustomApiEndpointUrl($this->getConfigData('centinel_api_url')) + ->setStore($this->getStore()) + ->setIsPlaceOrder($this->_isPlaceOrder()); + return $validator; + } + + /** + * Return data for Centinel validation + * + * @return Varien_Object + */ + public function getCentinelValidationData() + { + $info = $this->getInfoInstance(); + $params = new Varien_Object(); + $params + ->setPaymentMethodCode($this->getCode()) + ->setCardType($info->getCcType()) + ->setCardNumber($info->getCcNumber()) + ->setCardExpMonth($info->getCcExpMonth()) + ->setCardExpYear($info->getCcExpYear()) + ->setAmount($this->_getAmount()) + ->setCurrencyCode($this->_getCurrencyCode()) + ->setOrderNumber($this->_getOrderId()); + return $params; + } + + /** + * Order increment ID getter (either real from order or a reserved from quote) + * + * @return string + */ + private function _getOrderId() + { + $info = $this->getInfoInstance(); + + if ($this->_isPlaceOrder()) { + return $info->getOrder()->getIncrementId(); + } else { + if (!$info->getQuote()->getReservedOrderId()) { + $info->getQuote()->reserveOrderId(); + } + return $info->getQuote()->getReservedOrderId(); + } + } + + /** + * Grand total getter + * + * @return string + */ + private function _getAmount() + { + $info = $this->getInfoInstance(); + if ($this->_isPlaceOrder()) { + return (double)$info->getOrder()->getQuoteBaseGrandTotal(); + } else { + return (double)$info->getQuote()->getBaseGrandTotal(); + } + } + + /** + * Currency code getter + * + * @return string + */ + private function _getCurrencyCode() + { + $info = $this->getInfoInstance(); + + if ($this->_isPlaceOrder()) { + return $info->getOrder()->getBaseCurrencyCode(); + } else { + return $info->getQuote()->getBaseCurrencyCode(); + } + } + + /** + * Whether current operation is order placement + * + * @return bool + */ + private function _isPlaceOrder() + { + $info = $this->getInfoInstance(); + if ($info instanceof Mage_Sales_Model_Quote_Payment) { + return false; + } elseif ($info instanceof Mage_Sales_Model_Order_Payment) { + return true; + } + } } + + diff --git a/app/code/core/Mage/Payment/Model/Observer.php b/app/code/core/Mage/Payment/Model/Observer.php index 98931ee7dc..2efb495a6b 100644 --- a/app/code/core/Mage/Payment/Model/Observer.php +++ b/app/code/core/Mage/Payment/Model/Observer.php @@ -55,8 +55,12 @@ public function salesOrderBeforeSave($observer) $order->getState() === Mage_Sales_Model_Order::STATE_CLOSED ) { return $this; } - - $order->setForcedCanCreditmemo(true); + /** + * Allow forced creditmemo just in case if it wasn't defined before + */ + if (!$order->hasForcedCanCreditmemo()) { + $order->setForcedCanCreditmemo(true); + } return $this; } } diff --git a/app/code/core/Mage/Payment/etc/adminhtml.xml b/app/code/core/Mage/Payment/etc/adminhtml.xml index 5116ac29a9..7142ad361d 100644 --- a/app/code/core/Mage/Payment/etc/adminhtml.xml +++ b/app/code/core/Mage/Payment/etc/adminhtml.xml @@ -37,6 +37,9 @@ Payment Methods Section + + Payment Services + diff --git a/app/code/core/Mage/Payment/etc/config.xml b/app/code/core/Mage/Payment/etc/config.xml index 256f3c9cf4..bb5c08a641 100644 --- a/app/code/core/Mage/Payment/etc/config.xml +++ b/app/code/core/Mage/Payment/etc/config.xml @@ -77,6 +77,11 @@ Discover 30 + + SS + Maestro/Solo + 40 + OT Other diff --git a/app/code/core/Mage/Payment/etc/system.xml b/app/code/core/Mage/Payment/etc/system.xml index f61dd1d872..423ac1114d 100644 --- a/app/code/core/Mage/Payment/etc/system.xml +++ b/app/code/core/Mage/Payment/etc/system.xml @@ -61,6 +61,7 @@ 1 1 0 + 1 @@ -88,7 +89,7 @@ 1 - + select adminhtml/system_config_source_yesno 5 @@ -96,6 +97,38 @@ 1 0 + + + + select + adminhtml/system_config_source_yesno + 20 + 1 + 1 + 0 + + + + Severe Validation Removes Chargeback Liability on Merchant + select + adminhtml/system_config_source_yesno + 25 + 1 + 1 + 0 + 1 + + + + text + adminhtml/system_config_source_yesno + 30 + 1 + 1 + 0 + 1 + + allowspecific @@ -113,6 +146,7 @@ 1 1 0 + 1 @@ -193,6 +227,7 @@ 1 1 0 + 1 @@ -297,6 +332,7 @@ 1 1 0 + 1 - - - - 0.1.0 - - - - - - Mage_Protx_Model - protx_mysql4 - - - Mage_Protx_Model_Mysql4 - - protx_api_debug
    -
    -
    -
    - - - - Mage_Protx - - - - - Mage_Protx_Block - -
    - - - /protx/standard - - - - standard - - Mage_Protx - protx - - - - - - - - Mage_Protx.csv - - - - - - - - protx.xml - - - - - - - - - - Mage_Protx.csv - - - - - - - - - Payment - protx/standard - Protx Standard - 0 - - - -
    diff --git a/app/code/core/Mage/Protx/etc/system.xml b/app/code/core/Mage/Protx/etc/system.xml deleted file mode 100644 index cc2f007d08..0000000000 --- a/app/code/core/Mage/Protx/etc/system.xml +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - - text - 101 - 1 - 1 - 1 - - - - select - adminhtml/system_config_source_yesno - 1 - 1 - 1 - 0 - - - - select - protx/source_paymentAction - 2 - 1 - 1 - 0 - - - <label>Title</label> - <frontend_type>text</frontend_type> - <sort_order>3</sort_order> - <show_in_default>1</show_in_default> - <show_in_website>1</show_in_website> - <show_in_store>1</show_in_store> - - - - Store name will be used if left empty - text - 3 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_order_status_processing - 4 - 1 - 1 - 0 - - - - text - 5 - 1 - 1 - 0 - - - - text - 6 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 7 - 1 - 1 - 0 - - - - 'General contact' email will be used if left empty - text - 8 - 1 - 1 - 0 - - - - select - protx/source_modeAction - 9 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_yesno - 10 - 1 - 1 - 0 - - - - allowspecific - 50 - adminhtml/system_config_source_payment_allspecificcountries - 1 - 1 - 0 - - - - multiselect - 51 - adminhtml/system_config_source_country - 1 - 1 - 0 - - - - text - 100 - 1 - 1 - 0 - - - - - - - diff --git a/app/code/core/Mage/Protx/sql/protx_setup/mysql4-install-0.1.0.php b/app/code/core/Mage/Protx/sql/protx_setup/mysql4-install-0.1.0.php deleted file mode 100644 index 82c748a765..0000000000 --- a/app/code/core/Mage/Protx/sql/protx_setup/mysql4-install-0.1.0.php +++ /dev/null @@ -1,46 +0,0 @@ -startSetup(); - -$installer->run(" -CREATE TABLE `{$this->getTable('protx_api_debug')}` ( - `debug_id` int(10) unsigned NOT NULL auto_increment, - `transaction_id` varchar(255) NOT NULL default '', - `debug_at` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, - `request_body` text, - `response_body` text, - PRIMARY KEY (`debug_id`), - KEY `debug_at` (`debug_at`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - - "); - -$installer->endSetup(); diff --git a/app/code/core/Mage/Reports/Model/Mysql4/Report/Collection.php b/app/code/core/Mage/Reports/Model/Mysql4/Report/Collection.php index db6cdafaa2..e2853b2849 100644 --- a/app/code/core/Mage/Reports/Model/Mysql4/Report/Collection.php +++ b/app/code/core/Mage/Reports/Model/Mysql4/Report/Collection.php @@ -70,14 +70,13 @@ public function getIntervals() if (!$this->_from && !$this->_to){ return $this->_intervals; } - $dateStart = new Zend_Date($this->_from); - $dateStart2 = new Zend_Date($this->_from); - + $dateStart = new Zend_Date($this->_from); $dateEnd = new Zend_Date($this->_to); $t = array(); - while ($dateStart->compare($dateEnd)<=0) { + $firstInterval = true; + while ($dateStart->compare($dateEnd) <= 0) { switch ($this->_period) { case 'day' : @@ -88,27 +87,44 @@ public function getIntervals() break; case 'month': $t['title'] = $dateStart->toString('MM/yyyy'); - $t['start'] = $dateStart->toString('yyyy-MM-01 00:00:00'); - $t['end'] = $dateStart->toString('yyyy-MM-'.date('t', $dateStart->getTimestamp()).' 23:59:59'); + $t['start'] = ($firstInterval) ? $dateStart->toString('yyyy-MM-dd 00:00:00') + : $dateStart->toString('yyyy-MM-01 00:00:00'); + + $lastInterval = ($dateStart->compareMonth($dateEnd->getMonth()) == 0); + + $t['end'] = ($lastInterval) ? $dateStart->setDay($dateEnd->getDay()) + ->toString('yyyy-MM-dd 23:59:59') + : $dateStart->toString('yyyy-MM-'.date('t', $dateStart->getTimestamp()).' 23:59:59'); + $dateStart->addMonth(1); + + if ($dateStart->compareMonth($dateEnd->getMonth()) == 0) { + $dateStart->setDay(1); + } + + $firstInterval = false; break; case 'year': $t['title'] = $dateStart->toString('yyyy'); - $t['start'] = $dateStart->toString('yyyy-01-01 00:00:00'); - $t['end'] = $dateStart->toString('yyyy-12-31 23:59:59'); + $t['start'] = ($firstInterval) ? $dateStart->toString('yyyy-MM-dd 00:00:00') + : $dateStart->toString('yyyy-01-01 00:00:00'); + + $lastInterval = ($dateStart->compareYear($dateEnd->getYear()) == 0); + + $t['end'] = ($lastInterval) ? $dateStart->setMonth($dateEnd->getMonth()) + ->setDay($dateEnd->getDay())->toString('yyyy-MM-dd 23:59:59') + : $dateStart->toString('yyyy-12-31 23:59:59'); $dateStart->addYear(1); + + if ($dateStart->compareYear($dateEnd->getYear()) == 0) { + $dateStart->setMonth(1)->setDay(1); + } + + $firstInterval = false; break; } $this->_intervals[$t['title']] = $t; } - - if ($this->_period != 'day') { - $titles = array_keys($this->_intervals); - if (count($titles) > 0) { - $this->_intervals[$titles[0]]['start'] = $dateStart2->toString('yyyy-MM-dd 00:00:00'); - $this->_intervals[$titles[count($titles)-1]]['end'] = $dateEnd->toString('yyyy-MM-dd 23:59:59'); - } - } } return $this->_intervals; } diff --git a/app/code/core/Mage/Reports/etc/adminhtml.xml b/app/code/core/Mage/Reports/etc/adminhtml.xml index 293eb3cc33..f368e529af 100644 --- a/app/code/core/Mage/Reports/etc/adminhtml.xml +++ b/app/code/core/Mage/Reports/etc/adminhtml.xml @@ -35,7 +35,7 @@ Sales - Sales Report + Sales adminhtml/report_sales/sales @@ -47,11 +47,11 @@ adminhtml/report_sales/shipping - Total invoiced + Total Invoiced adminhtml/report_sales/invoiced - Total refunded + Total Refunded adminhtml/report_sales/refunded diff --git a/app/code/core/Mage/Review/Block/Customer/View.php b/app/code/core/Mage/Review/Block/Customer/View.php index a130c76def..2ad4834ffc 100644 --- a/app/code/core/Mage/Review/Block/Customer/View.php +++ b/app/code/core/Mage/Review/Block/Customer/View.php @@ -102,4 +102,14 @@ public function dateFormat($date) { return $this->formatDate($date, Mage_Core_Model_Locale::FORMAT_TYPE_LONG); } + + /** + * Check whether current customer is review owner + * + * @return boolean + */ + public function isReviewOwner() + { + return ($this->getReviewData()->getCustomerId() == Mage::getSingleton('customer/session')->getCustomerId()); + } } diff --git a/app/code/core/Mage/Review/controllers/CustomerController.php b/app/code/core/Mage/Review/controllers/CustomerController.php index 63df0b9155..9055583f3e 100644 --- a/app/code/core/Mage/Review/controllers/CustomerController.php +++ b/app/code/core/Mage/Review/controllers/CustomerController.php @@ -34,6 +34,19 @@ class Mage_Review_CustomerController extends Mage_Core_Controller_Front_Action { + /** + * Action predispatch + * + * Check customer authentication for some actions + */ + public function preDispatch() + { + parent::preDispatch(); + if (!Mage::getSingleton('customer/session')->authenticate($this)) { + $this->setFlag('', self::FLAG_NO_DISPATCH, true); + } + } + public function indexAction() { $this->loadLayout(); diff --git a/app/code/core/Mage/Rss/Block/Catalog/Special.php b/app/code/core/Mage/Rss/Block/Catalog/Special.php index 6d81697abd..3c97bf04e2 100644 --- a/app/code/core/Mage/Rss/Block/Catalog/Special.php +++ b/app/code/core/Mage/Rss/Block/Catalog/Special.php @@ -83,7 +83,7 @@ protected function _toHtml() $specials->setVisibility(Mage::getSingleton('catalog/product_visibility')->getVisibleInCatalogIds()); $newurl = Mage::getUrl('rss/catalog/new'); - $title = Mage::helper('rss')->__('%s - Special Discounts', Mage::app()->getStore()->getFrontendName()); + $title = Mage::helper('rss')->__('%s - Special Products', Mage::app()->getStore()->getFrontendName()); $lang = Mage::getStoreConfig('general/locale/code'); $rssObj = Mage::getModel('rss/rss'); diff --git a/app/code/core/Mage/Rule/Model/Condition/Abstract.php b/app/code/core/Mage/Rule/Model/Condition/Abstract.php index c627d9e7b3..101970ba90 100644 --- a/app/code/core/Mage/Rule/Model/Condition/Abstract.php +++ b/app/code/core/Mage/Rule/Model/Condition/Abstract.php @@ -104,9 +104,8 @@ public function getDefaultOperatorOptions() '<' => Mage::helper('rule')->__('less than'), '{}' => Mage::helper('rule')->__('contains'), '!{}' => Mage::helper('rule')->__('does not contain'), - '!{}' => Mage::helper('rule')->__('does not contain'), '()' => Mage::helper('rule')->__('is one of'), - '!()' => Mage::helper('rule')->__('is not one of'), + '!()' => Mage::helper('rule')->__('is not one of') ); } return $this->_defaultOperatorOptions; @@ -533,7 +532,7 @@ public function validateAttribute($validatedValue) break; case '<=': case '>': - if (is_array($validatedValue)) { + if (is_array($validatedValue) || is_null($validatedValue)) { $result = false; } else { $result = $validatedValue<=$value; @@ -541,7 +540,7 @@ public function validateAttribute($validatedValue) break; case '>=': case '<': - if (is_array($validatedValue)) { + if (is_array($validatedValue) || is_null($validatedValue)) { $result = false; } else { $result = $validatedValue>=$value; diff --git a/app/code/core/Mage/Sales/Block/Items/Abstract.php b/app/code/core/Mage/Sales/Block/Items/Abstract.php index 5c5c05570f..94661b9e99 100644 --- a/app/code/core/Mage/Sales/Block/Items/Abstract.php +++ b/app/code/core/Mage/Sales/Block/Items/Abstract.php @@ -104,12 +104,12 @@ protected function _prepareItem(Mage_Core_Block_Abstract $renderer) } /** - * Get item row html + * Return product type for quote/order item * - * @param Varien_Object $item - * @return string + * @param Varien_Object $item + * @return string */ - public function getItemHtml(Varien_Object $item) + protected function _getItemType(Varien_Object $item) { if ($item->getOrderItem()) { $type = $item->getOrderItem()->getProductType(); @@ -118,6 +118,18 @@ public function getItemHtml(Varien_Object $item) } else { $type = $item->getProductType(); } + return $type; + } + + /** + * Get item row html + * + * @param Varien_Object $item + * @return string + */ + public function getItemHtml(Varien_Object $item) + { + $type = $this->_getItemType($item); $block = $this->getItemRenderer($type) ->setItem($item); diff --git a/app/code/core/Mage/Sales/Block/Reorder/Sidebar.php b/app/code/core/Mage/Sales/Block/Reorder/Sidebar.php index 9097601277..ca42d71c60 100644 --- a/app/code/core/Mage/Sales/Block/Reorder/Sidebar.php +++ b/app/code/core/Mage/Sales/Block/Reorder/Sidebar.php @@ -64,8 +64,9 @@ public function getItems() $order = $this->getLastOrder(); $limit = 5; if ($order) { - foreach ($order->getItemsRandomCollection($limit) as $item) { - if ($item->getProduct()) { + $website = Mage::app()->getStore()->getWebsiteId(); + foreach ($order->getParentItemsRandomCollection($limit) as $item) { + if ($item->getProduct() && in_array($website, $item->getProduct()->getWebsiteIds())) { $items[] = $item; } } diff --git a/app/code/core/Mage/Sales/Model/Mysql4/Order.php b/app/code/core/Mage/Sales/Model/Mysql4/Order.php index e260477bdf..57d628375e 100644 --- a/app/code/core/Mage/Sales/Model/Mysql4/Order.php +++ b/app/code/core/Mage/Sales/Model/Mysql4/Order.php @@ -78,6 +78,7 @@ public function aggregateProductsByTypes($orderId, $productTypeIds = array(), $i */ public function aggregate($from = null, $to = null) { + $writeAdapter = $this->getWriteConnection(); try { if (!is_null($from)) { $from = $this->formatDate($from); @@ -87,7 +88,6 @@ public function aggregate($from = null, $to = null) } $tableName = $this->getTable('sales/order_aggregated_created'); - $writeAdapter = $this->getWriteConnection(); $writeAdapter->beginTransaction(); @@ -100,7 +100,7 @@ public function aggregate($from = null, $to = null) } $subQuery = $writeAdapter->select(); - $subQuery->from(array('so'=>'sales_order'), array('DISTINCT DATE(so.created_at)')) + $subQuery->from(array('so' => $this->getTable('sales/order')), array('DISTINCT DATE(so.created_at)')) ->where($where); $deleteCondition = 'DATE(period) IN (' . new Zend_Db_Expr($subQuery) . ')'; diff --git a/app/code/core/Mage/Sales/Model/Mysql4/Report/Invoiced.php b/app/code/core/Mage/Sales/Model/Mysql4/Report/Invoiced.php index f7c80146e9..44fa5f6734 100644 --- a/app/code/core/Mage/Sales/Model/Mysql4/Report/Invoiced.php +++ b/app/code/core/Mage/Sales/Model/Mysql4/Report/Invoiced.php @@ -81,7 +81,7 @@ protected function _aggregateByInvoiceCreatedAt($from, $to) } $subQuery = $writeAdapter->select(); - $subQuery->from(array('so'=>'sales_order'), array('DISTINCT DATE(so.created_at)')) + $subQuery->from(array('so' => $this->getTable('sales/order') ), array('DISTINCT DATE(so.created_at)')) ->where($where); $deleteCondition = 'DATE(period) IN (' . new Zend_Db_Expr($subQuery) . ')'; @@ -103,17 +103,18 @@ protected function _aggregateByInvoiceCreatedAt($from, $to) ); $select = $writeAdapter->select() - ->from(array('soe' => 'sales_order_entity'), $columns) + ->from(array('soe' => $this->getTable('sales/order_entity')), $columns) ->where('state <> ?', 'canceled'); - $select->joinInner(array('soei' => $invoiceAttr->getBackend()->getTable()), "`soei`.`entity_id` = `soe`.`entity_id` + $select->joinInner(array('soei' => $this->getTable($invoiceAttr->getBackend()->getTable())), + "`soei`.`entity_id` = `soe`.`entity_id` AND `soei`.`attribute_id` = {$invoiceAttr->getAttributeId()} AND `soei`.`entity_type_id` = `soe`.`entity_type_id`", array() ); $select->joinInner(array( - 'so' => 'sales_order'), + 'so' => $this->getTable('sales/order')), '`soei`.`value` = `so`.`entity_id` AND `so`.base_total_invoiced > 0', array() ); @@ -194,7 +195,7 @@ protected function _aggregateByOrderCreatedAt($from, $to) } $subQuery = $writeAdapter->select(); - $subQuery->from(array('so'=>'sales_order'), array('DISTINCT DATE(so.created_at)')) + $subQuery->from(array('so' => $this->getTable('sales/order')), array('DISTINCT DATE(so.created_at)')) ->where($where); $deleteCondition = 'DATE(period) IN (' . new Zend_Db_Expr($subQuery) . ')'; diff --git a/app/code/core/Mage/Sales/Model/Mysql4/Report/Refunded.php b/app/code/core/Mage/Sales/Model/Mysql4/Report/Refunded.php index 4456e7e589..e2eb9684bf 100644 --- a/app/code/core/Mage/Sales/Model/Mysql4/Report/Refunded.php +++ b/app/code/core/Mage/Sales/Model/Mysql4/Report/Refunded.php @@ -75,7 +75,7 @@ protected function _aggregateByOrderCreatedAt($from, $to) } $subQuery = $writeAdapter->select(); - $subQuery->from(array('so'=>'sales_order'), array('DISTINCT DATE(so.created_at)')) + $subQuery->from(array('so' => $this->getTable('sales/order')), array('DISTINCT DATE(so.created_at)')) ->where($where); $deleteCondition = 'DATE(period) IN (' . new Zend_Db_Expr($subQuery) . ')'; @@ -167,7 +167,7 @@ protected function _aggregateByRefundCreatedAt($from, $to) } $subQuery = $writeAdapter->select(); - $subQuery->from(array('so'=>'sales_order'), array('DISTINCT DATE(so.created_at)')) + $subQuery->from(array('so' => $this->getTable('sales/order')), array('DISTINCT DATE(so.created_at)')) ->where($where); $deleteCondition = 'DATE(period) IN (' . new Zend_Db_Expr($subQuery) . ')'; @@ -188,18 +188,19 @@ protected function _aggregateByRefundCreatedAt($from, $to) ); $select = $writeAdapter->select() - ->from(array('soe' => 'sales_order_entity'), $columns) + ->from(array('soe' => $this->getTable('sales/order_entity')), $columns) ->where('state <> ?', 'canceled') ->where('base_total_refunded > 0'); - $select->joinInner(array('soei' => $creditmemoAttr->getBackend()->getTable()), "`soei`.`entity_id` = `soe`.`entity_id` + $select->joinInner(array('soei' => $this->getTable($creditmemoAttr->getBackend()->getTable())), + "`soei`.`entity_id` = `soe`.`entity_id` AND `soei`.`attribute_id` = {$creditmemoAttr->getAttributeId()} AND `soei`.`entity_type_id` = `soe`.`entity_type_id`", array() ); $select->joinInner(array( - 'so' => 'sales_order'), + 'so' => $this->getTable('sales/order')), '`soei`.`value` = `so`.`entity_id`', array() ); diff --git a/app/code/core/Mage/Sales/Model/Mysql4/Report/Shipping.php b/app/code/core/Mage/Sales/Model/Mysql4/Report/Shipping.php index af5dbc041f..c5bc12b0f9 100644 --- a/app/code/core/Mage/Sales/Model/Mysql4/Report/Shipping.php +++ b/app/code/core/Mage/Sales/Model/Mysql4/Report/Shipping.php @@ -75,7 +75,7 @@ protected function _aggregateByOrderCreatedAt($from, $to) } $subQuery = $writeAdapter->select(); - $subQuery->from(array('so'=>'sales_order'), array('DISTINCT DATE(so.created_at)')) + $subQuery->from(array('so'=>$this->getTable('sales/order')), array('DISTINCT DATE(so.created_at)')) ->where($where); $deleteCondition = 'DATE(period) IN (' . new Zend_Db_Expr($subQuery) . ')'; @@ -168,7 +168,7 @@ protected function _aggregateByShippingCreatedAt($from, $to) } $subQuery = $writeAdapter->select(); - $subQuery->from(array('so'=>'sales_order'), array('DISTINCT DATE(so.created_at)')) + $subQuery->from(array('so'=>$this->getTable('sales/order')), array('DISTINCT DATE(so.created_at)')) ->where($where); $deleteCondition = 'DATE(period) IN (' . new Zend_Db_Expr($subQuery) . ')'; @@ -188,17 +188,17 @@ protected function _aggregateByShippingCreatedAt($from, $to) $shipmentAttr = $shipment->getAttribute('order_id'); $select = $writeAdapter->select() - ->from(array('soe' => 'sales_order_entity'), $columns) + ->from(array('soe' => $this->getTable('sales/order_entity')), $columns) ->where('state <> ?', 'canceled'); - $select->joinInner(array('soei' => $shipmentAttr->getBackend()->getTable()), "`soei`.`entity_id` = `soe`.`entity_id` + $select->joinInner(array('soei' => $this->getTable($shipmentAttr->getBackend()->getTable())), "`soei`.`entity_id` = `soe`.`entity_id` AND `soei`.`attribute_id` = {$shipmentAttr->getAttributeId()} AND `soei`.`entity_type_id` = `soe`.`entity_type_id`", array() ); - $select->joinInner(array('so' => 'sales_order'), + $select->joinInner(array('so' => $this->getTable('sales/order')), '`soei`.`value` = `so`.`entity_id` AND `so`.base_total_invoiced > 0', array() ); diff --git a/app/code/core/Mage/Sales/Model/Mysql4/Sale/Collection.php b/app/code/core/Mage/Sales/Model/Mysql4/Sale/Collection.php index 5c27107dfb..34f97547c1 100644 --- a/app/code/core/Mage/Sales/Model/Mysql4/Sale/Collection.php +++ b/app/code/core/Mage/Sales/Model/Mysql4/Sale/Collection.php @@ -35,9 +35,19 @@ class Mage_Sales_Model_Mysql4_Sale_Collection extends Varien_Object implements I */ protected $_read; + /** + * Loaded collection items + * + * @var array + */ protected $_items = array(); - protected $_totals = array('lifetime' => 0, 'num_orders' => 0); + /** + * Totals data + * + * @var array + */ + protected $_totals = array('lifetime' => 0, 'base_lifetime' => 0, 'base_avgsale' => 0, 'num_orders' => 0); /** * Entity attribute @@ -54,37 +64,95 @@ class Mage_Sales_Model_Mysql4_Sale_Collection extends Varien_Object implements I protected $_select; /** - * Enter description here... + * Customer model * * @var Mage_Customer_Model_Customer */ protected $_customer; + /** + * Order state value + * + * @var null|string|array + */ + protected $_orderStateValue = null; + + /** + * Order state condition + * + * @var string + */ + protected $_orderStateCondition = null; + + /** + * Set sales order entity and establish read connection + * + */ public function __construct() { $this->_entity = Mage::getModel('sales_entity/order'); $this->_read = $this->_entity->getReadConnection(); } + /** + * Set filter by customer + * + * @param Mage_Customer_Model_Customer $customer + * @return Mage_Sales_Model_Mysql4_Sale_Collection + */ public function setCustomerFilter(Mage_Customer_Model_Customer $customer) { $this->_customer = $customer; return $this; } + /** + * Add filter by stores + * + * @param array $storeIds + * @return Mage_Sales_Model_Mysql4_Sale_Collection + */ + public function addStoreFilter($storeIds) + { + $this->getSelect()->where('store_id IN (?)', $storeIds); + return $this; + } + + /** + * Set filter by order state + * + * @param string|array $state + * @return Mage_Sales_Model_Mysql4_Sale_Collection + */ + public function setOrderStateFilter($state, $exclude = false) + { + $this->_orderStateCondition = ($exclude) ? 'NOT IN' : 'IN'; + $this->_orderStateValue = (!is_array($state)) ? array($state) : $state; + return $this; + } + + /** + * Load data + * + * @param boolean $printQuery + * @param boolean $logQuery + * @return Mage_Sales_Model_Mysql4_Sale_Collection + */ public function load($printQuery = false, $logQuery = false) { - $this->_select = $this->_read->select(); - $entityTable= $this->getEntity()->getEntityTable(); - $paidTable = $this->getAttribute('grand_total')->getBackend()->getTable(); - $idField = $this->getEntity()->getIdFieldName(); + $this->_select = $this->_read->select(); + $entityTable = $this->getEntity()->getEntityTable(); + $paidTable = $this->getAttribute('grand_total')->getBackend()->getTable(); + $idField = $this->getEntity()->getIdFieldName(); $this->getSelect() ->from(array('sales' => $entityTable), array( 'store_id', - 'lifetime' => 'sum(sales.base_grand_total)', - 'avgsale' => 'avg(sales.base_grand_total)', - 'num_orders'=> 'count(sales.base_grand_total)' + 'lifetime' => 'sum(sales.base_grand_total)', + 'base_lifetime' => 'sum(sales.base_grand_total * sales.base_to_global_rate)', + 'avgsale' => 'avg(sales.base_grand_total)', + 'base_avgsale' => 'avg(sales.base_grand_total * sales.base_to_global_rate)', + 'num_orders' => 'count(sales.base_grand_total)' ) ) ->where('sales.entity_type_id=?', $this->getEntity()->getTypeId()) @@ -95,6 +163,10 @@ public function load($printQuery = false, $logQuery = false) ->where('sales.customer_id=?', $this->_customer->getId()); } + if (!is_null($this->_orderStateValue)) { + $this->getSelect()->where('state ' . $this->_orderStateCondition . ' (?)', $this->_orderStateValue); + } + Mage::dispatchEvent('sales_sale_collection_query_before', array('collection' => $this)); $this->printLogQuery($printQuery, $logQuery); @@ -112,31 +184,27 @@ public function load($printQuery = false, $logQuery = false) $this->_items[ $v['store_id'] ] = $obj; $this->_items[ $v['store_id'] ]->setStoreName($storeName); + $this->_items[ $v['store_id'] ]->setWebsiteId(Mage::app()->getStore($obj->getStoreId())->getWebsiteId()); $this->_items[ $v['store_id'] ]->setAvgNormalized($obj->getAvgsale() * $obj->getNumOrders()); foreach ($this->_totals as $key => $value) { $this->_totals[$key] += $obj->getData($key); } } if ($this->_totals['num_orders']) { - $this->_totals['avgsale'] = $this->_totals['lifetime'] / $this->_totals['num_orders']; + $this->_totals['avgsale'] = $this->_totals['base_lifetime'] / $this->_totals['num_orders']; } } return $this; } - public function addStoreFilter($storeIds) - { - $this->getSelect()->where('store_id IN (?)', $storeIds); - return $this; - } - /** * Print and/or log query * * @param boolean $printQuery * @param boolean $logQuery - * @return Mage_Sales_Model_Mysql4_Order_Attribute_Collection_Paid + * @param mixed $sql + * @return Mage_Sales_Model_Mysql4_Sale_Collection */ public function printLogQuery($printQuery = false, $logQuery = false, $sql = null) { if ($printQuery) { @@ -160,8 +228,9 @@ public function getSelect() } /** - * Enter description here... + * Retrieve attribute entity by specified parameter * + * @param int|string|object $attr * @return Mage_Eav_Model_Entity_Attribute_Abstract */ public function getAttribute($attr) @@ -170,7 +239,7 @@ public function getAttribute($attr) } /** - * Enter description here... + * Retrieve currently used entity * * @return Mage_Eav_Model_Entity_Abstract */ @@ -180,7 +249,7 @@ public function getEntity() } /** - * Enter description here... + * Retrieve Iterator instance of items array * * @return ArrayIterator */ @@ -190,7 +259,7 @@ public function getIterator() } /** - * Enter description here... + * Retrieve array of items * * @return array */ @@ -200,7 +269,7 @@ public function getItems() } /** - * Enter description here... + * Retrieve totals data converted into Varien_Object * * @return Varien_Object */ diff --git a/app/code/core/Mage/Sales/Model/Mysql4/Setup.php b/app/code/core/Mage/Sales/Model/Mysql4/Setup.php index 520fb0629c..00784c5cf5 100644 --- a/app/code/core/Mage/Sales/Model/Mysql4/Setup.php +++ b/app/code/core/Mage/Sales/Model/Mysql4/Setup.php @@ -582,8 +582,10 @@ public function getDefaultEntities() 'base_amount_ordered' => array('type'=>'decimal'), 'base_amount_authorized' => array('type'=>'decimal'), 'base_amount_paid' => array('type'=>'decimal'), + 'base_amount_paid_online' => array('type'=>'decimal'), 'base_amount_canceled' => array('type'=>'decimal'), 'base_amount_refunded' => array('type'=>'decimal'), + 'base_amount_refunded_online' => array('type'=>'decimal'), 'base_shipping_amount' => array('type'=>'decimal'), 'base_shipping_captured' => array('type'=>'decimal'), 'base_shipping_refunded' => array('type'=>'decimal'), diff --git a/app/code/core/Mage/Sales/Model/Order.php b/app/code/core/Mage/Sales/Model/Order.php index 5a66f35574..3c1a6cc816 100644 --- a/app/code/core/Mage/Sales/Model/Order.php +++ b/app/code/core/Mage/Sales/Model/Order.php @@ -991,13 +991,46 @@ public function getItemsCollection($filterByTypes = array(), $nonChildrenOnly = return $this->_items; } - public function getItemsRandomCollection($limit=1) + /** + * Get random items collection with related children + * + * @param int $limit + * @return Mage_Sales_Model_Mysql4_Order_Item_Collection + */ + public function getItemsRandomCollection($limit = 1) + { + return $this->_getItemsRandomCollection($limit); + } + + /** + * Get random items collection without related children + * + * @param int $limit + * @return Mage_Sales_Model_Mysql4_Order_Item_Collection + */ + public function getParentItemsRandomCollection($limit = 1) + { + return $this->_getItemsRandomCollection($limit, true); + } + + /** + * Get random items collection with or without related children + * + * @param int $limit + * @param bool $nonChildrenOnly + * @return Mage_Sales_Model_Mysql4_Order_Item_Collection + */ + protected function _getItemsRandomCollection($limit, $nonChildrenOnly = false) { $collection = Mage::getModel('sales/order_item')->getCollection() ->setOrderFilter($this->getId()) ->setRandomOrder() ->setPageSize($limit); + if ($nonChildrenOnly) { + $collection->filterByParent(); + } + $products = array(); foreach ($collection as $item) { $products[] = $item->getProductId(); @@ -1012,6 +1045,7 @@ public function getItemsRandomCollection($limit=1) foreach ($collection as $item) { $item->setProduct($productsCollection->getItemById($item->getProductId())); } + return $collection; } @@ -1558,9 +1592,10 @@ protected function _checkState() } } /** - * Order can be closed just in case when we have refunded amount + * Order can be closed just in case when we have refunded amount. + * In case of "0" grand total order checking ForcedCanCreditmemo flag */ - elseif(floatval($this->getTotalRefunded())) { + elseif(floatval($this->getTotalRefunded()) || (!$this->getTotalRefunded() && $this->hasForcedCanCreditmemo())) { if ($this->getState() !== self::STATE_CLOSED) { $this->_setState(self::STATE_CLOSED, true, '', $userNotification); } @@ -1668,7 +1703,7 @@ public function prepareShipment($qtys = array()) if (!$orderItem->isDummy() && !$orderItem->getQtyToShip()) { continue; } - if ($orderItem->isDummy() && !$this->_needToAddDummy($orderItem, $qtys)) { + if ($orderItem->isDummy() && !$this->_needToAddDummyForShipment($orderItem, $qtys)) { continue; } $item = $convertor->itemToShipmentItem($orderItem); @@ -1725,7 +1760,53 @@ protected function _needToAddDummy($item, $qtys = array()) { return true; } } else { - if (isset($qtys[$child->getId()]) && $qtys[$child->getId()] > 0) { + if (isset($qtys[$item->getParentItem()->getId()]) && $qtys[$item->getParentItem()->getId()] > 0) { + return true; + } + } + return false; + } + } + + /** + * Decides if we need to create dummy shipment item or not + * for eaxample we don't need create dummy parent if all + * children are not in process + * + * @param Mage_Sales_Model_Order_Item $item + * @param array $qtys + * @return bool + */ + protected function _needToAddDummyForShipment($item, $qtys = array()) { + if ($item->getHasChildren()) { + foreach ($item->getChildrenItems() as $child) { + if ($child->getIsVirtual()) { + continue; + } + if (empty($qtys)) { + if ($child->getQtyToShip() > 0) { + return true; + } + } else { + if (isset($qtys[$child->getId()]) && $qtys[$child->getId()] > 0) { + return true; + } + } + } + if ($item->isShipSeparately()) { + return true; + } + return false; + } else if($item->getParentItem()) { + if ($item->getIsVirtual()) { + return false; + } + if (empty($qtys)) { + if ($item->getParentItem()->getQtyToShip() > 0) { + return true; + } + } else { + if (isset($qtys[$item->getParentItem()->getId()]) && $qtys[$item->getParentItem()->getId()] > 0) { return true; } } diff --git a/app/code/core/Mage/Sales/Model/Order/Config.php b/app/code/core/Mage/Sales/Model/Order/Config.php index 42b9a87f63..920e0bad3a 100644 --- a/app/code/core/Mage/Sales/Model/Order/Config.php +++ b/app/code/core/Mage/Sales/Model/Order/Config.php @@ -66,7 +66,8 @@ public function getStateDefaultStatus($state) $status = $statusNode->getName(); } $attributes = $statusNode->attributes(); - if (isset($attributes['default'])) { + // empty($attributes['default']) is for backwards compatibility + if (isset($attributes['default']) && (empty($attributes['default']) || $attributes['default'] == '1')) { $status = $statusNode->getName(); } } diff --git a/app/code/core/Mage/Sales/Model/Order/Creditmemo.php b/app/code/core/Mage/Sales/Model/Order/Creditmemo.php index 43de248b53..c977dcbf23 100644 --- a/app/code/core/Mage/Sales/Model/Order/Creditmemo.php +++ b/app/code/core/Mage/Sales/Model/Order/Creditmemo.php @@ -564,6 +564,7 @@ public function sendEmail($notifyCustomer=true, $comment='') } $paymentBlock = Mage::helper('payment')->getInfoBlock($order->getPayment()) ->setIsSecureMode(true); + $paymentBlock->getMethod()->setStore($order->getStore()->getId()); $mailTemplate = Mage::getModel('core/email_template'); diff --git a/app/code/core/Mage/Sales/Model/Order/Invoice.php b/app/code/core/Mage/Sales/Model/Order/Invoice.php index eefa79021d..13ce7d5ecb 100644 --- a/app/code/core/Mage/Sales/Model/Order/Invoice.php +++ b/app/code/core/Mage/Sales/Model/Order/Invoice.php @@ -240,7 +240,9 @@ public function canCancel() public function capture() { $this->getOrder()->getPayment()->capture($this); - $this->pay(); + if ($this->getIsPaid()) { + $this->pay(); + } return $this; } @@ -302,7 +304,8 @@ public function void() */ public function cancel() { - $this->getOrder()->getPayment()->cancelInvoice($this); + $order = $this->getOrder(); + $order->getPayment()->cancelInvoice($this); foreach ($this->getAllItems() as $item) { $item->cancel(); } @@ -310,20 +313,26 @@ public function cancel() /** * Unregister order totals only for invoices in state PAID */ - if ($this->getState() == self::STATE_PAID) { - $this->getOrder()->setTotalPaid( - $this->getOrder()->getTotalPaid()-$this->getGrandTotal() - ); - $this->getOrder()->setBaseTotalPaid( - $this->getOrder()->getBaseTotalPaid()-$this->getBaseGrandTotal() - ); + $order->setTotalInvoiced($order->getTotalInvoiced() - $this->getGrandTotal()); + $order->setBaseTotalInvoiced($order->getBaseTotalInvoiced() - $this->getBaseGrandTotal()); - $this->getOrder()->setTotalInvoiced( - $this->getOrder()->getTotalInvoiced()-$this->getGrandTotal() - ); - $this->getOrder()->setBaseTotalInvoiced( - $this->getOrder()->getBaseTotalInvoiced()-$this->getBaseGrandTotal() - ); + $order->setSubtotalInvoiced($order->getSubtotalInvoiced() - $this->getSubtotal()); + $order->setBaseSubtotalInvoiced($order->getBaseSubtotalInvoiced() - $this->getBaseSubtotal()); + + $order->setTaxInvoiced($order->getTaxInvoiced() - $this->getTaxAmount()); + $order->setBaseTaxInvoiced($order->getBaseTaxInvoiced() - $this->getBaseTaxAmount()); + + $order->setShippingInvoiced($order->getShippingInvoiced() - $this->getShippingAmount()); + $order->setBaseShippingInvoiced($order->getBaseShippingInvoiced() - $this->getBaseShippingAmount()); + + $order->setDiscountInvoiced($order->getDiscountInvoiced() - $this->getDiscountAmount()); + $order->setBaseDiscountInvoiced($order->getBaseDiscountInvoiced() - $this->getBaseDiscountAmount()); + $order->setBaseTotalInvoicedCost($order->getBaseTotalInvoicedCost() - $this->getBaseCost()); + + + if ($this->getState() == self::STATE_PAID) { + $this->getOrder()->setTotalPaid($this->getOrder()->getTotalPaid()-$this->getGrandTotal()); + $this->getOrder()->setBaseTotalPaid($this->getOrder()->getBaseTotalPaid()-$this->getBaseGrandTotal()); } $this->setState(self::STATE_CANCELED); $this->getOrder()->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true); @@ -454,8 +463,9 @@ public function register() } $order = $this->getOrder(); + $captureCase = $this->getRequestedCaptureCase(); if ($this->canCapture()) { - if ($captureCase = $this->getRequestedCaptureCase()) { + if ($captureCase) { if ($captureCase == self::CAPTURE_ONLINE) { $this->capture(); } @@ -464,8 +474,8 @@ public function register() $this->pay(); } } - } - elseif(!$order->getPayment()->getMethodInstance()->isGateway()) { + } elseif(!$order->getPayment()->getMethodInstance()->isGateway() || $captureCase == self::CAPTURE_OFFLINE) { + $this->setCanVoidFlag(false); $this->pay(); } @@ -568,6 +578,7 @@ public function sendEmail($notifyCustomer=true, $comment='') } $paymentBlock = Mage::helper('payment')->getInfoBlock($order->getPayment()) ->setIsSecureMode(true); + $paymentBlock->getMethod()->setStore($order->getStore()->getId()); $mailTemplate = Mage::getModel('core/email_template'); diff --git a/app/code/core/Mage/Sales/Model/Order/Payment.php b/app/code/core/Mage/Sales/Model/Order/Payment.php index 3ffd84cecf..60bf3b3c5a 100644 --- a/app/code/core/Mage/Sales/Model/Order/Payment.php +++ b/app/code/core/Mage/Sales/Model/Order/Payment.php @@ -40,14 +40,21 @@ class Mage_Sales_Model_Order_Payment extends Mage_Payment_Model_Info * Whether can void * @var string */ - private $_canVoidLookup = null; + protected $_canVoidLookup = null; /** * Transactions registry to spare resource calls * array(txn_id => sales/order_payment_transaction) * @var array */ - private $_transactionsLookup = array(); + protected $_transactionsLookup = array(); + + /** + * Transaction addditional information container + * + * @var array + */ + protected $_transactionAdditionalInfo = array(); /** * Initialize resource model @@ -87,8 +94,12 @@ public function getOrder() public function canCapture() { /** - * @todo checking amounts + * Check Authoriztion transaction state */ + $authTransaction = $this->getAuthorizationTransaction(); + if ($authTransaction) { + return !$authTransaction->getIsClosed(); + } return $this->getMethodInstance()->canCapture(); } @@ -116,14 +127,15 @@ public function canCapturePartial() public function place() { Mage::dispatchEvent('sales_order_payment_place_start', array('payment' => $this)); + $order = $this->getOrder(); - $this->setAmountOrdered($this->getOrder()->getTotalDue()); - $this->setBaseAmountOrdered($this->getOrder()->getBaseTotalDue()); - - $this->setShippingAmount($this->getOrder()->getShippingAmount()); - $this->setBaseShippingAmount($this->getOrder()->getBaseShippingAmount()); + $this->setAmountOrdered($order->getTotalDue()); + $this->setBaseAmountOrdered($order->getBaseTotalDue()); + $this->setShippingAmount($order->getShippingAmount()); + $this->setBaseShippingAmount($order->getBaseShippingAmount()); - $methodInstance = $this->getMethodInstance()->setStore($this->getOrder()->getStoreId()); + $methodInstance = $this->getMethodInstance(); + $methodInstance->setStore($order->getStoreId()); $orderState = Mage_Sales_Model_Order::STATE_NEW; $orderStatus= false; @@ -131,14 +143,11 @@ public function place() $stateObject = new Varien_Object(); /** - * validating payment method again + * Do order payment validation on payment method level */ $methodInstance->validate(); - if ($action = $methodInstance->getConfigPaymentAction()) { - /** - * Run action declared for payment method in configuration - */ - + $action = $methodInstance->getConfigPaymentAction(); + if ($action) { if ($methodInstance->isInitializeNeeded()) { /** * For method initialization we have to use original config value for payment action @@ -148,12 +157,12 @@ public function place() $orderState = Mage_Sales_Model_Order::STATE_PROCESSING; switch ($action) { case Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE: - $this->setAmountAuthorized($this->getOrder()->getTotalDue()); - $this->_authorize(true, $this->getOrder()->getBaseTotalDue()); // base amount will be set inside + $this->_authorize(true, $order->getBaseTotalDue()); // base amount will be set inside + $this->setAmountAuthorized($order->getTotalDue()); break; case Mage_Payment_Model_Method_Abstract::ACTION_AUTHORIZE_CAPTURE: - $this->setAmountAuthorized($this->getOrder()->getTotalDue()); - $this->setBaseAmountAuthorized($this->getOrder()->getBaseTotalDue()); + $this->setAmountAuthorized($order->getTotalDue()); + $this->setBaseAmountAuthorized($order->getBaseTotalDue()); $this->capture(null); break; default: @@ -168,32 +177,29 @@ public function place() $orderStatus = $stateObject->getStatus(); $orderIsNotified = $stateObject->getIsNotified(); } else { - /* - * this flag will set if the order went to as authorization under fraud service for payflowpro - */ - if ($this->getFraudFlag()) { - $orderStatus = $methodInstance->getConfigData('fraud_order_status'); - $orderState = Mage_Sales_Model_Order::STATE_HOLDED; - } else { - /** - * Change order status if it specified - */ - $orderStatus = $methodInstance->getConfigData('order_status'); + $orderStatus = $methodInstance->getConfigData('order_status'); + if (!$orderStatus || $order->getIsVirtual()) { + $orderStatus = $order->getConfig()->getStateDefaultStatus($orderState); } + } + $isCustomerNotified = (null !== $orderIsNotified) ? $orderIsNotified : $order->getCustomerNoteNotify(); + $message = $order->getCustomerNote(); - if (!$orderStatus || $this->getOrder()->getIsVirtual()) { - $orderStatus = $this->getOrder()->getConfig()->getStateDefaultStatus($orderState); + //add message if order was holded duering authorization or capture + if ($order->getState() == Mage_Sales_Model_Order::STATE_HOLDED) { + if ($message) { + $order->addStatusToHistory($order->getStatus(), $message, $isCustomerNotified); } + $order->setHoldBeforeState($orderState); + $order->setHoldBeforeStatus($orderStatus); } - - // set state and add to order history only if something was changed or there is a message - $order = $this->getOrder(); - $message = $order->getCustomerNote(); - if ($orderState !== $order->getState() || $orderStatus !== false && $orderStatus !== $order->getStatus() || $message) { - $order->setState($orderState); - $order->addStatusToHistory($orderStatus, $message, - (null !== $orderIsNotified ? $orderIsNotified : $this->getOrder()->getCustomerNoteNotify()) - ); + // add message to history if order state already declared + elseif ($order->getState() && ($orderStatus !== $order->getStatus() || $message)) { + $order->setState($orderState, $orderStatus, $message, $isCustomerNotified); + } + // set order state + elseif (($order->getState() != $orderState) || ($order->getStatus() != $orderStatus) || $message) { + $order->setState($orderState, $orderStatus, $message, $isCustomerNotified); } Mage::dispatchEvent('sales_order_payment_place_end', array('payment' => $this)); @@ -223,21 +229,43 @@ public function capture($invoice) $paidWorkaround = (float)$amountToCapture; } $this->_isCaptureFinal($paidWorkaround); - $this->_generateTransactionId(Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE, - $this->getAuthorizationTransaction() - ); + $baseTransaction = false; + if ($invoice->getTransactionId()) { + $baseTransaction = $this->_lookupTransaction($invoice->getTransactionId()); + } else { + $baseTransaction = $this->getAuthorizationTransaction(); + } + $this->_generateTransactionId(Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE, $baseTransaction); Mage::dispatchEvent('sales_order_payment_capture', array('payment' => $this, 'invoice' => $invoice)); - $this->getMethodInstance()->setStore($this->getOrder()->getStoreId())->capture($this, $amountToCapture); + $this->getMethodInstance() + ->setStore($this->getOrder()->getStoreId()) + ->capture($this, $amountToCapture); // update transactions, set order state (order will close itself if required) $transaction = $this->_addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE, $invoice, true); - $message = $this->_appendTransactionToMessage($transaction, - Mage::helper('sales')->__('Captured amount of %s online.', $amountToCapture) - ); - $this->getOrder()->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, $message); + /** + * Check if payment transaction is under pending state. + * Gateway can accept peyment transaction but mark it as pending. + * We need hold such kind of orders + */ + if ($this->getIsTransactionPending()) { + $message = Mage::helper('sales')->__('Amount of %s pending approval on gateway.', $this->_formatPrice($amountToCapture)); + $message = $this->_prependMessage($message); + $message = $this->_appendTransactionToMessage($transaction, $message); + $status = $this->getTransactionPendingStatus() ? $this->getTransactionPendingStatus() : true; + $this->getOrder()->setState(Mage_Sales_Model_Order::STATE_HOLDED, $status, $message); + $invoice->setIsPaid(false); + } else { + $this->_updateTotals(array('base_amount_paid_online' => $amountToCapture)); + $message = Mage::helper('sales')->__('Captured amount of %s online.', $this->_formatPrice($amountToCapture)); + $message = $this->_prependMessage($message); + $message = $this->_appendTransactionToMessage($transaction, $message); + $this->getOrder()->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, $message); + $invoice->setIsPaid(true); + } $this->getMethodInstance()->processInvoice($invoice, $this); // should be deprecated return $this; } @@ -273,13 +301,13 @@ public function registerCaptureNotification($amount) $order->addRelatedObject($invoice); $this->setCreatedInvoice($invoice); } else { - $this->_updateTotals(array('base_amount_paid' => $amount)); + $this->_updateTotals(array('base_amount_paid_online' => $amount)); // shipping captured amount should be updated with the invoice } // update transactions, set order state (order will close itself later if required) $transaction = $this->_addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_CAPTURE, $invoice); - $message = Mage::helper('sales')->__('Registered notification about captured amount of %s.', $this->_formatAmount($amount)); + $message = Mage::helper('sales')->__('Registered notification about captured amount of %s.', $this->_formatPrice($amount)); $message = $this->_prependMessage($message); $message = $this->_appendTransactionToMessage($transaction, $message); $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, $message); @@ -448,18 +476,20 @@ public function refund($creditmemo) $this->_updateTotals(array( 'amount_refunded' => $creditmemo->getGrandTotal(), 'base_amount_refunded' => $baseAmountToRefund, + 'base_amount_refunded_online' => $isOnline ? $baseAmountToRefund : null, 'shipping_refunded' => $creditmemo->getShippingAmount(), - 'base_shipping_refunded' => $creditmemo->getBaseShippingAmount() + 'base_shipping_refunded' => $creditmemo->getBaseShippingAmount(), )); // update transactions and order state $transaction = $this->_addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_REFUND, $creditmemo, $isOnline); if ($invoice) { - $message = Mage::helper('sales')->__('Refunded amount of %s online.', $baseAmountToRefund); + $message = Mage::helper('sales')->__('Refunded amount of %s online.', $this->_formatPrice($baseAmountToRefund)); } else { $message = $this->hasMessage() ? $this->getMessage() - : Mage::helper('sales')->__('Refunded amount of %s offline.', $baseAmountToRefund); + : Mage::helper('sales')->__('Refunded amount of %s offline.', $this->_formatPrice($baseAmountToRefund)); } + $message = $message = $this->_prependMessage($message); $message = $this->_appendTransactionToMessage($transaction, $message); $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, $message); @@ -500,12 +530,12 @@ public function registerRefundNotification($amount) $this->setCreatedCreditmemo($creditmemo); */ } - $this->_updateTotals(array('base_amount_refunded' => $amount)); + $this->_updateTotals(array('base_amount_refunded_online' => $amount)); // update transactions and order state $transaction = $this->_addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_REFUND, $creditmemo); $message = $this->_prependMessage( - Mage::helper('sales')->__('Registered notification about refunded amount of %s.', $this->_formatAmount($amount)) + Mage::helper('sales')->__('Registered notification about refunded amount of %s.', $this->_formatPrice($amount)) ); $message = $this->_appendTransactionToMessage($transaction, $message); $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, $message); @@ -573,19 +603,29 @@ protected function _authorize($isOnline, $amount) $this->setBaseAmountAuthorized($amount); // do authorization - $order = $this->getOrder(); + $order = $this->getOrder(); + $state = Mage_Sales_Model_Order::STATE_PROCESSING; + $status = true; if ($isOnline) { - $this->getMethodInstance()->setStore($order->getStoreId())->authorize($this, $amount); - $message = Mage::helper('sales')->__('Authorized amount of %s.', $amount); + $this->getMethodInstance() + ->setStore($order->getStoreId()) + ->authorize($this, $amount); + if ($this->getIsTransactionPending()) { + $status = $this->getTransactionPendingStatus() ? $this->getTransactionPendingStatus() : true; + $state = Mage_Sales_Model_Order::STATE_HOLDED; + $message = Mage::helper('sales')->__('Authorization amount %s pending approval on gateway.', $this->_formatPrice($amount)); + } else { + $message = Mage::helper('sales')->__('Authorized amount of %s.', $this->_formatPrice($amount)); + } } else { - $message = Mage::helper('sales')->__('Registered notification about authorized amount of %s.', $amount); + $message = Mage::helper('sales')->__('Registered notification about authorized amount of %s.', $this->_formatPrice($amount)); } // update transactions, order state and add comments $transaction = $this->_addTransaction(Mage_Sales_Model_Order_Payment_Transaction::TYPE_AUTH); $message = $this->_prependMessage($message); $message = $this->_appendTransactionToMessage($transaction, $message); - $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, $message); + $order->setState($state, $status, $message); return $this; } @@ -615,7 +655,7 @@ protected function _void($isOnline, $amount = null, $gatewayCallback = 'void') $this->_avoidDoubleTransactionProcessing(); } - // if the authorization was untouched, we may update canceled amount of the order grand total + // if the authorization was untouched, we may assume voided amount = order grand total // but only if the payment auth amount equals to order grand total if ($authTransaction && ($order->getBaseGrandTotal() == $this->getBaseAmountAuthorized()) && (0 == $this->getBaseAmountCanceled())) { @@ -625,7 +665,6 @@ protected function _void($isOnline, $amount = null, $gatewayCallback = 'void') } if ($amount) { - $this->_updateTotals(array('base_amount_canceled' => $amount)); $amount = $this->_formatAmount($amount); } @@ -634,7 +673,7 @@ protected function _void($isOnline, $amount = null, $gatewayCallback = 'void') $message = $this->hasMessage() ? $this->getMessage() : Mage::helper('sales')->__('Voided authorization.'); $message = $this->_prependMessage($message); if ($amount) { - $message .= ' ' . Mage::helper('sales')->__('Amount: %s.', $amount); + $message .= ' ' . Mage::helper('sales')->__('Amount: %s.', $this->_formatPrice($amount)); } $message = $this->_appendTransactionToMessage($transaction, $message); $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, $message); @@ -686,6 +725,13 @@ protected function _addTransaction($type, $salesDocument = null, $failsafe = fal $transaction->setIsClosed((int)$this->getIsTransactionClosed()); } + //set transaction addition information + if ($this->_transactionAdditionalInfo) { + foreach ($this->_transactionAdditionalInfo as $key => $value) { + $transaction->setAdditionalInformation($key, $value); + } + } + // link with sales entities $this->setLastTransId($transactionId); $this->setCreatedTransaction($transaction); @@ -697,11 +743,12 @@ protected function _addTransaction($type, $salesDocument = null, $failsafe = fal // link with parent transaction $parentTransactionId = $this->getParentTransactionId(); + if ($parentTransactionId) { $transaction->setParentTxnId($parentTransactionId); if ($this->getShouldCloseParentTransaction()) { $parentTransaction = $this->_lookupTransaction($parentTransactionId); - if ($parentTransaction) { + if ($parentTransaction) { $parentTransaction->isFailsafe($failsafe)->close(false); $this->getOrder()->addRelatedObject($parentTransaction); } @@ -802,6 +849,16 @@ protected function _formatAmount($amount, $asFloat = false) return $asFloat ? (float)$amount : $amount; } + /** + * Format price with currency sign + * @param float $amount + * @return string + */ + protected function _formatPrice($amount) + { + return $this->getOrder()->getBaseCurrency()->formatTxt($amount); + } + /** * Find one transaction by ID or type * @param string $txnId @@ -850,6 +907,15 @@ public function getAuthorizationTransaction() return $txn; } + /** + * Lookup an transaction by id + * @return Mage_Sales_Model_Order_Payment_Transaction|false + */ + public function getTransaction($transaction_id) + { + return $this->_lookupTransaction($transaction_id); + } + /** * Update transaction ids for further processing * If no transactions were set before invoking, may generate an "offline" transaction id @@ -876,7 +942,7 @@ protected function _generateTransactionId($type, $transactionBasedOn = false) protected function _isCaptureFinal($amountToCapture) { if ((float)$this->getOrder()->getBaseGrandTotal() === - ((float)$this->getBaseAmountPaid() + $amountToCapture)) { + ((float)$this->getBaseAmountPaidOnline() + $amountToCapture)) { if (false !== $this->getShouldCloseParentTransaction()) { $this->setShouldCloseParentTransaction(true); } @@ -884,4 +950,15 @@ protected function _isCaptureFinal($amountToCapture) } return false; } + + /** + * Additionnal transaction info setter + * + * @param sting $key + * @param string $value + */ + public function setTransactionAdditionalInfo($key, $value) + { + $this->_transactionAdditionalInfo[$key] = $value; + } } diff --git a/app/code/core/Mage/Sales/Model/Quote.php b/app/code/core/Mage/Sales/Model/Quote.php index 6e32fc0125..80d8f8c231 100644 --- a/app/code/core/Mage/Sales/Model/Quote.php +++ b/app/code/core/Mage/Sales/Model/Quote.php @@ -960,7 +960,7 @@ public function collectTotals() /** * Get all quote totals (sorted by priority) - * Metchod process quote states isVirtual and isMultiShipping + * Method process quote states isVirtual and isMultiShipping * * @return array */ diff --git a/app/code/core/Mage/Sales/Model/Quote/Address.php b/app/code/core/Mage/Sales/Model/Quote/Address.php index a63829a194..47fccedca5 100644 --- a/app/code/core/Mage/Sales/Model/Quote/Address.php +++ b/app/code/core/Mage/Sales/Model/Quote/Address.php @@ -601,10 +601,7 @@ public function collectShippingRates() $this->removeAllShippingRates(); - $countryId = $this->getCountryId(); - $postCode = $this->getPostcode(); - if ((!$countryId && !$postCode) - || ($countryId && !$postCode && !Mage::helper('directory')->isZipCodeOptional($countryId))) { + if (!$this->getCountryId()) { return $this; } diff --git a/app/code/core/Mage/Sales/etc/config.xml b/app/code/core/Mage/Sales/etc/config.xml index 4e835d7f60..ee468d8396 100644 --- a/app/code/core/Mage/Sales/etc/config.xml +++ b/app/code/core/Mage/Sales/etc/config.xml @@ -28,7 +28,7 @@ - 0.9.54 + 0.9.56 @@ -91,6 +91,8 @@ * * + quote_base_grand_total + * * * @@ -554,48 +556,48 @@ - + - + - + - + - + - + - + @@ -896,7 +898,7 @@ 0 0 * * * sales/observer::cleanExpiredQuotes - + 0 0 * * * sales/observer::aggregateSalesReportOrderData diff --git a/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.8.8-0.8.9.php b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.8.8-0.8.9.php index a3c3dcc2c3..0054b4bc6b 100644 --- a/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.8.8-0.8.9.php +++ b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.8.8-0.8.9.php @@ -50,12 +50,14 @@ $installer->getConnection()->dropColumn($this->getTable('sales_quote_temp_text'), 'store_id'); $installer->getConnection()->dropColumn($this->getTable('sales_quote_temp_varchar'), 'store_id'); -$installer->run(" -ALTER TABLE {$this->getTable('sales_order_entity')} - ADD CONSTRAINT `FK_SALE_ORDER_ENTITY_STORE` FOREIGN KEY `FK_SALE_ORDER_ENTITY_STORE` (`store_id`) - REFERENCES {$this->getTable('core_store')} (`store_id`) - ON DELETE SET NULL - ON UPDATE CASCADE; -"); +$installer->getConnection()->addConstraint( + 'SALE_ORDER_ENTITY_STORE', + $this->getTable('sales_order_entity'), + 'store_id', + $this->getTable('core_store'), + 'store_id', + 'SET NULL' +); + $installer->installEntities(); $installer->endSetup(); diff --git a/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.45-0.9.46.php b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.45-0.9.46.php index a65044baca..e24dd4c862 100644 --- a/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.45-0.9.46.php +++ b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.45-0.9.46.php @@ -93,11 +93,20 @@ `base_invoiced_amount` decimal(12,4) NOT NULL DEFAULT '0', `base_refunded_amount` decimal(12,4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), - UNIQUE KEY `UNQ_ORDER_AGGREGATED_CREATED_PSS` (`period`,`store_id`, `order_status`), - KEY `FK_ORDER_AGGREGATED_CREATED_STORE` (`store_id`), - CONSTRAINT `FK_ORDER_AGGREGATED_CREATED_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE + UNIQUE KEY `UNQ_PERIOD_STORE_ORDER_STATUS` (`period`,`store_id`, `order_status`), + KEY `IDX_STORE_ID` (`store_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; "); +$installer->getConnection()->addConstraint( + 'SALES_ORDER_AGGREGATED_CREATED', + $installer->getTable('sales/order_aggregated_created'), + 'store_id', + $installer->getTable('core/store'), + 'store_id', + 'SET NULL' +); + + $this->endSetup(); diff --git a/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.46-0.9.47.php b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.46-0.9.47.php index d30ad10a7b..774f236698 100644 --- a/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.46-0.9.47.php +++ b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.46-0.9.47.php @@ -76,7 +76,7 @@ } $installer->run(" - CREATE TABLE IF NOT EXISTS `{$installer->getTable('sales/shipping_aggregated')}` + CREATE TABLE `{$installer->getTable('sales/shipping_aggregated')}` ( `id` int(11) unsigned NOT NULL auto_increment, `period` date NOT NULL DEFAULT '0000-00-00', @@ -86,13 +86,11 @@ `orders_count` int(11) NOT NULL DEFAULT '0', `total_shipping` decimal(12,4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), - UNIQUE KEY `UNQ_SHIPPING_AGGREGATED_CREATED_PSSC` (`period`,`store_id`, `order_status`, `shipping_description`), - KEY `FK_SHIPPING_AGGREGATED_CREATED_STORE` (`store_id`), - CONSTRAINT `FK_SHIPPING_AGGREGATED_CREATED_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) - ON DELETE SET NULL ON UPDATE CASCADE + UNIQUE KEY `UNQ_PERIOD_STORE_ORDER_STATUS` (`period`,`store_id`, `order_status`, `shipping_description`), + KEY `IDX_STORE_ID` (`store_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - CREATE TABLE IF NOT EXISTS `{$installer->getTable('sales/shipping_aggregated_order')}` + CREATE TABLE `{$installer->getTable('sales/shipping_aggregated_order')}` ( `id` int(11) unsigned NOT NULL auto_increment, `period` date NOT NULL DEFAULT '0000-00-00', @@ -102,12 +100,28 @@ `orders_count` int(11) NOT NULL DEFAULT '0', `total_shipping` decimal(12,4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), - UNIQUE KEY `UNQ_SHIPPING_AGGREGATED_UPDATED_PSSC` (`period`,`store_id`, `order_status`, `shipping_description`), - KEY `FK_SHIPPING_AGGREGATED_UPDATED_STORE` (`store_id`), - CONSTRAINT `FK_SHIPPING_AGGREGATED_UPDATED_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) - ON DELETE SET NULL ON UPDATE CASCADE + UNIQUE KEY `UNQ_PERIOD_STORE_ORDER_STATUS` (`period`,`store_id`, `order_status`, `shipping_description`), + KEY `IDX_STORE_ID` (`store_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; "); +$installer->getConnection()->addConstraint( + 'SALES_SHIPPING_AGGREGATED_STORE', + $installer->getTable('sales/shipping_aggregated'), + 'store_id', + $installer->getTable('core/store'), + 'store_id', + 'SET NULL' +); + +$installer->getConnection()->addConstraint( + 'SALES_SHIPPING_AGGREGATED_ORDER_STORE', + $installer->getTable('sales/shipping_aggregated_order'), + 'store_id', + $installer->getTable('core/store'), + 'store_id', + 'SET NULL' +); + $this->endSetup(); diff --git a/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.47-0.9.48.php b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.47-0.9.48.php index afa315a482..501d2dc11c 100644 --- a/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.47-0.9.48.php +++ b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.47-0.9.48.php @@ -31,7 +31,7 @@ $this->startSetup(); $installer->run(" - CREATE TABLE IF NOT EXISTS `{$installer->getTable('sales/invoiced_aggregated')}` + CREATE TABLE `{$installer->getTable('sales/invoiced_aggregated')}` ( `id` int(11) unsigned NOT NULL auto_increment, `period` date NOT NULL DEFAULT '0000-00-00', @@ -43,13 +43,11 @@ `invoiced_captured` decimal(12,4) NOT NULL DEFAULT '0', `invoiced_not_captured` decimal(12,4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), - UNIQUE KEY `UNQ_INVOICED_AGGREGATED_CREATED_PSS` (`period`,`store_id`, `order_status`), - KEY `FK_INVOICED_AGGREGATED_CREATED_STORE` (`store_id`), - CONSTRAINT `FK_INVOICED_AGGREGATED_CREATED_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) - ON DELETE SET NULL ON UPDATE CASCADE + UNIQUE KEY `UNQ_PERIOD_STORE_ORDER_STATUS` (`period`,`store_id`, `order_status`), + KEY `IDX_STORE_ID` (`store_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - CREATE TABLE IF NOT EXISTS `{$installer->getTable('sales/invoiced_aggregated_order')}` + CREATE TABLE `{$installer->getTable('sales/invoiced_aggregated_order')}` ( `id` int(11) unsigned NOT NULL auto_increment, `period` date NOT NULL DEFAULT '0000-00-00', @@ -61,12 +59,29 @@ `invoiced_captured` decimal(12,4) NOT NULL DEFAULT '0', `invoiced_not_captured` decimal(12,4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), - UNIQUE KEY `UNQ_INVOICED_AGGREGATED_UPDATED_PSS` (`period`,`store_id`, `order_status`), - KEY `FK_INVOICED_AGGREGATED_UPDATED_STORE` (`store_id`), - CONSTRAINT `FK_INVOICED_AGGREGATED_UPDATED_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) - ON DELETE SET NULL ON UPDATE CASCADE + UNIQUE KEY `UNQ_PERIOD_STORE_ORDER_STATUS` (`period`,`store_id`, `order_status`), + KEY `IDX_STORE_ID` (`store_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; "); + +$installer->getConnection()->addConstraint( + 'SALES_INVOICED_AGGREGATED_STORE', + $installer->getTable('sales/invoiced_aggregated'), + 'store_id', + $installer->getTable('core/store'), + 'store_id', + 'SET NULL' +); + +$installer->getConnection()->addConstraint( + 'SALES_INVOICED_AGGREGATED_ORDER_STORE', + $installer->getTable('sales/invoiced_aggregated_order'), + 'store_id', + $installer->getTable('core/store'), + 'store_id', + 'SET NULL' +); + $this->endSetup(); diff --git a/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.48-0.9.49.php b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.48-0.9.49.php index 5fd3caf6f6..3412c27a33 100644 --- a/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.48-0.9.49.php +++ b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.48-0.9.49.php @@ -31,8 +31,7 @@ $this->startSetup(); $installer->run(" - CREATE TABLE IF NOT EXISTS `{$installer->getTable('sales/refunded_aggregated')}` - ( + CREATE TABLE `{$installer->getTable('sales/refunded_aggregated')}` ( `id` int(11) unsigned NOT NULL auto_increment, `period` date NOT NULL DEFAULT '0000-00-00', `store_id` smallint(5) unsigned NULL DEFAULT NULL, @@ -42,14 +41,11 @@ `online_refunded` decimal(12,4) NOT NULL DEFAULT '0', `offline_refunded` decimal(12,4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), - UNIQUE KEY `UNQ_REFUNDED_AGGREGATED_CREATED_PSS` (`period`,`store_id`, `order_status`), - KEY `FK_REFUNDED_AGGREGATED_CREATED_STORE` (`store_id`), - CONSTRAINT `FK_REFUNDED_AGGREGATED_CREATED_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) - ON DELETE SET NULL ON UPDATE CASCADE + UNIQUE KEY `UNQ_PERIOD_STORE_ORDER_STATUS` (`period`,`store_id`, `order_status`), + KEY `IDX_STORE_ID` (`store_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - CREATE TABLE IF NOT EXISTS `{$installer->getTable('sales/refunded_aggregated_order')}` - ( + CREATE TABLE `{$installer->getTable('sales/refunded_aggregated_order')}` ( `id` int(11) unsigned NOT NULL auto_increment, `period` date NOT NULL DEFAULT '0000-00-00', `store_id` smallint(5) unsigned NULL DEFAULT NULL, @@ -59,12 +55,29 @@ `online_refunded` decimal(12,4) NOT NULL DEFAULT '0', `offline_refunded` decimal(12,4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), - UNIQUE KEY `UNQ_REFUNDED_AGGREGATED_UPDATED_PSS` (`period`,`store_id`, `order_status`), - KEY `FK_REFUNDED_AGGREGATED_UPDATED_STORE` (`store_id`), - CONSTRAINT `FK_REFUNDED_AGGREGATED_UPDATED_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) - ON DELETE SET NULL ON UPDATE CASCADE + UNIQUE KEY `UNQ_PERIOD_STORE_ORDER_STATUS` (`period`,`store_id`, `order_status`), + KEY `IDX_STORE_ID` (`store_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; "); + +$installer->getConnection()->addConstraint( + 'SALES_REFUNDED_AGGREGATED_STORE', + $installer->getTable('sales/refunded_aggregated'), + 'store_id', + $installer->getTable('core/store'), + 'store_id', + 'SET NULL' +); + +$installer->getConnection()->addConstraint( + 'SALES_REFUNDED_AGGREGATED_ORDER_STORE', + $installer->getTable('sales/refunded_aggregated_order'), + 'store_id', + $installer->getTable('core/store'), + 'store_id', + 'SET NULL' +); + $this->endSetup(); diff --git a/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.49-0.9.50.php b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.49-0.9.50.php index b4c54da2e9..d9c1b8f555 100644 --- a/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.49-0.9.50.php +++ b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.49-0.9.50.php @@ -44,11 +44,33 @@ `is_closed` tinyint(1) unsigned NOT NULL DEFAULT '1', `additional_information` blob, PRIMARY KEY (`transaction_id`), - UNIQUE KEY `UNQ_SALES_TXN_ORDER_PAYMENT_TXN` (`order_id`,`payment_id`,`txn_id`), - KEY `FK_SALES_TXN_PARENT` (`parent_id`), - KEY `FK_SALES_TXN_PAYMENT` (`payment_id`), - CONSTRAINT `FK_SALES_PAYMENT_TXN_PARENT` FOREIGN KEY (`parent_id`) REFERENCES `{$tablePaymentTransaction}` (`transaction_id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `FK_SALES_TXN_ORDER` FOREIGN KEY (`order_id`) REFERENCES `{$tableOrders}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `FK_SALES_TXN_PAYMENT` FOREIGN KEY (`payment_id`) REFERENCES `{$tableOrderPayment}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE + UNIQUE KEY `UNQ_ORDER_PAYMENT_TXN` (`order_id`,`payment_id`,`txn_id`), + KEY `IDX_ORDER_ID` (`order_id`), + KEY `IDX_PARENT_ID` (`parent_id`), + KEY `IDX_PAYMENT_ID` (`payment_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;" ); + +$installer->getConnection()->addConstraint( + 'SALES_PAYMENT_TRANSACTION_PARENT', + $tablePaymentTransaction, + 'parent_id', + $tablePaymentTransaction, + 'transaction_id' +); + +$installer->getConnection()->addConstraint( + 'SALES_PAYMENT_TRANSACTION_ORDER', + $tablePaymentTransaction, + 'order_id', + $tableOrders, + 'entity_id' +); + +$installer->getConnection()->addConstraint( + 'SALES_PAYMENT_TRANSACTION_PAYMENT', + $tablePaymentTransaction, + 'payment_id', + $tableOrderPayment, + 'entity_id' +); diff --git a/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.5-0.9.6.php b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.5-0.9.6.php index 5d378e814d..9c52eb1f78 100644 --- a/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.5-0.9.6.php +++ b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.5-0.9.6.php @@ -28,9 +28,15 @@ /* @var $installer Mage_Sales_Model_Mysql4_Setup */ $installer->run(" -ALTER TABLE `{$installer->getTable('sales_flat_quote_address_item')}` ADD COLUMN `parent_item_id` INTEGER UNSIGNED AFTER `address_item_id`, - ADD CONSTRAINT `FK_SALES_FLAT_QUOTE_ADDRESS_ITEM_PARENT` FOREIGN KEY `FK_SALES_FLAT_QUOTE_ADDRESS_ITEM_PARENT` (`parent_item_id`) - REFERENCES `{$installer->getTable('sales_flat_quote_address_item')}` (`address_item_id`) - ON DELETE CASCADE - ON UPDATE CASCADE; +ALTER TABLE `{$installer->getTable('sales_flat_quote_address_item')}` + ADD COLUMN `parent_item_id` INTEGER UNSIGNED AFTER `address_item_id`, + ADD KEY `IDX_PARENT_ITEM_ID` (`parent_item_id`); "); + +$installer->getConnection()->addConstraint( + 'SALES_FLAT_QUOTE_ADDRESS_ITEM_PARENT', + $installer->getTable('sales_flat_quote_address_item'), + 'parent_item_id', + $installer->getTable('sales_flat_quote_address_item'), + 'address_item_id' +); diff --git a/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.3-0.8.4.php b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.54-0.9.55.php similarity index 77% rename from app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.3-0.8.4.php rename to app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.54-0.9.55.php index a27426d3b0..e63b492a99 100644 --- a/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.3-0.8.4.php +++ b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.54-0.9.55.php @@ -19,18 +19,14 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Oscommerce + * @package Mage_Sales * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ $installer = $this; -/* @var $installer Mage_Core_Model_Resource_Setup */ +/* @var $installer Mage_Sales_Model_Mysql4_Setup */ -$installer->startSetup(); +$installer->addAttribute('order_payment', 'base_amount_paid_online', array('type' => 'decimal')); +$installer->addAttribute('order_payment', 'base_amount_refunded_online', array('type' => 'decimal')); -$installer->run(" - ALTER TABLE `{$this->getTable('oscommerce_orders')}` ADD orders_total decimal(14,6) default NULL; -"); - -$installer->endSetup(); diff --git a/app/code/core/Mage/Paybox/sql/paybox_setup/mysql4-upgrade-0.1.0-0.1.1.php b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.55-0.9.56.php similarity index 86% rename from app/code/core/Mage/Paybox/sql/paybox_setup/mysql4-upgrade-0.1.0-0.1.1.php rename to app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.55-0.9.56.php index afc0cfdc1d..012fad1af2 100644 --- a/app/code/core/Mage/Paybox/sql/paybox_setup/mysql4-upgrade-0.1.0-0.1.1.php +++ b/app/code/core/Mage/Sales/sql/sales_setup/mysql4-upgrade-0.9.55-0.9.56.php @@ -19,15 +19,14 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Paybox + * @package Mage_Sales * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ + $installer = $this; -/* @var $installer Mage_Sales_Model_Entity_Setup */ +/* @var $installer Mage_Sales_Model_Mysql4_Setup */ $installer->startSetup(); - -$installer->addAttribute('order_payment', 'paybox_request_number', array()); - +$installer->updateAttribute('order', 'customer_dob', 'backend_model', ''); $installer->endSetup(); diff --git a/app/code/core/Mage/SalesRule/Model/Mysql4/Rule.php b/app/code/core/Mage/SalesRule/Model/Mysql4/Rule.php index 90d2a6e2da..dccaaa0ebb 100644 --- a/app/code/core/Mage/SalesRule/Model/Mysql4/Rule.php +++ b/app/code/core/Mage/SalesRule/Model/Mysql4/Rule.php @@ -172,7 +172,7 @@ protected function _aggregateByOrderCreatedAt($from, $to) } $subQuery = $writeAdapter->select(); - $subQuery->from(array('so'=>'sales_order'), array('DISTINCT DATE(so.created_at)')) + $subQuery->from(array('so' => $this->getTable('sales/order')), array('DISTINCT DATE(so.created_at)')) ->where($where); $deleteCondition = 'DATE(period) IN (' . new Zend_Db_Expr($subQuery) . ')'; @@ -267,7 +267,7 @@ protected function _aggregateByOrderUpdatedAt($from, $to) } $subQuery = $writeAdapter->select(); - $subQuery->from(array('so'=>'sales_order'), array('DISTINCT DATE(so.created_at)')) + $subQuery->from(array('so' => $this->getTable('sales/order')), array('DISTINCT DATE(so.created_at)')) ->where($where); $deleteCondition = 'DATE(period) IN (' . new Zend_Db_Expr($subQuery) . ')'; diff --git a/app/code/core/Mage/SalesRule/Model/Rule/Condition/Address.php b/app/code/core/Mage/SalesRule/Model/Rule/Condition/Address.php index 93ae721900..a9a2fcd360 100644 --- a/app/code/core/Mage/SalesRule/Model/Rule/Condition/Address.php +++ b/app/code/core/Mage/SalesRule/Model/Rule/Condition/Address.php @@ -123,6 +123,11 @@ public function validate(Varien_Object $object) $address = $object->getQuote()->getShippingAddress(); } } + + if ('payment_method' == $this->getAttribute() && ! $address->hasPaymentMethod()) { + $address->setPaymentMethod($object->getQuote()->getPayment()->getMethod()); + } + return parent::validate($address); } } diff --git a/app/code/core/Mage/SalesRule/sql/salesrule_setup/mysql4-upgrade-0.7.10-0.7.11.php b/app/code/core/Mage/SalesRule/sql/salesrule_setup/mysql4-upgrade-0.7.10-0.7.11.php index 3d9fa5a6bb..b113415d93 100644 --- a/app/code/core/Mage/SalesRule/sql/salesrule_setup/mysql4-upgrade-0.7.10-0.7.11.php +++ b/app/code/core/Mage/SalesRule/sql/salesrule_setup/mysql4-upgrade-0.7.10-0.7.11.php @@ -62,8 +62,7 @@ } $installer->run(" - CREATE TABLE IF NOT EXISTS `{$installer->getTable('salesrule/coupon_aggregated')}` - ( + CREATE TABLE `{$installer->getTable('salesrule/coupon_aggregated')}` ( `id` int(11) unsigned NOT NULL auto_increment, `period` date NOT NULL DEFAULT '0000-00-00', `store_id` smallint(5) unsigned NULL DEFAULT NULL, @@ -75,13 +74,10 @@ `total_amount` decimal(12,4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `UNQ_COUPON_AGGREGATED_PSOC` (`period`,`store_id`, `order_status`, `coupon_code`), - KEY `FK_COUPON_AGGREGATED_STORE` (`store_id`), - CONSTRAINT `FK_COUPON_AGGREGATED_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) - ON DELETE SET NULL ON UPDATE CASCADE + KEY `IDX_STORE_ID` (`store_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; - CREATE TABLE IF NOT EXISTS `{$installer->getTable('salesrule/coupon_aggregated_order')}` - ( + CREATE TABLE `{$installer->getTable('salesrule/coupon_aggregated_order')}` ( `id` int(11) unsigned NOT NULL auto_increment, `period` date NOT NULL DEFAULT '0000-00-00', `store_id` smallint(5) unsigned NULL DEFAULT NULL, @@ -93,10 +89,24 @@ `total_amount` decimal(12,4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `UNQ_COUPON_AGGREGATED_ORDER_PSOC` (`period`,`store_id`, `order_status`,`coupon_code`), - KEY `FK_COUPON_AGGREGATED_ORDER_STORE` (`store_id`), - CONSTRAINT `FK_COUPON_AGGREGATED_ORDER_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) - ON DELETE SET NULL ON UPDATE CASCADE - ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + KEY `IDX_STORE_ID` (`store_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8; "); +$installer->getConnection()->addConstraint( + 'FK_SALESTRULE_COUPON_AGGREGATED_ORDER_STORE', + $this->getTable('salesrule/coupon_aggregated_order'), + 'store_id', + $this->getTable('core_store'), + 'store_id' +); + +$installer->getConnection()->addConstraint( + 'FK_SALESTRULE_COUPON_AGGREGATED_STORE', + $this->getTable('salesrule/coupon_aggregated'), + 'store_id', + $this->getTable('core_store'), + 'store_id' +); + $installer->endSetup(); diff --git a/app/code/core/Mage/Shipping/Helper/Data.php b/app/code/core/Mage/Shipping/Helper/Data.php index 0273b15268..580d3565a3 100644 --- a/app/code/core/Mage/Shipping/Helper/Data.php +++ b/app/code/core/Mage/Shipping/Helper/Data.php @@ -72,7 +72,8 @@ protected function _getTrackingUrl($key, $model, $method = 'getId') 'hash' => Mage::helper('core')->urlEncode("{$key}:{$model->$method()}:{$model->getProtectCode()}") ); } - return $this->_getUrl('shipping/tracking/popup', $param); + $storeModel = Mage::app()->getStore($model->getStoreId()); + return $storeModel->getUrl('shipping/tracking/popup', $param); } /** diff --git a/app/code/core/Mage/Shipping/Model/Mysql4/Carrier/Tablerate.php b/app/code/core/Mage/Shipping/Model/Mysql4/Carrier/Tablerate.php index a829a6e28c..079a06bb93 100644 --- a/app/code/core/Mage/Shipping/Model/Mysql4/Carrier/Tablerate.php +++ b/app/code/core/Mage/Shipping/Model/Mysql4/Carrier/Tablerate.php @@ -120,10 +120,18 @@ public function getRate(Mage_Shipping_Model_Rate_Request $request) return $row; } - + /** + * Upload table rate file and import data from it + * + * @param Varien_Object $object + * @return bool|Mage_Shipping_Model_Mysql4_Carrier_Tablerate + */ public function uploadAndImport(Varien_Object $object) { - $csvFile = $_FILES["groups"]["tmp_name"]["tablerate"]["fields"]["import"]["value"]; + if (!isset($_FILES['groups'])) { + return false; + } + $csvFile = $_FILES['groups']['tmp_name']['tablerate']['fields']['import']['value']; if (!empty($csvFile)) { @@ -261,6 +269,7 @@ public function uploadAndImport(Varien_Object $object) } } } + return $this; } protected function _getCsvValues($string, $separator=",") diff --git a/app/code/core/Mage/Shipping/Model/Shipping.php b/app/code/core/Mage/Shipping/Model/Shipping.php index 18a3ecc2d5..e783412843 100644 --- a/app/code/core/Mage/Shipping/Model/Shipping.php +++ b/app/code/core/Mage/Shipping/Model/Shipping.php @@ -157,6 +157,7 @@ public function collectRatesByAddress(Varien_Object $address, $limitCarrier=null $request->setDestRegionId($address->getRegionId()); $request->setDestPostcode($address->getPostcode()); $request->setPackageValue($address->getBaseSubtotal()); + $request->setPackageValueWithDiscount($address->getBaseSubtotalWithDiscount()); $request->setPackageWeight($address->getWeight()); $request->setFreeMethodWeight($address->getFreeMethodWeight()); $request->setPackageQty($address->getItemQty()); diff --git a/app/code/core/Mage/Shipping/etc/system.xml b/app/code/core/Mage/Shipping/etc/system.xml index 85e2ab4a85..5efef45542 100644 --- a/app/code/core/Mage/Shipping/etc/system.xml +++ b/app/code/core/Mage/Shipping/etc/system.xml @@ -211,6 +211,7 @@ 1 1 0 + 1 @@ -298,6 +299,7 @@ 1 1 0 + 1 @@ -429,6 +431,7 @@ 1 1 0 + 1 diff --git a/app/code/core/Mage/Sitemap/Model/Sitemap.php b/app/code/core/Mage/Sitemap/Model/Sitemap.php index b1702332c5..08344ddda0 100644 --- a/app/code/core/Mage/Sitemap/Model/Sitemap.php +++ b/app/code/core/Mage/Sitemap/Model/Sitemap.php @@ -64,7 +64,7 @@ protected function _beforeSave() * Check exists and writeable path */ if (!$io->fileExists($realPath, false)) { - Mage::throwException(Mage::helper('sitemap')->__('Please create the specified folder "%s" before saving the sitemap.', $this->getSitemapPath())); + Mage::throwException(Mage::helper('sitemap')->__('Please create the specified folder "%s" before saving the sitemap.', Mage::helper('core')->htmlEscape($this->getSitemapPath()))); } if (!$io->isWriteable($realPath)) { @@ -136,8 +136,8 @@ public function generateXml() /** * Generate categories sitemap */ - $changefreq = (string)Mage::getStoreConfig('sitemap/category/changefreq'); - $priority = (string)Mage::getStoreConfig('sitemap/category/priority'); + $changefreq = (string)Mage::getStoreConfig('sitemap/category/changefreq', $storeId); + $priority = (string)Mage::getStoreConfig('sitemap/category/priority', $storeId); $collection = Mage::getResourceModel('sitemap/catalog_category')->getCollection($storeId); foreach ($collection as $item) { $xml = sprintf('%s%s%s%.1f', @@ -153,8 +153,8 @@ public function generateXml() /** * Generate products sitemap */ - $changefreq = (string)Mage::getStoreConfig('sitemap/product/changefreq'); - $priority = (string)Mage::getStoreConfig('sitemap/product/priority'); + $changefreq = (string)Mage::getStoreConfig('sitemap/product/changefreq', $storeId); + $priority = (string)Mage::getStoreConfig('sitemap/product/priority', $storeId); $collection = Mage::getResourceModel('sitemap/catalog_product')->getCollection($storeId); foreach ($collection as $item) { $xml = sprintf('%s%s%s%.1f', @@ -170,8 +170,8 @@ public function generateXml() /** * Generate cms pages sitemap */ - $changefreq = (string)Mage::getStoreConfig('sitemap/page/changefreq'); - $priority = (string)Mage::getStoreConfig('sitemap/page/priority'); + $changefreq = (string)Mage::getStoreConfig('sitemap/page/changefreq', $storeId); + $priority = (string)Mage::getStoreConfig('sitemap/page/priority', $storeId); $collection = Mage::getResourceModel('sitemap/cms_page')->getCollection($storeId); foreach ($collection as $item) { $xml = sprintf('%s%s%s%.1f', diff --git a/app/code/core/Mage/Strikeiron/Helper/Data.php b/app/code/core/Mage/Strikeiron/Helper/Data.php deleted file mode 100644 index 13160b572c..0000000000 --- a/app/code/core/Mage/Strikeiron/Helper/Data.php +++ /dev/null @@ -1,38 +0,0 @@ - - */ -class Mage_Strikeiron_Model_Currency_Import_Strikeiron extends Mage_Directory_Model_Currency_Import_Abstract -{ - protected $_messages = array(); - - public function fetchRates() - { - $data = array(); - $currencies = $this->_getCurrencyCodes(); - $defaultCurrencies = $this->_getDefaultCurrencyCodes(); - try { - $strikeironModel = Mage::getModel('strikeiron/strikeiron'); - foreach ($defaultCurrencies as $currencyFrom) { - $currenciesToArr = array(); - if (!isset($data[$currencyFrom])) { - $data[$currencyFrom] = array(); - } - foreach ($currencies as $currencyTo) { - if ($currencyFrom == $currencyTo) { - $data[$currencyFrom][$currencyTo] = $this->_numberFormat(1); - } - else { - $currenciesToArr[] = $currencyTo; - } - } - if ($currenciesToArr) { - $result = $strikeironModel->fetchExchangeRate($currencyFrom , $currenciesToArr); - if ($result) { - $data = array_merge_recursive($result, $data); - $convertedCurrencies = array(); - foreach ($result[$currencyFrom] as $k => $r) { - $convertedCurrencies[] = $k; - } - $currenciesNotConverted = array_diff($currenciesToArr, $convertedCurrencies); - if ($currenciesNotConverted) { - foreach ($currenciesNotConverted as $_currencyNconvert) { - $this->_messages[] = Mage::helper('strikeiron')->__('%s is not supported currency.', $_currencyNconvert); - $data[$currencyFrom][$_currencyNconvert] = $this->_numberFormat(null); - } - } - } else { - $this->_messages[] = Mage::helper('strikeiron')->__('Cannot retreive rate from strikeirion.'); - } - } - ksort($data[$currencyFrom]); - } - } catch (Exception $e) { - $this->_messages[] = $e->getMessage(); - } - return $data; - } - - protected function _convert($currencyFrom, $currencyTo, $retry=0) - { - - try { - $strikeironModel = Mage::getModel('strikeiron/strikeiron'); - $result = $strikeironModel->fetchExchangeRate($currencyFrom , array($currencyTo)); - return $result; - } - catch (Exception $e) { - if( $retry == 0 ) { - $this->_convert($currencyFrom, $currencyTo, 1); - } else { - $this->_messages[] = Mage::helper('strikeiron')->__('Cannot retrieve rate from %s to %s', $currencyFrom, $currencyTo); - } - } - - } - - -} diff --git a/app/code/core/Mage/Strikeiron/Model/Mysql4/Taxrate.php b/app/code/core/Mage/Strikeiron/Model/Mysql4/Taxrate.php deleted file mode 100644 index 8678ff6af7..0000000000 --- a/app/code/core/Mage/Strikeiron/Model/Mysql4/Taxrate.php +++ /dev/null @@ -1,106 +0,0 @@ - - */ - -class Mage_Strikeiron_Model_Mysql4_Taxrate extends Mage_Core_Model_Mysql4_Abstract -{ - protected function _construct() - { - $this->_init('strikeiron/tax_rate', 'tax_rate_id'); - } - - /** - * Initialize unique fields - * - * @return Mage_Core_Model_Mysql4_Abstract - */ - protected function _initUniqueFields() - { - $this->_uniqueFields = array(array( - 'field' => array('tax_country_id', 'tax_region_id', 'tax_postcode'), - 'title' => Mage::helper('strikeiron')->__('Country/Region/Postal code combination'), - )); - return $this; - } - - protected function _checkUnique(Mage_Core_Model_Abstract $object) - { - $existent = array(); - $rateValueArray = array(); - if (!empty($this->_uniqueFields)) { - if (!is_array($this->_uniqueFields)) { - $this->_uniqueFields = array( - array( - 'field' => $this->_uniqueFields, - 'title' => $this->_uniqueFields - )); - } - - $data = new Varien_Object($this->_prepareDataForSave($object)); - $select = $this->_getWriteAdapter()->select() - ->from($this->getMainTable()); - - foreach ($this->_uniqueFields as $unique) { - $select->reset(Zend_Db_Select::WHERE); - - if (is_array($unique['field'])) { - foreach ($unique['field'] as $field) { - $select->where($field.'=?', $data->getData($field)); - $rateValueArray[] = $this->_getWriteAdapter()->quoteInto($field.'=?', $data->getData($field)); - } - } - else { - $select->where( $unique['field'] . ' = ?', $data->getData($unique['field']) ); - $rateValueArray[] = $this->_getWriteAdapter()->quoteInto( $unique['field'] . ' = ?', $data->getData($unique['field']) ); - } - - if ($object->getId()) { - $select->where($this->getIdFieldName().' != ?', $object->getId()); - } - - if ( $test = $this->_getWriteAdapter()->fetchRow($select) ) { - $existent[] = $test['tax_rate_id']; - } - } - } - if (!empty($existent)) { - $this->_getWriteAdapter()->delete($this->getMainTable(), $rateValueArray); - } - - } - - public function deleteAllRates() - { - $this->_getWriteAdapter()->delete($this->getMainTable()); - } -} diff --git a/app/code/core/Mage/Strikeiron/Model/Mysql4/Taxrate/Collection.php b/app/code/core/Mage/Strikeiron/Model/Mysql4/Taxrate/Collection.php deleted file mode 100644 index 1008a92a6c..0000000000 --- a/app/code/core/Mage/Strikeiron/Model/Mysql4/Taxrate/Collection.php +++ /dev/null @@ -1,51 +0,0 @@ - - */ - -class Mage_Strikeiron_Model_Mysql4_Taxrate_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract -{ - protected function _construct() - { - $this->_init('strikeiron/taxrate'); - } - - public function addRateFilter($rateId) - { - if (is_int($rateId) && $rateId > 0) { - return $this->_select->where('main_table.tax_rate_id=?', $rateId); - } - else { - return $this; - } - } -} diff --git a/app/code/core/Mage/Strikeiron/Model/Service/AddressVerification.php b/app/code/core/Mage/Strikeiron/Model/Service/AddressVerification.php deleted file mode 100644 index a0d537ee02..0000000000 --- a/app/code/core/Mage/Strikeiron/Model/Service/AddressVerification.php +++ /dev/null @@ -1,49 +0,0 @@ - - */ -class Mage_Strikeiron_Model_Service_AddressVerification extends Mage_Strikeiron_Model_Service_Base -{ - const ADDRESS_ERROR_ACCEPT = 'Accept'; - const ADDRESS_ERROR_REJECT = 'Reject'; - const ADDRESS_ERROR_CONFIRM = 'Confirm'; - - /** - * Configuration options - * @param array - */ - protected $_options = array('username' => null, - 'password' => null, - 'client' => null, - 'options' => null, - 'headers' => null, - 'wsdl' => 'aHR0cDovL3dzLnN0cmlrZWlyb24uY29tL3Zhcmllbi5TdHJpa2VJcm9uL1VTQWRkcmVzc1ZlcmlmaWNhdGlvbjRfMD9XU0RM'); -} diff --git a/app/code/core/Mage/Strikeiron/Model/Service/Base.php b/app/code/core/Mage/Strikeiron/Model/Service/Base.php deleted file mode 100644 index 208ca33b7d..0000000000 --- a/app/code/core/Mage/Strikeiron/Model/Service/Base.php +++ /dev/null @@ -1,61 +0,0 @@ - - */ -require_once 'Zend/Service/StrikeIron/Base.php'; - -class Mage_Strikeiron_Model_Service_Base extends Zend_Service_StrikeIron_Base -{ - public function __construct($options = array()) - { - $this->_options['wsdl'] = $this->_wsdlDecode(); - parent::__construct($options); - } - - public function _wsdlDecode() - { - return base64_decode($this->_options['wsdl']); - } - - public function getOptionData($key) - { - if( isset($this->_options[$key]) ){ - return $this->_options[$key]; - } else { - return null; - } - } - - public function getOptions() - { - return $this->_options; - } -} diff --git a/app/code/core/Mage/Strikeiron/Model/Service/EmailVerification.php b/app/code/core/Mage/Strikeiron/Model/Service/EmailVerification.php deleted file mode 100644 index c68c4037de..0000000000 --- a/app/code/core/Mage/Strikeiron/Model/Service/EmailVerification.php +++ /dev/null @@ -1,48 +0,0 @@ - - */ -class Mage_Strikeiron_Model_Service_EmailVerification extends Mage_Strikeiron_Model_Service_Base -{ - const EMAIL_UNDETERMINED_ACCEPT = 'Accept'; - const EMAIL_UNDETERMINED_REJECT = 'Reject'; - const EMAIL_UNDETERMINED_CONFIRM = 'Confirm'; - /** - * Configuration options - * @param array - */ - protected $_options = array('username' => null, - 'password' => null, - 'client' => null, - 'options' => null, - 'headers' => null, - 'wsdl' => 'aHR0cDovL3dzLnN0cmlrZWlyb24uY29tL3Zhcmllbi5TdHJpa2VJcm9uL2VtYWlsdmVyaWZ5XzNfMD9XU0RM'); -} diff --git a/app/code/core/Mage/Strikeiron/Model/Service/ForeignExchangeRates.php b/app/code/core/Mage/Strikeiron/Model/Service/ForeignExchangeRates.php deleted file mode 100644 index d3ab07e661..0000000000 --- a/app/code/core/Mage/Strikeiron/Model/Service/ForeignExchangeRates.php +++ /dev/null @@ -1,45 +0,0 @@ - - */ -class Mage_Strikeiron_Model_Service_ForeignExchangeRates extends Mage_Strikeiron_Model_Service_Base -{ - /** - * Configuration options - * @param array - */ - protected $_options = array('username' => null, - 'password' => null, - 'client' => null, - 'options' => null, - 'headers' => null, - 'wsdl' => 'aHR0cDovL3dzLnN0cmlrZWlyb24uY29tL3Zhcmllbi5TdHJpa2VJcm9uL0ZvcmVpZ25FeGNoYW5nZVJhdGU/V1NETA=='); -} diff --git a/app/code/core/Mage/Strikeiron/Model/Service/SalesUseTax.php b/app/code/core/Mage/Strikeiron/Model/Service/SalesUseTax.php deleted file mode 100644 index c63dd3ef21..0000000000 --- a/app/code/core/Mage/Strikeiron/Model/Service/SalesUseTax.php +++ /dev/null @@ -1,40 +0,0 @@ - - */ -class Mage_Strikeiron_Model_Service_SalesUseTax extends Mage_Strikeiron_Model_Service_Base -{ - const SALETAX_TYPE_BASIC = 'B'; - const SALETAX_TYPE_COMPLETE = 'C'; - - const SALETAX_COMPLETE_MIN = 'MIN'; - const SALETAX_COMPLETE_MAX = 'MAX'; -} diff --git a/app/code/core/Mage/Strikeiron/Model/Service/SalesUseTaxBasic.php b/app/code/core/Mage/Strikeiron/Model/Service/SalesUseTaxBasic.php deleted file mode 100644 index 8d3a77ac5a..0000000000 --- a/app/code/core/Mage/Strikeiron/Model/Service/SalesUseTaxBasic.php +++ /dev/null @@ -1,45 +0,0 @@ - - */ -class Mage_Strikeiron_Model_Service_SalesUseTaxBasic extends Mage_Strikeiron_Model_Service_SalesUseTax -{ - /** - * Configuration options - * @param array - */ - protected $_options = array('username' => null, - 'password' => null, - 'client' => null, - 'options' => null, - 'headers' => null, - 'wsdl' => 'aHR0cDovL3dzLnN0cmlrZWlyb24uY29tL3Zhcmllbi5TdHJpa2VJcm9uL1RheERhdGFCYXNpYzQ/V1NETA=='); -} diff --git a/app/code/core/Mage/Strikeiron/Model/Service/SalesUseTaxComplete.php b/app/code/core/Mage/Strikeiron/Model/Service/SalesUseTaxComplete.php deleted file mode 100644 index 65f0cae23d..0000000000 --- a/app/code/core/Mage/Strikeiron/Model/Service/SalesUseTaxComplete.php +++ /dev/null @@ -1,45 +0,0 @@ - - */ -class Mage_Strikeiron_Model_Service_SalesUseTaxComplete extends Mage_Strikeiron_Model_Service_SalesUseTax -{ - /** - * Configuration options - * @param array - */ - protected $_options = array('username' => null, - 'password' => null, - 'client' => null, - 'options' => null, - 'headers' => null, - 'wsdl' => 'aHR0cDovL3dzLnN0cmlrZWlyb24uY29tL3Zhcmllbi5TdHJpa2VJcm9uL1RheERhdGFDb21wbGV0ZTQ/V1NETA=='); -} diff --git a/app/code/core/Mage/Strikeiron/Model/Service/UsAddressVerification.php b/app/code/core/Mage/Strikeiron/Model/Service/UsAddressVerification.php deleted file mode 100644 index d11a42da8d..0000000000 --- a/app/code/core/Mage/Strikeiron/Model/Service/UsAddressVerification.php +++ /dev/null @@ -1,45 +0,0 @@ - - */ -class Mage_Strikeiron_Model_Service_UsAddressVerification extends Mage_Strikeiron_Model_Service_AddressVerification -{ - /** - * Configuration options - * @param array - */ - protected $_options = array('username' => null, - 'password' => null, - 'client' => null, - 'options' => null, - 'headers' => null, - 'wsdl' => 'aHR0cDovL3dzLnN0cmlrZWlyb24uY29tL3Zhcmllbi5TdHJpa2VJcm9uL1VTQWRkcmVzc1ZlcmlmaWNhdGlvbjRfMD9XU0RM'); -} diff --git a/app/code/core/Mage/Strikeiron/Model/Session.php b/app/code/core/Mage/Strikeiron/Model/Session.php deleted file mode 100644 index 1be8b7dd83..0000000000 --- a/app/code/core/Mage/Strikeiron/Model/Session.php +++ /dev/null @@ -1,39 +0,0 @@ - - */ -class Mage_Strikeiron_Model_Session extends Mage_Core_Model_Session_Abstract -{ - public function __construct() - { - $this->init('strikeiron'); - } -} diff --git a/app/code/core/Mage/Strikeiron/Model/Source/ErrorAddressAction.php b/app/code/core/Mage/Strikeiron/Model/Source/ErrorAddressAction.php deleted file mode 100644 index 9913ac6c72..0000000000 --- a/app/code/core/Mage/Strikeiron/Model/Source/ErrorAddressAction.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ -class Mage_Strikeiron_Model_Source_ErrorAddressAction -{ - public function toOptionArray() - { - return array( - array('value' => Mage_Strikeiron_Model_Service_AddressVerification::ADDRESS_ERROR_ACCEPT, 'label' => Mage::helper('strikeiron')->__('Accept')), - array('value' => Mage_Strikeiron_Model_Service_AddressVerification::ADDRESS_ERROR_REJECT, 'label' => Mage::helper('strikeiron')->__('Reject')), - array('value' => Mage_Strikeiron_Model_Service_AddressVerification::ADDRESS_ERROR_CONFIRM, 'label' => Mage::helper('strikeiron')->__('Pop up warning and accept')), - ); - } -} diff --git a/app/code/core/Mage/Strikeiron/Model/Source/SalesTaxType.php b/app/code/core/Mage/Strikeiron/Model/Source/SalesTaxType.php deleted file mode 100644 index 9195e9f9f5..0000000000 --- a/app/code/core/Mage/Strikeiron/Model/Source/SalesTaxType.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ -class Mage_Strikeiron_Model_Source_SalesTaxType -{ - public function toOptionArray() - { - return array( - array('value' => Mage_Strikeiron_Model_Service_SalesUseTax::SALETAX_TYPE_BASIC, 'label' => Mage::helper('strikeiron')->__('Basic')), - array('value' => Mage_Strikeiron_Model_Service_SalesUseTax::SALETAX_TYPE_COMPLETE, 'label' => Mage::helper('strikeiron')->__('Complete')), - - ); - } -} diff --git a/app/code/core/Mage/Strikeiron/Model/Source/Salestaxminmax.php b/app/code/core/Mage/Strikeiron/Model/Source/Salestaxminmax.php deleted file mode 100644 index ebdf9095d0..0000000000 --- a/app/code/core/Mage/Strikeiron/Model/Source/Salestaxminmax.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ -class Mage_Strikeiron_Model_Source_Salestaxminmax -{ - public function toOptionArray() - { - return array( - array('value' => Mage_Strikeiron_Model_Service_SalesUseTax::SALETAX_COMPLETE_MIN, 'label' => Mage::helper('strikeiron')->__('Minimum tax rate')), - array('value' => Mage_Strikeiron_Model_Service_SalesUseTax::SALETAX_COMPLETE_MAX , 'label' => Mage::helper('strikeiron')->__('Maximum tax rate')), - - ); - } -} diff --git a/app/code/core/Mage/Strikeiron/Model/Source/UndeterminedEmailAction.php b/app/code/core/Mage/Strikeiron/Model/Source/UndeterminedEmailAction.php deleted file mode 100644 index 411902ed95..0000000000 --- a/app/code/core/Mage/Strikeiron/Model/Source/UndeterminedEmailAction.php +++ /dev/null @@ -1,42 +0,0 @@ - - */ -class Mage_Strikeiron_Model_Source_UndeterminedEmailAction -{ - public function toOptionArray() - { - return array( - array('value' => Mage_Strikeiron_Model_Service_EmailVerification::EMAIL_UNDETERMINED_ACCEPT, 'label' => Mage::helper('strikeiron')->__('Accept')), - array('value' => Mage_Strikeiron_Model_Service_EmailVerification::EMAIL_UNDETERMINED_REJECT, 'label' => Mage::helper('strikeiron')->__('Reject')), - array('value' => Mage_Strikeiron_Model_Service_EmailVerification::EMAIL_UNDETERMINED_CONFIRM, 'label' => Mage::helper('strikeiron')->__('Pop up warning and accept')), - ); - } -} diff --git a/app/code/core/Mage/Strikeiron/Model/Strikeiron.php b/app/code/core/Mage/Strikeiron/Model/Strikeiron.php deleted file mode 100644 index 3778bbdf0e..0000000000 --- a/app/code/core/Mage/Strikeiron/Model/Strikeiron.php +++ /dev/null @@ -1,391 +0,0 @@ - - */ -class Mage_Strikeiron_Model_Strikeiron extends Mage_Core_Model_Abstract -{ - public function getApi($service, $options = array()) - { - return Mage::getSingleton('strikeiron/service_'.$service, array_merge($this->getConfiguration(),$options)); - } - - protected function getConfiguration() - { - return array('username'=> $this->getConfigData('config', 'user') , 'password'=> $this->getConfigData('config', 'password')); - } - - public function getConfigData($code, $field) - { - $path = 'strikeiron/'.$code.'/'.$field; - return Mage::getStoreConfig($path); - } - -/*********************** EMAIL VERIFICATION***************************/ - /* - verify email address is valid or not - wsdl = http://ws.strikeiron.com/varien.StrikeIron/emailverify_3_0?WSDL - */ - public function emailVerify($email) - { - if ($email && $this->getConfigData('email_verification', 'active')) { - $_session = Mage::getSingleton('strikeiron/session'); - /* - * following flag will set if the email is undetermined for the first time - * for second time, we just need to return true - */ - if ($_session->getStrikeironUndertermined()==$email) { - $_session->unsStrikeironUndertermined(); - return true; - } - - $emailApi = $this->getApi('emailVerification'); - - $checkAllServer = $this->getConfigData('email_verification', 'check_allservers'); - $emailArr = array( - 'email' => $email, - 'checkAllServers' => ($checkAllServer ? 'True' : 'False') - ); - $result = ''; - - try { - $subscriptionInfo = $emailApi->getSubscriptionInfo(); - if ($subscriptionInfo && $subscriptionInfo->remainingHits>0) { - $result = $emailApi->validateEmail($emailArr); - if ($result) { - switch ($result->IsValid) { - case 'INVALID': - Mage::throwException(Mage::helper('strikeiron')->__('Invalid email address')); - break; - case 'UNDETERMINED': - switch($this->getConfigData('email_verification', 'undetermined_action')) { - case Mage_Strikeiron_Model_Service_EmailVerification::EMAIL_UNDETERMINED_REJECT: - Mage::throwException(Mage::helper('strikeiron')->__('Invalid email address')); - break; - case Mage_Strikeiron_Model_Service_EmailVerification::EMAIL_UNDETERMINED_CONFIRM: - $_session->setStrikeironUndertermined($email); - Mage::throwException(Mage::helper('strikeiron')->__('Email address cannot be verified. Please check again and make sure your email address entered correctly.')); - break; - } - break; - } - } else { - Mage::throwException(Mage::helper('strikeiron')->__('There is an error in verifying an email. Please contact us.')); - } - - } else { - /* - * when there is no more remaining hits for service - * we will send email to email recipient for exception - */ - /* @var $mailTemplate Mage_Core_Model_Email_Template */ - $receipient = $this->getConfigData('email_verification', 'error_email'); - if ($receipient) { - $translate = Mage::getSingleton('core/translate'); - /* @var $translate Mage_Core_Model_Translate */ - $translate->setTranslateInline(false); - - $mailTemplate = Mage::getModel('core/email_template'); - $mailTemplate->setDesignConfig( - array( - 'area' => 'frontend', - ) - ) - ->sendTransactional( - $this->getConfigData('email_verification', 'error_email_template'), - $this->getConfigData('email_verification', 'error_email_identity'), - $receipient, - null, - array( - 'email' => $email, - 'warnings' => $e->getMessage(), - ) - ); - - $translate->setTranslateInline(true); - } - - } - } catch (Zend_Service_StrikeIron_Exception $e) { - Mage::throwException(Mage::helper('strikeiron')->__('There is an error in verifying an email. Please contact us.')); - } - } - return true; - } - -/*********************** FOREIGN CURRENCY EXCHANGE***************************/ - - public function _getAllSupportedCurrencies($exchangeApi) - { - $result = $exchangeApi->GetSupportedCurrencies(); - $data = array(); - if ($result && $result->ServiceStatus && $result->ServiceStatus->StatusNbr == 210) { - $listings = $result->ServiceResult->Listings; - if ($listings && $listings->CurrencyListing) { - foreach($listings->CurrencyListing as $listing){ - $data[] = $listing->Symbol; - } - } - } - return $data; - } - - /* - retrieving foreign exchange rate for the currency - wsdl = http://ws.strikeiron.com/varien.StrikeIron/ForeignExchangeRate?WSDL - */ - public function fetchExchangeRate ($defaultCurrency, $currencies=array()) - { - if(!$this->getConfigData('currency', 'foreigh_xrate')){ - Mage::throwException(Mage::helper('strikeiron')->__('Strikeiron foreign exchange rate is disabled')); - } - - $data = array(); - $exchangeApi = $this->getApi('foreignExchangeRates'); - $result = ''; - try { - $subscriptionInfo = $exchangeApi->getSubscriptionInfo(); - if ($subscriptionInfo && $subscriptionInfo->remainingHits>0) { - $supportedCurrencies = $this->_getAllSupportedCurrencies($exchangeApi); - if($supportedCurrencies) { - $availableCurrencies = array_intersect($currencies, $supportedCurrencies); - if($availableCurrencies && in_array($defaultCurrency,$supportedCurrencies)){ - $currenciesStr = implode(', ' , $availableCurrencies); - $reqArr = array( - 'CommaSeparatedListOfCurrenciesFrom' => $currenciesStr, - 'SingleCurrencyTo' => $defaultCurrency - ); - $result = $exchangeApi->GetLatestRates($reqArr); - if ($result) { - /* - 212 = Currency rate data Found - */ - if ($result->ServiceStatus && $result->ServiceStatus->StatusNbr == 212) { - $listings = $result->ServiceResult->Listings; - if($listings && $listings->ExchangeRateListing) { - foreach ($listings->ExchangeRateListing as $listing) { - $data[$listing->PerCurrency][$listing->Currency] = $listing->Value; - } - } - } else { - Mage::throwException($result->ServiceStatus->StatusDescription); - } - } else { - Mage::throwException(Mage::helper('strikeiron')->__('There is no response back from Strikeiron server')); - } - } - } - } else { - Mage::throwException(Mage::helper('strikeiron')->__('There is no more hits remaining for the foreign Exchange Rate Service.')); - } - } catch (Zend_Service_StrikeIron_Exception $e) { - Mage::throwException(Mage::helper('strikeiron')->__('There is no response back from Strikeiron server')); - } - return $data; - } - - public function customerSaveBeforeObserver($observer) - { - $customer = $observer->getEvent()->getCustomer(); - $isAdmin = Mage::getDesign()->getArea()==='adminhtml'; - $email = $customer->getEmail(); - $host = Mage::app()->getStore()->getConfig(Mage_Customer_Model_Customer::XML_PATH_DEFAULT_EMAIL_DOMAIN); - $fakeEmail = $customer->getIncrementId().'@'. $host; - if ($email && $email != $fakeEmail && $customer->dataHasChangedFor('email') && - (!$isAdmin || ($isAdmin && $this->getConfigData('email_verification', 'check_admin'))) - ) { - $this->emailVerify($email); - } - } - -/*********************** ADDRESS VERIFICATION***************************/ - - public function addressSaveBeforeObserver($observer) - { - $address = $observer->getEvent()->getCustomerAddress(); - $us = $address->getCountryId() == 'US'; - $addressDataChange = sizeof($address) == 1 && ( $address->dataHasChangedFor('street') || $address->dataHasChangedFor('city') || - $address->dataHasChangedFor('postcode') || $address->dataHasChangedFor('country_id') || $address->dataHasChangedFor('region_id') || - $address->dataHasChangedFor('region')) - ; - if ($addressDataChange) { - if ($us) { - $this->UsAddressVerify($address); - } - } - - } - - /* - verify US address is valid or not - wsdl = http://ws.strikeiron.com/varien.StrikeIron/USAddressVerification4_0?WSDL - $subscription = $taxBasic->getSubscriptionInfo(); - echo $subscription->remainingHits; - - */ - public function UsAddressVerify($address) - { -//echo "
    ";
    -//print_r($address);
    -return;
    -$_session = Mage::getSingleton('strikeiron/session');
    -        $usAddressApi = $this->getApi('usAddressVerification');
    -        $cityStateZip = $address->getCity()." ".$address->getRegionCode()." ".$address->getPostcode();
    -        $reqArr = array(
    -                    'firm' => $address->getCompany(),
    -                    'addressLine1' => $address->getStreet(1),
    -                    'addressLine2' => $address->getStreet(2),
    -                    'city_state_zip' => $cityStateZip )
    -        ;
    -        $result = '';
    -        try {
    -            $subscriptionInfo = $usAddressApi->getSubscriptionInfo();
    -            if ($subscriptionInfo && $subscriptionInfo->remainingHits>0) {
    -                $result = $usAddressApi->verifyAddressUSA($reqArr);
    -//$result = $_session->getUsAddressVerify();
    -//$_session->setUsAddressVerify($result);
    -//print_r($reqArr);
    -//print_r($result);
    -            } else {
    -
    -            }
    -
    -        } catch (Zend_Service_StrikeIron_Exception $e) {
    -               Mage::throwException(Mage::helper('strikeiron')->__('There is no response back from Strikeiron server'));
    -        }
    -        return true;
    -    }
    -
    -/*********************** SALES AND TAX RATE***************************/
    -    /*
    -    retrieveing the sale tax rate by zip code for US and by province by canada
    -    wsdl = http://ws.strikeiron.com/varien.StrikeIron/TaxDataBasic4?WSDL
    -    wsdl = http://ws.strikeiron.com/varien.StrikeIron/TaxDataComplete4?WSDL
    -    this method is called by event handler
    -    event is added in Mage_Tax_Model_Rate_Data
    -    */
    -    public function getTaxRate($observer)
    -    {
    -        $data = $observer->getEvent()->getRequest();
    -//        $data = new Varien_Object();
    -//        $data->setProductClassId(2)
    -//             ->setCustomerClassId(3)
    -//             ->setCountryId('CN')
    -//             ->setRegionId('74')
    -//             ->setPostcode('95618');
    -
    -        $tax_rate = 0;
    -        $customerTaxClass = array();
    -        $customerTaxClass = explode(',' ,$this->getConfigData('sales_tax', 'customer_tax_class'));
    -        $productTaxClass = array();
    -        $productTaxClass = explode(',' , $this->getConfigData('sales_tax', 'product_tax_class'));
    -        if ($this->getConfigData('sales_tax', 'active')
    -            && in_array($data->getCustomerClassId(), $customerTaxClass)
    -            && in_array($data->getProductClassId(), $productTaxClass)
    -            && ($data->getCountryId()=='US' || $data->getCountryId()=='CN')
    -            ) {
    -            $type = $this->getConfigData('sales_tax', 'type');
    -            $isBasic = false;
    -            if($type == 'B') {
    -                $isBasic = true;
    -            }
    -
    -            $saleTaxApi = $this->getApi('salesUseTax'.($isBasic ? 'Basic' : 'Complete'));
    -            try {
    -                $subscriptionInfo = $saleTaxApi->getSubscriptionInfo();
    -                if ($subscriptionInfo && $subscriptionInfo->remainingHits>0) {
    -                    if ($data->getCountryId()=='US') {
    -                        if ($isBasic) {
    -                            $requestArr = array('zip_code' => $data->getPostcode());
    -                            $result = $saleTaxApi->GetTaxRateUS($requestArr);
    -                            if ($result) {
    -                                $tax_rate = $result->total_sales_tax;
    -                            }
    -                        } else {
    -                            $requestArr = array('zipCode' => $data->getPostcode());
    -
    -                            $result = $saleTaxApi->GetUSATaxRatesByZipCode($requestArr);
    -                            if ($result && $result->USATaxRate) {
    -                                $tax_rate = $this->parseTaxRateComplete($result);
    -                            }
    -                        }
    -                    } else {
    -                        $region_code = Mage::getSingleton('directory/region')->load($data->getRegionId())->getCode();
    -                        $requestArr = array('province' => $region_code);
    -                        if ($isBasic) {
    -                            $result = $saleTaxApi->GetTaxRateCanada($requestArr);
    -                            if ($result) {
    -                                $tax_rate = $result->total;
    -                            }
    -                        } else {
    -                            $result = $saleTaxApi->GetCanadaTaxRatesByProvince($requestArr);
    -                            if ($result && $result->CanadaTaxRate) {
    -                                $tax_rate = $result->CanadaTaxRate->Total;
    -                            }
    -                        }
    -                    }
    -                }
    -            } catch (Zend_Service_StrikeIron_Exception $e) {
    -                //we won't throw exception
    -                //since the method is calling via event handler
    -               //Mage::throwException(Mage::helper('strikeiron')->__('There is an error in retrieving tax rate. Please contact us'));
    -            }
    -        }
    -
    -        if ($tax_rate>0) {
    -            $tax_rate = $tax_rate * 100;
    -            $dbObj = Mage::getSingleton('strikeiron/taxrate')
    -                ->setTaxCountryId($data->getCountryId())
    -                ->setTaxRegionId($data->getRegionId())
    -                ->setTaxPostcode($data->getPostcode())
    -                ->setRateValue($tax_rate)
    -                ->save();
    -            $data->setRateValue($tax_rate);
    -            $data->setRateTitle(Mage::helper('strikeiron')->__('Tax'));
    -            $data->setRateId('strikeiron_tax');
    -        }
    -        return $this;
    -
    -    }
    -
    -    protected function parseTaxRateComplete($result)
    -    {
    -        $tax_array = array();
    -        foreach ($result->USATaxRate as $rate) {
    -            if($rate->TotalSalesTax>0) {
    -                $tax_array[] = $rate->TotalSalesTax;
    -            }
    -        }
    -        $minMax = strtolower($this->getConfigData('sales_tax', 'min_max'));
    -        return $minMax($tax_array);
    -    }
    -}
    diff --git a/app/code/core/Mage/Strikeiron/Model/Taxrate.php b/app/code/core/Mage/Strikeiron/Model/Taxrate.php
    deleted file mode 100644
    index 0256f61ec7..0000000000
    --- a/app/code/core/Mage/Strikeiron/Model/Taxrate.php
    +++ /dev/null
    @@ -1,37 +0,0 @@
    -
    - */
    -class Mage_Strikeiron_Model_Taxrate extends Mage_Core_Model_Abstract
    -{
    -    protected function _construct()
    -    {
    -        $this->_init('strikeiron/taxrate');
    -    }
    -}
    diff --git a/app/code/core/Mage/Strikeiron/controllers/TestController.php b/app/code/core/Mage/Strikeiron/controllers/TestController.php
    deleted file mode 100644
    index 468b36fd66..0000000000
    --- a/app/code/core/Mage/Strikeiron/controllers/TestController.php
    +++ /dev/null
    @@ -1,42 +0,0 @@
    -
    - */
    -
    -class Mage_Strikeiron_TestController extends Mage_Core_Controller_Front_Action
    -{
    -    public function indexAction()
    -    {
    -        $model = Mage::getModel('strikeiron/strikeiron');
    -        $model->getTaxRate();
    -    }
    -}
    diff --git a/app/code/core/Mage/Strikeiron/etc/adminhtml.xml b/app/code/core/Mage/Strikeiron/etc/adminhtml.xml
    deleted file mode 100644
    index 0fad7a3eae..0000000000
    --- a/app/code/core/Mage/Strikeiron/etc/adminhtml.xml
    +++ /dev/null
    @@ -1,49 +0,0 @@
    -
    -
    -
    -    
    -        
    -            
    -                
    -                    
    -                        
    -                            
    -                                
    -                                    
    -                                        Strikeiron Section
    -                                        75
    -                                    
    -                                
    -                            
    -                        
    -                    
    -                
    -            
    -        
    -    
    -
    diff --git a/app/code/core/Mage/Strikeiron/etc/config.xml b/app/code/core/Mage/Strikeiron/etc/config.xml
    deleted file mode 100644
    index 7a3c6fadc0..0000000000
    --- a/app/code/core/Mage/Strikeiron/etc/config.xml
    +++ /dev/null
    @@ -1,140 +0,0 @@
    -
    -
    -
    -    
    -        
    -            0.9.1
    -        
    -    
    -    
    -        
    -            
    -                
    -                    
    -                        StrikeIron
    -                        strikeiron/currency_import_strikeiron
    -                    
    -                
    -            
    -        
    -        
    -            
    -                Mage_Strikeiron_Model
    -                strikeiron_mysql4
    -            
    -             
    -                Mage_Strikeiron_Model_Mysql4
    -                
    -                    
    -                        strikeiron_tax_rate
    -
    -
    -
    -
    - - - - Mage_Strikeiron - - - - - - - - strikeiron/strikeiron - customerSaveBeforeObserver - - - - - - - strikeiron/strikeiron - addressSaveBeforeObserver - - - - - - - strikeiron/strikeiron - getTaxRate - - - - - -
    - - - - - - - - accept - strikeiron_customer_error_email_template - - - B - MAX - - - - - - - - - Mage_Strikeiron.csv - - - - - - - - - standard - - Mage_Strikeiron - strikeiron - - - - -
    diff --git a/app/code/core/Mage/Strikeiron/etc/system.xml b/app/code/core/Mage/Strikeiron/etc/system.xml deleted file mode 100644 index 891cc70b65..0000000000 --- a/app/code/core/Mage/Strikeiron/etc/system.xml +++ /dev/null @@ -1,291 +0,0 @@ - - - - - - - service - text - 100 - 1 - 1 - 1 - - - - text - 1 - 1 - 1 - 1 - - - - obscure - adminhtml/system_config_backend_encrypted - 1 - 1 - 1 - 1 - - - - obscure - adminhtml/system_config_backend_encrypted - 2 - 1 - 1 - 0 - - - - - - text - 2 - 1 - 1 - 1 - - - - select - adminhtml/system_config_source_enabledisable - 1 - 1 - 1 - 1 - - - - select - adminhtml/system_config_source_yesno - 2 - 1 - 1 - 1 - - - - select - adminhtml/system_config_source_yesno - 3 - 1 - 1 - 1 - - - - select - strikeiron/source_undeterminedEmailAction - 4 - 1 - 1 - 1 - - - - text - 5 - 1 - 1 - 1 - - - - select - adminhtml/system_config_source_email_identity - 6 - 1 - 1 - 0 - - - - select - adminhtml/system_config_source_email_template - 7 - 1 - 1 - 0 - - - - - - text - 3 - 1 - 1 - 1 - - - - select - adminhtml/system_config_source_enabledisable - 10 - 1 - 1 - 1 - - - - - - text - 4 - 1 - 1 - 1 - - - - select - adminhtml/system_config_source_enabledisable - 1 - 1 - 1 - 1 - - - - select - adminhtml/system_config_source_yesno - 2 - 1 - 1 - 1 - - - - select - strikeiron/source_errorAddressAction - 4 - 1 - 1 - 1 - - - - - - text - 5 - 1 - 1 - 1 - - - - select - adminhtml/system_config_source_enabledisable - 1 - 1 - 1 - 1 - - - - select - adminhtml/system_config_source_yesno - 2 - 1 - 1 - 1 - - - - select - strikeiron/source_errorAddressAction - 4 - 1 - 1 - 1 - - - - - - text - 6 - 1 - 1 - 1 - - - - select - adminhtml/system_config_source_enabledisable - 1 - 1 - 1 - 1 - - - - select - strikeiron/source_salesTaxType - 3 - 1 - 1 - 1 - - - - If type is complete and zip code belongs to multiple tax rates, choose to charge minimum tax rate or maximum tax rate. - select - strikeiron/source_salestaxminmax - 4 - 1 - 1 - 1 - - - - multiselect - tax/class_source_customer - 5 - 1 - 1 - 1 - - - - multiselect - tax/class_source_product - 6 - 1 - 1 - 1 - - - - - - - diff --git a/app/code/core/Mage/Strikeiron/sql/strikeiron_setup/mysql4-install-0.9.1.php b/app/code/core/Mage/Strikeiron/sql/strikeiron_setup/mysql4-install-0.9.1.php deleted file mode 100644 index 4c259523c8..0000000000 --- a/app/code/core/Mage/Strikeiron/sql/strikeiron_setup/mysql4-install-0.9.1.php +++ /dev/null @@ -1,48 +0,0 @@ -startSetup(); - -$installer->run(" -/*Table structure for table `strikeiron_tax_rate` */ - -DROP TABLE IF EXISTS {$this->getTable('strikeiron_tax_rate')}; - -CREATE TABLE {$this->getTable('strikeiron_tax_rate')} ( - `tax_rate_id` tinyint(4) NOT NULL auto_increment, - `tax_country_id` varchar(6) default NULL, - `tax_region_id` mediumint(9) unsigned default NULL, - `tax_postcode` varchar(12) default NULL, - `rate_value` decimal(12,4) NOT NULL default '0.0000', - PRIMARY KEY (`tax_rate_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Strikeiron tax rates'; - - "); - -$installer->endSetup(); diff --git a/app/code/core/Mage/Tag/controllers/IndexController.php b/app/code/core/Mage/Tag/controllers/IndexController.php index 364d624c30..e13a06b720 100644 --- a/app/code/core/Mage/Tag/controllers/IndexController.php +++ b/app/code/core/Mage/Tag/controllers/IndexController.php @@ -87,7 +87,8 @@ public function saveAction() } } else { - $tagModel->setFirstCustomerId($customerId); + $tagModel->setFirstCustomerId($customerId) + ->setFirstStoreId(Mage::app()->getStore()->getId()); $status = $tagModel->getPendingStatus(); $newCount++; } diff --git a/app/code/core/Mage/Tag/etc/config.xml b/app/code/core/Mage/Tag/etc/config.xml index 5e6f55bf11..02a3874433 100644 --- a/app/code/core/Mage/Tag/etc/config.xml +++ b/app/code/core/Mage/Tag/etc/config.xml @@ -28,7 +28,7 @@ - 0.7.4 + 0.7.5 diff --git a/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.0-0.8.1.php b/app/code/core/Mage/Tag/sql/tag_setup/mysql4-upgrade-0.7.4-0.7.5.php old mode 100755 new mode 100644 similarity index 59% rename from app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.0-0.8.1.php rename to app/code/core/Mage/Tag/sql/tag_setup/mysql4-upgrade-0.7.4-0.7.5.php index 99f7100ed9..e79e7f9bed --- a/app/code/core/Mage/Oscommerce/sql/oscommerce_setup/mysql4-upgrade-0.8.0-0.8.1.php +++ b/app/code/core/Mage/Tag/sql/tag_setup/mysql4-upgrade-0.7.4-0.7.5.php @@ -19,29 +19,25 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Oscommerce + * @package Mage_Tag * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -$installer = $this; /* @var $installer Mage_Core_Model_Resource_Setup */ - +$installer = $this; $installer->startSetup(); - -$installer->run(" - -DROP TABLE IF EXISTS `{$this->getTable('oscommerce_import_type')}`; - -CREATE TABLE `{$this->getTable('oscommerce_import_type')}` ( - `type_id` int(2) unsigned NOT NULL auto_increment, - `type_code` varchar(32) NOT NULL, - `type_name` varchar(255) NOT NULL, - PRIMARY KEY (`type_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; - -insert into `{$this->getTable('oscommerce_import_type')}`(`type_code`,`type_name`) values ('website', 'Website'),('store','Store'),('category','Category'),('product','Product'), ('customer','Customer'),('order','Order'); - -"); +$installer->getConnection()->addColumn($installer->getTable('tag/tag'), 'first_store_id', "smallint(5) UNSIGNED NOT NULL DEFAULT '0'"); + +$groupedTags = $installer->getConnection()->select() + ->from($installer->getTable('tag/relation'))->group('tag_id')->order('created_at ASC'); +$select = $installer->getConnection()->select() + ->reset() + ->joinInner(array('relation_table' => new Zend_Db_Expr("({$groupedTags->__toString()})")), + 'relation_table.tag_id = main_table.tag_id', null) + ->columns(array('first_store_id' => 'store_id')); + +$updateSql = $select->crossUpdateFromSelect(array('main_table' => $installer->getTable('tag/tag'))); +$installer->getConnection()->query($updateSql); $installer->endSetup(); diff --git a/app/code/core/Mage/Tax/Block/Sales/Order/Tax.php b/app/code/core/Mage/Tax/Block/Sales/Order/Tax.php index 16a3b9fd76..94beeb6494 100644 --- a/app/code/core/Mage/Tax/Block/Sales/Order/Tax.php +++ b/app/code/core/Mage/Tax/Block/Sales/Order/Tax.php @@ -156,8 +156,9 @@ protected function _initSubtotal() $parent->addTotal($totalIncl, 'subtotal_excl'); $parent->removeTotal('subtotal'); } elseif ($this->_config->displaySalesSubtotalInclTax($store)) { - $subtotalIncl = $this->_source->getSubtotalInclTax(); - $baseSubtotalIncl= $this->_source->getBaseSubtotalInclTax(); + $subtotalIncl = (float) $this->_source->getSubtotalInclTax(); + $baseSubtotalIncl= (float) $this->_source->getBaseSubtotalInclTax(); + if (!$subtotalIncl) { $subtotalIncl = $this->_source->getSubtotal() + $this->_source->getTaxAmount() diff --git a/app/code/core/Mage/Tax/Helper/Data.php b/app/code/core/Mage/Tax/Helper/Data.php index a8c7c4e022..1b5b9031c6 100644 --- a/app/code/core/Mage/Tax/Helper/Data.php +++ b/app/code/core/Mage/Tax/Helper/Data.php @@ -182,7 +182,7 @@ public function needPriceConversion($store = null) case Mage_Tax_Model_Config::DISPLAY_TYPE_BOTH: return self::PRICE_CONVERSION_MINUS; case Mage_Tax_Model_Config::DISPLAY_TYPE_INCLUDING_TAX: - $res = false; + $res = true; } } else { switch ($this->getPriceDisplayType($store)) { @@ -451,10 +451,20 @@ public function getPrice($product, $price, $includingTax = null, $shippingAddres if ($includingPercent != $percent) { $price = $this->_calculatePrice($price, $includingPercent, false); /** - * Round up price excluding tax if customer tax rate !=0 + * Using regular rounding. Ex: + * price incl tax = 52.76 + * store tax rate = 19.6% + * customer tax rate= 19% + * + * price excl tax = 52.76 / 1.196 = 44.11371237 ~ 44.11 + * tax = 44.11371237 * 0.19 = 8.381605351 ~ 8.38 + * price incl tax = 52.49531773 ~ 52.50 != 52.49 + * + * that why we need round prices excluding tax before applying tax + * this calculation is used for showing prices on catalog pages */ if ($percent != 0) { - $price = $this->getCalculator()->roundUp($price); + $price = $this->getCalculator()->round($price); $price = $this->_calculatePrice($price, $percent, true); } } diff --git a/app/code/core/Mage/Tax/Model/Calculation.php b/app/code/core/Mage/Tax/Model/Calculation.php index 0fe83a434c..9d8b4583af 100644 --- a/app/code/core/Mage/Tax/Model/Calculation.php +++ b/app/code/core/Mage/Tax/Model/Calculation.php @@ -186,7 +186,7 @@ public function getRate($request) $this->unsRateValue(); $this->unsCalculationProcess(); $this->unsEventModuleId(); - Mage::dispatchEvent('tax_rate_data_fetch', array('request'=>$this)); + Mage::dispatchEvent('tax_rate_data_fetch', array('request'=>$request)); if (!$this->hasRateValue()) { $rateInfo = $this->_getResource()->getRateInfo($request); $this->setCalculationProcess($rateInfo['process']); @@ -414,7 +414,6 @@ public function getRatesByCustomerAndProductTaxClasses($customerTaxClass, $produ /** * Calculate rated tax abount based on price and tax rate. * If you are using price including tax $priceIncludeTax should be true. - * $taxRate can't be more than 1 (if it is not percent) * * @param float $price * @param float $taxRate @@ -423,12 +422,7 @@ public function getRatesByCustomerAndProductTaxClasses($customerTaxClass, $produ */ public function calcTaxAmount($price, $taxRate, $priceIncludeTax=false, $round=true) { - /** - * $taxRate can be more than 1 if somebody use tax percent - */ - if ($taxRate>1) { - $taxRate = $taxRate/100; - } + $taxRate = $taxRate/100; if ($priceIncludeTax) { $amount = $price*(1-1/(1+$taxRate)); diff --git a/app/code/core/Mage/Tax/Model/Mysql4/Tax.php b/app/code/core/Mage/Tax/Model/Mysql4/Tax.php index c1810399bb..016d11dbfc 100644 --- a/app/code/core/Mage/Tax/Model/Mysql4/Tax.php +++ b/app/code/core/Mage/Tax/Model/Mysql4/Tax.php @@ -61,7 +61,7 @@ public function aggregate($from = null, $to = null) } $subQuery = $writeAdapter->select(); - $subQuery->from(array('so'=>'sales_order'), array('DISTINCT DATE(so.created_at)')) + $subQuery->from(array('so' => $this->getTable('sales/order')), array('DISTINCT DATE(so.created_at)')) ->where($where); $deleteCondition = 'DATE(period) IN (' . new Zend_Db_Expr($subQuery) . ')'; diff --git a/app/code/core/Mage/Tax/Model/Sales/Total/Quote/Subtotal.php b/app/code/core/Mage/Tax/Model/Sales/Total/Quote/Subtotal.php index 11a12ed55b..d56e2a6c36 100644 --- a/app/code/core/Mage/Tax/Model/Sales/Total/Quote/Subtotal.php +++ b/app/code/core/Mage/Tax/Model/Sales/Total/Quote/Subtotal.php @@ -266,8 +266,8 @@ protected function _recollectItem($address, Mage_Sales_Model_Quote_Item_Abstract $this->_baseSubtotalInclTax += $baseSubtotal; if ($this->_config->getAlgorithm($store) == Mage_Tax_Model_Calculation::CALC_UNIT_BASE) { - $taxAmount = $this->_calculator->calcTaxAmount($taxPrice, $rate, true)*$qty; - $baseTaxAmount = $this->_calculator->calcTaxAmount($baseTaxPrice, $rate, true)*$qty; + $taxAmount = $this->_calculator->calcTaxAmount($taxPrice, $rate, true); + $baseTaxAmount = $this->_calculator->calcTaxAmount($baseTaxPrice, $rate, true); $unitPrice = $this->_calculator->round($price-$taxAmount); $baseUnitPrice = $this->_calculator->round($basePrice-$baseTaxAmount); $subtotal = $this->_calculator->round($unitPrice*$qty); diff --git a/app/code/core/Mage/Tax/Model/Sales/Total/Quote/Tax.php b/app/code/core/Mage/Tax/Model/Sales/Total/Quote/Tax.php index 277264a46d..cc31538d91 100644 --- a/app/code/core/Mage/Tax/Model/Sales/Total/Quote/Tax.php +++ b/app/code/core/Mage/Tax/Model/Sales/Total/Quote/Tax.php @@ -190,14 +190,23 @@ protected function _calculateShippingTax(Mage_Sales_Model_Quote_Address $address $rate = $this->_calculator->getRate($taxRateRequest); if ($rate) { if ($this->_config->shippingPriceIncludesTax($store) && $this->_areTaxRequestsSimilar) { - $shippingTax = $this->_calculator->calcTaxAmount($calcAmount, $rate, true); - $shippingBaseTax= $this->_calculator->calcTaxAmount($baseCalcAmount, $rate, true); + $shippingTax = $this->_calculator->calcTaxAmount($calcAmount, $rate, true, false); + $shippingBaseTax= $this->_calculator->calcTaxAmount($baseCalcAmount, $rate, true, false); $shippingAmount-= $shippingTax; $baseShippingAmount-=$shippingBaseTax; } else { - $shippingTax = $this->_calculator->calcTaxAmount($calcAmount, $rate); - $shippingBaseTax= $this->_calculator->calcTaxAmount($baseCalcAmount, $rate); + $shippingTax = $this->_calculator->calcTaxAmount($calcAmount, $rate, false, false); + $shippingBaseTax= $this->_calculator->calcTaxAmount($baseCalcAmount, $rate, false, false); } + $rateKey = (string) $rate; + if (isset($this->_roundingDeltas[$rateKey])) { + $shippingTax+= $this->_roundingDeltas[$rateKey]; + } + if (isset($this->_baseRoundingDeltas[$rateKey])) { + $shippingBaseTax+= $this->_baseRoundingDeltas[$rateKey]; + } + $shippingTax = $this->_calculator->round($shippingTax); + $shippingBaseTax = $this->_calculator->round($shippingBaseTax); $address->setTotalAmount('shipping', $shippingAmount); $address->setBaseTotalAmount('shipping', $baseShippingAmount); @@ -743,7 +752,7 @@ public function fetch(Mage_Sales_Model_Quote_Address $address) * Modify subtotal */ if ($this->_config->displayCartSubtotalBoth($store) || $this->_config->displayCartSubtotalInclTax($store)) { - if ($address->getSubtotalInclTax()) { + if ($address->getSubtotalInclTax() > 0) { $subtotalInclTax = $address->getSubtotalInclTax(); } else { $subtotalInclTax = $address->getSubtotal()+$address->getTaxAmount()-$address->getShippingTaxAmount(); diff --git a/app/code/core/Mage/Tax/sql/tax_setup/mysql4-upgrade-0.7.10-0.7.11.php b/app/code/core/Mage/Tax/sql/tax_setup/mysql4-upgrade-0.7.10-0.7.11.php index a354752b1f..aaec52a4d6 100644 --- a/app/code/core/Mage/Tax/sql/tax_setup/mysql4-upgrade-0.7.10-0.7.11.php +++ b/app/code/core/Mage/Tax/sql/tax_setup/mysql4-upgrade-0.7.10-0.7.11.php @@ -30,8 +30,7 @@ $installer->startSetup(); $installer->run(" - CREATE TABLE IF NOT EXISTS `{$installer->getTable('tax_order_aggregated_created')}` - ( + CREATE TABLE `{$installer->getTable('tax_order_aggregated_created')}` ( `id` int(11) unsigned NOT NULL auto_increment, `period` date NOT NULL DEFAULT '0000-00-00', `store_id` smallint(5) unsigned NULL DEFAULT NULL, @@ -41,11 +40,18 @@ `orders_count` int(11) unsigned NOT NULL default '0', `tax_base_amount_sum` float(12,4) NOT NULL default '0.0000', PRIMARY KEY (`id`), - UNIQUE KEY `UNQ_TAX_ORDER_AGGREGATED_CREATED_PERIOD_STORE_CODE` (`period`,`store_id`, `code`, `order_status`), - KEY `FK_TAX_ORDER_AGGREGATED_CREATED_STORE` (`store_id`), - CONSTRAINT `FK_TAX_ORDER_AGGREGATED_CREATED_STORE` FOREIGN KEY (`store_id`) REFERENCES `core_store` (`store_id`) ON DELETE SET NULL ON UPDATE CASCADE - ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + UNIQUE KEY `UNQ_PERIOD_STORE_CODE_ORDER_STATUS` (`period`,`store_id`, `code`, `order_status`), + KEY `IDX_STORE_ID` (`store_id`) + ) ENGINE=InnoDB DEFAULT CHARSET=utf8; "); +$installer->getConnection()->addConstraint( + 'FK_TAX_ORDER_AGGREGATED_CREATED_STORE', + $this->getTable('tax_order_aggregated_created'), + 'store_id', + $this->getTable('core_store'), + 'store_id' +); + $installer->endSetup(); diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Abstract.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Abstract.php index 85f4a4b5a4..979b7b17ba 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Abstract.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Abstract.php @@ -88,24 +88,31 @@ public function proccessAdditionalValidation(Mage_Shipping_Model_Rate_Request $r } $maxAllowedWeight = (float) $this->getConfigData('max_package_weight'); - $error = null; + $errorMsg = ''; + $configErrorMsg = $this->getConfigData('specificerrmsg'); + $defaultErrorMsg = Mage::helper('shipping')->__('The shipping module is not available.'); $showMethod = $this->getConfigData('showmethod'); foreach ($request->getAllItems() as $item) { if ($item->getProduct() && $item->getProduct()->getId()) { if ($item->getProduct()->getWeight() > $maxAllowedWeight) { - $error = Mage::getModel('shipping/rate_result_error'); - $error->setCarrier($this->_code) - ->setCarrierTitle($this->getConfigData('title')); - $errorMsg = $this->getConfigData('specificerrmsg'); - $error->setErrorMessage($errorMsg?$errorMsg:Mage::helper('shipping')->__('The shipping module is not available.')); + $errorMsg = ($configErrorMsg) ? $configErrorMsg : $defaultErrorMsg; break; } } } - if (null !== $error && $showMethod) { + + if (!$errorMsg && !$request->getDestPostcode() && $this->isZipCodeRequired()) { + $errorMsg = Mage::helper('shipping')->__('This shipping method is not available, please specify ZIP-code'); + } + + if ($errorMsg && $showMethod) { + $error = Mage::getModel('shipping/rate_result_error'); + $error->setCarrier($this->_code); + $error->setCarrierTitle($this->getConfigData('title')); + $error->setErrorMessage($errorMsg); return $error; - } elseif (null !== $error) { + } elseif ($errorMsg) { return false; } return $this; diff --git a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Usps.php b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Usps.php index ebbfe59d74..4b4937d0b1 100644 --- a/app/code/core/Mage/Usa/Model/Shipping/Carrier/Usps.php +++ b/app/code/core/Mage/Usa/Model/Shipping/Carrier/Usps.php @@ -377,25 +377,40 @@ public function getCode($type, $code='') */ 'service_to_code'=>array( - 'First-Class' => 'FIRST CLASS', - 'Express Mail' => 'EXPRESS', - 'Express Mail PO to PO' => 'EXPRESS', - 'Priority Mail' => 'PRIORITY', + 'First-Class' => 'FIRST CLASS', + 'First-Class Mail International Large Envelope' => 'FIRST CLASS', + 'First-Class Mail International Letters' => 'FIRST CLASS', + 'First-Class Mail International Package' => 'FIRST CLASS', + 'First-Class Mail' => 'FIRST CLASS', + 'First-Class Mail Flat' => 'FIRST CLASS', + 'First-Class Mail International' => 'FIRST CLASS', + 'First-Class Mail Letter' => 'FIRST CLASS', + 'First-Class Mail Parcel' => 'FIRST CLASS', 'Parcel Post' => 'PARCEL', - 'Express Mail Flat-Rate Envelope' => 'EXPRESS', - 'Priority Mail Flat-Rate Box' => 'PRIORITY', 'Bound Printed Matter' => 'BPM', 'Media Mail' => 'MEDIA', 'Library Mail' => 'LIBRARY', - 'Priority Mail Flat-Rate Envelope' => 'PRIORITY', - 'Global Express Guaranteed' => 'EXPRESS', + 'Express Mail' => 'EXPRESS', + 'Express Mail PO to PO' => 'EXPRESS', + 'Express Mail Flat Rate Envelope' => 'EXPRESS', + 'Express Mail Flat Rate Envelope Hold For Pickup' => 'EXPRESS', + 'Global Express Guaranteed (GXG)' => 'EXPRESS', 'Global Express Guaranteed Non-Document Rectangular' => 'EXPRESS', 'Global Express Guaranteed Non-Document Non-Rectangular' => 'EXPRESS', - 'Express Mail International (EMS)' => 'EXPRESS', - 'Express Mail International (EMS) Flat-Rate Envelope' => 'EXPRESS', + 'Express Mail International' => 'EXPRESS', + 'Express Mail International Flat Rate Envelope' => 'EXPRESS', + 'Priority Mail' => 'PRIORITY', + 'Priority Mail Small Flat Rate Box' => 'PRIORITY', + 'Priority Mail Medium Flat Rate Box' => 'PRIORITY', + 'Priority Mail Large Flat Rate Box' => 'PRIORITY', + 'Priority Mail Flat Rate Box' => 'PRIORITY', + 'Priority Mail Flat Rate Envelope' => 'PRIORITY', 'Priority Mail International' => 'PRIORITY', - 'Priority Mail International Flat-Rate Box' => 'PRIORITY', - 'Priority Mail International Large Flat-Rate Box' => 'PRIORITY' + 'Priority Mail International Flat Rate Envelope' => 'PRIORITY', + 'Priority Mail International Small Flat Rate Box' => 'PRIORITY', + 'Priority Mail International Medium Flat Rate Box' => 'PRIORITY', + 'Priority Mail International Large Flat Rate Box' => 'PRIORITY', + 'Priority Mail International Flat Rate Box' => 'PRIORITY' ), 'first_class_mail_type'=>array( diff --git a/app/code/core/Mage/Usa/etc/config.xml b/app/code/core/Mage/Usa/etc/config.xml index dafc41d5ec..7c337de8d3 100644 --- a/app/code/core/Mage/Usa/etc/config.xml +++ b/app/code/core/Mage/Usa/etc/config.xml @@ -170,14 +170,14 @@ 0 0 - Bound Printed Matter,Express Mail,Express Mail Flat-Rate Envelope,Express Mail Flat-Rate Envelope Hold For Pickup,Express Mail Flat-Rate Envelope Sunday/Holiday Guarantee,Express Mail Hold For Pickup,Express Mail International (EMS),Express Mail International (EMS) Flat-Rate Envelope,Express Mail PO to PO,Express Mail Sunday/Holiday Guarantee,First Class Mail International Large Envelope,First Class Mail International Letters,First Class Mail International Package,First-Class,First-Class Mail,First-Class Mail Flat,First-Class Mail International,First-Class Mail Letter,First-Class Mail Parcel,Global Express Guaranteed,Global Express Guaranteed Non-Document Non-Rectangular,Global Express Guaranteed Non-Document Rectangular,Library Mail,Media Mail,Parcel Post,Priority Mail,Priority Mail Flat-Rate Box,Priority Mail Flat-Rate Envelope,Priority Mail International,Priority Mail International Flat-Rate Box,Priority Mail International Flat-Rate Envelope,Priority Mail International Large Flat-Rate Box,Priority Mail Large Flat-Rate Box,USPS GXG Envelopes + Bound Printed Matter,Express Mail,Express Mail Flat Rate Envelope,Express Mail Flat Rate Envelope Hold For Pickup,Express Mail Flat-Rate Envelope Sunday/Holiday Guarantee,Express Mail Hold For Pickup,Express Mail International,Express Mail International Flat Rate Envelope,Express Mail PO to PO,Express Mail Sunday/Holiday Guarantee,First-Class Mail International Large Envelope,First-Class Mail International Letters,First-Class Mail International Package,First-Class,First-Class Mail,First-Class Mail Flat,First-Class Mail International,First-Class Mail Letter,First-Class Mail Parcel,Global Express Guaranteed (GXG),Global Express Guaranteed Non-Document Non-Rectangular,Global Express Guaranteed Non-Document Rectangular,Library Mail,Media Mail,Parcel Post,Priority Mail,Priority Mail Small Flat Rate Box,Priority Mail Medium Flat Rate Box,Priority Mail Large Flat Rate Box,Priority Mail Flat Rate Box,Priority Mail Flat Rate Envelope,Priority Mail International,Priority Mail International Flat Rate Box,Priority Mail International Flat Rate Envelope,Priority Mail International Small Flat Rate Box,Priority Mail International Medium Flat Rate Box,Priority Mail International Large Flat Rate Box,USPS GXG Envelopes VARIABLE http://production.shippingapis.com/ShippingAPI.dll true - Bound Printed Matter,Express Mail,Express Mail Flat-Rate Envelope,Express Mail Flat-Rate Envelope Hold For Pickup,Express Mail Flat-Rate Envelope Sunday/Holiday Guarantee,Express Mail Hold For Pickup,Express Mail International (EMS),Express Mail International (EMS) Flat-Rate Envelope,Express Mail PO to PO,Express Mail Sunday/Holiday Guarantee,First Class Mail International Large Envelope,First Class Mail International Letters,First Class Mail International Package,First-Class,First-Class Mail,First-Class Mail Flat,First-Class Mail International,First-Class Mail Letter,First-Class Mail Parcel,Global Express Guaranteed,Global Express Guaranteed Non-Document Non-Rectangular,Global Express Guaranteed Non-Document Rectangular,Library Mail,Media Mail,Parcel Post,Priority Mail,Priority Mail Flat-Rate Box,Priority Mail Flat-Rate Envelope,Priority Mail International,Priority Mail International Flat-Rate Box,Priority Mail International Flat-Rate Envelope,Priority Mail International Large Flat-Rate Box,Priority Mail Large Flat-Rate Box,USPS GXG Envelopes + Bound Printed Matter,Express Mail,Express Mail Flat Rate Envelope,Express Mail Flat Rate Envelope Hold For Pickup,Express Mail Flat-Rate Envelope Sunday/Holiday Guarantee,Express Mail Hold For Pickup,Express Mail International,Express Mail International Flat Rate Envelope,Express Mail PO to PO,Express Mail Sunday/Holiday Guarantee,First-Class Mail International Large Envelope,First-Class Mail International Letters,First-Class Mail International Package,First-Class,First-Class Mail,First-Class Mail Flat,First-Class Mail International,First-Class Mail Letter,First-Class Mail Parcel,Global Express Guaranteed (GXG),Global Express Guaranteed Non-Document Non-Rectangular,Global Express Guaranteed Non-Document Rectangular,Library Mail,Media Mail,Parcel Post,Priority Mail,Priority Mail Small Flat Rate Box,Priority Mail Medium Flat Rate Box,Priority Mail Large Flat Rate Box,Priority Mail Flat Rate Box,Priority Mail Flat Rate Envelope,Priority Mail International,Priority Mail International Flat Rate Box,Priority Mail International Flat Rate Envelope,Priority Mail International Small Flat Rate Box,Priority Mail International Medium Flat Rate Box,Priority Mail International Large Flat Rate Box,USPS GXG Envelopes usa/shipping_carrier_usps REGULAR United States Postal Service diff --git a/app/code/core/Mage/Usa/etc/system.xml b/app/code/core/Mage/Usa/etc/system.xml index 3e4b8968c1..83146b1abd 100644 --- a/app/code/core/Mage/Usa/etc/system.xml +++ b/app/code/core/Mage/Usa/etc/system.xml @@ -62,6 +62,7 @@ 1 1 0 + 1 @@ -241,6 +242,7 @@ 1 1 0 + 1 @@ -350,6 +352,7 @@ 1 1 0 + 1 @@ -360,6 +363,7 @@ 1 1 0 + 1 @@ -399,6 +403,7 @@ 1 1 0 + 1 @@ -530,6 +535,7 @@ 1 1 0 + 1 @@ -585,6 +591,7 @@ 1 1 0 + 1 @@ -795,6 +802,7 @@ 1 1 0 + 1 @@ -851,6 +859,7 @@ 1 1 0 + 1 @@ -991,6 +1000,7 @@ 1 1 0 + 1 diff --git a/app/code/core/Mage/Widget/Block/Adminhtml/Widget.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget.php index 79fb1e2e12..fb1a2b3cdd 100644 --- a/app/code/core/Mage/Widget/Block/Adminhtml/Widget.php +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget.php @@ -49,7 +49,7 @@ public function __construct() $this->_updateButton('save', 'id', 'insert_button'); $this->_updateButton('save', 'onclick', 'wWidget.insertWidget()'); - $this->_formScripts[] = 'wWidget = new WysiwygWidget.Widget("edit_form", "select_widget_type", "widget_options", "' + $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/Form.php b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Form.php index fad7a12922..3d8484951c 100644 --- a/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Form.php +++ b/app/code/core/Mage/Widget/Block/Adminhtml/Widget/Form.php @@ -55,7 +55,7 @@ protected function _prepareForm() )); $form->setUseContainer(true); - $form->setId('edit_form'); + $form->setId('widget_options_form'); $form->setMethod('post'); $form->setAction($this->getUrl('*/*/buildWidget')); $this->setForm($form); diff --git a/app/code/core/Mage/Widget/Model/Template/Filter.php b/app/code/core/Mage/Widget/Model/Template/Filter.php index ec5f0f3727..10ace77207 100644 --- a/app/code/core/Mage/Widget/Model/Template/Filter.php +++ b/app/code/core/Mage/Widget/Model/Template/Filter.php @@ -60,7 +60,13 @@ public function widgetDirective($construction) } else { return ''; } - + + // we have no other way to avoid fatal errors for type like 'cms/widget__link', '_cms/widget_link' etc. + $xml = Mage::getSingleton('widget/widget')->getXmlElementByType($type); + if ($xml === null) { + return ''; + } + // define widget block and check the type is instance of Widget Interface $widget = Mage::app()->getLayout()->createBlock($type, $name, $params); if (!$widget instanceof Mage_Widget_Block_Interface) { 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 e8f0b10ea8..cef4cc48b9 100644 --- a/app/code/core/Mage/Widget/controllers/Adminhtml/Widget/InstanceController.php +++ b/app/code/core/Mage/Widget/controllers/Adminhtml/Widget/InstanceController.php @@ -66,6 +66,8 @@ protected function _initAction() */ protected function _initWidgetInstance() { + $this->_title($this->__('CMS'))->_title($this->__('Widgets')); + $widgetInstance = Mage::getModel('widget/widget_instance'); $instanceId = $this->getRequest()->getParam('instance_id', null); $type = $this->getRequest()->getParam('type', null); @@ -92,6 +94,8 @@ protected function _initWidgetInstance() */ public function indexAction() { + $this->_title($this->__('CMS'))->_title($this->__('Widgets')); + $this->_initAction() ->renderLayout(); } @@ -116,6 +120,9 @@ public function editAction() $this->_redirect('*/*/'); return; } + + $this->_title($widgetInstance->getId() ? $widgetInstance->getTitle() : $this->__('New Instance')); + $this->_initAction(); $this->renderLayout(); } diff --git a/app/code/core/Mage/Wishlist/Controller/Abstract.php b/app/code/core/Mage/Wishlist/Controller/Abstract.php index 4b37f5c8e8..3d4befa38f 100644 --- a/app/code/core/Mage/Wishlist/Controller/Abstract.php +++ b/app/code/core/Mage/Wishlist/Controller/Abstract.php @@ -149,7 +149,7 @@ public function allcartAction() if ($addedItems) { $products = array(); foreach ($addedItems as $product) { - $products[] = '"' . $item->getProduct()->getName() . '"'; + $products[] = '"' . $product->getName() . '"'; } Mage::getSingleton('checkout/session')->addSuccess( diff --git a/app/design/frontend/default/modern/layout/reports.xml b/app/design/adminhtml/default/default/layout/adminnotification.xml similarity index 66% rename from app/design/frontend/default/modern/layout/reports.xml rename to app/design/adminhtml/default/default/layout/adminnotification.xml index c25564b4b8..bb07c1f84b 100644 --- a/app/design/frontend/default/modern/layout/reports.xml +++ b/app/design/adminhtml/default/default/layout/adminnotification.xml @@ -20,18 +20,19 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category design - * @package default_modern + * @package default_default * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ - --> - + + - - - - + + + + + diff --git a/app/design/adminhtml/default/default/layout/centinel.xml b/app/design/adminhtml/default/default/layout/centinel.xml new file mode 100644 index 0000000000..182521d902 --- /dev/null +++ b/app/design/adminhtml/default/default/layout/centinel.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/design/adminhtml/default/default/layout/main.xml b/app/design/adminhtml/default/default/layout/main.xml index 7bc5c85d02..f45d3f33e3 100644 --- a/app/design/adminhtml/default/default/layout/main.xml +++ b/app/design/adminhtml/default/default/layout/main.xml @@ -79,6 +79,8 @@ Default layout, loads most of the pages skin_cssbelow_ie7.csslt IE 7 skin_cssie7.cssIE 7 + print.cssmedia="print" + jslib/ds-sleight.jsdeferlt IE 7 jsvarien/iehover-fix.jslt IE 7 @@ -104,9 +106,9 @@ Default layout, loads most of the pages - + @@ -122,7 +124,6 @@ Default layout, loads most of the pages - @@ -157,6 +158,7 @@ Layout for editor element + diff --git a/app/design/adminhtml/default/default/template/api/role_users_grid_js.phtml b/app/design/adminhtml/default/default/template/api/role_users_grid_js.phtml index 3120563800..4939f5b274 100644 --- a/app/design/adminhtml/default/default/template/api/role_users_grid_js.phtml +++ b/app/design/adminhtml/default/default/template/api/role_users_grid_js.phtml @@ -55,14 +55,14 @@ if ( !confirm("__('Warning!\r\nThis action will remove this user from already assigned role\r\nAre you sure?') ?>") ) { checkbox[0].checked = false; for(i in checkBoxes) { - if( checkBoxes[i].status == 1) { + if( checkBoxes[i].status == 1) { checkBoxes[i].object.checked = true; } } return false; } warning = false; - } + } getJsObjectName() ?>.setCheckboxChecked(checkbox[0], checked); } } @@ -81,7 +81,7 @@ if ( !confirm("__('Warning!\r\nThis action will remove those users from already assigned roles\r\nAre you sure?') ?>") ) { o.checked = false; for(i in checkBoxes) { - if( checkBoxes[i].status == 1) { + if( checkBoxes[i].status == 1) { checkBoxes[i].object.checked = true; } } @@ -91,12 +91,13 @@ } for(i in checkBoxes) getJsObjectName() ?>.setCheckboxChecked(checkBoxes[i].object, o.checked); } - + getJsObjectName() ?>.rowClickCallback = roleUsersRowClick; getJsObjectName() ?>.initRowCallback = roleUsersRowInit; getJsObjectName() ?>.checkboxCheckCallback = registerUserRole; getJsObjectName() ?>.checkCheckboxes = myhandler; getJsObjectName() ?>.rows.each(function(row){roleUsersRowInit(getJsObjectName() ?>, row)}); + $('in_role_user_old').value = $('in_role_user').value; //--> diff --git a/app/design/adminhtml/default/default/template/bundle/sales/creditmemo/create/items/renderer.phtml b/app/design/adminhtml/default/default/template/bundle/sales/creditmemo/create/items/renderer.phtml index d961556bae..5edb6689df 100644 --- a/app/design/adminhtml/default/default/template/bundle/sales/creditmemo/create/items/renderer.phtml +++ b/app/design/adminhtml/default/default/template/bundle/sales/creditmemo/create/items/renderer.phtml @@ -67,7 +67,7 @@
    htmlEscape($_item->getName()) ?>
    helper('sales')->__('SKU') ?>: - ', Mage::helper('catalog')->splitSku($_item->getSku())); ?> + ', Mage::helper('catalog')->splitSku($this->htmlEscape($_item->getSku()))); ?>
       
    htmlEscape($_item->getName()) ?>
    helper('sales')->__('SKU') ?>: - ', Mage::helper('catalog')->splitSku($_item->getSku())); ?> + ', Mage::helper('catalog')->splitSku($this->htmlEscape($_item->getSku()))); ?>
       
    htmlEscape($_item->getName()) ?>
    helper('sales')->__('SKU') ?>: - ', Mage::helper('catalog')->splitSku($_item->getSku())); ?> + ', Mage::helper('catalog')->splitSku($this->htmlEscape($_item->getSku()))); ?>
       
    htmlEscape($_item->getName()) ?>
    helper('sales')->__('SKU') ?>: - ', Mage::helper('catalog')->splitSku($_item->getSku())); ?> + ', Mage::helper('catalog')->splitSku($this->htmlEscape($_item->getSku()))); ?>
    getValueHtml($_item)?>
           
    htmlEscape($_item->getName()) ?>
    helper('sales')->__('SKU') ?>: - ', Mage::helper('catalog')->splitSku($_item->getSku())); ?> + ', Mage::helper('catalog')->splitSku($this->htmlEscape($_item->getSku()))); ?>
         
    getElementLabelHtml()) ?> getElementHtml()) ?>getScopeLabel() ?>getScopeLabel() ?> getReadonly()):?> disabled="disabled" type="checkbox" name="use_default[]" id="getHtmlId() ?>_default"usedDefault()): ?> checked="checked" onclick="toggleValueElements(this, this.parentNode.parentNode)" value="getAttributeCode() ?>"/> diff --git a/app/design/adminhtml/default/default/template/catalog/product/attribute/js.phtml b/app/design/adminhtml/default/default/template/catalog/product/attribute/js.phtml index c047e0a3fc..e6e2583c37 100644 --- a/app/design/adminhtml/default/default/template/catalog/product/attribute/js.phtml +++ b/app/design/adminhtml/default/default/template/catalog/product/attribute/js.phtml @@ -26,9 +26,17 @@ ?> diff --git a/app/design/adminhtml/default/default/template/chronopay/pdf/info.phtml b/app/design/adminhtml/default/default/template/centinel/validation/form.phtml similarity index 62% rename from app/design/adminhtml/default/default/template/chronopay/pdf/info.phtml rename to app/design/adminhtml/default/default/template/centinel/validation/form.phtml index 70910fa0b6..fa9763aae2 100644 --- a/app/design/adminhtml/default/default/template/chronopay/pdf/info.phtml +++ b/app/design/adminhtml/default/default/template/centinel/validation/form.phtml @@ -24,10 +24,8 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -getMethod()->getTitle() ?> - {{pdf_row_separator}} -__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?> - {{pdf_row_separator}} -__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?> - {{pdf_row_separator}} -__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> + + + diff --git a/app/design/adminhtml/default/default/template/chronopay/form.phtml b/app/design/adminhtml/default/default/template/chronopay/form.phtml deleted file mode 100644 index c761b75f13..0000000000 --- a/app/design/adminhtml/default/default/template/chronopay/form.phtml +++ /dev/null @@ -1,81 +0,0 @@ - - -getMethodCode() ?> - diff --git a/app/design/adminhtml/default/default/template/chronopay/info.phtml b/app/design/adminhtml/default/default/template/chronopay/info.phtml deleted file mode 100644 index cf01f088bd..0000000000 --- a/app/design/adminhtml/default/default/template/chronopay/info.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -getMethod()->getTitle() ?>
    -__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
    -__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
    -__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?>
    -__('Expiration Date: %s/%s', $this->htmlEscape($this->getCcExpMonth()), $this->htmlEscape($this->getInfo()->getCcExpYear())) ?> diff --git a/app/design/adminhtml/default/default/template/customer/tab/addresses.phtml b/app/design/adminhtml/default/default/template/customer/tab/addresses.phtml index 1edc3e3180..357a60a0db 100644 --- a/app/design/adminhtml/default/default/template/customer/tab/addresses.phtml +++ b/app/design/adminhtml/default/default/template/customer/tab/addresses.phtml @@ -284,7 +284,7 @@ addressesModel.prototype = { } }, - setAddressAsDefault : function(){ + setAddressAsDefault : function(){ for(var i=0; i__('Are you sure you want to delete this address?') ?>')){ - if( item.isNewAddress){ + if( item.isNewAddress || 1 == this.itemList.length){ if ( this.activeItem == item ) this.formContainer.removeChild(item.formBlock); } else { if($('deleted_'+item.id)){ diff --git a/app/design/adminhtml/default/default/template/customer/tab/view/sales.phtml b/app/design/adminhtml/default/default/template/customer/tab/view/sales.phtml index 87a4a7c339..583d733c3e 100644 --- a/app/design/adminhtml/default/default/template/customer/tab/view/sales.phtml +++ b/app/design/adminhtml/default/default/template/customer/tab/view/sales.phtml @@ -40,8 +40,8 @@
    __('All Store Views') ?>getPriceFormatted($this->getTotals()->getLifetime()) ?>getPriceFormatted($this->getTotals()->getAvgsale()) ?>formatCurrency($this->getTotals()->getBaseLifetime()) ?>formatCurrency($this->getTotals()->getAvgsale()) ?>
    getStoreName() ?> getPriceFormatted($_row->getLifetime()) ?>getPriceFormatted($_row->getAvgsale()) ?>formatCurrency($_row->getLifetime(), $_row->getWebsiteId()) ?>formatCurrency($_row->getAvgsale(), $_row->getWebsiteId()) ?>
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    getWebsiteOptionHtml() ?>
    getTimezoneOptionHtml() ?>
    getConnectionCharsetOptionHtml(); ?>
    getDataCharsetOptionHtml(); ?>
    - - - - -
    -
      -
    • -
        -
      • __('Notice: Please place all images under MAGENTO_ROOT/media/import/ with writable permission to all files including sub folders.') ?> - -
      • -
      -
    • -
    -
    - - -
    -
    -

    __('Locale Selection') ?>

    -
    - -
    -
    -
    -
    -
    -
    -

    __('Import Options') ?>

    -
    -
    -
      -
    • -
        -
      • __('To import orders, Magento requires that customers also be imported.') ?> -
      • -
      -
    • -
    - -
    - -
    - -
    - - -
    -
    - - - - - - - - -getCheckButtonHtml() ?> -getSaveButtonHtml() ?> - - - diff --git a/app/design/adminhtml/default/default/template/oscommerce/order/view.phtml b/app/design/adminhtml/default/default/template/oscommerce/order/view.phtml deleted file mode 100644 index 1ea9d5b939..0000000000 --- a/app/design/adminhtml/default/default/template/oscommerce/order/view.phtml +++ /dev/null @@ -1,241 +0,0 @@ - -getOrder(); -$_products = $_order->getProducts(); -$_totals = $_order->getTotal(); -$_comments = $_order->getComments(); -$currency = $_order->getCurrencySymbol()?$_order->getCurrencySymbol():$_order->getCurrency(); -?> -
    - - - - -
    -

    getHeaderText() ?>

    -

    - getBackButtonHtml() ?> -

    -
    -
    -
    - -
    -
    - __('Order # %s', $_order->getOrdersId()) ?> -
    -
    - - - - - -
    formatDate($_order->getDatePurchased(), 'medium', true) ?>
    -
    -
    -
    -
    - -
    -
    - -
    -
    - - - - - - - - - -
    htmlEscape($_order->getCustomersName()) ?>
    getCustomersEmailAddress() ?>
    -
    -
    -
    -
    - -
    - -
    -
    -

    __('Billing Address') ?>

    -
    -
    - getBillingName() ?>
    -
    - getBillingStreetAddress() ?>
    - getBillingCity() ?>, getBillingState() ?> getBillingPostcode() ?>
    - getBillingCountry() ?>
    -
    -
    -
    -
    - -
    - -
    -
    -

    __('Delivery Address') ?>

    -
    -
    - getDeliveryName() ?>
    -
    - getDeliveryStreetAddress() ?>
    - getDeliveryCity() ?>, getDeliveryState() ?> getDeliveryPostcode() ?>
    - getDeliveryCountry() ?>
    -
    -
    -
    -
    -
    - -
    - -
    -
    -

    __('Payment Information') ?>

    -
    -
    - getPaymentMethod(); ?> -
    -
    -
    -
    - -
    -
    -

    __('Shipping & Handling Information') ?>

    -
    -
    - - - - - - - - - -
    -
    -
    -
    - -
    -
    -

    __('Items Ordered') ?>

    -
    -
    -
    -
    - - - - - - - - - - - - - $_product) :?> - - - - - - - - - - -
    __('Product') ?>__('SKU') ?>__('Price') ?>__('Qty') ?>__('Final Price') ?>
    - -
    -
    -
    -
    -
    - - -
    -
    -
    -

    __('Comments History') ?>

    -
    -
    -
    -
      - - -
    • - formatDate($_comment['date_added'], 'medium', true)?> - |
      - - - -
    • - - -
    -
    -
    -
    -
    - -
    -

    __('Order Totals') ?>

    -
    - - - - - - - - - - - - - - - - - - -
    - -
    -
    -
    - diff --git a/app/design/adminhtml/default/default/template/page/header.phtml b/app/design/adminhtml/default/default/template/page/header.phtml index 7cd9ea3dd2..c240f79600 100644 --- a/app/design/adminhtml/default/default/template/page/header.phtml +++ b/app/design/adminhtml/default/default/template/page/header.phtml @@ -43,7 +43,7 @@ new Ajax.Autocompleter( 'global_search', 'global_search_autocomplete', - 'getUrl('*/index/globalSearch') ?>', + 'getUrl('adminhtml/index/globalSearch') ?>', { paramName:"query", minChars:2, diff --git a/app/design/adminhtml/default/default/template/paybox/adminhtml/cart/type/select.phtml b/app/design/adminhtml/default/default/template/paybox/adminhtml/cart/type/select.phtml deleted file mode 100644 index cb155ab8fb..0000000000 --- a/app/design/adminhtml/default/default/template/paybox/adminhtml/cart/type/select.phtml +++ /dev/null @@ -1,45 +0,0 @@ - - diff --git a/app/design/adminhtml/default/default/template/paybox/direct/form.phtml b/app/design/adminhtml/default/default/template/paybox/direct/form.phtml deleted file mode 100644 index db46e24db5..0000000000 --- a/app/design/adminhtml/default/default/template/paybox/direct/form.phtml +++ /dev/null @@ -1,82 +0,0 @@ - -getMethodCode() ?> - - diff --git a/app/design/adminhtml/default/default/template/paybox/direct/info.phtml b/app/design/adminhtml/default/default/template/paybox/direct/info.phtml deleted file mode 100644 index 58fc4dcafd..0000000000 --- a/app/design/adminhtml/default/default/template/paybox/direct/info.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -htmlEscape($this->getMethod()->getTitle()) ?>
    -__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
    -__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
    -__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?>
    -__('Expiration Date: %s/%s', $this->htmlEscape($this->getCcExpMonth()), $this->htmlEscape($this->getInfo()->getCcExpYear())) ?> diff --git a/app/design/adminhtml/default/default/template/paybox/direct/pdf/info.phtml b/app/design/adminhtml/default/default/template/paybox/direct/pdf/info.phtml deleted file mode 100644 index cfcdf11a87..0000000000 --- a/app/design/adminhtml/default/default/template/paybox/direct/pdf/info.phtml +++ /dev/null @@ -1,33 +0,0 @@ - -htmlEscape($this->getMethod()->getTitle()) ?> - {{pdf_row_separator}} -__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?> - {{pdf_row_separator}} -__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?> - {{pdf_row_separator}} -__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> diff --git a/app/design/adminhtml/default/default/template/payment/form/cc.phtml b/app/design/adminhtml/default/default/template/payment/form/cc.phtml index cf7aabdded..29d176dc26 100644 --- a/app/design/adminhtml/default/default/template/payment/form/cc.phtml +++ b/app/design/adminhtml/default/default/template/payment/form/cc.phtml @@ -47,7 +47,7 @@

  • - getInfoData('cc_exp_month') ?> getCcMonths() as $k=>$v): ?> diff --git a/app/design/adminhtml/default/default/template/payment/form/ccsave.phtml b/app/design/adminhtml/default/default/template/payment/form/ccsave.phtml index 052ceaf8d1..dcb1bf7414 100644 --- a/app/design/adminhtml/default/default/template/payment/form/ccsave.phtml +++ b/app/design/adminhtml/default/default/template/payment/form/ccsave.phtml @@ -53,7 +53,7 @@

  • - getInfoData('cc_exp_month') ?> getCcMonths() as $k=>$v): ?> diff --git a/app/design/adminhtml/default/default/template/payment/info/cc.phtml b/app/design/adminhtml/default/default/template/payment/info/cc.phtml deleted file mode 100644 index 90d131bcc6..0000000000 --- a/app/design/adminhtml/default/default/template/payment/info/cc.phtml +++ /dev/null @@ -1,41 +0,0 @@ - - -getInfo()): ?> - __('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
    - __('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?>
    - getInfo()->getCcSsIssue()): ?> - htmlEscape(Mage::helper('payment')->__("Switch/Solo card issue number: %s", $this->getInfo()->getCcSsIssue())) ?>
    - - getInfo()->getCcSsStartYear()): ?> - htmlEscape(Mage::helper('payment')->__('Switch/Solo card start Date: %s/%s', $this->getInfo()->getCcStartMonth(), $this->getInfo()->getCcSsStartYear())) ?> - - diff --git a/app/design/adminhtml/default/default/template/payment/info/ccsave.phtml b/app/design/adminhtml/default/default/template/payment/info/ccsave.phtml deleted file mode 100644 index 7dbb01bc10..0000000000 --- a/app/design/adminhtml/default/default/template/payment/info/ccsave.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
    -__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
    -getIsSecureMode()):?> -__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?>
    - -__('Credit Card Number: %s', $this->htmlEscape($this->getInfo()->getCcNumber())) ?>
    - -__('Expiration Date: %s/%s', $this->htmlEscape($this->getCcExpMonth()), $this->htmlEscape($this->getInfo()->getCcExpYear())) ?> diff --git a/app/design/adminhtml/default/default/template/payment/info/pdf/cc.phtml b/app/design/adminhtml/default/default/template/payment/info/pdf/cc.phtml deleted file mode 100644 index b1e91a9332..0000000000 --- a/app/design/adminhtml/default/default/template/payment/info/pdf/cc.phtml +++ /dev/null @@ -1,42 +0,0 @@ - - -getInfo()): ?> - __('Credit Card Type: %s', $this->getCcTypeName()) ?> - {{pdf_row_separator}} - __('Credit Card Number: xxxx-%s', $this->getInfo()->getCcLast4()) ?> - getInfo()->getCcSsIssue()): ?> - {{pdf_row_separator}}__('Switch/Solo card issue number: %s', $this->getInfo()->getCcSsIssue()) ?> - - getInfo()->getCcSsStartYear()): ?> - {{pdf_row_separator}}__('Switch/Solo card start Date: %s/%s', $this->getInfo()->getCcStartMonth(), $this->getInfo()->getCcSsStartYear()) ?> - - diff --git a/app/design/adminhtml/default/default/template/payment/info/pdf/ccsave.phtml b/app/design/adminhtml/default/default/template/payment/info/pdf/ccsave.phtml deleted file mode 100644 index d28b5ecd68..0000000000 --- a/app/design/adminhtml/default/default/template/payment/info/pdf/ccsave.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?> - {{pdf_row_separator}} -__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?> - {{pdf_row_separator}} -__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> diff --git a/app/design/adminhtml/default/default/template/paypaluk/direct/form.phtml b/app/design/adminhtml/default/default/template/paypaluk/direct/form.phtml deleted file mode 100644 index b607d4599a..0000000000 --- a/app/design/adminhtml/default/default/template/paypaluk/direct/form.phtml +++ /dev/null @@ -1,165 +0,0 @@ - - getMethodCode() ?> - - diff --git a/app/design/adminhtml/default/default/template/paypaluk/direct/info.phtml b/app/design/adminhtml/default/default/template/paypaluk/direct/info.phtml deleted file mode 100644 index b1f75d5ab3..0000000000 --- a/app/design/adminhtml/default/default/template/paypaluk/direct/info.phtml +++ /dev/null @@ -1,38 +0,0 @@ - -getInfo()): ?> - -__('Credit Card Type: %s', $this->getCcTypeName()) ?>
    -__('Credit Card Number: xxxx-%s', $this->getInfo()->getCcLast4()) ?>
    -__('Expiration Date: %s/%s', $this->getCcExpMonth(), $this->getInfo()->getCcExpYear()) ?>
    -getInfo()->getCcSsIssue()): ?> -__("Switch/Solo card issue number: %s", $this->getInfo()->getCcSsIssue()) ?>
    - -getInfo()->getCcSsStartYear()): ?> -__('Switch/Solo card start Date: %s/%s', $this->getCcStartMonth(), $this->getInfo()->getCcSsStartYear()) ?> - - diff --git a/app/design/adminhtml/default/default/template/paypaluk/direct/pdf/info.phtml b/app/design/adminhtml/default/default/template/paypaluk/direct/pdf/info.phtml deleted file mode 100644 index cf7539025c..0000000000 --- a/app/design/adminhtml/default/default/template/paypaluk/direct/pdf/info.phtml +++ /dev/null @@ -1,41 +0,0 @@ - -getInfo()): ?> - __('Name on the Card: %s', $this->getInfo()->getCcOwner()) ?> - {{pdf_row_separator}} - __('Credit Card Type: %s', $this->getCcTypeName()) ?> - {{pdf_row_separator}} - __('Credit Card Number: xxxx-%s', $this->getInfo()->getCcLast4()) ?> - {{pdf_row_separator}} - getInfo()->getCcSsIssue()): ?> - __("Switch/Solo card issue number: %s", $this->getInfo()->getCcSsIssue()) ?> - {{pdf_row_separator}} - - getInfo()->getCcSsStartYear()): ?> - __('Switch/Solo card start Date: %s/%s', $this->getCcStartMonth(), $this->getInfo()->getCcSsStartYear()) ?> - - diff --git a/app/design/adminhtml/default/default/template/paypaluk/express/info.phtml b/app/design/adminhtml/default/default/template/paypaluk/express/info.phtml deleted file mode 100644 index f42a502617..0000000000 --- a/app/design/adminhtml/default/default/template/paypaluk/express/info.phtml +++ /dev/null @@ -1,28 +0,0 @@ - -

    getMethod()->getTitle() ?>
    -__('PayPal Email') ?>: getEmail() ?>

    diff --git a/app/design/adminhtml/default/default/template/paypaluk/express/pdf/info.phtml b/app/design/adminhtml/default/default/template/paypaluk/express/pdf/info.phtml deleted file mode 100644 index 4df2173d30..0000000000 --- a/app/design/adminhtml/default/default/template/paypaluk/express/pdf/info.phtml +++ /dev/null @@ -1,30 +0,0 @@ - -getMethod()->getTitle() ?> - {{pdf_row_separator}} -__('PayPal Email') ?>: getEmail() ?> - {{pdf_row_separator}} diff --git a/app/design/adminhtml/default/default/template/permissions/role_users_grid_js.phtml b/app/design/adminhtml/default/default/template/permissions/role_users_grid_js.phtml index effaadd99e..983829ff17 100644 --- a/app/design/adminhtml/default/default/template/permissions/role_users_grid_js.phtml +++ b/app/design/adminhtml/default/default/template/permissions/role_users_grid_js.phtml @@ -29,8 +29,10 @@ if(checkbox[0]){ var checked = isInput ? checkbox[0].checked : !checkbox[0].checked; if (checked) { + checkbox[0].checked = true; if ( confirm("__('Warning!\r\nThis action will remove this user from already assigned role\r\nAre you sure?') ?>") ) { checkBoxes.set(checkbox[0].value, checked); + varienElementMethods.setHasChanges(checkbox[0]); } else { checkbox[0].checked = false; } @@ -83,6 +85,7 @@ getJsObjectName() ?>.checkboxCheckCallback = registerUserRole; getJsObjectName() ?>.checkCheckboxes = myhandler; getJsObjectName() ?>.rows.each(function(row){roleUsersRowInit(getJsObjectName() ?>, row)}); + $('in_role_user_old').value = $('in_role_user').value; //--> diff --git a/app/design/adminhtml/default/default/template/poll/answers/list.phtml b/app/design/adminhtml/default/default/template/poll/answers/list.phtml index b12f8c9690..705d118d13 100644 --- a/app/design/adminhtml/default/default/template/poll/answers/list.phtml +++ b/app/design/adminhtml/default/default/template/poll/answers/list.phtml @@ -35,11 +35,12 @@ - +
    getDeleteButtonHtml() ?>
    +

    getDeleteButtonHtml() ?>

    @@ -48,7 +49,7 @@
    -getAddButtonHtml(); ?> +

    getAddButtonHtml(); ?>

    - - diff --git a/app/design/frontend/base/default/template/amazonpayments/asp/shortcut.phtml b/app/design/frontend/base/default/template/amazonpayments/asp/shortcut.phtml deleted file mode 100644 index b51e54cd59..0000000000 --- a/app/design/frontend/base/default/template/amazonpayments/asp/shortcut.phtml +++ /dev/null @@ -1,31 +0,0 @@ - - diff --git a/app/design/frontend/base/default/template/amazonpayments/cba/form.phtml b/app/design/frontend/base/default/template/amazonpayments/cba/form.phtml deleted file mode 100644 index 66e6bd685f..0000000000 --- a/app/design/frontend/base/default/template/amazonpayments/cba/form.phtml +++ /dev/null @@ -1,32 +0,0 @@ - -getMethodCode() ?> - diff --git a/app/design/frontend/base/default/template/amazonpayments/cba/success.phtml b/app/design/frontend/base/default/template/amazonpayments/cba/success.phtml deleted file mode 100644 index 3391a32868..0000000000 --- a/app/design/frontend/base/default/template/amazonpayments/cba/success.phtml +++ /dev/null @@ -1,35 +0,0 @@ - -SUCCESS -
    -

    __('Your order has been received') ?>

    -
    -

    __('Thank you for your purchase!') ?>

    -

    __('You will receive an order confirmation email with details of your order and a link to track its progress.') ?>

    -
    - -
    diff --git a/app/design/frontend/base/default/template/amazonpayments/link.phtml b/app/design/frontend/base/default/template/amazonpayments/link.phtml deleted file mode 100644 index db3b7e6bf6..0000000000 --- a/app/design/frontend/base/default/template/amazonpayments/link.phtml +++ /dev/null @@ -1,51 +0,0 @@ - - -
  • - getIsDisabled()): ?> - getIsOneClickEnabled()): ?> - - - -
    -
    - -
    -
    - - <?php echo Mage::helper('amazonpayments')->__('Checkout by Amazon');?> - - -
  • diff --git a/app/design/frontend/base/default/template/bundle/email/order/items/creditmemo/default.phtml b/app/design/frontend/base/default/template/bundle/email/order/items/creditmemo/default.phtml index e2b04da210..8fbfe46af2 100644 --- a/app/design/frontend/base/default/template/bundle/email/order/items/creditmemo/default.phtml +++ b/app/design/frontend/base/default/template/bundle/email/order/items/creditmemo/default.phtml @@ -57,7 +57,7 @@ getValueHtml($_item)?> - getSku() ?> + htmlEscape($_item->getSku()) ?> canShowPriceInfo($_item)): ?> getQty()*1 ?> @@ -76,8 +76,8 @@ formatPrice($_item->getRowTotal()) ?> - - + + getApplied($_item)): ?>
    typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> @@ -97,15 +97,15 @@ - + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
    __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    - - + + helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
    __('Incl. Tax'); ?>: @@ -135,7 +135,7 @@ - + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    @@ -159,7 +159,7 @@ - getDescription() ?> + htmlEscape($_item->getDescription()) ?>     diff --git a/app/design/frontend/base/default/template/bundle/email/order/items/invoice/default.phtml b/app/design/frontend/base/default/template/bundle/email/order/items/invoice/default.phtml index 3a6ede197d..7cac0908a2 100644 --- a/app/design/frontend/base/default/template/bundle/email/order/items/invoice/default.phtml +++ b/app/design/frontend/base/default/template/bundle/email/order/items/invoice/default.phtml @@ -58,7 +58,7 @@ getValueHtml($_item)?> - getSku() ?> + htmlEscape($_item->getSku()) ?> canShowPriceInfo($_item)): ?> getQty()*1 ?> @@ -77,8 +77,8 @@ formatPrice($_item->getRowTotal()) ?> - - + + getApplied($_item)): ?>
    typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> @@ -98,15 +98,15 @@ - + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
    __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    - - + + helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
    __('Incl. Tax'); ?>: @@ -136,7 +136,7 @@ - + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    @@ -160,7 +160,7 @@ - getDescription() ?> + htmlEscape($_item->getDescription()) ?>     diff --git a/app/design/frontend/base/default/template/bundle/email/order/items/order/default.phtml b/app/design/frontend/base/default/template/bundle/email/order/items/order/default.phtml index 68bc250ec5..290375eb99 100644 --- a/app/design/frontend/base/default/template/bundle/email/order/items/order/default.phtml +++ b/app/design/frontend/base/default/template/bundle/email/order/items/order/default.phtml @@ -58,7 +58,7 @@ getValueHtml($_item)?> - getSku() ?> + htmlEscape($_item->getSku()) ?> getParentItem()): ?> getQtyOrdered()*1 ?> @@ -77,8 +77,8 @@ formatPrice($_item->getRowTotal()) ?> - - + + getApplied($_item)): ?>
    typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> @@ -98,15 +98,15 @@ - + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?>
    __('Total'); ?>:
    formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
    - - + + helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> helper('tax')->displaySalesBothPrices($_order->getStore())): ?>
    __('Incl. Tax'); ?>: @@ -136,7 +136,7 @@ - + typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> __('Total incl. tax'); ?>:
    formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
    diff --git a/app/design/frontend/base/default/template/bundle/email/order/items/shipment/default.phtml b/app/design/frontend/base/default/template/bundle/email/order/items/shipment/default.phtml index 4092264c35..dd682d90b3 100644 --- a/app/design/frontend/base/default/template/bundle/email/order/items/shipment/default.phtml +++ b/app/design/frontend/base/default/template/bundle/email/order/items/shipment/default.phtml @@ -56,7 +56,7 @@ getValueHtml($_item) ?> - getSku() ?> + htmlEscape($_item->getSku()) ?> isShipmentSeparately() && $_item->getParentItem()) || (!$this->isShipmentSeparately() && !$_item->getParentItem())): ?> getId()])): ?> @@ -84,7 +84,7 @@ - getDescription() ?> + htmlEscape($_item->getDescription()) ?>     diff --git a/app/design/frontend/base/default/template/bundle/sales/order/creditmemo/items/renderer.phtml b/app/design/frontend/base/default/template/bundle/sales/order/creditmemo/items/renderer.phtml index 79bb650345..163499306f 100644 --- a/app/design/frontend/base/default/template/bundle/sales/order/creditmemo/items/renderer.phtml +++ b/app/design/frontend/base/default/template/bundle/sales/order/creditmemo/items/renderer.phtml @@ -63,7 +63,7 @@
    getValueHtml($_item) ?>
    - getSku() ?> + htmlEscape($_item->getSku()) ?> canShowPriceInfo($_item)): ?> helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> @@ -313,7 +313,7 @@ - getDescription() ?> + htmlEscape($_item->getDescription()) ?> helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> __('Gift Message') ?> diff --git a/app/design/frontend/base/default/template/bundle/sales/order/invoice/items/renderer.phtml b/app/design/frontend/base/default/template/bundle/sales/order/invoice/items/renderer.phtml index 0bd44d0789..67adac1d2a 100644 --- a/app/design/frontend/base/default/template/bundle/sales/order/invoice/items/renderer.phtml +++ b/app/design/frontend/base/default/template/bundle/sales/order/invoice/items/renderer.phtml @@ -60,7 +60,7 @@
    getValueHtml($_item) ?>
    - getSku() ?> + htmlEscape($_item->getSku()) ?> canShowPriceInfo($_item)): ?> helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> @@ -339,7 +339,7 @@ - getDescription() ?> + htmlEscape($_item->getDescription()) ?> helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> __('Gift Message') ?> diff --git a/app/design/frontend/base/default/template/bundle/sales/order/items/renderer.phtml b/app/design/frontend/base/default/template/bundle/sales/order/items/renderer.phtml index 1f7d11cd4f..bf0d266bf2 100644 --- a/app/design/frontend/base/default/template/bundle/sales/order/items/renderer.phtml +++ b/app/design/frontend/base/default/template/bundle/sales/order/items/renderer.phtml @@ -59,7 +59,7 @@
    getValueHtml($_item)?>
    - splitInjection($_item->getSku()) ?> + htmlEscape(Mage::helper('core/string')->splitInjection($_item->getSku())) ?> getParentItem()): ?> helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> @@ -362,7 +362,7 @@ - getDescription() ?> + htmlEscape($_item->getDescription()) ?> helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> __('Gift Message') ?> diff --git a/app/design/frontend/base/default/template/bundle/sales/order/shipment/items/renderer.phtml b/app/design/frontend/base/default/template/bundle/sales/order/shipment/items/renderer.phtml index 0bfe6cf39a..863a27e3ce 100644 --- a/app/design/frontend/base/default/template/bundle/sales/order/shipment/items/renderer.phtml +++ b/app/design/frontend/base/default/template/bundle/sales/order/shipment/items/renderer.phtml @@ -57,7 +57,7 @@
    getValueHtml($_item) ?>
    - getSku() ?> + htmlEscape($_item->getSku()) ?> isShipmentSeparately() && $_item->getParentItem()) || (!$this->isShipmentSeparately() && !$_item->getParentItem())): ?> getId()])): ?> @@ -100,7 +100,7 @@ - getDescription() ?> + htmlEscape($_item->getDescription()) ?> helper('giftmessage/message')->getIsMessagesAvailable('order_item', $parentItem) && $parentItem->getGiftMessageId()): ?> __('Gift Message') ?> diff --git a/app/design/frontend/base/default/template/callouts/left_col.phtml b/app/design/frontend/base/default/template/callouts/left_col.phtml index 239c98c000..1429c84414 100644 --- a/app/design/frontend/base/default/template/callouts/left_col.phtml +++ b/app/design/frontend/base/default/template/callouts/left_col.phtml @@ -26,13 +26,13 @@ ?>
    diff --git a/app/design/frontend/base/default/template/callouts/right_col.phtml b/app/design/frontend/base/default/template/callouts/right_col.phtml index 43cff7eb0e..1429c84414 100644 --- a/app/design/frontend/base/default/template/callouts/right_col.phtml +++ b/app/design/frontend/base/default/template/callouts/right_col.phtml @@ -26,6 +26,14 @@ ?> diff --git a/app/design/frontend/base/default/template/catalog/category/view.phtml b/app/design/frontend/base/default/template/catalog/category/view.phtml index 70c0c7af45..d12b9b2bff 100644 --- a/app/design/frontend/base/default/template/catalog/category/view.phtml +++ b/app/design/frontend/base/default/template/catalog/category/view.phtml @@ -44,7 +44,7 @@ IsRssCatalogEnable() && $this->IsTopCategory()): ?> __('Subscribe to RSS Feed') ?> -

    categoryAttribute($_category, $this->htmlEscape($_category->getName()), 'name') ?>

    +

    categoryAttribute($_category, $_category->getName(), 'name') ?>

    getMessagesBlock()->getGroupedHtml() ?> diff --git a/app/design/frontend/base/default/template/catalog/navigation/left.phtml b/app/design/frontend/base/default/template/catalog/navigation/left.phtml index cb97836601..06d3e4b1cf 100644 --- a/app/design/frontend/base/default/template/catalog/navigation/left.phtml +++ b/app/design/frontend/base/default/template/catalog/navigation/left.phtml @@ -39,7 +39,7 @@ __('Browse By') ?>
    -
    +
    __('Category') ?>
      @@ -53,7 +53,7 @@
    - +
    diff --git a/app/design/frontend/base/default/template/catalog/navigation/top.phtml b/app/design/frontend/base/default/template/catalog/navigation/top.phtml index 1cd0a5f668..0eb8e053d8 100644 --- a/app/design/frontend/base/default/template/catalog/navigation/top.phtml +++ b/app/design/frontend/base/default/template/catalog/navigation/top.phtml @@ -31,12 +31,14 @@ * @see Mage_Catalog_Block_Navigation */ ?> -getStoreCategories()) > 0): ?> + +getStoreCategories() as $_category): ?> + drawItem($_category) ?> + + - + diff --git a/app/design/frontend/base/default/template/catalog/product/compare/list.phtml b/app/design/frontend/base/default/template/catalog/product/compare/list.phtml index 90233bcaad..8efc14c25e 100644 --- a/app/design/frontend/base/default/template/catalog/product/compare/list.phtml +++ b/app/design/frontend/base/default/template/catalog/product/compare/list.phtml @@ -114,7 +114,7 @@   - getPriceHtml($_item, false, '-compare-list-bottom') ?> + getPriceHtml($_item, true, '-compare-list-bottom') ?> isSaleable()): ?>

    diff --git a/app/design/frontend/base/default/template/catalog/product/list.phtml b/app/design/frontend/base/default/template/catalog/product/list.phtml index d09818a3ef..e9ec09109e 100644 --- a/app/design/frontend/base/default/template/catalog/product/list.phtml +++ b/app/design/frontend/base/default/template/catalog/product/list.phtml @@ -59,7 +59,7 @@

    __('Out of stock') ?>

    - getShortDescription()) ?> + htmlEscape($_product->getShortDescription())) ?> __('Learn More') ?>
    + + + + - -getToolbarHtml() ?> +
    + getToolbarHtml() ?> +
    + diff --git a/app/design/frontend/default/modern/template/catalog/product/list/related.phtml b/app/design/frontend/default/modern/template/catalog/product/list/related.phtml deleted file mode 100644 index 9fa6e21d49..0000000000 --- a/app/design/frontend/default/modern/template/catalog/product/list/related.phtml +++ /dev/null @@ -1,97 +0,0 @@ - -getItems()->getSize()): ?> - - - diff --git a/app/design/frontend/default/modern/template/catalog/product/list/toolbar.phtml b/app/design/frontend/default/modern/template/catalog/product/list/toolbar.phtml deleted file mode 100644 index 985d6e4c0b..0000000000 --- a/app/design/frontend/default/modern/template/catalog/product/list/toolbar.phtml +++ /dev/null @@ -1,92 +0,0 @@ - - -getCollection()->getSize()): ?> - - - - getPagerHtml()): ?> - - - - -
    - getLastPageNum()>1): ?> - __('Items %s to %s of %s total', $this->getFirstNum(), $this->getLastNum(), $this->getTotalNum()) ?> - - __('%s Item(s)', $this->getTotalNum()) ?> - - - - - __('Show') ?> __('per page') ?> -
    - isExpanded() ): ?> - - - isEnabledViewSwitcher() ): ?> - - - - helper('rss/catalog')->getTagFeedUrl()): ?> - - - -
    - getModes(); ?> - 1): ?> - __('View as') ?>: - getModes() as $_code=>$_label): ?> - isModeActive($_code)): ?> -   - -   - - - - - __('Sort by') ?>: - - getAvailableOrders() as $_key=>$_order): ?> - isOrderCurrent($_key)): ?> class="active">getAvailableOrders())):?>| - - - __('Subscribe to Feed') ?>
    - - diff --git a/app/design/frontend/default/modern/template/catalog/product/list/upsell.phtml b/app/design/frontend/default/modern/template/catalog/product/list/upsell.phtml index 9a733deb7f..e368c3bbf5 100644 --- a/app/design/frontend/default/modern/template/catalog/product/list/upsell.phtml +++ b/app/design/frontend/default/modern/template/catalog/product/list/upsell.phtml @@ -25,9 +25,9 @@ */ ?> getItemCollection()->getItems())): ?> -
    -

    __('You may also be interested in the following product(s)') ?>

    - +
    +

    __('You may also be interested in the following product(s)') ?>

    +
    setColumnCount(5); // uncomment this line if you want to have another number of columns. also can be changed in layout ?> resetItemsIterator() ?> getRowCount();$_i++): ?> @@ -35,13 +35,13 @@ getColumnCount();$_j++): ?> getIterableItem()): ?> - + diff --git a/app/design/frontend/default/modern/template/catalog/product/new.phtml b/app/design/frontend/default/modern/template/catalog/product/new.phtml deleted file mode 100644 index 2993f1ceae..0000000000 --- a/app/design/frontend/default/modern/template/catalog/product/new.phtml +++ /dev/null @@ -1,67 +0,0 @@ - -getProductCollection()) && $_products->getSize()): ?> -
    -
    -

    __('New Products') ?>

    -
    -
    -

    <?php echo $this->htmlEscape($_link->getName()) ?>

    -
    htmlEscape($_link->getName()) ?>
    + <?php echo $this->htmlEscape($_link->getName()) ?> +

    htmlEscape($_link->getName()) ?>

    getPriceHtml($_link, true, '-upsell') ?> getReviewsSummaryHtml($_link) ?>
      
    - - getItems() as $_product): ?> - =4): continue; endif; ?> - - - - - - - -
    -

    - <?php echo $this->htmlEscape($_product->getName()) ?> -

    -

    htmlEscape($_product->getName()) ?>

    - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-new') ?> - isSaleable()): ?> - <?php echo $this->__('Add to Cart') ?> - -
    __('Out of stock') ?>
    - -
    - -
     
    - -
    - diff --git a/app/design/frontend/default/modern/template/catalog/product/price.phtml b/app/design/frontend/default/modern/template/catalog/product/price.phtml deleted file mode 100644 index 4936a2d216..0000000000 --- a/app/design/frontend/default/modern/template/catalog/product/price.phtml +++ /dev/null @@ -1,350 +0,0 @@ - - - - -getProduct() ?> -getId() ?> - - - -helper('tax')->displayPriceIncludingTax() || $this->helper('tax')->displayBothPrices()); ?> - -getMinimalPrice() ?> -helper('tax')->getPrice($_product, $_minimalPriceValue, $simplePricesTax) ?> - -isGrouped()): ?> - getAmountForDisplay($_product); ?> - typeOfDisplay($_product, array(1,2,4))): ?> - getAmount($_product); ?> - getProductWeeeAttributesForDisplay($_product); ?> - - -
    - helper('tax')->getPrice($_product, $_product->getPrice()) ?> - helper('tax')->getPrice($_product, $_product->getPrice(), $simplePricesTax) ?> - helper('tax')->getPrice($_product, $_product->getFinalPrice()) ?> - helper('tax')->getPrice($_product, $_product->getFinalPrice(), true) ?> - getPriceDisplayType(); ?> - - helper('tax')->displayBothPrices()): ?> - typeOfDisplay($_product, 0)): // including ?> - - __('Excl. Tax:') ?> - currency($_price+$_weeeTaxAmount,true,false) ?> - - - __('Incl. Tax:') ?> - currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?> - - typeOfDisplay($_product, 1)): // incl. + weee ?> - - __('Excl. Tax:') ?> - currency($_price+$_weeeTaxAmount,true,false) ?> - - - __('Incl. Tax:') ?> - currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?> -
    - ( - - - getName(); ?>: currency($_weeeTaxAttribute->getAmount(), true, true); ?> - - - ) -
    - typeOfDisplay($_product, 4)): // incl. + weee ?> - - __('Excl. Tax:') ?> - currency($_price+$_weeeTaxAmount,true,false) ?> - - - __('Incl. Tax:') ?> - currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?> -
    - ( - - - getName(); ?>: currency($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), true, true); ?> - - - ) -
    - typeOfDisplay($_product, 2)): // excl. + weee + final ?> - - __('Excl. Tax:') ?> - currency($_price,true,false) ?> - - - - - getName(); ?>: currency($_weeeTaxAttribute->getAmount(), true, true); ?> - - -
    - - - __('Incl. Tax:') ?> - currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?> - - - - __('Excl. Tax:') ?> - currency($_price,true,false) ?> - - - __('Incl. Tax:') ?> - currency($_finalPriceInclTax,true,false) ?> - - - - typeOfDisplay($_product, 0)): // including ?> - currency($_price+$_weeeTaxAmount,true,true) ?> - typeOfDisplay($_product, 1)): // incl. + weee ?> - currency($_price+$_weeeTaxAmount,true,true) ?> -
    - ( - - - getName(); ?>: currency($_weeeTaxAttribute->getAmount(), true, true); ?> - - - ) - typeOfDisplay($_product, 4)): // incl. + weee ?> - currency($_price+$_weeeTaxAmount,true,true) ?> -
    - ( - - - getName(); ?>: currency($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), true, true); ?> - - - ) - typeOfDisplay($_product, 2)): // excl. + weee + final ?> - currency($_price,true,true) ?>
    - - - - getName(); ?>: currency($_weeeTaxAttribute->getAmount(), true, true); ?> - - -
    - - currency($_price+$_weeeTaxAmount,true,true) ?> - - currency($_price,true,true) ?> - - - - getOriginalAmount($_product); ?> - - typeOfDisplay($_product, 0)): // including ?> -

    - __('Regular Price:') ?> - currency($_regularPrice+$_originalWeeeTaxAmount,true,false) ?> -

    - - helper('tax')->displayBothPrices()): ?> -

    - __('Special Price:') ?> - - __('Excl. Tax:') ?> - currency($_finalPrice+$_weeeTaxAmount,true,false) ?> - - - __('Incl. Tax:') ?> - currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?> - -

    - -

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

    - - - typeOfDisplay($_product, 1)): // incl. + weee ?> -

    - __('Regular Price:') ?> - currency($_regularPrice+$_originalWeeeTaxAmount,true,false) ?> -

    - -

    - __('Special Price:') ?> - - __('Excl. Tax:') ?> - currency($_finalPrice+$_weeeTaxAmount,true,false) ?> - -
    - ( - - - getName(); ?>: currency($_weeeTaxAttribute->getAmount(), true, true); ?> - - - ) - - __('Incl. Tax:') ?> - currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?> - -

    - typeOfDisplay($_product, 4)): // incl. + weee ?> -

    - __('Regular Price:') ?> - currency($_regularPrice+$_originalWeeeTaxAmount,true,false) ?> -

    - -

    - __('Special Price:') ?> - - __('Excl. Tax:') ?> - currency($_finalPrice+$_weeeTaxAmount,true,false) ?> - -
    - ( - - - getName(); ?>: currency($_weeeTaxAttribute->getAmount()+$_weeeTaxAttribute->getTaxAmount(), true, true); ?> - - - ) - - __('Incl. Tax:') ?> - currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?> - -

    - typeOfDisplay($_product, 2)): // excl. + weee + final ?> -

    - __('Regular Price:') ?> - currency($_regularPrice,true,false) ?> -

    - -

    - __('Special Price:') ?> - - __('Excl. Tax:') ?> - currency($_finalPrice,true,false) ?> - - - - - getName(); ?>: currency($_weeeTaxAttribute->getAmount(), true, true); ?> - - -
    - - - __('Incl. Tax:') ?> - currency($_finalPriceInclTax+$_weeeTaxAmount,true,false) ?> - -

    - -

    - __('Regular Price:') ?> - currency($_regularPrice,true,false) ?> -

    - - helper('tax')->displayBothPrices()): ?> -

    - __('Special Price:') ?> - - __('Excl. Tax:') ?> - currency($_finalPrice,true,false) ?> - - - __('Incl. Tax:') ?> - currency($_finalPriceInclTax,true,false) ?> - -

    - -

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

    - - - - - - getDisplayMinimalPrice() && $_minimalPriceValue && $_minimalPriceValue < $_product->getFinalPrice()): ?> - - - typeOfDisplay($_product, array(0, 1, 4))): ?> - - - - getUseLinkForAsLowAs()):?> - - - - - __('As low as:') ?> - currency($_minimalPriceDisplayValue,true,false) ?> - getUseLinkForAsLowAs()):?> - - - - - getDisplayMinimalPrice() && $_minimalPrice && $_minimalPrice < $_finalPrice): */ ?> -
    - -isGrouped()): */ ?> - helper('tax')->getPrice($_product, $_minimalPriceValue, $includingTax = null); - $_inclTax = $this->helper('tax')->getPrice($_product, $_minimalPriceValue, $includingTax = true); - ?> - getDisplayMinimalPrice() && $_minimalPriceValue): ?> -
    - __('Starting at:') ?> - helper('tax')->displayBothPrices()): ?> - - __('Excl. Tax:') ?> - currency($_exclTax, true, false) ?> - - - __('Incl. Tax:') ?> - currency($_inclTax, true, false) ?> - - - helper('tax')->displayPriceIncludingTax()) { - $_showPrice = $_exclTax; - } - ?> - currency($_showPrice, true, false) ?> - -
    - getDisplayMinimalPrice() && $_minimalPrice): */ ?> -isGrouped()): */ ?> diff --git a/app/design/frontend/default/modern/template/catalog/product/view.phtml b/app/design/frontend/default/modern/template/catalog/product/view.phtml index cd09b5d0cc..bffffcc79a 100644 --- a/app/design/frontend/default/modern/template/catalog/product/view.phtml +++ b/app/design/frontend/default/modern/template/catalog/product/view.phtml @@ -35,70 +35,84 @@ $_helper = $this->helper('catalog/output'); $_product = $this->getProduct(); ?> -
    getMessagesBlock()->getGroupedHtml() ?>
    -
    getOptions()): ?> enctype="multipart/form-data"> -
    - getChildHtml('media') ?> +
    +
    + getOptions()): ?> enctype="multipart/form-data"> +
    + +
    -
    -

    productAttribute($_product, $this->htmlEscape($_product->getName()), 'name') ?>

    +
    +
    +

    productAttribute($_product, $_product->getName(), 'name') ?>

    +
    canEmailToFriend()): ?> - __('Email to a Friend') ?>
    + getReviewsSummaryHtml($_product, false, true)?> - -
    - - -
    getChildHtml('alert_urls') ?> getChildHtml('product_type_data') ?> - getChildHtml('tierprices') ?> + getTierPriceHtml() ?> hasOptions()):?> -
    - isSaleable()): ?> - getChildHtml('addtocart') ?> - - getChildHtml('addto') ?> +
    + isSaleable()): ?> + getChildHtml('addtocart') ?> + helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product)): ?> + __('OR') ?> + + + getChildHtml('addto') ?>
    getChildHtml('addto') ?> getShortDescription()):?> -

    __('Quick Overview') ?>

    -
    productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?>
    +
    +

    __('Quick Overview') ?>

    +
    productAttribute($_product, nl2br($_product->getShortDescription()), 'short_description') ?>
    +
    getChildHtml('other');?> isSaleable() && $this->hasOptions()):?> getChildChildHtml('container1', '', true, true) ?> - + +
    -
    + +
    + getChildHtml('media') ?> +
    + +
    isSaleable() && $this->hasOptions()):?> getChildChildHtml('container2', '', true, true) ?> - - - + + + +
    + +
    + getChildHtml('info_tabs') ?> + getChildHtml('product_additional_data') ?> +
    -

    -getChildHtml('info_tabs') ?> diff --git a/app/design/frontend/default/modern/template/catalog/product/view/additional.phtml b/app/design/frontend/default/modern/template/catalog/product/view/additional.phtml deleted file mode 100644 index 20c3347baf..0000000000 --- a/app/design/frontend/default/modern/template/catalog/product/view/additional.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -getChildHtmlList() as $_html): ?> -
    - -
    - diff --git a/app/design/frontend/default/modern/template/catalog/product/view/addto.phtml b/app/design/frontend/default/modern/template/catalog/product/view/addto.phtml deleted file mode 100644 index 0ba591c364..0000000000 --- a/app/design/frontend/default/modern/template/catalog/product/view/addto.phtml +++ /dev/null @@ -1,39 +0,0 @@ - - -getProduct() ?> - -helper('wishlist')->isAllow() || $_compareUrl=$this->helper('catalog/product_compare')->getAddUrl($_product) ) : ?> - - diff --git a/app/design/frontend/default/modern/template/catalog/product/view/addtocart.phtml b/app/design/frontend/default/modern/template/catalog/product/view/addtocart.phtml deleted file mode 100644 index 782ab3230d..0000000000 --- a/app/design/frontend/default/modern/template/catalog/product/view/addtocart.phtml +++ /dev/null @@ -1,39 +0,0 @@ - - -getProduct() ?> - -isSaleable()): ?> -
    - __('Add Items to Cart') ?> - isGrouped()): ?> - - - - isGrouped()): ?> class="right"><?php echo $this->__('Add to Cart') ?> -
    - diff --git a/app/design/frontend/default/modern/template/catalog/product/view/attributes.phtml b/app/design/frontend/default/modern/template/catalog/product/view/attributes.phtml deleted file mode 100644 index c4c5a8c5dd..0000000000 --- a/app/design/frontend/default/modern/template/catalog/product/view/attributes.phtml +++ /dev/null @@ -1,49 +0,0 @@ - -helper('catalog/output'); - $_product = $this->getProduct() -?> -getAdditionalData()): ?> -
    - - - - - - - -
    __($_data['label']) ?>productAttribute($_product, $_data['value'], $_data['code']) ?>
    - -
    - diff --git a/app/design/frontend/default/modern/template/catalog/product/view/description.phtml b/app/design/frontend/default/modern/template/catalog/product/view/description.phtml deleted file mode 100644 index 5073138510..0000000000 --- a/app/design/frontend/default/modern/template/catalog/product/view/description.phtml +++ /dev/null @@ -1,35 +0,0 @@ - -
    -helper('catalog/output')->productAttribute($this->getProduct(), nl2br($this->getProduct()->getDescription()), 'description') ?> -
    diff --git a/app/design/frontend/default/modern/template/catalog/product/view/media.phtml b/app/design/frontend/default/modern/template/catalog/product/view/media.phtml index 9044368a91..77cef0c2ca 100644 --- a/app/design/frontend/default/modern/template/catalog/product/view/media.phtml +++ b/app/design/frontend/default/modern/template/catalog/product/view/media.phtml @@ -41,36 +41,36 @@ echo $_helper->productAttribute($_product, $_img, 'image'); ?>

    -

    __('Double click on above image to view full picture') ?>

    -
    - <?php echo $this->__('Zoom Out') ?> +

    __('Double click on above image to view full picture') ?>

    +
    + <?php echo $this->__('Zoom Out') ?>
    - <?php echo $this->__('Zoom In') ?> + <?php echo $this->__('Zoom In') ?>

    helper('catalog/image')->init($_product, 'image')->resize(300).'" alt="'.$this->htmlEscape($_product->getImageLabel()).'"/>'; + $_img = ''.$this->htmlEscape($this->getImageLabel()).''; echo $_helper->productAttribute($_product, $_img, 'image'); ?>

    getGalleryImages()) > 0): ?>
    -

    __('More Views') ?>

    +

    __('More Views') ?>

      getGalleryImages() as $_image): ?>
    • - - <?php echo $this->htmlEscape($_image->getLabel()) ?> - + <?php echo $this->htmlEscape($_image->getLabel()) ?>
    diff --git a/app/design/frontend/default/modern/template/catalog/product/view/price.phtml b/app/design/frontend/default/modern/template/catalog/product/view/price.phtml deleted file mode 100644 index 1e76dcd0bd..0000000000 --- a/app/design/frontend/default/modern/template/catalog/product/view/price.phtml +++ /dev/null @@ -1,30 +0,0 @@ - -
    - __('Old Price:') ?> getPrice() ?>
    - getPrice() ?> -
    diff --git a/app/design/frontend/default/modern/template/catalog/product/view/price_clone.phtml b/app/design/frontend/default/modern/template/catalog/product/view/price_clone.phtml deleted file mode 100644 index 55559ae3ac..0000000000 --- a/app/design/frontend/default/modern/template/catalog/product/view/price_clone.phtml +++ /dev/null @@ -1,28 +0,0 @@ - -getProduct() ?> -getPriceHtml($_product, false, '_clone') ?> diff --git a/app/design/frontend/default/modern/template/catalog/product/view/tabs.phtml b/app/design/frontend/default/modern/template/catalog/product/view/tabs.phtml index ba7f4cc791..e3a65fcf52 100644 --- a/app/design/frontend/default/modern/template/catalog/product/view/tabs.phtml +++ b/app/design/frontend/default/modern/template/catalog/product/view/tabs.phtml @@ -30,21 +30,20 @@ * @see Mage_Catalog_Block_Product_View */ ?> -
      +
        getTabs() as $_index => $_tab): ?> getChildHtml($_tab['alias'])): ?> -
      • >
      • +
      -
      - getTabs() as $_index => $_tab): ?> - getChildHtml($_tab['alias'])): ?> -
      getChildHtml($_tab['alias']) ?>
      - - -
      +getTabs() as $_index => $_tab): ?> + getChildHtml($_tab['alias'])): ?> +
      getChildHtml($_tab['alias']) ?>
      + + diff --git a/app/design/frontend/default/modern/template/catalog/product/view/tierprices.phtml b/app/design/frontend/default/modern/template/catalog/product/view/tierprices.phtml deleted file mode 100644 index 8ad08e2c63..0000000000 --- a/app/design/frontend/default/modern/template/catalog/product/view/tierprices.phtml +++ /dev/null @@ -1,181 +0,0 @@ - - -getProduct(); -$_tierPrices = $this->getTierPrices(); -$_finalPriceInclTax = $this->helper('tax')->getPrice($_product, $_product->getFinalPrice(), true); - -$_weeeTaxAmount = Mage::helper('weee')->getAmountForDisplay($_product); -if (Mage::helper('weee')->typeOfDisplay($_product, array(1,2,4))) { - $_weeeTaxAttributes = Mage::helper('weee')->getProductWeeeAttributesForDisplay($_product); -} - -?> - 0): ?> -
        - getInGrouped()): ?> - getTierPrices($_product); ?> - - processTierPrices($_product, $_tierPrices); ?> - - - helper('tax')->displayBothPrices()): ?> - typeOfDisplay($_product, 0)): ?> -
      • __('Buy %1$s for %2$s (%3$s incl. tax) each', $_price['price_qty'], $_price['formated_price_incl_weee_only'], $_price['formated_price_incl_weee']) ?> - typeOfDisplay($_product, 1)): ?> -
      • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?> - - ( - __('%1$s incl tax.', $_price['formated_price_incl_weee']); ?> - - - getName(); ?>: currency($_attribute->getAmount()); ?> - - ) - - __('each') ?> - typeOfDisplay($_product, 4)): ?> -
      • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?> - - ( - __('%1$s incl tax.', $_price['formated_price_incl_weee']); ?> - - - getName(); ?>: currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?> - - ) - - __('each') ?> - typeOfDisplay($_product, 2)): ?> -
      • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price']); ?> - - ( - - getName(); ?>: currency($_attribute->getAmount()); ?> - - __('Total incl. Tax: %1$s', $_price['formated_price_incl_weee']); ?> - ) - - __('each') ?> - -
      • __('Buy %1$s for %2$s (%3$s incl. tax) each', $_price['price_qty'], $_price['formated_price'], $_price['formated_price_incl_tax']) ?> - - - helper('tax')->displayPriceIncludingTax()): ?> - typeOfDisplay($_product, 0)): ?> -
      • __('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_weee']) ?> - typeOfDisplay($_product, 1)): ?> -
      • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee']); ?> - - ( - - - getName(); ?>: currency($_attribute->getAmount()); ?> - - ) - - __('each') ?> - typeOfDisplay($_product, 4)): ?> -
      • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee']); ?> - - ( - - - getName(); ?>: currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?> - - ) - - __('each') ?> - typeOfDisplay($_product, 2)): ?> -
      • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_tax']); ?> - - ( - - getName(); ?>: currency($_attribute->getAmount()); ?> - - __('Total incl. Tax: %1$s', $_price['formated_price_incl_weee']); ?> - ) - - __('each') ?> - -
      • __('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_tax']) ?> - - - typeOfDisplay($_product, 0)): ?> -
      • __('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price_incl_weee_only']) ?> - typeOfDisplay($_product, 1)): ?> -
      • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?> - - ( - - - getName(); ?>: currency($_attribute->getAmount()); ?> - - ) - - __('each') ?> - typeOfDisplay($_product, 4)): ?> -
      • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price_incl_weee_only']); ?> - - ( - - - getName(); ?>: currency($_attribute->getAmount()+$_attribute->getTaxAmount()); ?> - - ) - - __('each') ?> - typeOfDisplay($_product, 2)): ?> -
      • __('Buy %1$s for %2$s', $_price['price_qty'], $_price['formated_price']); ?> - - ( - - getName(); ?>: currency($_attribute->getAmount()); ?> - - __('Total incl. Tax: %1$s', $_price['formated_price_incl_weee_only']); ?> - ) - - __('each') ?> - -
      • __('Buy %1$s for %2$s each', $_price['price_qty'], $_price['formated_price']) ?> - - - - getInGrouped()): ?> - getPrice() == $_product->getFinalPrice() && $_product->getPrice() > $_price['price']) - || ($_product->getPrice() != $_product->getFinalPrice() && $_product->getFinalPrice() > $_price['price'])): ?> - __('and') ?> __('save')?> % - - -
      • - -
      - diff --git a/app/design/frontend/default/modern/template/catalog/product/view/type/configurable.phtml b/app/design/frontend/default/modern/template/catalog/product/view/type/configurable.phtml deleted file mode 100644 index 198c45a2cf..0000000000 --- a/app/design/frontend/default/modern/template/catalog/product/view/type/configurable.phtml +++ /dev/null @@ -1,41 +0,0 @@ - -getProduct() ?> - -isSaleable()): ?> -

      __('Availability: In stock.') ?>

      - -

      __('Availability: Out of stock.') ?>

      - - -getPriceHtml($_product) ?> diff --git a/app/design/frontend/default/modern/template/catalog/product/view/type/grouped.phtml b/app/design/frontend/default/modern/template/catalog/product/view/type/grouped.phtml deleted file mode 100644 index 0fbe895814..0000000000 --- a/app/design/frontend/default/modern/template/catalog/product/view/type/grouped.phtml +++ /dev/null @@ -1,80 +0,0 @@ - -getProduct() ?> -getAssociatedProducts() ?> -isSaleable() && count($_associatedProducts)): ?> -

      __('Availability: In stock.') ?>

      - -

      __('Availability: Out of stock.') ?>

      - - - - - - - - - - isSaleable()): ?> - - - - - - - - - - - isSaleable()): ?> - - - - - - - - - - -
      __('Product Name') ?>__('Price') ?>__('Qty') ?>
      htmlEscape($_item->getName()) ?> - getPriceHtml($_item, true) ?> - - isSaleable()) : ?> - - - __('Out of stock.') ?> - -
      __('No options of this product are available.') ?>
      - diff --git a/app/design/frontend/default/modern/template/catalog/product/view/type/simple.phtml b/app/design/frontend/default/modern/template/catalog/product/view/type/simple.phtml deleted file mode 100644 index 1469fb00be..0000000000 --- a/app/design/frontend/default/modern/template/catalog/product/view/type/simple.phtml +++ /dev/null @@ -1,41 +0,0 @@ - -getProduct() ?> - -isSaleable()): ?> -

      __('Availability: In stock.') ?>

      - -

      __('Availability: Out of stock.') ?>

      - - -getPriceHtml($_product) ?> diff --git a/app/design/frontend/default/modern/template/catalog/product/view/type/virtual.phtml b/app/design/frontend/default/modern/template/catalog/product/view/type/virtual.phtml deleted file mode 100644 index 1469fb00be..0000000000 --- a/app/design/frontend/default/modern/template/catalog/product/view/type/virtual.phtml +++ /dev/null @@ -1,41 +0,0 @@ - -getProduct() ?> - -isSaleable()): ?> -

      __('Availability: In stock.') ?>

      - -

      __('Availability: Out of stock.') ?>

      - - -getPriceHtml($_product) ?> diff --git a/app/design/frontend/default/modern/template/catalog/seo/sitemap.phtml b/app/design/frontend/default/modern/template/catalog/seo/sitemap.phtml deleted file mode 100644 index af37dccf66..0000000000 --- a/app/design/frontend/default/modern/template/catalog/seo/sitemap.phtml +++ /dev/null @@ -1,45 +0,0 @@ - - -getCollection(); ?> -getSize()): ?> -
      - -
      - -
      - __('There are no %s available.', $this->getItemsTitle()); ?> -
      - diff --git a/app/design/frontend/default/modern/template/catalog/seo/sitemap/container.phtml b/app/design/frontend/default/modern/template/catalog/seo/sitemap/container.phtml deleted file mode 100644 index 28ed99f005..0000000000 --- a/app/design/frontend/default/modern/template/catalog/seo/sitemap/container.phtml +++ /dev/null @@ -1,36 +0,0 @@ - -
      -

      getTitle() ?>

      -
      -
      - getChildHtml('links') ?> -
      -
      -getChildHtml('pager_top') ?> -getChildHtml('sitemap') ?> -getChildHtml('pager_bottom') ?> diff --git a/app/design/frontend/default/modern/template/catalog/seo/tree.phtml b/app/design/frontend/default/modern/template/catalog/seo/tree.phtml deleted file mode 100644 index 7dc5482130..0000000000 --- a/app/design/frontend/default/modern/template/catalog/seo/tree.phtml +++ /dev/null @@ -1,43 +0,0 @@ - - -getCollection(); ?> -getSize()): ?> -
        - -
      • getLevel($_item)?'style="padding-left:' . $this->getLevel($_item, 2) . '0px;"':'' ?>>name ?>
      • - -
      - -

      - __('There are no %s available.', $this->getItemsTitle()); ?> -

      - diff --git a/app/design/frontend/default/modern/template/catalogsearch/advanced/form.phtml b/app/design/frontend/default/modern/template/catalogsearch/advanced/form.phtml deleted file mode 100644 index f4ec5a062b..0000000000 --- a/app/design/frontend/default/modern/template/catalogsearch/advanced/form.phtml +++ /dev/null @@ -1,94 +0,0 @@ - - -
      -
      -

      __('Catalog Advanced Search') ?>

      -
      -getMessagesBlock()->getGroupedHtml() ?> -
      - -
      - -
      -
      - -
      -
      diff --git a/app/design/frontend/default/modern/template/catalogsearch/advanced/result.phtml b/app/design/frontend/default/modern/template/catalogsearch/advanced/result.phtml deleted file mode 100644 index 7d875b6598..0000000000 --- a/app/design/frontend/default/modern/template/catalogsearch/advanced/result.phtml +++ /dev/null @@ -1,68 +0,0 @@ - -
      -
      -

      __('Catalog Advanced Search') ?>

      -
      -getMessagesBlock()->getGroupedHtml() ?> -getResultCount()): ?> -
      - helper('catalogsearch') - ->__('%d item(s) were found using the following search criteria', $this->getResultCount()); ?> -
      - -
      helper('catalogsearch')->__('No items were found using the following search criteria.'); ?> helper('catalogsearch')->__('Modify your search'); ?>
      - - -getSearchCriterias(); ?> -
      - - -
        - -
      • htmlEscape($this->helper('catalog')->__($criteria['name'])); ?>: htmlEscape($criteria['value']); ?>
      • - -
      - - - - getResultCount()): ?> -
      - helper('catalogsearch')->__("Don't see what you're looking for?"); ?> - helper('catalogsearch')->__('Modify your search'); ?> -
      - -
      -
      - -
      - -
      -getResultCount()): ?> - getProductListHtml() ?> - -getSearchCriterias(); ?> diff --git a/app/design/frontend/default/modern/template/catalogsearch/form.mini.phtml b/app/design/frontend/default/modern/template/catalogsearch/form.mini.phtml index 1c7510cb29..dd5aeb8ceb 100644 --- a/app/design/frontend/default/modern/template/catalogsearch/form.mini.phtml +++ b/app/design/frontend/default/modern/template/catalogsearch/form.mini.phtml @@ -24,19 +24,17 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> - diff --git a/app/design/frontend/default/modern/template/catalogsearch/result.phtml b/app/design/frontend/default/modern/template/catalogsearch/result.phtml deleted file mode 100644 index 1aeb4da197..0000000000 --- a/app/design/frontend/default/modern/template/catalogsearch/result.phtml +++ /dev/null @@ -1,52 +0,0 @@ - -getResultCount()): ?> -getMessagesBlock()->getGroupedHtml() ?> -
      -

      getHeaderText() || $this->getHeaderText() === false) ? $this->getHeaderText() : $this->__("Search results for '%s'", $this->helper('catalogsearch')->getEscapedQueryText()) ?>

      -
      - getNoteMessages()):?> -
      - -
      - -
      - - getProductListHtml() ?> - -
      -

      getHeaderText() || $this->getHeaderText() === false) ? $this->getHeaderText() : $this->__("Search results for '%s'", $this->helper('catalogsearch')->getEscapedQueryText()) ?>

      -
      -
      - getNoResultText()) ? $this->getNoResultText() : $this->__('Your search returns no results.') ?> - getNoteMessages()):?> - -
      - - -
      - diff --git a/app/design/frontend/default/modern/template/catalogsearch/term.phtml b/app/design/frontend/default/modern/template/catalogsearch/term.phtml deleted file mode 100644 index c14df87e3b..0000000000 --- a/app/design/frontend/default/modern/template/catalogsearch/term.phtml +++ /dev/null @@ -1,44 +0,0 @@ - -
      -

      __('Popular Search Terms') ?>

      -
      -getTerms()) > 0 ): ?> -
      -
      - -
      -
      - -
      - __('There are no search terms available.'); ?> -
      - diff --git a/app/design/frontend/default/modern/template/checkout/cart.phtml b/app/design/frontend/default/modern/template/checkout/cart.phtml index 21b7834d28..ed57e6a376 100644 --- a/app/design/frontend/default/modern/template/checkout/cart.phtml +++ b/app/design/frontend/default/modern/template/checkout/cart.phtml @@ -31,91 +31,105 @@ * @see Mage_Checkout_Block_Cart */ ?> -
      -

      __('Shopping Cart') ?>

      -
      -getMessagesBlock()->getGroupedHtml() ?> -
      - - - -helper('wishlist')->isAllowInCart()) : ?> - - -helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - -helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - - -helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - -helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - - - -helper('tax')->displayCartBothPrices() ? 2 : 1); ?> - - - - - helper('wishlist')->isAllowInCart()) : ?> - - - - - - - - helper('tax')->displayCartBothPrices()): ?> - - - - - - - - - - - - - - - getItems() as $_item): ?> - getItemHtml($_item) ?> - - -
       __('Product Name') ?>__('Move to Wishlist') ?>__('Unit Price') ?>__('Qty') ?>__('Subtotal') ?>__('Remove') ?>
      helper('tax')->getIncExcTaxLabel(false) ?>helper('tax')->getIncExcTaxLabel(true) ?>helper('tax')->getIncExcTaxLabel(false) ?>helper('tax')->getIncExcTaxLabel(true) ?>
      - getContinueShoppingUrl()): ?> - __('Continue Shopping') ?> - - -
      - -
      -
      - getChildHtml('crosssell') ?> - -
      -
      - getChildHtml('coupon') ?> -
      - getIsVirtual()): echo $this->getChildHtml('shipping'); endif; ?> -
      -
      - getChildHtml('totals'); ?> - -
      +
      +
      +

      __('Shopping Cart') ?>

      hasError()): ?>
        - getChildHtml('methods') ?> + getChildHtml('top_methods') ?>
      -
      + getMessagesBlock()->getGroupedHtml() ?> + getChildHtml('form_before') ?> +
      +
      + + + + + helper('wishlist')->isAllowInCart()) : ?> + + + helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> + + + helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> + + + + helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> + + + helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> + + -
      + helper('tax')->displayCartBothPrices() ? 2 : 1); ?> + + + + + + helper('wishlist')->isAllowInCart()) : ?> + + + + + + + helper('tax')->displayCartBothPrices()): ?> + + + + + + + + + + + + + + + getItems() as $_item): ?> + getItemHtml($_item) ?> + + +
        __('Product Name') ?>__('Move to Wishlist') ?>__('Unit Price') ?>__('Qty') ?>__('Subtotal') ?>
      helper('tax')->getIncExcTaxLabel(false) ?>helper('tax')->getIncExcTaxLabel(true) ?>helper('tax')->getIncExcTaxLabel(false) ?>helper('tax')->getIncExcTaxLabel(true) ?>
      + getContinueShoppingUrl()): ?> + + + +
      + +
      +
      +
      +
      +
      + getChildHtml('crosssell')): ?> + + +
      + + +
      + +
      +
      + getChildHtml('coupon') ?> + getIsVirtual()): echo $this->getChildHtml('shipping'); endif; ?> +
      + getChildHtml('totals'); ?> + hasError()): ?> +
        + getChildHtml('methods') ?> +
      + +
      +
      +
      +
      +
      diff --git a/app/design/frontend/default/modern/template/checkout/cart/coupon.phtml b/app/design/frontend/default/modern/template/checkout/cart/coupon.phtml deleted file mode 100644 index 03f2ae5a47..0000000000 --- a/app/design/frontend/default/modern/template/checkout/cart/coupon.phtml +++ /dev/null @@ -1,52 +0,0 @@ - -
      -
      -

      __('Discount Codes') ?>

      -
      - - getCouponCode())): ?> - -   - -  <?php echo $this->__('Cancel Coupon') ?> -
      -
      -
      - diff --git a/app/design/frontend/default/modern/template/checkout/cart/crosssell.phtml b/app/design/frontend/default/modern/template/checkout/cart/crosssell.phtml deleted file mode 100644 index f3acf12c94..0000000000 --- a/app/design/frontend/default/modern/template/checkout/cart/crosssell.phtml +++ /dev/null @@ -1,63 +0,0 @@ - - -getItemCount()): ?> -
      -

      __('Based on your selection, you may be interested in the following items:') ?>

      - -
      - -
      -

      -

      -
      - diff --git a/app/design/frontend/default/modern/template/checkout/cart/item/default.phtml b/app/design/frontend/default/modern/template/checkout/cart/item/default.phtml deleted file mode 100644 index 1fdd83b675..0000000000 --- a/app/design/frontend/default/modern/template/checkout/cart/item/default.phtml +++ /dev/null @@ -1,269 +0,0 @@ - -getItem()?> - - - hasProductUrl()):?> - <?php echo $this->htmlEscape($this->getProductName()) ?> - hasProductUrl()):?> - - -

      hasProductUrl()):?> - getProductName() ?> - - getProductName() ?> -

      - - - getOptionList()):?> -
      - - getFormatedOptionValue($_option) ?> -
      htmlEscape($_option['label']) ?>
      - class="truncated"> - -
      -
      -
      htmlEscape($_option['label']) ?>
      -
      -
      -
      - - - -
      - - - - getMessages()): ?> - -
      - * -
      - - - - helper('wishlist')->isAllowInCart()) : ?> - - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
      - -
      - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?> - - helper('checkout')->formatPrice($_item->getCalculationPrice()) ?> - - -
      - - - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
      - __('Total'); ?>:
      helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
      -
      - - - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->getPriceInclTax($_item); ?> - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
      - -
      - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?> - - helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?> - - -
      - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
      - __('Total incl. tax'); ?>:
      helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?>
      -
      - - - - - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
      - -
      - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - helper('checkout')->formatPrice($_item->getRowTotal()) ?> - - -
      - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
      - __('Total'); ?>:
      helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
      -
      - - - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
      - -
      - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - -
      - - - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
      - __('Total incl. tax'); ?>:
      helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
      -
      - - - - - - - <?php echo $this->__('Remove item')?> - - - diff --git a/app/design/frontend/default/modern/template/checkout/cart/noItems.phtml b/app/design/frontend/default/modern/template/checkout/cart/noItems.phtml deleted file mode 100644 index 151b389c7e..0000000000 --- a/app/design/frontend/default/modern/template/checkout/cart/noItems.phtml +++ /dev/null @@ -1,32 +0,0 @@ - -
      -

      __('Shopping Cart is Empty') ?>

      -
      -getMessagesBlock()->getGroupedHtml() ?> -

      __('You have no items in your shopping cart.') ?>

      -

      __('Please continue shopping.', $this->getContinueShoppingUrl()) ?>

      diff --git a/app/design/frontend/default/modern/template/checkout/cart/render/default.phtml b/app/design/frontend/default/modern/template/checkout/cart/render/default.phtml deleted file mode 100644 index 4a3c60338d..0000000000 --- a/app/design/frontend/default/modern/template/checkout/cart/render/default.phtml +++ /dev/null @@ -1,68 +0,0 @@ - -getItem() ?> - - Remove item - <?php echo $this->htmlEscape($this->getItemName($_item)) ?> - -

      getItemName($_item) ?>

      - getItemDescription($_item) ?> - getMessage()): ?> -
      - * getMessage() ?> -
      - - - helper('wishlist')->isAllowInCart()) : ?> - - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->formatPrice($_item->getCalculationPrice()) ?> - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)); ?> - - - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->formatPrice($_item->getRowTotal()) ?> - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?> - - - diff --git a/app/design/frontend/default/modern/template/checkout/cart/render/simple.phtml b/app/design/frontend/default/modern/template/checkout/cart/render/simple.phtml deleted file mode 100644 index 4a3c60338d..0000000000 --- a/app/design/frontend/default/modern/template/checkout/cart/render/simple.phtml +++ /dev/null @@ -1,68 +0,0 @@ - -getItem() ?> - - Remove item - <?php echo $this->htmlEscape($this->getItemName($_item)) ?> - -

      getItemName($_item) ?>

      - getItemDescription($_item) ?> - getMessage()): ?> -
      - * getMessage() ?> -
      - - - helper('wishlist')->isAllowInCart()) : ?> - - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->formatPrice($_item->getCalculationPrice()) ?> - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)); ?> - - - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->formatPrice($_item->getRowTotal()) ?> - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?> - - - diff --git a/app/design/frontend/default/modern/template/checkout/cart/shipping.phtml b/app/design/frontend/default/modern/template/checkout/cart/shipping.phtml deleted file mode 100644 index 206e1ad0bb..0000000000 --- a/app/design/frontend/default/modern/template/checkout/cart/shipping.phtml +++ /dev/null @@ -1,103 +0,0 @@ - - -
      -

      __('Estimate Shipping and Tax') ?>

      -

      __('Enter your destination to get a shipping estimate.') ?>

      -
      -
      -
      -
        -

      • getCountryHtmlSelect($this->getEstimateCountryId()) ?>
      • -

      • - -
      • - - getCityActive()): ?> -

      • - -
      • - -

      • -
      • -
      -

      <?php echo $this->__('Get a Quote') ?>

      - -
      -
      - - -getEstimateRates())): ?> -
      -
      -
      - $_rates): ?> -
      getCarrierName($code) ?>
      -
      -
        - -
      • - getErrorMessage()): ?> - getErrorMessage() ?> - - getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?>/> - - -
      • - -
      -
      - -
      -

      -
      - - - -
      -
      diff --git a/app/design/frontend/default/modern/template/checkout/cart/sidebar.phtml b/app/design/frontend/default/modern/template/checkout/cart/sidebar.phtml deleted file mode 100644 index 18a869328d..0000000000 --- a/app/design/frontend/default/modern/template/checkout/cart/sidebar.phtml +++ /dev/null @@ -1,69 +0,0 @@ - -
      -
      - getSummaryCount() ?> -

      __('My Cart') ?>

      -
      - 0): ?> -
      - - __('There is 1 item in your cart.', $this->getUrl('checkout/cart')) ?> - - __('There are %s items in your cart.', $this->getUrl('checkout/cart'), $_cartQty) ?> - -

      - __('Cart Subtotal:') ?> formatPrice($this->getSubtotal()) ?> - getSubtotalInclTax()): ?> -
      (formatPrice($_subtotalInclTax) ?> getIncExcText(true) ?>) - -

      -
      - - - getRecentItems() ?> -
      - -
      __('Recently added item(s)') ?>
      -
        - - getItemHtml($_item) ?> - -
      - - -

      __('You have no items in your shopping cart.') ?>

      - -
      -
      - diff --git a/app/design/frontend/default/modern/template/checkout/cart/sidebar/default.phtml b/app/design/frontend/default/modern/template/checkout/cart/sidebar/default.phtml deleted file mode 100644 index 1aca59e8b4..0000000000 --- a/app/design/frontend/default/modern/template/checkout/cart/sidebar/default.phtml +++ /dev/null @@ -1,141 +0,0 @@ - -getItem() ?> -
    • -
      - <?php echo $this->htmlEscape($this->getProductName()) ?> -
      -
      - <?php echo $this->__('Remove Product') ?> - htmlEscape($this->getProductName()) ?>
      - getQty() ?> x - - - - - - - - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - helper('tax')->displayCartBothPrices()): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?> - helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?> - - helper('checkout')->formatPrice($_item->getCalculationPrice()) ?> - - getApplied($_item)): ?> -
      - typeOfDisplay($_item, 1, 'sales')): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['amount'],true,true); ?>
      - -
      - typeOfDisplay($_item, 2, 'sales')): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['amount_incl_tax'],true,true); ?>
      - - typeOfDisplay($_item, 4, 'sales')): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['amount_incl_tax'],true,true); ?>
      - -
      - - typeOfDisplay($_item, 2, 'sales')): ?> - __('Total'); ?>:
      helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
      - - - - - - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - helper('checkout')->getPriceInclTax($_item); ?> - helper('tax')->displayCartBothPrices()): ?> -
      __('Incl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'sales')): ?> - helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?> - - helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?> - - getApplied($_item)): ?> -
      - typeOfDisplay($_item, 1, 'sales')): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['amount'],true,true); ?>
      - -
      - typeOfDisplay($_item, 2, 'sales')): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['amount_incl_tax'],true,true); ?>
      - - typeOfDisplay($_item, 4, 'sales')): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['amount_incl_tax'],true,true); ?>
      - -
      - - typeOfDisplay($_item, 2, 'sales')): ?> - __('Total incl. tax'); ?>:
      helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?>
      - - - - - - - getOptionList()):?> -
      -
      -
      - -
      htmlEscape($_option['label']) ?>
      -
      - - - - - -
      - -
      -
      - __('Details') ?> -
      - - -
      -
    • diff --git a/app/design/frontend/default/modern/template/checkout/cart/totals.phtml b/app/design/frontend/default/modern/template/checkout/cart/totals.phtml deleted file mode 100644 index 2d01e087a1..0000000000 --- a/app/design/frontend/default/modern/template/checkout/cart/totals.phtml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - renderTotals('footer'); ?> - - - renderTotals(); ?> - -
      diff --git a/app/design/frontend/default/modern/template/checkout/links.phtml b/app/design/frontend/default/modern/template/checkout/links.phtml deleted file mode 100644 index 50e5dfd5e0..0000000000 --- a/app/design/frontend/default/modern/template/checkout/links.phtml +++ /dev/null @@ -1,26 +0,0 @@ - diff --git a/app/design/frontend/default/modern/template/checkout/multishipping/address/select.phtml b/app/design/frontend/default/modern/template/checkout/multishipping/address/select.phtml deleted file mode 100644 index ccf4f6b762..0000000000 --- a/app/design/frontend/default/modern/template/checkout/multishipping/address/select.phtml +++ /dev/null @@ -1,60 +0,0 @@ - -
      -

      __('Change Billing Address') ?>

      - <?php echo $this->__('Add New Address') ?> -
      -getMessagesBlock()->getGroupedHtml() ?> -
      - -getAddressCollection() as $_address): ?> -
      -
      -
      -

      - __('Edit Address') ?>| - __('Select Address') ?> -

      -
      - format('html') ?> - isAddressDefaultBilling($_address)): ?> -
      __('Default Billing') ?> - - isAddressDefaultShipping($_address)): ?> -
      __('Default Shipping') ?> - -
      -
      -
      - -

      - -

      -
      - diff --git a/app/design/frontend/default/modern/template/checkout/multishipping/addresses.phtml b/app/design/frontend/default/modern/template/checkout/multishipping/addresses.phtml deleted file mode 100644 index 2a04ca8609..0000000000 --- a/app/design/frontend/default/modern/template/checkout/multishipping/addresses.phtml +++ /dev/null @@ -1,81 +0,0 @@ - - -
      -
      -

      __('Ship to Multiple Addresses') ?>

      - -
      -
      __('Please select shipping address for applicable items') ?>
      -getMessagesBlock()->getGroupedHtml() ?> -
      - - - - - - - - - - - - - - - - - - - - - - getItems() as $_index => $_item): ?> - - - - - - - - -
      __('Product') ?>__('Qty') ?>__('Send to') ?>__('Remove') ?>
      - getItemHtml($_item->getQuoteItem())?> - getProduct()->getIsVirtual()): echo $this->__('Shipping selection is not applicable'); else: echo $this->getAddressesHtmlSelect($_item, $_index); endif; ?><?php echo $this->__('Remove Item') ?>
      - -
      - __('« Back to Shopping Cart') ?> - isContinueDisabled()):?>disabled="disabled" style="border-color:#999; background-color:#ccc;" /> -
      -
      -
      diff --git a/app/design/frontend/default/modern/template/checkout/multishipping/agreements.phtml b/app/design/frontend/default/modern/template/checkout/multishipping/agreements.phtml deleted file mode 100644 index 25870525ba..0000000000 --- a/app/design/frontend/default/modern/template/checkout/multishipping/agreements.phtml +++ /dev/null @@ -1,50 +0,0 @@ - - - -getAgreements()) return; ?> -
        -getAgreements() as $_a): ?> -
      1. -
        getContentHeight() ? ' style="height:' . $_a->getContentHeight() . '"' : '')?>> - getIsHtml()):?> - getContent() ?> - - htmlEscape($_a->getContent())) ?> - -
        -

        -   - -

        -
      2. - -
      diff --git a/app/design/frontend/default/modern/template/checkout/multishipping/billing.phtml b/app/design/frontend/default/modern/template/checkout/multishipping/billing.phtml deleted file mode 100644 index 9e7150efc7..0000000000 --- a/app/design/frontend/default/modern/template/checkout/multishipping/billing.phtml +++ /dev/null @@ -1,117 +0,0 @@ - - - -
      -

      __('Billing Information') ?>

      -
      -getMessagesBlock()->getGroupedHtml() ?> - -
      -
      -
      -
      -
      - __('Billing Address') ?> - | - __('Change') ?> -
      -
      - getAddress() ?> -
      - format('html') ?> -
      -
      -
      -
      -
      __('Payment Method') ?>
      -
      - - - -
      - getMethods(); - $_methodsCount = count($_methods); - ?> - getCode() ?> -
      - 1): ?> - getSelectedMethodCode()==$_code): ?> checked="checked" /> - - - - -
      -
      - getChildHtml('payment.method.'.$_code) ?> -
      - -
      -
      -
      - getChildHtml('checkout_billing_items') ?> - -
      - diff --git a/app/design/frontend/default/modern/template/checkout/multishipping/billing/items.phtml b/app/design/frontend/default/modern/template/checkout/multishipping/billing/items.phtml deleted file mode 100644 index 56c4f7a711..0000000000 --- a/app/design/frontend/default/modern/template/checkout/multishipping/billing/items.phtml +++ /dev/null @@ -1,60 +0,0 @@ - -getQuote()->hasVirtualItems()): ?> -
      -
      -

      __('Other items in your order') ?>

      -
      -
      -
      -
      -
      -
      __('Items') ?>|__('Edit Items') ?>
      -
      - - - - - - - - - - - getVirtualQuoteItems() as $_item): ?> - - - - - - -
      __('Product Name') ?>__('Qty') ?>
      getItemHtml($_item) ?>getQty() ?>
      - -
      -
      -
      - diff --git a/app/design/frontend/default/modern/template/checkout/multishipping/link.phtml b/app/design/frontend/default/modern/template/checkout/multishipping/link.phtml deleted file mode 100644 index c5c320d6ba..0000000000 --- a/app/design/frontend/default/modern/template/checkout/multishipping/link.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -
    • __('Checkout with Multiple Addresses');?>
    • diff --git a/app/design/frontend/default/modern/template/checkout/multishipping/overview.phtml b/app/design/frontend/default/modern/template/checkout/multishipping/overview.phtml deleted file mode 100644 index 4c2b5752e5..0000000000 --- a/app/design/frontend/default/modern/template/checkout/multishipping/overview.phtml +++ /dev/null @@ -1,291 +0,0 @@ - -
      -

      __('Review Order') ?>

      -
      -getMessagesBlock()->getGroupedHtml() ?> -
      -
      -
      -

      __('Billing Information') ?>

      -
      -
      -
      - getBillingAddress() ?> -
      -

      __('Billing Address') ?>|__('Change') ?>

      -
      -
      - format('html') ?> -
      -
      -
      -
      -

      __('Payment Method') ?>|__('Change') ?>

      -
      - - - getPaymentHtml() ?> -
      -
      -
      - -
      -

      __('Shipping Information') ?>

      -
      - helper('tax')->displayCartBothPrices() ? 2 : 1); ?> - getShippingAddresses() as $_index => $_address): ?> -

      __('Address %s of %s', ($_index+1), $this->getShippingAddressCount()) ?>

      -
      -
      -

      __('Shipping to') ?>|__('Change') ?>

      -
      -
      - format('html') ?> -
      -
      -
      -

      __('Shipping Method') ?>|__('Change') ?>

      -
      - getShippingAddressRate($_address)): ?> -

      - getCarrierTitle() ?> (getMethodTitle() ?>) - - - getShippingPriceExclTax($_address); ?> - getShippingPriceInclTax($_address); ?> - - - helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?> - (__('Incl. Tax'); ?> ) - -

      - -
      -
      -
      -

      __('Items') ?>|__('Edit Items') ?>

      -
      - - - - helper('tax')->displayCartBothPrices()): ?> - - - - - helper('tax')->displayCartBothPrices()): ?> - - - - - - - - - - helper('tax')->displayCartBothPrices()): ?> - - - - - - - - - - getShippingAddressItems($_address) as $_item): ?> - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - - - - - - renderTotals($this->getShippingAddressTotals($_address)); ?> - -
      __('Product Name') ?>__('Price') ?>__('Qty') ?>__('Subtotal') ?>
      helper('tax')->getIncExcTaxLabel(false) ?>helper('tax')->getIncExcTaxLabel(true) ?>helper('tax')->getIncExcTaxLabel(false) ?>helper('tax')->getIncExcTaxLabel(true) ?>
      - getItemHtml($_item->getQuoteItem()) ?> - - helper('checkout')->formatPrice($_item->getCalculationPrice()) ?> - - helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)) ?> - getQty()*1 ?> - helper('checkout')->formatPrice($_item->getRowTotal()) ?> - - helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)) ?> -
      - -
      -
      - getShippingAddressCount()!=$_index+1): ?> -
      - - -
      - - getQuote()->hasVirtualItems()): ?> -
      -

      __('Other items in your order') ?>

      -
      -
      -
      -
      -
      -

      __('Items') ?>|__('Edit Items') ?>

      -
      - helper('tax')->displayCartBothPrices() ? 2 : 1); ?> - - - - helper('tax')->displayCartBothPrices()): ?> - - - - - helper('tax')->displayCartBothPrices()): ?> - - - - - - - - - - helper('tax')->displayCartBothPrices()): ?> - - - - - - - - - - getVirtualItems() as $_item): ?> - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - - - - - - renderTotals($this->getBillinAddressTotals()); ?> - -
      __('Product Name') ?>__('Price') ?>__('Qty') ?>__('Subtotal') ?>
      helper('tax')->getIncExcTaxLabel(false) ?>helper('tax')->getIncExcTaxLabel(true) ?>helper('tax')->getIncExcTaxLabel(false) ?>helper('tax')->getIncExcTaxLabel(true) ?>
      - getItemHtml($_item) ?> - - helper('checkout')->formatPrice($_item->getCalculationPrice()) ?> - - helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)) ?> - getQty()*1 ?> - helper('checkout')->formatPrice($_item->getRowTotal()) ?> - - helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)) ?> -
      - -
      -
      -
      - - - getChildHtml('agreements') ?> - - - - - - -
      - -   - __('Grand Total:') ?> helper('checkout')->formatPrice($this->getTotal()) ?> - - - -
      - -
      - -
      -
      - diff --git a/app/design/frontend/default/modern/template/checkout/multishipping/shipping.phtml b/app/design/frontend/default/modern/template/checkout/multishipping/shipping.phtml deleted file mode 100644 index e7d03b22a9..0000000000 --- a/app/design/frontend/default/modern/template/checkout/multishipping/shipping.phtml +++ /dev/null @@ -1,132 +0,0 @@ - - -
      -

      __('Select Shipping Method') ?>

      -
      -getMessagesBlock()->getGroupedHtml() ?> -
      -
      -getAddresses() as $_index => $_address): ?> -
      -
      -

      __('Address %s of %s', ($_index+1), $this->getAddressCount()) ?>

      -
      -
      -
      -
      -
      __('Shipping to') ?>|__('Change') ?>
      -
      -
      - format('html') ?> -
      -
      -
      - -
      -
      __('Shipping Method') ?>
      -
      - getShippingRates($_address))): ?> - __('Sorry, no quotes are available for this order at this time.') ?> - -
      - $_rates): ?> -
      getCarrierName($code) ?>
      -
      -
        - -
      • - getErrorMessage()): ?> - getCarrierTitle() ?>: getErrorMessage() ?> - - getCode()===$this->getAddressShippingMethod($_address)) echo ' checked="checked"' ?>/> - - -
      • - -
      -
      - -
      - -
      -
      -
      - helper('giftmessage/message')->getInline('multishipping_adress_checkbox', $_address); ?> -
      -
      __('Items') ?>|__('Edit Items') ?>
      -
      - - - - - - - - - - - getAddressItems($_address) as $_item): ?> - - - - - - -
      __('Product Name') ?>__('Qty') ?>
      - getItemHtml($_item->getQuoteItem()) ?> - getQty() ?>
      - -
      -
      - helper('giftmessage/message')->getInline('multishipping_adress', $_address); ?> -
      -
      - -getChildHtml('checkout_billing_items') ?> -
      - -
      diff --git a/app/design/frontend/default/modern/template/checkout/multishipping/state.phtml b/app/design/frontend/default/modern/template/checkout/multishipping/state.phtml deleted file mode 100644 index d89231671a..0000000000 --- a/app/design/frontend/default/modern/template/checkout/multishipping/state.phtml +++ /dev/null @@ -1,40 +0,0 @@ - - - - -getSteps() as $_step): ?> - getIsActive()): ?> class="active">getLabel() ?> - - -
      diff --git a/app/design/frontend/default/modern/template/checkout/multishipping/success.phtml b/app/design/frontend/default/modern/template/checkout/multishipping/success.phtml deleted file mode 100644 index 4d3fb88e28..0000000000 --- a/app/design/frontend/default/modern/template/checkout/multishipping/success.phtml +++ /dev/null @@ -1,53 +0,0 @@ - -
      -

      __('Order Success') ?>

      -
      -
      -

      __('Thank you for your purchase!') ?>

      -

      - __('We are processing your order and you will soon receive an email with details of the order. Once the order has shipped you will receive another email with a link to track its progress.') ?> -

      - getOrderIds()): ?> - - __('Your order number is ') ?> - $incrementId): ?> - - - - - - - -

      - __('My Account') ?> -

      - getChildHtml() ?> -
      -
      - <?php echo $this->__('Continue Shopping') ?> -
      diff --git a/app/design/frontend/default/modern/template/checkout/onepage.phtml b/app/design/frontend/default/modern/template/checkout/onepage.phtml deleted file mode 100644 index 3d0ee02682..0000000000 --- a/app/design/frontend/default/modern/template/checkout/onepage.phtml +++ /dev/null @@ -1,58 +0,0 @@ - -
      - - - -
        -getSteps() as $_stepId => $_stepInfo): ?> -getChild($_stepId) || !$this->getChild($_stepId)->isShow()): continue; endif; $i++ ?> -
      1. - - -
      2. - -
      - - -
      diff --git a/app/design/frontend/default/modern/template/checkout/onepage/agreements.phtml b/app/design/frontend/default/modern/template/checkout/onepage/agreements.phtml deleted file mode 100644 index d174de6fd4..0000000000 --- a/app/design/frontend/default/modern/template/checkout/onepage/agreements.phtml +++ /dev/null @@ -1,52 +0,0 @@ - - - -getAgreements()) return; ?> -
      -
        -getAgreements() as $_a): ?> -
      1. -
        getContentHeight() ? ' style="height:' . $_a->getContentHeight() . '"' : '')?>> - getIsHtml()):?> - getContent() ?> - - htmlEscape($_a->getContent())) ?> - -
        -

        -   - -

        -
      2. - -
      -
      diff --git a/app/design/frontend/default/modern/template/checkout/onepage/billing.phtml b/app/design/frontend/default/modern/template/checkout/onepage/billing.phtml deleted file mode 100644 index a5b551a5e6..0000000000 --- a/app/design/frontend/default/modern/template/checkout/onepage/billing.phtml +++ /dev/null @@ -1,142 +0,0 @@ - -
      -customerHasAddresses()): ?> -

      __('Select a billing address from your address book or enter a new address.') ?>

      -
      • getAddressesHtmlSelect('billing') ?>

      - - -
      customerHasAddresses()): ?> style="display:none"> - -
        -
      • getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress()) - ->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
      • -
      • -
        -
        - isCustomerLoggedIn()): ?> -
        -
        -
        - -
      • -

      • -
      • -helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?> -
      • - -
      • -
        -
        -
        -
        - - - -
      • -
      • -
        -
        -
        -
        - getCountryHtmlSelect('billing') ?>
      • -
      • -
        -
        -
        -
        -
      • - isCustomerLoggedIn()): ?> - getLayout()->createBlock('customer/widget_dob') ?> - isEnabled()): ?> -
      • - setDate($this->getQuote()->getCustomerDob()) - ->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?> -
      • - - getLayout()->createBlock('customer/widget_taxvat') ?> - isEnabled()): ?> -
      • - setTaxvat($this->getQuote()->getCustomerTaxvat()) - ->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?> -
      • - - getLayout()->createBlock('customer/widget_gender') ?> - isEnabled()): ?> -
      • - setGender($this->getQuote()->getCustomerGender()) - ->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?> -
      • - -
      • -
        -
        -
        -
        -
        -
      • - - isCustomerLoggedIn() && $this->customerHasAddresses()):?> -
      • getAddress()->getSaveInAddressBook()):?> checked="checked" />
      • - -
      • - -
      -
      - canShip()): ?> -

      - isUseBillingAddressForShipping()) {?>checked="checked" onclick="$('shipping:same_as_billing').checked = true;" />      isUseBillingAddressForShipping()) {?>checked="checked" onclick="$('shipping:same_as_billing').checked = false;" />  -

      - -

      - -
      -
      -

      __('* Required Fields') ?>

      -
      - - <?php echo $this->__('Continue') ?> -
      -
      - - diff --git a/app/design/frontend/default/modern/template/checkout/onepage/link.phtml b/app/design/frontend/default/modern/template/checkout/onepage/link.phtml deleted file mode 100644 index a0c9b37c91..0000000000 --- a/app/design/frontend/default/modern/template/checkout/onepage/link.phtml +++ /dev/null @@ -1,35 +0,0 @@ - -isPossibleOnepageCheckout()):?> -
    • -isDisabled()):?> -<?php echo Mage::helper('checkout')->__('Proceed to Checkout');?> - -<?php echo Mage::helper('checkout')->__('Proceed to Checkout');?> - -
    • - diff --git a/app/design/frontend/default/modern/template/checkout/onepage/login.phtml b/app/design/frontend/default/modern/template/checkout/onepage/login.phtml deleted file mode 100644 index 893db40348..0000000000 --- a/app/design/frontend/default/modern/template/checkout/onepage/login.phtml +++ /dev/null @@ -1,120 +0,0 @@ - -
      -
      -

      getQuote()->isAllowedGuestCheckout() ): ?>__('Checkout as a Guest or Register') ?>__('Register to Create an Account') ?>

      - - getQuote()->isAllowedGuestCheckout() ): ?> -

      __('Register with us for future convenience:') ?>

      - - __('Register and save time!') ?>
      - __('Register with us for future convenience:') ?> -
        -
      • __('Fast and easy check out') ?>
      • -
      • __('Easy access to your order history and status') ?>
      • -
      - - getQuote()->isAllowedGuestCheckout() ): ?> -
        - getQuote()->isAllowedGuestCheckout() ): ?> -
      • - getQuote()->getCheckoutMethod()==Mage_Checkout_Model_Type_Onepage::METHOD_GUEST): ?> checked="checked"/> - -
      • - -
      • - getQuote()->getCheckoutMethod()==Mage_Checkout_Model_Type_Onepage::METHOD_REGISTER || !$this->getQuote()->isAllowedGuestCheckout()): ?> checked="checked"/> - -
      • -
      - __('Register and save time!') ?>
      - __('Register with us for future convenience:') ?> -
        -
      • __('Fast and easy check out') ?>
      • -
      • __('Easy access to your order history and status') ?>
      • -
      - - - -
      -
      -

      __('Login') ?>

      - getMessagesBlock()->getGroupedHtml() ?> -
      -

      __('Already registered?') ?>
      - __('Please log in below:') ?>

      -
        -
      • -
        -
        - -
        -
      • -
      • -
        -
        - -
        -
      • -
      -
      -
      -
      -
      -
      -
      -

       

      - <?php echo ($this->getQuote()->isAllowedGuestCheckout() ? $this->__('Continue') : $this->__('Register')) ?> -
      -
      -
      -
      -

      __('* Required Fields') ?>

      - __('Forgot your password?') ?> - <?php echo $this->__('Login') ?> -
      -
      -
      - - diff --git a/app/design/frontend/default/modern/template/checkout/onepage/payment.phtml b/app/design/frontend/default/modern/template/checkout/onepage/payment.phtml deleted file mode 100644 index a689511ae5..0000000000 --- a/app/design/frontend/default/modern/template/checkout/onepage/payment.phtml +++ /dev/null @@ -1,73 +0,0 @@ - - -
      - getChildHtml('methods') ?> - -
      -
      -

      __('* Required Fields') ?>

      -
      - « __('Back') ?> - - <?php echo $this->__('Continue') ?> -
      -
      - - - diff --git a/app/design/frontend/default/modern/template/checkout/onepage/progress.phtml b/app/design/frontend/default/modern/template/checkout/onepage/progress.phtml deleted file mode 100644 index b61d104a8f..0000000000 --- a/app/design/frontend/default/modern/template/checkout/onepage/progress.phtml +++ /dev/null @@ -1,107 +0,0 @@ - - -
      -

      __('Your Checkout Progress') ?>

      -
        - getCheckout()->getStepData('billing', 'is_show')): ?> - getCheckout()->getStepData('billing', 'complete')): ?> -
      1. -

        __('Billing Address') ?>|__('Change') ?>

        -
        -
        getBilling()->format('html') ?>
        -
        -
      2. - -
      3. -

        __('Billing Address') ?>

        -
      4. - - - - getCheckout()->getStepData('shipping', 'is_show')): ?> - getCheckout()->getStepData('shipping', 'complete')): ?> -
      5. -

        __('Shipping Address') ?>|__('Change') ?>

        -
        -
        getShipping()->format('html') ?>
        -
        -
      6. - -
      7. -

        __('Shipping Address') ?>

        -
      8. - - - - getCheckout()->getStepData('shipping_method', 'is_show')): ?> - getCheckout()->getStepData('shipping_method', 'complete')): ?> -
      9. -

        __('Shipping Method') ?>|__('Change') ?>

        -
        - getShippingMethod()): ?> - getShippingDescription() ?> - - getShippingPriceExclTax(); ?> - getShippingPriceInclTax(); ?> - helper('tax')->displayShippingPriceIncludingTax()): ?> - - - - - helper('tax')->displayShippingBothPrices() && $_incl != $_excl): ?> - (__('Incl. Tax'); ?> ) - - - - __('Shipping method has not been selected yet') ?> - -
        -
      10. - -
      11. -

        __('Shipping Method') ?>

        -
      12. - - - - getCheckout()->getStepData('payment', 'is_show')): ?> - getCheckout()->getStepData('payment', 'complete')): ?> -
      13. -

        __('Payment Method') ?>|__('Change') ?>

        -
        - getPaymentHtml() ?> -
        -
      14. - -
      15. -

        __('Payment Method') ?>

        -
      16. - - -
      -
      diff --git a/app/design/frontend/default/modern/template/checkout/onepage/review.phtml b/app/design/frontend/default/modern/template/checkout/onepage/review.phtml deleted file mode 100644 index 7e6dda3180..0000000000 --- a/app/design/frontend/default/modern/template/checkout/onepage/review.phtml +++ /dev/null @@ -1,48 +0,0 @@ - -
      - getChildHtml('info') ?> -
      - -getChildHtml('agreements') ?> - -
      -

      __('Forgot an Item?') ?> __('Edit Your Cart') ?>

      -

      - - - - -

      -
      - diff --git a/app/design/frontend/default/modern/template/checkout/onepage/review/configurable.phtml b/app/design/frontend/default/modern/template/checkout/onepage/review/configurable.phtml deleted file mode 100644 index 7be70a3a1c..0000000000 --- a/app/design/frontend/default/modern/template/checkout/onepage/review/configurable.phtml +++ /dev/null @@ -1,61 +0,0 @@ - -getItem()?> - - - htmlEscape($this->getProductName()) ?> - getProductAttributes()) :?> -
        - -
      • - htmlEscape($_attribute['label']) ?>: htmlEscape($_attribute['value']) ?> -
      • - -
      - - getProductOptions()): ?> -
        - -
      • htmlEscape($_option['label']) ?>: htmlEscape($_option['value']) ?> - -
      - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - helper('checkout')->formatPrice($_item->getCalculationPrice()) ?> - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - helper('checkout')->formatPrice($this->helper('checkout')->getPriceInclTax($_item)); ?> - - getQty() ?> - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - helper('checkout')->formatPrice($_item->getRowTotal()) ?> - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - helper('checkout')->formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?> - - diff --git a/app/design/frontend/default/modern/template/checkout/onepage/review/info.phtml b/app/design/frontend/default/modern/template/checkout/onepage/review/info.phtml deleted file mode 100644 index e4977145d2..0000000000 --- a/app/design/frontend/default/modern/template/checkout/onepage/review/info.phtml +++ /dev/null @@ -1,59 +0,0 @@ - -helper('tax')->displayCartBothPrices()): $colspan = $rowspan = 2; else: $colspan = $rowspan = 1; endif; ?> - - - - - - - - - - - - - helper('tax')->displayCartBothPrices()):?> - - - - - - - - - getChildHtml('totals'); ?> - - getItems() as $_item): ?> - getItemHtml($_item)?> - - -
      __('Product Name') ?>__('Price') ?>__('Qty') ?>__('Subtotal') ?>
      __('Excl. Tax'); ?>__('Incl. Tax'); ?>__('Excl. Tax'); ?>__('Incl. Tax'); ?>
      - diff --git a/app/design/frontend/default/modern/template/checkout/onepage/review/totals.phtml b/app/design/frontend/default/modern/template/checkout/onepage/review/totals.phtml deleted file mode 100644 index 0df6248a17..0000000000 --- a/app/design/frontend/default/modern/template/checkout/onepage/review/totals.phtml +++ /dev/null @@ -1,43 +0,0 @@ - -getTotals()): ?> - - helper('tax')->displayCartBothPrices() ? 5 : 3; ?> - renderTotals(null, $_colspan); ?> - renderTotals('footer', $_colspan); ?> - needDisplayBaseGrandtotal()):?> - - - helper('sales')->__('Your credit card will be charged for') ?> - - - displayBaseGrandtotal() ?> - - - - - diff --git a/app/design/frontend/default/modern/template/checkout/onepage/shipping.phtml b/app/design/frontend/default/modern/template/checkout/onepage/shipping.phtml deleted file mode 100644 index 8f73b2ae3f..0000000000 --- a/app/design/frontend/default/modern/template/checkout/onepage/shipping.phtml +++ /dev/null @@ -1,108 +0,0 @@ - -
      -customerHasAddresses()): ?> -

      __('Select a shipping address from your address book or enter a new address.') ?>

      -

      getAddressesHtmlSelect('shipping') ?>

      - - -
      customerHasAddresses()): ?> style="display:none"> - -
        -
      • getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress()) - ->setFieldIdFormat('shipping:%s')->setFieldNameFormat('shipping[%s]')->setFieldParams('onchange="shipping.setSameAsBilling(false)"')->toHtml() ?>
      • -
      • -
        -
        - -
        -
        -
        - -
      • -

      • -
      • -helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?> -
      • - -
      • -
        -
        -
        -
        - - -
      • -
      • -
        -
        -
        -
        - getCountryHtmlSelect('shipping') ?> -
      • -
      • -
        -
        -
        -
        -
      • - isCustomerLoggedIn() && $this->customerHasAddresses()):?> -
      • getAddress()->getSaveInAddressBook()):?> checked="checked" />
      • - -
      • - -
      -
      -

      getAddress()->getSameAsBilling()): ?>checked="checked" onclick="shipping.setSameAsBilling(this.checked)"/>  

      -
      -
      -

      __('* Required Fields') ?>

      -
      - « __('Back') ?> - - <?php echo $this->__('Continue') ?> -
      -
      - - diff --git a/app/design/frontend/default/modern/template/checkout/onepage/shipping_method.phtml b/app/design/frontend/default/modern/template/checkout/onepage/shipping_method.phtml deleted file mode 100644 index 7a667a3d5e..0000000000 --- a/app/design/frontend/default/modern/template/checkout/onepage/shipping_method.phtml +++ /dev/null @@ -1,50 +0,0 @@ - -
      -
      -
      - getChildHtml('available') ?> -
      -
      - -
      -getChildHtml('additional') ?> -
      -
      -
      -
      -
      - « __('Back') ?> - - <?php echo $this->__('Continue') ?> -
      -
      -
      diff --git a/app/design/frontend/default/modern/template/checkout/onepage/shipping_method/additional.phtml b/app/design/frontend/default/modern/template/checkout/onepage/shipping_method/additional.phtml deleted file mode 100644 index e7b72c832d..0000000000 --- a/app/design/frontend/default/modern/template/checkout/onepage/shipping_method/additional.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -helper('giftmessage/message')->getInline('onepage_checkout', $this->getQuote(), $this->getDontDisplayContainer()) ?> diff --git a/app/design/frontend/default/modern/template/checkout/onepage/shipping_method/available.phtml b/app/design/frontend/default/modern/template/checkout/onepage/shipping_method/available.phtml deleted file mode 100644 index 76e7e2383c..0000000000 --- a/app/design/frontend/default/modern/template/checkout/onepage/shipping_method/available.phtml +++ /dev/null @@ -1,63 +0,0 @@ - -getShippingRates())): ?> - __('Sorry, no quotes are available for this order at this time.') ?> - -
      - $_rates): ?> -
      getCarrierName($code) ?>
      -
      -
        - -
      • - getErrorMessage()): ?> -
          • getErrorMessage() ?>
        - - - - - getCode()===$this->getAddressShippingMethod()) echo ' checked="checked"' ?> /> - - - -
      • - -
      -
      - -
      - diff --git a/app/design/frontend/default/modern/template/checkout/success.phtml b/app/design/frontend/default/modern/template/checkout/success.phtml deleted file mode 100644 index f0bd5e6ac7..0000000000 --- a/app/design/frontend/default/modern/template/checkout/success.phtml +++ /dev/null @@ -1,46 +0,0 @@ - - -
      -
      -

      __('Your order has been received') ?>

      -
      -getMessagesBlock()->getGroupedHtml() ?> -

      __('Thank you for your purchase!') ?>

      -

      -canPrint()) :?> - __('Your order # is: %s', $this->getViewOrderUrl(), $this->getOrderId()) ?>.
      - - __('Your order # is: %s', $this->getOrderId()) ?>.
      - - __('You will receive an order confirmation email with details of your order and a link to track its progress.') ?> - getChildHtml() ?> -

      -
      - <?php echo $this->__('Continue Shopping') ?> -
      -
      diff --git a/app/design/frontend/default/modern/template/checkout/total/default.phtml b/app/design/frontend/default/modern/template/checkout/total/default.phtml deleted file mode 100644 index b2f66604d6..0000000000 --- a/app/design/frontend/default/modern/template/checkout/total/default.phtml +++ /dev/null @@ -1,13 +0,0 @@ - - - - getRenderingArea() == $this->getTotal()->getArea()): ?> - getTotal()->getTitle() ?> - getRenderingArea() == $this->getTotal()->getArea()): ?> - - - getRenderingArea() == $this->getTotal()->getArea()): ?> - helper('checkout')->formatPrice($this->getTotal()->getValue()) ?> - getRenderingArea() == $this->getTotal()->getArea()): ?> - - diff --git a/app/design/frontend/default/modern/template/checkout/total/tax.phtml b/app/design/frontend/default/modern/template/checkout/total/tax.phtml deleted file mode 100644 index 191032a876..0000000000 --- a/app/design/frontend/default/modern/template/checkout/total/tax.phtml +++ /dev/null @@ -1,67 +0,0 @@ - -helper('tax')->displayFullSummary() && $this->getTotal()->getValue()!=0): ?> - - getTotal()->getFullInfo() as $info): ?> - - - - - - - - - - - - (%) - -
      - - - - helper('checkout')->formatPrice($amount); ?> - - - - - - - - -helper('tax')->displayFullSummary() && $this->getTotal()->getValue()!=0): ?> class="tax-total" onclick="expandDetails(this, '.tax-details-')"> - - helper('tax')->displayFullSummary()): ?> -
      getTotal()->getTitle() ?>
      - - getTotal()->getTitle() ?> - - - - helper('checkout')->formatPrice($this->getTotal()->getValue()) ?> - - diff --git a/app/design/frontend/default/modern/template/chronopay/form.phtml b/app/design/frontend/default/modern/template/chronopay/form.phtml deleted file mode 100644 index 4f3b493496..0000000000 --- a/app/design/frontend/default/modern/template/chronopay/form.phtml +++ /dev/null @@ -1,89 +0,0 @@ - - -
      - getMethodCode() ?> - -
      diff --git a/app/design/frontend/default/modern/template/chronopay/info.phtml b/app/design/frontend/default/modern/template/chronopay/info.phtml deleted file mode 100644 index 6c1d91431b..0000000000 --- a/app/design/frontend/default/modern/template/chronopay/info.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -getInfo()): ?> -getMethod()->getTitle() ?>
      -__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
      -__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
      -__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> - - - diff --git a/app/design/frontend/default/modern/template/chronopay/standard/failure.phtml b/app/design/frontend/default/modern/template/chronopay/standard/failure.phtml deleted file mode 100644 index 1abea85c45..0000000000 --- a/app/design/frontend/default/modern/template/chronopay/standard/failure.phtml +++ /dev/null @@ -1,30 +0,0 @@ - -
      -

      __('Error occured') ?>

      -
      -

      __('There was an error occurred during paying process.') ?>

      diff --git a/app/design/frontend/default/modern/template/chronopay/standard/form.phtml b/app/design/frontend/default/modern/template/chronopay/standard/form.phtml deleted file mode 100644 index d2fb955f66..0000000000 --- a/app/design/frontend/default/modern/template/chronopay/standard/form.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -
      - getMethodCode() ?> - -
      diff --git a/app/design/frontend/default/modern/template/cms/content.phtml b/app/design/frontend/default/modern/template/cms/content.phtml deleted file mode 100644 index ae3fe143c6..0000000000 --- a/app/design/frontend/default/modern/template/cms/content.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -getPageContent(); ?> diff --git a/app/design/frontend/default/modern/template/cms/content_heading.phtml b/app/design/frontend/default/modern/template/cms/content_heading.phtml deleted file mode 100644 index e550bbc588..0000000000 --- a/app/design/frontend/default/modern/template/cms/content_heading.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -

      getContentHeading(); ?>

      diff --git a/app/design/frontend/default/modern/template/cms/default/home.phtml b/app/design/frontend/default/modern/template/cms/default/home.phtml deleted file mode 100644 index 50dbc44aea..0000000000 --- a/app/design/frontend/default/modern/template/cms/default/home.phtml +++ /dev/null @@ -1 +0,0 @@ -There was no Home CMS page configured or found. diff --git a/app/design/frontend/default/modern/template/cms/default/no-route.phtml b/app/design/frontend/default/modern/template/cms/default/no-route.phtml deleted file mode 100644 index 4c3851aec1..0000000000 --- a/app/design/frontend/default/modern/template/cms/default/no-route.phtml +++ /dev/null @@ -1 +0,0 @@ -There was no 404 CMS page configured or found. diff --git a/app/design/frontend/default/modern/template/cms/meta.phtml b/app/design/frontend/default/modern/template/cms/meta.phtml deleted file mode 100644 index 5b1fd405a6..0000000000 --- a/app/design/frontend/default/modern/template/cms/meta.phtml +++ /dev/null @@ -1,32 +0,0 @@ - -getPageMetaKeywords()): ?> - - -getPageMetaDescription()): ?> - - diff --git a/app/design/frontend/default/modern/template/contacts/form.phtml b/app/design/frontend/default/modern/template/contacts/form.phtml deleted file mode 100644 index ee9c09b7f5..0000000000 --- a/app/design/frontend/default/modern/template/contacts/form.phtml +++ /dev/null @@ -1,77 +0,0 @@ - -
      -
      getMessagesBlock()->getGroupedHtml() ?>
      -
      -

      __('Contact Us') ?>

      -
      -
      -
      -

      __('Contact Information') ?>

      -
      -
      -
        -
      • -
        -
        - -
        - -
        -
        - -
        - -
        -
      • -
      • -
        -
        - -
        - -
        - -
      • -
      • -
        -
        - -
        -
      • -
      -
      -
      -

      __('* Required Fields') ?>

      - - -
      -
      - -
      diff --git a/app/design/frontend/default/modern/template/core/formkey.phtml b/app/design/frontend/default/modern/template/core/formkey.phtml deleted file mode 100644 index 9dac86d93b..0000000000 --- a/app/design/frontend/default/modern/template/core/formkey.phtml +++ /dev/null @@ -1,27 +0,0 @@ - - diff --git a/app/design/frontend/default/modern/template/core/link.phtml b/app/design/frontend/default/modern/template/core/link.phtml deleted file mode 100644 index 07104ae99f..0000000000 --- a/app/design/frontend/default/modern/template/core/link.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -getLinkAttributes() ?>>htmlEscape($this->getAnchorText()) ?> diff --git a/app/design/frontend/default/modern/template/core/messages.phtml b/app/design/frontend/default/modern/template/core/messages.phtml deleted file mode 100644 index 056b1a1ad9..0000000000 --- a/app/design/frontend/default/modern/template/core/messages.phtml +++ /dev/null @@ -1,46 +0,0 @@ -getMessages($type) ) { - if ( !$html ) { - $html .= '
        '; - } - $html .= '
      • '; - $html .= '
          '; - - foreach ( $messages as $message ) { - $html.= '
        • '; - $html.= $message->getText(); - $html.= '
        • '; - } - $html .= '
        '; - $html .= '
      • '; - } - } - if ( $html) { - $html .= '
      '; - } - ?> diff --git a/app/design/frontend/default/modern/template/customer/account/dashboard.phtml b/app/design/frontend/default/modern/template/customer/account/dashboard.phtml deleted file mode 100644 index 9d0d4d79be..0000000000 --- a/app/design/frontend/default/modern/template/customer/account/dashboard.phtml +++ /dev/null @@ -1,46 +0,0 @@ - -
      -

      __('My Account Dashboard') ?>

      -
      -
      -getMessagesBlock()->getGroupedHtml() ?> -getChildHtml('hello') ?> -getChildHtml('top') ?> -
      - - -getChildHtml('info1') ?> -getChildHtml('info2') ?> - -
      diff --git a/app/design/frontend/default/modern/template/customer/account/dashboard/address.phtml b/app/design/frontend/default/modern/template/customer/account/dashboard/address.phtml deleted file mode 100644 index cc1d48e24b..0000000000 --- a/app/design/frontend/default/modern/template/customer/account/dashboard/address.phtml +++ /dev/null @@ -1,47 +0,0 @@ - - -
      -
      __('Address Book') ?>
      - __('Manage Addresses') ?> -
      -
      -
      -
      __('Default Billing Address') ?>
      -
      - getPrimaryBillingAddressHtml() ?>
      - __('Edit Address') ?> -
      -
      -
      -
      __('Default Shipping Address') ?>
      -
      - getPrimaryShippingAddressHtml() ?>
      - __('Edit Address') ?> -
      -
      -

      diff --git a/app/design/frontend/default/modern/template/customer/account/dashboard/hello.phtml b/app/design/frontend/default/modern/template/customer/account/dashboard/hello.phtml deleted file mode 100644 index 7e38bdb0eb..0000000000 --- a/app/design/frontend/default/modern/template/customer/account/dashboard/hello.phtml +++ /dev/null @@ -1,29 +0,0 @@ - -
      -

      __('Hello, %s!', $this->htmlEscape($this->getCustomerName())) ?>
      -__('From your My Account Dashboard you have the ability to view a snapshot of your recent account activity and update your account information. Select a link below to view or edit information.') ?>

      diff --git a/app/design/frontend/default/modern/template/customer/account/dashboard/info.phtml b/app/design/frontend/default/modern/template/customer/account/dashboard/info.phtml deleted file mode 100644 index 1fcd82f6f9..0000000000 --- a/app/design/frontend/default/modern/template/customer/account/dashboard/info.phtml +++ /dev/null @@ -1,57 +0,0 @@ - -
      -
      -
      -
      __('Contact Information') ?>
      - __('Edit') ?> -
      -

      - htmlEscape($this->getCustomer()->getFirstname()) ?> - htmlEscape($this->getCustomer()->getLastname()) ?>
      - htmlEscape($this->getCustomer()->getEmail()) ?>
      - __('Change Password') ?> -

      -
      - - isNewsletterEnabled() ): ?> -
      -
      -
      __('Newsletters') ?>
      - __('Edit') ?> -
      -

      - getIsSubscribed() ): ?> - __("You are currently subscribed to 'General Subscription'.") ?> - - __('You are currently not subscribed to any newsletter.') ?> - -

      -
      - -
      -
      diff --git a/app/design/frontend/default/modern/template/customer/account/dashboard/newsletter.phtml b/app/design/frontend/default/modern/template/customer/account/dashboard/newsletter.phtml deleted file mode 100644 index 75a911f0ed..0000000000 --- a/app/design/frontend/default/modern/template/customer/account/dashboard/newsletter.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -
      -
      -
      __('Newsletters') ?>
      - __('Edit Newsletters') ?> -
      -
      -

      __('You are currently subscribed to our newsletter.') ?>

      -
      diff --git a/app/design/frontend/default/modern/template/customer/account/dashboard/sidebar.phtml b/app/design/frontend/default/modern/template/customer/account/dashboard/sidebar.phtml deleted file mode 100644 index 50e5dfd5e0..0000000000 --- a/app/design/frontend/default/modern/template/customer/account/dashboard/sidebar.phtml +++ /dev/null @@ -1,26 +0,0 @@ - diff --git a/app/design/frontend/default/modern/template/customer/account/link/back.phtml b/app/design/frontend/default/modern/template/customer/account/link/back.phtml deleted file mode 100644 index 2d1f034f5b..0000000000 --- a/app/design/frontend/default/modern/template/customer/account/link/back.phtml +++ /dev/null @@ -1,5 +0,0 @@ - - diff --git a/app/design/frontend/default/modern/template/customer/account/navigation.phtml b/app/design/frontend/default/modern/template/customer/account/navigation.phtml deleted file mode 100644 index 134a3210b6..0000000000 --- a/app/design/frontend/default/modern/template/customer/account/navigation.phtml +++ /dev/null @@ -1,46 +0,0 @@ - - diff --git a/app/design/frontend/default/modern/template/customer/address.phtml b/app/design/frontend/default/modern/template/customer/address.phtml deleted file mode 100644 index 01c3824d08..0000000000 --- a/app/design/frontend/default/modern/template/customer/address.phtml +++ /dev/null @@ -1,92 +0,0 @@ - -

      Address Book

      -getMessagesBlock()->getGroupedHtml() ?> - - - - - -

      Default

      - - - - - - - - - - - - -
      -
      - format('html') ?> -
      -

      - __('Edit Address') ?> -

      -
      -

      __('You have no default entries in your address book.') ?>

      -
      -

      __('Additional Address Entries') ?>

      - - - - - - - - - - - - -
      -
      - format('html') ?> -
      -

      - __('Edit Address') ?> | __('Delete Address') ?> -

      -
      -

      __('You have no additional entries in your address book.') ?>

      -
      -
      - - diff --git a/app/design/frontend/default/modern/template/customer/address/book.phtml b/app/design/frontend/default/modern/template/customer/address/book.phtml deleted file mode 100644 index 7e55a1849c..0000000000 --- a/app/design/frontend/default/modern/template/customer/address/book.phtml +++ /dev/null @@ -1,121 +0,0 @@ - - -
      -
      -

      __('Address Book') ?>

      - 
-    <?php echo $this->__('Add New Address') ?> -
      -getMessagesBlock()->getGroupedHtml() ?> -
      -
      -
      -

      __('Default Addresses') ?>

      -
      -
        - getCustomer()->getDefaultBilling()): ?> -
      1. -
        __('Default Billing Address') ?>
        -
        - getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>
        - __('Change Billing Address') ?>
        -
      2. - getCustomer()->getDefaultShipping()): ?> -
      3. -
        __('Default Billing Address') ?>
        -
        - getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>
        - __('Change Billing Address') ?> -
        -
      4. - -
      5. -
        __('Default Billing Address') ?>
        - __('You have no default billing address in your address book.') ?>
      6. - - getCustomer()->getDefaultShipping()): ?> -
      7. -
        __('Default Shipping Address') ?>
        -
        - getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>
        - __('Change Shipping Address') ?> -
        -
      8. - getCustomer()->getDefaultBilling()): ?> -
      9. -
        __('Default Shipping Address') ?>
        - getAddressHtml(Mage::getSingleton('customer/session')->getCustomer()->getAddressById($_pAddsses)) ?>
        - __('Change Shipping Address') ?> -
        -
      10. - -
      11. -
        __('Default Shipping Address') ?>
        __('You have no default shipping address in your address book.') ?> -
      12. - -
      -
      -
      -
      -

      __('Additional Address Entries') ?>

      -
      -
        - getAdditionalAddresses()): ?> - -
      1. -
        - getAddressHtml($_address) ?>
        - __('Edit Address') ?> - | - __('Delete Address') ?> -
        -
      2. - - -
      3. __('You have no additional address entries in your address book.') ?>
      4. - -
      -
      -
      - - -
      diff --git a/app/design/frontend/default/modern/template/customer/address/edit.phtml b/app/design/frontend/default/modern/template/customer/address/edit.phtml deleted file mode 100644 index 8ec4aeaf86..0000000000 --- a/app/design/frontend/default/modern/template/customer/address/edit.phtml +++ /dev/null @@ -1,142 +0,0 @@ - - -
      -getTitle()): ?> -
      -

      getTitle() ?>

      -
      - -getMessagesBlock()->getGroupedHtml() ?> -
      - getBlockHtml('formkey')?> -
      - - -
      -

      __('Contact Information') ?>

      -
      -
        -
      • - getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress()->getFirstname() ? $this->getAddress() : $this->getCustomer())->toHtml() ?> -
      • -
      • -
        - -
      • -
      • -
        -
        - -
        -
        -
        - -
        -
      • -
      -
      -
      -
      -
      -

      __('Address') ?>

      -
      -
        -
      • -
        - -
      • -helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?> -
      • - -
      • - -
      • -
        -
        - -
        -
        -
        - - - -
        -
      • -
      • -
        -
        - -
        -
        -
        - getCountryHtmlSelect() ?> -
        -
      • -
      • - isDefaultBilling()): ?> - __('Default Billing Address') ?> - canSetAsDefaultBilling()): ?> -   - - - - -
      • -
      • - isDefaultShipping()): ?> - __('Default Shipping Address') ?> - canSetAsDefaultShipping()): ?> -   - - - - -
      • -
      -
      -
      -

      __('* Required Fields') ?>

      - « __('Back') ?> - -
      -
      - -
      diff --git a/app/design/frontend/default/modern/template/customer/balance.phtml b/app/design/frontend/default/modern/template/customer/balance.phtml deleted file mode 100644 index 5f6daa6519..0000000000 --- a/app/design/frontend/default/modern/template/customer/balance.phtml +++ /dev/null @@ -1,31 +0,0 @@ - - getMessagesBlock()->getGroupedHtml() ?> - __('Your account balance is: %s', $customer->getStoreBalance()) ?> - diff --git a/app/design/frontend/default/modern/template/customer/dashboard.phtml b/app/design/frontend/default/modern/template/customer/dashboard.phtml deleted file mode 100644 index c46338914c..0000000000 --- a/app/design/frontend/default/modern/template/customer/dashboard.phtml +++ /dev/null @@ -1,85 +0,0 @@ - -getMessagesBlock()->getGroupedHtml() ?> -
      -

      __('Personal Information') ?>

      -

      - getCustomer()->toString('{{firstname}} {{lastname}}
      {{email}}') ?> -
      - __('Edit Personal Information') ?> -

      -

      - getSubscriptionText() ?> -

      __('Edit Newsletter Subscription') ?>

      -
      -
      -

      __('Addresses') ?>

      -getPrimaryAddresses()): ?> - -
      - format('html') ?> -
      __('Edit Address') ?> -
      - - -__('Go to Address Book') ?> -
      -
      - -
      -

      __('Last 5 Orders') ?>

      -

      - __('Order List...') ?>
      - __('View Order List') ?> -

      -
      - -
      -

      __('Personal Information') ?>

      -
      - -helper('wishlist')->isAllow()) : ?> -
      -

      __('My Wishlist') ?>

      -
      - - -
      -

      __('My Reviews') ?>

      -
      - -
      -

      __('My Tags') ?>

      -
      - -
      -

      __('Last Viewed Items') ?>

      -
      - -
      -

      __('Shopping Cart') ?>

      -
      diff --git a/app/design/frontend/default/modern/template/customer/form/address.phtml b/app/design/frontend/default/modern/template/customer/form/address.phtml deleted file mode 100644 index 83b445c2db..0000000000 --- a/app/design/frontend/default/modern/template/customer/form/address.phtml +++ /dev/null @@ -1,123 +0,0 @@ - -
      - - -
      -

      getAddressId()): ?>__('Edit Address Entry') ?>__('New Address Entry') ?>

      -getMessagesBlock()->getGroupedHtml() ?> -
      -
      - - -

      __('Personal Information') ?>

      -
        -
      • - getLayout()->createBlock('customer/widget_name')->setObject($data)->toHtml() ?> -
      • -
      • -
        -
        - -
        -
      • -
      -
      -
      -

      __('Address') ?>

      -
        -
      • -
        - -
      • -helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?> -
      • - -
      • - -
      • -
        -
        - -
        -
        -
        - - - -
        -
      • -
      • -
        -
        - -
        -
        -
        - -
        -
      • -
      • -
        -
        -
        -
        -
        - -
        -
      • - $type): ?> -
      • - isPrimary($type['address_type_id'])): ?> - __("This is My Default %s Address", ucfirst($type['name'])) ?> - -   - - -
      • - -
      -
      -
      -

      __('* Required Fields') ?>

      - « __('Back') ?> - -
      -
      - -
      diff --git a/app/design/frontend/default/modern/template/customer/form/changepassword.phtml b/app/design/frontend/default/modern/template/customer/form/changepassword.phtml deleted file mode 100644 index 7424764d33..0000000000 --- a/app/design/frontend/default/modern/template/customer/form/changepassword.phtml +++ /dev/null @@ -1,58 +0,0 @@ - - getMessagesBlock()->getGroupedHtml() ?> -
      -
      - __('Change Account Password') ?> -
        -
      • -
        -
        - -
        -
      • -
      • -
        -
        - -
        -
        -
        - -
        -
      • -
      -
      -
      -

      __('* Required Fields') ?>

      - « __('Back') ?> - -
      -
      - diff --git a/app/design/frontend/default/modern/template/customer/form/confirmation.phtml b/app/design/frontend/default/modern/template/customer/form/confirmation.phtml deleted file mode 100644 index b932a722ba..0000000000 --- a/app/design/frontend/default/modern/template/customer/form/confirmation.phtml +++ /dev/null @@ -1,48 +0,0 @@ - -
      -

      __('Send confirmation link') ?>

      -
      getMessagesBlock()->getGroupedHtml() ?> -
      -
      - __('Retrieve your confirmation link here') ?> -

      __('Please enter your email below and we\'ll send you confirmation link for it.') ?>

      -
        -
      • -

        -
      • -
      -
      -

      __('* Required Fields') ?>

      - « __('Back to Login') ?> - -
      -
      -
      - diff --git a/app/design/frontend/default/modern/template/customer/form/edit.phtml b/app/design/frontend/default/modern/template/customer/form/edit.phtml deleted file mode 100644 index bb7209b085..0000000000 --- a/app/design/frontend/default/modern/template/customer/form/edit.phtml +++ /dev/null @@ -1,113 +0,0 @@ - -
      -
      -

      __('Edit Account Information') ?>

      -
      -getMessagesBlock()->getGroupedHtml() ?> -
      -getBlockHtml('formkey')?> -
      -
      -

      __('Account Information') ?>

      -
      -
        -
      • - getLayout()->createBlock('customer/widget_name')->setObject($this->getCustomer())->toHtml() ?> -
      • -
      • -
        -
        - -
        -
      • -getLayout()->createBlock('customer/widget_dob') ?> -isEnabled()): ?> -
      • setDate($this->getCustomer()->getDob())->toHtml() ?>
      • - -getLayout()->createBlock('customer/widget_taxvat') ?> -isEnabled()): ?> -
      • setTaxvat($this->getCustomer()->getTaxvat())->toHtml() ?>
      • - -getLayout()->createBlock('customer/widget_gender') ?> -isEnabled()): ?> -
      • setGender($this->getCustomer()->getGender())->toHtml() ?>
      • - -
      -
      -

      getCustomer()->getChangePassword()==1): ?>checked="checked" />

      - -
      - « __('Back') ?> -

      __('* Required Fields') ?>

      - -
      -
      - -
      diff --git a/app/design/frontend/default/modern/template/customer/form/forgotpassword.phtml b/app/design/frontend/default/modern/template/customer/form/forgotpassword.phtml deleted file mode 100644 index c8043eab1b..0000000000 --- a/app/design/frontend/default/modern/template/customer/form/forgotpassword.phtml +++ /dev/null @@ -1,48 +0,0 @@ - -
      -

      __('Forgot Your Password?') ?>

      -
      getMessagesBlock()->getGroupedHtml() ?> -
      -
      - __('Retrieve your password here') ?> -

      __('Please enter your email below and we\'ll send you a new password.') ?>

      -
        -
      • -

        -
      • -
      -
      -

      __('* Required Fields') ?>

      - « __('Back to Login') ?> - -
      -
      -
      - diff --git a/app/design/frontend/default/modern/template/customer/form/login.phtml b/app/design/frontend/default/modern/template/customer/form/login.phtml deleted file mode 100644 index 1845f95c65..0000000000 --- a/app/design/frontend/default/modern/template/customer/form/login.phtml +++ /dev/null @@ -1,78 +0,0 @@ - - -
      -

      __('Login or Create an Account') ?>

      -
      -getMessagesBlock()->getGroupedHtml() ?> -
      - -
      - diff --git a/app/design/frontend/default/modern/template/customer/form/mini.login.phtml b/app/design/frontend/default/modern/template/customer/form/mini.login.phtml deleted file mode 100644 index fa51da679d..0000000000 --- a/app/design/frontend/default/modern/template/customer/form/mini.login.phtml +++ /dev/null @@ -1,33 +0,0 @@ - -
      - - - - - -
      diff --git a/app/design/frontend/default/modern/template/customer/form/mini.newsletter.phtml b/app/design/frontend/default/modern/template/customer/form/mini.newsletter.phtml deleted file mode 100644 index 4c7981571d..0000000000 --- a/app/design/frontend/default/modern/template/customer/form/mini.newsletter.phtml +++ /dev/null @@ -1,42 +0,0 @@ - - diff --git a/app/design/frontend/default/modern/template/customer/form/newsletter.phtml b/app/design/frontend/default/modern/template/customer/form/newsletter.phtml deleted file mode 100644 index 632233eef1..0000000000 --- a/app/design/frontend/default/modern/template/customer/form/newsletter.phtml +++ /dev/null @@ -1,43 +0,0 @@ - -
      -getMessagesBlock()->getGroupedHtml() ?> -
      -

      __('Newsletter Subscription') ?>

      -
      -
      - getBlockHtml('formkey')?> -

      getIsSubscribed()): ?> checked="checked"/>

      - -
      - -
      diff --git a/app/design/frontend/default/modern/template/customer/form/register.phtml b/app/design/frontend/default/modern/template/customer/form/register.phtml deleted file mode 100644 index c16cff145e..0000000000 --- a/app/design/frontend/default/modern/template/customer/form/register.phtml +++ /dev/null @@ -1,161 +0,0 @@ - - -
      -

      __('Create an Account') ?>

      -
      -getMessagesBlock()->getGroupedHtml() ?> -
      -
      - - -
      -

      __('Personal Information') ?>

      -
      -
        -
      • - getLayout()->createBlock('customer/widget_name')->setObject($this->getFormData())->toHtml() ?> -
      • -
      • -
        -
        - -
        -
      • - isNewsletterEnabled()): ?> -
      • - getFormData()->getIsSubscribed()): ?> checked="checked"/> - -
      • - -getLayout()->createBlock('customer/widget_dob') ?> -isEnabled()): ?> -
      • setDate($this->getFormData()->getDob())->toHtml() ?>
      • - -getLayout()->createBlock('customer/widget_taxvat') ?> -isEnabled()): ?> -
      • setTaxvat($this->getFormData()->getTaxvat())->toHtml() ?>
      • - -getLayout()->createBlock('customer/widget_gender') ?> -isEnabled()): ?> -
      • setGender($this->getFormData()->getGender())->toHtml() ?>
      • - -
      -
      -getShowAddressFields()): ?>
      - -
      -
      -

      __('Address Information') ?>

      -
      -
        -
      • -
        -
        - -
        -
        -
        - -
        -
      • -
      • -
        - -
      • -helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?> -
      • - -
      • - -
      • -
        -
        - -
        -
        -
        - - - -
        -
      • -
      • -
        -
        - -
        -
        -
        - getCountryHtmlSelect() ?> -
        -
      • -
      -
      - - - -
      -
      -
      -

      __('Login Information') ?>

      -
      -
        -
      • -
        -
        - -
        -
        -
        - -
        -
      • -
      -
      -
      -

      __('* Required Fields') ?>

      - « __('Back') ?> - -
      -
      - diff --git a/app/design/frontend/default/modern/template/customer/order/view.phtml b/app/design/frontend/default/modern/template/customer/order/view.phtml deleted file mode 100644 index 369afe5903..0000000000 --- a/app/design/frontend/default/modern/template/customer/order/view.phtml +++ /dev/null @@ -1,88 +0,0 @@ - - -
      -

      __('Order #%s (%s)', $order->getOrderId(), $order->getStatus()) ?>

      -
      - -
      -
      -

      __('Billing Information') ?>

      -
      - getAddressByType('billing')->format('html') ?> -
      -
      -
      -

      __('Payment Method') ?>

      - getChildHtml('payment') ?> -
      -
      -

      -
      -
      -

      __('Shipping Information') ?>

      -
      - getAddressByType('shipping')->format('html') ?> -
      -
      -

      __('Shipping Method') ?>

      - getShippingDescription() ?> -
      -
      -

      - getEntitiesByType('item') ?> - - - - - - - - - - - - - - - - - - - - - - - - -
      __('Items Order') ?>__('Qty') ?>__('Price') ?>__('Ext. Price') ?>
      - __('Grand Total: %s', $order->getGrandTotal()) ?> -
      htmlEscape($_item->getName()) ?>getQty() ?>getPrice() ?>getRowTotal() ?>
      - - diff --git a/app/design/frontend/default/modern/template/customer/orders.phtml b/app/design/frontend/default/modern/template/customer/orders.phtml deleted file mode 100644 index 5d3d854aa7..0000000000 --- a/app/design/frontend/default/modern/template/customer/orders.phtml +++ /dev/null @@ -1,63 +0,0 @@ - - -
      -

      __('My Orders') ?>

      -
      - -getSize()): ?> - - - - - - - - - - - - - - - - - - - - - - - -
      __('Order #') ?>__('Date') ?>__('Total') ?>__('Status') ?>__('Details') ?>
      getRealOrderId() ?> getCreatedAt())) ?> getGrandTotal() ?> getStatus() ?> __('View Order') ?> 
      - - -

      __('You have placed no orders yet.') ?>

      - - diff --git a/app/design/frontend/default/modern/template/customer/widget/dob.phtml b/app/design/frontend/default/modern/template/customer/widget/dob.phtml deleted file mode 100644 index 2f9437813a..0000000000 --- a/app/design/frontend/default/modern/template/customer/widget/dob.phtml +++ /dev/null @@ -1,92 +0,0 @@ -getLayout()->createBlock('customer/widget_dob') - ->setDate($this->getCustomer()->getDob()) - ->toHtml() ?> - -For checkout/onepage/billing.phtml: - -getLayout()->createBlock('customer/widget_dob') - ->setDate($this->getCustomer()->getDob()) - ->setFieldIdFormat('billing:%s') - ->setFieldNameFormat('billing[%s]') - ->toHtml() ?> - -NOTE: Regarding styles - if we leave it this way, we'll move it to boxes.css - Alternatively we could calculate widths automatically using block input parameters. -*/ - -/** - * @see Mage_Customer_Block_Widget_Dob - */ -?> -
      - - -setDateInput('d', - '
      - getFieldParams() . ' /> - -
      ' - ); - - $this->setDateInput('m', - '
      - getFieldParams() . ' /> - -
      ' - ); - - $this->setDateInput('y', - '
      - getFieldParams() . ' /> - -
      ' - ); -?> -getSortedDateInputs() ?> - - - - -
      - diff --git a/app/design/frontend/default/modern/template/customer/widget/gender.phtml b/app/design/frontend/default/modern/template/customer/widget/gender.phtml deleted file mode 100644 index b41bdb69e0..0000000000 --- a/app/design/frontend/default/modern/template/customer/widget/gender.phtml +++ /dev/null @@ -1,34 +0,0 @@ - - - diff --git a/app/design/frontend/default/modern/template/customer/widget/name.phtml b/app/design/frontend/default/modern/template/customer/widget/name.phtml deleted file mode 100644 index b8b271fe79..0000000000 --- a/app/design/frontend/default/modern/template/customer/widget/name.phtml +++ /dev/null @@ -1,158 +0,0 @@ -getLayout()->createBlock('customer/widget_name') - ->setObject($this->getAddress()) - ->toHtml() ?> - -For checkout/onepage/shipping.phtml: - -getLayout()->createBlock('customer/widget_name') - ->setObject($this->getAddress()) - ->setFieldIdFormat('shipping:%s') - ->setFieldNameFormat('shipping[%s]') - ->setFieldParams('onchange="shipping.setSameAsBilling(false);"') - ->toHtml() ?> -*/ -?> - -
      -showPrefix()): ?> -
      - -
      - getPrefixOptions()===false): ?> - getFieldParams() ?> /> - - - -
      - - -
      - -
      - getFieldParams() ?> /> -
      - -showMiddlename()): ?> -
      - -
      - getFieldParams() ?> /> -
      - - -
      - -
      - getFieldParams() ?> /> -
      - -showSuffix()): ?> -
      - -
      - getSuffixOptions()===false): ?> - getFieldParams() ?> /> - - - -
      - - -
      diff --git a/app/design/frontend/default/modern/template/customer/widget/taxvat.phtml b/app/design/frontend/default/modern/template/customer/widget/taxvat.phtml deleted file mode 100644 index 19997e9a0e..0000000000 --- a/app/design/frontend/default/modern/template/customer/widget/taxvat.phtml +++ /dev/null @@ -1,40 +0,0 @@ - - -
      - -
      - getFieldParams() ?> /> -
      diff --git a/app/design/frontend/default/modern/template/customer/wishlist.phtml b/app/design/frontend/default/modern/template/customer/wishlist.phtml deleted file mode 100644 index a62e88a112..0000000000 --- a/app/design/frontend/default/modern/template/customer/wishlist.phtml +++ /dev/null @@ -1,60 +0,0 @@ - - -

      __('Wishlist') ?>

      -getSize()): ?> -
      - - - - - - - - - - - - - - - -
      __('Product') ?>__('Status') ?>__('To Cart') ?>__('Remove') ?>
      - - htmlEscape($item->getProduct()->getName()) ?> - getStatus() ?>
      - -
      - -

      __('You have placed no products yet.') ?>

      - - diff --git a/app/design/frontend/default/modern/template/cybermut/error.phtml b/app/design/frontend/default/modern/template/cybermut/error.phtml deleted file mode 100644 index 1abea85c45..0000000000 --- a/app/design/frontend/default/modern/template/cybermut/error.phtml +++ /dev/null @@ -1,30 +0,0 @@ - -
      -

      __('Error occured') ?>

      -
      -

      __('There was an error occurred during paying process.') ?>

      diff --git a/app/design/frontend/default/modern/template/cybermut/form.phtml b/app/design/frontend/default/modern/template/cybermut/form.phtml deleted file mode 100644 index 4bb040dd45..0000000000 --- a/app/design/frontend/default/modern/template/cybermut/form.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -
      - getMethodCode() ?> - -
      diff --git a/app/design/frontend/default/modern/template/cybersource/form.phtml b/app/design/frontend/default/modern/template/cybersource/form.phtml deleted file mode 100644 index 6a3dcd1a00..0000000000 --- a/app/design/frontend/default/modern/template/cybersource/form.phtml +++ /dev/null @@ -1,183 +0,0 @@ - -
      - getMethodCode() ?> - - -
      - diff --git a/app/design/frontend/default/modern/template/cybersource/info.phtml b/app/design/frontend/default/modern/template/cybersource/info.phtml deleted file mode 100644 index 8d6a1f3a57..0000000000 --- a/app/design/frontend/default/modern/template/cybersource/info.phtml +++ /dev/null @@ -1,38 +0,0 @@ - -getInfo()): ?> -getMethod()->getTitle() ?>
      - -__('Credit Card Type: %s', $this->getCcTypeName()) ?>
      -__('Credit Card Number: xxxx-%s', $this->getInfo()->getCcLast4()) ?>
      -getInfo()->getCcSsIssue()): ?> -__("Switch/Solo/Maestro(UK Domestic) card issue number: %s", $this->getInfo()->getCcSsIssue()) ?>
      - -getInfo()->getCcSsStartYear()): ?> -__('Switch/Solo/Maestro(UK Domestic) card start Date: %s/%s', $this->getCcStartMonth(), $this->getInfo()->getCcSsStartYear()) ?> - - diff --git a/app/design/frontend/default/modern/template/directory/currency.phtml b/app/design/frontend/default/modern/template/directory/currency.phtml deleted file mode 100644 index 0a5607ebd1..0000000000 --- a/app/design/frontend/default/modern/template/directory/currency.phtml +++ /dev/null @@ -1,52 +0,0 @@ - - -getCurrencyCount()>1): ?> -
      -
      - -
      - - diff --git a/app/design/frontend/default/modern/template/directory/currency/switch.phtml b/app/design/frontend/default/modern/template/directory/currency/switch.phtml deleted file mode 100644 index 6b9c614bdf..0000000000 --- a/app/design/frontend/default/modern/template/directory/currency/switch.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -

      __('Currency') ?>

      -__('Your current currency is: %s', $currency->getCode()) ?> - diff --git a/app/design/frontend/default/modern/template/downloadable/catalog/product/links.phtml b/app/design/frontend/default/modern/template/downloadable/catalog/product/links.phtml deleted file mode 100644 index 6d75298193..0000000000 --- a/app/design/frontend/default/modern/template/downloadable/catalog/product/links.phtml +++ /dev/null @@ -1,111 +0,0 @@ - -getLinksPurchasedSeparately() ?> -getProduct()->isSaleable() && $this->hasLinks()):?> -
      - getLinks(); ?> - getLinkSelectionRequired(); ?> -
      - decoratedIsLast){?> class="last"> - - - - - - -
      - - diff --git a/app/design/frontend/default/modern/template/downloadable/catalog/product/samples.phtml b/app/design/frontend/default/modern/template/downloadable/catalog/product/samples.phtml deleted file mode 100644 index c4fc63a3f4..0000000000 --- a/app/design/frontend/default/modern/template/downloadable/catalog/product/samples.phtml +++ /dev/null @@ -1,45 +0,0 @@ - - -hasSamples()): ?> -
      -
      getSamplesTitle() ?>
      - getSamples() ?> - -
      - getIsOpenInNewWindow()?'onclick="this.target=\'_blank\'"':''; ?>>getTitle() ?> -
      - -
      - diff --git a/app/design/frontend/default/modern/template/downloadable/catalog/product/type.phtml b/app/design/frontend/default/modern/template/downloadable/catalog/product/type.phtml deleted file mode 100644 index 20d2260977..0000000000 --- a/app/design/frontend/default/modern/template/downloadable/catalog/product/type.phtml +++ /dev/null @@ -1,45 +0,0 @@ - - -getProduct() ?> - -isSaleable()): ?> -

      __('Availability: In stock.') ?>

      - -

      __('Availability: Out of stock.') ?>

      - - -getPriceHtml($_product) ?> - -getChildHtml('samples') ?> diff --git a/app/design/frontend/default/modern/template/downloadable/checkout/cart/item/default.phtml b/app/design/frontend/default/modern/template/downloadable/checkout/cart/item/default.phtml deleted file mode 100644 index 83e41224f0..0000000000 --- a/app/design/frontend/default/modern/template/downloadable/checkout/cart/item/default.phtml +++ /dev/null @@ -1,276 +0,0 @@ - -getItem()?> - - - - <?php echo $this->htmlEscape($this->getProductName()) ?> - - - -

      getProductName() ?>

      - - - getOptionList()):?> -
      - - getFormatedOptionValue($_option) ?> -
      htmlEscape($_option['label']) ?>
      - class="truncated"> - -
      -
      -
      htmlEscape($_option['label']) ?>
      -
      -
      -
      - - - -
      - - - - - getLinks()): ?> -
      -
      getLinksTitle() ?>
      - -
      getTitle() ?>
      - -
      - - - - getMessages()): ?> - -
      - * -
      - - - - helper('wishlist')->isAllowInCart()) : ?> - - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
      - -
      - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?> - - helper('checkout')->formatPrice($_item->getCalculationPrice()) ?> - - -
      - - - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
      - __('Total'); ?>:
      helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
      -
      - - - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->getPriceInclTax($_item); ?> - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
      - -
      - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?> - - helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?> - - -
      - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
      - __('Total incl. tax'); ?>:
      helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?>
      -
      - - - - - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
      - -
      - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - helper('checkout')->formatPrice($_item->getRowTotal()) ?> - - -
      - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
      - __('Total'); ?>:
      helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
      -
      - - - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
      - -
      - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - -
      - - - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
      - __('Total incl. tax'); ?>:
      helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
      -
      - - - - - - - <?php $this->__('Remove item')?> - - - diff --git a/app/design/frontend/default/modern/template/downloadable/checkout/multishipping/item/downloadable.phtml b/app/design/frontend/default/modern/template/downloadable/checkout/multishipping/item/downloadable.phtml deleted file mode 100644 index 26fd32e947..0000000000 --- a/app/design/frontend/default/modern/template/downloadable/checkout/multishipping/item/downloadable.phtml +++ /dev/null @@ -1,57 +0,0 @@ - -

      getProductName() ?>

      - -getOptionList()):?> -
      - - getFormatedOptionValue($_option) ?> -
      htmlEscape($_option['label']) ?>
      - class="truncated"> - -
      -
      -
      htmlEscape($_option['label']) ?>
      -
      -
      -
      - - - -
      - - - - getLinks()): ?> -
      -
      getLinksTitle() ?>
      - -
      getTitle() ?>
      - -
      - - diff --git a/app/design/frontend/default/modern/template/downloadable/checkout/onepage/review/item.phtml b/app/design/frontend/default/modern/template/downloadable/checkout/onepage/review/item.phtml deleted file mode 100644 index 5947a1fd4e..0000000000 --- a/app/design/frontend/default/modern/template/downloadable/checkout/onepage/review/item.phtml +++ /dev/null @@ -1,247 +0,0 @@ - -getItem()?> - -

      htmlEscape($this->getProductName()) ?>

      - - getOptionList()):?> -
      - - getFormatedOptionValue($_option) ?> -
      htmlEscape($_option['label']) ?>
      - class="truncated"> - -
      -
      -
      htmlEscape($_option['label']) ?>
      -
      -
      -
      - - - -
      - - - getLinks()): ?> -
      -
      getLinksTitle() ?>
      - -
      getTitle() ?>
      - -
      - - - - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
      - -
      - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?> - - helper('checkout')->formatPrice($_item->getCalculationPrice()) ?> - - -
      - - - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
      - __('Total'); ?>:
      helper('checkout')->formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedAmount()+$_item->getWeeeTaxDisposition()); ?>
      -
      - - - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->getPriceInclTax($_item); ?> - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
      - -
      - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?> - - helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxDisposition()) ?> - - -
      - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
      - __('Total incl. tax'); ?>:
      helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedAmount()); ?>
      -
      - - - - - getQty() ?> - helper('tax')->displayCartPriceExclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
      - -
      - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - helper('checkout')->formatPrice($_item->getRowTotal()) ?> - - -
      - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
      - __('Total'); ?>:
      helper('checkout')->formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
      -
      - - - - - helper('tax')->displayCartPriceInclTax() || $this->helper('tax')->displayCartBothPrices()): ?> - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
      - -
      - - - typeOfDisplay($_item, array(0, 1, 4), 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> - helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - helper('checkout')->formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - -
      - - - getApplied($_item)): ?> - - - - typeOfDisplay($_item, 2, 'sales') && $_item->getWeeeTaxAppliedAmount()): ?> -
      - __('Total incl. tax'); ?>:
      helper('checkout')->formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
      -
      - - - - - diff --git a/app/design/frontend/default/modern/template/downloadable/checkout/success.phtml b/app/design/frontend/default/modern/template/downloadable/checkout/success.phtml deleted file mode 100644 index c4a1289343..0000000000 --- a/app/design/frontend/default/modern/template/downloadable/checkout/success.phtml +++ /dev/null @@ -1,29 +0,0 @@ - -getOrderHasDownloadable()): ?> -__('Go to My Downloadable Products', $this->getDownloadableProductsUrl()) ?> - diff --git a/app/design/frontend/default/modern/template/downloadable/customer/products/list.phtml b/app/design/frontend/default/modern/template/downloadable/customer/products/list.phtml deleted file mode 100644 index 512ae3a6bc..0000000000 --- a/app/design/frontend/default/modern/template/downloadable/customer/products/list.phtml +++ /dev/null @@ -1,69 +0,0 @@ - - -getMessagesBlock()->getGroupedHtml() ?> -getItems(); ?> -
      -

      __('My Downloadable Products') ?>

      -
      -getChildHtml('pager'); ?> - - - - - - - - - - - - - - - - - - - - - - - -
      __('Order #') ?>__('Date') ?>__('Title') ?>__('Status') ?>__('Remaining Downloads') ?>
      getPurchased()->getOrderIncrementId() ?>formatDate($_item->getPurchased()->getCreatedAt()) ?>getPurchased()->getProductName() ?> - getIsOpenInNewWindow()?'onclick="this.target=\'_blank\'"':''; ?>>getLinkTitle() ?>getStatus()) ?>getRemainingDownloads($_item) ?>
      - - -

      __('You have not purchased any downloadable products yet.'); ?>

      - -getChildHtml('pager'); ?> - diff --git a/app/design/frontend/default/modern/template/downloadable/email/order/items/creditmemo/downloadable.phtml b/app/design/frontend/default/modern/template/downloadable/email/order/items/creditmemo/downloadable.phtml deleted file mode 100644 index 83cff9ad7e..0000000000 --- a/app/design/frontend/default/modern/template/downloadable/email/order/items/creditmemo/downloadable.phtml +++ /dev/null @@ -1,128 +0,0 @@ - -getItem() ?> -getItem()->getOrder(); ?> - - - htmlEscape($_item->getName()) ?> - getItemOptions()): ?> -
      - getItemOptions() as $option): ?> -
      -
      - -
      - - getLinks()->getPurchasedItems()): ?> -
      -
      getLinksTitle() ?>
      - -
      getLinkTitle() ?>
      - -
      - - getDescription() ?> - - getSku($_item) ?> - getQty()*1 ?> - - helper('tax')->displayCartPriceExclTax($_order->getStore()) || $this->helper('tax')->displayCartBothPrices($_order->getStore())): ?> - helper('tax')->displayCartBothPrices($_order->getStore())): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - formatPrice($_item->getRowTotal()) ?> - - - - getApplied($_item)): ?> -
      - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
      - -
      - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
      - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
      - -
      - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> -
      - __('Total'); ?>:
      formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
      - - - - - - helper('tax')->displayCartPriceInclTax($_order->getStore()) || $this->helper('tax')->displayCartBothPrices($_order->getStore())): ?> - helper('tax')->displayCartBothPrices($_order->getStore())): ?> -
      __('Incl. Tax'); ?>: - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - getApplied($_item)): ?> -
      - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
      - -
      - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
      - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
      - -
      - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - __('Total incl. tax'); ?>:
      formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
      - - - - - diff --git a/app/design/frontend/default/modern/template/downloadable/email/order/items/invoice/downloadable.phtml b/app/design/frontend/default/modern/template/downloadable/email/order/items/invoice/downloadable.phtml deleted file mode 100644 index 7e4ddb2fc4..0000000000 --- a/app/design/frontend/default/modern/template/downloadable/email/order/items/invoice/downloadable.phtml +++ /dev/null @@ -1,131 +0,0 @@ - -getItem() ?> -getItem()->getOrder(); ?> - - - htmlEscape($_item->getName()) ?> - getItemOptions()): ?> -
      - getItemOptions() as $option): ?> -
      -
      - -
      - - getLinks()->getPurchasedItems()): ?> -
      -
      getLinksTitle() ?>
      - -
      - getLinkTitle() ?>  - (__('download') ?>) -
      - -
      - - getDescription() ?> - - getSku($_item) ?> - getQty()*1 ?> - - helper('tax')->displayCartPriceExclTax($_order->getStore()) || $this->helper('tax')->displayCartBothPrices($_order->getStore())): ?> - helper('tax')->displayCartBothPrices($_order->getStore())): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - formatPrice($_item->getRowTotal()) ?> - - - - getApplied($_item)): ?> -
      - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
      - -
      - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
      - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
      - -
      - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> -
      - __('Total'); ?>:
      formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
      - - - - - - helper('tax')->displayCartPriceInclTax($_order->getStore()) || $this->helper('tax')->displayCartBothPrices($_order->getStore())): ?> - helper('tax')->displayCartBothPrices($_order->getStore())): ?> -
      __('Incl. Tax'); ?>: - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - getApplied($_item)): ?> -
      - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
      - -
      - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
      - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
      - -
      - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - __('Total incl. tax'); ?>:
      formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
      - - - - - diff --git a/app/design/frontend/default/modern/template/downloadable/email/order/items/order/downloadable.phtml b/app/design/frontend/default/modern/template/downloadable/email/order/items/order/downloadable.phtml deleted file mode 100644 index e015846ea9..0000000000 --- a/app/design/frontend/default/modern/template/downloadable/email/order/items/order/downloadable.phtml +++ /dev/null @@ -1,137 +0,0 @@ - -getItem() ?> -getItem()->getOrder() ?> - - - htmlEscape($_item->getName()) ?> - getItemOptions()): ?> -
      - getItemOptions() as $option): ?> -
      -
      - -
      - - getLinks()->getPurchasedItems()): ?> -
      -
      getLinksTitle() ?>
      - -
      - getLinkTitle() ?>  - (__('download') ?>) -
      - -
      - - getDescription() ?> - getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_item->getGiftMessageId())): ?> -
      __('Gift Message') ?> -
      __('From:'); ?> htmlEscape($_giftMessage->getSender()) ?> -
      __('To:'); ?> htmlEscape($_giftMessage->getRecipient()) ?> -
      __('Message:'); ?>
      htmlEscape($_giftMessage->getMessage()) ?> - - - getSku($_item) ?> - getQtyOrdered()*1 ?> - - helper('tax')->displayCartPriceExclTax($_order->getStore()) || $this->helper('tax')->displayCartBothPrices($_order->getStore())): ?> - helper('tax')->displayCartBothPrices($_order->getStore())): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - formatPrice($_item->getRowTotal()) ?> - - - - getApplied($_item)): ?> -
      - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
      - -
      - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
      - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
      - -
      - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> -
      - __('Total'); ?>:
      formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
      - - - - - - helper('tax')->displayCartPriceInclTax($_order->getStore()) || $this->helper('tax')->displayCartBothPrices($_order->getStore())): ?> - helper('tax')->displayCartBothPrices($_order->getStore())): ?> -
      __('Incl. Tax'); ?>: - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - getApplied($_item)): ?> -
      - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
      - -
      - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
      - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
      - -
      - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - __('Total incl. tax'); ?>:
      formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
      - - - - - diff --git a/app/design/frontend/default/modern/template/downloadable/sales/order/creditmemo/items/renderer/downloadable.phtml b/app/design/frontend/default/modern/template/downloadable/sales/order/creditmemo/items/renderer/downloadable.phtml deleted file mode 100644 index 3c164c2da5..0000000000 --- a/app/design/frontend/default/modern/template/downloadable/sales/order/creditmemo/items/renderer/downloadable.phtml +++ /dev/null @@ -1,112 +0,0 @@ - -getItem() ?> -getItem()->getOrderItem()->getOrder() ?> - -
      htmlEscape($_item->getName()) ?>
      - getItemOptions()): ?> -
      - -
      htmlEscape($_option['label']) ?>
      - getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - -
      -
      -
      htmlEscape($_option['label']) ?>
      -
      -
      -
      - - - -
      htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
      - - -
      - - - - getLinks()): ?> -
      -
      getLinksTitle() ?>
      - getPurchasedItems() as $link): ?> -
      getLinkTitle() ?>
      - -
      - - - - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item->getOrderItem()) && $_item->getGiftMessageId()): ?> -
      __('Gift Message') ?> - - - splitInjection($this->getSku()) ?> - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceExclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - __('Excl. Tax'); ?>: - - formatPrice($_item->getPrice()) ?> - - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceInclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - __('Incl. Tax'); ?>: - - formatPrice($this->helper('checkout')->getPriceInclTax($_item)); ?> - - - - getQty()*1 ?> - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceExclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - __('Excl. Tax'); ?>: - - formatPrice($_item->getRowTotal()) ?> - - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceInclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - __('Incl. Tax'); ?>: - - formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?> - - - - formatPrice(-$_item->getDiscountAmount()) ?> - - formatPrice($_item->getRowTotal()-$_item->getDiscountAmount()+$_item->getTaxAmount()) ?> - - diff --git a/app/design/frontend/default/modern/template/downloadable/sales/order/invoice/items/renderer/downloadable.phtml b/app/design/frontend/default/modern/template/downloadable/sales/order/invoice/items/renderer/downloadable.phtml deleted file mode 100644 index 0357c68149..0000000000 --- a/app/design/frontend/default/modern/template/downloadable/sales/order/invoice/items/renderer/downloadable.phtml +++ /dev/null @@ -1,109 +0,0 @@ - -getItem() ?> -getItem()->getOrderItem()->getOrder() ?> - -
      htmlEscape($_item->getName()) ?>
      - getItemOptions()): ?> -
      - -
      htmlEscape($_option['label']) ?>
      - getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - - -
      -
      -
      htmlEscape($_option['label']) ?>
      -
      -
      -
      - - - -
      htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
      - - -
      - - - - getLinks()): ?> -
      -
      getLinksTitle() ?>
      - getPurchasedItems() as $link): ?> -
      getLinkTitle() ?>
      - -
      - - - - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item->getOrderItem()) && $_item->getGiftMessageId()): ?> -
      __('Gift Message') ?> - - - splitInjection($this->getSku()) ?> - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceExclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - __('Excl. Tax'); ?>: - - formatPrice($_item->getPrice()) ?> - - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceInclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - __('Incl. Tax'); ?>: - - formatPrice($this->helper('checkout')->getPriceInclTax($_item)); ?> - - - - getQty()*1 ?> - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceExclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - __('Excl. Tax'); ?>: - - formatPrice($_item->getRowTotal()) ?> - - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceInclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - __('Incl. Tax'); ?>: - - formatPrice($this->helper('checkout')->getSubtotalInclTax($_item)); ?> - - - - diff --git a/app/design/frontend/default/modern/template/downloadable/sales/order/items/renderer/downloadable.phtml b/app/design/frontend/default/modern/template/downloadable/sales/order/items/renderer/downloadable.phtml deleted file mode 100644 index 7dd7aea433..0000000000 --- a/app/design/frontend/default/modern/template/downloadable/sales/order/items/renderer/downloadable.phtml +++ /dev/null @@ -1,131 +0,0 @@ - -getItem() ?> - -
      htmlEscape($_item->getName()) ?>
      - getItemOptions()): ?> -
      - -
      htmlEscape($_option['label']) ?>
      - getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - - -
      -
      -
      htmlEscape($_option['label']) ?>
      -
      -
      -
      - - - -
      htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
      - - -
      - - - - getLinks()): ?> -
      -
      getLinksTitle() ?>
      - getPurchasedItems() as $link): ?> -
      getLinkTitle() ?>
      - -
      - - - - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item) && $_item->getGiftMessageId()): ?> -
      __('Gift Message') ?> - - - splitInjection($this->getSku()) ?> - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceExclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - __('Excl. Tax'); ?>: - - getOrder()->formatPrice($this->getItem()->getPrice()) ?> - - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceInclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - __('Incl. Tax'); ?>: - - getOrder()->formatPrice($this->helper('checkout')->getPriceInclTax($this->getItem())); ?> - - - - - - getItem()->getQtyOrdered() > 0): ?> - __('Ordered'); ?>: getItem()->getQtyOrdered()*1 ?>
      - - getItem()->getQtyShipped() > 0): ?> - __('Shipped'); ?>: getItem()->getQtyShipped()*1 ?>
      - - getItem()->getQtyCanceled() > 0): ?> - __('Canceled'); ?>: getItem()->getQtyCanceled()*1 ?>
      - - getItem()->getQtyRefunded() > 0): ?> - __('Refunded'); ?>: getItem()->getQtyRefunded()*1 ?>
      - -
      - - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceExclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - __('Excl. Tax'); ?>: - - getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> - - - helper('tax')->displayCartBothPrices() || $this->helper('tax')->displayCartPriceInclTax()): ?> - - helper('tax')->displayCartBothPrices()): ?> - __('Incl. Tax'); ?>: - - getOrder()->formatPrice($this->helper('checkout')->getSubtotalInclTax($this->getItem())); ?> - - - - - diff --git a/app/design/frontend/default/modern/template/email/order/creditmemo/items.phtml b/app/design/frontend/default/modern/template/email/order/creditmemo/items.phtml deleted file mode 100644 index 04cbf28435..0000000000 --- a/app/design/frontend/default/modern/template/email/order/creditmemo/items.phtml +++ /dev/null @@ -1,51 +0,0 @@ - -getCreditmemo() ?> -getOrder() ?> - - - - - - - - - - - - getAllItems() as $_item): ?> - getOrderItem()->getParentItem()) continue; else $i++; ?> - > - getItemHtml($_item) ?> - - - - - getChildHtml('creditmemo_totals');?> - -
      __('Item') ?>__('Sku') ?>__('Qty') ?>__('Subtotal') ?>
      - diff --git a/app/design/frontend/default/modern/template/email/order/invoice/items.phtml b/app/design/frontend/default/modern/template/email/order/invoice/items.phtml deleted file mode 100644 index 5c18587a71..0000000000 --- a/app/design/frontend/default/modern/template/email/order/invoice/items.phtml +++ /dev/null @@ -1,51 +0,0 @@ - -getInvoice() ?> -getOrder() ?> - - - - - - - - - - - - getAllItems() as $_item): ?> - getOrderItem()->getParentItem()) continue; else $i++; ?> - > - getItemHtml($_item) ?> - - - - - getChildHtml('invoice_totals')?> - -
      __('Item') ?>__('Sku') ?>__('Qty') ?>__('Subtotal') ?>
      - diff --git a/app/design/frontend/default/modern/template/email/order/items.phtml b/app/design/frontend/default/modern/template/email/order/items.phtml deleted file mode 100644 index 6f2fb44223..0000000000 --- a/app/design/frontend/default/modern/template/email/order/items.phtml +++ /dev/null @@ -1,59 +0,0 @@ - -getOrder() ?> - - - - - - - - - - - getAllItems() as $_item): ?> - getParentItem()) continue; else $i++; ?> - > - getItemHtml($_item) ?> - - - - - getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_order->getGiftMessageId())): ?> - - - - - getChildHtml('order_totals') ?> - - -
      __('Item') ?>__('Sku') ?>__('Qty') ?>__('Subtotal') ?>
      - __('Gift Message') ?> -
      __('From:'); ?> htmlEscape($_giftMessage->getSender()) ?> -
      __('To:'); ?> htmlEscape($_giftMessage->getRecipient()) ?> -
      __('Message:'); ?>
      htmlEscape($_giftMessage->getMessage()) ?> -
      diff --git a/app/design/frontend/default/modern/template/email/order/items/creditmemo/default.phtml b/app/design/frontend/default/modern/template/email/order/items/creditmemo/default.phtml deleted file mode 100644 index b639e3f915..0000000000 --- a/app/design/frontend/default/modern/template/email/order/items/creditmemo/default.phtml +++ /dev/null @@ -1,120 +0,0 @@ - -getItem() ?> -getItem()->getOrder(); ?> - - - htmlEscape($_item->getName()) ?> - getItemOptions()): ?> -
      - getItemOptions() as $option): ?> -
      -
      - -
      - - getDescription() ?> - - getSku() ?> - getQty()*1 ?> - - helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - formatPrice($_item->getRowTotal()) ?> - - - - getApplied($_item)): ?> -
      - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
      - -
      - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
      - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
      - -
      - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> -
      - __('Total'); ?>:
      formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
      - - - - - - helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> -
      __('Incl. Tax'); ?>: - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - getApplied($_item)): ?> -
      - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
      - -
      - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
      - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
      - -
      - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - __('Total incl. tax'); ?>:
      formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
      - - - - - diff --git a/app/design/frontend/default/modern/template/email/order/items/invoice/default.phtml b/app/design/frontend/default/modern/template/email/order/items/invoice/default.phtml deleted file mode 100644 index b639e3f915..0000000000 --- a/app/design/frontend/default/modern/template/email/order/items/invoice/default.phtml +++ /dev/null @@ -1,120 +0,0 @@ - -getItem() ?> -getItem()->getOrder(); ?> - - - htmlEscape($_item->getName()) ?> - getItemOptions()): ?> -
      - getItemOptions() as $option): ?> -
      -
      - -
      - - getDescription() ?> - - getSku() ?> - getQty()*1 ?> - - helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - formatPrice($_item->getRowTotal()) ?> - - - - getApplied($_item)): ?> -
      - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
      - -
      - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
      - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
      - -
      - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> -
      - __('Total'); ?>:
      formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
      - - - - - - helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> -
      __('Incl. Tax'); ?>: - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - getApplied($_item)): ?> -
      - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
      - -
      - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
      - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
      - -
      - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - __('Total incl. tax'); ?>:
      formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
      - - - - - diff --git a/app/design/frontend/default/modern/template/email/order/items/order/default.phtml b/app/design/frontend/default/modern/template/email/order/items/order/default.phtml deleted file mode 100644 index 7de6c95365..0000000000 --- a/app/design/frontend/default/modern/template/email/order/items/order/default.phtml +++ /dev/null @@ -1,126 +0,0 @@ - -getItem() ?> -getItem()->getOrder() ?> - - - htmlEscape($_item->getName()) ?> - getItemOptions()): ?> -
      - getItemOptions() as $option): ?> -
      -
      - -
      - - getDescription() ?> - getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_item->getGiftMessageId())): ?> -
      __('Gift Message') ?> -
      __('From:'); ?> htmlEscape($_giftMessage->getSender()) ?> -
      __('To:'); ?> htmlEscape($_giftMessage->getRecipient()) ?> -
      __('Message:'); ?>
      htmlEscape($_giftMessage->getMessage()) ?> - - - getSku() ?> - getQtyOrdered()*1 ?> - - helper('tax')->displaySalesPriceExclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - __('Excl. Tax'); ?>: - - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_item->getRowTotal()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?> - - formatPrice($_item->getRowTotal()) ?> - - - - getApplied($_item)): ?> -
      - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
      - -
      - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
      - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
      - -
      - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> -
      - __('Total'); ?>:
      formatPrice($_item->getCalculationPrice()+$_item->getWeeeTaxAppliedRowAmount()+$_item->getWeeeTaxRowDisposition()); ?>
      - - - - - - helper('tax')->displaySalesPriceInclTax($_order->getStore()) || $this->helper('tax')->displaySalesBothPrices($_order->getStore())): ?> - helper('tax')->displaySalesBothPrices($_order->getStore())): ?> -
      __('Incl. Tax'); ?>: - - helper('checkout')->getSubtotalInclTax($_item); ?> - typeOfDisplay($_item, array(0, 1, 4), 'email', $_order->getStore())): ?> - formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?> - - formatPrice($_incl-$_item->getWeeeTaxRowDisposition()) ?> - - getApplied($_item)): ?> -
      - typeOfDisplay($_item, 1, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount'],true,true); ?>
      - -
      - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
      - - typeOfDisplay($_item, 4, 'email', $_order->getStore())): ?> - - getApplied($_item) as $tax): ?> - : formatPrice($tax['row_amount_incl_tax'],true,true); ?>
      - -
      - - - typeOfDisplay($_item, 2, 'email', $_order->getStore())): ?> - __('Total incl. tax'); ?>:
      formatPrice($_incl+$_item->getWeeeTaxAppliedRowAmount()); ?>
      - - - - - diff --git a/app/design/frontend/default/modern/template/email/order/items/shipment/default.phtml b/app/design/frontend/default/modern/template/email/order/items/shipment/default.phtml deleted file mode 100644 index 2ab3cfd2b6..0000000000 --- a/app/design/frontend/default/modern/template/email/order/items/shipment/default.phtml +++ /dev/null @@ -1,43 +0,0 @@ - -getItem() ?> - - - htmlEscape($_item->getName()) ?> - getItemOptions()): ?> -
      - getItemOptions() as $option): ?> -
      -
      - -
      - - getDescription() ?> - - getSku() ?> - getQty()*1 ?> - diff --git a/app/design/frontend/default/modern/template/email/order/shipment/items.phtml b/app/design/frontend/default/modern/template/email/order/shipment/items.phtml deleted file mode 100644 index c676610be5..0000000000 --- a/app/design/frontend/default/modern/template/email/order/shipment/items.phtml +++ /dev/null @@ -1,47 +0,0 @@ - -getShipment() ?> -getOrder() ?> - - - - - - - - - - - getAllItems() as $_item): ?> - getOrderItem()->getParentItem()) continue; else $i++; ?> - > - getItemHtml($_item) ?> - - - -
      __('Item') ?>__('Sku') ?>__('Qty') ?>
      - diff --git a/app/design/frontend/default/modern/template/email/order/shipment/track.phtml b/app/design/frontend/default/modern/template/email/order/shipment/track.phtml deleted file mode 100644 index 8d5b219e9d..0000000000 --- a/app/design/frontend/default/modern/template/email/order/shipment/track.phtml +++ /dev/null @@ -1,46 +0,0 @@ - -getShipment() ?> -getOrder() ?> -getAllTracks()): ?> - - - - - - - - - getAllTracks() as $_item): $i++ ?> - > - - - - - -
      __('Shipped By') ?>__('Tracking Number') ?>
      getTitle() ?>getNumber() ?>
      - diff --git a/app/design/frontend/default/modern/template/email/productalert/price.phtml b/app/design/frontend/default/modern/template/email/productalert/price.phtml deleted file mode 100644 index 51f10c4f90..0000000000 --- a/app/design/frontend/default/modern/template/email/productalert/price.phtml +++ /dev/null @@ -1,50 +0,0 @@ - -getProducts()): ?> -

      __('You are receiving this notification because you subscribed to receive alerts when the prices for the following products changed:') ?>

      - - - - - - - -
      - - getShortDescription()): ?> -

      - -

      getPrice() != $_product->getFinalPrice()): ?> - __('Regular Price:') ?> formatPrice($_product->getPrice()) ?>
      - __('Special price:') ?> formatPrice($_product->getFinalPrice()) ?> - - __('Price:') ?> formatPrice($_product->getPrice()) ?> -

      -

      __('Click here not to receive alerts for this product') ?>

      -
      -

      __('Unsubscribe from all price alerts') ?>

      - diff --git a/app/design/frontend/default/modern/template/email/productalert/stock.phtml b/app/design/frontend/default/modern/template/email/productalert/stock.phtml deleted file mode 100644 index 25a02d87b3..0000000000 --- a/app/design/frontend/default/modern/template/email/productalert/stock.phtml +++ /dev/null @@ -1,50 +0,0 @@ - -getProducts()): ?> -

      __('You are receiving this notification because you subscribed to receive alerts when the following products are back in stock:') ?>

      - - - - - - - -
      - - getShortDescription()): ?> -

      - -

      getPrice() != $_product->getFinalPrice()): ?> - __('Regular Price:') ?> formatPrice($_product->getPrice()) ?>
      - __('Special price:') ?> formatPrice($_product->getFinalPrice()) ?> - - __('Price:') ?> formatPrice($_product->getPrice()) ?> -

      -

      __('Click here not to receive alerts for this product') ?>

      -
      -

      __('Unsubscribe from all stock alerts') ?>

      - diff --git a/app/design/frontend/default/modern/template/eway/form.phtml b/app/design/frontend/default/modern/template/eway/form.phtml deleted file mode 100644 index d8fc92c292..0000000000 --- a/app/design/frontend/default/modern/template/eway/form.phtml +++ /dev/null @@ -1,90 +0,0 @@ - - -
      - getMethodCode() ?> - -
      diff --git a/app/design/frontend/default/modern/template/eway/info.phtml b/app/design/frontend/default/modern/template/eway/info.phtml deleted file mode 100644 index 6a9e990de4..0000000000 --- a/app/design/frontend/default/modern/template/eway/info.phtml +++ /dev/null @@ -1,33 +0,0 @@ - -getInfo()): ?> -__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
      -__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
      -__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> - - - diff --git a/app/design/frontend/default/modern/template/eway/secure/failure.phtml b/app/design/frontend/default/modern/template/eway/secure/failure.phtml deleted file mode 100644 index 62d90a093f..0000000000 --- a/app/design/frontend/default/modern/template/eway/secure/failure.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -
      -

      __('Error occured') ?>

      -
      -

      getErrorMessage() ?>.

      -

      __('Please continue shopping.', $this->getContinueShoppingUrl()) ?>

      diff --git a/app/design/frontend/default/modern/template/eway/secure/form.phtml b/app/design/frontend/default/modern/template/eway/secure/form.phtml deleted file mode 100644 index d08bcbb290..0000000000 --- a/app/design/frontend/default/modern/template/eway/secure/form.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -
      - getMethodCode() ?> - -
      diff --git a/app/design/frontend/default/modern/template/eway/shared/failure.phtml b/app/design/frontend/default/modern/template/eway/shared/failure.phtml deleted file mode 100644 index 62d90a093f..0000000000 --- a/app/design/frontend/default/modern/template/eway/shared/failure.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -
      -

      __('Error occured') ?>

      -
      -

      getErrorMessage() ?>.

      -

      __('Please continue shopping.', $this->getContinueShoppingUrl()) ?>

      diff --git a/app/design/frontend/default/modern/template/eway/shared/form.phtml b/app/design/frontend/default/modern/template/eway/shared/form.phtml deleted file mode 100644 index 9f516427ea..0000000000 --- a/app/design/frontend/default/modern/template/eway/shared/form.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -
      - getMethodCode() ?> - -
      diff --git a/app/design/frontend/default/modern/template/flo2cash/form.phtml b/app/design/frontend/default/modern/template/flo2cash/form.phtml deleted file mode 100644 index bbd46d58ac..0000000000 --- a/app/design/frontend/default/modern/template/flo2cash/form.phtml +++ /dev/null @@ -1,89 +0,0 @@ - - -
      - getMethodCode() ?> - -
      diff --git a/app/design/frontend/default/modern/template/flo2cash/info.phtml b/app/design/frontend/default/modern/template/flo2cash/info.phtml deleted file mode 100644 index 6c1d91431b..0000000000 --- a/app/design/frontend/default/modern/template/flo2cash/info.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -getInfo()): ?> -getMethod()->getTitle() ?>
      -__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
      -__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
      -__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> - - - diff --git a/app/design/frontend/default/modern/template/giftmessage/form.phtml b/app/design/frontend/default/modern/template/giftmessage/form.phtml deleted file mode 100644 index 76a247db51..0000000000 --- a/app/design/frontend/default/modern/template/giftmessage/form.phtml +++ /dev/null @@ -1,81 +0,0 @@ - - -getSaveMode()): ?> -
      -

      __('Gift Message') ?>

      -
      -
      -
        -
      • -
        -
        - -
        -
      • -
      • -
        -
        - -
        -
      • -
      • -
        -
        - -
        -
      • -
      -
      -

      __('* Required Fields') ?>

      -   - - getMessage()->getGiftMessageId()): ?> - - -
      -
      -getSaveMode()=='save'): ?> -

      __('Your gift message has been successfully saved') ?>

      -
      - -

      __('Your gift message has been successfully removed') ?>

      -
      - - diff --git a/app/design/frontend/default/modern/template/giftmessage/helper.phtml b/app/design/frontend/default/modern/template/giftmessage/helper.phtml deleted file mode 100644 index 77072101c2..0000000000 --- a/app/design/frontend/default/modern/template/giftmessage/helper.phtml +++ /dev/null @@ -1,80 +0,0 @@ - -getScriptIncluded() && $this->getCanDisplayContainer()): ?> - -setScriptIncluded(true); ?> - -getCanDisplayContainer()): ?> -
      - -getType()): ?> - - - - - - hasGiftMessage()): ?> - __('Edit Gift Message') ?> - - __('Add Gift Message') ?> - - - - - - hasGiftMessage()): ?> - __('Edit Gift Message') ?> - - __('Add Gift Message') ?> - - - - - - - -getCanDisplayContainer()): ?> -
      - - diff --git a/app/design/frontend/default/modern/template/giftmessage/inline.phtml b/app/design/frontend/default/modern/template/giftmessage/inline.phtml deleted file mode 100644 index a63d4b4c47..0000000000 --- a/app/design/frontend/default/modern/template/giftmessage/inline.phtml +++ /dev/null @@ -1,266 +0,0 @@ - -getDontDisplayContainer()): ?> - - -
      -getType()): ?> - -
      - __('Do you have any gift items in your order?'); ?> -
      -
      - getItemsHasMesssages() || $this->getEntityHasMessage()): ?>checked="checked"/> - -
      -
      -
      -
      -
      - isMessagesAvailable('quote', $this->getEntity())): ?> - __('Enter a gift message for entire order.'); ?> -

      __('You can leave a box blank if you don\'t wish to add a gift message for whole order.') ?>

      -
      - -
        -
      • -
        -
        - -
        -
        -
        - -
        -
      • -
      • - -
        - -
      • -
      - -
      - - isItemsAvailable()): ?> - __('Enter a gift message for each item in your order.'); ?>
      -

      __('You can leave a box blank if you don\'t wish to add a gift message for the item.') ?>

      - getItems() as $_index=>$_item): ?> - getProduct() ?> -
      - <?php echo $this->htmlEscape($_product->getName()) ?>
      - __('Item %d of %d', $_index+1, $this->countItems()) ?> -
      -
      -
      htmlEscape($_product->getName()) ?>
      -
      - -
        -
      • -
        -
        - -
        -
        -
        - -
        -
      • -
      • - -
        - -
      • -
      - -
      -
      -
      - - -
      -
      - - - - - - -
      -
      - __('Gift Messages'); ?> -
      -
      - getItemsHasMesssages() || $this->getEntityHasMessage()): ?>checked="checked"/> - -
      -
      -
      -
      - isMessagesAvailable('quote', $this->getEntity())): ?> - __('Enter a gift message for this address.'); ?> -

      __('You can leave a box blank if you don\'t wish to add a gift message for this address.') ?>

      -
      - -
        -
      • -
        -
        - -
        -
        -
        - -
        -
      • -
      • - -
        - -
      • -
      - -
      - - isItemsAvailable()): ?> - __('Enter a gift message for each item in your order.'); ?>
      -

      __('You can leave a box blank if you don\'t wish to add a gift message for the item.') ?>

      - getItems() as $_index=>$_item): ?> - getProduct() ?> -
      - <?php echo $this->htmlEscape($_product->getName()) ?>
      - __('Item %d of %d', $_index+1, $this->countItems()) ?> -
      -
      -
      htmlEscape($_product->getName()) ?>
      -
      - - -
        -
      • -
        -
        - -
        -
        -
        - -
        -
      • -
      • - -
        - -
      • -
      - -
      -
      -
      - - -
      - - - -
      diff --git a/app/design/frontend/default/modern/template/googlecheckout/form.phtml b/app/design/frontend/default/modern/template/googlecheckout/form.phtml deleted file mode 100644 index 75a6fe24f0..0000000000 --- a/app/design/frontend/default/modern/template/googlecheckout/form.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -
      - getMethodCode() ?> - -
      diff --git a/app/design/frontend/default/modern/template/googlecheckout/link.phtml b/app/design/frontend/default/modern/template/googlecheckout/link.phtml deleted file mode 100644 index 7192b0eee6..0000000000 --- a/app/design/frontend/default/modern/template/googlecheckout/link.phtml +++ /dev/null @@ -1,38 +0,0 @@ - -
    • - getIsDisabled()): ?> - <?php echo Mage::helper('googlecheckout')->__('Fast checkout through Google');?> - -
      getIsActiveAanalytics()):?> onsubmit="setUrchinInputCode(pageTracker)"> -
      - - -
      -
      - -
    • diff --git a/app/design/frontend/default/modern/template/ideal/advanced/failure.phtml b/app/design/frontend/default/modern/template/ideal/advanced/failure.phtml deleted file mode 100644 index 04e1dfc2f7..0000000000 --- a/app/design/frontend/default/modern/template/ideal/advanced/failure.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -
      -

      __('Error occured') ?>

      -
      -

      getErrorMessage() ?>

      -

      __('Please continue shopping.', $this->getContinueShoppingUrl()) ?>

      diff --git a/app/design/frontend/default/modern/template/ideal/advanced/form.phtml b/app/design/frontend/default/modern/template/ideal/advanced/form.phtml deleted file mode 100644 index 557d3099b6..0000000000 --- a/app/design/frontend/default/modern/template/ideal/advanced/form.phtml +++ /dev/null @@ -1,44 +0,0 @@ - -getMethodCode() ?> -getIssuerList()):?> -
      - -
      - diff --git a/app/design/frontend/default/modern/template/ideal/advanced/info.phtml b/app/design/frontend/default/modern/template/ideal/advanced/info.phtml deleted file mode 100644 index be115d936c..0000000000 --- a/app/design/frontend/default/modern/template/ideal/advanced/info.phtml +++ /dev/null @@ -1,33 +0,0 @@ - -getInfo()): ?> -getMethod()->getTitle() ?> -
      -__('Issuer'). ': ' . $this->getIssuerTitle() ?> - - - diff --git a/app/design/frontend/default/modern/template/ideal/basic/failure.phtml b/app/design/frontend/default/modern/template/ideal/basic/failure.phtml deleted file mode 100644 index 04e1dfc2f7..0000000000 --- a/app/design/frontend/default/modern/template/ideal/basic/failure.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -
      -

      __('Error occured') ?>

      -
      -

      getErrorMessage() ?>

      -

      __('Please continue shopping.', $this->getContinueShoppingUrl()) ?>

      diff --git a/app/design/frontend/default/modern/template/ideal/basic/form.phtml b/app/design/frontend/default/modern/template/ideal/basic/form.phtml deleted file mode 100644 index 353548c573..0000000000 --- a/app/design/frontend/default/modern/template/ideal/basic/form.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -
      - getMethodCode() ?> - -
      diff --git a/app/design/frontend/default/modern/template/newsletter/subscribe.phtml b/app/design/frontend/default/modern/template/newsletter/subscribe.phtml index 84e5cd450b..3996455cc6 100644 --- a/app/design/frontend/default/modern/template/newsletter/subscribe.phtml +++ b/app/design/frontend/default/modern/template/newsletter/subscribe.phtml @@ -25,18 +25,17 @@ */ ?>
      -
      - __('Newsletter') ?> - -
      - +
      + +
      diff --git a/app/design/frontend/default/modern/template/ogone/form.phtml b/app/design/frontend/default/modern/template/ogone/form.phtml deleted file mode 100644 index a6ee0e4faa..0000000000 --- a/app/design/frontend/default/modern/template/ogone/form.phtml +++ /dev/null @@ -1,35 +0,0 @@ - - -
      - getMethodCode() ?> - -
      diff --git a/app/design/frontend/default/modern/template/ogone/info.phtml b/app/design/frontend/default/modern/template/ogone/info.phtml deleted file mode 100644 index e910003409..0000000000 --- a/app/design/frontend/default/modern/template/ogone/info.phtml +++ /dev/null @@ -1,27 +0,0 @@ - -

      htmlEscape($this->getMethod()->getTitle()) ?>

      diff --git a/app/design/frontend/default/modern/template/ogone/paypage.phtml b/app/design/frontend/default/modern/template/ogone/paypage.phtml deleted file mode 100644 index 52535f0eda..0000000000 --- a/app/design/frontend/default/modern/template/ogone/paypage.phtml +++ /dev/null @@ -1,28 +0,0 @@ - - -$$$PAYMENT ZONE$$$ diff --git a/app/design/frontend/default/modern/template/ogone/placeform.phtml b/app/design/frontend/default/modern/template/ogone/placeform.phtml deleted file mode 100644 index 511075858b..0000000000 --- a/app/design/frontend/default/modern/template/ogone/placeform.phtml +++ /dev/null @@ -1,42 +0,0 @@ - - -__('Please, wait a moment. This page will transfer your data to Ogone payment gateway in a few seconds.'); ?> -
      -getFormData())): ?> - getFormData() as $name => $value) { ?> - - - -
      - - diff --git a/app/design/frontend/default/modern/template/oscommerce/order/list.phtml b/app/design/frontend/default/modern/template/oscommerce/order/list.phtml deleted file mode 100644 index 83b21a134d..0000000000 --- a/app/design/frontend/default/modern/template/oscommerce/order/list.phtml +++ /dev/null @@ -1,56 +0,0 @@ - -getOsCommerceOrders(); ?> - -
      -

      __('My Previous Orders') ?>

      -
      - - - - - - - - - - - - - - - - - - - - - - -
      __('Order #') ?>__('Date') ?>__('Ship to') ?>__('Order Total') ?> 
      formatDate($_oscOrder['date_purchased'], 'medium', true) ?>htmlEscape($_oscOrder['delivery_street_address']) ?>__('View Order') ?> -
      - diff --git a/app/design/frontend/default/modern/template/oscommerce/order/view.phtml b/app/design/frontend/default/modern/template/oscommerce/order/view.phtml deleted file mode 100644 index 9c42be348f..0000000000 --- a/app/design/frontend/default/modern/template/oscommerce/order/view.phtml +++ /dev/null @@ -1,138 +0,0 @@ - -getOrder() ?> - - - -
      -

      __('Order') ?> #

      -
      -

      __('Order Date:')?> formatDate($_order['date_purchased'], 'medium', false) ?>

      - -
      -
      -

      __('Shipping Address') ?>

      -
      -
      -
      - -
      -
      -T: - -
      -
      - - -
      -

      __('Shipping Method') ?>

      - -
      - -
      - - -
      -
      -

      __('Billing Address') ?>

      -
      -
      -
      - -
      -
      -T: - -
      -
      -
      -

      Payment Method

      - -
      -
      - -

      __('Items Ordered') ?>

      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      __('Product Name') ?>__('SKU') ?>__('Price') ?>__('Qty Ordered') ?>__('Subtotal') ?>
      - - -
       
      -

      __('About Your Order') ?>

      -
      -
      - -
      formatDate($_historyItem['date_added'], 'medium', true) ?> |
      -
      - -
      -
      - - diff --git a/app/design/frontend/default/modern/template/page/1column.phtml b/app/design/frontend/default/modern/template/page/1column.phtml deleted file mode 100644 index eeeb8796a6..0000000000 --- a/app/design/frontend/default/modern/template/page/1column.phtml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - getChildHtml('head') ?> - -getBodyClass()?'class="'.$this->getBodyClass().'"':'' ?>> - getChildHtml('global_notices') ?> -
      -

      Skip to Store Area:

      - -
      -
      - getChildHtml('header') ?> -
      - - -
      - getChildHtml('global_messages') ?> - getChildHtml('content') ?> -
      -
      - getChildHtml('footer_before')): ?> - - - -
      - getChildHtml('before_body_end') ?> - getAbsoluteFooter() ?> - - diff --git a/app/design/frontend/default/modern/template/page/2columns-left.phtml b/app/design/frontend/default/modern/template/page/2columns-left.phtml deleted file mode 100644 index c03b376367..0000000000 --- a/app/design/frontend/default/modern/template/page/2columns-left.phtml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - getChildHtml('head') ?> - - -getBodyClass()?'class="'.$this->getBodyClass().'"':'' ?>> - getChildHtml('global_notices') ?> - -
      - getChildHtml('header') ?> -
      - - -
      - -
      - getChildHtml('global_messages') ?> - getChildHtml('content') ?> -
      -
      -
      - getChildHtml('footer_before')): ?> - - - -
      - getChildHtml('before_body_end') ?> - getAbsoluteFooter() ?> - - diff --git a/app/design/frontend/default/modern/template/page/2columns-right.phtml b/app/design/frontend/default/modern/template/page/2columns-right.phtml deleted file mode 100644 index d5ac4f97af..0000000000 --- a/app/design/frontend/default/modern/template/page/2columns-right.phtml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - getChildHtml('head') ?> - -getBodyClass()?'class="'.$this->getBodyClass().'"':'' ?>> - getChildHtml('global_notices') ?> - -
      - getChildHtml('header') ?> -
      - - -
      - -
      - getChildHtml('global_messages') ?> - getChildHtml('content') ?> -
      -
      -
      - getChildHtml('footer_before')): ?> - - - -
      - getChildHtml('before_body_end') ?> - getAbsoluteFooter() ?> - - diff --git a/app/design/frontend/default/modern/template/page/3columns.phtml b/app/design/frontend/default/modern/template/page/3columns.phtml index 7ea4b35ed0..c922aca284 100644 --- a/app/design/frontend/default/modern/template/page/3columns.phtml +++ b/app/design/frontend/default/modern/template/page/3columns.phtml @@ -32,48 +32,31 @@ - getChildHtml('head') ?> +getChildHtml('head') ?> -getBodyClass()?'class="'.$this->getBodyClass().'"':'' ?>> +getBodyClass()?' class="'.$this->getBodyClass().'"':'' ?>> +getChildHtml('after_body_start') ?> +
      getChildHtml('global_notices') ?> - -
      +
      getChildHtml('header') ?> -
      - - + getChildHtml('footer') ?> + getChildHtml('before_body_end') ?>
      - getChildHtml('before_body_end') ?> - getAbsoluteFooter() ?> +
      +getAbsoluteFooter() ?> diff --git a/app/design/frontend/default/modern/template/page/empty.phtml b/app/design/frontend/default/modern/template/page/empty.phtml deleted file mode 100644 index c1b4585ff8..0000000000 --- a/app/design/frontend/default/modern/template/page/empty.phtml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - getChildHtml('head') ?> - - - getChildHtml('content') ?> - getChildHtml('before_body_end') ?> - getAbsoluteFooter() ?> - - diff --git a/app/design/frontend/default/modern/template/page/html/breadcrumbs.phtml b/app/design/frontend/default/modern/template/page/html/breadcrumbs.phtml deleted file mode 100644 index 3d7ef8b91f..0000000000 --- a/app/design/frontend/default/modern/template/page/html/breadcrumbs.phtml +++ /dev/null @@ -1,45 +0,0 @@ - - -

      __("You're currently on:") ?>

      - - diff --git a/app/design/frontend/default/modern/template/page/html/footer.phtml b/app/design/frontend/default/modern/template/page/html/footer.phtml index 37857d4c3f..aa979efa5b 100644 --- a/app/design/frontend/default/modern/template/page/html/footer.phtml +++ b/app/design/frontend/default/modern/template/page/html/footer.phtml @@ -24,17 +24,19 @@ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ ?> -
    - diff --git a/app/design/frontend/default/modern/template/page/template/links.phtml b/app/design/frontend/default/modern/template/page/template/links.phtml deleted file mode 100644 index 60ed399ad2..0000000000 --- a/app/design/frontend/default/modern/template/page/template/links.phtml +++ /dev/null @@ -1,39 +0,0 @@ - - -getLinks(); ?> -0): ?> - getName()): ?> id="getName() ?>" class="top-links"> - -
  • getIsFirst()): ?> class="first"getIsLast()): ?> class="last"getLiParams() ?>>getBeforeText() ?>getAParams() ?>>getLabel() ?>getAfterText() ?>
  • - -
- diff --git a/app/design/frontend/default/modern/template/paybox/direct/form.phtml b/app/design/frontend/default/modern/template/paybox/direct/form.phtml deleted file mode 100644 index d8fc92c292..0000000000 --- a/app/design/frontend/default/modern/template/paybox/direct/form.phtml +++ /dev/null @@ -1,90 +0,0 @@ - - -
- getMethodCode() ?> - -
diff --git a/app/design/frontend/default/modern/template/paybox/direct/info.phtml b/app/design/frontend/default/modern/template/paybox/direct/info.phtml deleted file mode 100644 index 6c1d91431b..0000000000 --- a/app/design/frontend/default/modern/template/paybox/direct/info.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -getInfo()): ?> -getMethod()->getTitle() ?>
-__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
-__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
-__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> - - - diff --git a/app/design/frontend/default/modern/template/paybox/system/error.phtml b/app/design/frontend/default/modern/template/paybox/system/error.phtml deleted file mode 100644 index 62d90a093f..0000000000 --- a/app/design/frontend/default/modern/template/paybox/system/error.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -
-

__('Error occured') ?>

-
-

getErrorMessage() ?>.

-

__('Please continue shopping.', $this->getContinueShoppingUrl()) ?>

diff --git a/app/design/frontend/default/modern/template/paybox/system/form.phtml b/app/design/frontend/default/modern/template/paybox/system/form.phtml deleted file mode 100644 index 014b9fd321..0000000000 --- a/app/design/frontend/default/modern/template/paybox/system/form.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -
- getMethodCode() ?> - -
diff --git a/app/design/frontend/default/modern/template/payment/form/cc.phtml b/app/design/frontend/default/modern/template/payment/form/cc.phtml deleted file mode 100644 index 71952726ca..0000000000 --- a/app/design/frontend/default/modern/template/payment/form/cc.phtml +++ /dev/null @@ -1,87 +0,0 @@ - -
- getMethodCode() ?> - -
diff --git a/app/design/frontend/default/modern/template/payment/form/ccsave.phtml b/app/design/frontend/default/modern/template/payment/form/ccsave.phtml deleted file mode 100644 index dc6d305c50..0000000000 --- a/app/design/frontend/default/modern/template/payment/form/ccsave.phtml +++ /dev/null @@ -1,86 +0,0 @@ - -
- getMethodCode() ?> - -
diff --git a/app/design/frontend/default/modern/template/payment/form/checkmo.phtml b/app/design/frontend/default/modern/template/payment/form/checkmo.phtml deleted file mode 100644 index b04c00637e..0000000000 --- a/app/design/frontend/default/modern/template/payment/form/checkmo.phtml +++ /dev/null @@ -1,45 +0,0 @@ - -
-getMethod()->getPayableTo() || $this->getMethod()->getMailingAddress()): ?> - - -
diff --git a/app/design/frontend/default/modern/template/payment/form/purchaseorder.phtml b/app/design/frontend/default/modern/template/payment/form/purchaseorder.phtml deleted file mode 100644 index f0f400241b..0000000000 --- a/app/design/frontend/default/modern/template/payment/form/purchaseorder.phtml +++ /dev/null @@ -1,36 +0,0 @@ - -
- -
diff --git a/app/design/frontend/default/modern/template/payment/info/ccsave.phtml b/app/design/frontend/default/modern/template/payment/info/ccsave.phtml deleted file mode 100644 index f0fa9d7ea3..0000000000 --- a/app/design/frontend/default/modern/template/payment/info/ccsave.phtml +++ /dev/null @@ -1,29 +0,0 @@ - -__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?>
-__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?>
-__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?> diff --git a/app/design/frontend/default/modern/template/payment/info/checkmo.phtml b/app/design/frontend/default/modern/template/payment/info/checkmo.phtml deleted file mode 100644 index f0b7463688..0000000000 --- a/app/design/frontend/default/modern/template/payment/info/checkmo.phtml +++ /dev/null @@ -1,38 +0,0 @@ - -

getMethod()->getTitle() ?> -getInfo()->getAdditionalData()): ?> - getPayableTo()): ?>
__('Make Check payable to: %s', $this->htmlEscape($this->getPayableTo())) ?> - getMailingAddress()): ?> -
__('Send Check to:') ?> -
- - htmlEscape($this->getMailingAddress())) ?> - - - -

diff --git a/app/design/frontend/default/modern/template/payment/info/purchaseorder.phtml b/app/design/frontend/default/modern/template/payment/info/purchaseorder.phtml deleted file mode 100644 index bf6485558d..0000000000 --- a/app/design/frontend/default/modern/template/payment/info/purchaseorder.phtml +++ /dev/null @@ -1,29 +0,0 @@ - -

getMethod()->getTitle() ?>

-

__('Purchase Order Number') ?>: htmlEscape($this->getInfo()->getPoNumber()) ?>

- diff --git a/app/design/frontend/default/modern/template/paypal/express/review.phtml b/app/design/frontend/default/modern/template/paypal/express/review.phtml deleted file mode 100644 index a2e686d7bf..0000000000 --- a/app/design/frontend/default/modern/template/paypal/express/review.phtml +++ /dev/null @@ -1,170 +0,0 @@ - -
-

__('Review Order') ?>

-
-getMessagesBlock()->getGroupedHtml() ?> -
- -
-

__('Shipping Information') ?>

-
-
-
-
-

__('Shipping Address') ?>|__('Change Shipping Address') ?>

-
-
- getShippingAddress()->getFormated(true) ?> -
-
-
-
-

__('Shipping Method') ?>

-
- isVirtual()): ?> - __('No shipping method required.') ?> - - - getShippingRates())): ?> - __('Sorry, no quotes are available for this order at this time.') ?> - - -
- -

- -
- - - - -
-
-
- -
-

__('Billing Information') ?>

-
- -
-
-

__('Payment Method') ?>|__('Change Payment Method') ?>

-
- __('PayPal Account') ?>
- getBillingAddress()->getEmail() ?> - -
-
- -
-

__('Items in Your Shopping Cart') ?>|__('Edit Shopping Cart') ?>

-
- -
- getChildHtml('details') ?> -
- - -
- -
-

- - - - -

-
- -
- -
- - diff --git a/app/design/frontend/default/modern/template/paypal/express/review/details.phtml b/app/design/frontend/default/modern/template/paypal/express/review/details.phtml deleted file mode 100644 index 3b32d08308..0000000000 --- a/app/design/frontend/default/modern/template/paypal/express/review/details.phtml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - getTotals()): ?> - - helper('tax')->displayCartBothPrices() ? 5 : 3; ?> - renderTotals(null, $_colspan); ?> - renderTotals('footer', $_colspan); ?> - needDisplayBaseGrandtotal()):?> - - - - - - - - - getItems() as $_item): ?> - getParentItem()) continue ?> - - - - - - - - -
__('Product Name') ?>__('Price') ?>__('Qty') ?>__('Subtotal') ?>
- helper('sales')->__('Your credit card will be charged for') ?> - - displayBaseGrandtotal() ?> -
- getProduct()->getName() ?> - getProduct()->getDescription() ?> - helper('checkout')->formatPrice($_item->getCalculationPrice()); ?>getQty() ?>helper('checkout')->formatPrice($_item->getRowTotal()); ?>
diff --git a/app/design/frontend/default/modern/template/paypaluk/express/review.phtml b/app/design/frontend/default/modern/template/paypaluk/express/review.phtml deleted file mode 100644 index dff969ad2b..0000000000 --- a/app/design/frontend/default/modern/template/paypaluk/express/review.phtml +++ /dev/null @@ -1,170 +0,0 @@ - -
-

__('Review Order') ?>

-
-getMessagesBlock()->getGroupedHtml() ?> -
- -
-

__('Shipping Information') ?>

-
-
-
-
-

__('Shipping Address') ?>|__('Change Shipping Address') ?>

-
-
- getShippingAddress()->getFormated(true) ?> -
-
-
-
-

__('Shipping Method') ?>

-
- isVirtual()): ?> - __('No shipping method required.') ?> - - getShippingRates())): ?> - __('Sorry, no quotes are available for this order at this time.') ?> - - -
- -

- -
- - - - -
-
-
- -
-

__('Billing Information') ?>

-
- -
-
-

__('Payment Method') ?>|__('Change Payment Method') ?>

-
- __('PayPal Uk Account') ?>
- getBillingAddress()->getEmail() ?> - -
-
- -
-

__('Items in Your Shopping Cart') ?>|__('Edit Shopping Cart') ?>

-
- -
- getChildHtml('details') ?> -
- - -
- -
-

- - - - -

-
- -
- -
- - diff --git a/app/design/frontend/default/modern/template/paypaluk/express/review/details.phtml b/app/design/frontend/default/modern/template/paypaluk/express/review/details.phtml deleted file mode 100644 index 0696f8c993..0000000000 --- a/app/design/frontend/default/modern/template/paypaluk/express/review/details.phtml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - getItems() as $_item): ?> - getParentItem()) continue ?> - - - - - - - - - getTotals()): ?> - - helper('tax')->displayCartBothPrices() ? 5 : 3; ?> - renderTotals(null, $_colspan); ?> - renderTotals('footer', $_colspan); ?> - needDisplayBaseGrandtotal()):?> - - - - - - - -
__('Product Name') ?>__('Price') ?>__('Qty') ?>__('Subtotal') ?>
- getProduct()->getName() ?> - getProduct()->getDescription() ?> - helper('checkout')->formatPrice($_item->getCalculationPrice()); ?>getQty() ?>helper('checkout')->formatPrice($_item->getRowTotal()); ?>
- helper('sales')->__('Your credit card will be charged for') ?> - - displayBaseGrandtotal() ?> -
diff --git a/app/design/frontend/default/modern/template/poll/active.phtml b/app/design/frontend/default/modern/template/poll/active.phtml deleted file mode 100644 index 9328f33610..0000000000 --- a/app/design/frontend/default/modern/template/poll/active.phtml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - -
-
-

__('Community Poll') ?>

-
-
-
-
getPollTitle(); ?>
- - - - - - - - - - -
 
- -
-
-
-
- diff --git a/app/design/frontend/default/modern/template/poll/result.phtml b/app/design/frontend/default/modern/template/poll/result.phtml deleted file mode 100644 index 1d065a09fa..0000000000 --- a/app/design/frontend/default/modern/template/poll/result.phtml +++ /dev/null @@ -1,50 +0,0 @@ - - -
-
-

__('Community Poll') ?>

-
-
-
getPollTitle(); ?>
- - - - - - - - - - -
getAnswerTitle() ?>getVotesCount() ?> (getPercent() ?>%)
- -
-
- - - diff --git a/app/design/frontend/default/modern/template/productalert/price.phtml b/app/design/frontend/default/modern/template/productalert/price.phtml deleted file mode 100644 index 32150d613d..0000000000 --- a/app/design/frontend/default/modern/template/productalert/price.phtml +++ /dev/null @@ -1,29 +0,0 @@ - -isShow()): ?> - - diff --git a/app/design/frontend/default/modern/template/productalert/stock.phtml b/app/design/frontend/default/modern/template/productalert/stock.phtml deleted file mode 100644 index 26e3d02e44..0000000000 --- a/app/design/frontend/default/modern/template/productalert/stock.phtml +++ /dev/null @@ -1,29 +0,0 @@ - -isShow()): ?> - - diff --git a/app/design/frontend/default/modern/template/protx/standard/failure.phtml b/app/design/frontend/default/modern/template/protx/standard/failure.phtml deleted file mode 100644 index 62d90a093f..0000000000 --- a/app/design/frontend/default/modern/template/protx/standard/failure.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -
-

__('Error occured') ?>

-
-

getErrorMessage() ?>.

-

__('Please continue shopping.', $this->getContinueShoppingUrl()) ?>

diff --git a/app/design/frontend/default/modern/template/protx/standard/form.phtml b/app/design/frontend/default/modern/template/protx/standard/form.phtml deleted file mode 100644 index e6d53b27d0..0000000000 --- a/app/design/frontend/default/modern/template/protx/standard/form.phtml +++ /dev/null @@ -1,34 +0,0 @@ - -
- getMethodCode() ?> - -
diff --git a/app/design/frontend/default/modern/template/rating/detailed.phtml b/app/design/frontend/default/modern/template/rating/detailed.phtml deleted file mode 100644 index 1eedfc5d31..0000000000 --- a/app/design/frontend/default/modern/template/rating/detailed.phtml +++ /dev/null @@ -1,44 +0,0 @@ - -getSize()): ?> - - - - getSummary()): ?> - - - - - - - -
__($_rating->getRatingCode()) ?> -
-
-
-
- diff --git a/app/design/frontend/default/modern/template/rating/empty.phtml b/app/design/frontend/default/modern/template/rating/empty.phtml deleted file mode 100644 index f7139185c1..0000000000 --- a/app/design/frontend/default/modern/template/rating/empty.phtml +++ /dev/null @@ -1 +0,0 @@ -

__('Be the first to review this product') ?>

diff --git a/app/design/frontend/default/modern/template/reports/home_product_compared.phtml b/app/design/frontend/default/modern/template/reports/home_product_compared.phtml deleted file mode 100644 index f67003c9ac..0000000000 --- a/app/design/frontend/default/modern/template/reports/home_product_compared.phtml +++ /dev/null @@ -1,66 +0,0 @@ - -getRecentlyComparedProducts()): ?> -
-
-

__('Your Recently Compared') ?>

-
- - - - - - - - - - -
-

- <?php echo $this->htmlEscape($_product->getName()) ?> -

-

htmlEscape($_product->getName()) ?>

- getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-home-compared') ?> - isSaleable()): ?> - <?php echo $this->__('Add to Cart') ?> - -

__('Out of stock') ?>

- - -
 
- -
- diff --git a/app/design/frontend/default/modern/template/reports/home_product_viewed.phtml b/app/design/frontend/default/modern/template/reports/home_product_viewed.phtml deleted file mode 100644 index 028cff363b..0000000000 --- a/app/design/frontend/default/modern/template/reports/home_product_viewed.phtml +++ /dev/null @@ -1,71 +0,0 @@ - - -getRecentlyViewedProducts()): ?> -
-
-

__('Your Recently Viewed') ?>

-
- - - - - - - - - - -
-

- <?php echo $this->htmlEscape($_product->getName()) ?> -

-

htmlEscape($_product->getName()) ?>

- getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-home-viewed') ?> - isSaleable()): ?> - <?php echo $this->__('Add to Cart') ?> - -

__('Out of stock') ?>

- - -
 
- -
- diff --git a/app/design/frontend/default/modern/template/reports/product/widget/compared.phtml b/app/design/frontend/default/modern/template/reports/product/widget/compared.phtml deleted file mode 100644 index 90cfa141ed..0000000000 --- a/app/design/frontend/default/modern/template/reports/product/widget/compared.phtml +++ /dev/null @@ -1,67 +0,0 @@ - - -getRecentlyComparedProducts()): ?> -
-

__('Recently Compared Products') ?>

-
- getItems() as $_product): ?> - 5): continue; endif; ?> - -
    - -
  • - <?php echo $this->htmlEscape($_product->getName()) ?> -

    htmlEscape($_product->getName()) ?>

    - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product, true, '-new') ?> -
    - isSaleable()): ?> - - - getIsInStock()): ?> -

    __('In stock') ?>

    - -

    __('Out of stock') ?>

    - - - -
    -
  • - -
- - - diff --git a/app/design/frontend/default/modern/template/reports/product/widget/viewed.phtml b/app/design/frontend/default/modern/template/reports/product/widget/viewed.phtml deleted file mode 100644 index e0916d1b17..0000000000 --- a/app/design/frontend/default/modern/template/reports/product/widget/viewed.phtml +++ /dev/null @@ -1,70 +0,0 @@ - - -getRecentlyViewedProducts()): ?> -
-

__('Recently Viewed Products') ?>

-
- getItems() as $_product): ?> - 5): continue; endif; ?> - - - - - diff --git a/app/design/frontend/default/modern/template/reports/product_compared.phtml b/app/design/frontend/default/modern/template/reports/product_compared.phtml deleted file mode 100644 index 7815116d5f..0000000000 --- a/app/design/frontend/default/modern/template/reports/product_compared.phtml +++ /dev/null @@ -1,42 +0,0 @@ - -getRecentlyComparedProducts()): ?> -
-
-

__('Recently Compared Products') ?>

-
- - -
- diff --git a/app/design/frontend/default/modern/template/reports/product_viewed.phtml b/app/design/frontend/default/modern/template/reports/product_viewed.phtml deleted file mode 100644 index bfb0e4387e..0000000000 --- a/app/design/frontend/default/modern/template/reports/product_viewed.phtml +++ /dev/null @@ -1,42 +0,0 @@ - -getRecentlyViewedProducts()): ?> -
-
-

__('Recently Viewed Products') ?>

-
- - -
- diff --git a/app/design/frontend/default/modern/template/review/customer/list.phtml b/app/design/frontend/default/modern/template/review/customer/list.phtml deleted file mode 100644 index 5c343f7076..0000000000 --- a/app/design/frontend/default/modern/template/review/customer/list.phtml +++ /dev/null @@ -1,78 +0,0 @@ - -getMessagesBlock()->getGroupedHtml() ?> -
- -

__('My Product Reviews') ?>

-
- -getCollection() && $this->count()): ?> - getToolbarHtml() ?> -
- - - - - - - - - getCollection() as $_review): ?> - - - - - - - - - -
dateFormat($_review->getCreatedAt()) ?>htmlEscape($_review->getName()) ?> - getSum()): ?> -
-
-
- -   - -
htmlEscape($this->helper('review')->getDetail($_review->getDetail())) ?>__('View Details') ?>
- - -
- getToolbarHtml() ?> - - -

__('You have submitted no reviews.') ?>

- -
- diff --git a/app/design/frontend/default/modern/template/review/customer/recent.phtml b/app/design/frontend/default/modern/template/review/customer/recent.phtml deleted file mode 100644 index 3262920142..0000000000 --- a/app/design/frontend/default/modern/template/review/customer/recent.phtml +++ /dev/null @@ -1,52 +0,0 @@ - -getCollection() && $this->count()): ?> -
- diff --git a/app/design/frontend/default/modern/template/review/customer/view.phtml b/app/design/frontend/default/modern/template/review/customer/view.phtml deleted file mode 100644 index 65909ae866..0000000000 --- a/app/design/frontend/default/modern/template/review/customer/view.phtml +++ /dev/null @@ -1,66 +0,0 @@ - -
-getProductData()->getId()): ?> -
-

__('Review Details') ?>

-
- -
-
-

<?php echo $this->htmlEscape($this->getProductData()->getName()) ?>

- getRating() && $this->getRating()->getSize()): ?> - __('Average Customer Rating:') ?> - getReviewsSummaryHtml($this->getProductData()) ?> - -
-
-

htmlEscape($this->getProductData()->getName()) ?>

- getRating() && $this->getRating()->getSize()): ?> - __('Your Rating:') ?> - - getRating() as $_rating): ?> - getPercent()): ?> - - - - - - -
getRatingCode() ?>
-
-
- - __('Your Review (submitted on %s):', $this->dateFormat($this->getReviewData()->getCreatedAt())) ?> -
-

htmlEscape($this->getReviewData()->getDetail())) ?>

-
-
- -
- -
diff --git a/app/design/frontend/default/modern/template/review/form.phtml b/app/design/frontend/default/modern/template/review/form.phtml deleted file mode 100644 index 3e0f797d88..0000000000 --- a/app/design/frontend/default/modern/template/review/form.phtml +++ /dev/null @@ -1,116 +0,0 @@ - -
-
-

__('Write Your Own Review') ?>

-
-

__("You're reviewing: %s", $this->htmlEscape($this->getProductInfo()->getName())) ?>

-
-
- getRatings() && $this->getRatings()->getSize()): ?> - __('How do you rate this product?') ?>*
- - - - - - - - - - - - - - - getRatings() as $_rating): ?> - - - - getOptions() as $_option): ?> - - class="last" style="width:60px;"> - - - - - - -
 __('1 star') ?>__('2 stars') ?>__('3 stars') ?>__('4 stars') ?>__('5 stars') ?>
getRatingCode() ?>
- - - -
    -

  • -
  • -

  • -
  • -

  • -
  • -
- -
- -
-
-
- -
diff --git a/app/design/frontend/default/modern/template/review/helper/summary.phtml b/app/design/frontend/default/modern/template/review/helper/summary.phtml deleted file mode 100644 index ebad448ea2..0000000000 --- a/app/design/frontend/default/modern/template/review/helper/summary.phtml +++ /dev/null @@ -1,45 +0,0 @@ - - -getReviewsCount()): ?> - - - -getDisplayIfEmpty()): ?> - -

__('Be the first to review this product') ?>

- - diff --git a/app/design/frontend/default/modern/template/review/helper/summary_short.phtml b/app/design/frontend/default/modern/template/review/helper/summary_short.phtml deleted file mode 100644 index e389a9e09f..0000000000 --- a/app/design/frontend/default/modern/template/review/helper/summary_short.phtml +++ /dev/null @@ -1,45 +0,0 @@ - - -getReviewsCount()): ?> - -
- getRatingSummary()):?> -
-
-
- (getReviewsCount() ?>) - - __('%d Review(s)', $this->getReviewsCount()) ?> - -
- -getDisplayIfEmpty()): ?> - -

__('Be the first to review this product') ?>

- - diff --git a/app/design/frontend/default/modern/template/review/product/view/count.phtml b/app/design/frontend/default/modern/template/review/product/view/count.phtml deleted file mode 100644 index 8f109444f1..0000000000 --- a/app/design/frontend/default/modern/template/review/product/view/count.phtml +++ /dev/null @@ -1,29 +0,0 @@ - - -__('%s Review(s)', $count) ?> - diff --git a/app/design/frontend/default/modern/template/review/product/view/list.phtml b/app/design/frontend/default/modern/template/review/product/view/list.phtml deleted file mode 100644 index 4633721048..0000000000 --- a/app/design/frontend/default/modern/template/review/product/view/list.phtml +++ /dev/null @@ -1,64 +0,0 @@ - - -getReviewsCollection()->getItems();?> - -
-
-

__('Customer Reviews') ?>

-
- -
    - -
  1. - htmlEscape($_review->getTitle()) ?> __('Review by %s', $this->htmlEscape($_review->getNickname())) ?> - - - getRatingVotes() as $_vote): ?> - - - - - - -
    getRatingCode() ?> -
    -
    -
    -
    -

    htmlEscape($_review->getDetail())) ?> __('(Posted on %s)', $this->formatDate($_review->getCreatedAt()), 'long') ?>

    -
  2. - -
- - getChildHtml('toolbar') ?> -
- - -
- -getChildHtml('review_form') ?> diff --git a/app/design/frontend/default/modern/template/review/view.phtml b/app/design/frontend/default/modern/template/review/view.phtml deleted file mode 100644 index 94c7e1d045..0000000000 --- a/app/design/frontend/default/modern/template/review/view.phtml +++ /dev/null @@ -1,70 +0,0 @@ - -
-getProductData()->getId()): ?> -
-

__('Review Details') ?>

-
-
-
-

<?php echo $this->htmlEscape($this->getProductData()->getName()) ?>

- getRating() && $this->getRating()->getSize()): ?> - __('Average Customer Rating') ?>: - getReviewsSummaryHtml($this->getProductData()) ?> - -
-
-

htmlEscape($this->getProductData()->getName()) ?>

- getRating() && $this->getRating()->getSize()): ?> - __('Product Rating:') ?> - - - getRating() as $_rating): ?> - getPercent()): ?> - - - - - - - -
__($_rating->getRatingCode()) ?> -
-
-
-
- -
- __('Product Review (submitted on %s):', $this->dateFormat($this->getReviewData()->getCreatedAt())) ?> -
-

htmlEscape($this->getReviewData()->getDetail())) ?>

-
-
-

-
- -
diff --git a/app/design/frontend/default/modern/template/rss/list.phtml b/app/design/frontend/default/modern/template/rss/list.phtml deleted file mode 100644 index e029f22672..0000000000 --- a/app/design/frontend/default/modern/template/rss/list.phtml +++ /dev/null @@ -1,61 +0,0 @@ - -
-

__('RSS Feeds') ?>

-
-getRssCatalogFeeds(); -$_misc = $this->getRssMiscFeeds(); -?> - - - - - - - - - - -
__('Miscellaneous Feeds') ?>
getLabel() ?>__('Get Feed'); ?>
- -
- - - - - - - - - - -
__('Category Feeds')?>
getLabel() ?>__('Get Feed'); ?>
- - -

__('There are no Rss Feeds.'); ?>

- diff --git a/app/design/frontend/default/modern/template/rss/nofeed.phtml b/app/design/frontend/default/modern/template/rss/nofeed.phtml deleted file mode 100644 index 02bf5d89bc..0000000000 --- a/app/design/frontend/default/modern/template/rss/nofeed.phtml +++ /dev/null @@ -1 +0,0 @@ -There was no RSS feed enabled. diff --git a/app/design/frontend/default/modern/template/rss/order/details.phtml b/app/design/frontend/default/modern/template/rss/order/details.phtml deleted file mode 100644 index eeea0f148a..0000000000 --- a/app/design/frontend/default/modern/template/rss/order/details.phtml +++ /dev/null @@ -1,102 +0,0 @@ -getStore()->getName() -web site name = $_order->getStore()->getWebsite()->getName() -store name = $_order->getStore()->getGroup()->getName() -*/ -?> -getOrder() ?> -
-__('Customer Name: %s', $_order->getCustomerFirstname()?$_order->getCustomerName():$_order->getBillingAddress()->getName()) ?>
-__('Purchased From: %s', $_order->getStore()->getGroup()->getName()) ?>
-
- - - - - - - - - - -getAllItems() as $_item): $i++ ?> - > - - - - - - - - - getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_order->getGiftMessageId())): ?> - - - - - - - - - getDiscountAmount() > 0): ?> - - - - - - getShippingAmount() || $_order->getShippingDescription()): ?> - - - - - - getTaxAmount() > 0): ?> - - - - - - - - - - - -
ItemQtySubtotal
htmlEscape($_item->getName()) ?> - getGiftMessageId() && $_giftMessage = $this->helper('giftmessage/message')->getGiftMessage($_item->getGiftMessageId())): ?> -
__('Gift Message') ?> -
__('From:'); ?> htmlEscape($_giftMessage->getSender()) ?> -
__('To:'); ?> htmlEscape($_giftMessage->getRecipient()) ?> -
__('Message:'); ?>
htmlEscape($_giftMessage->getMessage()) ?> - -
getQtyOrdered()*1 ?>formatPrice($_item->getRowTotal()) ?>
- __('Gift Message') ?> -
__('From:'); ?> htmlEscape($_giftMessage->getSender()) ?> -
__('To:'); ?> htmlEscape($_giftMessage->getRecipient()) ?> -
__('Message:'); ?>
htmlEscape($_giftMessage->getMessage()) ?> -
__('Subtotal') ?>formatPrice($_order->getSubtotal()) ?>
__('Discount '.($_order->getCouponCode()?'('.$_order->getCouponCode().')':'')) ?>formatPrice(0.00 - $_order->getDiscountAmount()) ?>
__('Shipping & Handling') ?>formatPrice($_order->getShippingAmount()) ?>
__('Tax') ?>formatPrice($_order->getTaxAmount()) ?>
__('Grand Total') ?>formatPrice($_order->getGrandTotal()) ?>
diff --git a/app/design/frontend/default/modern/template/sales/order/creditmemo.phtml b/app/design/frontend/default/modern/template/sales/order/creditmemo.phtml deleted file mode 100644 index 1612b5f273..0000000000 --- a/app/design/frontend/default/modern/template/sales/order/creditmemo.phtml +++ /dev/null @@ -1,63 +0,0 @@ - -
-helper('giftmessage/message')->getIsMessagesAvailable('order', $this->getOrder())): ?> - - -getChildHtml('creditmemo_items') ?> - -
diff --git a/app/design/frontend/default/modern/template/sales/order/creditmemo/items.phtml b/app/design/frontend/default/modern/template/sales/order/creditmemo/items.phtml deleted file mode 100644 index 77732c3a99..0000000000 --- a/app/design/frontend/default/modern/template/sales/order/creditmemo/items.phtml +++ /dev/null @@ -1,67 +0,0 @@ - -getOrder() ?> -

__('Print All Refunds') ?>

-getCreditmemosCollection() as $_creditmemo): ?> -
-

__('Refund #') ?>getIncrementId(); ?>

- __('Print Refund') ?> -
-

__('Items Refunded') ?>

- - - - - - - - - - - - - - - - - - - - - getTotalsHtml($_creditmemo);?> - - getAllItems(); ?> - - - getOrderItem()->getParentItem()) continue; ?> - - getItemHtml($_item) ?> - - -
__('Product Name') ?>__('SKU') ?>__('Price') ?>__('Qty') ?>__('Subtotal') ?>__('Discount Amount') ?>__('Row Total') ?>
- - diff --git a/app/design/frontend/default/modern/template/sales/order/creditmemo/items/renderer/default.phtml b/app/design/frontend/default/modern/template/sales/order/creditmemo/items/renderer/default.phtml deleted file mode 100644 index 141e939df8..0000000000 --- a/app/design/frontend/default/modern/template/sales/order/creditmemo/items/renderer/default.phtml +++ /dev/null @@ -1,298 +0,0 @@ - -getItem() ?> -getItem()->getOrderItem()->getOrder() ?> - -
htmlEscape($_item->getName()) ?>
- getItemOptions()): ?> -
- -
htmlEscape($_option['label']) ?>
- getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - -
-
-
htmlEscape($_option['label']) ?>
-
-
-
- - - -
htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
- - -
- - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item->getOrderItem()) && $_item->getGiftMessageId()): ?> -
__('Gift Message') ?> - - - splitInjection($this->getSku()) ?> - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- -
- - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getPrice()) ?> - - -
- - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- __('Total'); ?>:
getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
-
- - - -
- - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- - - helper('checkout')->getPriceInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- -
- - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?> - - -
- - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- __('Total incl. tax'); ?>:
getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
-
- - - - - - getQty()*1 ?> - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- -
- - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> - - -
- - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- __('Total'); ?>:
getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
-
- - - -
- - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- - - helper('checkout')->getSubtotalInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- -
- - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?> - - -
- - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- __('Total incl. tax'); ?>:
getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?>
-
- - - - - - - - - formatPrice(-$_item->getDiscountAmount()) ?> - - formatPrice($_item->getRowTotal()-$_item->getDiscountAmount()+$_item->getTaxAmount()+$_item->getWeeeTaxAppliedRowAmount()) ?> - - diff --git a/app/design/frontend/default/modern/template/sales/order/details.phtml b/app/design/frontend/default/modern/template/sales/order/details.phtml deleted file mode 100644 index 5ab66edf31..0000000000 --- a/app/design/frontend/default/modern/template/sales/order/details.phtml +++ /dev/null @@ -1,107 +0,0 @@ - -getOrder() ?> -
-

__('My Orders - Details') ?>

- -
-

__('Order #%s', $_order->getRealOrderId()) ?>

-getInvoices() as $_invoice): ?> -
-
-

__('Invoice #%s', $_invoice->getIncrementId()) ?>

- __('Print Invoice') ?> -
-
-
-

__('Shipping Address') ?>

- getShippingAddress() ?> -
getFirstname() ?> getLastname() ?>
- getCompany() ?>
- getStreet() ?>
- getCity() ?>, getRegion() ?> getPostcode() ?>
- T | getTelephone(); - if ($_shipping->getFax()): ?>
F | getFax() ?>
-
-
-

__('Billing Address') ?>

- getbillingAddress() ?> -
getFirstname() ?> getLastname() ?>
- getCompany() ?>
- getStreet() ?>
- getCity() ?>, getRegion() ?> getPostcode() ?>
- T | getTelephone(); - if ($_billing->getFax()): ?>
F | getFax() ?>
-
-
-
-
-
-

__('Shipping Method') ?>

- getShippingMethod() ?> getShippingDescription() ?> -
-
-

__('Payment Method') ?>

- getPayment() ?> - getMethod() ?>: getCcType() ?> xxxxgetCcLast4() ?> -
-
-
-

__('Items Ordered') ?>

- - - - - - - - - - - - getItemsCollection(); ?> - count(); ?> - - - $_count ? ' class="last"' : '') ?>> - - - - - - - - - - - - - - -
__('Product Name') ?>__('Price') ?>__('Qty Ordered') ?>__('Qty Shipped') ?>__('Subtotal') ?>
getProductName() ?>formatPrice($_item->getPrice()*1) ?>getQty()*1 ?>getQty()*1 ?>formatPrice($_item->getRowTotal()*1) ?>
__('Order Subtotal') ?>formatPrice($_invoice->getSubtotal()) ?>
-
- diff --git a/app/design/frontend/default/modern/template/sales/order/history.phtml b/app/design/frontend/default/modern/template/sales/order/history.phtml deleted file mode 100644 index 5ef842dcee..0000000000 --- a/app/design/frontend/default/modern/template/sales/order/history.phtml +++ /dev/null @@ -1,73 +0,0 @@ - -
-getMessagesBlock()->getGroupedHtml() ?> -getOrders(); ?> -
-

__('My Orders') ?>

-
-getSize()): ?> - - - - - - - - - - - - - - - - - - - - - - - - -
__('Order #') ?>__('Date') ?>__('Ship to') ?>__('Order Total') ?>__('Order Status') ?> 
getRealOrderId() ?>formatDate($_order->getCreatedAtStoreDate()) ?>getShippingAddress() ? $this->htmlEscape($_order->getShippingAddress()->getName()) : ' ' ?>formatPrice($_order->getGrandTotal()) ?>getStatusLabel() ?>__('View Order') ?> - |__('Track Order') ?> */ ?> - helper('sales/reorder')->canReorder($_order)) : ?> - | __('Reorder') ?> - -
- -getPagerHtml(); ?> - - -

__('You have placed no orders.'); ?>

- - - - -
diff --git a/app/design/frontend/default/modern/template/sales/order/info.phtml b/app/design/frontend/default/modern/template/sales/order/info.phtml deleted file mode 100644 index d4bdc90dc5..0000000000 --- a/app/design/frontend/default/modern/template/sales/order/info.phtml +++ /dev/null @@ -1,95 +0,0 @@ - -getOrder() ?> -getMessagesBlock()->getGroupedHtml() ?> -
-
-

__('Order #%s - %s', $_order->getRealOrderId(), $_order->getStatusLabel()) ?>

- helper('rss/order')->isStatusNotificationAllow()): ?> - __('Subscribe to Order Status') ?> - | - - helper('sales/reorder')->canReorder($_order)) : ?> - <?php echo $this->__('Reorder') ?> - - <?php echo $this->__('Print Order') ?> -
-getStatusHistoryRssUrl($_order) ?> - - - -

__('Order Date: %s', $this->formatDate($_order->getCreatedAtStoreDate(), 'long')) ?>

-getIsVirtual()): ?> -
-
-
-
__('Shipping Address') ?>
-
-
getShippingAddress()->format('html') ?>
-
-
- -
-
__('Shipping Method') ?>__('Track Order') ?>*/ ?>
-
- getShippingDescription()): ?> - getShippingDescription() ?> - - helper('sales')->__('No shipping information available'); ?> - -
-

- -
-
- -
-
__('Billing Address') ?>
-
-
getBillingAddress()->format('html') ?>
-
-
- -
-
__('Payment Method') ?>
-
- getPaymentInfoHtml() ?> -
-
-

diff --git a/app/design/frontend/default/modern/template/sales/order/invoice.phtml b/app/design/frontend/default/modern/template/sales/order/invoice.phtml deleted file mode 100644 index c8fb99a4d7..0000000000 --- a/app/design/frontend/default/modern/template/sales/order/invoice.phtml +++ /dev/null @@ -1,63 +0,0 @@ - -
-helper('giftmessage/message')->getIsMessagesAvailable('order', $this->getOrder())): ?> - - -getChildHtml('invoice_items') ?> - -
diff --git a/app/design/frontend/default/modern/template/sales/order/invoice/items.phtml b/app/design/frontend/default/modern/template/sales/order/invoice/items.phtml deleted file mode 100644 index 48462a6ba6..0000000000 --- a/app/design/frontend/default/modern/template/sales/order/invoice/items.phtml +++ /dev/null @@ -1,63 +0,0 @@ - -getOrder() ?> -

__('Print All Invoices') ?>

-getInvoiceCollection() as $_invoice): ?> -
-

__('Invoice #') ?>getIncrementId(); ?>

- __('Print Invoice') ?> -
-

__('Items Invoiced') ?>

- - - - - - - - - - - - - - - - - getInvoiceTotalsHtml($_invoice)?> - - getAllItems(); ?> - - - getOrderItem()->getParentItem()) continue; ?> - - getItemHtml($_item) ?> - - -
__('Product Name') ?>__('SKU') ?>__('Price') ?>__('Qty Invoiced') ?>__('Subtotal') ?>
- - diff --git a/app/design/frontend/default/modern/template/sales/order/invoice/items/renderer/default.phtml b/app/design/frontend/default/modern/template/sales/order/invoice/items/renderer/default.phtml deleted file mode 100644 index eeac3ba931..0000000000 --- a/app/design/frontend/default/modern/template/sales/order/invoice/items/renderer/default.phtml +++ /dev/null @@ -1,294 +0,0 @@ - -getItem() ?> -getItem()->getOrderItem()->getOrder() ?> - -
htmlEscape($_item->getName()) ?>
- getItemOptions()): ?> -
- -
htmlEscape($_option['label']) ?>
- getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - -
-
-
htmlEscape($_option['label']) ?>
-
-
-
- - - -
htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
- - -
- - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item->getOrderItem()) && $_item->getGiftMessageId()): ?> -
__('Gift Message') ?> - - - splitInjection($this->getSku()) ?> - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- -
- - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getPrice()) ?> - - -
- - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- __('Total'); ?>:
getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
-
- - - -
- - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- - - helper('checkout')->getPriceInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- -
- - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?> - - -
- - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- __('Total incl. tax'); ?>:
getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
-
- - - - - - getQty()*1 ?> - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- -
- - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> - - -
- - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- __('Total'); ?>:
getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
-
- - - -
- - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- - - helper('checkout')->getSubtotalInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- -
- - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?> - - -
- - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- __('Total incl. tax'); ?>:
getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?>
-
- - - - - - - - - diff --git a/app/design/frontend/default/modern/template/sales/order/items.phtml b/app/design/frontend/default/modern/template/sales/order/items.phtml deleted file mode 100644 index 3141ef7526..0000000000 --- a/app/design/frontend/default/modern/template/sales/order/items.phtml +++ /dev/null @@ -1,69 +0,0 @@ - -getOrder() ?> - - - - - - - - - - - - - - - - - getChildHtml('order_totals') ?> - - getItemsCollection(); ?> - - count(); ?> - - getParentItem()) continue; ?> - - getItemHtml($_item) ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item) && $_item->getGiftMessageId()): ?> - - helper('giftmessage/message')->getGiftMessageForEntity($_item); ?> - - - - - -
__('Product Name') ?>__('SKU') ?>__('Price') ?>__('Qty') ?>__('Subtotal') ?>
- diff --git a/app/design/frontend/default/modern/template/sales/order/items/renderer/default.phtml b/app/design/frontend/default/modern/template/sales/order/items/renderer/default.phtml deleted file mode 100644 index ebc644e222..0000000000 --- a/app/design/frontend/default/modern/template/sales/order/items/renderer/default.phtml +++ /dev/null @@ -1,316 +0,0 @@ - -getItem() ?> - -
htmlEscape($_item->getName()) ?>
- getItemOptions()): ?> -
- -
htmlEscape($_option['label']) ?>
- getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - -
-
-
htmlEscape($_option['label']) ?>
-
-
-
- - - -
htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
- - -
- - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item) && $_item->getGiftMessageId()): ?> -
__('Gift Message') ?> - - - splitInjection($this->getSku()) ?> - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- -
- - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getPrice()) ?> - - -
- - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- __('Total'); ?>:
getOrder()->formatPrice($this->getItem()->getPrice()+$this->getItem()->getWeeeTaxAppliedAmount()+$this->getItem()->getWeeeTaxDisposition()); ?>
-
- - - -
- - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- - - helper('checkout')->getPriceInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- -
- - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxDisposition()) ?> - - -
- - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- __('Total incl. tax'); ?>:
getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedAmount()); ?>
-
- - - - - - - - getItem()->getQtyOrdered() > 0): ?> - __('Ordered'); ?>: getItem()->getQtyOrdered()*1 ?>
- - getItem()->getQtyShipped() > 0): ?> - __('Shipped'); ?>: getItem()->getQtyShipped()*1 ?>
- - getItem()->getQtyCanceled() > 0): ?> - __('Canceled'); ?>: getItem()->getQtyCanceled()*1 ?>
- - getItem()->getQtyRefunded() > 0): ?> - __('Refunded'); ?>: getItem()->getQtyRefunded()*1 ?>
- -
- - - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceExclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- - __('Excl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- - - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- -
- - - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?> - - getOrder()->formatPrice($this->getItem()->getRowTotal()) ?> - - -
- - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- __('Total'); ?>:
getOrder()->formatPrice($this->getItem()->getRowTotal()+$this->getItem()->getWeeeTaxAppliedRowAmount()+$this->getItem()->getWeeeTaxRowDisposition()); ?>
-
- - - -

- - helper('tax')->displaySalesBothPrices() || $this->helper('tax')->displaySalesPriceInclTax()): ?> - - helper('tax')->displaySalesBothPrices()): ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- - __('Incl. Tax'); ?>: - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- - - helper('checkout')->getSubtotalInclTax($this->getItem()); ?> - typeOfDisplay($this->getItem(), array(1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- -
- - typeOfDisplay($this->getItem(), array(0, 1, 4), 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> - getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?> - - getOrder()->formatPrice($_incl-$this->getItem()->getWeeeTaxRowDisposition()) ?> - - -
- - - getApplied($this->getItem())): ?> - - - - typeOfDisplay($this->getItem(), 2, 'sales') && (float)$this->getItem()->getWeeeTaxAppliedAmount()): ?> -
- __('Total incl. tax'); ?>:
getOrder()->formatPrice($_incl+$this->getItem()->getWeeeTaxAppliedRowAmount()); ?>
-
- - - - - - - - - - diff --git a/app/design/frontend/default/modern/template/sales/order/print.phtml b/app/design/frontend/default/modern/template/sales/order/print.phtml deleted file mode 100644 index f27d69963b..0000000000 --- a/app/design/frontend/default/modern/template/sales/order/print.phtml +++ /dev/null @@ -1,87 +0,0 @@ - -getOrder() ?> -

__('Order #%s', $_order->getRealOrderId()) ?>

-
-
- getIsVirtual()): ?> -
-

__('Shipping Address') ?>

-
getShippingAddress()->format('html') ?>
-
-
- -
- -

__('Billing Address') ?>

-
getBillingAddress()->format('html') ?>
-
-getIsVirtual()): ?> -
-
-
-
-

__('Shipping Method') ?>

- getShippingDescription() ?> -
- -
-

__('Payment Method') ?>

- getPaymentInfoHtml() ?> -
-
-
-

__('Items Ordered') ?>

- - - - - - - - - - - - - - - - - getChildHtml('order_totals') ?> - - getItemsCollection(); ?> - count(); ?> - - getParentItem()) continue; ?> - - getItemHtml($_item) ?> - - -
__('Product Name') ?>__('SKU') ?>__('Price') ?>__('Qty') ?>__('Subtotal') ?>
- - diff --git a/app/design/frontend/default/modern/template/sales/order/print/creditmemo.phtml b/app/design/frontend/default/modern/template/sales/order/print/creditmemo.phtml deleted file mode 100644 index f78cee9609..0000000000 --- a/app/design/frontend/default/modern/template/sales/order/print/creditmemo.phtml +++ /dev/null @@ -1,107 +0,0 @@ - -getOrder() ?> - -

__('Order #%s', $_order->getRealOrderId()) ?>

-getCreditmemo() ?> - - - - getCreditmemosCollection() ?> - - -
-
-

__('Refund #%s', $_creditmemo->getIncrementId()) ?>

- -
-
-
- getIsVirtual()): ?> -

__('Shipping Address') ?>

- getShippingAddress() ?> -
format('html') ?>
-
-
- -

__('Billing Address') ?>

- getbillingAddress() ?> -
getBillingAddress()->format('html') ?>
-
- getIsVirtual()): ?> -
-
-
-
-

__('Shipping Method') ?>

- getShippingDescription() ?> -
- -
-

__('Payment Method') ?>

- getPaymentInfoHtml() ?> -
-
-
-

__('Items Refunded') ?>

- - - - - - - - - - - - - - - - - - - - - getTotalsHtml($_creditmemo);?> - - getAllItems(); ?> - - - getOrderItem()->getParentItem()) continue; ?> - - getItemHtml($_item) ?> - - -
__('Product Name') ?>__('SKU') ?>__('Price') ?>__('Qty') ?>__('Subtotal') ?>__('Discount Amount') ?>__('Row Total') ?>
- - - diff --git a/app/design/frontend/default/modern/template/sales/order/print/invoice.phtml b/app/design/frontend/default/modern/template/sales/order/print/invoice.phtml deleted file mode 100644 index 60cd941555..0000000000 --- a/app/design/frontend/default/modern/template/sales/order/print/invoice.phtml +++ /dev/null @@ -1,103 +0,0 @@ - -getOrder() ?> - -

__('Order #%s', $_order->getRealOrderId()) ?>

-getInvoice() ?> - - - - getInvoiceCollection() ?> - - -
-
-

__('Invoice #%s', $_invoice->getIncrementId()) ?>

- -
-
-
- getIsVirtual()): ?> -

__('Shipping Address') ?>

- getShippingAddress() ?> -
format('html') ?>
-
-
- -

__('Billing Address') ?>

- getbillingAddress() ?> -
getBillingAddress()->format('html') ?>
-
- getIsVirtual()): ?> -
-
-
-
-

__('Shipping Method') ?>

- getShippingDescription() ?> -
- -
-

__('Payment Method') ?>

- getPaymentInfoHtml() ?> -
-
-
-

__('Items Invoiced') ?>

- - - - - - - - - - - - - - - - - getInvoiceTotalsHtml($_invoice)?> - - getItemsCollection(); ?> - count(); ?> - - getOrderItem()->getParentItem()) continue; ?> - - getItemHtml($_item) ?> - - -
__('Product Name') ?>__('SKU') ?>__('Price') ?>__('Qty Invoiced') ?>__('Subtotal') ?>
- - - diff --git a/app/design/frontend/default/modern/template/sales/order/print/shipment.phtml b/app/design/frontend/default/modern/template/sales/order/print/shipment.phtml deleted file mode 100644 index 2f4274f58c..0000000000 --- a/app/design/frontend/default/modern/template/sales/order/print/shipment.phtml +++ /dev/null @@ -1,114 +0,0 @@ - -getOrder() ?> - -

__('Order #%s', $_order->getRealOrderId()) ?>

-getIsVirtual()): ?> -getShipment() ?> - - - - getShipmentsCollection() ?> - - - -
-
-

__('Shipment #%s', $_shipment->getIncrementId()) ?>

-
-
-
-

__('Shipping Address') ?>

- getShippingAddress() ?> -
format('html') ?>
-
-
-

__('Billing Address') ?>

- getbillingAddress() ?> -
getBillingAddress()->format('html') ?>
-
-
-
-
-
-

__('Shipping Method') ?>

- getShippingDescription() ?> - getTracksCollection()) > 0): ?> - - - - - - - - - - - getTracksCollection() as $track): ?> - - - - - - -
__('Title')?>__('Number')?>
getTitle() ?>getNumber() ?>
- -
-
-

__('Payment Method') ?>

- getPaymentInfoHtml() ?> -
-
-
-

__('Items Shipped') ?>

- - - - - - - - - - - - getItemsCollection(); ?> - - - getOrderItem()->getParentItem()) continue; ?> - - getItemHtml($_item) ?> - - -
__('Product Name') ?>__('SKU') ?>__('Qty Shipped') ?>
- - - - diff --git a/app/design/frontend/default/modern/template/sales/order/recent.phtml b/app/design/frontend/default/modern/template/sales/order/recent.phtml deleted file mode 100644 index fa51cf5032..0000000000 --- a/app/design/frontend/default/modern/template/sales/order/recent.phtml +++ /dev/null @@ -1,68 +0,0 @@ - - diff --git a/app/design/frontend/default/modern/template/sales/order/shipment.phtml b/app/design/frontend/default/modern/template/sales/order/shipment.phtml deleted file mode 100644 index b82b64b338..0000000000 --- a/app/design/frontend/default/modern/template/sales/order/shipment.phtml +++ /dev/null @@ -1,63 +0,0 @@ - -
-helper('giftmessage/message')->getIsMessagesAvailable('order', $this->getOrder())): ?> - - - getChildHtml('shipment_items') ?> - -
diff --git a/app/design/frontend/default/modern/template/sales/order/shipment/items.phtml b/app/design/frontend/default/modern/template/sales/order/shipment/items.phtml deleted file mode 100644 index ccbd08a672..0000000000 --- a/app/design/frontend/default/modern/template/sales/order/shipment/items.phtml +++ /dev/null @@ -1,88 +0,0 @@ - -getOrder() ?> -

- getTracksCollection()->count()) : ?> - __('Track all shipments') ?> | - - __('Print All Shipments') ?> -

-getShipmentsCollection() as $_shipment): ?> -
-

__('Shipment #') ?>getIncrementId(); ?>

- __('Print Shipment') ?> -
-getTracksCollection(); ?> -count()): ?> - - - - - - - - -
- __('Track this shipment') ?> -
__('Tracking Number(s)') ?>:  - count(); - foreach($tracks as $track): ?> - isCustom()): ?> - getNumber() ?> - - getNumber() ?> - - , - -
- -

__('Items Shipped') ?>

- - - - - - - - - - - - getAllItems(); ?> - - - getOrderItem()->getParentItem()) continue; ?> - - getItemHtml($_item) ?> - - -
__('Product Name') ?>__('SKU') ?>__('Qty Shipped') ?>
- - diff --git a/app/design/frontend/default/modern/template/sales/order/shipment/items/renderer/default.phtml b/app/design/frontend/default/modern/template/sales/order/shipment/items/renderer/default.phtml deleted file mode 100644 index 2d0238c7e0..0000000000 --- a/app/design/frontend/default/modern/template/sales/order/shipment/items/renderer/default.phtml +++ /dev/null @@ -1,60 +0,0 @@ - -getItem() ?> -getItem()->getOrderItem()->getOrder() ?> - -
htmlEscape($_item->getName()) ?>
- getItemOptions()): ?> -
- -
htmlEscape($_option['label']) ?>
- getPrintStatus()): ?> - getFormatedOptionValue($_option) ?> - class="truncated"> - -
-
-
htmlEscape($_option['label']) ?>
-
-
-
- - - -
htmlEscape( (isset($_option['print_value']) ? $_option['print_value'] : $_option['value']) ) ?>
- - -
- - getDescription() ?> - helper('giftmessage/message')->getIsMessagesAvailable('order_item', $_item->getOrderItem()) && $_item->getGiftMessageId()): ?> -
__('Gift Message') ?> - - - splitInjection($this->getSku()) ?> - getQty()*1 ?> - diff --git a/app/design/frontend/default/modern/template/sales/order/totals.phtml b/app/design/frontend/default/modern/template/sales/order/totals.phtml deleted file mode 100644 index 54846edf65..0000000000 --- a/app/design/frontend/default/modern/template/sales/order/totals.phtml +++ /dev/null @@ -1,52 +0,0 @@ - -getTotals() as $_code => $_total): ?> - getBlockName()): ?> - getChildHtml($_total->getBlockName(), false); ?> - - - getLabelProperties()?>> - getStrong()):?> - getLabel()?> - - getLabel()?> - - - getValueProperties()?>> - getStrong()):?> - formatValue($_total) ?> - - formatValue($_total) ?> - - - - - diff --git a/app/design/frontend/default/modern/template/sales/order/trackinginfo.phtml b/app/design/frontend/default/modern/template/sales/order/trackinginfo.phtml deleted file mode 100644 index 54524f486c..0000000000 --- a/app/design/frontend/default/modern/template/sales/order/trackinginfo.phtml +++ /dev/null @@ -1,68 +0,0 @@ - - - -trackingInfo): ?> - - trackingInfo->getCarrierTitle() ?> - trackingInfo->getTracking() ?> -
- trackingInfo->getErrorMessage()): ?> - trackingInfo->getErrorMessage() ?> - - trackingInfo->getUrl()): ?> - Please, visit for more info: trackingInfo->getCarrierTitle() ?>
- - - trackingInfo->getStatus()): ?> - Status: trackingInfo->getStatus() ?>
- - - trackingInfo->getDeliverydate()): ?> - Delivery Date: trackingInfo->getDeliverydate() ?>
- - - trackingInfo->getDeliverytime()): ?> - Delivery Time: trackingInfo->getDeliverytime() ?>
- - - trackingInfo->getDeliverylocation()): ?> - Delivery Location: trackingInfo->getDeliverylocation() ?>
- - - trackingInfo->getSignedby()): ?> - Signed by: trackingInfo->getSignedby() ?>
- - - trackingInfo->getTrackSummary()): ?> - Tracking summary: trackingInfo->getTrackSummary() ?>
- - - -
- - -
diff --git a/app/design/frontend/default/modern/template/sales/order/view.phtml b/app/design/frontend/default/modern/template/sales/order/view.phtml deleted file mode 100644 index b071b5bc6a..0000000000 --- a/app/design/frontend/default/modern/template/sales/order/view.phtml +++ /dev/null @@ -1,102 +0,0 @@ - -
-helper('giftmessage/message')->getIsMessagesAvailable('order', $this->getOrder())): ?> - - -getOrder() ?> - -

__('Items Ordered') ?> - -getTracksCollection()->count()) : ?> -| -__('Track your order') ?> - -

- -getChildHtml('order_items') ?> - -helper('giftmessage/message')->getIsMessagesAvailable('order', $_order) && $_order->getGiftMessageId()): ?> -
- helper('giftmessage/message')->getGiftMessageForEntity($_order); ?> - __('Gift Message for this Order') ?> -
    -
  • - htmlEscape($_giftMessage->getRecipient()) ?> -
  • -
  • - htmlEscape($_giftMessage->getSender()) ?> -
  • -
  • helper('giftmessage/message')->getEscapedGiftMessage($_order) ?>
  • -
-
- -getOrder()->getVisibleStatusHistory() ?> - -
 
-

__('About Your Order') ?>

-
-
- -
formatDate($_historyItem->getCreatedAtStoreDate(), 'medium', true) ?>
-
getComment() ?>
- -
-
- - -
diff --git a/app/design/frontend/default/modern/template/sales/reorder/sidebar.phtml b/app/design/frontend/default/modern/template/sales/reorder/sidebar.phtml deleted file mode 100644 index dcd4d4893b..0000000000 --- a/app/design/frontend/default/modern/template/sales/reorder/sidebar.phtml +++ /dev/null @@ -1,83 +0,0 @@ - - -getItems()?> - -
-
-
-

__('My Orders') ?>

- __('View All'); ?> -
-
-
__('Last ordered items') ?>
-
    - - -
  1. -
    - isItemAvailableForReorder($_item)): ?> - - - - -
    - -
  2. - -
- -
- -
- -
- -
-
-
-getPagerHtml(); ?> - - - diff --git a/app/design/frontend/default/modern/template/sample/home.phtml b/app/design/frontend/default/modern/template/sample/home.phtml index 18544d0a13..1f9614aa05 100644 --- a/app/design/frontend/default/modern/template/sample/home.phtml +++ b/app/design/frontend/default/modern/template/sample/home.phtml @@ -1,8 +1,35 @@ -
-
-
- - + +
+
-
- +
+
+
+
+
+
diff --git a/app/design/frontend/default/modern/template/sendfriend/send.phtml b/app/design/frontend/default/modern/template/sendfriend/send.phtml deleted file mode 100644 index f105cb0512..0000000000 --- a/app/design/frontend/default/modern/template/sendfriend/send.phtml +++ /dev/null @@ -1,135 +0,0 @@ - -
- - -getMessagesBlock()->getGroupedHtml() ?> -
-

__('Email to a Friend') ?>

-
-
-getBlockHtml('formkey')?> -
-
-

__('Sender:') ?>

-
-
    -
  • -
    -
    - -
    -
    -
    - -
    -
  • -
  • -
    - -
  • -
- -
-
-

__('Recipient:') ?>

-
-
    -
  • -
    -
    - -
    -
    -
    - -
    -
  • -
- - getMaxRecipients()): ?> -
- <?php echo $this->__('Add Recipient') ?> -
- -
-
-
- canSend()):?> disabled="disabled"/> -
-
- -
diff --git a/app/design/frontend/default/modern/template/shipping/tracking/ajax.phtml b/app/design/frontend/default/modern/template/shipping/tracking/ajax.phtml deleted file mode 100644 index 8b13789179..0000000000 --- a/app/design/frontend/default/modern/template/shipping/tracking/ajax.phtml +++ /dev/null @@ -1 +0,0 @@ - diff --git a/app/design/frontend/default/modern/template/shipping/tracking/popup.phtml b/app/design/frontend/default/modern/template/shipping/tracking/popup.phtml deleted file mode 100644 index fc7e4429a4..0000000000 --- a/app/design/frontend/default/modern/template/shipping/tracking/popup.phtml +++ /dev/null @@ -1,175 +0,0 @@ - -getTrackingInfo() ?> -
-
- -<?php echo $this->__('Close Window') ?> -
-0): ?> - $_result): ?> - -
-

__('Shipment #').$shipid; ?>

-
- - 0): ?> - - - - - - - - - getCarrierTitle()): ?> - - - - - - getErrorMessage()): ?> - - - - - getTrackSummary()): ?> - - - - - getUrl()): ?> - - - - - - getStatus()): ?> - - - - - - - getDeliverydate()): ?> - - - - - - - getSignedby()): ?> - - - - - - - getDeliveryLocation()): ?> - - - - - - - getShippedDate()): ?> - - - - - - - getService()): ?> - - - - - - - getWeight()): ?> - - - - - - - - - - - - - - - -
__('Tracking Number:'); ?>getTracking(); ?>
__('Carrier:'); ?>getCarrierTitle(); ?>
__('Error:'); ?>__('Tracking information is currently not available. Please '); if ($this->getContactUsEnabled()) : ?>__('contact us') ?>__(' for more information or '); endif; echo $this->__('email us at '); ?>getStoreSupportEmail() ?>
__('Info:'); ?>getTrackSummary(); ?>
__('Track:'); ?>getUrl(); ?>
__('Status:'); ?>getStatus(); ?>
__('Delivered on:'); ?>formatDeliveryDateTime($track->getDeliverydate(),$track->getDeliverytime()); ?>
__('Signed by:'); ?>getSignedby(); ?>
__('Delivered to:'); ?>getDeliveryLocation(); ?>
__('Shipped or billed on:'); ?>getShippedDate(); ?>
__('Service Type:'); ?>getService(); ?>
__('Weight:'); ?>getWeight(); ?>
__('N/A')); ?>:
- - getProgressdetail())>0): ?> -
- - - - - - - - - - getProgressdetail() as $_detail): ?> - formatDeliveryDate($_detail['deliverydate']) : '') ?> - formatDeliveryTime($_detail['deliverytime'], $_detailDate) : '') ?> - - - - - - - -
__('Location') ?>__('Date') ?>__('Local Time') ?>__('Description') ?>
- - - - -
- - - - - -
__('There is no tracking available for this shipment.'); ?>
- - - - -
__('There is no tracking available.'); ?>
- -
-
-<?php echo $this->__('Close Window') ?> -
diff --git a/app/design/frontend/default/modern/template/tag/cloud.phtml b/app/design/frontend/default/modern/template/tag/cloud.phtml deleted file mode 100644 index 1e8b3a4b62..0000000000 --- a/app/design/frontend/default/modern/template/tag/cloud.phtml +++ /dev/null @@ -1,42 +0,0 @@ - -
-

__('All Tags') ?>

-
-
-
- getTags()) > 0 ): ?> - - -

__("Tags Aren't Available") ?>

- -
-
diff --git a/app/design/frontend/default/modern/template/tag/customer/edit.phtml b/app/design/frontend/default/modern/template/tag/customer/edit.phtml deleted file mode 100644 index 3366c45a3a..0000000000 --- a/app/design/frontend/default/modern/template/tag/customer/edit.phtml +++ /dev/null @@ -1,49 +0,0 @@ - -
-

__('Edit Tag') ?>

-
-getMessagesBlock()->getGroupedHtml() ?> -
-
-

__('Tag Information') ?>

-
    -
  • -
    - -
    -
  • -
-
-
- « __('Back to view Tag') ?> - -
-
- diff --git a/app/design/frontend/default/modern/template/tag/customer/recent.phtml b/app/design/frontend/default/modern/template/tag/customer/recent.phtml deleted file mode 100644 index 86660ea57b..0000000000 --- a/app/design/frontend/default/modern/template/tag/customer/recent.phtml +++ /dev/null @@ -1,49 +0,0 @@ - - diff --git a/app/design/frontend/default/modern/template/tag/customer/tags.phtml b/app/design/frontend/default/modern/template/tag/customer/tags.phtml deleted file mode 100644 index 2cb4f0e87f..0000000000 --- a/app/design/frontend/default/modern/template/tag/customer/tags.phtml +++ /dev/null @@ -1,48 +0,0 @@ - -
-getMessagesBlock()->getGroupedHtml() ?> -
-

__('My Tags') ?>

-
-getTags()): ?> -

__('Click on a tag to view your corresponding products.') ?>

-
- - -
- -

__('You have not tagged any products yet.') ?>

- - -
diff --git a/app/design/frontend/default/modern/template/tag/customer/view.phtml b/app/design/frontend/default/modern/template/tag/customer/view.phtml deleted file mode 100644 index e2e0781ed9..0000000000 --- a/app/design/frontend/default/modern/template/tag/customer/view.phtml +++ /dev/null @@ -1,75 +0,0 @@ - -
-
-

__('My Tags') ?>

-
- getMessagesBlock()->getGroupedHtml() ?> -

- __('Tag Name: %s', $this->htmlEscape($this->getTagInfo()->getName())) ?> - <?php echo $this->__('Delete') ?> -

- getToolbarHtml() ?> - - getMyProducts()) > 0 ): ?> - - - - - - getMyProducts() as $_product): ?> - class="odd"> - - - - - - - - - - - -
- htmlEscape($_product->getName()) ?> - getReviewsSummaryHtml($_product, 'short') ?> - getPriceHtml($_product) ?> - getDescription() ?> - - isSaleable()): ?> - <?php echo $this->__('Add to Cart') ?> - - helper('wishlist')->isAllow()) : ?> -
__('Add to Wishlist') ?> - -

__("Unable to find any products tagged with '%s' in the current store", $this->htmlEscape($this->getTagInfo()->getName()) ) ?>

- - getToolbarHtml() ?> - -
diff --git a/app/design/frontend/default/modern/template/tag/list.phtml b/app/design/frontend/default/modern/template/tag/list.phtml deleted file mode 100644 index bf992318d5..0000000000 --- a/app/design/frontend/default/modern/template/tag/list.phtml +++ /dev/null @@ -1,56 +0,0 @@ - -
- getCount() ): ?> -
__('Other people marked this product with these tags:') ?>
- - -
__('Add Your Tags:') ?>
-
-
-
- -
-
<?php echo $this->__('Add Tags') ?>
-
- -
- __("Use spaces to separate tags. Use single quotes (') for phrases.") ?> -
-
diff --git a/app/design/frontend/default/modern/template/tag/mytags.phtml b/app/design/frontend/default/modern/template/tag/mytags.phtml deleted file mode 100644 index 45bec6c968..0000000000 --- a/app/design/frontend/default/modern/template/tag/mytags.phtml +++ /dev/null @@ -1,75 +0,0 @@ - - - -getItems() as $tag) { /* $tag = $tag->getData();*/ ?> - - - getTagname(); ?> - - - e - d - - - diff --git a/app/design/frontend/default/modern/template/tag/popular.phtml b/app/design/frontend/default/modern/template/tag/popular.phtml deleted file mode 100644 index f522303f73..0000000000 --- a/app/design/frontend/default/modern/template/tag/popular.phtml +++ /dev/null @@ -1,39 +0,0 @@ - -
-
-

__('Popular Tags'); ?>

- __('View All') ?> -
-
- -
-
diff --git a/app/design/frontend/default/modern/template/tag/product/result.phtml b/app/design/frontend/default/modern/template/tag/product/result.phtml deleted file mode 100644 index 4e0b3b0508..0000000000 --- a/app/design/frontend/default/modern/template/tag/product/result.phtml +++ /dev/null @@ -1,66 +0,0 @@ - -getTagInfo()->getName() ): ?> -
-

__("Products tagged with '%s'", $this->htmlEscape($this->getTagInfo()->getName())) ?>

-
- -getListHtml() ?> - - getCount() > 0 ): ?> - - - - - - getProducts() as $_product): ?> - class="odd"> - - - - - - - - - - - -
- -
htmlEscape($_product->getName()) ?>
- getPriceHtml($_product) ?> - getReviewsSummaryHtml($_product, 'short') ?> -

getDescription() ?>

-
- - helper('wishlist')->isAllow()) : ?> -
__('Add to Wishlist') ?> - -

__("Unable to find any products tagged with '%s' in the current store", $this->htmlEscape($this->getTagInfo()->getName()) ) ?>

- -getListHtml() ?> diff --git a/app/design/frontend/default/modern/template/tag/result.phtml b/app/design/frontend/default/modern/template/tag/result.phtml deleted file mode 100644 index 10fc42a31a..0000000000 --- a/app/design/frontend/default/modern/template/tag/result.phtml +++ /dev/null @@ -1,42 +0,0 @@ - -

__("Search Results for '%s' (RSS)", $query, '/taggedproducts/xml/?tag='.$query) ?>

-
    - - -
  • -

    -

    - - - - - -

    -
  • - -
diff --git a/app/design/frontend/default/modern/template/tag/search.phtml b/app/design/frontend/default/modern/template/tag/search.phtml deleted file mode 100644 index b38a7216eb..0000000000 --- a/app/design/frontend/default/modern/template/tag/search.phtml +++ /dev/null @@ -1,42 +0,0 @@ - -
-

__("Products tagged with '%s' (RSS)", $query, '/tag/index/xml?tag='.$query) ?>

-
- -
    - -
  1. - - Tags: - - - -
  2. - -
- diff --git a/app/design/frontend/default/modern/template/tax/checkout/discount.phtml b/app/design/frontend/default/modern/template/tax/checkout/discount.phtml deleted file mode 100644 index 26d01d2c9b..0000000000 --- a/app/design/frontend/default/modern/template/tax/checkout/discount.phtml +++ /dev/null @@ -1,25 +0,0 @@ - -includeTax() && $this->getTotalExclTax()>=0):?> - - - helper('tax')->__('Grand Total Excl. Tax')?> - - - helper('checkout')->formatPrice($this->getTotalExclTax()) ?> - - -renderTotals('taxes', $this->getColspan()); ?> - - - helper('tax')->__('Grand Total Incl. Tax')?> - - - helper('checkout')->formatPrice($this->getTotal()->getValue()) ?> - - - - - - getTotal()->getTitle() ?> - - - helper('checkout')->formatPrice($this->getTotal()->getValue()) ?> - - - diff --git a/app/design/frontend/default/modern/template/tax/checkout/shipping.phtml b/app/design/frontend/default/modern/template/tax/checkout/shipping.phtml deleted file mode 100644 index 68ed5f34ea..0000000000 --- a/app/design/frontend/default/modern/template/tax/checkout/shipping.phtml +++ /dev/null @@ -1,66 +0,0 @@ - -displayBoth()):?> - - - getExcludeTaxLabel() ?> - - - helper('checkout')->formatPrice($this->getShippingExcludeTax()) ?> - - - - - getIncludeTaxLabel() ?> - - - helper('checkout')->formatPrice($this->getShippingIncludeTax()) ?> - - -displayIncludeTax()) : ?> - - - getTotal()->getTitle() ?> - - - helper('checkout')->formatPrice($this->getShippingIncludeTax()) ?> - - - - - - getTotal()->getTitle() ?> - - - helper('checkout')->formatPrice($this->getShippingExcludeTax()) ?> - - - diff --git a/app/design/frontend/default/modern/template/tax/checkout/subtotal.phtml b/app/design/frontend/default/modern/template/tax/checkout/subtotal.phtml deleted file mode 100644 index 393b51cef2..0000000000 --- a/app/design/frontend/default/modern/template/tax/checkout/subtotal.phtml +++ /dev/null @@ -1,57 +0,0 @@ - -displayBoth()):?> - - - helper('tax')->__('Subtotal (Excl. Tax)') ?> - - - helper('checkout')->formatPrice($this->getTotal()->getValueExclTax()) ?> - - - - - helper('tax')->__('Subtotal (Incl. Tax)') ?> - - - helper('checkout')->formatPrice($this->getTotal()->getValueInclTax()) ?> - - - - - - getTotal()->getTitle() ?> - - - helper('checkout')->formatPrice($this->getTotal()->getValue()) ?> - - - diff --git a/app/design/frontend/default/modern/template/tax/checkout/tax.phtml b/app/design/frontend/default/modern/template/tax/checkout/tax.phtml deleted file mode 100644 index 3b3a5b60a1..0000000000 --- a/app/design/frontend/default/modern/template/tax/checkout/tax.phtml +++ /dev/null @@ -1,74 +0,0 @@ - -getTotal()->getValue(); - $_style = $this->getTotal()->getStyle(); -?> - -helper('tax')->displayFullSummary() && $_value!=0): ?> - - getTotal()->getFullInfo() as $info): ?> - - - - - - - - - - - - (%) - -
- - - - helper('checkout')->formatPrice($amount); ?> - - - - - - - - -helper('tax')->displayFullSummary() && $_value!=0): ?> class="tax-total" onclick="expandDetails(this, '.tax-details-')"> - - helper('tax')->displayFullSummary()): ?> -
getTotal()->getTitle() ?>
- - getTotal()->getTitle() ?> - - - helper('checkout')->formatPrice($_value) ?> - diff --git a/app/design/frontend/default/modern/template/tax/order/tax.phtml b/app/design/frontend/default/modern/template/tax/order/tax.phtml deleted file mode 100644 index aecff481a0..0000000000 --- a/app/design/frontend/default/modern/template/tax/order/tax.phtml +++ /dev/null @@ -1,81 +0,0 @@ - -getOrder(); - $_source = $this->getSource(); - $_fullInfo = $_source->getFullTaxInfo(); - global $taxIter; $taxIter++; -?> - - -displayFullSummary()): ?> - - - - - - getIsPlaneMode()):?> style="display:none;"> - getLabelProperties()?>> - - - (%) - -
- - - getValueProperties()?> rowspan=""> - formatPrice($amount); ?> - - - - - - - - - -displayFullSummary() && $_fullInfo && !$this->getIsPlaneMode()): ?> - -displayFullSummary() && $_fullInfo && $this->getIsPlaneMode()): ?> - - - - - getLabelProperties()?>> - displayFullSummary()): ?> -
__('Tax'); ?>
- - __('Tax'); ?> - - - getValueProperties()?>>formatPrice($_source->getTaxAmount()) ?> - diff --git a/app/design/frontend/default/modern/template/wishlist/email/items.phtml b/app/design/frontend/default/modern/template/wishlist/email/items.phtml deleted file mode 100644 index 481fba1fd4..0000000000 --- a/app/design/frontend/default/modern/template/wishlist/email/items.phtml +++ /dev/null @@ -1,53 +0,0 @@ - -getWishlistItemsCount() ?> -
- - - getWishlistItems() as $item): $i++ ?> - - - - - - - - - - - - - -
-

-

htmlEscape($item->getName()) ?>

- hasDescription($item)): ?>

__('Comment') ?>:
getEscapedDescription($item) ?>

-

__('View Product') ?> - getIsSalable()):?>| __('Add to Cart') ?> -

 
-
diff --git a/app/design/frontend/default/modern/template/wishlist/email/rss.phtml b/app/design/frontend/default/modern/template/wishlist/email/rss.phtml deleted file mode 100644 index 1d5ef16d69..0000000000 --- a/app/design/frontend/default/modern/template/wishlist/email/rss.phtml +++ /dev/null @@ -1,31 +0,0 @@ - -
-__("RSS link to %s's wishlist",$this->helper('wishlist')->getCustomerName()) ?> -
-helper('wishlist')->getRssUrl(); ?> -
diff --git a/app/design/frontend/default/modern/template/wishlist/shared.phtml b/app/design/frontend/default/modern/template/wishlist/shared.phtml deleted file mode 100644 index 43b920b921..0000000000 --- a/app/design/frontend/default/modern/template/wishlist/shared.phtml +++ /dev/null @@ -1,77 +0,0 @@ - -
-

htmlEscape($this->getHeader()) ?>

-
-getMessagesBlock()->getGroupedHtml() ?> -hasWishlistItems()): ?> -
- - - - - - - - - - - - - getWishlistItems() as $item): ?> - - - - - - - -
__('Product') ?>__('Comment') ?> 
-
- - <?php echo $this->htmlEscape($item->getName()) ?> - -
- - getPriceHtml($item) ?> -
getEscapedDescription($item) ?> - isSaleable()): ?> - __('Add to Cart') ?>
- - __('Add to Wishlist') ?> -
- - isSaleable()):?> -
-   -
- -
- -

__('Wishlist is empty now.') ?>

- diff --git a/app/design/frontend/default/modern/template/wishlist/sharing.phtml b/app/design/frontend/default/modern/template/wishlist/sharing.phtml deleted file mode 100644 index 326bbaa6b2..0000000000 --- a/app/design/frontend/default/modern/template/wishlist/sharing.phtml +++ /dev/null @@ -1,84 +0,0 @@ - -
-
-

__('Share Your Wishlist') ?>

-
-getMessagesBlock()->getGroupedHtml() ?> -
- getBlockHtml('formkey')?> -
-

__('Sharing Information') ?>

-
-
-
    -
  • -
    - -
  • -
  • -
    - -
  • - helper('wishlist')->isRssAllow()): ?> -
  • - - -
  • - -
-
-
-

__('* Required Fields') ?>

- « __('Back')?> - -
-
- -
diff --git a/app/design/frontend/default/modern/template/wishlist/sidebar.phtml b/app/design/frontend/default/modern/template/wishlist/sidebar.phtml deleted file mode 100644 index 1b410bf45e..0000000000 --- a/app/design/frontend/default/modern/template/wishlist/sidebar.phtml +++ /dev/null @@ -1,70 +0,0 @@ - -helper('wishlist')->isAllow()) : ?> -
-
-

__('My Wishlist - %d Item(s)', - $this->helper('wishlist')->getListUrl(), - $this->helper('wishlist')->getItemCount() - ) ?>

-
-
__('Last Added Items') ?>
-
- hasWishlistItems()): ?> -
    - getWishlistItems() as $_item): ?> -
  1. -
    - - <?php echo $this->htmlEscape($_item->getName()) ?> - -
    -
    - - <?php echo $this->__('Remove Item') ?> - - htmlEscape($_item->getName()) ?> - getPriceHtml($_item, false, '-wishlist') ?> - isSaleable()): ?> - __('Add to Cart') ?> - -
    -
  2. - -
- - - -
- -

__('You have no items in your wishlist.') ?>

-
- -
- - diff --git a/app/design/frontend/default/modern/template/wishlist/view.phtml b/app/design/frontend/default/modern/template/wishlist/view.phtml deleted file mode 100644 index 264a9ae7c3..0000000000 --- a/app/design/frontend/default/modern/template/wishlist/view.phtml +++ /dev/null @@ -1,110 +0,0 @@ - -
-getMessagesBlock()->getGroupedHtml() ?> -
-

__('My Wishlist') ?>

-
- -hasWishlistItems()): ?> - helper('wishlist')->isRssAllow()): ?> -

- __('RSS Feed') ?> -

- -
- getBlockHtml('formkey')?> - - - - - - - - - - - - - - - getWishlistItems() as $item): ?> - - - - - - - - -
__('Product') ?>__('Comment') ?>__('Added On') ?> 
-
<?php echo $this->htmlEscape($item->getName()) ?>
- - getPriceHtml($item) ?> -
- - - getFormatedDate($item->getAddedAt()) ?> - - isSaleable()): ?> - <?php echo $this->__('Add to Cart') ?>
- - __('Remove Item') ?> -
- -
- - « __('Back') ?> - - - isSaleable()):?> -  <?php echo $this->__('Add All to Cart') ?>  - - -
-
- -

__('You have no items in your wishlist.') ?>

- - - -
diff --git a/app/design/install/default/default/template/install/end.phtml b/app/design/install/default/default/template/install/end.phtml index 0e8559670b..50cfb3ad77 100644 --- a/app/design/install/default/default/template/install/end.phtml +++ b/app/design/install/default/default/template/install/end.phtml @@ -33,6 +33,9 @@

__("You're All Set") ?>!

+getIframeSourceUrl()): ?> + +

__('Get ready to experience Open-Source eCommerce Evolved.') ?>

getEncryptionKey()): ?>

__('Before you continue to your store, please make a note of your encryption key (Magento uses it to encrypt passwords, credit cards and more).') ?>

diff --git a/app/etc/modules/Mage_All.xml b/app/etc/modules/Mage_All.xml index 06f04e6c7c..94a7097534 100644 --- a/app/etc/modules/Mage_All.xml +++ b/app/etc/modules/Mage_All.xml @@ -77,7 +77,8 @@ true core - + + @@ -290,6 +291,7 @@ + diff --git a/app/etc/modules/Mage_AmazonPayments.xml b/app/etc/modules/Mage_AmazonPayments.xml deleted file mode 100644 index c6459220a4..0000000000 --- a/app/etc/modules/Mage_AmazonPayments.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - true - core - - - - - - - diff --git a/app/etc/modules/Mage_Eway.xml b/app/etc/modules/Mage_Centinel.xml similarity index 91% rename from app/etc/modules/Mage_Eway.xml rename to app/etc/modules/Mage_Centinel.xml index fb895bce42..a2833f7604 100644 --- a/app/etc/modules/Mage_Eway.xml +++ b/app/etc/modules/Mage_Centinel.xml @@ -20,19 +20,20 @@ * needs please refer to http://www.magentocommerce.com for more information. * * @category Mage - * @package Mage_Eway + * @package Mage_Core * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) */ --> - + true core + - + diff --git a/app/etc/modules/Mage_Chronopay.xml b/app/etc/modules/Mage_Chronopay.xml deleted file mode 100644 index e26f965e74..0000000000 --- a/app/etc/modules/Mage_Chronopay.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - true - core - - - - - - diff --git a/app/etc/modules/Mage_Cybermut.xml b/app/etc/modules/Mage_Cybermut.xml deleted file mode 100644 index 1dc7a96149..0000000000 --- a/app/etc/modules/Mage_Cybermut.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - true - core - - - - - - diff --git a/app/etc/modules/Mage_Cybersource.xml b/app/etc/modules/Mage_Cybersource.xml deleted file mode 100644 index aafc0839fa..0000000000 --- a/app/etc/modules/Mage_Cybersource.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - true - core - - - - - - diff --git a/app/etc/modules/Mage_Flo2Cash.xml b/app/etc/modules/Mage_Flo2Cash.xml deleted file mode 100644 index 22672b2304..0000000000 --- a/app/etc/modules/Mage_Flo2Cash.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - true - core - - - - - - diff --git a/app/etc/modules/Mage_Ideal.xml b/app/etc/modules/Mage_Ideal.xml deleted file mode 100644 index 4d10be4cc9..0000000000 --- a/app/etc/modules/Mage_Ideal.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - true - core - - - - - - diff --git a/app/etc/modules/Mage_Ogone.xml b/app/etc/modules/Mage_Ogone.xml deleted file mode 100644 index 0a8d39db6c..0000000000 --- a/app/etc/modules/Mage_Ogone.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - true - core - - - - - - - diff --git a/app/etc/modules/Mage_Oscommerce.xml b/app/etc/modules/Mage_Oscommerce.xml deleted file mode 100644 index ca85193c4c..0000000000 --- a/app/etc/modules/Mage_Oscommerce.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - true - core - - - - - - - - - diff --git a/app/etc/modules/Mage_Paybox.xml b/app/etc/modules/Mage_Paybox.xml deleted file mode 100644 index 66eeedbe99..0000000000 --- a/app/etc/modules/Mage_Paybox.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - true - core - - - - - - diff --git a/app/etc/modules/Mage_Protx.xml b/app/etc/modules/Mage_Protx.xml deleted file mode 100644 index 4b640ce4d6..0000000000 --- a/app/etc/modules/Mage_Protx.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - true - core - - - - - - diff --git a/app/etc/modules/Mage_Strikeiron.xml b/app/etc/modules/Mage_Strikeiron.xml deleted file mode 100644 index 974fffba2e..0000000000 --- a/app/etc/modules/Mage_Strikeiron.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - true - core - - - - - - diff --git a/app/locale/en_US/Mage_Adminhtml.csv b/app/locale/en_US/Mage_Adminhtml.csv index a3048361d1..6be8c802b1 100644 --- a/app/locale/en_US/Mage_Adminhtml.csv +++ b/app/locale/en_US/Mage_Adminhtml.csv @@ -36,6 +36,7 @@ "6 Hours","6 Hours" "

404 Error

Page not found.

","

404 Error

Page not found.

" "A new password was sent to your email address. Please check your email and click Back to Login.","A new password was sent to your email address. Please check your email and click Back to Login." +"Abandoned Carts","Abandoned Carts" "About the calendar","About the calendar" "Access Denied.","Access Denied." "Access Deny","Access Deny" @@ -72,7 +73,7 @@ "Add URL Rewrite for a Product","Add URL Rewrite for a Product" "Add after","Add after" "Add new Role","Add new Role" -"Additional Cache Mahagement","Additional Cache Mahagement" +"Additional Cache Management","Additional Cache Management" "Address Type:","Address Type:" "Admin","Admin" "Advanced Admin Section","Advanced Admin Section" @@ -82,6 +83,7 @@ "All Allowed Countries","All Allowed Countries" "All Cache","All Cache" "All Files","All Files" +"All Reviews","All Reviews" "All Store Views","All Store Views" "All Tags","All Tags" "All Websites","All Websites" @@ -132,6 +134,7 @@ "Browse Files...","Browse Files..." "Bundle Items","Bundle Items" "Bundle with dynamic pricing cannot include custom defined options. Options will not be saved.","Bundle with dynamic pricing cannot include custom defined options. Options will not be saved." +"CMS","CMS" "CRITICAL","CRITICAL" "CSV","CSV" "CSV / Tab separated","CSV / Tab separated" @@ -162,11 +165,13 @@ "Catalog","Catalog" "Catalog Index rebuild error. Please try again later","Catalog Index rebuild error. Please try again later" "Catalog Index was rebuilt successfully","Catalog Index was rebuilt successfully" +"Catalog Price Rules","Catalog Price Rules" "Catalog Rewrites","Catalog Rewrites" "Catalog Rewrites was refreshed successfully","Catalog Rewrites was refreshed successfully" "Catalog Rewrites were refreshed successfully","Catalog Rewrites were refreshed successfully" "CatalogInventory Stock Status rebuild error. Please try again later","CatalogInventory Stock Status rebuild error. Please try again later" "CatalogInventory Stock Status was rebuilt successfully","CatalogInventory Stock Status was rebuilt successfully" +"Categories","Categories" "Category:","Category:" "Channel","Channel" "Checkbox","Checkbox" @@ -210,6 +215,7 @@ "Credit Memo was successfully canceled.","Credit Memo was successfully canceled." "Credit Memo was successfully created","Credit Memo was successfully created" "Credit Memo was successfully voided","Credit Memo was successfully voided" +"Credit Memos","Credit Memos" "Currency","Currency" "Currency Information","Currency Information" "Currency Setup Section","Currency Setup Section" @@ -222,12 +228,18 @@ "Custom Variables","Custom Variables" "Customer","Customer" "Customer Group:","Customer Group:" +"Customer Groups","Customer Groups" "Customer Name","Customer Name" +"Customer Reviews","Customer Reviews" +"Customer Shopping Carts","Customer Shopping Carts" "Customer Since:","Customer Since:" +"Customer Tax Classes","Customer Tax Classes" "Customer was deleted","Customer was deleted" "Customer was successfully saved","Customer was successfully saved" "Customer with the same email already exists.","Customer with the same email already exists." "Customers","Customers" +"Customers By Orders Total","Customers By Orders Total" +"Customers by Number of Orders","Customers by Number of Orders" "DHTML Date/Time Selector","DHTML Date/Time Selector" "Dashboard","Dashboard" "Data Format","Data Format" @@ -261,6 +273,7 @@ "Design Section","Design Section" "Design change deleted","Design change deleted" "Design change saved","Design change saved" +"Details","Details" "Developer Section","Developer Section" "Direction:","Direction:" "Disable","Disable" @@ -269,11 +282,15 @@ "Display default currency","Display default currency" "Distributed under GNU LGPL. See %s for details.","Distributed under GNU LGPL. See %s for details." "Do you really want to KILL parallel process and start new indexing process?","Do you really want to KILL parallel process and start new indexing process?" +"Downloads","Downloads" "Drag to move","Drag to move" "Drop-down","Drop-down" "Edit","Edit" +"Edit Design Change","Edit Design Change" "Edit Email Template","Edit Email Template" "Edit Poll","Edit Poll" +"Edit Queue","Edit Queue" +"Edit Review","Edit Review" "Edit Role","Edit Role" "Edit Store View","Edit Store View" "Edit System Template","Edit System Template" @@ -364,6 +381,7 @@ "Go Today","Go Today" "Google Base","Google Base" "Google Base Items","Google Base Items" +"Google Sitemaps","Google Sitemaps" "Grand Total","Grand Total" "Grid (default) / List","Grid (default) / List" "Grid only","Grid only" @@ -387,6 +405,8 @@ "Images Cache","Images Cache" "Import","Import" "Import Service","Import Service" +"Import and Export","Import and Export" +"Import and Export Tax Rates","Import and Export Tax Rates" "Import/Export","Import/Export" "Import/Export Advanced","Import/Export Advanced" "Import/Export Profile","Import/Export Profile" @@ -430,6 +450,7 @@ "Invoice was successfully captured","Invoice was successfully captured" "Invoice was successfully voided","Invoice was successfully voided" "Invoice without products could not be created.","Invoice without products could not be created." +"Invoices","Invoices" "Issue Number","Issue Number" "Issuer: %s","Issuer: %s" "Items","Items" @@ -447,6 +468,7 @@ "Last Name","Last Name" "Last Name is required field.","Last Name is required field." "Last Name:","Last Name:" +"Last updated: %s. To refresh last day\'s statistics, click here","Last updated: %s. To refresh last day\'s statistics, click here" "Lastname","Lastname" "Latest Message:","Latest Message:" "Layered Navigation Indices","Layered Navigation Indices" @@ -459,6 +481,7 @@ "Lifetime Sales","Lifetime Sales" "Lifetime statistics was successfully updated","Lifetime statistics was successfully updated" "Links","Links" +"Links with associated products will retain only after saving current product.","Links with associated products will retain only after saving current product." "List (default) / Grid","List (default) / Grid" "List only","List only" "Load Template","Load Template" @@ -472,6 +495,7 @@ "Log into Magento Admin Page","Log into Magento Admin Page" "Logged in as %s","Logged in as %s" "Login","Login" +"Low Stock","Low Stock" "MAJOR","MAJOR" "MINOR","MINOR" "MS Excel XML","MS Excel XML" @@ -484,10 +508,16 @@ "Magento is a trademark of Irubin Consulting Inc. DBA Varien. Copyright © %s Irubin Consulting Inc.","Magento is a trademark of Irubin Consulting Inc. DBA Varien. Copyright © %s Irubin Consulting Inc." "Magento ver. %s","Magento ver. %s" "Magento™ is a trademark of Irubin Consulting Inc. DBA Varien.
Copyright © %s Irubin Consulting Inc.","Magento™ is a trademark of Irubin Consulting Inc. DBA Varien.
Copyright © %s Irubin Consulting Inc." +"Manage Attribute Sets","Manage Attribute Sets" +"Manage Attributes","Manage Attributes" +"Manage Categories","Manage Categories" +"Manage Content","Manage Content" "Manage Currency Rates","Manage Currency Rates" "Manage Customers","Manage Customers" "Manage Ratings","Manage Ratings" "Manage Stores","Manage Stores" +"Manage Tax Rules","Manage Tax Rules" +"Manage Tax Zones and Rates","Manage Tax Zones and Rates" "Manage osCommerce Orders","Manage osCommerce Orders" "Manage osCommerce Profiles","Manage osCommerce Profiles" "Matched expression","Matched expression" @@ -497,6 +527,7 @@ "Messages Inbox","Messages Inbox" "Min","Min" "Month","Month" +"Most Viewed","Most Viewed" "Most Viewed Products","Most Viewed Products" "Multiple Select","Multiple Select" "My Account","My Account" @@ -506,20 +537,50 @@ "Name on Card","Name on Card" "Name on the Card: %s","Name on the Card: %s" "Name:","Name:" +"New ","New " "New Accounts","New Accounts" "New Api Key","New Api Key" +"New Attribute","New Attribute" +"New Block","New Block" +"New Category","New Category" +"New Class","New Class" +"New Condition","New Condition" "New Custom Variable","New Custom Variable" +"New Customer","New Customer" "New Customers","New Customers" +"New Design Change","New Design Change" "New Email Template","New Email Template" +"New Group","New Group" +"New Invoice","New Invoice" "New Item Type","New Item Type" +"New Memo","New Memo" +"New Memo for #%s","New Memo for #%s" +"New Page","New Page" "New Password","New Password" +"New Poll","New Poll" "New Profile","New Profile" +"New Rate","New Rate" +"New Rating","New Rating" +"New Review","New Review" +"New Role","New Role" +"New Rule","New Rule" +"New Search","New Search" +"New Set","New Set" +"New Shipment","New Shipment" +"New Sitemap","New Sitemap" "New Store View","New Store View" "New System Template","New System Template" +"New Tag","New Tag" "New Template","New Template" "New User","New User" +"New Variable","New Variable" "New Website","New Website" "New admin password","New admin password" +"Newsletter","Newsletter" +"Newsletter Problems","Newsletter Problems" +"Newsletter Queue","Newsletter Queue" +"Newsletter Subscribers","Newsletter Subscribers" +"Newsletter Templates","Newsletter Templates" "Next month (hold for menu)","Next month (hold for menu)" "Next page","Next page" "Next year (hold for menu)","Next year (hold for menu)" @@ -537,12 +598,14 @@ "No search modules registered","No search modules registered" "None","None" "Note:","Note:" +"Notifications","Notifications" "Number of Orders","Number of Orders" "Number of Uses","Number of Uses" "Number of records:","Number of records:" "Old rate:","Old rate:" "One of options row has error","One of options row has error" "One or more of the Cache Types are invalidated:","One or more of the Cache Types are invalidated:" +"Online Customers","Online Customers" "Only attributes with scope ""Global"", input type ""Dropdown"" and Use To Create Configurable Product ""Yes"" are available.","Only attributes with scope ""Global"", input type ""Dropdown"" and Use To Create Configurable Product ""Yes"" are available." "Only mapped fields","Only mapped fields" "Optional","Optional" @@ -550,6 +613,7 @@ "Order #%s","Order #%s" "Order #%s (%s)","Order #%s (%s)" "Order Totals","Order Totals" +"Order cannot be placed.","Order cannot be placed." "Order confirmation email not sent","Order confirmation email not sent" "Order confirmation email sent","Order confirmation email sent" "Order does not allow to create an invoice.","Order does not allow to create an invoice." @@ -562,6 +626,7 @@ "Package Extensions","Package Extensions" "Packages","Packages" "Page","Page" +"Pages","Pages" "Parent Product Thumbnail","Parent Product Thumbnail" "Passive mode","Passive mode" "Password","Password" @@ -572,10 +637,10 @@ "Password:","Password:" "Path","Path" "Path:","Path:" -"PayPal Email","PayPal Email" "Payment method instance is not available","Payment method instance is not available" "Payment method is not available","Payment method is not available" "Payment method must be specified","Payment method must be specified" +"Pending Reviews","Pending Reviews" "Pending Tags","Pending Tags" "Per Item","Per Item" "Per Order","Per Order" @@ -587,6 +652,7 @@ "Personal Information","Personal Information" "Phone:","Phone:" "Please confirm site switching. All data that hasn\'t been saved will be lost.","Please confirm site switching. All data that hasn\'t been saved will be lost." +"Please continue with placing order.","Please continue with placing order." "Please enter 6 or more characters.","Please enter 6 or more characters." "Please enter a number greater than 0 in this field.","Please enter a number greater than 0 in this field." "Please enter a valid $ amount. For example $100.00.","Please enter a valid $ amount. For example $100.00." @@ -635,6 +701,8 @@ "Poll Manager","Poll Manager" "Poll was successfully deleted","Poll was successfully deleted" "Poll was successfully saved","Poll was successfully saved" +"Polls","Polls" +"Popular","Popular" "Position of Watermark for %s","Position of Watermark for %s" "Pregenerated product images files.","Pregenerated product images files." "Prev. month (hold for menu)","Prev. month (hold for menu)" @@ -647,9 +715,12 @@ "Price:","Price:" "Processed %s%% %s/%d records","Processed %s%% %s/%d records" "Product","Product" +"Product Reviews","Product Reviews" "Product Thumbnail Itself","Product Thumbnail Itself" "Product:","Product:" "Products","Products" +"Products Ordered","Products Ordered" +"Products in Carts","Products in Carts" "Profile Action","Profile Action" "Profile Actions XML","Profile Actions XML" "Profile Direction","Profile Direction" @@ -697,6 +768,9 @@ "Retrieve Password","Retrieve Password" "Return Html Version","Return Html Version" "Revenue","Revenue" +"Reviews","Reviews" +"Reviews and Ratings","Reviews and Ratings" +"Rewrite Rules","Rewrite Rules" "Role ID","Role ID" "Role Info","Role Info" "Role Information","Role Information" @@ -718,6 +792,7 @@ "SKU","SKU" "SKU:","SKU:" "SSL Error: Invalid or self-signed certificate","SSL Error: Invalid or self-signed certificate" +"Sales","Sales" "Sales Report","Sales Report" "Samples","Samples" "Save","Save" @@ -758,6 +833,7 @@ "Shipment History","Shipment History" "Shipment was successfully created.","Shipment was successfully created." "Shipment was successfully sent.","Shipment was successfully sent." +"Shipments","Shipments" "Shipping","Shipping" "Shipping Address","Shipping Address" "Shipping Price","Shipping Price" @@ -766,6 +842,8 @@ "Shipping method must be specified","Shipping method must be specified" "Shipping method selection is not applicable","Shipping method selection is not applicable" "Shipping origin","Shipping origin" +"Shopping Cart","Shopping Cart" +"Shopping Cart Price Rules","Shopping Cart Price Rules" "Shopping Cart from %s","Shopping Cart from %s" "Show Report for","Show Report for" "Show by","Show by" @@ -781,8 +859,10 @@ "Specified","Specified" "Spreadsheet Name:","Spreadsheet Name:" "Start Date","Start Date" +"Start/Reset Validation...","Start/Reset Validation..." "Starting profile execution, please wait...","Starting profile execution, please wait..." "State/Province:","State/Province:" +"Static Blocks","Static Blocks" "Status","Status" "Status:","Status:" "Stock Quantity:","Stock Quantity:" @@ -791,12 +871,12 @@ "Store Email Addresses Section","Store Email Addresses Section" "Store View","Store View" "Store:","Store:" +"Stores","Stores" "SubTotal","SubTotal" "Subject","Subject" "Submit","Submit" "Subpackage can't be conflicting","Subpackage can't be conflicting" "Subtotal","Subtotal" -"Switch/Solo Only","Switch/Solo Only" "Switch/Solo card issue number: %s","Switch/Solo card issue number: %s" "Switch/Solo card start Date: %s/%s","Switch/Solo card start Date: %s/%s" "Switch/Solo/Maestro(UK Domestic) Only","Switch/Solo/Maestro(UK Domestic) Only" @@ -812,19 +892,20 @@ "Tax","Tax" "Tb","Tb" "Template","Template" -"Template Code","Template Code" "Template Content","Template Content" "Template Information","Template Information" +"Template Name","Template Name" "Template Styles","Template Styles" "Template Subject","Template Subject" "Template Type","Template Type" "Temporary (302)","Temporary (302)" +"Terms and Conditions","Terms and Conditions" "Text","Text" "The archive can be uncompressed with %s on Windows systems","The archive can be uncompressed with %s on Windows systems" +"The card has failed verification with issuer bank.","The card has failed verification with issuer bank." "The information in this tab has been changed.","The information in this tab has been changed." "Themes JavaScript and CSS files combined to one file.","Themes JavaScript and CSS files combined to one file." "This Email template no longer exists","This Email template no longer exists" -"This Report is not realtime. Last updated: %s. To refresh statistics right now, click here","This Report is not realtime. Last updated: %s. To refresh statistics right now, click here" "This Role no longer exists","This Role no longer exists" "This User no longer exists","This User no longer exists" "This account is","This account is" @@ -860,6 +941,7 @@ "Transactional Emails","Transactional Emails" "Type","Type" "Type:","Type:" +"URL Rewrite","URL Rewrite" "URL Rewrite Information","URL Rewrite Information" "URL Rewrite Management","URL Rewrite Management" "URL Rewrite has been successfully deleted","URL Rewrite has been successfully deleted" @@ -913,13 +995,19 @@ "Users","Users" "Value","Value" "Value Delimiter:","Value Delimiter:" +"Variable","Variable" "Variable Code","Variable Code" "Variable HTML Value","Variable HTML Value" "Variable ID","Variable ID" "Variable Name","Variable Name" "Variable Plain Value","Variable Plain Value" +"Verification Failed","Verification Failed" +"Verification Successful","Verification Successful" "View","View" "View Actions XML","View Actions XML" +"View Memo","View Memo" +"View Memo for #%s","View Memo for #%s" +"View Shipment","View Shipment" "View Statistics for","View Statistics for" "Visibility:","Visibility:" "Warning! Empty value can cause problems with CSV format.","Warning! Empty value can cause problems with CSV format." @@ -927,6 +1015,7 @@ "Warning!\r\nThis action will remove those users from already assigned roles\r\nAre you sure?","Warning!\r\nThis action will remove those users from already assigned roles\r\nAre you sure?" "Warning: Please don't close window during importing/exporting data","Warning: Please don't close window during importing/exporting data" "Watermark File for %s","Watermark File for %s" +"We appreciate our merchants\' feedback, please take our survey to provide insight on the features you would like included in Magento. Remove this notification","We appreciate our merchants\' feedback, please take our survey to provide insight on the features you would like included in Magento. Remove this notification" "We detected that your JavaScript seem to be disabled.","We detected that your JavaScript seem to be disabled." "We\'re in our typing table, coding away more features for Magento. Thank you for your patience.","We\'re in our typing table, coding away more features for Magento. Thank you for your patience." "Web Section","Web Section" diff --git a/app/locale/en_US/Mage_Api.csv b/app/locale/en_US/Mage_Api.csv index 4d9649b569..daef5f7c91 100644 --- a/app/locale/en_US/Mage_Api.csv +++ b/app/locale/en_US/Mage_Api.csv @@ -140,6 +140,7 @@ "Last Name:","Last Name:" "Latest Message:","Latest Message:" "Leave empty to use tax identifier","Leave empty to use tax identifier" +"Links with associated products will retain only after saving current product.","Links with associated products will retain only after saving current product." "Loading...","Loading..." "Local Server","Local Server" "Local/Remote Server","Local/Remote Server" @@ -171,6 +172,7 @@ "Old rate:","Old rate:" "Only mapped fields","Only mapped fields" "Order Totals","Order Totals" +"Order cannot be placed.","Order cannot be placed." "Order confirmation email not sent","Order confirmation email not sent" "Order confirmation email sent","Order confirmation email sent" "Original Magento attribute names in first row:","Original Magento attribute names in first row:" @@ -181,10 +183,10 @@ "Password","Password" "Path","Path" "Path:","Path:" -"PayPal Email","PayPal Email" "Personal Information","Personal Information" "Phone:","Phone:" "Please confirm site switching. All data that hasn\'t been saved will be lost.","Please confirm site switching. All data that hasn\'t been saved will be lost." +"Please continue with placing order.","Please continue with placing order." "Please enter 6 or more characters.","Please enter 6 or more characters." "Please enter a number greater than 0 in this field.","Please enter a number greater than 0 in this field." "Please enter a valid $ amount. For example $100.00.","Please enter a valid $ amount. For example $100.00." @@ -249,17 +251,18 @@ "Sort Order","Sort Order" "Spreadsheet Name:","Spreadsheet Name:" "Start Date","Start Date" +"Start/Reset Validation...","Start/Reset Validation..." "State/Province:","State/Province:" "Status:","Status:" "Stock Quantity:","Stock Quantity:" "Store:","Store:" -"Switch/Solo Only","Switch/Solo Only" "Switch/Solo card issue number: %s","Switch/Solo card issue number: %s" "Switch/Solo card start Date: %s/%s","Switch/Solo card start Date: %s/%s" "Switch/Solo/Maestro(UK Domestic) Only","Switch/Solo/Maestro(UK Domestic) Only" "Switch/Solo/Maestro(UK Domestic) card issue number: %s","Switch/Solo/Maestro(UK Domestic) card issue number: %s" "Switch/Solo/Maestro(UK Domestic) card start Date: %s/%s","Switch/Solo/Maestro(UK Domestic) card start Date: %s/%s" "Target","Target" +"The card has failed verification with issuer bank.","The card has failed verification with issuer bank." "The information in this tab has been changed.","The information in this tab has been changed." "This is a demo store. Any orders placed through this store will not be honored or fulfilled.","This is a demo store. Any orders placed through this store will not be honored or fulfilled." "This is a required field.","This is a required field." @@ -284,6 +287,8 @@ "User name","User name" "Users","Users" "Value Delimiter:","Value Delimiter:" +"Verification Failed","Verification Failed" +"Verification Successful","Verification Successful" "View","View" "View Statistics for","View Statistics for" "Visibility:","Visibility:" diff --git a/app/locale/en_US/Mage_Catalog.csv b/app/locale/en_US/Mage_Catalog.csv index 76cdef00fc..ece4ee331d 100644 --- a/app/locale/en_US/Mage_Catalog.csv +++ b/app/locale/en_US/Mage_Catalog.csv @@ -15,7 +15,6 @@ "Add Attribute","Add Attribute" "Add Design Change","Add Design Change" "Add Group","Add Group" -"Add Items to Cart","Add Items to Cart" "Add New","Add New" "Add New Attribute","Add New Attribute" "Add New Attribute Set","Add New Attribute Set" @@ -44,7 +43,6 @@ "Allow HTML-tags on Front-end","Allow HTML-tags on Front-end" "Allowed File Extensions","Allowed File Extensions" "Allowed file extensions to upload","Allowed file extensions to upload" -"Amount","Amount" "Anchor Custom Text","Anchor Custom Text" "Anchor Custom Title","Anchor Custom Title" "Apply To","Apply To" @@ -73,10 +71,7 @@ "Attributes","Attributes" "Attrribute names can be specified per store.","Attrribute names can be specified per store." "Autogenerate","Autogenerate" -"Availability","Availability" "Availability:","Availability:" -"Availability: In stock.","Availability: In stock." -"Availability: Out of stock.","Availability: Out of stock." "Back","Back" "Backend Model","Backend Model" "Backend Table","Backend Table" @@ -153,9 +148,7 @@ "Comparable","Comparable" "Comparable on Front-end","Comparable on Front-end" "Compare","Compare" -"Compare Items","Compare Items" "Compare Products","Compare Products" -"Compare Products (%d)","Compare Products (%d)" "Compare Products List","Compare Products List" "Compare list successfully cleared","Compare list successfully cleared" "Conditions Combination","Conditions Combination" @@ -202,11 +195,11 @@ "Depends on design theme","Depends on design theme" "Design","Design" "Disabled","Disabled" +"Disallowed file type.","Disallowed file type." "Display in Suggested Terms","Display in Suggested Terms" "Double click on a group to rename it","Double click on a group to rename it" "Double click on above image to view full picture","Double click on above image to view full picture" "Duplicate","Duplicate" -"Duplicate amount found.","Duplicate amount found." "Duplicate website tier price customer group and quantity.","Duplicate website tier price customer group and quantity." "Duplicate website, country and state tax found.","Duplicate website, country and state tax found." "Edit","Edit" @@ -299,6 +292,7 @@ "Is Required","Is Required" "Items %s to %s of %s total","Items %s to %s of %s total" "Items that you don't want to show in the catalog or search results should have status 'Disabled' in the desired store.","Items that you don't want to show in the catalog or search results should have status 'Disabled' in the desired store." +"Keep your eyes open for our special Back to School items and save A LOT!","Keep your eyes open for our special Back to School items and save A LOT!" "Label","Label" "Last Name","Last Name" "Last Notification","Last Notification" @@ -373,7 +367,6 @@ "Our customer service is available 24/7. Call us at (555) 555-0123.","Our customer service is available 24/7. Call us at (555) 555-0123." "Out of Stock","Out of Stock" "Out of stock","Out of stock" -"Out of stock.","Out of stock." "PM","PM" "Page Title Separator","Page Title Separator" "Parent Category","Parent Category" @@ -384,14 +377,12 @@ "Please be careful as once you click on the row it will load package data form the selected file and all unsaved form data will be lost.","Please be careful as once you click on the row it will load package data form the selected file and all unsaved form data will be lost." "Please click on Close Window button if it won\'t be closed automatically","Please click on Close Window button if it won\'t be closed automatically" "Please enter a new group name","Please enter a new group name" -"Please refresh ""Catalog Rewrites"" and ""Layered Navigation Indices"" in System -> Cache Management","Please refresh ""Catalog Rewrites"" and ""Layered Navigation Indices"" in System -> Cache Management" +"Please refresh ""Catalog Url Rewrites"" and ""Product Attributes"" in System -> Index Management","Please refresh ""Catalog Url Rewrites"" and ""Product Attributes"" in System -> Index Management" "Please select items","Please select items" "Please select one or more attributes.","Please select one or more attributes." "Please select product(s)","Please select product(s)" "Please select products for attributes update","Please select products for attributes update" "Please select static block ...","Please select static block ..." -"Please set up merge date/time","Please set up merge date/time" -"Please set up merge date/time later then present date","Please set up merge date/time later then present date" "Please specify date required option(s)","Please specify date required option(s)" "Please specify the product option(s)","Please specify the product option(s)" "Please specify the product required option(s)","Please specify the product required option(s)" @@ -402,6 +393,7 @@ "Position In Layered Navigation","Position In Layered Navigation" "Position of attribute in layered navigation block","Position of attribute in layered navigation block" "Prev","Prev" +"Previous","Previous" "Price","Price" "Price Type","Price Type" "Price is not available","Price is not available" @@ -473,7 +465,6 @@ "Regular Price:","Regular Price:" "Related Products","Related Products" "Remove","Remove" -"Remove Product","Remove Product" "Remove Product From Websites","Remove Product From Websites" "Remove This Item","Remove This Item" "Remove product assignment","Remove product assignment" @@ -504,8 +495,8 @@ "Retrieve product types","Retrieve product types" "Retrieve products data","Retrieve products data" "Retrieve products list by filters","Retrieve products list by filters" +"Review has been successfully saved","Review has been successfully saved" "Review successfully deleted","Review successfully deleted" -"Review was deleted successfully","Review was deleted successfully" "Review was removed by another user or does not exists","Review was removed by another user or does not exists" "Review was successfully saved","Review was successfully saved" "Reviews","Reviews" @@ -570,7 +561,6 @@ "Store","Store" "Store View","Store View" "Stretch","Stretch" -"Subscribe to Feed","Subscribe to Feed" "Subscribe to RSS Feed","Subscribe to RSS Feed" "Super product attributes configuration","Super product attributes configuration" "Synonym For","Synonym For" @@ -588,6 +578,8 @@ "There was an error while removing products from websites","There was an error while removing products from websites" "There was an error while updating product(s) attributes","There was an error while updating product(s) attributes" "There was an error while updating product(s) status","There was an error while updating product(s) status" +"This Attribute no longer exists","This Attribute no longer exists" +"This Product no longer exists","This Product no longer exists" "This attribute is used in configurable products. You cannot remove it from the attribute set.","This attribute is used in configurable products. You cannot remove it from the attribute set." "This attribute no longer exists","This attribute no longer exists" "This group contains attributes, used in configurable products. Please move these attributes to another group and try again.","This group contains attributes, used in configurable products. Please move these attributes to another group and try again." @@ -628,6 +620,8 @@ "Update product tier prices","Update product tier prices" "Upload new product image ","Upload new product image " "Url Rewrite Management","Url Rewrite Management" +"Use Canonical Link Meta Tag For Categories","Use Canonical Link Meta Tag For Categories" +"Use Canonical Link Meta Tag For Products","Use Canonical Link Meta Tag For Products" "Use Config Settings","Use Config Settings" "Use Default Value","Use Default Value" "Use Flat Catalog Category","Use Flat Catalog Category" @@ -659,8 +653,6 @@ "Watermark Position","Watermark Position" "We Also Recommend","We Also Recommend" "Website","Website" -"Website Item Must be checked","Website Item Must be checked" -"Website Store Must be checked","Website Store Must be checked" "Websites","Websites" "Wrong BuyRequest instance in options group","Wrong BuyRequest instance in options group" "Wrong option instance type in options group","Wrong option instance type in options group" diff --git a/app/locale/en_US/Mage_CatalogRule.csv b/app/locale/en_US/Mage_CatalogRule.csv index 5a926f1126..84ff321539 100644 --- a/app/locale/en_US/Mage_CatalogRule.csv +++ b/app/locale/en_US/Mage_CatalogRule.csv @@ -61,7 +61,6 @@ "There are rules that have been changed but not applied. Please, click Apply Rules in order to see immediate effect in catalog.","There are rules that have been changed but not applied. Please, click Apply Rules in order to see immediate effect in catalog." "This rule no longer exists","This rule no longer exists" "To Date","To Date" -"Type","Type" "Unable to apply rules","Unable to apply rules" "Unable to find a page to delete","Unable to find a page to delete" "Update product's %s %s: %s","Update product's %s %s: %s" diff --git a/app/locale/en_US/Mage_CatalogSearch.csv b/app/locale/en_US/Mage_CatalogSearch.csv index e3525b9e65..ec0a5b2deb 100644 --- a/app/locale/en_US/Mage_CatalogSearch.csv +++ b/app/locale/en_US/Mage_CatalogSearch.csv @@ -34,7 +34,6 @@ "Results","Results" "Search","Search" "Search Settings","Search Settings" -"Search Site","Search Site" "Search Terms","Search Terms" "Search Type","Search Type" "Search entire store here...","Search entire store here..." diff --git a/app/locale/en_US/Mage_Centinel.csv b/app/locale/en_US/Mage_Centinel.csv new file mode 100644 index 0000000000..4fbb3414df --- /dev/null +++ b/app/locale/en_US/Mage_Centinel.csv @@ -0,0 +1,31 @@ +"3D Secure CAVV","3D Secure CAVV" +"3D Secure Card Validation","3D Secure Card Validation" +"3D Secure Cardholder Validation","3D Secure Cardholder Validation" +"3D Secure Electronic Commerce Indicator","3D Secure Electronic Commerce Indicator" +"3D Secure Verification Result","3D Secure Verification Result" +"3D Secure XID","3D Secure XID" +"Card Issuer Liability","Card Issuer Liability" +"Card Verification","Card Verification" +"Enrolled","Enrolled" +"Enrolled but Authentication Unavailable","Enrolled but Authentication Unavailable" +"Failed","Failed" +"MasterCard SecureCode","MasterCard SecureCode" +"Merchant Liability","Merchant Liability" +"Not Enrolled","Not Enrolled" +"Order cannot be placed.","Order cannot be placed." +"Payment information error. Please start over.","Payment information error. Please start over." +"Please continue with placing order.","Please continue with placing order." +"Please verify the card with the issuer bank before placing the order.","Please verify the card with the issuer bank before placing the order." +"Please verify the card with the issuer bank:","Please verify the card with the issuer bank:" +"Start/Reset Validation...","Start/Reset Validation..." +"Successful","Successful" +"Successful attempt","Successful attempt" +"The card has failed verification with issuer bank.","The card has failed verification with issuer bank." +"This card has failed validation and cannot be used.","This card has failed validation and cannot be used." +"This card has failed validation, but it is possible to place the order.","This card has failed validation, but it is possible to place the order." +"To ensure the security of your transactions","To ensure the security of your transactions" +"Unable to complete","Unable to complete" +"Validation failed.","Validation failed." +"Verification Failed","Verification Failed" +"Verification Successful","Verification Successful" +"Verified by Visa","Verified by Visa" diff --git a/app/locale/en_US/Mage_Checkout.csv b/app/locale/en_US/Mage_Checkout.csv index 34e2b2c338..57bd3838a9 100644 --- a/app/locale/en_US/Mage_Checkout.csv +++ b/app/locale/en_US/Mage_Checkout.csv @@ -1,7 +1,4 @@ "%s was successfully added to your shopping cart.","%s was successfully added to your shopping cart." -"« Back to Billing Information","« Back to Billing Information" -"« Back to Select Addresses","« Back to Select Addresses" -"« Back to Shopping Cart","« Back to Shopping Cart" "* Required Fields","* Required Fields" "Add New Address","Add New Address" "Add New Condition","Add New Condition" @@ -108,6 +105,7 @@ "HTML","HTML" "ID","ID" "Incl. Tax","Incl. Tax" +"Item not found or already ordered","Item not found or already ordered" "Items","Items" "Load customer quote error","Load customer quote error" "Loading next step...","Loading next step..." @@ -129,7 +127,6 @@ "Multishipping Checkout Shipping Address Selection","Multishipping Checkout Shipping Address Selection" "Multishipping Checkout Shipping Information Step","Multishipping Checkout Shipping Information Step" "Multishipping Checkout Success","Multishipping Checkout Success" -"My Account","My Account" "My Cart","My Cart" "My Cart (%s item)","My Cart (%s item)" "My Cart (%s items)","My Cart (%s items)" @@ -173,9 +170,7 @@ "Register and save time!","Register and save time!" "Register to Create an Account","Register to Create an Account" "Register with us for future convenience:","Register with us for future convenience:" -"Remove","Remove" "Remove Item","Remove Item" -"Remove Product","Remove Product" "Remove This Item","Remove This Item" "Remove item","Remove item" "Review Order","Review Order" @@ -203,6 +198,7 @@ "Shipping selection is not applicable","Shipping selection is not applicable" "Shipping to","Shipping to" "Shopping Cart","Shopping Cart" +"Shopping Cart Form Before","Shopping Cart Form Before" "Shopping Cart Sidebar","Shopping Cart Sidebar" "Shopping Cart is Empty","Shopping Cart is Empty" "Show Content as","Show Content as" @@ -224,9 +220,7 @@ "Text","Text" "Thank you for your purchase!","Thank you for your purchase!" "There are %s items in your cart.","There are %s items in your cart." -"There are %s items in your cart.","There are %s items in your cart." "There is 1 item in your cart.","There is 1 item in your cart." -"There is 1 item in your cart.","There is 1 item in your cart." "There was an error processing your order. Please contact us or try again later.","There was an error processing your order. Please contact us or try again later." "This condition no longer exists","This condition no longer exists" "Total","Total" diff --git a/app/locale/en_US/Mage_Chronopay.csv b/app/locale/en_US/Mage_Chronopay.csv deleted file mode 100644 index 05594790c3..0000000000 --- a/app/locale/en_US/Mage_Chronopay.csv +++ /dev/null @@ -1,48 +0,0 @@ -"Accepted currency","Accepted currency" -"Authorize Only","Authorize Only" -"Authorize and Capture","Authorize and Capture" -"CGI URL","CGI URL" -"Card Verification Number","Card Verification Number" -"ChronoPay Gateway","ChronoPay Gateway" -"ChronoPay Standard","ChronoPay Standard" -"Credit Card Number","Credit Card Number" -"Credit Card Number: xxxx-%s","Credit Card Number: xxxx-%s" -"Credit Card Type","Credit Card Type" -"Credit Card Type: %s","Credit Card Type: %s" -"Credit Card Types","Credit Card Types" -"Customer Interface language","Customer Interface language" -"Customer successfully returned from Chronopay","Customer successfully returned from Chronopay" -"Customer was redirected to Chronopay","Customer was redirected to Chronopay" -"Debug","Debug" -"Dutch","Dutch" -"Enabled","Enabled" -"English","English" -"Error occured","Error occured" -"Expiration Date","Expiration Date" -"Gateway request error: %s","Gateway request error: %s" -"German","German" -"Invalid operation code","Invalid operation code" -"Invalid response format","Invalid response format" -"Name on Card","Name on Card" -"Name on the Card: %s","Name on the Card: %s" -"New order status","New order status" -"Order #%s","Order #%s" -"Order number will be used if left empty","Order number will be used if left empty" -"Payment Action","Payment Action" -"Payment from Specific countries","Payment from Specific countries" -"Payment from applicable countries","Payment from applicable countries" -"Please Select","Please Select" -"Please specify Access URL: {STORE_URL}/chronopay/standard/success in the ChronoPay Client Admin.","Please specify Access URL: {STORE_URL}/chronopay/standard/success in the ChronoPay Client Admin." -"Product ID","Product ID" -"Russian","Russian" -"Selected currency code (","Selected currency code (" -"Shared Secret","Shared Secret" -"Site ID","Site ID" -"Sort order","Sort order" -"There was an error occurred during paying process.","There was an error occurred during paying process." -"Title","Title" -"Transaction Description","Transaction Description" -"Transaction ID is invalid","Transaction ID is invalid" -"What is this?","What is this?" -"You will be redirected to ChronoPay in a few seconds.","You will be redirected to ChronoPay in a few seconds." -"You will be redirected to Chronopay website when you place an order.","You will be redirected to Chronopay website when you place an order." diff --git a/app/locale/en_US/Mage_Compiler.csv b/app/locale/en_US/Mage_Compiler.csv index a8d0bcde6f..c504424a52 100644 --- a/app/locale/en_US/Mage_Compiler.csv +++ b/app/locale/en_US/Mage_Compiler.csv @@ -17,3 +17,5 @@ "Not Compiled","Not Compiled" "Run Compilation Process","Run Compilation Process" "Scopes Compilation Settings","Scopes Compilation Settings" +"System","System" +"Tools","Tools" diff --git a/app/locale/en_US/Mage_Core.csv b/app/locale/en_US/Mage_Core.csv index 8a5a2e5a3d..a699abc994 100644 --- a/app/locale/en_US/Mage_Core.csv +++ b/app/locale/en_US/Mage_Core.csv @@ -83,7 +83,7 @@ "Disable email communications","Disable email communications" "Disable modules output","Disable modules output" "Display demo store notice","Display demo store notice" -"Duplicate Of Template Code","Duplicate Of Template Code" +"Duplicate Of Template Name","Duplicate Of Template Name" "Edit Design Change","Edit Design Change" "Edit Store","Edit Store" "Edit Store View","Edit Store View" @@ -139,8 +139,8 @@ "Manage Stores","Manage Stores" "Match expressions in the same order as displayed in the configuration.","Match expressions in the same order as displayed in the configuration." "Maximum length exceeded.","Maximum length exceeded." -"Merge CSS Files","Merge CSS Files" -"Merge JavaScript Files","Merge JavaScript Files" +"Merge CSS Files (beta)","Merge CSS Files (beta)" +"Merge JavaScript Files (beta)","Merge JavaScript Files (beta)" "Miscellaneous HTML","Miscellaneous HTML" "Miscellaneous scripts","Miscellaneous scripts" "Model class does not exist: %s","Model class does not exist: %s" @@ -196,6 +196,7 @@ "Polls","Polls" "Port (25)","Port (25)" "Profiler","Profiler" +"Redirect to Base URL if requested URL doesn't match it","Redirect to Base URL if requested URL doesn't match it" "Request path for specified store","Request path for specified store" "Requested invalid store ""%s""","Requested invalid store ""%s""" "Resource is not set","Resource is not set" @@ -245,7 +246,7 @@ "Store with the same code","Store with the same code" "System","System" "System Log File Name","System Log File Name" -"Template Code must be not empty","Template Code must be not empty" +"Template Name must be not empty","Template Name must be not empty" "Template Path Hints","Template Path Hints" "Template Variables","Template Variables" "Templates","Templates" @@ -283,11 +284,11 @@ "Use Secure URLs in Frontend","Use Secure URLs in Frontend" "Use Web Server Rewrites","Use Web Server Rewrites" "Use custom admin URL","Use custom admin URL" -"Vaidation failed.","Vaidation failed." "Validate HTTP_USER_AGENT","Validate HTTP_USER_AGENT" "Validate HTTP_VIA","Validate HTTP_VIA" "Validate HTTP_X_FORWARDED_FOR","Validate HTTP_X_FORWARDED_FOR" "Validate REMOTE_ADDR","Validate REMOTE_ADDR" +"Validation failed.","Validation failed." "Values less than 60 are ignored. Please note, that changes will apply after logout.","Values less than 60 are ignored. Please note, that changes will apply after logout." "Variable Code must be unique.","Variable Code must be unique." "Web","Web" diff --git a/app/locale/en_US/Mage_Customer.csv b/app/locale/en_US/Mage_Customer.csv index 6d8b3b12b0..6fc8b73349 100644 --- a/app/locale/en_US/Mage_Customer.csv +++ b/app/locale/en_US/Mage_Customer.csv @@ -35,7 +35,6 @@ "Back to Login","Back to Login" "Bad request.","Bad request." "Bill to Name","Bill to Name" -"Billing Information","Billing Information" "Bought From","Bought From" "By creating an account with our store, you will be able to move through the checkout process faster, store multiple shipping addresses, view and track your orders in your account and more.","By creating an account with our store, you will be able to move through the checkout process faster, store multiple shipping addresses, view and track your orders in your account and more." "CSV","CSV" @@ -126,16 +125,13 @@ "Edit Customer Groups","Edit Customer Groups" "Edit Customer's Address","Edit Customer's Address" "Edit Group","Edit Group" -"Edit Newsletter Subscription","Edit Newsletter Subscription" "Edit Newsletters","Edit Newsletters" -"Edit Personal Information","Edit Personal Information" "Email","Email" "Email Address","Email Address" "Email Sender","Email Sender" "Email:","Email:" "Entity collection is expected","Entity collection is expected" "Error during retrieval of option value: %s","Error during retrieval of option value: %s" -"Ext. Price","Ext. Price" "Failed to confirm customer account.","Failed to confirm customer account." "Fax","Fax" "First Name","First Name" @@ -149,9 +145,7 @@ "General Subscription","General Subscription" "Generate Human-Friendly Customer ID","Generate Human-Friendly Customer ID" "Global","Global" -"Go to Address Book","Go to Address Book" "Grand Total","Grand Total" -"Grand Total: %s","Grand Total: %s" "Group","Group" "Group ""%s"" can not be deleted","Group ""%s"" can not be deleted" "Group Information","Group Information" @@ -171,12 +165,9 @@ "Invalid login or password.","Invalid login or password." "Invalid option id specified for %s (%s), skipping the record","Invalid option id specified for %s (%s), skipping the record" "Invalid store specified, skipping the record","Invalid store specified, skipping the record" -"Items Order","Items Order" -"Last 5 Orders","Last 5 Orders" "Last Activity","Last Activity" "Last Name","Last Name" "Last Url","Last Url" -"Last Viewed Items","Last Viewed Items" "Last date subscribed","Last date subscribed" "Last date unsubscribed","Last date unsubscribed" "Last name can\'t be empty","Last name can\'t be empty" @@ -199,12 +190,8 @@ "Missing lastname, skipping the record","Missing lastname, skipping the record" "Month","Month" "My Account","My Account" -"My Account Dashboard","My Account Dashboard" "My Dashboard","My Dashboard" "My Orders","My Orders" -"My Reviews","My Reviews" -"My Tags","My Tags" -"My Wishlist","My Wishlist" "Name","Name" "Name and Address Options","Name and Address Options" "Never","Never" @@ -230,8 +217,8 @@ "Newsletters","Newsletters" "No Items Found","No Items Found" "No Newsletter Found","No Newsletter Found" +"No customer collections found","No customer collections found" "No item specified.","No item specified." -"No product collections found","No product collections found" "Not Sent","Not Sent" "Not confirmed, can login","Not confirmed, can login" "Not confirmed, cannot login","Not confirmed, cannot login" @@ -242,8 +229,6 @@ "Online Customers Options","Online Customers Options" "Online Minutes Interval","Online Minutes Interval" "Order #","Order #" -"Order #%s (%s)","Order #%s (%s)" -"Order List...","Order List..." "Order Total","Order Total" "Orders","Orders" "PDF","PDF" @@ -257,7 +242,6 @@ "Password must have at least 6 characters. Leading or trailing spaces will be ignored.","Password must have at least 6 characters. Leading or trailing spaces will be ignored." "Password:","Password:" "Paused","Paused" -"Payment Method","Payment Method" "Pending","Pending" "Per Website","Per Website" "Personal Information","Personal Information" @@ -321,8 +305,6 @@ "Shipped to First Name","Shipped to First Name" "Shipped to Last Name","Shipped to Last Name" "Shipped to Name","Shipped to Name" -"Shipping Information","Shipping Information" -"Shipping Method","Shipping Method" "Shopping Cart","Shopping Cart" "Shopping Cart - %d item(s)","Shopping Cart - %d item(s)" "Show Tax/VAT number","Show Tax/VAT number" @@ -332,7 +314,6 @@ "Show prefix","Show prefix" "Show suffix","Show suffix" "Sign Up for Newsletter","Sign Up for Newsletter" -"Sign up for our newsletter","Sign up for our newsletter" "Skip import row, required field ""%s"" not defined","Skip import row, required field ""%s"" not defined" "Skip import row, website ""%s"" field not exists","Skip import row, website ""%s"" field not exists" "State/Province","State/Province" @@ -343,7 +324,6 @@ "Street Address ","Street Address " "Subject","Subject" "Submit","Submit" -"Subscribe","Subscribe" "Subscribe to newsletter","Subscribe to newsletter" "Subscribed to Newsletter?","Subscribed to Newsletter?" "Suffix","Suffix" @@ -387,7 +367,6 @@ "User description","User description" "View","View" "View Order","View Order" -"View Order List","View Order List" "Visible In","Visible In" "Visitor","Visitor" "Visitors Only","Visitors Only" @@ -398,7 +377,6 @@ "Wrong confirmation key.","Wrong confirmation key." "Wrong customer account specified.","Wrong customer account specified." "Wrong email.","Wrong email." -"Wrong region id by selected country","Wrong region id by selected country" "Wrong transactional account email type.","Wrong transactional account email type." "XML","XML" "YYYY","YYYY" diff --git a/app/locale/en_US/Mage_Cybermut.csv b/app/locale/en_US/Mage_Cybermut.csv deleted file mode 100644 index 77c0590bdf..0000000000 --- a/app/locale/en_US/Mage_Cybermut.csv +++ /dev/null @@ -1,35 +0,0 @@ -" There was an error occurred during paying process."," There was an error occurred during paying process." -"Bank","Bank" -"Credit Mutuel","Credit Mutuel" -"Customer Interface language","Customer Interface language" -"Customer returned from Cybermut.","Customer returned from Cybermut." -"Customer successfully returned from Cybermut","Customer successfully returned from Cybermut" -"Customer was redirected to Cybermut","Customer was redirected to Cybermut" -"Debug","Debug" -"Dutch","Dutch" -"Enabled","Enabled" -"English","English" -"Error occured","Error occured" -"French","French" -"German","German" -"Groupe CIC","Groupe CIC" -"Italian","Italian" -"Key","Key" -"New order status","New order status" -"OBC","OBC" -"Order #%s","Order #%s" -"Order number will be used if left empty","Order number will be used if left empty" -"Payment from Specific countries","Payment from Specific countries" -"Payment from applicable countries","Payment from applicable countries" -"Returned MAC is invalid. Order cancelled.","Returned MAC is invalid. Order cancelled." -"SHA key","SHA key" -"Site code","Site code" -"Sort order","Sort order" -"Spain","Spain" -"TPE number","TPE number" -"Test mode","Test mode" -"There was an error occurred during paying process.","There was an error occurred during paying process." -"Title","Title" -"Transaction Description","Transaction Description" -"You will be redirected to Cybermut in a few seconds.","You will be redirected to Cybermut in a few seconds." -"You will be redirected to Cybermut website when you place an order.","You will be redirected to Cybermut website when you place an order." diff --git a/app/locale/en_US/Mage_Cybersource.csv b/app/locale/en_US/Mage_Cybersource.csv deleted file mode 100644 index b14897aca0..0000000000 --- a/app/locale/en_US/Mage_Cybersource.csv +++ /dev/null @@ -1,41 +0,0 @@ -"Authorization","Authorization" -"Card Verification Number","Card Verification Number" -"Credit Card Number","Credit Card Number" -"Credit Card Number: xxxx-%s","Credit Card Number: xxxx-%s" -"Credit Card Type","Credit Card Type" -"Credit Card Type: %s","Credit Card Type: %s" -"Credit Card Types","Credit Card Types" -"Credit Card Verification","Credit Card Verification" -"Cybersource (SOAP Toolkit)","Cybersource (SOAP Toolkit)" -"Debug","Debug" -"Enabled","Enabled" -"Error in refunding the payment","Error in refunding the payment" -"Expiration Date","Expiration Date" -"Gateway request error: %s","Gateway request error: %s" -"Invalid transaction id or token","Invalid transaction id or token" -"Issue Number","Issue Number" -"JCB","JCB" -"Laser","Laser" -"Maestro (International)","Maestro (International)" -"Maestro/Solo(UK Domestic)","Maestro/Solo(UK Domestic)" -"Merchant ID","Merchant ID" -"Name on Card","Name on Card" -"Name on the Card: %s","Name on the Card: %s" -"New order status","New order status" -"Payment Action","Payment Action" -"Payment from Specific countries","Payment from Specific countries" -"Payment from applicable countries","Payment from applicable countries" -"SOAP extension is not enabled. Please contact us.","SOAP extension is not enabled. Please contact us." -"Sale","Sale" -"Security Key","Security Key" -"Sort order","Sort order" -"Start Date","Start Date" -"Switch/Solo/Maestro(UK Domestic) Only","Switch/Solo/Maestro(UK Domestic) Only" -"Switch/Solo/Maestro(UK Domestic) card issue number: %s","Switch/Solo/Maestro(UK Domestic) card issue number: %s" -"Switch/Solo/Maestro(UK Domestic) card start Date: %s/%s","Switch/Solo/Maestro(UK Domestic) card start Date: %s/%s" -"Test mode","Test mode" -"There is an error in processing payment. Please try again or contact us.","There is an error in processing payment. Please try again or contact us." -"Title","Title" -"UATP","UATP" -"What is this?","What is this?" -"Year","Year" diff --git a/app/locale/en_US/Mage_Downloadable.csv b/app/locale/en_US/Mage_Downloadable.csv index 4a38d24deb..ac08670201 100644 --- a/app/locale/en_US/Mage_Downloadable.csv +++ b/app/locale/en_US/Mage_Downloadable.csv @@ -1,8 +1,6 @@ "Add New Row","Add New Row" "An error occurred while saving the file(s).","An error occurred while saving the file(s)." "Availability:","Availability:" -"Availability: In stock.","Availability: In stock." -"Availability: Out of stock.","Availability: Out of stock." "Back","Back" "Can\'t connect to remote host, error: %s","Can\'t connect to remote host, error: %s" "Canceled","Canceled" @@ -51,7 +49,6 @@ "Refunded","Refunded" "Remaining Downloads","Remaining Downloads" "Remove Item","Remove Item" -"Remove item","Remove item" "Requested link doesn't exist.","Requested link doesn't exist." "Sample","Sample" "Shareable","Shareable" diff --git a/app/locale/en_US/Mage_Eway.csv b/app/locale/en_US/Mage_Eway.csv deleted file mode 100644 index 02273d28b2..0000000000 --- a/app/locale/en_US/Mage_Eway.csv +++ /dev/null @@ -1,38 +0,0 @@ -"API Gateway URL","API Gateway URL" -"Accepted currency","Accepted currency" -"Card Verification Number","Card Verification Number" -"Credit Card Number","Credit Card Number" -"Credit Card Number: xxxx-%s","Credit Card Number: xxxx-%s" -"Credit Card Type","Credit Card Type" -"Credit Card Type: %s","Credit Card Type: %s" -"Credit Card Types","Credit Card Types" -"Credit Card Verification","Credit Card Verification" -"Customer ID","Customer ID" -"Customer successfully returned from eWAY","Customer successfully returned from eWAY" -"Customer was redirected to eWAY.","Customer was redirected to eWAY." -"Customer was rejected by eWAY","Customer was rejected by eWAY" -"Debug Flag","Debug Flag" -"Enabled","Enabled" -"Error occured","Error occured" -"Expiration Date","Expiration Date" -"Name on Card","Name on Card" -"Name on the Card: %s","Name on the Card: %s" -"New order status","New order status" -"Payment from Specific countries","Payment from Specific countries" -"Payment from applicable countries","Payment from applicable countries" -"Please continue shopping.","Please continue shopping." -"Please Select","Please Select" -"Selected currency code (","Selected currency code (" -"Sort order","Sort order" -"There has been an error processing your payment.","There has been an error processing your payment." -"There has been an error processing your payment. Please try later or contact us for help.","There has been an error processing your payment. Please try later or contact us for help." -"Title","Title" -"Use Beagle Anti-Fraud","Use Beagle Anti-Fraud" -"What is this?","What is this?" -"You will be redirected to eWAY 3D-Secure in a few seconds.","You will be redirected to eWAY 3D-Secure in a few seconds." -"You will be redirected to eWAY 3D-Secure website when you place an order.","You will be redirected to eWAY 3D-Secure website when you place an order." -"You will be redirected to eWAY in a few seconds.","You will be redirected to eWAY in a few seconds." -"You will be redirected to eWAY website when you place an order.","You will be redirected to eWAY website when you place an order." -"eWAY 3D-Secure","eWAY 3D-Secure" -"eWAY Direct","eWAY Direct" -"eWAY Shared","eWAY Shared" diff --git a/app/locale/en_US/Mage_Flo2Cash.csv b/app/locale/en_US/Mage_Flo2Cash.csv deleted file mode 100644 index a74bfe0746..0000000000 --- a/app/locale/en_US/Mage_Flo2Cash.csv +++ /dev/null @@ -1,27 +0,0 @@ -"Account number","Account number" -"Card Verification Number","Card Verification Number" -"Credit Card Number","Credit Card Number" -"Credit Card Number: xxxx-%s","Credit Card Number: xxxx-%s" -"Credit Card Type","Credit Card Type" -"Credit Card Type: %s","Credit Card Type: %s" -"Credit Card Types","Credit Card Types" -"Credit Card Verification","Credit Card Verification" -"Debug Flag","Debug Flag" -"Demo mode","Demo mode" -"Enabled","Enabled" -"Expiration Date","Expiration Date" -"Flo2Cash Payment Web Service","Flo2Cash Payment Web Service" -"For Authorize or Capture Transactions only","For Authorize or Capture Transactions only" -"For Purchase Transactions only","For Purchase Transactions only" -"Name on Card","Name on Card" -"Name on the Card: %s","Name on the Card: %s" -"New order status","New order status" -"Password","Password" -"Payment Action","Payment Action" -"Payment from Specific countries","Payment from Specific countries" -"Payment from applicable countries","Payment from applicable countries" -"Please Select","Please Select" -"Sort order","Sort order" -"Title","Title" -"Username","Username" -"What is this?","What is this?" diff --git a/app/locale/en_US/Mage_GiftMessage.csv b/app/locale/en_US/Mage_GiftMessage.csv index e8068f14bc..81c4837537 100644 --- a/app/locale/en_US/Mage_GiftMessage.csv +++ b/app/locale/en_US/Mage_GiftMessage.csv @@ -1,29 +1,21 @@ -"* Required Fields","* Required Fields" "Add","Add" -"Add Gift Message","Add Gift Message" "Allow Gift Messages for Order Items","Allow Gift Messages for Order Items" "Allow Gift Messages on Order Level","Allow Gift Messages on Order Level" "Are you sure?","Are you sure?" -"Cancel","Cancel" "Check this checkbox if you want to add gift messages to your items.","Check this checkbox if you want to add gift messages to your items." "Check this checkbox if you want to add gift messages.","Check this checkbox if you want to add gift messages." -"Close","Close" "Do you have any gift items in your order?","Do you have any gift items in your order?" "Edit","Edit" -"Edit Gift Message","Edit Gift Message" "Enter a gift message for each item in your order.","Enter a gift message for each item in your order." "Enter a gift message for entire order.","Enter a gift message for entire order." "Enter a gift message for this address.","Enter a gift message for this address." "Error while saving gift message","Error while saving gift message" "From","From" -"Gift Message","Gift Message" "Gift Messages","Gift Messages" "Gift message has been successfully saved","Gift message has been successfully saved" "Item %d of %d","Item %d of %d" "Message","Message" "No","No" -"Remove","Remove" -"Save","Save" "Save Gift Message","Save Gift Message" "To","To" "Unknown entity type","Unknown entity type" @@ -32,7 +24,5 @@ "You can leave a box blank if you don\'t wish to add a gift message for the item.","You can leave a box blank if you don\'t wish to add a gift message for the item." "You can leave a box blank if you don\'t wish to add a gift message for this address.","You can leave a box blank if you don\'t wish to add a gift message for this address." "You can leave a box blank if you don\'t wish to add a gift message for whole order.","You can leave a box blank if you don\'t wish to add a gift message for whole order." -"Your gift message has been successfully removed","Your gift message has been successfully removed" -"Your gift message has been successfully saved","Your gift message has been successfully saved" "Your gift message successfully removed","Your gift message successfully removed" "Your gift message successfully saved","Your gift message successfully saved" diff --git a/app/locale/en_US/Mage_GoogleBase.csv b/app/locale/en_US/Mage_GoogleBase.csv index fcfd3761cb..2b6b1542aa 100644 --- a/app/locale/en_US/Mage_GoogleBase.csv +++ b/app/locale/en_US/Mage_GoogleBase.csv @@ -18,6 +18,7 @@ "Cannot update Google Base Item for Store '%s'","Cannot update Google Base Item for Store '%s'" "Captcha confirmation error: %s","Captcha confirmation error: %s" "Captcha confirmed successfully","Captcha confirmed successfully" +"Catalog","Catalog" "Clicks","Clicks" "ClientLogin","ClientLogin" "Confirm","Confirm" @@ -38,6 +39,7 @@ "Google Base Item Type","Google Base Item Type" "Google Base Item type","Google Base Item type" "Google Base Items","Google Base Items" +"Google base","Google base" "Hide","Hide" "Hosted","Hosted" "Hosted or Google","Hosted or Google" @@ -52,6 +54,7 @@ "Manage Attributes","Manage Attributes" "Manage Items","Manage Items" "New Item Type","New Item Type" +"New ItemType","New ItemType" "No","No" "No items were deleted from Google Base","No items were deleted from Google Base" "No items were published","No items were published" @@ -65,6 +68,7 @@ "Published","Published" "Remove","Remove" "Save Mapping","Save Mapping" +"Session expired during export. Please, revise exported products and repeat a process if necessary","Session expired during export. Please, revise exported products and repeat a process if necessary" "Synchronize","Synchronize" "Target Country","Target Country" "This action will update items statistics and remove the items which are not available in Google Base. Continue?","This action will update items statistics and remove the items which are not available in Google Base. Continue?" diff --git a/app/locale/en_US/Mage_Ideal.csv b/app/locale/en_US/Mage_Ideal.csv deleted file mode 100644 index 61f16c6611..0000000000 --- a/app/locale/en_US/Mage_Ideal.csv +++ /dev/null @@ -1,60 +0,0 @@ -"Absolute path to private certificate file","Absolute path to private certificate file" -"Absolute path to private key file","Absolute path to private key file" -"Absolute path to public payment provider certificate file","Absolute path to public payment provider certificate file" -"An error occurred while processing your iDEAL transaction. Please contact the web shop or try again later. Transaction number is %s.","An error occurred while processing your iDEAL transaction. Please contact the web shop or try again later. Transaction number is %s." -"Begin to check transaction status if order was made {N} hours ago","Begin to check transaction status if order was made {N} hours ago" -"Check Begin","Check Begin" -"Check End","Check End" -"Customer canceled payment.","Customer canceled payment." -"Customer cancelled payment","Customer cancelled payment" -"Customer successfully returned from iDEAL","Customer successfully returned from iDEAL" -"Customer was redirected to iDEAL","Customer was redirected to iDEAL" -"Customer was redirected to iDEAL. Please, check the status of a transaction via the ING iDEAL Dashboard before delivery of the goods purchased.","Customer was redirected to iDEAL. Please, check the status of a transaction via the ING iDEAL Dashboard before delivery of the goods purchased." -"Customer was rejected by iDEAL","Customer was rejected by iDEAL" -"Customer was returned from iDEAL.","Customer was returned from iDEAL." -"Debug","Debug" -"Don't check transaction status if order older than {N} days","Don't check transaction status if order older than {N} days" -"Dutch","Dutch" -"Enabled","Enabled" -"English","English" -"Error occured","Error occured" -"Error occured with transaction %s.","Error occured with transaction %s." -"Error occured. You will be redirected back to store.","Error occured. You will be redirected back to store." -"Ideal: %s","Ideal: %s" -"In minutes. Minimum is 1 minute and maximum is 60.","In minutes. Minimum is 1 minute and maximum is 60." -"Issuer","Issuer" -"Issuer: %s","Issuer: %s" -"Language","Language" -"Leave empty for default value","Leave empty for default value" -"Merchant ID","Merchant ID" -"Merchant Key","Merchant Key" -"New order status","New order status" -"Notification from iDEAL was recived with status %s.","Notification from iDEAL was recived with status %s." -"Notification from iDEAL was recived with status %s. Invoice was created. Please, check the status of a transaction via the ING iDEAL Dashboard before delivery of the goods purchased.","Notification from iDEAL was recived with status %s. Invoice was created. Please, check the status of a transaction via the ING iDEAL Dashboard before delivery of the goods purchased." -"Payment from Specific countries","Payment from Specific countries" -"Payment from applicable countries","Payment from applicable countries" -"Payment was canceled by customer","Payment was canceled by customer" -"Please continue shopping.","Please continue shopping." -"Please Select","Please Select" -"Private Certificate","Private Certificate" -"Private Key","Private Key" -"Private Key Password","Private Key Password" -"Required fields missing","Required fields missing" -"Secure URL (production)","Secure URL (production)" -"Secure URL (test mode)","Secure URL (test mode)" -"Selected currency code (%s) is not compatible with iDEAL","Selected currency code (%s) is not compatible with iDEAL" -"Sort order","Sort order" -"Store name will be used if left empty","Store name will be used if left empty" -"Test Mode","Test Mode" -"Title","Title" -"Transaction Description","Transaction Description" -"Transaction Expire Period","Transaction Expire Period" -"Transaction Status Update: cancelled by customer","Transaction Status Update: cancelled by customer" -"Transaction Status Update: finished successfully","Transaction Status Update: finished successfully" -"Transaction Status Update: rejected by iDEAL","Transaction Status Update: rejected by iDEAL" -"You will be redirected to bank in a few seconds.","You will be redirected to bank in a few seconds." -"You will be redirected to iDEAL in a few seconds.","You will be redirected to iDEAL in a few seconds." -"You will be redirected to website of your bank when you place an order.","You will be redirected to website of your bank when you place an order." -"iDEAL Advanced","iDEAL Advanced" -"iDEAL Basic","iDEAL Basic" -"iDEAL Certificate","iDEAL Certificate" diff --git a/app/locale/en_US/Mage_Index.csv b/app/locale/en_US/Mage_Index.csv index 79fba3b983..e610ab2aaa 100644 --- a/app/locale/en_US/Mage_Index.csv +++ b/app/locale/en_US/Mage_Index.csv @@ -4,4 +4,3 @@ "Enable","Enable" "One or more of the Indexes are not up to date:","One or more of the Indexes are not up to date:" "Refresh","Refresh" -"Refresh Recent","Refresh Recent" diff --git a/app/locale/en_US/Mage_Newsletter.csv b/app/locale/en_US/Mage_Newsletter.csv index 00aabc639e..aceb8ba5b8 100644 --- a/app/locale/en_US/Mage_Newsletter.csv +++ b/app/locale/en_US/Mage_Newsletter.csv @@ -47,7 +47,7 @@ "Newsletter Problem Reports","Newsletter Problem Reports" "Newsletter Queue","Newsletter Queue" "Newsletter Section","Newsletter Section" -"Newsletter Sign-up","Newsletter Sign-up" +"Newsletter Sign-up:","Newsletter Sign-up:" "Newsletter Subscribers","Newsletter Subscribers" "Newsletter Subscription","Newsletter Subscription" "Newsletter Subscriptions","Newsletter Subscriptions" @@ -89,7 +89,6 @@ "Sender Name","Sender Name" "Sending","Sending" "Sent","Sent" -"Sign me up","Sign me up" "Sign up for our newsletter","Sign up for our newsletter" "Sign up for our newsletter:","Sign up for our newsletter:" "Start","Start" @@ -97,6 +96,7 @@ "Store","Store" "Store View","Store View" "Subject","Subject" +"Submit","Submit" "Subscribe","Subscribe" "Subscribed","Subscribed" "Subscriber","Subscriber" diff --git a/app/locale/en_US/Mage_Ogone.csv b/app/locale/en_US/Mage_Ogone.csv deleted file mode 100644 index 9eb3916eb7..0000000000 --- a/app/locale/en_US/Mage_Ogone.csv +++ /dev/null @@ -1,76 +0,0 @@ -" - Use in posting data from Magento to Ogone.
- Use in data checking by Ogone before the payment. - "," - Use in posting data from Magento to Ogone.
- Use in data checking by Ogone before the payment. - " -" - Use in posting data from Ogone to Magento.
- Use in Feedback data checking by Magento - "," - Use in posting data from Ogone to Magento.
- Use in Feedback data checking by Magento - " -"Authorization","Authorization" -"Authorization Waiting from Ogone","Authorization Waiting from Ogone" -"Authorization not known: A technical problem arose during authorization process, giving unpredictable result","Authorization not known: A technical problem arose during authorization process, giving unpredictable result" -"Background color of Ogone Template","Background color of Ogone Template" -"Button background color of the Ogone Template","Button background color of the Ogone Template" -"Button text color of the Ogone Template","Button text color of the Ogone Template" -"Cancelled Ogone","Cancelled Ogone" -"Debug","Debug" -"Declined Ogone","Declined Ogone" -"Declined Order on ogone side","Declined Order on ogone side" -"Direct Sale","Direct Sale" -"Enabled","Enabled" -"Exception not defined","Exception not defined" -"Font Family of the Ogone Template","Font Family of the Ogone Template" -"For production, replace ""test"" with ""prod"" Example: https://secure.ogone.com/ncol/prod/orderstandard.asp","For production, replace ""test"" with ""prod"" Example: https://secure.ogone.com/ncol/prod/orderstandard.asp" -"Gateway URL","Gateway URL" -"Hash is not valid","Hash is not valid" -"Horizontally grouped logo with group name on left","Horizontally grouped logo with group name on left" -"Horizontally grouped logo with no group name","Horizontally grouped logo with no group name" -"If you choose ""No Operation"", Ogone will use default Payment procedure setup in Ogone configuration","If you choose ""No Operation"", Ogone will use default Payment procedure setup in Ogone configuration" -"If you choose ""Ogone Template"", you will need to fill in all the following fields.","If you choose ""Ogone Template"", you will need to fill in all the following fields." -"Layout of Payment Methods","Layout of Payment Methods" -"Logo of the Ogone Template","Logo of the Ogone Template" -"Magento","Magento" -"Ogone","Ogone" -"Ogone default Operation","Ogone default Operation" -"Order can not be canceled for system reason","Order can not be canceled for system reason" -"Order can not be save for system reason","Order can not be save for system reason" -"Order can\'t save","Order can\'t save" -"Order canceled on ogone side","Order canceled on ogone side" -"Order is not valid","Order is not valid" -"PSPID","PSPID" -"Payment Action","Payment Action" -"Payment Template","Payment Template" -"Payment transaction has been declined.","Payment transaction has been declined." -"Payment uncertain: A technical problem arose during payment process, giving unpredictable result","Payment uncertain: A technical problem arose during payment process, giving unpredictable result" -"Pending Ogone","Pending Ogone" -"Please, wait a moment. This page will transfer your data to Ogone payment gateway in a few seconds.","Please, wait a moment. This page will transfer your data to Ogone payment gateway in a few seconds." -"Processed Ogone Payment","Processed Ogone Payment" -"Processed by Ogone","Processed by Ogone" -"Processing Ogone Payment","Processing Ogone Payment" -"SHA Signature (used by Magento)","SHA Signature (used by Magento)" -"SHA Signature (used by Ogone)","SHA Signature (used by Ogone)" -"Start ogone processing","Start ogone processing" -"Table background color of the Ogone Template","Table background color of the Ogone Template" -"Table text color of the Ogone Template","Table text color of the Ogone Template" -"Text Color of the Ogone Template","Text Color of the Ogone Template" -"Title","Title" -"Title of the Ogone Template","Title of the Ogone Template" -"URL/filename of the logo. -
The URL must be absolute and stored on a secure server. - ","URL/filename of the logo. -
The URL must be absolute and stored on a secure server. - " -"Unknown exception","Unknown exception" -"Verical list","Verical list" -"Waiting Authorization","Waiting Authorization" -"You can arrange the layout/list of the payment methods on Ogone payment page","You can arrange the layout/list of the payment methods on Ogone payment page" -"You will be redirected to Ogone website when you place an order.","You will be redirected to Ogone website when you place an order." -"e.g: Verdana","e.g: Verdana" -"e.g: black","e.g: black" -"e.g: white","e.g: white" diff --git a/app/locale/en_US/Mage_Oscommerce.csv b/app/locale/en_US/Mage_Oscommerce.csv deleted file mode 100644 index 59dfe0f040..0000000000 --- a/app/locale/en_US/Mage_Oscommerce.csv +++ /dev/null @@ -1,124 +0,0 @@ -"%s Store","%s Store" -"About Your Order","About Your Order" -"Account Information","Account Information" -"Adapter Name","Adapter Name" -"Arabic","Arabic" -"Back","Back" -"Back to My Orders","Back to My Orders" -"Baltic","Baltic" -"Billing Address","Billing Address" -"Billing to Name","Billing to Name" -"Categories","Categories" -"Category %s cannot be saved because of %s","Category %s cannot be saved because of %s" -"Central European","Central European" -"Check requirements!","Check requirements!" -"Comments History","Comments History" -"Create under default website","Create under default website" -"Created At","Created At" -"Currency","Currency" -"Customer Name","Customer Name" -"Customers","Customers" -"Cyrillic","Cyrillic" -"DB Name","DB Name" -"DB Password","DB Password" -"DB Username","DB Username" -"Data has been successfully imported","Data has been successfully imported" -"Database Connection Charset","Database Connection Charset" -"Database Data Charset","Database Data Charset" -"Date","Date" -"Db Name","Db Name" -"Delete Profile","Delete Profile" -"Delivery Address","Delivery Address" -"East Asian","East Asian" -"Edit osCommerce Profile","Edit osCommerce Profile" -"Edit osCommerce Profile :: %s","Edit osCommerce Profile :: %s" -"Email","Email" -"Email %s cannot be saved because of %s","Email %s cannot be saved because of %s" -"Error for checking store locale!","Error for checking store locale!" -"Final Price","Final Price" -"Finished profile execution.","Finished profile execution." -"General Information","General Information" -"Greek","Greek" -"Hebrew","Hebrew" -"ID","ID" -"IP or Hostname","IP or Hostname" -"Import Options","Import Options" -"Importing...","Importing..." -"Items Ordered","Items Ordered" -"Japanese","Japanese" -"Korean","Korean" -"Locale Selection","Locale Selection" -"My Previous Orders","My Previous Orders" -"Name","Name" -"Need to check Customers for Orders","Need to check Customers for Orders" -"New osCommerce Profile","New osCommerce Profile" -"No osCommerce profile","No osCommerce profile" -"No osCommerce profile loaded...","No osCommerce profile loaded..." -"Notice: Please place all images under MAGENTO_ROOT/media/import/ with writable permission to all files including sub folders.","Notice: Please place all images under MAGENTO_ROOT/media/import/ with writable permission to all files including sub folders." -"Order","Order" -"Order #","Order #" -"Order # %s","Order # %s" -"Order #%s failed to import because the customer ID #%s associated with this order could not be found.","Order #%s failed to import because the customer ID #%s associated with this order could not be found." -"Order Date","Order Date" -"Order Date:","Order Date:" -"Order Status","Order Status" -"Order Total","Order Total" -"Order Totals","Order Totals" -"Orders","Orders" -"Payment Information","Payment Information" -"Please check at least an option in Import Options\n","Please check at least an option in Import Options\n" -"Please check default website or input website code in General Information\n","Please check default website or input website code in General Information\n" -"Please select a timezone\n","Please select a timezone\n" -"Port (Default as 3306)","Port (Default as 3306)" -"Prefix","Prefix" -"Price","Price" -"Product","Product" -"Product Name","Product Name" -"Products","Products" -"Purchased Date","Purchased Date" -"Purchased Month","Purchased Month" -"Purchased Year","Purchased Year" -"Qty","Qty" -"Qty Ordered","Qty Ordered" -"Root category for %s","Root category for %s" -"Run Profile","Run Profile" -"SKU","SKU" -"SKU %s cannot be saved because of %s","SKU %s cannot be saved because of %s" -"Sales","Sales" -"Save And Continue Edit","Save And Continue Edit" -"Save Profile","Save Profile" -"Select a connection charset","Select a connection charset" -"Select a data charset","Select a data charset" -"Select a timezone","Select a timezone" -"Select a website","Select a website" -"Send subscription notify to customers","Send subscription notify to customers" -"Ship to","Ship to" -"Ship to Name","Ship to Name" -"Shipping & Handling Information","Shipping & Handling Information" -"Shipping Address","Shipping Address" -"Shipping Method","Shipping Method" -"Simplified Chinese","Simplified Chinese" -"South Asian","South Asian" -"Start Runing!","Start Runing!" -"Starting profile execution, please wait...","Starting profile execution, please wait..." -"Subtotal","Subtotal" -"Thai","Thai" -"This order no longer exists.","This order no longer exists." -"Timezone","Timezone" -"To import orders, Magento requires that customers also be imported.","To import orders, Magento requires that customers also be imported." -"Total imported %s records (%s)","Total imported %s records (%s)" -"Traditional Chinese","Traditional Chinese" -"Unicode","Unicode" -"Updated At","Updated At" -"View Order","View Order" -"Warning: Please don't close window during importing/exporting data","Warning: Please don't close window during importing/exporting data" -"Website Code","Website Code" -"Western","Western" -"languages table error ","languages table error " -"osCommerce","osCommerce" -"osCommerce Orders","osCommerce Orders" -"osCommerce Profile","osCommerce Profile" -"osCommerce Profile was successfully saved","osCommerce Profile was successfully saved" -"osCommerce profile was deleted","osCommerce profile was deleted" -"processed %s%% %s/%s records","processed %s%% %s/%s records" -"records","records" diff --git a/app/locale/en_US/Mage_Page.csv b/app/locale/en_US/Mage_Page.csv index 2246749beb..4ea9060058 100644 --- a/app/locale/en_US/Mage_Page.csv +++ b/app/locale/en_US/Mage_Page.csv @@ -33,6 +33,7 @@ "Drag to move","Drag to move" "Empty","Empty" "For latest version visit: %s","For latest version visit: %s" +"Free Shipping on orders over 50$","Free Shipping on orders over 50$" "Go Today","Go Today" "Help Us to Keep Magento Healthy","Help Us to Keep Magento Healthy" "Interface Language","Interface Language" @@ -55,17 +56,12 @@ "Select Store:","Select Store:" "Select date","Select date" "Show","Show" -"Skip to Footer","Skip to Footer" -"Skip to Left Column","Skip to Left Column" -"Skip to Main Content","Skip to Main Content" -"Skip to Right Column","Skip to Right Column" "This is a demo store. Any orders placed through this store will not be honored or fulfilled.","This is a demo store. Any orders placed through this store will not be honored or fulfilled." "Time selection:","Time selection:" "Time:","Time:" "We detected that your JavaScript seem to be disabled.","We detected that your JavaScript seem to be disabled." "Welcome, %s!","Welcome, %s!" "You must have JavaScript enabled in your browser to utilize the functionality of this website.","You must have JavaScript enabled in your browser to utilize the functionality of this website." -"You're currently on:","You're currently on:" "Your Language","Your Language" "Your Language:","Your Language:" "per page","per page" diff --git a/app/locale/en_US/Mage_Paybox.csv b/app/locale/en_US/Mage_Paybox.csv deleted file mode 100644 index 27ced1aab0..0000000000 --- a/app/locale/en_US/Mage_Paybox.csv +++ /dev/null @@ -1,106 +0,0 @@ -"--Please Select--","--Please Select--" -"AMEX","AMEX" -"AURORE","AURORE" -"Activated Key","Activated Key" -"Amount is not match.","Amount is not match." -"Authorization","Authorization" -"CARTE","CARTE" -"CB","CB" -"Cann\'t create invoice","Cann\'t create invoice" -"Card Verification Number","Card Verification Number" -"Cart Type","Cart Type" -"Command Line Mode","Command Line Mode" -"Credit Card Number","Credit Card Number" -"Credit Card Number: xxxx-%s","Credit Card Number: xxxx-%s" -"Credit Card Type","Credit Card Type" -"Credit Card Type: %s","Credit Card Type: %s" -"Credit Card Types","Credit Card Types" -"Customer Choise","Customer Choise" -"Customer successfully returned from Paybox","Customer successfully returned from Paybox" -"Customer was redirected to Paybox","Customer was redirected to Paybox" -"Customer was redirected to Paybox using \'command line\' mode","Customer was redirected to Paybox using \'command line\' mode" -"Customer was refuse by Paybox","Customer was refuse by Paybox" -"Customer was rejected by Paybox","Customer was rejected by Paybox" -"DEU (German)","DEU (German)" -"DINERS","DINERS" -"Debug Flag","Debug Flag" -"Delay in displaying the intermediary page (in msec)","Delay in displaying the intermediary page (in msec)" -"E CARD","E CARD" -"ESP (Spanish)","ESP (Spanish)" -"EUROCARD & MASTERCARD","EUROCARD & MASTERCARD" -"Enabled","Enabled" -"Error in refunding the payment","Error in refunding the payment" -"Error occured","Error occured" -"Expiration Date","Expiration Date" -"FRA (French)","FRA (French)" -"GBR (English)","GBR (English)" -"GET","GET" -"HTML form","HTML form" -"ITA (Italian)","ITA (Italian)" -"Invoice was create successfully","Invoice was create successfully" -"JCB","JCB" -"Language of the payment page","Language of the payment page" -"Management mode of the intermediary page","Management mode of the intermediary page" -"Mode A","Mode A" -"Mode B","Mode B" -"Mode C","Mode C" -"Mode D","Mode D" -"Mode E","Mode E" -"Mode of retrieval of information","Mode of retrieval of information" -"NLD (Dutch)","NLD (Dutch)" -"Name of the button on the intermediary page","Name of the button on the intermediary page" -"Name on Card","Name on Card" -"Name on the Card: %s","Name on the Card: %s" -"New order status","New order status" -"Only if you HTML From mode selected","Only if you HTML From mode selected" -"Only with 'Command Line' mode","Only with 'Command Line' mode" -"Order is not match.","Order is not match." -"Order was canceled by customer","Order was canceled by customer" -"PAYBOX identifier","PAYBOX identifier" -"PAYNOVA","PAYNOVA" -"PAYPAL","PAYPAL" -"POST","POST" -"Paybox CGI file","Paybox CGI file" -"Paybox Direct","Paybox Direct" -"Paybox System","Paybox System" -"Paybox payment gateway is not available right now","Paybox payment gateway is not available right now" -"Payment","Payment" -"Payment Action","Payment Action" -"Payment Type","Payment Type" -"Payment from Specific countries","Payment from Specific countries" -"Payment from applicable countries","Payment from applicable countries" -"Ping Flag","Ping Flag" -"Please continue shopping.","Please continue shopping." -"Please Select","Please Select" -"Rank number","Rank number" -"SWE (Swedish)","SWE (Swedish)" -"SYMPASS","SYMPASS" -"Screen background of the intermediary page","Screen background of the intermediary page" -"Site number (TPE)","Site number (TPE)" -"Sort order","Sort order" -"Specify the URL of the primary backup payment server if different from default","Specify the URL of the primary backup payment server if different from default" -"Specify the URL of the primary payment server if different from default","Specify the URL of the primary payment server if different from default" -"Specify the URL of the second backup payment server if different from default","Specify the URL of the second backup payment server if different from default" -"Specify the URL of the third backup payment server if different from default","Specify the URL of the third backup payment server if different from default" -"TCP Port","TCP Port" -"TCP Port used to check the availability of a payment server if Ping Flag enabled (Default port is 443)","TCP Port used to check the availability of a payment server if Ping Flag enabled (Default port is 443)" -"TERMINEO","TERMINEO" -"Text on the intermediary page","Text on the intermediary page" -"The URL of the backup payment server","The URL of the backup payment server" -"The URL of the primary backup payment server","The URL of the primary backup payment server" -"The URL of the primary payment server","The URL of the primary payment server" -"The URL of the second backup payment server","The URL of the second backup payment server" -"The URL of the third backup payment server","The URL of the third backup payment server" -"There are no order.","There are no order." -"There has been an error processing your payment. ","There has been an error processing your payment. " -"There has been an error processing your payment. Please try later or contact us for help.","There has been an error processing your payment. Please try later or contact us for help." -"Time-out (in seconds) to check the avalaibility of the primary backup payment server (Default 10 seconds)","Time-out (in seconds) to check the avalaibility of the primary backup payment server (Default 10 seconds)" -"Time-out (in seconds) to check the avalaibility of the primary payment server (Default 8 seconds)","Time-out (in seconds) to check the avalaibility of the primary payment server (Default 8 seconds)" -"Time-out (in seconds) to check the avalaibility of the second backup payment server (Default 20 seconds)","Time-out (in seconds) to check the avalaibility of the second backup payment server (Default 20 seconds)" -"Time-out (in seconds) to check the avalaibility of the third backup payment server (Default 20 seconds)","Time-out (in seconds) to check the avalaibility of the third backup payment server (Default 20 seconds)" -"Timeout for checking","Timeout for checking" -"Title","Title" -"VISA","VISA" -"What is this?","What is this?" -"You will be redirected to Paybox in a few seconds.","You will be redirected to Paybox in a few seconds." -"You will be redirected to Paybox website when you place an order.","You will be redirected to Paybox website when you place an order." diff --git a/app/locale/en_US/Mage_Paygate.csv b/app/locale/en_US/Mage_Paygate.csv index 7bde271ae6..85c9bb6861 100644 --- a/app/locale/en_US/Mage_Paygate.csv +++ b/app/locale/en_US/Mage_Paygate.csv @@ -1,8 +1,10 @@ +"3D Secure Card Validation","3D Secure Card Validation" "API Login ID","API Login ID" "Accepted currency","Accepted currency" "Authorize Only","Authorize Only" "Authorize and Capture","Authorize and Capture" "Authorize.net","Authorize.net" +"Centinel API URL","Centinel API URL" "Credit Card Types","Credit Card Types" "Credit Card Verification","Credit Card Verification" "Debug","Debug" @@ -35,6 +37,7 @@ "Payment from applicable countries","Payment from applicable countries" "Proxy Host","Proxy Host" "Proxy Port","Proxy Port" +"Severe 3D Secure Card Validation","Severe 3D Secure Card Validation" "Sort order","Sort order" "TENDER","TENDER" "Test mode","Test mode" diff --git a/app/locale/en_US/Mage_Payment.csv b/app/locale/en_US/Mage_Payment.csv index 4cfd2766e4..66f179cb47 100644 --- a/app/locale/en_US/Mage_Payment.csv +++ b/app/locale/en_US/Mage_Payment.csv @@ -1,4 +1,6 @@ "--Please Select--","--Please Select--" +"3D Secure Card Validation","3D Secure Card Validation" +"3D Secure Credit Card Validation","3D Secure Credit Card Validation" " %s"," %s" ": %s",": %s" "Automatically invoice all items","Automatically invoice all items" @@ -7,39 +9,52 @@ "Cannot retrieve payment method instance","Cannot retrieve payment method instance" "Cannot retrieve payment method model object.","Cannot retrieve payment method model object." "Card Verification Number","Card Verification Number" +"Centinel API URL","Centinel API URL" "Check / Money order","Check / Money order" "Credit Card Number","Credit Card Number" -"Credit Card Number: %s","Credit Card Number: %s" "Credit Card Number: xxxx-%s","Credit Card Number: xxxx-%s" "Credit Card Type","Credit Card Type" "Credit Card Type: %s","Credit Card Type: %s" "Credit Card Types","Credit Card Types" -"Credit Card Verification","Credit Card Verification" "Enabled","Enabled" "Expiration Date","Expiration Date" "Expiration Date: %s/%s","Expiration Date: %s/%s" +"Issue Number","Issue Number" "Make Check payable to","Make Check payable to" "Make Check payable to: %s","Make Check payable to: %s" "Maximum Order Total","Maximum Order Total" +"Merchant Id","Merchant Id" "Minimum Order Total","Minimum Order Total" "Month","Month" +"N/A","N/A" "Name on Card","Name on Card" +"Name on the Card","Name on the Card" "Name on the Card: %s","Name on the Card: %s" "New order status","New order status" +"Not supported currency code %s.","Not supported currency code %s." +"Overrides API URL that may be specified by a Payment Method","Overrides API URL that may be specified by a Payment Method" +"Password","Password" "Payment ID: %s","Payment ID: %s" "Payment Methods","Payment Methods" "Payment Methods Section","Payment Methods Section" +"Payment Services","Payment Services" "Payment from Specific countries","Payment from Specific countries" "Payment from applicable countries","Payment from applicable countries" +"Processor Id","Processor Id" "Purchase Order Number","Purchase Order Number" "Purchase Order Number: %s","Purchase Order Number: %s" "Purchase order","Purchase order" +"Request Card Security Code","Request Card Security Code" "Saved CC","Saved CC" "Send Check to","Send Check to" "Send Check to:","Send Check to:" +"Severe 3D Secure Card Validation","Severe 3D Secure Card Validation" "Sort order","Sort order" -"Switch/Solo card issue number: %s","Switch/Solo card issue number: %s" -"Switch/Solo card start Date: %s/%s","Switch/Solo card start Date: %s/%s" +"Start Date","Start Date" +"Switch/Solo Issue Number","Switch/Solo Issue Number" +"Switch/Solo Only","Switch/Solo Only" +"Switch/Solo Start Date","Switch/Solo Start Date" +"Test Mode","Test Mode" "Title","Title" "What is this?","What is this?" "Year","Year" diff --git a/app/locale/en_US/Mage_Paypal.csv b/app/locale/en_US/Mage_Paypal.csv index d427d035c8..43169da6a6 100644 --- a/app/locale/en_US/Mage_Paypal.csv +++ b/app/locale/en_US/Mage_Paypal.csv @@ -1,16 +1,15 @@ -"150x50-pixel image displayed as your logo in the upper left corner of the PayPal checkout pages. https is highly encouraged.","150x50-pixel image displayed as your logo in the upper left corner of the PayPal checkout pages. https is highly encouraged." "2-pixel perimeter around the header space.","2-pixel perimeter around the header space." +"3D Secure Card Validation","3D Secure Card Validation" "Sign up for PayPal Merchant Account now!","Sign up for PayPal Merchant Account now!" "Sign up for PayPal Merchant Account now!
See Demo","Sign up for PayPal Merchant Account now!
See Demo" -"Warning! Customer will not be able to place Order, if the Credit Card didn't pass initial Enrollment by Centinel.","Warning! Customer will not be able to place Order, if the Credit Card didn't pass initial Enrollment by Centinel." "API Password","API Password" "API Signature","API Signature" "API Username","API Username" -"Aaddress Verification System Response","Aaddress Verification System Response" "Acceptance Mark","Acceptance Mark" "Acceptance Mark Image","Acceptance Mark Image" +"Address Verification System Response","Address Verification System Response" "All the address information matched","All the address information matched" "Allowable values: ""paypal"", ""primary"" (default), your_custom_value (a custom payment page style from your merchant account profile).","Allowable values: ""paypal"", ""primary"" (default), your_custom_value (a custom payment page style from your merchant account profile)." "Allowed Credit Card Types","Allowed Credit Card Types" @@ -28,11 +27,9 @@ "Business Account","Business Account" "Buttons Flavor (Website Payments Pro)","Buttons Flavor (Website Payments Pro)" "CVV2 Check Result by PayPal","CVV2 Check Result by PayPal" -"Centinel Electronic Commerce Indicator","Centinel Electronic Commerce Indicator" -"Centinel Visa Payer Authentication Service Result","Centinel Visa Payer Authentication Service Result" +"Centinel Api Custom URL","Centinel Api Custom URL" "Change Payment Method","Change Payment Method" "Change Shipping Address","Change Shipping Address" -"Checkout Flow","Checkout Flow" "Countries Payment Applicable From","Countries Payment Applicable From" "Customer failed to pay.","Customer failed to pay." "Customer used non-confirmed address.","Customer used non-confirmed address." @@ -42,14 +39,14 @@ "Discount","Discount" "Dynamic","Dynamic" "Edit Shopping Cart","Edit Shopping Cart" -"Email Copy of Invoice","Email Copy of Invoice" +"Enable PayPal Guest Checkout","Enable PayPal Guest Checkout" "Enabled","Enabled" "Exact Match. Address and Postal Code. International","Exact Match. Address and Postal Code. International" "Exact Match. Address and Postal Code. UK-specific","Exact Match. Address and Postal Code. UK-specific" "Exact Match. Address and nine-digit ZIP code","Exact Match. Address and nine-digit ZIP code" "Explanation: %s.","Explanation: %s." -"Express Checkout for Auctions","Express Checkout for Auctions" -"Failure: %s","Failure: %s" +"Express Checkout and Order have been cancelled.","Express Checkout and Order have been cancelled." +"Express Checkout has been cancelled.","Express Checkout has been cancelled." "Header Background Color","Header Background Color" "Header Border Color","Header Border Color" "Header Image URL","Header Image URL" @@ -60,7 +57,6 @@ "Items in Your Shopping Cart","Items in Your Shopping Cart" "Last Corellation ID","Last Corellation ID" "Last Transaction ID","Last Transaction ID" -"Logo Image URL","Logo Image URL" "Maestro/Solo","Maestro/Solo" "Matched (CVV2)","Matched (CVV2)" "Matched (CVV2CSC)","Matched (CVV2CSC)" @@ -92,14 +88,14 @@ "N/A. The merchant has not implemented CVV2 code handling","N/A. The merchant has not implemented CVV2 code handling" "N/A. Unavailable","N/A. Unavailable" "New Order Status","New Order Status" +"No","No" "No Details matched","No Details matched" "No Details matched. International","No Details matched. International" "No Liability Shift","No Liability Shift" "No match","No match" "No shipping method required.","No shipping method required." "None of the address information matched","None of the address information matched" -"Normal Express Checkout","Normal Express Checkout" -"Not supported currency code %s.","Not supported currency code %s." +"Note: %s","Note: %s" "Notified customer about creditmemo #%s.","Notified customer about creditmemo #%s." "Notified customer about invoice #%s.","Notified customer about invoice #%s." "Order","Order" @@ -108,6 +104,7 @@ "Part of the address information matched","Part of the address information matched" "PayPal","PayPal" "PayPal Checkout","PayPal Checkout" +"PayPal Express Checkout Token does not exist.","PayPal Express Checkout Token does not exist." "PayPal Express Order Review Form","PayPal Express Order Review Form" "PayPal IPN postback HTTP error: %s","PayPal IPN postback HTTP error: %s" "PayPal IPN postback Validation error: %s","PayPal IPN postback Validation error: %s" @@ -115,6 +112,8 @@ "PayPal Website Payments Pro - Express Checkout","PayPal Website Payments Pro - Express Checkout" "PayPal Website Payments Standard","PayPal Website Payments Standard" "PayPal geteway rejected request. %s","PayPal geteway rejected request. %s" +"PayPal/Centinel Electronic Commerce Indicator","PayPal/Centinel Electronic Commerce Indicator" +"PayPal/Centinel Visa Payer Authentication Service Result","PayPal/Centinel Visa Payer Authentication Service Result" "Payer Address ID","Payer Address ID" "Payer Address Status","Payer Address Status" "Payer Email","Payer Email" @@ -138,17 +137,15 @@ "Proxy Port","Proxy Port" "Qty","Qty" "Requested %s and configured %s merchant emails do not match.","Requested %s and configured %s merchant emails do not match." -"Require Credit Card Validation by Centinel","Require Credit Card Validation by Centinel" "Review Order","Review Order" "Sale","Sale" "Sandbox Mode","Sandbox Mode" -"Set up the Centinel Service Credentials separately","Set up the Centinel Service Credentials separately" +"Severe 3D Secure Card Validation","Severe 3D Secure Card Validation" "Shipping","Shipping" "Shipping Address","Shipping Address" "Shipping Information","Shipping Information" "Shipping Method","Shipping Method" "Shortcut","Shortcut" -"Shortcut Button Type (Express Checkout)","Shortcut Button Type (Express Checkout)" "Sorry, no quotes are available for this order at this time.","Sorry, no quotes are available for this order at this time." "Sort Order","Sort Order" "Static","Static" @@ -162,6 +159,7 @@ "Transfer Cart Line Items","Transfer Cart Line Items" "Triggered Fraud Filters","Triggered Fraud Filters" "Unable to calculate cart line item totals.","Unable to calculate cart line item totals." +"Unable to cancel Express Checkout.","Unable to cancel Express Checkout." "Unable to communicate with PayPal gateway.","Unable to communicate with PayPal gateway." "Unable to initialize Express Checkout review.","Unable to initialize Express Checkout review." "Unable to initialize Express Checkout.","Unable to initialize Express Checkout." @@ -170,16 +168,15 @@ "Unable to start Express Checkout.","Unable to start Express Checkout." "Unable to update shipping method.","Unable to update shipping method." "Update Shipping Method","Update Shipping Method" -"Use 3D Secure Credit Card Validation","Use 3D Secure Credit Card Validation" "Use Proxy","Use Proxy" "Uses Store Frontend Name by default","Uses Store Frontend Name by default" "Visible on Shopping Cart Page","Visible on Shopping Cart Page" "Waiting until Customer\'s eCheck will be cleared.","Waiting until Customer\'s eCheck will be cleared." "Website Payments Pro","Website Payments Pro" "Website Payments Standard","Website Payments Standard" -"Whether Customer may select Non-PayPal Payment Option","Whether Customer may select Non-PayPal Payment Option" "Wrong Order ID (%s) specified.","Wrong Order ID (%s) specified." "Wrong PayPal Express Checkout Token specified.","Wrong PayPal Express Checkout Token specified." +"Yes","Yes" "Yes. Matched Address and five-didgit ZIP","Yes. Matched Address and five-didgit ZIP" "You will be redirected to PayPal in a few seconds.","You will be redirected to PayPal in a few seconds." "You will be redirected to PayPal website when you place an order.","You will be redirected to PayPal website when you place an order." diff --git a/app/locale/en_US/Mage_PaypalUk.csv b/app/locale/en_US/Mage_PaypalUk.csv index 3994bd6265..02d8041c97 100644 --- a/app/locale/en_US/Mage_PaypalUk.csv +++ b/app/locale/en_US/Mage_PaypalUk.csv @@ -1,44 +1,16 @@ -"Billing Information","Billing Information" -"Change Payment Method","Change Payment Method" -"Change Shipping Address","Change Shipping Address" -"Credit Card Number: xxxx-%s","Credit Card Number: xxxx-%s" -"Credit Card Type: %s","Credit Card Type: %s" "Debit or Credit Card","Debit or Credit Card" -"Edit Shopping Cart","Edit Shopping Cart" -"Incl. Tax","Incl. Tax" -"Issue Number","Issue Number" -"Items in Your Shopping Cart","Items in Your Shopping Cart" +"Express Checkout and Order have been cancelled.","Express Checkout and Order have been cancelled." +"Express Checkout has been cancelled.","Express Checkout has been cancelled." "Maestro/Solo","Maestro/Solo" -"No shipping method required.","No shipping method required." "PayPal","PayPal" -"PayPal Email:","PayPal Email:" -"PayPal Uk Account","PayPal Uk Account" -"PayPalUK Express Order Review Form","PayPalUK Express Order Review Form" -"Payment Method","Payment Method" +"PayPal Express Checkout Token does not exist.","PayPal Express Checkout Token does not exist." +"PayPal Express Order Review Form","PayPal Express Order Review Form" "Pending PayPal","Pending PayPal" -"Place an Order","Place an Order" -"Please select a shipping method...","Please select a shipping method..." -"Please select a valid shipping method before submitting the order.","Please select a valid shipping method before submitting the order." -"Price","Price" -"Product Name","Product Name" -"Qty","Qty" -"Review Order","Review Order" -"Shipping Address","Shipping Address" -"Shipping Information","Shipping Information" -"Shipping Method","Shipping Method" -"Sorry, no quotes are available for this order at this time.","Sorry, no quotes are available for this order at this time." -"Start Date","Start Date" -"Submitting order information...","Submitting order information..." -"Subtotal","Subtotal" -"Switch/Solo Only","Switch/Solo Only" -"Switch/Solo card issue number: %s","Switch/Solo card issue number: %s" -"Switch/Solo card start Date: %s/%s","Switch/Solo card start Date: %s/%s" +"Unable to cancel Express Checkout.","Unable to cancel Express Checkout." "Unable to initialize Express Checkout review.","Unable to initialize Express Checkout review." "Unable to place the order.","Unable to place the order." "Unable to process Express Checkout approval.","Unable to process Express Checkout approval." "Unable to start Express Checkout.","Unable to start Express Checkout." "Unable to update shipping method.","Unable to update shipping method." -"Update Shipping Method","Update Shipping Method" "Wrong PayPal Express Checkout Token specified.","Wrong PayPal Express Checkout Token specified." "You will be redirected to PayPal in a few seconds.","You will be redirected to PayPal in a few seconds." -"Your billing address will be ignored and you will be redirected to PayPal UK website","Your billing address will be ignored and you will be redirected to PayPal UK website" diff --git a/app/locale/en_US/Mage_Protx.csv b/app/locale/en_US/Mage_Protx.csv deleted file mode 100644 index 1698797412..0000000000 --- a/app/locale/en_US/Mage_Protx.csv +++ /dev/null @@ -1,32 +0,0 @@ -"'General contact' email will be used if left empty","'General contact' email will be used if left empty" -"AUTHENTICATE","AUTHENTICATE" -"Customer successfully returned from Protx","Customer successfully returned from Protx" -"Customer was redirected to Protx","Customer was redirected to Protx" -"Customer was returned from Protx.","Customer was returned from Protx." -"DEFERRED","DEFERRED" -"Debug","Debug" -"Enabled","Enabled" -"Error occured","Error occured" -"Live","Live" -"Mode","Mode" -"New order status","New order status" -"Order ","Order " -"Order total amount does not match protx gross total amount","Order total amount does not match protx gross total amount" -"PAYMENT","PAYMENT" -"Payment Action","Payment Action" -"Payment from Specific countries","Payment from Specific countries" -"Payment from applicable countries","Payment from applicable countries" -"Please continue shopping.","Please continue shopping." -"Protx Standard","Protx Standard" -"Simulator","Simulator" -"Sort order","Sort order" -"Store name will be used if left empty","Store name will be used if left empty" -"Test","Test" -"Title","Title" -"Transaction Description","Transaction Description" -"Vendor email","Vendor email" -"Vendor email notification","Vendor email notification" -"Vendor encrypted password","Vendor encrypted password" -"Vendor name","Vendor name" -"You will be redirected to Protx website when you place an order.","You will be redirected to Protx website when you place an order." -"You will be redirected to protx in a few seconds.","You will be redirected to protx in a few seconds." diff --git a/app/locale/en_US/Mage_Reports.csv b/app/locale/en_US/Mage_Reports.csv index 8e9c21d55e..e3b5eb8afe 100644 --- a/app/locale/en_US/Mage_Reports.csv +++ b/app/locale/en_US/Mage_Reports.csv @@ -3,7 +3,9 @@ "Add to Cart","Add to Cart" "Add to Compare","Add to Compare" "Add to Wishlist","Add to Wishlist" +"Any","Any" "Applied Coupon","Applied Coupon" +"Applies to Any of the Specified Order Statuses","Applies to Any of the Specified Order Statuses" "Are you sure you want to refresh lifetime statistics? There can be performance impact during this operation.","Are you sure you want to refresh lifetime statistics? There can be performance impact during this operation." "Are you sure?","Are you sure?" "Avg. approved rating","Avg. approved rating" @@ -12,11 +14,11 @@ "Bought from wishlists","Bought from wishlists" "CSV","CSV" "Carts","Carts" -"Comment","Comment" "Compared Products Grid Template","Compared Products Grid Template" "Compared Products List Template","Compared Products List Template" "Coupon Code","Coupon Code" "Coupons","Coupons" +"Coupons Usage Report","Coupons Usage Report" "Created at","Created at" "Current Month Starts","Current Month Starts" "Customer","Customer" @@ -33,19 +35,19 @@ "Day","Day" "Default Recently Compared Products count","Default Recently Compared Products count" "Default Recently Viewed Products count","Default Recently Viewed Products count" +"Description","Description" "Detail","Detail" "Discount Amount","Discount Amount" "Downloads","Downloads" "Email","Email" +"Empty Rows","Empty Rows" "Excel","Excel" "Filter","Filter" "First Name","First Name" "From","From" -"Generate Report","Generate Report" "Guest","Guest" "Hits","Hits" "ID","ID" -"In stock","In stock" "Index model name must be defined","Index model name must be defined" "Invalid date specified","Invalid date specified" "Items in Cart","Items in Cart" @@ -87,10 +89,12 @@ "Number of wishlists: %s","Number of wishlists: %s" "Offline Refunded","Offline Refunded" "Online Refunded","Online Refunded" +"Order Status","Order Status" +"Order Taxes Report Grouped by Tax Rate","Order Taxes Report Grouped by Tax Rate" +"Order Taxes Report Grouped by Tax Rates","Order Taxes Report Grouped by Tax Rates" "Orders","Orders" "Out of stock","Out of stock" "Period","Period" -"Period Type","Period Type" "Poducts Report","Poducts Report" "Popular Tags","Popular Tags" "Popularity","Popularity" @@ -105,6 +109,7 @@ "Products Reviews","Products Reviews" "Products Tags","Products Tags" "Products in carts","Products in carts" +"Promotion Coupons Usage Report","Promotion Coupons Usage Report" "Purchases","Purchases" "Quantity Ordered","Quantity Ordered" "Quantity of Items","Quantity of Items" @@ -131,9 +136,9 @@ "Select day of the month","Select day of the month" "Shipping","Shipping" "Shopping Cart","Shopping Cart" -"Show Empty Rows","Show Empty Rows" +"Show Report","Show Report" "Show for Current","Show for Current" -"Status","Status" +"Specified","Specified" "Stock Qty","Stock Qty" "Submitted In","Submitted In" "Submitted On","Submitted On" @@ -153,8 +158,12 @@ "Total Amount","Total Amount" "Total Invoiced","Total Invoiced" "Total Invoiced Captured","Total Invoiced Captured" +"Total Invoiced VS Paid Report","Total Invoiced VS Paid Report" "Total Invoiced not Captured","Total Invoiced not Captured" +"Total Ordered Report","Total Ordered Report" "Total Refunded","Total Refunded" +"Total Refunded Report","Total Refunded Report" +"Total Shipped Report","Total Shipped Report" "Total Tags","Total Tags" "Total invoiced","Total invoiced" "Total refunded","Total refunded" @@ -170,4 +179,3 @@ "Year-To-Date Starts","Year-To-Date Starts" "Your Recently Compared","Your Recently Compared" "Your Recently Viewed","Your Recently Viewed" -"undefined","undefined" diff --git a/app/locale/en_US/Mage_Review.csv b/app/locale/en_US/Mage_Review.csv index 51dc8e732a..6fb335032b 100644 --- a/app/locale/en_US/Mage_Review.csv +++ b/app/locale/en_US/Mage_Review.csv @@ -59,8 +59,8 @@ "Qty","Qty" "Rating:","Rating:" "Review","Review" +"Review (submitted on %s):","Review (submitted on %s):" "Review Details","Review Details" -"Review by %s","Review by %s" "Review by %s","Review by %s" "Reviews and Ratings","Reviews and Ratings" "SKU","SKU" @@ -82,7 +82,6 @@ "Write Your Own Review","Write Your Own Review" "You have submitted no reviews.","You have submitted no reviews." "You're reviewing:","You're reviewing:" -"You're reviewing: %s","You're reviewing: %s" "Your Rating:","Your Rating:" "Your Review (submitted on %s):","Your Review (submitted on %s):" "Your review has been accepted for moderation","Your review has been accepted for moderation" diff --git a/app/locale/en_US/Mage_Rss.csv b/app/locale/en_US/Mage_Rss.csv index 1a74f48b64..80cc4515f2 100644 --- a/app/locale/en_US/Mage_Rss.csv +++ b/app/locale/en_US/Mage_Rss.csv @@ -1,5 +1,5 @@ "%s - Discounts and Coupons","%s - Discounts and Coupons" -"%s - Special Discounts","%s - Special Discounts" +"%s - Special Products","%s - Special Products" "%s RSS Feed","%s RSS Feed" "%s has reached a quantity of %s.","%s has reached a quantity of %s." "%s\'s Wishlist","%s\'s Wishlist" @@ -36,11 +36,9 @@ "RSS","RSS" "RSS Feeds","RSS Feeds" "RSS Feeds List","RSS Feeds List" -"RSS testing","RSS testing" "Review: %s
","Review: %s
" "Rss Config","Rss Config" "Rss Feeds Section","Rss Feeds Section" -"Shipping & Handling","Shipping & Handling" "Shipping & Handling","Shipping & Handling" "Special Products","Special Products" "Store: %s
","Store: %s
" @@ -49,7 +47,6 @@ "Tags Products","Tags Products" "Tax","Tax" "There are no Rss Feeds","There are no Rss Feeds" -"There are no Rss Feeds.","There are no Rss Feeds." "To:","To:" "Top Level Category","Top Level Category" "Total: %s
","Total: %s
" diff --git a/app/locale/en_US/Mage_Rule.csv b/app/locale/en_US/Mage_Rule.csv index e8527394d0..a1efe91d99 100644 --- a/app/locale/en_US/Mage_Rule.csv +++ b/app/locale/en_US/Mage_Rule.csv @@ -2,7 +2,6 @@ "ANY","ANY" "Add","Add" "Apply","Apply" -"Conditions Combination","Conditions Combination" "Description: %s","Description: %s" "End Date should be greater than Start Date","End Date should be greater than Start Date" "Expire at: %s","Expire at: %s" @@ -26,14 +25,10 @@ "does not contain","does not contain" "equals or greater than","equals or greater than" "equals or less than","equals or less than" -"found","found" "greater than","greater than" "is","is" "is not","is not" "is not one of","is not one of" "is one of","is one of" "less than","less than" -"not found","not found" "to","to" -"was","was" -"was not","was not" diff --git a/app/locale/en_US/Mage_Sales.csv b/app/locale/en_US/Mage_Sales.csv index 80125c6b33..4df3712697 100644 --- a/app/locale/en_US/Mage_Sales.csv +++ b/app/locale/en_US/Mage_Sales.csv @@ -3,6 +3,9 @@ "%s","%s" "%s / %s rate:","%s / %s rate:" "%s for %s","%s for %s" +"%s order(s) can not be canceled","%s order(s) can not be canceled" +"%s order(s) not put on hold","%s order(s) not put on hold" +"%s order(s) not released from holding status","%s order(s) not released from holding status" "%s order(s) successfully canceled","%s order(s) successfully canceled" "%s order(s) successfully put on hold","%s order(s) successfully put on hold" "%s order(s) successfully released from holding status","%s order(s) successfully released from holding status" @@ -35,6 +38,7 @@ "Adjustment Refund","Adjustment Refund" "Allow Reorder","Allow Reorder" "Amount","Amount" +"Amount of %s pending approval on gateway.","Amount of %s pending approval on gateway." "Amount: %s.","Amount: %s." "Append Comments","Append Comments" "Apply","Apply" @@ -48,6 +52,7 @@ "Are you sure?","Are you sure?" "Are you sure? This order will be cancelled and a new one will be created instead","Are you sure? This order will be cancelled and a new one will be created instead" "At least a payment ID must be set.","At least a payment ID must be set." +"Authorization amount %s pending approval on gateway.","Authorization amount %s pending approval on gateway." "Authorized amount of %s.","Authorized amount of %s." "Back to My Orders","Back to My Orders" "Backordered","Backordered" @@ -89,6 +94,7 @@ "Comments History","Comments History" "Complete","Complete" "Country","Country" +"Coupon code accepted.","Coupon code accepted." "Coupons","Coupons" "Create","Create" "Create New Customer","Create New Customer" @@ -144,6 +150,7 @@ "Document","Document" "Edit","Edit" "Edit Gift Messsage","Edit Gift Messsage" +"Edit Order","Edit Order" "Edit Order #%s","Edit Order #%s" "Email","Email" "Email Copy of Credit Memo","Email Copy of Credit Memo" @@ -211,6 +218,7 @@ "Invoice email not sent","Invoice email not sent" "Invoice email sent","Invoice email sent" "Invoice void problem","Invoice void problem" +"Invoice will be created without communication with payment gateway.","Invoice will be created without communication with payment gateway." "Invoice...","Invoice..." "Invoiced","Invoiced" "Invoices","Invoices" @@ -271,6 +279,8 @@ "No Payment Methods","No Payment Methods" "No detail for number ""%s""","No detail for number ""%s""" "No items","No items" +"No order(s) put on hold","No order(s) put on hold" +"No order(s) released from holding status","No order(s) released from holding status" "No ordered items","No ordered items" "No shipping information available","No shipping information available" "Non-supported Transaction Type ""%s"".","Non-supported Transaction Type ""%s""." @@ -317,6 +327,7 @@ "Order does not allow to be canceled.","Order does not allow to be canceled." "Order does not allow to create an invoice.","Order does not allow to create an invoice." "Order email has been successfully sent.","Order email has been successfully sent." +"Order has been successfully created","Order has been successfully created" "Order invoice","Order invoice" "Order object is not specified.","Order object is not specified." "Order saving error: %s","Order saving error: %s" @@ -328,6 +339,7 @@ "Order was successfully cancelled.","Order was successfully cancelled." "Order was successfully put on hold.","Order was successfully put on hold." "Order was successfully released from holding status.","Order was successfully released from holding status." +"Order(s) can not be canceled","Order(s) can not be canceled" "Ordered","Ordered" "Orders","Orders" "Original Price","Original Price" @@ -550,7 +562,6 @@ "Track your order","Track your order" "Tracking","Tracking" "Tracking Number","Tracking Number" -"Tracking Number(s)","Tracking Number(s)" "Tracking Number(s):","Tracking Number(s):" "Transaction ""%s"" was already processed.","Transaction ""%s"" was already processed." "Transaction ID must not be empty.","Transaction ID must not be empty." diff --git a/app/locale/en_US/Mage_Shipping.csv b/app/locale/en_US/Mage_Shipping.csv index 9f199dc85b..ba9dc988d5 100644 --- a/app/locale/en_US/Mage_Shipping.csv +++ b/app/locale/en_US/Mage_Shipping.csv @@ -69,6 +69,7 @@ "There is no tracking available for this shipment.","There is no tracking available for this shipment." "There is no tracking available.","There is no tracking available." "This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.","This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us." +"This shipping method is not available, please specify ZIP-code","This shipping method is not available, please specify ZIP-code" "Title","Title" "Track:","Track:" "Tracking Information","Tracking Information" diff --git a/app/locale/en_US/Mage_Strikeiron.csv b/app/locale/en_US/Mage_Strikeiron.csv deleted file mode 100644 index e5c6f69610..0000000000 --- a/app/locale/en_US/Mage_Strikeiron.csv +++ /dev/null @@ -1,47 +0,0 @@ -"%s is not supported currency.","%s is not supported currency." -"Accept","Accept" -"Basic","Basic" -"Cannot retreive rate from strikeirion.","Cannot retreive rate from strikeirion." -"Cannot retrieve rate from %s to %s","Cannot retrieve rate from %s to %s" -"Check all email servers","Check all email servers" -"Complete","Complete" -"Country/Region/Postal code combination","Country/Region/Postal code combination" -"Customer Tax Class","Customer Tax Class" -"Email Verification","Email Verification" -"Email address cannot be verified. Please check again and make sure your email address entered correctly.","Email address cannot be verified. Please check again and make sure your email address entered correctly." -"Enable US address verification","Enable US address verification" -"Enable email verification","Enable email verification" -"Enable foreign exchange rate","Enable foreign exchange rate" -"Enable global address verification","Enable global address verification" -"Enable sales and use tax","Enable sales and use tax" -"Error Email Recipient","Error Email Recipient" -"Error Email Sender","Error Email Sender" -"Error Email Template","Error Email Template" -"Error address action","Error address action" -"Foreign Exchange Rates","Foreign Exchange Rates" -"Global Address Verification","Global Address Verification" -"If type is complete and zip code belongs to multiple tax rates, choose to charge minimum tax rate or maximum tax rate.","If type is complete and zip code belongs to multiple tax rates, choose to charge minimum tax rate or maximum tax rate." -"Invalid email address","Invalid email address" -"Maximum tax rate","Maximum tax rate" -"Minimum tax rate","Minimum tax rate" -"Password","Password" -"Pop up warning and accept","Pop up warning and accept" -"Product Tax Class","Product Tax Class" -"Reject","Reject" -"Sales and Use Tax","Sales and Use Tax" -"Sales and Use Tax Type","Sales and Use Tax Type" -"Strikeiron","Strikeiron" -"Strikeiron Config","Strikeiron Config" -"Strikeiron Section","Strikeiron Section" -"Strikeiron foreign exchange rate is disabled","Strikeiron foreign exchange rate is disabled" -"Tax","Tax" -"There is an error in retrieving tax rate. Please contact us","There is an error in retrieving tax rate. Please contact us" -"There is an error in verifying an email. Please contact us.","There is an error in verifying an email. Please contact us." -"There is no more hits remaining for the foreign Exchange Rate Service.","There is no more hits remaining for the foreign Exchange Rate Service." -"There is no response back from Strikeiron server","There is no response back from Strikeiron server" -"US Address Verification","US Address Verification" -"Undetermined email action","Undetermined email action" -"Use","Use" -"User ID","User ID" -"Verify address in admin","Verify address in admin" -"Verify email in admin","Verify email in admin" diff --git a/app/locale/en_US/Mage_Tag.csv b/app/locale/en_US/Mage_Tag.csv index 3b2e9cbea8..2e80d6f6ab 100644 --- a/app/locale/en_US/Mage_Tag.csv +++ b/app/locale/en_US/Mage_Tag.csv @@ -14,7 +14,6 @@ "Are you sure?","Are you sure?" "Back","Back" "Back to Tags List","Back to Tags List" -"Back to view Tag","Back to view Tag" "Base Popularity","Base Popularity" "Block Information","Block Information" "CSV","CSV" @@ -30,7 +29,6 @@ "Delete","Delete" "Delete Tag","Delete Tag" "Disabled","Disabled" -"Edit Tag","Edit Tag" "Edit Tag '%s'","Edit Tag '%s'" "Email","Email" "First Name","First Name" @@ -60,17 +58,14 @@ "Products Tagged by Customers","Products Tagged by Customers" "Products Tagged with '%s'","Products Tagged with '%s'" "Products tagged with '%s'","Products tagged with '%s'" -"Products tagged with '%s' (RSS)","Products tagged with '%s' (RSS)" "SKU","SKU" "Save And Continue Edit","Save And Continue Edit" "Save Tag","Save Tag" -"Search Results for '%s' (RSS)","Search Results for '%s' (RSS)" "Search Terms","Search Terms" "Status","Status" "Tag","Tag" "Tag ""%s"" has already been added to the product","Tag ""%s"" has already been added to the product" "Tag ""%s"" has been added to the product","Tag ""%s"" has been added to the product" -"Tag Information","Tag Information" "Tag Name","Tag Name" "Tagged Products List","Tagged Products List" "Tags","Tags" @@ -83,7 +78,6 @@ "Unable to save tag(s)","Unable to save tag(s)" "Use spaces to separate tags. Use single quotes (') for phrases.","Use spaces to separate tags. Use single quotes (') for phrases." "Uses","Uses" -"View All","View All" "View All Tags","View All Tags" "View Customers","View Customers" "View Products","View Products" diff --git a/app/locale/en_US/Mage_Widget.csv b/app/locale/en_US/Mage_Widget.csv index 42aeba4ee2..8383a26237 100644 --- a/app/locale/en_US/Mage_Widget.csv +++ b/app/locale/en_US/Mage_Widget.csv @@ -25,6 +25,7 @@ "Insert Widget","Insert Widget" "Layout Updates","Layout Updates" "Manage Widget Instances","Manage Widget Instances" +"New Instance","New Instance" "New Widget Instance","New Widget Instance" "Next page","Next page" "Non-Anchor Categories","Non-Anchor Categories" diff --git a/app/locale/en_US/Mage_Wishlist.csv b/app/locale/en_US/Mage_Wishlist.csv index 1591eb384e..f3e3fda1af 100644 --- a/app/locale/en_US/Mage_Wishlist.csv +++ b/app/locale/en_US/Mage_Wishlist.csv @@ -6,7 +6,6 @@ "Add to Cart","Add to Cart" "Add to Wishlist","Add to Wishlist" "Added On","Added On" -"Are You sure?","Are You sure?" "Are you sure you want to remove this product from your wishlist?","Are you sure you want to remove this product from your wishlist?" "Are you sure you would like to remove this item from the wishlist?","Are you sure you would like to remove this item from the wishlist?" "Back","Back" diff --git a/app/locale/en_US/template/email/account_new.html b/app/locale/en_US/template/email/account_new.html index 8377e6cad9..f9ea0d19e7 100644 --- a/app/locale/en_US/template/email/account_new.html +++ b/app/locale/en_US/template/email/account_new.html @@ -20,7 +20,7 @@ + {{var store.getFrontendName()}}
- Magento
@@ -29,7 +29,7 @@

Dear {{htmlescape var=$customer.name}},
- Welcome to Demo Store. To log in when visiting our site just click Login or My Account at the top of every page, and then enter your e-mail address and password.

+ Welcome to {{var store.getFrontendName()}}. To log in when visiting our site just click Login or My Account at the top of every page, and then enter your e-mail address and password.

Use the following values when prompted to log in:
@@ -47,7 +47,7 @@

  • Store alternative addresses (for shipping to multiple family members and friends!)
  • -

    If you have any questions about your account or any other matter, please feel free to contact us at dummyemail@magentocommerce.com or by phone at (555) 555-0123.

    +

    If you have any questions about your account or any other matter, please feel free to contact us at {{config path='trans_email/ident_support/email'}} or by phone at {{config path='general/store_information/phone'}}.

    Thanks again!

    diff --git a/app/locale/en_US/template/email/account_new_confirmation.html b/app/locale/en_US/template/email/account_new_confirmation.html index 82a98c6b19..4ac3998355 100644 --- a/app/locale/en_US/template/email/account_new_confirmation.html +++ b/app/locale/en_US/template/email/account_new_confirmation.html @@ -21,7 +21,7 @@ + {{var store.getFrontendName()}}
    - Magento
    @@ -40,7 +40,7 @@ E-mail: {{var customer.email}}
    Password: {{htmlescape var=$customer.password}}

    -

    If you have any questions about your account or any other matter, please feel free to contact us at dummyemail@magentocommerce.com or by phone at (555) 555-0123.

    +

    If you have any questions about your account or any other matter, please feel free to contact us at {{config path='trans_email/ident_support/email'}} or by phone at {{config path='general/store_information/phone'}}.

    diff --git a/app/locale/en_US/template/email/account_new_confirmed.html b/app/locale/en_US/template/email/account_new_confirmed.html index fbe6821e88..6247a59ef7 100644 --- a/app/locale/en_US/template/email/account_new_confirmed.html +++ b/app/locale/en_US/template/email/account_new_confirmed.html @@ -18,7 +18,7 @@ + {{var store.getFrontendName()}}
    - Magento
    @@ -40,7 +40,7 @@
  • Store alternative addresses (for shipping to multiple family members and friends!)
  • -

    If you have any questions about your account or any other matter, please feel free to contact us at dummyemail@magentocommerce.com or by phone at (555) 555-0123.

    +

    If you have any questions about your account or any other matter, please feel free to contact us at {{config path='trans_email/ident_support/email'}} or by phone at {{config path='general/store_information/phone'}}.

    Thanks again!

    diff --git a/app/locale/en_US/template/email/admin_password_new.html b/app/locale/en_US/template/email/admin_password_new.html index bb6a10e9ef..a371b342ed 100644 --- a/app/locale/en_US/template/email/admin_password_new.html +++ b/app/locale/en_US/template/email/admin_password_new.html @@ -19,7 +19,7 @@ +

    {{var store.getFrontendName()}}

    -

    Magento

    diff --git a/app/locale/en_US/template/email/amazonpayments_asp_notification_error.html b/app/locale/en_US/template/email/amazonpayments_asp_notification_error.html deleted file mode 100644 index 3ef81b2d7e..0000000000 --- a/app/locale/en_US/template/email/amazonpayments_asp_notification_error.html +++ /dev/null @@ -1,12 +0,0 @@ - - -
    -
    Amazon Simple Pay notification message
    -
    Request:
    -
    {{var request}}
    -
    Error:
    -
    {{var error}}
    -
    \ No newline at end of file diff --git a/app/locale/en_US/template/email/newsletter_subscr_confirm.html b/app/locale/en_US/template/email/newsletter_subscr_confirm.html index 26a7d3e7f8..9ad26a28a5 100644 --- a/app/locale/en_US/template/email/newsletter_subscr_confirm.html +++ b/app/locale/en_US/template/email/newsletter_subscr_confirm.html @@ -17,7 +17,7 @@ +

    {{var store.getFrontendName()}}

    -

    Magento

    diff --git a/app/locale/en_US/template/email/password_new.html b/app/locale/en_US/template/email/password_new.html index a2596a5ba7..86a5cd0c90 100644 --- a/app/locale/en_US/template/email/password_new.html +++ b/app/locale/en_US/template/email/password_new.html @@ -18,7 +18,7 @@ +

    {{var store.getFrontendName()}}

    -

    Magento

    diff --git a/app/locale/en_US/template/email/sales/creditmemo_new.html b/app/locale/en_US/template/email/sales/creditmemo_new.html index 1efaa43c3b..0132532b45 100644 --- a/app/locale/en_US/template/email/sales/creditmemo_new.html +++ b/app/locale/en_US/template/email/sales/creditmemo_new.html @@ -25,7 +25,7 @@ - +
    Magento{{var store.getFrontendName()}}
    @@ -36,7 +36,7 @@ Hello {{htmlescape var=$order.getCustomerName()}},
    Thank you for your order from {{var store.getFrontendName()}}. You can check the status of your order by logging into your account. - If you have any questions about your order please contact us at dummyemail@magentocommerce.com or call us at (555) 555-0123 Monday - Friday, 8am - 5pm PST. + If you have any questions about your order please contact us at {{config path='trans_email/ident_support/email'}} or call us at {{config path='general/store_information/phone'}} Monday - Friday, 8am - 5pm PST.

    Your Credit Memo #{{var creditmemo.increment_id}} for Order #{{var order.increment_id}} diff --git a/app/locale/en_US/template/email/sales/creditmemo_new_guest.html b/app/locale/en_US/template/email/sales/creditmemo_new_guest.html index d4625408df..f13ed258c4 100644 --- a/app/locale/en_US/template/email/sales/creditmemo_new_guest.html +++ b/app/locale/en_US/template/email/sales/creditmemo_new_guest.html @@ -24,7 +24,7 @@ - +
    Magento{{var store.getFrontendName()}}
    @@ -34,7 +34,7 @@

    Hello {{htmlescape var=$billing.getName()}},
    Thank you for your order from {{var store.getFrontendName()}}. - If you have any questions about your order please contact us at dummyemail@magentocommerce.com or call us at (555) 555-0123 Monday - Friday, 8am - 5pm PST. + If you have any questions about your order please contact us at {{config path='trans_email/ident_support/email'}} or call us at {{config path='general/store_information/phone'}} Monday - Friday, 8am - 5pm PST.

    Your Credit Memo #{{var creditmemo.increment_id}} for Order #{{var order.increment_id}} diff --git a/app/locale/en_US/template/email/sales/creditmemo_update.html b/app/locale/en_US/template/email/sales/creditmemo_update.html index 72028811c3..74a880d16f 100644 --- a/app/locale/en_US/template/email/sales/creditmemo_update.html +++ b/app/locale/en_US/template/email/sales/creditmemo_update.html @@ -20,7 +20,7 @@ - +
    Magento{{var store.getFrontendName()}}
    @@ -37,8 +37,8 @@

    {{var comment}}

    If you have any questions, please feel free to contact us at - dummyemail@magentocommerce.com - or by phone at (555) 555-0123. + {{config path='trans_email/ident_support/email'}} + or by phone at {{config path='general/store_information/phone'}}.

    Thank you again,
    {{var store.getFrontendName()}}

    diff --git a/app/locale/en_US/template/email/sales/creditmemo_update_guest.html b/app/locale/en_US/template/email/sales/creditmemo_update_guest.html index 11280a3147..61230cfb37 100644 --- a/app/locale/en_US/template/email/sales/creditmemo_update_guest.html +++ b/app/locale/en_US/template/email/sales/creditmemo_update_guest.html @@ -19,7 +19,7 @@ - +
    Magento{{var store.getFrontendName()}}
    @@ -35,8 +35,8 @@

    {{var comment}}

    If you have any questions, please feel free to contact us at - dummyemail@magentocommerce.com - or by phone at (555) 555-0123. + {{config path='trans_email/ident_support/email'}} + or by phone at {{config path='general/store_information/phone'}}.

    Thank you again,
    {{var store.getFrontendName()}}

    diff --git a/app/locale/en_US/template/email/sales/invoice_new.html b/app/locale/en_US/template/email/sales/invoice_new.html index 9c7973a8c6..290d6d5409 100644 --- a/app/locale/en_US/template/email/sales/invoice_new.html +++ b/app/locale/en_US/template/email/sales/invoice_new.html @@ -25,7 +25,7 @@ - +
    Magento{{var store.getFrontendName()}}
    @@ -36,7 +36,7 @@ Hello {{htmlescape var=$order.getCustomerName()}},
    Thank you for your order from {{var store.getFrontendName()}}. You can check the status of your order by logging into your account. - If you have any questions about your order please contact us at dummyemail@magentocommerce.com or call us at (555) 555-0123 Monday - Friday, 8am - 5pm PST. + If you have any questions about your order please contact us at {{config path='trans_email/ident_support/email'}} or call us at {{config path='general/store_information/phone'}} Monday - Friday, 8am - 5pm PST.

    Your Invoice #{{var invoice.increment_id}} for Order #{{var order.increment_id}} diff --git a/app/locale/en_US/template/email/sales/invoice_new_guest.html b/app/locale/en_US/template/email/sales/invoice_new_guest.html index 5bc991b732..b1788a3f45 100644 --- a/app/locale/en_US/template/email/sales/invoice_new_guest.html +++ b/app/locale/en_US/template/email/sales/invoice_new_guest.html @@ -24,7 +24,7 @@ - +
    Magento{{var store.getFrontendName()}}
    @@ -34,7 +34,7 @@

    Hello {{htmlescape var=$billing.getName()}},
    Thank you for your order from {{var store.getFrontendName()}}. - If you have any questions about your order please contact us at dummyemail@magentocommerce.com or call us at (555) 555-0123 Monday - Friday, 8am - 5pm PST. + If you have any questions about your order please contact us at {{config path='trans_email/ident_support/email'}} or call us at {{config path='general/store_information/phone'}} Monday - Friday, 8am - 5pm PST.

    Your Invoice #{{var invoice.increment_id}} for Order #{{var order.increment_id}} diff --git a/app/locale/en_US/template/email/sales/invoice_update.html b/app/locale/en_US/template/email/sales/invoice_update.html index 2f09fa20bf..828b385c92 100644 --- a/app/locale/en_US/template/email/sales/invoice_update.html +++ b/app/locale/en_US/template/email/sales/invoice_update.html @@ -20,7 +20,7 @@ - +
    Magento{{var store.getFrontendName()}}
    @@ -37,8 +37,8 @@

    {{var comment}}

    If you have any questions, please feel free to contact us at - dummyemail@magentocommerce.com - or by phone at (555) 555-0123. + {{config path='trans_email/ident_support/email'}} + or by phone at {{config path='general/store_information/phone'}}.

    Thank you again,
    {{var store.getFrontendName()}}

    diff --git a/app/locale/en_US/template/email/sales/invoice_update_guest.html b/app/locale/en_US/template/email/sales/invoice_update_guest.html index 2286221328..9521fe0808 100644 --- a/app/locale/en_US/template/email/sales/invoice_update_guest.html +++ b/app/locale/en_US/template/email/sales/invoice_update_guest.html @@ -19,7 +19,7 @@ - +
    Magento{{var store.getFrontendName()}}
    @@ -35,8 +35,8 @@

    {{var comment}}

    If you have any questions, please feel free to contact us at - dummyemail@magentocommerce.com - or by phone at (555) 555-0123. + {{config path='trans_email/ident_support/email'}} + or by phone at {{config path='general/store_information/phone'}}.

    Thank you again,
    {{var store.getFrontendName()}}

    diff --git a/app/locale/en_US/template/email/sales/order_new.html b/app/locale/en_US/template/email/sales/order_new.html index 19ff535268..6d95539d88 100644 --- a/app/locale/en_US/template/email/sales/order_new.html +++ b/app/locale/en_US/template/email/sales/order_new.html @@ -25,7 +25,7 @@ - +
    Magento{{var store.getFrontendName()}}
    @@ -37,7 +37,7 @@ Thank you for your order from {{var store.getFrontendName()}}. Once your package ships we will send an email with a link to track your order. You can check the status of your order by logging into your account. - If you have any questions about your order please contact us at dummyemail@magentocommerce.com or call us at (555) 555-0123 Monday - Friday, 8am - 5pm PST. + If you have any questions about your order please contact us at {{config path='trans_email/ident_support/email'}} or call us at {{config path='general/store_information/phone'}} Monday - Friday, 8am - 5pm PST.

    Your order confirmation is below. Thank you again for your business.

    diff --git a/app/locale/en_US/template/email/sales/order_new_guest.html b/app/locale/en_US/template/email/sales/order_new_guest.html index 6abf719572..dad7943ad7 100644 --- a/app/locale/en_US/template/email/sales/order_new_guest.html +++ b/app/locale/en_US/template/email/sales/order_new_guest.html @@ -24,7 +24,7 @@ - +
    Magento{{var store.getFrontendName()}}
    @@ -35,7 +35,7 @@ Hello {{htmlescape var=$order.getBillingAddress().getName()}},
    Thank you for your order from {{var store.getFrontendName()}}. Once your package ships we will send an email with a link to track your order. - If you have any questions about your order please contact us at dummyemail@magentocommerce.com or call us at (555) 555-0123 Monday - Friday, 8am - 5pm PST. + If you have any questions about your order please contact us at {{config path='trans_email/ident_support/email'}} or call us at {{config path='general/store_information/phone'}} Monday - Friday, 8am - 5pm PST.

    Your order confirmation is below. Thank you again for your business.

    diff --git a/app/locale/en_US/template/email/sales/order_update.html b/app/locale/en_US/template/email/sales/order_update.html index c46bacc708..6d71157295 100644 --- a/app/locale/en_US/template/email/sales/order_update.html +++ b/app/locale/en_US/template/email/sales/order_update.html @@ -20,7 +20,7 @@ - +
    Magento{{var store.getFrontendName()}}
    @@ -37,8 +37,8 @@

    {{var comment}}

    If you have any questions, please feel free to contact us at - dummyemail@magentocommerce.com - or by phone at (555) 555-0123. + {{config path='trans_email/ident_support/email'}} + or by phone at {{config path='general/store_information/phone'}}.

    Thank you again,
    {{var store.getFrontendName()}}

    diff --git a/app/locale/en_US/template/email/sales/order_update_guest.html b/app/locale/en_US/template/email/sales/order_update_guest.html index 6510daa53a..a91d2f631c 100644 --- a/app/locale/en_US/template/email/sales/order_update_guest.html +++ b/app/locale/en_US/template/email/sales/order_update_guest.html @@ -19,7 +19,7 @@ - +
    Magento{{var store.getFrontendName()}}
    @@ -35,8 +35,8 @@

    {{var comment}}

    If you have any questions, please feel free to contact us at - dummyemail@magentocommerce.com - or by phone at (555) 555-0123. + {{config path='trans_email/ident_support/email'}} + or by phone at {{config path='general/store_information/phone'}}.

    Thank you again,
    {{var store.getFrontendName()}}

    diff --git a/app/locale/en_US/template/email/sales/shipment_new.html b/app/locale/en_US/template/email/sales/shipment_new.html index cbc4080050..71b06651be 100644 --- a/app/locale/en_US/template/email/sales/shipment_new.html +++ b/app/locale/en_US/template/email/sales/shipment_new.html @@ -26,7 +26,7 @@ - +
    Magento{{var store.getFrontendName()}}
    @@ -37,7 +37,7 @@ Hello {{htmlescape var=$order.getCustomerName()}},
    Thank you for your order from {{var store.getFrontendName()}}. You can check the status of your order by logging into your account. - If you have any questions about your order please contact us at dummyemail@magentocommerce.com or call us at (555) 555-0123 Monday - Friday, 8am - 5pm PST. + If you have any questions about your order please contact us at {{config path='trans_email/ident_support/email'}} or call us at {{config path='general/store_information/phone'}} Monday - Friday, 8am - 5pm PST.

    Your shipping confirmation is below. Thank you again for your business. diff --git a/app/locale/en_US/template/email/sales/shipment_new_guest.html b/app/locale/en_US/template/email/sales/shipment_new_guest.html index 184fb53296..5021a17552 100644 --- a/app/locale/en_US/template/email/sales/shipment_new_guest.html +++ b/app/locale/en_US/template/email/sales/shipment_new_guest.html @@ -25,7 +25,7 @@ - +
    Magento{{var store.getFrontendName()}}
    @@ -35,7 +35,7 @@

    Hello {{htmlescape var=$billing.getName()}},
    Thank you for your order from {{var store.getFrontendName()}}. - If you have any questions about your order please contact us at dummyemail@magentocommerce.com or call us at (555) 555-0123 Monday - Friday, 8am - 5pm PST. + If you have any questions about your order please contact us at {{config path='trans_email/ident_support/email'}} or call us at {{config path='general/store_information/phone'}} Monday - Friday, 8am - 5pm PST.

    Your shipping confirmation is below. Thank you again for your business. diff --git a/app/locale/en_US/template/email/sales/shipment_update.html b/app/locale/en_US/template/email/sales/shipment_update.html index 9e1b296d61..8dfe823b71 100644 --- a/app/locale/en_US/template/email/sales/shipment_update.html +++ b/app/locale/en_US/template/email/sales/shipment_update.html @@ -20,7 +20,7 @@ - +
    Magento{{var store.getFrontendName()}}
    @@ -37,8 +37,8 @@

    {{var comment}}

    If you have any questions, please feel free to contact us at - dummyemail@magentocommerce.com - or by phone at (555) 555-0123. + {{config path='trans_email/ident_support/email'}} + or by phone at {{config path='general/store_information/phone'}}.

    Thank you again,
    {{var store.getFrontendName()}}

    diff --git a/app/locale/en_US/template/email/sales/shipment_update_guest.html b/app/locale/en_US/template/email/sales/shipment_update_guest.html index 5ce22bd953..18593e3b7a 100644 --- a/app/locale/en_US/template/email/sales/shipment_update_guest.html +++ b/app/locale/en_US/template/email/sales/shipment_update_guest.html @@ -19,7 +19,7 @@ - +
    Magento{{var store.getFrontendName()}}
    @@ -35,8 +35,8 @@

    {{var comment}}

    If you have any questions, please feel free to contact us at - dummyemail@magentocommerce.com - or by phone at (555) 555-0123. + {{config path='trans_email/ident_support/email'}} + or by phone at {{config path='general/store_information/phone'}}.

    Thank you again,
    {{var store.getFrontendName()}}

    diff --git a/app/locale/en_US/template/email/strikeiron_email_warning.html b/app/locale/en_US/template/email/strikeiron_email_warning.html deleted file mode 100644 index df8cf1f1bc..0000000000 --- a/app/locale/en_US/template/email/strikeiron_email_warning.html +++ /dev/null @@ -1,10 +0,0 @@ - - -Strikeririon Email Warning: - -{{var email}} was saved into the system but having following warnings: - -{{var warnings}} \ No newline at end of file diff --git a/app/locale/en_US/template/email/wishlist_share.html b/app/locale/en_US/template/email/wishlist_share.html index 7b9c616355..b1f2dd1eda 100644 --- a/app/locale/en_US/template/email/wishlist_share.html +++ b/app/locale/en_US/template/email/wishlist_share.html @@ -17,7 +17,7 @@ +

    {{var store.getFrontendName()}}

    -

    Magento

    diff --git a/downloader/Maged/Model/Session.php b/downloader/Maged/Model/Session.php index 9931beae49..a0b9bef507 100644 --- a/downloader/Maged/Model/Session.php +++ b/downloader/Maged/Model/Session.php @@ -26,6 +26,12 @@ class Maged_Model_Session extends Maged_Model { + + /** + * Session + * + * @var Mage_Admin_Model_Session + */ protected $_session; public function start() @@ -128,7 +134,7 @@ public function getMessages($clear = true) public function getReturnUrl() { - if (!$this->_session) { + if (!$this->_session || !$this->_session->isLoggedIn()) { return ''; } return Mage::getSingleton('adminhtml/url')->getUrl('adminhtml'); diff --git a/downloader/template/login.phtml b/downloader/template/login.phtml index cc3f5be812..5543a71acc 100755 --- a/downloader/template/login.phtml +++ b/downloader/template/login.phtml @@ -25,10 +25,9 @@ */ ?> template('header.phtml') ?> - -controller()->session()->getReturnUrl()): ?> +controller()->session()->getReturnUrl()): ?> Return to Magento Administration - +

    Log In

    @@ -41,4 +40,4 @@
    -template('footer.phtml') ?> +template('footer.phtml') ?> \ No newline at end of file diff --git a/errors/.htaccess b/errors/.htaccess index f58828a1b0..4a5d6c8832 100644 --- a/errors/.htaccess +++ b/errors/.htaccess @@ -1,3 +1,3 @@ - - Deny from all - \ No newline at end of file + + Deny from all + \ No newline at end of file diff --git a/errors/404.php b/errors/404.php index ade79a95c2..8ef2d3a454 100644 --- a/errors/404.php +++ b/errors/404.php @@ -18,18 +18,13 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category Mage - * @package Mage - * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @category Mage + * @package Errors + * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -require_once 'functions.php'; +require_once 'processor.php'; -mageErrorsSendErrorHeaders(404); - -$pageTitle = 'Error 404: Not Found.'; - -// load template file -define('MAGE_ERRORS_TEMPLATE_FILE', MAGE_ERRORS_TEMPLATE_PATH . '404.phtml'); -include_once MAGE_ERRORS_TEMPLATE_PATH . 'page.phtml'; +$processor = new Error_Processor(); +$processor->process404(); diff --git a/errors/503.php b/errors/503.php index 6b18eaa2c9..f972df570e 100644 --- a/errors/503.php +++ b/errors/503.php @@ -18,18 +18,13 @@ * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magentocommerce.com for more information. * - * @category Mage - * @package Mage - * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) - * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + * @category Mage + * @package Errors + * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -require_once 'functions.php'; +require_once 'processor.php'; -mageErrorsSendErrorHeaders(503); - -$pageTitle = 'Error 503: Service Unavailable.'; - -// load template file -define('MAGE_ERRORS_TEMPLATE_FILE', MAGE_ERRORS_TEMPLATE_PATH . '503.phtml'); -include_once MAGE_ERRORS_TEMPLATE_PATH . 'page.phtml'; +$processor = new Error_Processor(); +$processor->process503(); diff --git a/errors/default/.htaccess b/errors/default/.htaccess deleted file mode 100644 index 896fbc5a34..0000000000 --- a/errors/default/.htaccess +++ /dev/null @@ -1,2 +0,0 @@ -Order deny,allow -Deny from all \ No newline at end of file diff --git a/errors/default/404.phtml b/errors/default/404.phtml index 4b63bc3276..99e0fdf963 100644 --- a/errors/default/404.phtml +++ b/errors/default/404.phtml @@ -1,3 +1,29 @@ +
    diff --git a/errors/default/503.phtml b/errors/default/503.phtml index 7429feef63..6d788cea0f 100644 --- a/errors/default/503.phtml +++ b/errors/default/503.phtml @@ -1,3 +1,29 @@ +
    diff --git a/errors/skin/default/css/styles.css b/errors/default/css/styles.css similarity index 90% rename from errors/skin/default/css/styles.css rename to errors/default/css/styles.css index bd9664cb22..d0e7fd71c7 100644 --- a/errors/skin/default/css/styles.css +++ b/errors/default/css/styles.css @@ -1,3 +1,27 @@ +/** + * Magento + * + * NOTICE OF LICENSE + * + * This source file is subject to the Academic Free License (AFL 3.0) + * that is bundled with this package in the file LICENSE_AFL.txt. + * It is also available through the world-wide-web at this URL: + * http://opensource.org/licenses/afl-3.0.php + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@magentocommerce.com so we can send you a copy immediately. + * + * DISCLAIMER + * + * Do not edit or add to this file if you wish to upgrade Magento to newer + * versions in the future. If you wish to customize Magento for your + * needs please refer to http://www.magentocommerce.com for more information. + * + * @category Mage + * @package Errors + * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com) + * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) + */ /* Reset ================================================================================= */ * { margin:0; padding:0; } @@ -146,6 +170,7 @@ p.required { font-size:11px; text-align:right; color:#EB340A; } .success { color:#3d6611; font-weight:bold; } .error { color:#df280a; font-weight:bold; } .notice { color:#e26703; } +.trace { width:100%; overflow:auto; min-height:250px; } .messages, .messages ul { list-style:none !important; margin:0 !important; padding:0 !important; } diff --git a/errors/skin/default/images/bkg_body.gif b/errors/default/images/bkg_body.gif similarity index 100% rename from errors/skin/default/images/bkg_body.gif rename to errors/default/images/bkg_body.gif diff --git a/errors/skin/default/images/bkg_header.jpg b/errors/default/images/bkg_header.jpg similarity index 100% rename from errors/skin/default/images/bkg_header.jpg rename to errors/default/images/bkg_header.jpg diff --git a/errors/skin/default/images/bkg_main1.gif b/errors/default/images/bkg_main1.gif similarity index 100% rename from errors/skin/default/images/bkg_main1.gif rename to errors/default/images/bkg_main1.gif diff --git a/errors/skin/default/images/bkg_main2.gif b/errors/default/images/bkg_main2.gif similarity index 100% rename from errors/skin/default/images/bkg_main2.gif rename to errors/default/images/bkg_main2.gif diff --git a/errors/skin/default/images/favicon.ico b/errors/default/images/favicon.ico similarity index 100% rename from errors/skin/default/images/favicon.ico rename to errors/default/images/favicon.ico diff --git a/errors/skin/default/images/i_msg-error.gif b/errors/default/images/i_msg-error.gif similarity index 100% rename from errors/skin/default/images/i_msg-error.gif rename to errors/default/images/i_msg-error.gif diff --git a/errors/skin/default/images/i_msg-note.gif b/errors/default/images/i_msg-note.gif similarity index 100% rename from errors/skin/default/images/i_msg-note.gif rename to errors/default/images/i_msg-note.gif diff --git a/errors/skin/default/images/i_msg-success.gif b/errors/default/images/i_msg-success.gif similarity index 100% rename from errors/skin/default/images/i_msg-success.gif rename to errors/default/images/i_msg-success.gif diff --git a/errors/skin/default/images/logo.gif b/errors/default/images/logo.gif similarity index 100% rename from errors/skin/default/images/logo.gif rename to errors/default/images/logo.gif diff --git a/errors/default/page.phtml b/errors/default/page.phtml index f77634dbf9..e17d96dcf3 100644 --- a/errors/default/page.phtml +++ b/errors/default/page.phtml @@ -1,27 +1,53 @@ + -<?php echo $pageTitle?> - +<?php echo $this->pageTitle?> + - - - + + +
    - +
    - +
    - \ No newline at end of file + diff --git a/errors/default/report.phtml b/errors/default/report.phtml index 2c989d5ef4..7774214f9d 100644 --- a/errors/default/report.phtml +++ b/errors/default/report.phtml @@ -1,8 +1,37 @@ +
    -

    There has been an error processing your request.

    +

    There has been an error processing your request

    - + reportId && $this->reportUrl): ?> +

    #reportId ?>

    + + showSentMsg): ?>